forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-09 95099d4622f8cb224d94e314c7a8e0df60b13f87
kernel/drivers/usb/serial/qcserial.c
....@@ -166,6 +166,8 @@
166166 {DEVICE_SWI(0x1199, 0x9090)}, /* Sierra Wireless EM7565 QDL */
167167 {DEVICE_SWI(0x1199, 0x9091)}, /* Sierra Wireless EM7565 */
168168 {DEVICE_SWI(0x1199, 0x90d2)}, /* Sierra Wireless EM9191 QDL */
169
+ {DEVICE_SWI(0x1199, 0xc080)}, /* Sierra Wireless EM7590 QDL */
170
+ {DEVICE_SWI(0x1199, 0xc081)}, /* Sierra Wireless EM7590 */
169171 {DEVICE_SWI(0x413c, 0x81a2)}, /* Dell Wireless 5806 Gobi(TM) 4G LTE Mobile Broadband Card */
170172 {DEVICE_SWI(0x413c, 0x81a3)}, /* Dell Wireless 5570 HSPA+ (42Mbps) Mobile Broadband Card */
171173 {DEVICE_SWI(0x413c, 0x81a4)}, /* Dell Wireless 5570e HSPA+ (42Mbps) Mobile Broadband Card */
....@@ -175,6 +177,7 @@
175177 {DEVICE_SWI(0x413c, 0x81b3)}, /* Dell Wireless 5809e Gobi(TM) 4G LTE Mobile Broadband Card (rev3) */
176178 {DEVICE_SWI(0x413c, 0x81b5)}, /* Dell Wireless 5811e QDL */
177179 {DEVICE_SWI(0x413c, 0x81b6)}, /* Dell Wireless 5811e QDL */
180
+ {DEVICE_SWI(0x413c, 0x81c2)}, /* Dell Wireless 5811e */
178181 {DEVICE_SWI(0x413c, 0x81cb)}, /* Dell Wireless 5816e QDL */
179182 {DEVICE_SWI(0x413c, 0x81cc)}, /* Dell Wireless 5816e */
180183 {DEVICE_SWI(0x413c, 0x81cf)}, /* Dell Wireless 5819 */
....@@ -244,11 +247,11 @@
244247 /* QDL mode */
245248 /* Gobi 2000 has a single altsetting, older ones have two */
246249 if (serial->interface->num_altsetting == 2)
247
- intf = &serial->interface->altsetting[1];
250
+ intf = usb_altnum_to_altsetting(serial->interface, 1);
248251 else if (serial->interface->num_altsetting > 2)
249252 goto done;
250253
251
- if (intf->desc.bNumEndpoints == 2 &&
254
+ if (intf && intf->desc.bNumEndpoints == 2 &&
252255 usb_endpoint_is_bulk_in(&intf->endpoint[0].desc) &&
253256 usb_endpoint_is_bulk_out(&intf->endpoint[1].desc)) {
254257 dev_dbg(dev, "QDL port found\n");
....@@ -367,9 +370,8 @@
367370 * a specific function, while the subclass indicate a
368371 * specific firmware source
369372 *
370
- * This is a blacklist of functions known to be
371
- * non-serial. The rest are assumed to be serial and
372
- * will be handled by this driver
373
+ * This is a list of functions known to be non-serial. The rest
374
+ * are assumed to be serial and will be handled by this driver
373375 */
374376 switch (intf->desc.bInterfaceProtocol) {
375377 /* QMI combined (qmi_wwan) */