Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'usb-serial-6.0-rc4' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus

Johan writes:
"USB-serial fixes for 6.0-rc4

Here are a couple of fixes for two long-standing issues with some older
ch341 devices and a number of new device ids.

All have been in linux-next with no reported issues."

* tag 'usb-serial-6.0-rc4' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial:
USB: serial: ch341: fix disabled rx timer on older devices
USB: serial: ch341: fix lost character on LCR updates
USB: serial: cp210x: add Decagon UCA device id
USB: serial: option: add support for Cinterion MV32-WA/WB RmNet mode
USB: serial: ftdi_sio: add Omron CS1W-CIF31 device id
USB: serial: option: add Quectel EM060K modem
USB: serial: option: add support for OPPO R11 diag port

+38 -2
+14 -2
drivers/usb/serial/ch341.c
··· 97 97 u8 mcr; 98 98 u8 msr; 99 99 u8 lcr; 100 + 100 101 unsigned long quirks; 102 + u8 version; 103 + 101 104 unsigned long break_end; 102 105 }; 103 106 ··· 253 250 /* 254 251 * CH341A buffers data until a full endpoint-size packet (32 bytes) 255 252 * has been received unless bit 7 is set. 253 + * 254 + * At least one device with version 0x27 appears to have this bit 255 + * inverted. 256 256 */ 257 - val |= BIT(7); 257 + if (priv->version > 0x27) 258 + val |= BIT(7); 258 259 259 260 r = ch341_control_out(dev, CH341_REQ_WRITE_REG, 260 261 CH341_REG_DIVISOR << 8 | CH341_REG_PRESCALER, ··· 272 265 * (stop bits, parity and word length). Version 0x30 and above use 273 266 * CH341_REG_LCR only and CH341_REG_LCR2 is always set to zero. 274 267 */ 268 + if (priv->version < 0x30) 269 + return 0; 270 + 275 271 r = ch341_control_out(dev, CH341_REQ_WRITE_REG, 276 272 CH341_REG_LCR2 << 8 | CH341_REG_LCR, lcr); 277 273 if (r) ··· 318 308 r = ch341_control_in(dev, CH341_REQ_READ_VERSION, 0, 0, buffer, size); 319 309 if (r) 320 310 return r; 321 - dev_dbg(&dev->dev, "Chip version: 0x%02x\n", buffer[0]); 311 + 312 + priv->version = buffer[0]; 313 + dev_dbg(&dev->dev, "Chip version: 0x%02x\n", priv->version); 322 314 323 315 r = ch341_control_out(dev, CH341_REQ_SERIAL_INIT, 0, 0); 324 316 if (r < 0)
+1
drivers/usb/serial/cp210x.c
··· 130 130 { USB_DEVICE(0x10C4, 0x83AA) }, /* Mark-10 Digital Force Gauge */ 131 131 { USB_DEVICE(0x10C4, 0x83D8) }, /* DekTec DTA Plus VHF/UHF Booster/Attenuator */ 132 132 { USB_DEVICE(0x10C4, 0x8411) }, /* Kyocera GPS Module */ 133 + { USB_DEVICE(0x10C4, 0x8414) }, /* Decagon USB Cable Adapter */ 133 134 { USB_DEVICE(0x10C4, 0x8418) }, /* IRZ Automation Teleport SG-10 GSM/GPRS Modem */ 134 135 { USB_DEVICE(0x10C4, 0x846E) }, /* BEI USB Sensor Interface (VCP) */ 135 136 { USB_DEVICE(0x10C4, 0x8470) }, /* Juniper Networks BX Series System Console */
+2
drivers/usb/serial/ftdi_sio.c
··· 1045 1045 /* IDS GmbH devices */ 1046 1046 { USB_DEVICE(IDS_VID, IDS_SI31A_PID) }, 1047 1047 { USB_DEVICE(IDS_VID, IDS_CM31A_PID) }, 1048 + /* Omron devices */ 1049 + { USB_DEVICE(OMRON_VID, OMRON_CS1W_CIF31_PID) }, 1048 1050 /* U-Blox devices */ 1049 1051 { USB_DEVICE(UBLOX_VID, UBLOX_C099F9P_ZED_PID) }, 1050 1052 { USB_DEVICE(UBLOX_VID, UBLOX_C099F9P_ODIN_PID) },
+6
drivers/usb/serial/ftdi_sio_ids.h
··· 662 662 #define INFINEON_TRIBOARD_TC2X7_PID 0x0043 /* DAS JTAG TriBoard TC2X7 V1.0 */ 663 663 664 664 /* 665 + * Omron corporation (https://www.omron.com) 666 + */ 667 + #define OMRON_VID 0x0590 668 + #define OMRON_CS1W_CIF31_PID 0x00b2 669 + 670 + /* 665 671 * Acton Research Corp. 666 672 */ 667 673 #define ACTON_VID 0x0647 /* Vendor ID */
+15
drivers/usb/serial/option.c
··· 253 253 #define QUECTEL_PRODUCT_BG96 0x0296 254 254 #define QUECTEL_PRODUCT_EP06 0x0306 255 255 #define QUECTEL_PRODUCT_EM05G 0x030a 256 + #define QUECTEL_PRODUCT_EM060K 0x030b 256 257 #define QUECTEL_PRODUCT_EM12 0x0512 257 258 #define QUECTEL_PRODUCT_RM500Q 0x0800 258 259 #define QUECTEL_PRODUCT_EC200S_CN 0x6002 ··· 439 438 #define CINTERION_PRODUCT_MV31_2_RMNET 0x00b9 440 439 #define CINTERION_PRODUCT_MV32_WA 0x00f1 441 440 #define CINTERION_PRODUCT_MV32_WB 0x00f2 441 + #define CINTERION_PRODUCT_MV32_WA_RMNET 0x00f3 442 + #define CINTERION_PRODUCT_MV32_WB_RMNET 0x00f4 442 443 443 444 /* Olivetti products */ 444 445 #define OLIVETTI_VENDOR_ID 0x0b3c ··· 575 572 #define WETELECOM_PRODUCT_WMD200 0x6801 576 573 #define WETELECOM_PRODUCT_6802 0x6802 577 574 #define WETELECOM_PRODUCT_WMD300 0x6803 575 + 576 + /* OPPO products */ 577 + #define OPPO_VENDOR_ID 0x22d9 578 + #define OPPO_PRODUCT_R11 0x276c 578 579 579 580 580 581 /* Device flags */ ··· 1145 1138 { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EP06, 0xff, 0, 0) }, 1146 1139 { USB_DEVICE_INTERFACE_CLASS(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM05G, 0xff), 1147 1140 .driver_info = RSVD(6) | ZLP }, 1141 + { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM060K, 0xff, 0x00, 0x40) }, 1142 + { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM060K, 0xff, 0xff, 0x30) }, 1143 + { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM060K, 0xff, 0xff, 0x40) }, 1148 1144 { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM12, 0xff, 0xff, 0xff), 1149 1145 .driver_info = RSVD(1) | RSVD(2) | RSVD(3) | RSVD(4) | NUMEP2 }, 1150 1146 { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM12, 0xff, 0, 0) }, ··· 2003 1993 .driver_info = RSVD(0)}, 2004 1994 { USB_DEVICE_INTERFACE_CLASS(CINTERION_VENDOR_ID, CINTERION_PRODUCT_MV32_WA, 0xff), 2005 1995 .driver_info = RSVD(3)}, 1996 + { USB_DEVICE_INTERFACE_CLASS(CINTERION_VENDOR_ID, CINTERION_PRODUCT_MV32_WA_RMNET, 0xff), 1997 + .driver_info = RSVD(0) }, 2006 1998 { USB_DEVICE_INTERFACE_CLASS(CINTERION_VENDOR_ID, CINTERION_PRODUCT_MV32_WB, 0xff), 2007 1999 .driver_info = RSVD(3)}, 2000 + { USB_DEVICE_INTERFACE_CLASS(CINTERION_VENDOR_ID, CINTERION_PRODUCT_MV32_WB_RMNET, 0xff), 2001 + .driver_info = RSVD(0) }, 2008 2002 { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD100), 2009 2003 .driver_info = RSVD(4) }, 2010 2004 { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD120), ··· 2169 2155 { USB_DEVICE_INTERFACE_CLASS(0x305a, 0x1404, 0xff) }, /* GosunCn GM500 RNDIS */ 2170 2156 { USB_DEVICE_INTERFACE_CLASS(0x305a, 0x1405, 0xff) }, /* GosunCn GM500 MBIM */ 2171 2157 { USB_DEVICE_INTERFACE_CLASS(0x305a, 0x1406, 0xff) }, /* GosunCn GM500 ECM/NCM */ 2158 + { USB_DEVICE_AND_INTERFACE_INFO(OPPO_VENDOR_ID, OPPO_PRODUCT_R11, 0xff, 0xff, 0x30) }, 2172 2159 { } /* Terminating entry */ 2173 2160 }; 2174 2161 MODULE_DEVICE_TABLE(usb, option_ids);