Commit 82710ecd authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

Merge tag 'usb-serial-6.2-rc1' of...

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
parents 4b6be020 63b8ed26
Loading
Loading
Loading
Loading
+17 −4
Original line number Diff line number Diff line
@@ -195,6 +195,8 @@ static const struct usb_device_id id_table[] = {
	{ USB_DEVICE(0x16DC, 0x0015) }, /* W-IE-NE-R Plein & Baus GmbH CML Control, Monitoring and Data Logger */
	{ USB_DEVICE(0x17A8, 0x0001) }, /* Kamstrup Optical Eye/3-wire */
	{ USB_DEVICE(0x17A8, 0x0005) }, /* Kamstrup M-Bus Master MultiPort 250D */
	{ USB_DEVICE(0x17A8, 0x0011) }, /* Kamstrup 444 MHz RF sniffer */
	{ USB_DEVICE(0x17A8, 0x0013) }, /* Kamstrup 870 MHz RF sniffer */
	{ USB_DEVICE(0x17A8, 0x0101) }, /* Kamstrup 868 MHz wM-Bus C-Mode Meter Reader (Int Ant) */
	{ USB_DEVICE(0x17A8, 0x0102) }, /* Kamstrup 868 MHz wM-Bus C-Mode Meter Reader (Ext Ant) */
	{ USB_DEVICE(0x17F4, 0xAAAA) }, /* Wavesense Jazz blood glucose meter */
@@ -1047,11 +1049,12 @@ static void cp210x_change_speed(struct tty_struct *tty,
	struct cp210x_serial_private *priv = usb_get_serial_data(serial);
	u32 baud;

	if (tty->termios.c_ospeed == 0)
		return;

	/*
	 * This maps the requested rate to the actual rate, a valid rate on
	 * cp2102 or cp2103, or to an arbitrary rate in [1M, max_speed].
	 *
	 * NOTE: B0 is not implemented.
	 */
	baud = clamp(tty->termios.c_ospeed, priv->min_speed, priv->max_speed);

@@ -1144,7 +1147,8 @@ static void cp210x_set_flow_control(struct tty_struct *tty,
		tty->termios.c_iflag &= ~(IXON | IXOFF);
	}

	if (old_termios &&
	if (tty->termios.c_ospeed != 0 &&
			old_termios && old_termios->c_ospeed != 0 &&
			C_CRTSCTS(tty) == (old_termios->c_cflag & CRTSCTS) &&
			I_IXON(tty) == (old_termios->c_iflag & IXON) &&
			I_IXOFF(tty) == (old_termios->c_iflag & IXOFF) &&
@@ -1169,6 +1173,14 @@ static void cp210x_set_flow_control(struct tty_struct *tty,

	mutex_lock(&port_priv->mutex);

	if (tty->termios.c_ospeed == 0) {
		port_priv->dtr = false;
		port_priv->rts = false;
	} else if (old_termios && old_termios->c_ospeed == 0) {
		port_priv->dtr = true;
		port_priv->rts = true;
	}

	ret = cp210x_read_reg_block(port, CP210X_GET_FLOW, &flow_ctl,
			sizeof(flow_ctl));
	if (ret)
@@ -1241,7 +1253,8 @@ static void cp210x_set_termios(struct tty_struct *tty,
	u16 bits;
	int ret;

	if (old_termios && !cp210x_termios_change(&tty->termios, old_termios))
	if (old_termios && !cp210x_termios_change(&tty->termios, old_termios) &&
			tty->termios.c_ospeed != 0)
		return;

	if (!old_termios || tty->termios.c_ospeed != old_termios->c_ospeed)
+3 −0
Original line number Diff line number Diff line
@@ -255,6 +255,7 @@ static void option_instat_callback(struct urb *urb);
#define QUECTEL_PRODUCT_EP06			0x0306
#define QUECTEL_PRODUCT_EM05G			0x030a
#define QUECTEL_PRODUCT_EM060K			0x030b
#define QUECTEL_PRODUCT_EM05G_SG		0x0311
#define QUECTEL_PRODUCT_EM12			0x0512
#define QUECTEL_PRODUCT_RM500Q			0x0800
#define QUECTEL_PRODUCT_RM520N			0x0801
@@ -1160,6 +1161,8 @@ static const struct usb_device_id option_ids[] = {
	{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EP06, 0xff, 0, 0) },
	{ USB_DEVICE_INTERFACE_CLASS(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM05G, 0xff),
	  .driver_info = RSVD(6) | ZLP },
	{ USB_DEVICE_INTERFACE_CLASS(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM05G_SG, 0xff),
	  .driver_info = RSVD(6) | ZLP },
	{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM060K, 0xff, 0x00, 0x40) },
	{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM060K, 0xff, 0xff, 0x30) },
	{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM060K, 0xff, 0xff, 0x40) },
+0 −2
Original line number Diff line number Diff line
@@ -749,8 +749,6 @@ static void xr_cdc_set_line_coding(struct tty_struct *tty,

	if (tty->termios.c_ospeed)
		lc->dwDTERate = cpu_to_le32(tty->termios.c_ospeed);
	else if (old_termios)
		lc->dwDTERate = cpu_to_le32(old_termios->c_ospeed);
	else
		lc->dwDTERate = cpu_to_le32(9600);