030-USB-serial-option-fix-dwm-158-3g-modem-interface.patch 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. The dwm-158 interface 4 and 5 doesn't answer to the AT commands
  6. and doesn't appears a option interface.
  7. Tested on librecmc distribution (kernel 4.14 using the old blacklist
  8. definitions).
  9. Lars Melin also writes:
  10. Blacklisting interface 4 and 5 is correct because:
  11. MI_00 D-Link Mobile Broadband Device (cdc_ether)
  12. MI_02 D-Link HSPA+DataCard Diagnostics Interface (also ppp modem)
  13. MI_03 D-Link HSPA+DataCard NMEA Device
  14. MI_04 D-Link HSPA+DataCard Speech Port
  15. MI_05 D-Link HSPA+DataCard Debug Port
  16. MI_06 USB Mass Storage Device
  17. Signed-off-by: Giuseppe Lippolis <giu.lippolis@gmail.com>
  18. [ johan: add Lars's comment on the interface layout and reword summary ]
  19. Cc: Lars Melin <larsm17@gmail.com>
  20. Cc: Dan Williams <dcbw@redhat.com>
  21. Signed-off-by: Johan Hovold <johan@kernel.org>
  22. ---
  23. drivers/usb/serial/option.c | 3 ++-
  24. 1 file changed, 2 insertions(+), 1 deletion(-)
  25. --- a/drivers/usb/serial/option.c
  26. +++ b/drivers/usb/serial/option.c
  27. @@ -1987,7 +1987,8 @@ static const struct usb_device_id option
  28. { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d01, 0xff) }, /* D-Link DWM-156 (variant) */
  29. { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d02, 0xff) },
  30. { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d03, 0xff) },
  31. - { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d04, 0xff) }, /* D-Link DWM-158 */
  32. + { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d04, 0xff), /* D-Link DWM-158 */
  33. + .driver_info = RSVD(4) | RSVD(5) },
  34. { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d0e, 0xff) }, /* D-Link DWM-157 C1 */
  35. { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7e19, 0xff), /* D-Link DWM-221 B1 */
  36. .driver_info = RSVD(4) },