Skip to content

Commit 70c8e39

Browse files
committed
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
2 parents 6d3c721 + c15a688 commit 70c8e39

File tree

2 files changed

+73
-0
lines changed

2 files changed

+73
-0
lines changed

drivers/usb/serial/mos7840.c

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1737,6 +1737,49 @@ static void mos7840_port_remove(struct usb_serial_port *port)
17371737
kfree(mos7840_port);
17381738
}
17391739

1740+
static int mos7840_suspend(struct usb_serial *serial, pm_message_t message)
1741+
{
1742+
struct moschip_port *mos7840_port;
1743+
struct usb_serial_port *port;
1744+
int i;
1745+
1746+
for (i = 0; i < serial->num_ports; ++i) {
1747+
port = serial->port[i];
1748+
if (!tty_port_initialized(&port->port))
1749+
continue;
1750+
1751+
mos7840_port = usb_get_serial_port_data(port);
1752+
1753+
usb_kill_urb(mos7840_port->read_urb);
1754+
mos7840_port->read_urb_busy = false;
1755+
}
1756+
1757+
return 0;
1758+
}
1759+
1760+
static int mos7840_resume(struct usb_serial *serial)
1761+
{
1762+
struct moschip_port *mos7840_port;
1763+
struct usb_serial_port *port;
1764+
int res;
1765+
int i;
1766+
1767+
for (i = 0; i < serial->num_ports; ++i) {
1768+
port = serial->port[i];
1769+
if (!tty_port_initialized(&port->port))
1770+
continue;
1771+
1772+
mos7840_port = usb_get_serial_port_data(port);
1773+
1774+
mos7840_port->read_urb_busy = true;
1775+
res = usb_submit_urb(mos7840_port->read_urb, GFP_NOIO);
1776+
if (res)
1777+
mos7840_port->read_urb_busy = false;
1778+
}
1779+
1780+
return 0;
1781+
}
1782+
17401783
static struct usb_serial_driver moschip7840_4port_device = {
17411784
.driver = {
17421785
.owner = THIS_MODULE,
@@ -1764,6 +1807,8 @@ static struct usb_serial_driver moschip7840_4port_device = {
17641807
.port_probe = mos7840_port_probe,
17651808
.port_remove = mos7840_port_remove,
17661809
.read_bulk_callback = mos7840_bulk_in_callback,
1810+
.suspend = mos7840_suspend,
1811+
.resume = mos7840_resume,
17671812
};
17681813

17691814
static struct usb_serial_driver * const serial_drivers[] = {

drivers/usb/serial/option.c

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2294,6 +2294,8 @@ static const struct usb_device_id option_ids[] = {
22942294
.driver_info = RSVD(3) },
22952295
{ USB_DEVICE_INTERFACE_CLASS(0x0489, 0xe0f0, 0xff), /* Foxconn T99W373 MBIM */
22962296
.driver_info = RSVD(3) },
2297+
{ USB_DEVICE_INTERFACE_CLASS(0x0489, 0xe145, 0xff), /* Foxconn T99W651 RNDIS */
2298+
.driver_info = RSVD(5) | RSVD(6) },
22972299
{ USB_DEVICE(0x1508, 0x1001), /* Fibocom NL668 (IOT version) */
22982300
.driver_info = RSVD(4) | RSVD(5) | RSVD(6) },
22992301
{ USB_DEVICE(0x1782, 0x4d10) }, /* Fibocom L610 (AT mode) */
@@ -2331,6 +2333,32 @@ static const struct usb_device_id option_ids[] = {
23312333
.driver_info = RSVD(4) },
23322334
{ USB_DEVICE_INTERFACE_CLASS(0x33f8, 0x0115, 0xff), /* Rolling RW135-GL (laptop MBIM) */
23332335
.driver_info = RSVD(5) },
2336+
{ USB_DEVICE_INTERFACE_CLASS(0x33f8, 0x0802, 0xff), /* Rolling RW350-GL (laptop MBIM) */
2337+
.driver_info = RSVD(5) },
2338+
{ USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0100, 0xff, 0xff, 0x30) }, /* NetPrisma LCUK54-WWD for Global */
2339+
{ USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0100, 0xff, 0x00, 0x40) },
2340+
{ USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0100, 0xff, 0xff, 0x40) },
2341+
{ USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0101, 0xff, 0xff, 0x30) }, /* NetPrisma LCUK54-WRD for Global SKU */
2342+
{ USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0101, 0xff, 0x00, 0x40) },
2343+
{ USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0101, 0xff, 0xff, 0x40) },
2344+
{ USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0106, 0xff, 0xff, 0x30) }, /* NetPrisma LCUK54-WRD for China SKU */
2345+
{ USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0106, 0xff, 0x00, 0x40) },
2346+
{ USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0106, 0xff, 0xff, 0x40) },
2347+
{ USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0111, 0xff, 0xff, 0x30) }, /* NetPrisma LCUK54-WWD for SA */
2348+
{ USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0111, 0xff, 0x00, 0x40) },
2349+
{ USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0111, 0xff, 0xff, 0x40) },
2350+
{ USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0112, 0xff, 0xff, 0x30) }, /* NetPrisma LCUK54-WWD for EU */
2351+
{ USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0112, 0xff, 0x00, 0x40) },
2352+
{ USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0112, 0xff, 0xff, 0x40) },
2353+
{ USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0113, 0xff, 0xff, 0x30) }, /* NetPrisma LCUK54-WWD for NA */
2354+
{ USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0113, 0xff, 0x00, 0x40) },
2355+
{ USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0113, 0xff, 0xff, 0x40) },
2356+
{ USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0115, 0xff, 0xff, 0x30) }, /* NetPrisma LCUK54-WWD for China EDU */
2357+
{ USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0115, 0xff, 0x00, 0x40) },
2358+
{ USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0115, 0xff, 0xff, 0x40) },
2359+
{ USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0116, 0xff, 0xff, 0x30) }, /* NetPrisma LCUK54-WWD for Golbal EDU */
2360+
{ USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0116, 0xff, 0x00, 0x40) },
2361+
{ USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0116, 0xff, 0xff, 0x40) },
23342362
{ USB_DEVICE_AND_INTERFACE_INFO(OPPO_VENDOR_ID, OPPO_PRODUCT_R11, 0xff, 0xff, 0x30) },
23352363
{ USB_DEVICE_AND_INTERFACE_INFO(SIERRA_VENDOR_ID, SIERRA_PRODUCT_EM9191, 0xff, 0xff, 0x30) },
23362364
{ USB_DEVICE_AND_INTERFACE_INFO(SIERRA_VENDOR_ID, SIERRA_PRODUCT_EM9191, 0xff, 0xff, 0x40) },

0 commit comments

Comments
 (0)