Commit 70c8e394 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

Merge tag 'usb-serial-6.10-rc8' of...

Merge tag 'usb-serial-6.10-rc8' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus

Johan writes:

USB-serial fixes for 6.10-rc8

Here's a fix for a long-standing issue in the mos7840 driver that can trigger
a crash when resuming from system suspend.

Included are also some new modem device ids.

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

* tag 'usb-serial-6.10-rc8' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial:
  USB: serial: mos7840: fix crash on resume
  USB: serial: option: add Rolling RW350-GL variants
  USB: serial: option: add support for Foxconn T99W651
  USB: serial: option: add Netprisma LCUK54 series modules
parents 6d3c721e c15a688e
Loading
Loading
Loading
Loading
+45 −0
Original line number Diff line number Diff line
@@ -1737,6 +1737,49 @@ static void mos7840_port_remove(struct usb_serial_port *port)
	kfree(mos7840_port);
}

static int mos7840_suspend(struct usb_serial *serial, pm_message_t message)
{
	struct moschip_port *mos7840_port;
	struct usb_serial_port *port;
	int i;

	for (i = 0; i < serial->num_ports; ++i) {
		port = serial->port[i];
		if (!tty_port_initialized(&port->port))
			continue;

		mos7840_port = usb_get_serial_port_data(port);

		usb_kill_urb(mos7840_port->read_urb);
		mos7840_port->read_urb_busy = false;
	}

	return 0;
}

static int mos7840_resume(struct usb_serial *serial)
{
	struct moschip_port *mos7840_port;
	struct usb_serial_port *port;
	int res;
	int i;

	for (i = 0; i < serial->num_ports; ++i) {
		port = serial->port[i];
		if (!tty_port_initialized(&port->port))
			continue;

		mos7840_port = usb_get_serial_port_data(port);

		mos7840_port->read_urb_busy = true;
		res = usb_submit_urb(mos7840_port->read_urb, GFP_NOIO);
		if (res)
			mos7840_port->read_urb_busy = false;
	}

	return 0;
}

static struct usb_serial_driver moschip7840_4port_device = {
	.driver = {
		   .owner = THIS_MODULE,
@@ -1764,6 +1807,8 @@ static struct usb_serial_driver moschip7840_4port_device = {
	.port_probe = mos7840_port_probe,
	.port_remove = mos7840_port_remove,
	.read_bulk_callback = mos7840_bulk_in_callback,
	.suspend = mos7840_suspend,
	.resume = mos7840_resume,
};

static struct usb_serial_driver * const serial_drivers[] = {
+28 −0
Original line number Diff line number Diff line
@@ -2294,6 +2294,8 @@ static const struct usb_device_id option_ids[] = {
	  .driver_info = RSVD(3) },
	{ USB_DEVICE_INTERFACE_CLASS(0x0489, 0xe0f0, 0xff),			/* Foxconn T99W373 MBIM */
	  .driver_info = RSVD(3) },
	{ USB_DEVICE_INTERFACE_CLASS(0x0489, 0xe145, 0xff),			/* Foxconn T99W651 RNDIS */
	  .driver_info = RSVD(5) | RSVD(6) },
	{ USB_DEVICE(0x1508, 0x1001),						/* Fibocom NL668 (IOT version) */
	  .driver_info = RSVD(4) | RSVD(5) | RSVD(6) },
	{ USB_DEVICE(0x1782, 0x4d10) },						/* Fibocom L610 (AT mode) */
@@ -2331,6 +2333,32 @@ static const struct usb_device_id option_ids[] = {
	  .driver_info = RSVD(4) },
	{ USB_DEVICE_INTERFACE_CLASS(0x33f8, 0x0115, 0xff),			/* Rolling RW135-GL (laptop MBIM) */
	  .driver_info = RSVD(5) },
	{ USB_DEVICE_INTERFACE_CLASS(0x33f8, 0x0802, 0xff),			/* Rolling RW350-GL (laptop MBIM) */
	  .driver_info = RSVD(5) },
	{ USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0100, 0xff, 0xff, 0x30) },	/* NetPrisma LCUK54-WWD for Global */
	{ USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0100, 0xff, 0x00, 0x40) },
	{ USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0100, 0xff, 0xff, 0x40) },
	{ USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0101, 0xff, 0xff, 0x30) },	/* NetPrisma LCUK54-WRD for Global SKU */
	{ USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0101, 0xff, 0x00, 0x40) },
	{ USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0101, 0xff, 0xff, 0x40) },
	{ USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0106, 0xff, 0xff, 0x30) },	/* NetPrisma LCUK54-WRD for China SKU */
	{ USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0106, 0xff, 0x00, 0x40) },
	{ USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0106, 0xff, 0xff, 0x40) },
	{ USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0111, 0xff, 0xff, 0x30) },	/* NetPrisma LCUK54-WWD for SA */
	{ USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0111, 0xff, 0x00, 0x40) },
	{ USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0111, 0xff, 0xff, 0x40) },
	{ USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0112, 0xff, 0xff, 0x30) },	/* NetPrisma LCUK54-WWD for EU */
	{ USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0112, 0xff, 0x00, 0x40) },
	{ USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0112, 0xff, 0xff, 0x40) },
	{ USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0113, 0xff, 0xff, 0x30) },	/* NetPrisma LCUK54-WWD for NA */
	{ USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0113, 0xff, 0x00, 0x40) },
	{ USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0113, 0xff, 0xff, 0x40) },
	{ USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0115, 0xff, 0xff, 0x30) },	/* NetPrisma LCUK54-WWD for China EDU */
	{ USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0115, 0xff, 0x00, 0x40) },
	{ USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0115, 0xff, 0xff, 0x40) },
	{ USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0116, 0xff, 0xff, 0x30) },	/* NetPrisma LCUK54-WWD for Golbal EDU */
	{ USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0116, 0xff, 0x00, 0x40) },
	{ USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0116, 0xff, 0xff, 0x40) },
	{ USB_DEVICE_AND_INTERFACE_INFO(OPPO_VENDOR_ID, OPPO_PRODUCT_R11, 0xff, 0xff, 0x30) },
	{ USB_DEVICE_AND_INTERFACE_INFO(SIERRA_VENDOR_ID, SIERRA_PRODUCT_EM9191, 0xff, 0xff, 0x30) },
	{ USB_DEVICE_AND_INTERFACE_INFO(SIERRA_VENDOR_ID, SIERRA_PRODUCT_EM9191, 0xff, 0xff, 0x40) },