Skip to content

Commit 2bdc2bc

Browse files
committed
Merge tag 'usb-serial-5.19-rc4' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus
Johan writes: USB-serial fixes for 5.19-rc4 Here are some new modem device ids and support for further PL2303 device types. All but the final commit (RM500K device id) have been in linux-next and with no reported issues. * tag 'usb-serial-5.19-rc4' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial: USB: serial: option: add Quectel RM500K module support USB: serial: option: add Quectel EM05-G modem USB: serial: pl2303: add support for more HXN (G) types USB: serial: option: add Telit LE910Cx 0x1250 composition
2 parents 9ef1654 + 15b694e commit 2bdc2bc

File tree

2 files changed

+23
-12
lines changed

2 files changed

+23
-12
lines changed

drivers/usb/serial/option.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,10 +252,12 @@ static void option_instat_callback(struct urb *urb);
252252
#define QUECTEL_PRODUCT_EG95 0x0195
253253
#define QUECTEL_PRODUCT_BG96 0x0296
254254
#define QUECTEL_PRODUCT_EP06 0x0306
255+
#define QUECTEL_PRODUCT_EM05G 0x030a
255256
#define QUECTEL_PRODUCT_EM12 0x0512
256257
#define QUECTEL_PRODUCT_RM500Q 0x0800
257258
#define QUECTEL_PRODUCT_EC200S_CN 0x6002
258259
#define QUECTEL_PRODUCT_EC200T 0x6026
260+
#define QUECTEL_PRODUCT_RM500K 0x7001
259261

260262
#define CMOTECH_VENDOR_ID 0x16d8
261263
#define CMOTECH_PRODUCT_6001 0x6001
@@ -1134,6 +1136,8 @@ static const struct usb_device_id option_ids[] = {
11341136
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EP06, 0xff, 0xff, 0xff),
11351137
.driver_info = RSVD(1) | RSVD(2) | RSVD(3) | RSVD(4) | NUMEP2 },
11361138
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EP06, 0xff, 0, 0) },
1139+
{ USB_DEVICE_INTERFACE_CLASS(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM05G, 0xff),
1140+
.driver_info = RSVD(6) | ZLP },
11371141
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM12, 0xff, 0xff, 0xff),
11381142
.driver_info = RSVD(1) | RSVD(2) | RSVD(3) | RSVD(4) | NUMEP2 },
11391143
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM12, 0xff, 0, 0) },
@@ -1147,6 +1151,7 @@ static const struct usb_device_id option_ids[] = {
11471151
.driver_info = ZLP },
11481152
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC200S_CN, 0xff, 0, 0) },
11491153
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC200T, 0xff, 0, 0) },
1154+
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM500K, 0xff, 0x00, 0x00) },
11501155

11511156
{ USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6001) },
11521157
{ USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CMU_300) },
@@ -1279,6 +1284,7 @@ static const struct usb_device_id option_ids[] = {
12791284
.driver_info = NCTRL(0) | RSVD(1) | RSVD(2) },
12801285
{ USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1231, 0xff), /* Telit LE910Cx (RNDIS) */
12811286
.driver_info = NCTRL(2) | RSVD(3) },
1287+
{ USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x1250, 0xff, 0x00, 0x00) }, /* Telit LE910Cx (rmnet) */
12821288
{ USB_DEVICE(TELIT_VENDOR_ID, 0x1260),
12831289
.driver_info = NCTRL(0) | RSVD(1) | RSVD(2) },
12841290
{ USB_DEVICE(TELIT_VENDOR_ID, 0x1261),

drivers/usb/serial/pl2303.c

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -436,22 +436,27 @@ static int pl2303_detect_type(struct usb_serial *serial)
436436
break;
437437
case 0x200:
438438
switch (bcdDevice) {
439-
case 0x100:
439+
case 0x100: /* GC */
440440
case 0x105:
441+
return TYPE_HXN;
442+
case 0x300: /* GT / TA */
443+
if (pl2303_supports_hx_status(serial))
444+
return TYPE_TA;
445+
fallthrough;
441446
case 0x305:
447+
case 0x400: /* GL */
442448
case 0x405:
449+
return TYPE_HXN;
450+
case 0x500: /* GE / TB */
451+
if (pl2303_supports_hx_status(serial))
452+
return TYPE_TB;
453+
fallthrough;
454+
case 0x505:
455+
case 0x600: /* GS */
443456
case 0x605:
444-
/*
445-
* Assume it's an HXN-type if the device doesn't
446-
* support the old read request value.
447-
*/
448-
if (!pl2303_supports_hx_status(serial))
449-
return TYPE_HXN;
450-
break;
451-
case 0x300:
452-
return TYPE_TA;
453-
case 0x500:
454-
return TYPE_TB;
457+
case 0x700: /* GR */
458+
case 0x705:
459+
return TYPE_HXN;
455460
}
456461
break;
457462
}

0 commit comments

Comments
 (0)