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

Configure Feed

Select the types of activity you want to include in your feed.

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

Johan writes:

USB-serial fixes for 5.15-rc3

Here's a fix for a regression affecting some CP2102 devices and a host
of new device ids.

Included are also a couple of cleanups of duplicate device ids, which
are also tagged for stable to keep the tables in sync, and a trivial
patch to help debugging cp210x issues.

All have been in linux-next with no reported issues. Note however that
the last last two device-id commits were rebased to fix up a lore link
in a commit message (as the patch itself never made it to the list).

* tag 'usb-serial-5.15-rc3' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial:
USB: serial: option: add device id for Foxconn T99W265
USB: serial: cp210x: add ID for GW Instek GDM-834x Digital Multimeter
USB: serial: cp210x: add part-number debug printk
USB: serial: cp210x: fix dropped characters with CP2102
USB: serial: option: remove duplicate USB device ID
USB: serial: mos7840: remove duplicated 0xac24 device ID
USB: serial: option: add Telit LN920 compositions

+48 -3
+38
drivers/usb/serial/cp210x.c
··· 233 233 { USB_DEVICE(0x1FB9, 0x0602) }, /* Lake Shore Model 648 Magnet Power Supply */ 234 234 { USB_DEVICE(0x1FB9, 0x0700) }, /* Lake Shore Model 737 VSM Controller */ 235 235 { USB_DEVICE(0x1FB9, 0x0701) }, /* Lake Shore Model 776 Hall Matrix */ 236 + { USB_DEVICE(0x2184, 0x0030) }, /* GW Instek GDM-834x Digital Multimeter */ 236 237 { USB_DEVICE(0x2626, 0xEA60) }, /* Aruba Networks 7xxx USB Serial Console */ 237 238 { USB_DEVICE(0x3195, 0xF190) }, /* Link Instruments MSO-19 */ 238 239 { USB_DEVICE(0x3195, 0xF280) }, /* Link Instruments MSO-28 */ ··· 259 258 speed_t max_speed; 260 259 bool use_actual_rate; 261 260 bool no_flow_control; 261 + bool no_event_mode; 262 262 }; 263 263 264 264 enum cp210x_event_state { ··· 1115 1113 1116 1114 static void cp210x_enable_event_mode(struct usb_serial_port *port) 1117 1115 { 1116 + struct cp210x_serial_private *priv = usb_get_serial_data(port->serial); 1118 1117 struct cp210x_port_private *port_priv = usb_get_serial_port_data(port); 1119 1118 int ret; 1120 1119 1121 1120 if (port_priv->event_mode) 1121 + return; 1122 + 1123 + if (priv->no_event_mode) 1122 1124 return; 1123 1125 1124 1126 port_priv->event_state = ES_DATA; ··· 2080 2074 priv->use_actual_rate = use_actual_rate; 2081 2075 } 2082 2076 2077 + static void cp2102_determine_quirks(struct usb_serial *serial) 2078 + { 2079 + struct cp210x_serial_private *priv = usb_get_serial_data(serial); 2080 + u8 *buf; 2081 + int ret; 2082 + 2083 + buf = kmalloc(2, GFP_KERNEL); 2084 + if (!buf) 2085 + return; 2086 + /* 2087 + * Some (possibly counterfeit) CP2102 do not support event-insertion 2088 + * mode and respond differently to malformed vendor requests. 2089 + * Specifically, they return one instead of two bytes when sent a 2090 + * two-byte part-number request. 2091 + */ 2092 + ret = usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0), 2093 + CP210X_VENDOR_SPECIFIC, REQTYPE_DEVICE_TO_HOST, 2094 + CP210X_GET_PARTNUM, 0, buf, 2, USB_CTRL_GET_TIMEOUT); 2095 + if (ret == 1) { 2096 + dev_dbg(&serial->interface->dev, 2097 + "device does not support event-insertion mode\n"); 2098 + priv->no_event_mode = true; 2099 + } 2100 + 2101 + kfree(buf); 2102 + } 2103 + 2083 2104 static int cp210x_get_fw_version(struct usb_serial *serial, u16 value) 2084 2105 { 2085 2106 struct cp210x_serial_private *priv = usb_get_serial_data(serial); ··· 2141 2108 return; 2142 2109 } 2143 2110 2111 + dev_dbg(&serial->interface->dev, "partnum = 0x%02x\n", priv->partnum); 2112 + 2144 2113 switch (priv->partnum) { 2114 + case CP210X_PARTNUM_CP2102: 2115 + cp2102_determine_quirks(serial); 2116 + break; 2145 2117 case CP210X_PARTNUM_CP2105: 2146 2118 case CP210X_PARTNUM_CP2108: 2147 2119 cp210x_get_fw_version(serial, CP210X_GET_FW_VER);
-2
drivers/usb/serial/mos7840.c
··· 107 107 #define BANDB_DEVICE_ID_USOPTL4_2P 0xBC02 108 108 #define BANDB_DEVICE_ID_USOPTL4_4 0xAC44 109 109 #define BANDB_DEVICE_ID_USOPTL4_4P 0xBC03 110 - #define BANDB_DEVICE_ID_USOPTL2_4 0xAC24 111 110 112 111 /* Interrupt Routine Defines */ 113 112 ··· 185 186 { USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USOPTL4_2P) }, 186 187 { USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USOPTL4_4) }, 187 188 { USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USOPTL4_4P) }, 188 - { USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USOPTL2_4) }, 189 189 {} /* terminating entry */ 190 190 }; 191 191 MODULE_DEVICE_TABLE(usb, id_table);
+10 -1
drivers/usb/serial/option.c
··· 1205 1205 .driver_info = NCTRL(0) | RSVD(1) }, 1206 1206 { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1056, 0xff), /* Telit FD980 */ 1207 1207 .driver_info = NCTRL(2) | RSVD(3) }, 1208 + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1060, 0xff), /* Telit LN920 (rmnet) */ 1209 + .driver_info = NCTRL(0) | RSVD(1) | RSVD(2) }, 1210 + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1061, 0xff), /* Telit LN920 (MBIM) */ 1211 + .driver_info = NCTRL(0) | RSVD(1) }, 1212 + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1062, 0xff), /* Telit LN920 (RNDIS) */ 1213 + .driver_info = NCTRL(2) | RSVD(3) }, 1214 + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1063, 0xff), /* Telit LN920 (ECM) */ 1215 + .driver_info = NCTRL(0) | RSVD(1) }, 1208 1216 { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_ME910), 1209 1217 .driver_info = NCTRL(0) | RSVD(1) | RSVD(3) }, 1210 1218 { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_ME910_DUAL_MODEM), ··· 1658 1650 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0060, 0xff, 0xff, 0xff) }, 1659 1651 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0070, 0xff, 0xff, 0xff) }, 1660 1652 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0073, 0xff, 0xff, 0xff) }, 1661 - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0094, 0xff, 0xff, 0xff) }, 1662 1653 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0130, 0xff, 0xff, 0xff), 1663 1654 .driver_info = RSVD(1) }, 1664 1655 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0133, 0xff, 0xff, 0xff), ··· 2075 2068 .driver_info = RSVD(0) | RSVD(1) | RSVD(6) }, 2076 2069 { USB_DEVICE(0x0489, 0xe0b5), /* Foxconn T77W968 ESIM */ 2077 2070 .driver_info = RSVD(0) | RSVD(1) | RSVD(6) }, 2071 + { USB_DEVICE_INTERFACE_CLASS(0x0489, 0xe0db, 0xff), /* Foxconn T99W265 MBIM */ 2072 + .driver_info = RSVD(3) }, 2078 2073 { USB_DEVICE(0x1508, 0x1001), /* Fibocom NL668 (IOT version) */ 2079 2074 .driver_info = RSVD(4) | RSVD(5) | RSVD(6) }, 2080 2075 { USB_DEVICE(0x2cb7, 0x0104), /* Fibocom NL678 series */