4201ab17442c5f12f2c05353a236c4709fdb1e16
[openwrt/staging/chunkeey.git] / target / linux / generic / backport-4.14 / 030-USB-serial-option-fix-dwm-158-3g-modem-interface.patch
1 From 4d304a6fe93538ce356b4593dc43476b50c023e7 Mon Sep 17 00:00:00 2001
2 From: Giuseppe Lippolis <giu.lippolis@gmail.com>
3 Date: Mon, 23 Apr 2018 09:03:06 +0200
4 Subject: USB: serial: option: blacklist unused dwm-158 interfaces
5
6 The dwm-158 interface 4 and 5 doesn't answer to the AT commands
7 and doesn't appears a option interface.
8 Tested on openwrt distribution (kernel 4.14 using the old blacklist
9 definitions).
10
11 Lars Melin also writes:
12
13 Blacklisting interface 4 and 5 is correct because:
14
15 MI_00 D-Link Mobile Broadband Device (cdc_ether)
16 MI_02 D-Link HSPA+DataCard Diagnostics Interface (also ppp modem)
17 MI_03 D-Link HSPA+DataCard NMEA Device
18 MI_04 D-Link HSPA+DataCard Speech Port
19 MI_05 D-Link HSPA+DataCard Debug Port
20 MI_06 USB Mass Storage Device
21
22 Signed-off-by: Giuseppe Lippolis <giu.lippolis@gmail.com>
23 [ johan: add Lars's comment on the interface layout and reword summary ]
24 Cc: Lars Melin <larsm17@gmail.com>
25 Cc: Dan Williams <dcbw@redhat.com>
26 Signed-off-by: Johan Hovold <johan@kernel.org>
27 ---
28 drivers/usb/serial/option.c | 3 ++-
29 1 file changed, 2 insertions(+), 1 deletion(-)
30
31 --- a/drivers/usb/serial/option.c
32 +++ b/drivers/usb/serial/option.c
33 @@ -1927,7 +1927,8 @@ static const struct usb_device_id option
34 { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d01, 0xff) }, /* D-Link DWM-156 (variant) */
35 { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d02, 0xff) },
36 { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d03, 0xff) },
37 - { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d04, 0xff) }, /* D-Link DWM-158 */
38 + { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d04, 0xff), /* D-Link DWM-158 */
39 + .driver_info = RSVD(4) | RSVD(5) },
40 { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d0e, 0xff) }, /* D-Link DWM-157 C1 */
41 { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7e19, 0xff), /* D-Link DWM-221 B1 */
42 .driver_info = RSVD(4) },