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-6.10-final' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb

Pull USB fixes from Greg KH:
"Here are some small USB driver fixes and new device ids for
6.10-final. Included in here are:

- new usb-serial device ids for reported devices

- syzbot-triggered duplicate endpoint bugfix

- gadget bugfix for configfs memory overwrite

- xhci resume bugfix

- new device quirk added

- usb core error path bugfix

All of these have been in linux-next (most for a while) with no
reported issues"

* tag 'usb-6.10-final' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
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
usb: gadget: configfs: Prevent OOB read/write in usb_string_copy()
usb: dwc3: pci: add support for the Intel Panther Lake
usb: core: add missing of_node_put() in usb_of_has_devices_or_graph
USB: Add USB_QUIRK_NO_SET_INTF quirk for START BP-850k
USB: core: Fix duplicate endpoint bug by clearing reserved bits in the descriptor
xhci: always resume roothubs if xHC was reset during resume
USB: serial: option: add Telit generic core-dump composition
USB: serial: option: add Fibocom FM350-GL
USB: serial: option: add Telit FN912 rmnet compositions

+130 -8
+15 -3
drivers/usb/core/config.c
··· 291 291 if (ifp->desc.bNumEndpoints >= num_ep) 292 292 goto skip_to_next_endpoint_or_interface_descriptor; 293 293 294 + /* Save a copy of the descriptor and use it instead of the original */ 295 + endpoint = &ifp->endpoint[ifp->desc.bNumEndpoints]; 296 + memcpy(&endpoint->desc, d, n); 297 + d = &endpoint->desc; 298 + 299 + /* Clear the reserved bits in bEndpointAddress */ 300 + i = d->bEndpointAddress & 301 + (USB_ENDPOINT_DIR_MASK | USB_ENDPOINT_NUMBER_MASK); 302 + if (i != d->bEndpointAddress) { 303 + dev_notice(ddev, "config %d interface %d altsetting %d has an endpoint descriptor with address 0x%X, changing to 0x%X\n", 304 + cfgno, inum, asnum, d->bEndpointAddress, i); 305 + endpoint->desc.bEndpointAddress = i; 306 + } 307 + 294 308 /* Check for duplicate endpoint addresses */ 295 309 if (config_endpoint_is_duplicate(config, inum, asnum, d)) { 296 310 dev_notice(ddev, "config %d interface %d altsetting %d has a duplicate endpoint with address 0x%X, skipping\n", ··· 322 308 } 323 309 } 324 310 325 - endpoint = &ifp->endpoint[ifp->desc.bNumEndpoints]; 311 + /* Accept this endpoint */ 326 312 ++ifp->desc.bNumEndpoints; 327 - 328 - memcpy(&endpoint->desc, d, n); 329 313 INIT_LIST_HEAD(&endpoint->urb_list); 330 314 331 315 /*
+5 -2
drivers/usb/core/of.c
··· 84 84 if (of_graph_is_present(np)) 85 85 return true; 86 86 87 - for_each_child_of_node(np, child) 88 - if (of_property_present(child, "reg")) 87 + for_each_child_of_node(np, child) { 88 + if (of_property_present(child, "reg")) { 89 + of_node_put(child); 89 90 return true; 91 + } 92 + } 90 93 91 94 return false; 92 95 }
+3
drivers/usb/core/quirks.c
··· 506 506 { USB_DEVICE(0x1b1c, 0x1b38), .driver_info = USB_QUIRK_DELAY_INIT | 507 507 USB_QUIRK_DELAY_CTRL_MSG }, 508 508 509 + /* START BP-850k Printer */ 510 + { USB_DEVICE(0x1bc3, 0x0003), .driver_info = USB_QUIRK_NO_SET_INTF }, 511 + 509 512 /* MIDI keyboard WORLDE MINI */ 510 513 { USB_DEVICE(0x1c75, 0x0204), .driver_info = 511 514 USB_QUIRK_CONFIG_INTF_STRINGS },
+8
drivers/usb/dwc3/dwc3-pci.c
··· 54 54 #define PCI_DEVICE_ID_INTEL_MTL 0x7e7e 55 55 #define PCI_DEVICE_ID_INTEL_ARLH_PCH 0x777e 56 56 #define PCI_DEVICE_ID_INTEL_TGL 0x9a15 57 + #define PCI_DEVICE_ID_INTEL_PTLH 0xe332 58 + #define PCI_DEVICE_ID_INTEL_PTLH_PCH 0xe37e 59 + #define PCI_DEVICE_ID_INTEL_PTLU 0xe432 60 + #define PCI_DEVICE_ID_INTEL_PTLU_PCH 0xe47e 57 61 #define PCI_DEVICE_ID_AMD_MR 0x163a 58 62 59 63 #define PCI_INTEL_BXT_DSM_GUID "732b85d5-b7a7-4a1b-9ba0-4bbd00ffd511" ··· 434 430 { PCI_DEVICE_DATA(INTEL, MTLS, &dwc3_pci_intel_swnode) }, 435 431 { PCI_DEVICE_DATA(INTEL, ARLH_PCH, &dwc3_pci_intel_swnode) }, 436 432 { PCI_DEVICE_DATA(INTEL, TGL, &dwc3_pci_intel_swnode) }, 433 + { PCI_DEVICE_DATA(INTEL, PTLH, &dwc3_pci_intel_swnode) }, 434 + { PCI_DEVICE_DATA(INTEL, PTLH_PCH, &dwc3_pci_intel_swnode) }, 435 + { PCI_DEVICE_DATA(INTEL, PTLU, &dwc3_pci_intel_swnode) }, 436 + { PCI_DEVICE_DATA(INTEL, PTLU_PCH, &dwc3_pci_intel_swnode) }, 437 437 438 438 { PCI_DEVICE_DATA(AMD, NL_USB, &dwc3_pci_amd_swnode) }, 439 439 { PCI_DEVICE_DATA(AMD, MR, &dwc3_pci_amd_mr_swnode) },
+3
drivers/usb/gadget/configfs.c
··· 115 115 int ret; 116 116 char *str; 117 117 char *copy = *s_copy; 118 + 118 119 ret = strlen(s); 119 120 if (ret > USB_MAX_STRING_LEN) 120 121 return -EOVERFLOW; 122 + if (ret < 1) 123 + return -EINVAL; 121 124 122 125 if (copy) { 123 126 str = copy;
+13 -3
drivers/usb/host/xhci.c
··· 1125 1125 xhci_dbg(xhci, "Start the secondary HCD\n"); 1126 1126 retval = xhci_run(xhci->shared_hcd); 1127 1127 } 1128 - 1128 + if (retval) 1129 + return retval; 1130 + /* 1131 + * Resume roothubs unconditionally as PORTSC change bits are not 1132 + * immediately visible after xHC reset 1133 + */ 1129 1134 hcd->state = HC_STATE_SUSPENDED; 1130 - if (xhci->shared_hcd) 1135 + 1136 + if (xhci->shared_hcd) { 1131 1137 xhci->shared_hcd->state = HC_STATE_SUSPENDED; 1138 + usb_hcd_resume_root_hub(xhci->shared_hcd); 1139 + } 1140 + usb_hcd_resume_root_hub(hcd); 1141 + 1132 1142 goto done; 1133 1143 } 1134 1144 ··· 1162 1152 1163 1153 xhci_dbc_resume(xhci); 1164 1154 1165 - done: 1166 1155 if (retval == 0) { 1167 1156 /* 1168 1157 * Resume roothubs only if there are pending events. ··· 1187 1178 usb_hcd_resume_root_hub(hcd); 1188 1179 } 1189 1180 } 1181 + done: 1190 1182 /* 1191 1183 * If system is subject to the Quirk, Compliance Mode Timer needs to 1192 1184 * be re-initialized Always after a system resume. Ports are subject
+45
drivers/usb/serial/mos7840.c
··· 1737 1737 kfree(mos7840_port); 1738 1738 } 1739 1739 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 + 1740 1783 static struct usb_serial_driver moschip7840_4port_device = { 1741 1784 .driver = { 1742 1785 .owner = THIS_MODULE, ··· 1807 1764 .port_probe = mos7840_port_probe, 1808 1765 .port_remove = mos7840_port_remove, 1809 1766 .read_bulk_callback = mos7840_bulk_in_callback, 1767 + .suspend = mos7840_suspend, 1768 + .resume = mos7840_resume, 1810 1769 }; 1811 1770 1812 1771 static struct usb_serial_driver * const serial_drivers[] = {
+38
drivers/usb/serial/option.c
··· 1425 1425 .driver_info = NCTRL(0) | RSVD(1) }, 1426 1426 { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1901, 0xff), /* Telit LN940 (MBIM) */ 1427 1427 .driver_info = NCTRL(0) }, 1428 + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x3000, 0xff), /* Telit FN912 */ 1429 + .driver_info = RSVD(0) | NCTRL(3) }, 1430 + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x3001, 0xff), /* Telit FN912 */ 1431 + .driver_info = RSVD(0) | NCTRL(2) | RSVD(3) | RSVD(4) }, 1428 1432 { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x7010, 0xff), /* Telit LE910-S1 (RNDIS) */ 1429 1433 .driver_info = NCTRL(2) }, 1430 1434 { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x7011, 0xff), /* Telit LE910-S1 (ECM) */ ··· 1437 1433 .driver_info = NCTRL(2) }, 1438 1434 { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x701b, 0xff), /* Telit LE910R1 (ECM) */ 1439 1435 .driver_info = NCTRL(2) }, 1436 + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x9000, 0xff), /* Telit generic core-dump device */ 1437 + .driver_info = NCTRL(0) }, 1440 1438 { USB_DEVICE(TELIT_VENDOR_ID, 0x9010), /* Telit SBL FN980 flashing device */ 1441 1439 .driver_info = NCTRL(0) | ZLP }, 1442 1440 { USB_DEVICE(TELIT_VENDOR_ID, 0x9200), /* Telit LE910S1 flashing device */ ··· 2230 2224 { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_7106_2COM, 0x02, 0x02, 0x01) }, 2231 2225 { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_DC_4COM2, 0xff, 0x02, 0x01) }, 2232 2226 { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_DC_4COM2, 0xff, 0x00, 0x00) }, 2227 + { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, 0x7126, 0xff, 0x00, 0x00), 2228 + .driver_info = NCTRL(2) }, 2229 + { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, 0x7127, 0xff, 0x00, 0x00), 2230 + .driver_info = NCTRL(2) | NCTRL(3) | NCTRL(4) }, 2233 2231 { USB_DEVICE(CELLIENT_VENDOR_ID, CELLIENT_PRODUCT_MEN200) }, 2234 2232 { USB_DEVICE(CELLIENT_VENDOR_ID, CELLIENT_PRODUCT_MPL200), 2235 2233 .driver_info = RSVD(1) | RSVD(4) }, ··· 2294 2284 .driver_info = RSVD(3) }, 2295 2285 { USB_DEVICE_INTERFACE_CLASS(0x0489, 0xe0f0, 0xff), /* Foxconn T99W373 MBIM */ 2296 2286 .driver_info = RSVD(3) }, 2287 + { USB_DEVICE_INTERFACE_CLASS(0x0489, 0xe145, 0xff), /* Foxconn T99W651 RNDIS */ 2288 + .driver_info = RSVD(5) | RSVD(6) }, 2297 2289 { USB_DEVICE(0x1508, 0x1001), /* Fibocom NL668 (IOT version) */ 2298 2290 .driver_info = RSVD(4) | RSVD(5) | RSVD(6) }, 2299 2291 { USB_DEVICE(0x1782, 0x4d10) }, /* Fibocom L610 (AT mode) */ ··· 2333 2321 .driver_info = RSVD(4) }, 2334 2322 { USB_DEVICE_INTERFACE_CLASS(0x33f8, 0x0115, 0xff), /* Rolling RW135-GL (laptop MBIM) */ 2335 2323 .driver_info = RSVD(5) }, 2324 + { USB_DEVICE_INTERFACE_CLASS(0x33f8, 0x0802, 0xff), /* Rolling RW350-GL (laptop MBIM) */ 2325 + .driver_info = RSVD(5) }, 2326 + { USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0100, 0xff, 0xff, 0x30) }, /* NetPrisma LCUK54-WWD for Global */ 2327 + { USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0100, 0xff, 0x00, 0x40) }, 2328 + { USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0100, 0xff, 0xff, 0x40) }, 2329 + { USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0101, 0xff, 0xff, 0x30) }, /* NetPrisma LCUK54-WRD for Global SKU */ 2330 + { USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0101, 0xff, 0x00, 0x40) }, 2331 + { USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0101, 0xff, 0xff, 0x40) }, 2332 + { USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0106, 0xff, 0xff, 0x30) }, /* NetPrisma LCUK54-WRD for China SKU */ 2333 + { USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0106, 0xff, 0x00, 0x40) }, 2334 + { USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0106, 0xff, 0xff, 0x40) }, 2335 + { USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0111, 0xff, 0xff, 0x30) }, /* NetPrisma LCUK54-WWD for SA */ 2336 + { USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0111, 0xff, 0x00, 0x40) }, 2337 + { USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0111, 0xff, 0xff, 0x40) }, 2338 + { USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0112, 0xff, 0xff, 0x30) }, /* NetPrisma LCUK54-WWD for EU */ 2339 + { USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0112, 0xff, 0x00, 0x40) }, 2340 + { USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0112, 0xff, 0xff, 0x40) }, 2341 + { USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0113, 0xff, 0xff, 0x30) }, /* NetPrisma LCUK54-WWD for NA */ 2342 + { USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0113, 0xff, 0x00, 0x40) }, 2343 + { USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0113, 0xff, 0xff, 0x40) }, 2344 + { USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0115, 0xff, 0xff, 0x30) }, /* NetPrisma LCUK54-WWD for China EDU */ 2345 + { USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0115, 0xff, 0x00, 0x40) }, 2346 + { USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0115, 0xff, 0xff, 0x40) }, 2347 + { USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0116, 0xff, 0xff, 0x30) }, /* NetPrisma LCUK54-WWD for Golbal EDU */ 2348 + { USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0116, 0xff, 0x00, 0x40) }, 2349 + { USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0116, 0xff, 0xff, 0x40) }, 2336 2350 { USB_DEVICE_AND_INTERFACE_INFO(OPPO_VENDOR_ID, OPPO_PRODUCT_R11, 0xff, 0xff, 0x30) }, 2337 2351 { USB_DEVICE_AND_INTERFACE_INFO(SIERRA_VENDOR_ID, SIERRA_PRODUCT_EM9191, 0xff, 0xff, 0x30) }, 2338 2352 { USB_DEVICE_AND_INTERFACE_INFO(SIERRA_VENDOR_ID, SIERRA_PRODUCT_EM9191, 0xff, 0xff, 0x40) },