summaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial
diff options
context:
space:
mode:
authorChris Collins <chris@ursys.com.au>2008-04-10 10:15:53 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2008-04-24 21:16:51 -0700
commit5f760040bcb4cc0498d4c662c4ea305290198ef3 (patch)
treeb47db322de6c6903b5201d7e6645a6bc1c54f911 /drivers/usb/serial
parente6a79f1f07fc88a2efd6d0e8f0ccf591cb93cd34 (diff)
USB: option.c: correct DTR behaviour
Setting DTR et al. should work for all interfaces if you actually pass the interface number. :-P This should help with devices that have important pseudo-serial ports that aren't on the first interface in the device. Signed-off-by: Chris Collins <chris@ursys.com.au> Signed-off-by: Matthias Urlichs <matthias@urlichs.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/serial')
-rw-r--r--drivers/usb/serial/option.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
index 0e7eeb2820e..130aa96746f 100644
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -28,7 +28,7 @@
device features.
*/
-#define DRIVER_VERSION "v0.7.1"
+#define DRIVER_VERSION "v0.7.2"
#define DRIVER_AUTHOR "Matthias Urlichs <smurf@smurf.noris.de>"
#define DRIVER_DESC "USB Driver for GSM modems"
@@ -824,16 +824,19 @@ static void option_setup_urbs(struct usb_serial *serial)
}
}
+
+/** send RTS/DTR state to the port.
+ *
+ * This is exactly the same as SET_CONTROL_LINE_STATE from the PSTN
+ * CDC.
+*/
static int option_send_setup(struct usb_serial_port *port)
{
struct usb_serial *serial = port->serial;
struct option_port_private *portdata;
-
+ int ifNum = serial->interface->cur_altsetting->desc.bInterfaceNumber;
dbg("%s", __FUNCTION__);
- if (port->number != 0)
- return 0;
-
portdata = usb_get_serial_port_data(port);
if (port->tty) {
@@ -845,7 +848,7 @@ static int option_send_setup(struct usb_serial_port *port)
return usb_control_msg(serial->dev,
usb_rcvctrlpipe(serial->dev, 0),
- 0x22,0x21,val,0,NULL,0,USB_CTRL_SET_TIMEOUT);
+ 0x22,0x21,val,ifNum,NULL,0,USB_CTRL_SET_TIMEOUT);
}
return 0;