USB: fix interaction between different interfaces in an "Option" usb device
authorMiguel Angel Alvarez <ma.alvarez@ziv.es>
Thu, 14 Dec 2006 18:49:35 +0000 (19:49 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 5 Jan 2007 20:19:08 +0000 (12:19 -0800)
Just the serial port in the first interface should control DTR and RTS
lines. This way, the closing of the rest of the ports does not produce a=
hangup in the communication.

Signed-off-by: Miguel Angel Alvarez <ma.alvarez@ziv.es>
Signed-off-by: Matthias Urlichs <matthias@urlichs.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/serial/option.c

index 819266b..5ca04e8 100644 (file)
@@ -625,6 +625,9 @@ static int option_send_setup(struct usb_serial_port *port)
 
        dbg("%s", __FUNCTION__);
 
+       if (port->number != 0)
+               return 0;
+
        portdata = usb_get_serial_port_data(port);
 
        if (port->tty) {