Commit 14d38f7d8076508b54bf0bb4426151b1ee9a163d
Committed by
Greg Kroah-Hartman
1 parent
34aa8bbd74
USB: qcserial/option: make AT URCs work for Sierra Wireless MC73xx
commit d80c0d14183516f184a5ac88e11008ee4c7d2a2e upstream. As has been discussed in the thread starting with https://lkml.kernel.org/g/549748e9.d+SiJzqu50f1r4lSAL043YSc@arcor.de Sierra Wireless MC73xx devices with USB VID/PID 0x1199:0x68c0 require the option_send_setup() code to be used on the USB interface for the AT port to make unsolicited response codes work correctly. Move these devices from the qcserial driver where they have been added by commit 70a3615fc07c2330ed7c1e922f3c44f4a67c0762 ("usb: qcserial: add Sierra Wireless MC73xx") to the option driver and add a MC73xx-specific blacklist to ensure that 1. the sendsetup code is not used for the DIAG/DM and NMEA interfaces 2. the option driver does not attach to the QMI/network interfaces Signed-off-by: Reinhard Speyerer <rspmn@arcor.de> Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Showing 2 changed files with 10 additions and 2 deletions Side-by-side Diff
drivers/usb/serial/option.c
... | ... | @@ -234,6 +234,8 @@ |
234 | 234 | |
235 | 235 | #define QUALCOMM_VENDOR_ID 0x05C6 |
236 | 236 | |
237 | +#define SIERRA_VENDOR_ID 0x1199 | |
238 | + | |
237 | 239 | #define CMOTECH_VENDOR_ID 0x16d8 |
238 | 240 | #define CMOTECH_PRODUCT_6001 0x6001 |
239 | 241 | #define CMOTECH_PRODUCT_CMU_300 0x6002 |
... | ... | @@ -512,7 +514,7 @@ |
512 | 514 | OPTION_BLACKLIST_RESERVED_IF = 2 |
513 | 515 | }; |
514 | 516 | |
515 | -#define MAX_BL_NUM 8 | |
517 | +#define MAX_BL_NUM 11 | |
516 | 518 | struct option_blacklist_info { |
517 | 519 | /* bitfield of interface numbers for OPTION_BLACKLIST_SENDSETUP */ |
518 | 520 | const unsigned long sendsetup; |
... | ... | @@ -601,6 +603,11 @@ |
601 | 603 | .reserved = BIT(1) | BIT(5), |
602 | 604 | }; |
603 | 605 | |
606 | +static const struct option_blacklist_info sierra_mc73xx_blacklist = { | |
607 | + .sendsetup = BIT(0) | BIT(2), | |
608 | + .reserved = BIT(8) | BIT(10) | BIT(11), | |
609 | +}; | |
610 | + | |
604 | 611 | static const struct usb_device_id option_ids[] = { |
605 | 612 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) }, |
606 | 613 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA) }, |
... | ... | @@ -1098,6 +1105,8 @@ |
1098 | 1105 | { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6613)}, /* Onda H600/ZTE MF330 */ |
1099 | 1106 | { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x0023)}, /* ONYX 3G device */ |
1100 | 1107 | { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x9000)}, /* SIMCom SIM5218 */ |
1108 | + { USB_DEVICE_INTERFACE_CLASS(SIERRA_VENDOR_ID, 0x68c0, 0xff), | |
1109 | + .driver_info = (kernel_ulong_t)&sierra_mc73xx_blacklist }, /* MC73xx */ | |
1101 | 1110 | { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6001) }, |
1102 | 1111 | { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CMU_300) }, |
1103 | 1112 | { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6003), |
drivers/usb/serial/qcserial.c
... | ... | @@ -142,7 +142,6 @@ |
142 | 142 | {DEVICE_SWI(0x0f3d, 0x68a2)}, /* Sierra Wireless MC7700 */ |
143 | 143 | {DEVICE_SWI(0x114f, 0x68a2)}, /* Sierra Wireless MC7750 */ |
144 | 144 | {DEVICE_SWI(0x1199, 0x68a2)}, /* Sierra Wireless MC7710 */ |
145 | - {DEVICE_SWI(0x1199, 0x68c0)}, /* Sierra Wireless MC73xx */ | |
146 | 145 | {DEVICE_SWI(0x1199, 0x901c)}, /* Sierra Wireless EM7700 */ |
147 | 146 | {DEVICE_SWI(0x1199, 0x901f)}, /* Sierra Wireless EM7355 */ |
148 | 147 | {DEVICE_SWI(0x1199, 0x9040)}, /* Sierra Wireless Modem */ |