Merge tag 'usb-6.7-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb

Pull USB / Thunderbolt fixes from Greg KH:
"Here are some small bugfixes and new device ids for USB and
Thunderbolt drivers for 6.7-rc7. Included in here are:

- new usb-serial device ids

- thunderbolt driver fixes

- typec driver fix

- usb-storage driver quirk added

- fotg210 driver fix

All of these have been in linux-next with no reported issues"

* tag 'usb-6.7-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
USB: serial: option: add Quectel EG912Y module support
USB: serial: ftdi_sio: update Actisense PIDs constant names
usb: fotg210-hcd: delete an incorrect bounds test
usb-storage: Add quirk for incorrect WP on Kingston DT Ultimate 3.0 G3
usb: typec: ucsi: fix gpio-based orientation detection
net: usb: ax88179_178a: avoid failed operations when device is disconnected
USB: serial: option: add Quectel RM500Q R13 firmware support
USB: serial: option: add Foxconn T99W265 with new baseline
thunderbolt: Fix minimum allocated USB 3.x and PCIe bandwidth
thunderbolt: Fix memory leak in margining_port_remove()

+49 -19
+20 -3
drivers/net/usb/ax88179_178a.c
··· 173 u8 in_pm; 174 u32 wol_supported; 175 u32 wolopts; 176 }; 177 178 struct ax88179_int_data { ··· 209 { 210 int ret; 211 int (*fn)(struct usbnet *, u8, u8, u16, u16, void *, u16); 212 213 BUG_ON(!dev); 214 ··· 221 ret = fn(dev, cmd, USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE, 222 value, index, data, size); 223 224 - if (unlikely(ret < 0)) 225 netdev_warn(dev->net, "Failed to read reg index 0x%04x: %d\n", 226 index, ret); 227 ··· 233 { 234 int ret; 235 int (*fn)(struct usbnet *, u8, u8, u16, u16, const void *, u16); 236 237 BUG_ON(!dev); 238 ··· 245 ret = fn(dev, cmd, USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, 246 value, index, data, size); 247 248 - if (unlikely(ret < 0)) 249 netdev_warn(dev->net, "Failed to write reg index 0x%04x: %d\n", 250 index, ret); 251 ··· 493 ax88179_set_pm_mode(dev, false); 494 495 return usbnet_resume(intf); 496 } 497 498 static void ··· 1923 .suspend = ax88179_suspend, 1924 .resume = ax88179_resume, 1925 .reset_resume = ax88179_resume, 1926 - .disconnect = usbnet_disconnect, 1927 .supports_autosuspend = 1, 1928 .disable_hub_initiated_lpm = 1, 1929 };
··· 173 u8 in_pm; 174 u32 wol_supported; 175 u32 wolopts; 176 + u8 disconnecting; 177 }; 178 179 struct ax88179_int_data { ··· 208 { 209 int ret; 210 int (*fn)(struct usbnet *, u8, u8, u16, u16, void *, u16); 211 + struct ax88179_data *ax179_data = dev->driver_priv; 212 213 BUG_ON(!dev); 214 ··· 219 ret = fn(dev, cmd, USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE, 220 value, index, data, size); 221 222 + if (unlikely((ret < 0) && !(ret == -ENODEV && ax179_data->disconnecting))) 223 netdev_warn(dev->net, "Failed to read reg index 0x%04x: %d\n", 224 index, ret); 225 ··· 231 { 232 int ret; 233 int (*fn)(struct usbnet *, u8, u8, u16, u16, const void *, u16); 234 + struct ax88179_data *ax179_data = dev->driver_priv; 235 236 BUG_ON(!dev); 237 ··· 242 ret = fn(dev, cmd, USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, 243 value, index, data, size); 244 245 + if (unlikely((ret < 0) && !(ret == -ENODEV && ax179_data->disconnecting))) 246 netdev_warn(dev->net, "Failed to write reg index 0x%04x: %d\n", 247 index, ret); 248 ··· 490 ax88179_set_pm_mode(dev, false); 491 492 return usbnet_resume(intf); 493 + } 494 + 495 + static void ax88179_disconnect(struct usb_interface *intf) 496 + { 497 + struct usbnet *dev = usb_get_intfdata(intf); 498 + struct ax88179_data *ax179_data; 499 + 500 + if (!dev) 501 + return; 502 + 503 + ax179_data = dev->driver_priv; 504 + ax179_data->disconnecting = 1; 505 + 506 + usbnet_disconnect(intf); 507 } 508 509 static void ··· 1906 .suspend = ax88179_suspend, 1907 .resume = ax88179_resume, 1908 .reset_resume = ax88179_resume, 1909 + .disconnect = ax88179_disconnect, 1910 .supports_autosuspend = 1, 1911 .disable_hub_initiated_lpm = 1, 1912 };
+1 -1
drivers/thunderbolt/debugfs.c
··· 959 snprintf(dir_name, sizeof(dir_name), "port%d", port->port); 960 parent = debugfs_lookup(dir_name, port->sw->debugfs_dir); 961 if (parent) 962 - debugfs_remove_recursive(debugfs_lookup("margining", parent)); 963 964 kfree(port->usb4->margining); 965 port->usb4->margining = NULL;
··· 959 snprintf(dir_name, sizeof(dir_name), "port%d", port->port); 960 parent = debugfs_lookup(dir_name, port->sw->debugfs_dir); 961 if (parent) 962 + debugfs_lookup_and_remove("margining", parent); 963 964 kfree(port->usb4->margining); 965 port->usb4->margining = NULL;
+5 -5
drivers/thunderbolt/usb4.c
··· 2311 goto err_request; 2312 2313 /* 2314 - * Always keep 1000 Mb/s to make sure xHCI has at least some 2315 * bandwidth available for isochronous traffic. 2316 */ 2317 - if (consumed_up < 1000) 2318 - consumed_up = 1000; 2319 - if (consumed_down < 1000) 2320 - consumed_down = 1000; 2321 2322 ret = usb4_usb3_port_write_allocated_bandwidth(port, consumed_up, 2323 consumed_down);
··· 2311 goto err_request; 2312 2313 /* 2314 + * Always keep 900 Mb/s to make sure xHCI has at least some 2315 * bandwidth available for isochronous traffic. 2316 */ 2317 + if (consumed_up < 900) 2318 + consumed_up = 900; 2319 + if (consumed_down < 900) 2320 + consumed_down = 900; 2321 2322 ret = usb4_usb3_port_write_allocated_bandwidth(port, consumed_up, 2323 consumed_down);
-3
drivers/usb/fotg210/fotg210-hcd.c
··· 428 temp = size; 429 size -= temp; 430 next += temp; 431 - if (temp == size) 432 - goto done; 433 } 434 435 temp = snprintf(next, size, "\n"); ··· 437 size -= temp; 438 next += temp; 439 440 - done: 441 *sizep = size; 442 *nextp = next; 443 }
··· 428 temp = size; 429 size -= temp; 430 next += temp; 431 } 432 433 temp = snprintf(next, size, "\n"); ··· 439 size -= temp; 440 next += temp; 441 442 *sizep = size; 443 *nextp = next; 444 }
+3 -3
drivers/usb/serial/ftdi_sio.c
··· 1033 { USB_DEVICE(FTDI_VID, ACTISENSE_USG_PID) }, 1034 { USB_DEVICE(FTDI_VID, ACTISENSE_NGT_PID) }, 1035 { USB_DEVICE(FTDI_VID, ACTISENSE_NGW_PID) }, 1036 - { USB_DEVICE(FTDI_VID, ACTISENSE_D9AC_PID) }, 1037 - { USB_DEVICE(FTDI_VID, ACTISENSE_D9AD_PID) }, 1038 - { USB_DEVICE(FTDI_VID, ACTISENSE_D9AE_PID) }, 1039 { USB_DEVICE(FTDI_VID, ACTISENSE_D9AF_PID) }, 1040 { USB_DEVICE(FTDI_VID, CHETCO_SEAGAUGE_PID) }, 1041 { USB_DEVICE(FTDI_VID, CHETCO_SEASWITCH_PID) },
··· 1033 { USB_DEVICE(FTDI_VID, ACTISENSE_USG_PID) }, 1034 { USB_DEVICE(FTDI_VID, ACTISENSE_NGT_PID) }, 1035 { USB_DEVICE(FTDI_VID, ACTISENSE_NGW_PID) }, 1036 + { USB_DEVICE(FTDI_VID, ACTISENSE_UID_PID) }, 1037 + { USB_DEVICE(FTDI_VID, ACTISENSE_USA_PID) }, 1038 + { USB_DEVICE(FTDI_VID, ACTISENSE_NGX_PID) }, 1039 { USB_DEVICE(FTDI_VID, ACTISENSE_D9AF_PID) }, 1040 { USB_DEVICE(FTDI_VID, CHETCO_SEAGAUGE_PID) }, 1041 { USB_DEVICE(FTDI_VID, CHETCO_SEASWITCH_PID) },
+3 -3
drivers/usb/serial/ftdi_sio_ids.h
··· 1568 #define ACTISENSE_USG_PID 0xD9A9 /* USG USB Serial Adapter */ 1569 #define ACTISENSE_NGT_PID 0xD9AA /* NGT NMEA2000 Interface */ 1570 #define ACTISENSE_NGW_PID 0xD9AB /* NGW NMEA2000 Gateway */ 1571 - #define ACTISENSE_D9AC_PID 0xD9AC /* Actisense Reserved */ 1572 - #define ACTISENSE_D9AD_PID 0xD9AD /* Actisense Reserved */ 1573 - #define ACTISENSE_D9AE_PID 0xD9AE /* Actisense Reserved */ 1574 #define ACTISENSE_D9AF_PID 0xD9AF /* Actisense Reserved */ 1575 #define CHETCO_SEAGAUGE_PID 0xA548 /* SeaGauge USB Adapter */ 1576 #define CHETCO_SEASWITCH_PID 0xA549 /* SeaSwitch USB Adapter */
··· 1568 #define ACTISENSE_USG_PID 0xD9A9 /* USG USB Serial Adapter */ 1569 #define ACTISENSE_NGT_PID 0xD9AA /* NGT NMEA2000 Interface */ 1570 #define ACTISENSE_NGW_PID 0xD9AB /* NGW NMEA2000 Gateway */ 1571 + #define ACTISENSE_UID_PID 0xD9AC /* USB Isolating Device */ 1572 + #define ACTISENSE_USA_PID 0xD9AD /* USB to Serial Adapter */ 1573 + #define ACTISENSE_NGX_PID 0xD9AE /* NGX NMEA2000 Gateway */ 1574 #define ACTISENSE_D9AF_PID 0xD9AF /* Actisense Reserved */ 1575 #define CHETCO_SEAGAUGE_PID 0xA548 /* SeaGauge USB Adapter */ 1576 #define CHETCO_SEASWITCH_PID 0xA549 /* SeaSwitch USB Adapter */
+5
drivers/usb/serial/option.c
··· 272 #define QUECTEL_PRODUCT_RM500Q 0x0800 273 #define QUECTEL_PRODUCT_RM520N 0x0801 274 #define QUECTEL_PRODUCT_EC200U 0x0901 275 #define QUECTEL_PRODUCT_EC200S_CN 0x6002 276 #define QUECTEL_PRODUCT_EC200A 0x6005 277 #define QUECTEL_PRODUCT_EM061K_LWW 0x6008 ··· 1233 { USB_DEVICE_INTERFACE_CLASS(QUECTEL_VENDOR_ID, 0x0700, 0xff), /* BG95 */ 1234 .driver_info = RSVD(3) | ZLP }, 1235 { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM500Q, 0xff, 0xff, 0x30) }, 1236 { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM500Q, 0xff, 0, 0) }, 1237 { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM500Q, 0xff, 0xff, 0x10), 1238 .driver_info = ZLP }, ··· 1246 { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC200U, 0xff, 0, 0) }, 1247 { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC200S_CN, 0xff, 0, 0) }, 1248 { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC200T, 0xff, 0, 0) }, 1249 { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM500K, 0xff, 0x00, 0x00) }, 1250 1251 { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6001) }, ··· 2245 .driver_info = RSVD(0) | RSVD(1) | RSVD(6) }, 2246 { USB_DEVICE(0x0489, 0xe0b5), /* Foxconn T77W968 ESIM */ 2247 .driver_info = RSVD(0) | RSVD(1) | RSVD(6) }, 2248 { USB_DEVICE_INTERFACE_CLASS(0x0489, 0xe0db, 0xff), /* Foxconn T99W265 MBIM */ 2249 .driver_info = RSVD(3) }, 2250 { USB_DEVICE_INTERFACE_CLASS(0x0489, 0xe0ee, 0xff), /* Foxconn T99W368 MBIM */
··· 272 #define QUECTEL_PRODUCT_RM500Q 0x0800 273 #define QUECTEL_PRODUCT_RM520N 0x0801 274 #define QUECTEL_PRODUCT_EC200U 0x0901 275 + #define QUECTEL_PRODUCT_EG912Y 0x6001 276 #define QUECTEL_PRODUCT_EC200S_CN 0x6002 277 #define QUECTEL_PRODUCT_EC200A 0x6005 278 #define QUECTEL_PRODUCT_EM061K_LWW 0x6008 ··· 1232 { USB_DEVICE_INTERFACE_CLASS(QUECTEL_VENDOR_ID, 0x0700, 0xff), /* BG95 */ 1233 .driver_info = RSVD(3) | ZLP }, 1234 { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM500Q, 0xff, 0xff, 0x30) }, 1235 + { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM500Q, 0xff, 0, 0x40) }, 1236 { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM500Q, 0xff, 0, 0) }, 1237 { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM500Q, 0xff, 0xff, 0x10), 1238 .driver_info = ZLP }, ··· 1244 { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC200U, 0xff, 0, 0) }, 1245 { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC200S_CN, 0xff, 0, 0) }, 1246 { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC200T, 0xff, 0, 0) }, 1247 + { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EG912Y, 0xff, 0, 0) }, 1248 { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM500K, 0xff, 0x00, 0x00) }, 1249 1250 { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6001) }, ··· 2242 .driver_info = RSVD(0) | RSVD(1) | RSVD(6) }, 2243 { USB_DEVICE(0x0489, 0xe0b5), /* Foxconn T77W968 ESIM */ 2244 .driver_info = RSVD(0) | RSVD(1) | RSVD(6) }, 2245 + { USB_DEVICE_INTERFACE_CLASS(0x0489, 0xe0da, 0xff), /* Foxconn T99W265 MBIM variant */ 2246 + .driver_info = RSVD(3) | RSVD(5) }, 2247 { USB_DEVICE_INTERFACE_CLASS(0x0489, 0xe0db, 0xff), /* Foxconn T99W265 MBIM */ 2248 .driver_info = RSVD(3) }, 2249 { USB_DEVICE_INTERFACE_CLASS(0x0489, 0xe0ee, 0xff), /* Foxconn T99W368 MBIM */
+11
drivers/usb/storage/unusual_devs.h
··· 1306 US_FL_INITIAL_READ10 ), 1307 1308 /* 1309 * This Pentax still camera is not conformant 1310 * to the USB storage specification: - 1311 * - It does not like the INQUIRY command. So we must handle this command
··· 1306 US_FL_INITIAL_READ10 ), 1307 1308 /* 1309 + * Patch by Tasos Sahanidis <tasos@tasossah.com> 1310 + * This flash drive always shows up with write protect enabled 1311 + * during the first mode sense. 1312 + */ 1313 + UNUSUAL_DEV(0x0951, 0x1697, 0x0100, 0x0100, 1314 + "Kingston", 1315 + "DT Ultimate G3", 1316 + USB_SC_DEVICE, USB_PR_DEVICE, NULL, 1317 + US_FL_NO_WP_DETECT), 1318 + 1319 + /* 1320 * This Pentax still camera is not conformant 1321 * to the USB storage specification: - 1322 * - It does not like the INQUIRY command. So we must handle this command
+1 -1
drivers/usb/typec/ucsi/ucsi_glink.c
··· 228 229 con_num = UCSI_CCI_CONNECTOR(cci); 230 if (con_num) { 231 - if (con_num < PMIC_GLINK_MAX_PORTS && 232 ucsi->port_orientation[con_num - 1]) { 233 int orientation = gpiod_get_value(ucsi->port_orientation[con_num - 1]); 234
··· 228 229 con_num = UCSI_CCI_CONNECTOR(cci); 230 if (con_num) { 231 + if (con_num <= PMIC_GLINK_MAX_PORTS && 232 ucsi->port_orientation[con_num - 1]) { 233 int orientation = gpiod_get_value(ucsi->port_orientation[con_num - 1]); 234