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

Pull USB and Thunderbolt fixes from Greg KH:
"Here are some small Thunderbolt and USB driver fixes for 5.10-rc4 to
solve some reported issues.

Nothing huge in here, just small things:

- thunderbolt memory leaks fixed and new device ids added

- revert of problem patch for the musb driver

- new quirks added for USB devices

- typec power supply fixes to resolve much reported problems about
charging notifications not working anymore

All except the cdc-acm driver quirk addition have been in linux-next
with no reported issues (the quirk patch was applied on Friday, and is
self-contained)"

* tag 'usb-5.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
usb: cdc-acm: Add DISABLE_ECHO for Renesas USB Download mode
MAINTAINERS: add usb raw gadget entry
usb: typec: ucsi: Report power supply changes
xhci: hisilicon: fix refercence leak in xhci_histb_probe
Revert "usb: musb: convert to devm_platform_ioremap_resource_byname"
thunderbolt: Add support for Intel Tiger Lake-H
thunderbolt: Only configure USB4 wake for lane 0 adapters
thunderbolt: Add uaccess dependency to debugfs interface
thunderbolt: Fix memory leak if ida_simple_get() fails in enumerate_services()
thunderbolt: Add the missed ida_simple_remove() in ring_request_msix()

Changed files
+69 -7
drivers
+8
MAINTAINERS
··· 18173 18173 S: Supported 18174 18174 F: drivers/usb/class/usblp.c 18175 18175 18176 + USB RAW GADGET DRIVER 18177 + R: Andrey Konovalov <andreyknvl@gmail.com> 18178 + L: linux-usb@vger.kernel.org 18179 + S: Maintained 18180 + F: Documentation/usb/raw-gadget.rst 18181 + F: drivers/usb/gadget/legacy/raw_gadget.c 18182 + F: include/uapi/linux/usb/raw_gadget.h 18183 + 18176 18184 USB QMI WWAN NETWORK DRIVER 18177 18185 M: Bjørn Mork <bjorn@mork.no> 18178 18186 L: netdev@vger.kernel.org
+1
drivers/thunderbolt/debugfs.c
··· 9 9 10 10 #include <linux/debugfs.h> 11 11 #include <linux/pm_runtime.h> 12 + #include <linux/uaccess.h> 12 13 13 14 #include "tb.h" 14 15
+2
drivers/thunderbolt/icm.c
··· 2284 2284 2285 2285 case PCI_DEVICE_ID_INTEL_TGL_NHI0: 2286 2286 case PCI_DEVICE_ID_INTEL_TGL_NHI1: 2287 + case PCI_DEVICE_ID_INTEL_TGL_H_NHI0: 2288 + case PCI_DEVICE_ID_INTEL_TGL_H_NHI1: 2287 2289 icm->is_supported = icm_tgl_is_supported; 2288 2290 icm->driver_ready = icm_icl_driver_ready; 2289 2291 icm->set_uuid = icm_icl_set_uuid;
+19 -4
drivers/thunderbolt/nhi.c
··· 406 406 407 407 ring->vector = ret; 408 408 409 - ring->irq = pci_irq_vector(ring->nhi->pdev, ring->vector); 410 - if (ring->irq < 0) 411 - return ring->irq; 409 + ret = pci_irq_vector(ring->nhi->pdev, ring->vector); 410 + if (ret < 0) 411 + goto err_ida_remove; 412 + 413 + ring->irq = ret; 412 414 413 415 irqflags = no_suspend ? IRQF_NO_SUSPEND : 0; 414 - return request_irq(ring->irq, ring_msix, irqflags, "thunderbolt", ring); 416 + ret = request_irq(ring->irq, ring_msix, irqflags, "thunderbolt", ring); 417 + if (ret) 418 + goto err_ida_remove; 419 + 420 + return 0; 421 + 422 + err_ida_remove: 423 + ida_simple_remove(&nhi->msix_ida, ring->vector); 424 + 425 + return ret; 415 426 } 416 427 417 428 static void ring_release_msix(struct tb_ring *ring) ··· 1344 1333 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_TGL_NHI0), 1345 1334 .driver_data = (kernel_ulong_t)&icl_nhi_ops }, 1346 1335 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_TGL_NHI1), 1336 + .driver_data = (kernel_ulong_t)&icl_nhi_ops }, 1337 + { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_TGL_H_NHI0), 1338 + .driver_data = (kernel_ulong_t)&icl_nhi_ops }, 1339 + { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_TGL_H_NHI1), 1347 1340 .driver_data = (kernel_ulong_t)&icl_nhi_ops }, 1348 1341 1349 1342 /* Any USB4 compliant host */
+2
drivers/thunderbolt/nhi.h
··· 75 75 #define PCI_DEVICE_ID_INTEL_ICL_NHI0 0x8a17 76 76 #define PCI_DEVICE_ID_INTEL_TGL_NHI0 0x9a1b 77 77 #define PCI_DEVICE_ID_INTEL_TGL_NHI1 0x9a1d 78 + #define PCI_DEVICE_ID_INTEL_TGL_H_NHI0 0x9a1f 79 + #define PCI_DEVICE_ID_INTEL_TGL_H_NHI1 0x9a21 78 80 79 81 #define PCI_CLASS_SERIAL_USB_USB4 0x0c0340 80 82
+2
drivers/thunderbolt/tb.h
··· 784 784 switch (sw->config.device_id) { 785 785 case PCI_DEVICE_ID_INTEL_TGL_NHI0: 786 786 case PCI_DEVICE_ID_INTEL_TGL_NHI1: 787 + case PCI_DEVICE_ID_INTEL_TGL_H_NHI0: 788 + case PCI_DEVICE_ID_INTEL_TGL_H_NHI1: 787 789 return true; 788 790 } 789 791 }
+4
drivers/thunderbolt/usb4.c
··· 421 421 * upstream USB4 port. 422 422 */ 423 423 tb_switch_for_each_port(sw, port) { 424 + if (!tb_port_is_null(port)) 425 + continue; 424 426 if (!route && tb_is_upstream_port(port)) 427 + continue; 428 + if (!port->cap_usb4) 425 429 continue; 426 430 427 431 ret = tb_port_read(port, &val, TB_CFG_PORT,
+1
drivers/thunderbolt/xdomain.c
··· 881 881 882 882 id = ida_simple_get(&xd->service_ids, 0, 0, GFP_KERNEL); 883 883 if (id < 0) { 884 + kfree(svc->key); 884 885 kfree(svc); 885 886 break; 886 887 }
+9
drivers/usb/class/cdc-acm.c
··· 1693 1693 { USB_DEVICE(0x0870, 0x0001), /* Metricom GS Modem */ 1694 1694 .driver_info = NO_UNION_NORMAL, /* has no union descriptor */ 1695 1695 }, 1696 + { USB_DEVICE(0x045b, 0x023c), /* Renesas USB Download mode */ 1697 + .driver_info = DISABLE_ECHO, /* Don't echo banner */ 1698 + }, 1699 + { USB_DEVICE(0x045b, 0x0248), /* Renesas USB Download mode */ 1700 + .driver_info = DISABLE_ECHO, /* Don't echo banner */ 1701 + }, 1702 + { USB_DEVICE(0x045b, 0x024D), /* Renesas USB Download mode */ 1703 + .driver_info = DISABLE_ECHO, /* Don't echo banner */ 1704 + }, 1696 1705 { USB_DEVICE(0x0e8d, 0x0003), /* FIREFLY, MediaTek Inc; andrey.arapov@gmail.com */ 1697 1706 .driver_info = NO_UNION_NORMAL, /* has no union descriptor */ 1698 1707 },
+1 -1
drivers/usb/host/xhci-histb.c
··· 240 240 /* Initialize dma_mask and coherent_dma_mask to 32-bits */ 241 241 ret = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(32)); 242 242 if (ret) 243 - return ret; 243 + goto disable_pm; 244 244 245 245 hcd = usb_create_hcd(driver, dev, dev_name(dev)); 246 246 if (!hcd) {
+3 -1
drivers/usb/musb/musb_dsps.c
··· 429 429 struct platform_device *parent = to_platform_device(dev->parent); 430 430 const struct dsps_musb_wrapper *wrp = glue->wrp; 431 431 void __iomem *reg_base; 432 + struct resource *r; 432 433 u32 rev, val; 433 434 int ret; 434 435 435 - reg_base = devm_platform_ioremap_resource_byname(parent, "control"); 436 + r = platform_get_resource_byname(parent, IORESOURCE_MEM, "control"); 437 + reg_base = devm_ioremap_resource(dev, r); 436 438 if (IS_ERR(reg_base)) 437 439 return PTR_ERR(reg_base); 438 440 musb->ctrl_base = reg_base;
+9
drivers/usb/typec/ucsi/psy.c
··· 238 238 return; 239 239 240 240 power_supply_unregister(con->psy); 241 + con->psy = NULL; 242 + } 243 + 244 + void ucsi_port_psy_changed(struct ucsi_connector *con) 245 + { 246 + if (IS_ERR_OR_NULL(con->psy)) 247 + return; 248 + 249 + power_supply_changed(con->psy); 241 250 }
+6 -1
drivers/usb/typec/ucsi/ucsi.c
··· 643 643 role = !!(con->status.flags & UCSI_CONSTAT_PWR_DIR); 644 644 645 645 if (con->status.change & UCSI_CONSTAT_POWER_OPMODE_CHANGE || 646 - con->status.change & UCSI_CONSTAT_POWER_LEVEL_CHANGE) 646 + con->status.change & UCSI_CONSTAT_POWER_LEVEL_CHANGE) { 647 647 ucsi_pwr_opmode_change(con); 648 + ucsi_port_psy_changed(con); 649 + } 648 650 649 651 if (con->status.change & UCSI_CONSTAT_POWER_DIR_CHANGE) { 650 652 typec_set_pwr_role(con->port, role); ··· 676 674 ucsi_register_partner(con); 677 675 else 678 676 ucsi_unregister_partner(con); 677 + 678 + ucsi_port_psy_changed(con); 679 679 } 680 680 681 681 if (con->status.change & UCSI_CONSTAT_CAM_CHANGE) { ··· 998 994 !!(con->status.flags & UCSI_CONSTAT_PWR_DIR)); 999 995 ucsi_pwr_opmode_change(con); 1000 996 ucsi_register_partner(con); 997 + ucsi_port_psy_changed(con); 1001 998 } 1002 999 1003 1000 if (con->partner) {
+2
drivers/usb/typec/ucsi/ucsi.h
··· 340 340 #if IS_ENABLED(CONFIG_POWER_SUPPLY) 341 341 int ucsi_register_port_psy(struct ucsi_connector *con); 342 342 void ucsi_unregister_port_psy(struct ucsi_connector *con); 343 + void ucsi_port_psy_changed(struct ucsi_connector *con); 343 344 #else 344 345 static inline int ucsi_register_port_psy(struct ucsi_connector *con) { return 0; } 345 346 static inline void ucsi_unregister_port_psy(struct ucsi_connector *con) { } 347 + static inline void ucsi_port_psy_changed(struct ucsi_connector *con) { } 346 348 #endif /* CONFIG_POWER_SUPPLY */ 347 349 348 350 #if IS_ENABLED(CONFIG_TYPEC_DP_ALTMODE)