aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/sierra.c
diff options
context:
space:
mode:
authorAlan Cox <alan@linux.intel.com>2009-06-11 09:29:29 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-06-11 11:51:07 -0400
commit00b040deca907a113f5bef67a6cc7a4f65a5ace9 (patch)
tree7621001ba6c61210f381e08c1e131a1c3661cd47 /drivers/usb/serial/sierra.c
parent7d55deaf50182c47c1e805dc8cc85f2769f0673e (diff)
tty: resolve some sierra breakage
The various merges into the sierra driver inadvertently undid commit 212b8f0c3f5a2280bfa1d6ab13a6fe98552becaa by Elina Pasheva <epasheva@sierrawireless.com>. Put it back so the OBEX port works again. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/usb/serial/sierra.c')
-rw-r--r--drivers/usb/serial/sierra.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c
index 1319b8968d82..222a6230276b 100644
--- a/drivers/usb/serial/sierra.c
+++ b/drivers/usb/serial/sierra.c
@@ -257,8 +257,19 @@ static int sierra_send_setup(struct usb_serial_port *port)
257 val |= 0x02; 257 val |= 0x02;
258 258
259 /* If composite device then properly report interface */ 259 /* If composite device then properly report interface */
260 if (serial->num_ports == 1) 260 if (serial->num_ports == 1) {
261 interface = sierra_calc_interface(serial); 261 interface = sierra_calc_interface(serial);
262 /* Control message is sent only to interfaces with
263 * interrupt_in endpoints
264 */
265 if (port->interrupt_in_urb) {
266 /* send control message */
267 return usb_control_msg(serial->dev,
268 usb_rcvctrlpipe(serial->dev, 0),
269 0x22, 0x21, val, interface,
270 NULL, 0, USB_CTRL_SET_TIMEOUT);
271 }
272 }
262 273
263 /* Otherwise the need to do non-composite mapping */ 274 /* Otherwise the need to do non-composite mapping */
264 else { 275 else {
@@ -268,11 +279,11 @@ static int sierra_send_setup(struct usb_serial_port *port)
268 interface = 1; 279 interface = 1;
269 else if (port->bulk_out_endpointAddress == 5) 280 else if (port->bulk_out_endpointAddress == 5)
270 interface = 2; 281 interface = 2;
271 } 282 return usb_control_msg(serial->dev,
272 return usb_control_msg(serial->dev,
273 usb_rcvctrlpipe(serial->dev, 0), 283 usb_rcvctrlpipe(serial->dev, 0),
274 0x22, 0x21, val, interface, 284 0x22, 0x21, val, interface,
275 NULL, 0, USB_CTRL_SET_TIMEOUT); 285 NULL, 0, USB_CTRL_SET_TIMEOUT);
286 }
276 return 0; 287 return 0;
277} 288}
278 289