Skip to content

Commit b47b0b6

Browse files
committed
Merge tag 'usb-serial-5.14-rc5' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus
Johan writes: USB-serial fixes for 5.14-rc5 Here are two type-detection regression fixes for pl2303 and a patch to increase the receive buffer size for for ch341 to avoid lost characters at high line speeds. Included are also some new device ids. All but the last three commits have been in linux-next and with no reported issues. * tag 'usb-serial-5.14-rc5' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial: USB: serial: ftdi_sio: add device ID for Auto-M3 OP-COM v2 USB: serial: pl2303: fix GT type detection USB: serial: option: add Telit FD980 composition 0x1056 USB: serial: pl2303: fix HX type detection USB: serial: ch341: fix character loss at high transfer rates
2 parents a154c43 + 8da0e55 commit b47b0b6

File tree

5 files changed

+33
-16
lines changed

5 files changed

+33
-16
lines changed

drivers/usb/serial/ch341.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -851,6 +851,7 @@ static struct usb_serial_driver ch341_device = {
851851
.owner = THIS_MODULE,
852852
.name = "ch341-uart",
853853
},
854+
.bulk_in_size = 512,
854855
.id_table = id_table,
855856
.num_ports = 1,
856857
.open = ch341_open,

drivers/usb/serial/ftdi_sio.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ static const struct usb_device_id id_table_combined[] = {
219219
{ USB_DEVICE(FTDI_VID, FTDI_MTXORB_6_PID) },
220220
{ USB_DEVICE(FTDI_VID, FTDI_R2000KU_TRUE_RNG) },
221221
{ USB_DEVICE(FTDI_VID, FTDI_VARDAAN_PID) },
222+
{ USB_DEVICE(FTDI_VID, FTDI_AUTO_M3_OP_COM_V2_PID) },
222223
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_0100_PID) },
223224
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_0101_PID) },
224225
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_0102_PID) },

drivers/usb/serial/ftdi_sio_ids.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,9 @@
159159
/* Vardaan Enterprises Serial Interface VEUSB422R3 */
160160
#define FTDI_VARDAAN_PID 0xF070
161161

162+
/* Auto-M3 Ltd. - OP-COM USB V2 - OBD interface Adapter */
163+
#define FTDI_AUTO_M3_OP_COM_V2_PID 0x4f50
164+
162165
/*
163166
* Xsens Technologies BV products (http://www.xsens.com).
164167
*/

drivers/usb/serial/option.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1203,6 +1203,8 @@ static const struct usb_device_id option_ids[] = {
12031203
.driver_info = NCTRL(2) | RSVD(3) },
12041204
{ USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1055, 0xff), /* Telit FN980 (PCIe) */
12051205
.driver_info = NCTRL(0) | RSVD(1) },
1206+
{ USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1056, 0xff), /* Telit FD980 */
1207+
.driver_info = NCTRL(2) | RSVD(3) },
12061208
{ USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_ME910),
12071209
.driver_info = NCTRL(0) | RSVD(1) | RSVD(3) },
12081210
{ USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_ME910_DUAL_MODEM),

drivers/usb/serial/pl2303.c

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -418,24 +418,34 @@ static int pl2303_detect_type(struct usb_serial *serial)
418418
bcdDevice = le16_to_cpu(desc->bcdDevice);
419419
bcdUSB = le16_to_cpu(desc->bcdUSB);
420420

421-
switch (bcdDevice) {
422-
case 0x100:
423-
/*
424-
* Assume it's an HXN-type if the device doesn't support the old read
425-
* request value.
426-
*/
427-
if (bcdUSB == 0x200 && !pl2303_supports_hx_status(serial))
428-
return TYPE_HXN;
421+
switch (bcdUSB) {
422+
case 0x110:
423+
switch (bcdDevice) {
424+
case 0x300:
425+
return TYPE_HX;
426+
case 0x400:
427+
return TYPE_HXD;
428+
default:
429+
return TYPE_HX;
430+
}
429431
break;
430-
case 0x300:
431-
if (bcdUSB == 0x200)
432+
case 0x200:
433+
switch (bcdDevice) {
434+
case 0x100:
435+
case 0x305:
436+
/*
437+
* Assume it's an HXN-type if the device doesn't
438+
* support the old read request value.
439+
*/
440+
if (!pl2303_supports_hx_status(serial))
441+
return TYPE_HXN;
442+
break;
443+
case 0x300:
432444
return TYPE_TA;
433-
434-
return TYPE_HX;
435-
case 0x400:
436-
return TYPE_HXD;
437-
case 0x500:
438-
return TYPE_TB;
445+
case 0x500:
446+
return TYPE_TB;
447+
}
448+
break;
439449
}
440450

441451
dev_err(&serial->interface->dev,

0 commit comments

Comments
 (0)