2017-08-21 15:43:51

by Maciej S. Szmigiero

[permalink] [raw]
Subject: [PATCH] USB: serial: option: add support for D-Link DWM-157 C1

This commit adds support (IDs, really) for D-Link DWM-157 hardware version
C1 USB modem to option driver.

According to manufacturer-provided Windows INF file the device has four
serial ports:
"D-Link HSPA+DataCard Diagnostics Interface" (interface 2; modem port),
"D-Link HSPA+DataCard NMEA Device" (interface 3),
"D-Link HSPA+DataCard Speech Port" (interface 4),
"D-Link HSPA+DataCard Debug Port" (interface 5).

Signed-off-by: Maciej S. Szmigiero <[email protected]>
Cc: [email protected]
---
drivers/usb/serial/option.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
index fe123153b1a5..fa887c6e50e7 100644
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -2023,6 +2023,8 @@ static const struct usb_device_id option_ids[] = {
{ USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d03, 0xff, 0x02, 0x01) },
{ USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d03, 0xff, 0x00, 0x00) },
{ USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d04, 0xff) }, /* D-Link DWM-158 */
+ { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d0e, 0xff, 0x02, 0x01) }, /* D-Link DWM-157 C1 */
+ { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d0e, 0xff, 0x00, 0x00) },
{ USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7e19, 0xff), /* D-Link DWM-221 B1 */
.driver_info = (kernel_ulong_t)&net_intf4_blacklist },
{ USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7e35, 0xff), /* D-Link DWM-222 */


2017-08-28 10:19:47

by Johan Hovold

[permalink] [raw]
Subject: Re: [PATCH] USB: serial: option: add support for D-Link DWM-157 C1

On Mon, Aug 21, 2017 at 05:43:46PM +0200, Maciej S. Szmigiero wrote:
> This commit adds support (IDs, really) for D-Link DWM-157 hardware version
> C1 USB modem to option driver.
>
> According to manufacturer-provided Windows INF file the device has four
> serial ports:
> "D-Link HSPA+DataCard Diagnostics Interface" (interface 2; modem port),
> "D-Link HSPA+DataCard NMEA Device" (interface 3),
> "D-Link HSPA+DataCard Speech Port" (interface 4),
> "D-Link HSPA+DataCard Debug Port" (interface 5).
>
> Signed-off-by: Maciej S. Szmigiero <[email protected]>
> Cc: [email protected]
> ---
> drivers/usb/serial/option.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
> index fe123153b1a5..fa887c6e50e7 100644
> --- a/drivers/usb/serial/option.c
> +++ b/drivers/usb/serial/option.c
> @@ -2023,6 +2023,8 @@ static const struct usb_device_id option_ids[] = {
> { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d03, 0xff, 0x02, 0x01) },
> { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d03, 0xff, 0x00, 0x00) },
> { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d04, 0xff) }, /* D-Link DWM-158 */
> + { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d0e, 0xff, 0x02, 0x01) }, /* D-Link DWM-157 C1 */
> + { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d0e, 0xff, 0x00, 0x00) },

What is the reason for not using a single USB_DEVICE_INTERFACE_CLASS
here instead?

Do you have access to this device so that you could post the output of
usb-devices (or "lsusb -v")?

> { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7e19, 0xff), /* D-Link DWM-221 B1 */
> .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
> { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7e35, 0xff), /* D-Link DWM-222 */

Thanks,
Johan

2017-08-28 14:33:00

by Maciej S. Szmigiero

[permalink] [raw]
Subject: Re: [PATCH] USB: serial: option: add support for D-Link DWM-157 C1

Hi Johan,

On 28.08.2017 12:19, Johan Hovold wrote:
> On Mon, Aug 21, 2017 at 05:43:46PM +0200, Maciej S. Szmigiero wrote:
>> This commit adds support (IDs, really) for D-Link DWM-157 hardware version
>> C1 USB modem to option driver.
>>
>> According to manufacturer-provided Windows INF file the device has four
>> serial ports:
>> "D-Link HSPA+DataCard Diagnostics Interface" (interface 2; modem port),
>> "D-Link HSPA+DataCard NMEA Device" (interface 3),
>> "D-Link HSPA+DataCard Speech Port" (interface 4),
>> "D-Link HSPA+DataCard Debug Port" (interface 5).
>>
>> Signed-off-by: Maciej S. Szmigiero <[email protected]>
>> Cc: [email protected]
>> ---
>> drivers/usb/serial/option.c | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
>> index fe123153b1a5..fa887c6e50e7 100644
>> --- a/drivers/usb/serial/option.c
>> +++ b/drivers/usb/serial/option.c
>> @@ -2023,6 +2023,8 @@ static const struct usb_device_id option_ids[] = {
>> { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d03, 0xff, 0x02, 0x01) },
>> { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d03, 0xff, 0x00, 0x00) },
>> { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d04, 0xff) }, /* D-Link DWM-158 */
>> + { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d0e, 0xff, 0x02, 0x01) }, /* D-Link DWM-157 C1 */
>> + { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d0e, 0xff, 0x00, 0x00) },
>
> What is the reason for not using a single USB_DEVICE_INTERFACE_CLASS
> here instead?

This is done to be as specific as possible (in case D-Link makes a
similar device with a different interface list or changes it
with a firmware update).

Also, three other D-Link modems few lines above are using the same
USB_DEVICE_AND_INTERFACE_INFO() selectors.
> Do you have access to this device so that you could post the output of
> usb-devices (or "lsusb -v")?

I've attached lsusb output to this message, since it is pretty long.

> Thanks,
> Johan

Thanks,
Maciej


Attachments:
lsusb.txt (9.87 kB)

2017-08-29 07:41:06

by Johan Hovold

[permalink] [raw]
Subject: Re: [PATCH] USB: serial: option: add support for D-Link DWM-157 C1

On Mon, Aug 28, 2017 at 04:32:53PM +0200, Maciej S. Szmigiero wrote:
> Hi Johan,
>
> On 28.08.2017 12:19, Johan Hovold wrote:
> > On Mon, Aug 21, 2017 at 05:43:46PM +0200, Maciej S. Szmigiero wrote:
> >> This commit adds support (IDs, really) for D-Link DWM-157 hardware version
> >> C1 USB modem to option driver.
> >>
> >> According to manufacturer-provided Windows INF file the device has four
> >> serial ports:
> >> "D-Link HSPA+DataCard Diagnostics Interface" (interface 2; modem port),
> >> "D-Link HSPA+DataCard NMEA Device" (interface 3),
> >> "D-Link HSPA+DataCard Speech Port" (interface 4),
> >> "D-Link HSPA+DataCard Debug Port" (interface 5).
> >>
> >> Signed-off-by: Maciej S. Szmigiero <[email protected]>
> >> Cc: [email protected]
> >> ---
> >> drivers/usb/serial/option.c | 2 ++
> >> 1 file changed, 2 insertions(+)
> >>
> >> diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
> >> index fe123153b1a5..fa887c6e50e7 100644
> >> --- a/drivers/usb/serial/option.c
> >> +++ b/drivers/usb/serial/option.c
> >> @@ -2023,6 +2023,8 @@ static const struct usb_device_id option_ids[] = {
> >> { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d03, 0xff, 0x02, 0x01) },
> >> { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d03, 0xff, 0x00, 0x00) },
> >> { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d04, 0xff) }, /* D-Link DWM-158 */
> >> + { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d0e, 0xff, 0x02, 0x01) }, /* D-Link DWM-157 C1 */
> >> + { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d0e, 0xff, 0x00, 0x00) },
> >
> > What is the reason for not using a single USB_DEVICE_INTERFACE_CLASS
> > here instead?
>
> This is done to be as specific as possible (in case D-Link makes a
> similar device with a different interface list or changes it
> with a firmware update).

We can always add more specific matching if this ever becomes an issue.

> Also, three other D-Link modems few lines above are using the same
> USB_DEVICE_AND_INTERFACE_INFO() selectors.

Yeah, I noticed those, and I'm not sure why they're not using
class-matching only either (and note that we have some entries that do).

> > Do you have access to this device so that you could post the output of
> > usb-devices (or "lsusb -v")?
>
> I've attached lsusb output to this message, since it is pretty long.

Ok, thanks. So using USB_DEVICE_INTERFACE_CLASS() looks like it would
work for this device, so please use that instead.

If possible, try to include the more compact output of usb-devices in
the commit message so we have it easily accessible.

Thanks,
Johan

2017-08-29 08:08:35

by Bjørn Mork

[permalink] [raw]
Subject: Re: [PATCH] USB: serial: option: add support for D-Link DWM-157 C1

Johan Hovold <[email protected]> writes:
> On Mon, Aug 28, 2017 at 04:32:53PM +0200, Maciej S. Szmigiero wrote:
>
>> Also, three other D-Link modems few lines above are using the same
>> USB_DEVICE_AND_INTERFACE_INFO() selectors.
>
> Yeah, I noticed those, and I'm not sure why they're not using
> class-matching only either (and note that we have some entries that do).

I see that I'm responsible for those. They can probably be compressed to
USB_DEVICE_INTERFACE_CLASS(). I assume I just didn't think about it...

FWIW, I found this 'devices' listing for the 2001:7d01 device. I believe
the 7d02 and 7d03 are similar:

P: Vendor=2001 ProdID=7d01 Rev= 3.00
S: Manufacturer=D-Link,Inc
S: Product=D-Link DWM-156
C:* #Ifs= 7 Cfg#= 1 Atr=a0 MxPwr=500mA
A: FirstIf#= 0 IfCount= 2 Cls=02(comm.) Sub=0e Prot=00
I:* If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=0e Prot=00 Driver=cdc_mbim
E: Ad=88(I) Atr=03(Int.) MxPS= 64 Ivl=125us
I: If#= 1 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim
I:* If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim
E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=02 Prot=01 Driver=option
E: Ad=87(I) Atr=03(Int.) MxPS= 64 Ivl=500us
E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 6 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms



Bjørn

2017-08-29 08:27:16

by Johan Hovold

[permalink] [raw]
Subject: Re: [PATCH] USB: serial: option: add support for D-Link DWM-157 C1

On Tue, Aug 29, 2017 at 10:08:13AM +0200, Bj?rn Mork wrote:
> Johan Hovold <[email protected]> writes:
> > On Mon, Aug 28, 2017 at 04:32:53PM +0200, Maciej S. Szmigiero wrote:
> >
> >> Also, three other D-Link modems few lines above are using the same
> >> USB_DEVICE_AND_INTERFACE_INFO() selectors.
> >
> > Yeah, I noticed those, and I'm not sure why they're not using
> > class-matching only either (and note that we have some entries that do).
>
> I see that I'm responsible for those. They can probably be compressed to
> USB_DEVICE_INTERFACE_CLASS(). I assume I just didn't think about it...

Thanks for confirming.

> FWIW, I found this 'devices' listing for the 2001:7d01 device. I believe
> the 7d02 and 7d03 are similar:
>
> P: Vendor=2001 ProdID=7d01 Rev= 3.00
> S: Manufacturer=D-Link,Inc
> S: Product=D-Link DWM-156
> C:* #Ifs= 7 Cfg#= 1 Atr=a0 MxPwr=500mA
> A: FirstIf#= 0 IfCount= 2 Cls=02(comm.) Sub=0e Prot=00
> I:* If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=0e Prot=00 Driver=cdc_mbim
> E: Ad=88(I) Atr=03(Int.) MxPS= 64 Ivl=125us
> I: If#= 1 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim
> I:* If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim
> E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=02 Prot=01 Driver=option
> E: Ad=87(I) Atr=03(Int.) MxPS= 64 Ivl=500us
> E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> I:* If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
> E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> I:* If#= 4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
> E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> I:* If#= 5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
> E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> I:* If#= 6 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
> E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> E: Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms

I guess we could use USB_DEVICE_INTERFACE_CLASS() for these three as
well then, if only to avoid having others reproducing this pattern.

Judging from the commit message of a2a2d6c7f93e ("USB: option: add a
D-Link DWM-156 variant") it seems we're not even sure anyone is using
0x7d02 and 0x7d03 so the risk of breaking something (by introducing new
dummy ports) should be low.

Do you want to submit a patch or should I do it?

Thanks,
Johan

2017-08-29 08:45:38

by Bjørn Mork

[permalink] [raw]
Subject: [PATCH] USB: serial: option: simplify 3 D-Link device entries

All the vendor specific interfaces on these devices are serial
functions handled by this driver, so we can use a single class
match entry for each.

P: Vendor=2001 ProdID=7d01 Rev= 3.00
S: Manufacturer=D-Link,Inc
S: Product=D-Link DWM-156
C:* #Ifs= 7 Cfg#= 1 Atr=a0 MxPwr=500mA
A: FirstIf#= 0 IfCount= 2 Cls=02(comm.) Sub=0e Prot=00
I:* If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=0e Prot=00 Driver=cdc_mbim
E: Ad=88(I) Atr=03(Int.) MxPS= 64 Ivl=125us
I: If#= 1 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim
I:* If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim
E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=02 Prot=01 Driver=option
E: Ad=87(I) Atr=03(Int.) MxPS= 64 Ivl=500us
E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 6 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms

Signed-off-by: Bjørn Mork <[email protected]>
---

Johan Hovold <[email protected]> writes:

> Do you want to submit a patch or should I do it?

Well, I can save you that job if this is fine with you. Feel
free to add a stable cc if you think it is appropriate. I am not
sure...


Bjørn


drivers/usb/serial/option.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
index fe123153b1a5..05862b75f895 100644
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -2016,12 +2016,9 @@ static const struct usb_device_id option_ids[] = {
{ USB_DEVICE(TPLINK_VENDOR_ID, 0x9000), /* TP-Link MA260 */
.driver_info = (kernel_ulong_t)&net_intf4_blacklist },
{ USB_DEVICE(CHANGHONG_VENDOR_ID, CHANGHONG_PRODUCT_CH690) },
- { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d01, 0xff, 0x02, 0x01) }, /* D-Link DWM-156 (variant) */
- { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d01, 0xff, 0x00, 0x00) }, /* D-Link DWM-156 (variant) */
- { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d02, 0xff, 0x02, 0x01) },
- { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d02, 0xff, 0x00, 0x00) },
- { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d03, 0xff, 0x02, 0x01) },
- { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d03, 0xff, 0x00, 0x00) },
+ { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d01, 0xff) }, /* D-Link DWM-156 (variant) */
+ { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d02, 0xff) },
+ { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d03, 0xff) },
{ USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d04, 0xff) }, /* D-Link DWM-158 */
{ USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7e19, 0xff), /* D-Link DWM-221 B1 */
.driver_info = (kernel_ulong_t)&net_intf4_blacklist },
--
2.11.0

2017-08-29 14:41:18

by Johan Hovold

[permalink] [raw]
Subject: Re: [PATCH] USB: serial: option: simplify 3 D-Link device entries

On Tue, Aug 29, 2017 at 10:45:13AM +0200, Bj?rn Mork wrote:
> All the vendor specific interfaces on these devices are serial
> functions handled by this driver, so we can use a single class
> match entry for each.
>
> P: Vendor=2001 ProdID=7d01 Rev= 3.00
> S: Manufacturer=D-Link,Inc
> S: Product=D-Link DWM-156
> C:* #Ifs= 7 Cfg#= 1 Atr=a0 MxPwr=500mA
> A: FirstIf#= 0 IfCount= 2 Cls=02(comm.) Sub=0e Prot=00
> I:* If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=0e Prot=00 Driver=cdc_mbim
> E: Ad=88(I) Atr=03(Int.) MxPS= 64 Ivl=125us
> I: If#= 1 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim
> I:* If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim
> E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=02 Prot=01 Driver=option
> E: Ad=87(I) Atr=03(Int.) MxPS= 64 Ivl=500us
> E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> I:* If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
> E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> I:* If#= 4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
> E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> I:* If#= 5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
> E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> I:* If#= 6 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
> E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> E: Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
>
> Signed-off-by: Bj?rn Mork <[email protected]>
> ---
>
> Johan Hovold <[email protected]> writes:
>
> > Do you want to submit a patch or should I do it?
>
> Well, I can save you that job if this is fine with you. Feel
> free to add a stable cc if you think it is appropriate. I am not
> sure...

Thanks! Yeah, not sure about stable either. Maybe I'll just apply this
one on top the new entry coming in, and we can defer the decision to the
stable maintainers next time there's a backport conflict.

Johan

2017-08-30 07:47:34

by Johan Hovold

[permalink] [raw]
Subject: Re: [PATCH] USB: serial: option: simplify 3 D-Link device entries

On Tue, Aug 29, 2017 at 04:41:21PM +0200, Johan Hovold wrote:
> On Tue, Aug 29, 2017 at 10:45:13AM +0200, Bj?rn Mork wrote:
> > All the vendor specific interfaces on these devices are serial
> > functions handled by this driver, so we can use a single class
> > match entry for each.
> >
> > P: Vendor=2001 ProdID=7d01 Rev= 3.00
> > S: Manufacturer=D-Link,Inc
> > S: Product=D-Link DWM-156
> > C:* #Ifs= 7 Cfg#= 1 Atr=a0 MxPwr=500mA
> > A: FirstIf#= 0 IfCount= 2 Cls=02(comm.) Sub=0e Prot=00
> > I:* If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=0e Prot=00 Driver=cdc_mbim
> > E: Ad=88(I) Atr=03(Int.) MxPS= 64 Ivl=125us
> > I: If#= 1 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim
> > I:* If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim
> > E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> > E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> > I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=02 Prot=01 Driver=option
> > E: Ad=87(I) Atr=03(Int.) MxPS= 64 Ivl=500us
> > E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> > E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> > I:* If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
> > E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> > E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> > I:* If#= 4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
> > E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> > E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> > I:* If#= 5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
> > E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> > E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> > I:* If#= 6 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
> > E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> > E: Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> >
> > Signed-off-by: Bj?rn Mork <[email protected]>
> > ---
> >
> > Johan Hovold <[email protected]> writes:
> >
> > > Do you want to submit a patch or should I do it?
> >
> > Well, I can save you that job if this is fine with you. Feel
> > free to add a stable cc if you think it is appropriate. I am not
> > sure...
>
> Thanks! Yeah, not sure about stable either. Maybe I'll just apply this
> one on top the new entry coming in, and we can defer the decision to the
> stable maintainers next time there's a backport conflict.

Now applied (without stable-CC).

Thanks,
Johan