mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-19 21:21:09 +00:00
tty: resolve some sierra breakage
The various merges into the sierra driver inadvertently undid
commit 212b8f0c3f
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>
This commit is contained in:
parent
7d55deaf50
commit
00b040deca
1 changed files with 14 additions and 3 deletions
|
@ -257,8 +257,19 @@ static int sierra_send_setup(struct usb_serial_port *port)
|
||||||
val |= 0x02;
|
val |= 0x02;
|
||||||
|
|
||||||
/* If composite device then properly report interface */
|
/* If composite device then properly report interface */
|
||||||
if (serial->num_ports == 1)
|
if (serial->num_ports == 1) {
|
||||||
interface = sierra_calc_interface(serial);
|
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 */
|
/* Otherwise the need to do non-composite mapping */
|
||||||
else {
|
else {
|
||||||
|
@ -268,11 +279,11 @@ static int sierra_send_setup(struct usb_serial_port *port)
|
||||||
interface = 1;
|
interface = 1;
|
||||||
else if (port->bulk_out_endpointAddress == 5)
|
else if (port->bulk_out_endpointAddress == 5)
|
||||||
interface = 2;
|
interface = 2;
|
||||||
}
|
return usb_control_msg(serial->dev,
|
||||||
return usb_control_msg(serial->dev,
|
|
||||||
usb_rcvctrlpipe(serial->dev, 0),
|
usb_rcvctrlpipe(serial->dev, 0),
|
||||||
0x22, 0x21, val, interface,
|
0x22, 0x21, val, interface,
|
||||||
NULL, 0, USB_CTRL_SET_TIMEOUT);
|
NULL, 0, USB_CTRL_SET_TIMEOUT);
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue