Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 146299
b: refs/heads/master
c: 00b040d
h: refs/heads/master
i:
  146297: b989a7f
  146295: 4728b70
v: v3
  • Loading branch information
Alan Cox authored and Linus Torvalds committed Jun 11, 2009
1 parent 9109081 commit 2a4bc75
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7d55deaf50182c47c1e805dc8cc85f2769f0673e
refs/heads/master: 00b040deca907a113f5bef67a6cc7a4f65a5ace9
17 changes: 14 additions & 3 deletions trunk/drivers/usb/serial/sierra.c
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,19 @@ static int sierra_send_setup(struct usb_serial_port *port)
val |= 0x02;

/* If composite device then properly report interface */
if (serial->num_ports == 1)
if (serial->num_ports == 1) {
interface = sierra_calc_interface(serial);
/* Control message is sent only to interfaces with
* interrupt_in endpoints
*/
if (port->interrupt_in_urb) {
/* send control message */
return usb_control_msg(serial->dev,
usb_rcvctrlpipe(serial->dev, 0),
0x22, 0x21, val, interface,
NULL, 0, USB_CTRL_SET_TIMEOUT);
}
}

/* Otherwise the need to do non-composite mapping */
else {
Expand All @@ -268,11 +279,11 @@ static int sierra_send_setup(struct usb_serial_port *port)
interface = 1;
else if (port->bulk_out_endpointAddress == 5)
interface = 2;
}
return usb_control_msg(serial->dev,
return usb_control_msg(serial->dev,
usb_rcvctrlpipe(serial->dev, 0),
0x22, 0x21, val, interface,
NULL, 0, USB_CTRL_SET_TIMEOUT);
}
return 0;
}

Expand Down

0 comments on commit 2a4bc75

Please sign in to comment.