USB: serial: opticon: fix CTS retrieval at open
Subsystems (3)
Johan Hovold
maintainerPATCH 1/1 USB: serial: opticon: fix CTS retrieval at open
The opticon driver used a control request at open to trigger a CTS status notification to be sent over the bulk-in pipe. When the driver was converted to using the generic read implementation, an inverted test prevented this request from being sent, something which could lead to TIOCMGET reporting an incorrect CTS state.
implementation")
--- drivers/usb/serial/opticon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/serial/opticon.c +1 -1
@@ -142,7 +142,7 @@ static int opticon_open(struct tty_struct *tty, struct usb_serial_port *port)usb_clear_halt (port->serial->dev, port->read_urb->pipe); res =usb_serial_generic_open (tty, port); -if (!res) +if (res)return res;/* Request CTS line state, sometimes during opening the current
Signature · 1 line
2.10.2
Quoted 6 lines · Johan Hovold
The opticon driver used a control request at open to trigger a CTS status notification to be sent over the bulk-in pipe. When the driver was converted to using the generic read implementation, an inverted test prevented this request from being sent, something which could lead to TIOCMGET reporting an incorrect CTS state.
Quoted 9 lines
Reported-by Dan Carpenter <[email protected]>Fixes 7a6ee2b02751 ("USB: opticon: switch to generic readimplementation")
Cc stable <[email protected]>Signed-off-by Johan Hovold <[email protected]>--- drivers/usb/serial/opticon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Johan Hovold
maintainerQuoted 17 lines · Greg Kroah-Hartman
Quoted 6 lines · Johan Hovold
The opticon driver used a control request at open to trigger a CTS status notification to be sent over the bulk-in pipe. When the driver was converted to using the generic read implementation, an inverted test prevented this request from being sent, something which could lead to TIOCMGET reporting an incorrect CTS state.
Quoted 9 lines
Reported-by Dan Carpenter <[email protected]>Fixes 7a6ee2b02751 ("USB: opticon: switch to generic readimplementation")
Cc stable <[email protected]>Signed-off-by Johan Hovold <[email protected]>--- drivers/usb/serial/opticon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 1 line
Reviewed-by Greg Kroah-Hartman <[email protected]>
Thanks for the review. Now applied for -next.
Johan