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

Merge tag 'usb-serial-6.2-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-next

Johan writes:

USB-serial updates for 6.2-rc1

Here are the USB-serial updates for 6.2-rc1, including:

- B0 hangup support for cp210x
- avoid requesting a zero DTE rate which could potentially confuse
buggy firmware in XR devices

Included are also some new device ids.

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

* tag 'usb-serial-6.2-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial:
USB: serial: xr: avoid requesting zero DTE rate
USB: serial: cp210x: add support for B0 hangup
USB: serial: cp210x: add Kamstrup RF sniffer PIDs
USB: serial: option: add Quectel EM05-G modem

+20 -6
+17 -4
drivers/usb/serial/cp210x.c
··· 195 195 { USB_DEVICE(0x16DC, 0x0015) }, /* W-IE-NE-R Plein & Baus GmbH CML Control, Monitoring and Data Logger */ 196 196 { USB_DEVICE(0x17A8, 0x0001) }, /* Kamstrup Optical Eye/3-wire */ 197 197 { USB_DEVICE(0x17A8, 0x0005) }, /* Kamstrup M-Bus Master MultiPort 250D */ 198 + { USB_DEVICE(0x17A8, 0x0011) }, /* Kamstrup 444 MHz RF sniffer */ 199 + { USB_DEVICE(0x17A8, 0x0013) }, /* Kamstrup 870 MHz RF sniffer */ 198 200 { USB_DEVICE(0x17A8, 0x0101) }, /* Kamstrup 868 MHz wM-Bus C-Mode Meter Reader (Int Ant) */ 199 201 { USB_DEVICE(0x17A8, 0x0102) }, /* Kamstrup 868 MHz wM-Bus C-Mode Meter Reader (Ext Ant) */ 200 202 { USB_DEVICE(0x17F4, 0xAAAA) }, /* Wavesense Jazz blood glucose meter */ ··· 1049 1047 struct cp210x_serial_private *priv = usb_get_serial_data(serial); 1050 1048 u32 baud; 1051 1049 1050 + if (tty->termios.c_ospeed == 0) 1051 + return; 1052 + 1052 1053 /* 1053 1054 * This maps the requested rate to the actual rate, a valid rate on 1054 1055 * cp2102 or cp2103, or to an arbitrary rate in [1M, max_speed]. 1055 - * 1056 - * NOTE: B0 is not implemented. 1057 1056 */ 1058 1057 baud = clamp(tty->termios.c_ospeed, priv->min_speed, priv->max_speed); 1059 1058 ··· 1147 1144 tty->termios.c_iflag &= ~(IXON | IXOFF); 1148 1145 } 1149 1146 1150 - if (old_termios && 1147 + if (tty->termios.c_ospeed != 0 && 1148 + old_termios && old_termios->c_ospeed != 0 && 1151 1149 C_CRTSCTS(tty) == (old_termios->c_cflag & CRTSCTS) && 1152 1150 I_IXON(tty) == (old_termios->c_iflag & IXON) && 1153 1151 I_IXOFF(tty) == (old_termios->c_iflag & IXOFF) && ··· 1172 1168 } 1173 1169 1174 1170 mutex_lock(&port_priv->mutex); 1171 + 1172 + if (tty->termios.c_ospeed == 0) { 1173 + port_priv->dtr = false; 1174 + port_priv->rts = false; 1175 + } else if (old_termios && old_termios->c_ospeed == 0) { 1176 + port_priv->dtr = true; 1177 + port_priv->rts = true; 1178 + } 1175 1179 1176 1180 ret = cp210x_read_reg_block(port, CP210X_GET_FLOW, &flow_ctl, 1177 1181 sizeof(flow_ctl)); ··· 1253 1241 u16 bits; 1254 1242 int ret; 1255 1243 1256 - if (old_termios && !cp210x_termios_change(&tty->termios, old_termios)) 1244 + if (old_termios && !cp210x_termios_change(&tty->termios, old_termios) && 1245 + tty->termios.c_ospeed != 0) 1257 1246 return; 1258 1247 1259 1248 if (!old_termios || tty->termios.c_ospeed != old_termios->c_ospeed)
+3
drivers/usb/serial/option.c
··· 255 255 #define QUECTEL_PRODUCT_EP06 0x0306 256 256 #define QUECTEL_PRODUCT_EM05G 0x030a 257 257 #define QUECTEL_PRODUCT_EM060K 0x030b 258 + #define QUECTEL_PRODUCT_EM05G_SG 0x0311 258 259 #define QUECTEL_PRODUCT_EM12 0x0512 259 260 #define QUECTEL_PRODUCT_RM500Q 0x0800 260 261 #define QUECTEL_PRODUCT_RM520N 0x0801 ··· 1160 1159 .driver_info = RSVD(1) | RSVD(2) | RSVD(3) | RSVD(4) | NUMEP2 }, 1161 1160 { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EP06, 0xff, 0, 0) }, 1162 1161 { USB_DEVICE_INTERFACE_CLASS(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM05G, 0xff), 1162 + .driver_info = RSVD(6) | ZLP }, 1163 + { USB_DEVICE_INTERFACE_CLASS(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM05G_SG, 0xff), 1163 1164 .driver_info = RSVD(6) | ZLP }, 1164 1165 { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM060K, 0xff, 0x00, 0x40) }, 1165 1166 { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM060K, 0xff, 0xff, 0x30) },
-2
drivers/usb/serial/xr_serial.c
··· 749 749 750 750 if (tty->termios.c_ospeed) 751 751 lc->dwDTERate = cpu_to_le32(tty->termios.c_ospeed); 752 - else if (old_termios) 753 - lc->dwDTERate = cpu_to_le32(old_termios->c_ospeed); 754 752 else 755 753 lc->dwDTERate = cpu_to_le32(9600); 756 754