* [PATCH] USB: serial: option: fix Quectel BG96 matching
@ 2020-12-01 10:03 Bjørn Mork
2020-12-01 10:18 ` Johan Hovold
0 siblings, 1 reply; 5+ messages in thread
From: Bjørn Mork @ 2020-12-01 10:03 UTC (permalink / raw)
To: Johan Hovold; +Cc: linux-usb, Bjørn Mork, Sebastian Sjoholm, linux-stable
This is a partial revert of commit 2bb70f0a4b23 ("USB: serial:
option: support dynamic Quectel USB compositions")
The Quectel BG96 is different from most other modern Quectel modems,
having serial functions with 3 endpoints using ff/ff/ff and ff/fe/ff
class/subclass/protocol. Including it in the change to accommodate
dynamic function mapping was incorrect.
Revert to interface number matching for the BG96, assuming static
layout of the RMNET function on interface 4. This restores support
for the serial functions on interfaces 2 and 3.
Full lsusb output for the BG96:
Bus 002 Device 003: ID 2c7c:0296
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x2c7c
idProduct 0x0296
bcdDevice 0.00
iManufacturer 3 Qualcomm, Incorporated
iProduct 2 Qualcomm CDMA Technologies MSM
iSerial 4 d1098243
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 145
bNumInterfaces 5
bConfigurationValue 1
iConfiguration 1 Qualcomm Configuration
bmAttributes 0xe0
Self Powered
Remote Wakeup
MaxPower 500mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 255 Vendor Specific Subclass
bInterfaceProtocol 255 Vendor Specific Protocol
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 255 Vendor Specific Subclass
bInterfaceProtocol 255 Vendor Specific Protocol
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 2
bAlternateSetting 0
bNumEndpoints 3
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 255 Vendor Specific Subclass
bInterfaceProtocol 255 Vendor Specific Protocol
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 5
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x84 EP 4 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x03 EP 3 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 3
bAlternateSetting 0
bNumEndpoints 3
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 254
bInterfaceProtocol 255
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x85 EP 5 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 5
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x86 EP 6 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x04 EP 4 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 4
bAlternateSetting 0
bNumEndpoints 3
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 255 Vendor Specific Subclass
bInterfaceProtocol 255 Vendor Specific Protocol
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x87 EP 7 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 5
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x88 EP 8 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x05 EP 5 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
bNumConfigurations 1
Device Status: 0x0000
(Bus Powered)
Cc: Sebastian Sjoholm <sebastian.sjoholm@gmail.com>
Cc: linux-stable@vger.kernel.org
Fixes: 2bb70f0a4b23 ("USB: serial: option: support dynamic Quectel USB compositions")
Signed-off-by: Bjørn Mork <bjorn@mork.no>
---
drivers/usb/serial/option.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
index 54ca85cc920d..241baba0317a 100644
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -1105,9 +1105,8 @@ static const struct usb_device_id option_ids[] = {
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EG95, 0xff, 0xff, 0xff),
.driver_info = NUMEP2 },
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EG95, 0xff, 0, 0) },
- { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_BG96, 0xff, 0xff, 0xff),
- .driver_info = NUMEP2 },
- { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_BG96, 0xff, 0, 0) },
+ { USB_DEVICE(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_BG96),
+ .driver_info = RSVD(4) },
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EP06, 0xff, 0xff, 0xff),
.driver_info = RSVD(1) | RSVD(2) | RSVD(3) | RSVD(4) | NUMEP2 },
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EP06, 0xff, 0, 0) },
--
2.29.2
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] USB: serial: option: fix Quectel BG96 matching
2020-12-01 10:03 [PATCH] USB: serial: option: fix Quectel BG96 matching Bjørn Mork
@ 2020-12-01 10:18 ` Johan Hovold
2020-12-01 10:21 ` Bjørn Mork
0 siblings, 1 reply; 5+ messages in thread
From: Johan Hovold @ 2020-12-01 10:18 UTC (permalink / raw)
To: Bjørn Mork; +Cc: Johan Hovold, linux-usb, Sebastian Sjoholm, linux-stable
On Tue, Dec 01, 2020 at 11:03:18AM +0100, Bjørn Mork wrote:
> This is a partial revert of commit 2bb70f0a4b23 ("USB: serial:
> option: support dynamic Quectel USB compositions")
>
> The Quectel BG96 is different from most other modern Quectel modems,
> having serial functions with 3 endpoints using ff/ff/ff and ff/fe/ff
> class/subclass/protocol. Including it in the change to accommodate
> dynamic function mapping was incorrect.
>
> Revert to interface number matching for the BG96, assuming static
> layout of the RMNET function on interface 4. This restores support
> for the serial functions on interfaces 2 and 3.
>
> Full lsusb output for the BG96:
> Cc: Sebastian Sjoholm <sebastian.sjoholm@gmail.com>
> Cc: linux-stable@vger.kernel.org
> Fixes: 2bb70f0a4b23 ("USB: serial: option: support dynamic Quectel USB compositions")
> Signed-off-by: Bjørn Mork <bjorn@mork.no>
Thanks, Bjørn. Now applied.
Johan
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] USB: serial: option: fix Quectel BG96 matching
2020-12-01 10:18 ` Johan Hovold
@ 2020-12-01 10:21 ` Bjørn Mork
2020-12-01 10:24 ` Johan Hovold
2020-12-01 16:39 ` Greg KH
0 siblings, 2 replies; 5+ messages in thread
From: Bjørn Mork @ 2020-12-01 10:21 UTC (permalink / raw)
To: Johan Hovold; +Cc: linux-usb, Sebastian Sjoholm, stable
Johan Hovold <johan@kernel.org> writes:
> On Tue, Dec 01, 2020 at 11:03:18AM +0100, Bjørn Mork wrote:
>> This is a partial revert of commit 2bb70f0a4b23 ("USB: serial:
>> option: support dynamic Quectel USB compositions")
>>
>> The Quectel BG96 is different from most other modern Quectel modems,
>> having serial functions with 3 endpoints using ff/ff/ff and ff/fe/ff
>> class/subclass/protocol. Including it in the change to accommodate
>> dynamic function mapping was incorrect.
>>
>> Revert to interface number matching for the BG96, assuming static
>> layout of the RMNET function on interface 4. This restores support
>> for the serial functions on interfaces 2 and 3.
>>
>> Full lsusb output for the BG96:
>
>> Cc: Sebastian Sjoholm <sebastian.sjoholm@gmail.com>
>> Cc: linux-stable@vger.kernel.org
>> Fixes: 2bb70f0a4b23 ("USB: serial: option: support dynamic Quectel USB compositions")
>> Signed-off-by: Bjørn Mork <bjorn@mork.no>
>
> Thanks, Bjørn. Now applied.
Thanks. But I see that I managed to type the stable address wrong.
Sorry. Hope you can get that fixed somehow.
Patch for checkpatch next, I guess...
Bjørn
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] USB: serial: option: fix Quectel BG96 matching
2020-12-01 10:21 ` Bjørn Mork
@ 2020-12-01 10:24 ` Johan Hovold
2020-12-01 16:39 ` Greg KH
1 sibling, 0 replies; 5+ messages in thread
From: Johan Hovold @ 2020-12-01 10:24 UTC (permalink / raw)
To: Bjørn Mork; +Cc: Johan Hovold, linux-usb, Sebastian Sjoholm, stable
On Tue, Dec 01, 2020 at 11:21:42AM +0100, Bjørn Mork wrote:
> Johan Hovold <johan@kernel.org> writes:
>
> > On Tue, Dec 01, 2020 at 11:03:18AM +0100, Bjørn Mork wrote:
> >> This is a partial revert of commit 2bb70f0a4b23 ("USB: serial:
> >> option: support dynamic Quectel USB compositions")
> >>
> >> The Quectel BG96 is different from most other modern Quectel modems,
> >> having serial functions with 3 endpoints using ff/ff/ff and ff/fe/ff
> >> class/subclass/protocol. Including it in the change to accommodate
> >> dynamic function mapping was incorrect.
> >>
> >> Revert to interface number matching for the BG96, assuming static
> >> layout of the RMNET function on interface 4. This restores support
> >> for the serial functions on interfaces 2 and 3.
> >>
> >> Full lsusb output for the BG96:
> >
> >> Cc: Sebastian Sjoholm <sebastian.sjoholm@gmail.com>
> >> Cc: linux-stable@vger.kernel.org
> >> Fixes: 2bb70f0a4b23 ("USB: serial: option: support dynamic Quectel USB compositions")
> >> Signed-off-by: Bjørn Mork <bjorn@mork.no>
> >
> > Thanks, Bjørn. Now applied.
>
> Thanks. But I see that I managed to type the stable address wrong.
> Sorry. Hope you can get that fixed somehow.
Yeah, I noticed when replying. Now fixed up.
> Patch for checkpatch next, I guess...
Heh, a potentially useful addition for a change. ;)
Johan
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] USB: serial: option: fix Quectel BG96 matching
2020-12-01 10:21 ` Bjørn Mork
2020-12-01 10:24 ` Johan Hovold
@ 2020-12-01 16:39 ` Greg KH
1 sibling, 0 replies; 5+ messages in thread
From: Greg KH @ 2020-12-01 16:39 UTC (permalink / raw)
To: Bjørn Mork; +Cc: Johan Hovold, linux-usb, Sebastian Sjoholm, stable
On Tue, Dec 01, 2020 at 11:21:42AM +0100, Bjørn Mork wrote:
> Johan Hovold <johan@kernel.org> writes:
>
> > On Tue, Dec 01, 2020 at 11:03:18AM +0100, Bjørn Mork wrote:
> >> This is a partial revert of commit 2bb70f0a4b23 ("USB: serial:
> >> option: support dynamic Quectel USB compositions")
> >>
> >> The Quectel BG96 is different from most other modern Quectel modems,
> >> having serial functions with 3 endpoints using ff/ff/ff and ff/fe/ff
> >> class/subclass/protocol. Including it in the change to accommodate
> >> dynamic function mapping was incorrect.
> >>
> >> Revert to interface number matching for the BG96, assuming static
> >> layout of the RMNET function on interface 4. This restores support
> >> for the serial functions on interfaces 2 and 3.
> >>
> >> Full lsusb output for the BG96:
> >
> >> Cc: Sebastian Sjoholm <sebastian.sjoholm@gmail.com>
> >> Cc: linux-stable@vger.kernel.org
> >> Fixes: 2bb70f0a4b23 ("USB: serial: option: support dynamic Quectel USB compositions")
> >> Signed-off-by: Bjørn Mork <bjorn@mork.no>
> >
> > Thanks, Bjørn. Now applied.
>
> Thanks. But I see that I managed to type the stable address wrong.
> Sorry. Hope you can get that fixed somehow.
No worries, people type it wrong all the time, my regex would have
caught it when it hits Linus's tree :)
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-12-01 16:39 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-01 10:03 [PATCH] USB: serial: option: fix Quectel BG96 matching Bjørn Mork
2020-12-01 10:18 ` Johan Hovold
2020-12-01 10:21 ` Bjørn Mork
2020-12-01 10:24 ` Johan Hovold
2020-12-01 16:39 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox