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

Pull USB / Thunderbolt driver fixes from Greg KH:
"Here are some small USB and Thunderbolt driver fixes for 6.11-rc4 to
resolve some reported issues. Included in here are:

- thunderbolt driver fixes for reported problems

- typec driver fixes

- xhci fixes

- new device id for ljca usb driver

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

* tag 'usb-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
xhci: Fix Panther point NULL pointer deref at full-speed re-enumeration
usb: misc: ljca: Add Lunar Lake ljca GPIO HID to ljca_gpio_hids[]
Revert "usb: typec: tcpm: clear pd_event queue in PORT_RESET"
usb: typec: ucsi: Fix the return value of ucsi_run_command()
usb: xhci: fix duplicate stall handling in handle_tx_event()
usb: xhci: Check for xhci->interrupters being allocated in xhci_mem_clearup()
thunderbolt: Mark XDomain as unplugged when router is removed
thunderbolt: Fix memory leaks in {port|retimer}_sb_regs_write()

Changed files
+16 -10
drivers
thunderbolt
usb
host
misc
typec
tcpm
ucsi
+6 -4
drivers/thunderbolt/debugfs.c
··· 323 323 324 324 if (mutex_lock_interruptible(&tb->lock)) { 325 325 ret = -ERESTARTSYS; 326 - goto out_rpm_put; 326 + goto out; 327 327 } 328 328 329 329 ret = sb_regs_write(port, port_sb_regs, ARRAY_SIZE(port_sb_regs), 330 330 USB4_SB_TARGET_ROUTER, 0, buf, count, ppos); 331 331 332 332 mutex_unlock(&tb->lock); 333 - out_rpm_put: 333 + out: 334 334 pm_runtime_mark_last_busy(&sw->dev); 335 335 pm_runtime_put_autosuspend(&sw->dev); 336 + free_page((unsigned long)buf); 336 337 337 338 return ret < 0 ? ret : count; 338 339 } ··· 356 355 357 356 if (mutex_lock_interruptible(&tb->lock)) { 358 357 ret = -ERESTARTSYS; 359 - goto out_rpm_put; 358 + goto out; 360 359 } 361 360 362 361 ret = sb_regs_write(rt->port, retimer_sb_regs, ARRAY_SIZE(retimer_sb_regs), 363 362 USB4_SB_TARGET_RETIMER, rt->index, buf, count, ppos); 364 363 365 364 mutex_unlock(&tb->lock); 366 - out_rpm_put: 365 + out: 367 366 pm_runtime_mark_last_busy(&rt->dev); 368 367 pm_runtime_put_autosuspend(&rt->dev); 368 + free_page((unsigned long)buf); 369 369 370 370 return ret < 0 ? ret : count; 371 371 }
+1
drivers/thunderbolt/switch.c
··· 3392 3392 tb_switch_remove(port->remote->sw); 3393 3393 port->remote = NULL; 3394 3394 } else if (port->xdomain) { 3395 + port->xdomain->is_unplugged = true; 3395 3396 tb_xdomain_remove(port->xdomain); 3396 3397 port->xdomain = NULL; 3397 3398 }
+1 -1
drivers/usb/host/xhci-mem.c
··· 1872 1872 1873 1873 cancel_delayed_work_sync(&xhci->cmd_timer); 1874 1874 1875 - for (i = 0; i < xhci->max_interrupters; i++) { 1875 + for (i = 0; xhci->interrupters && i < xhci->max_interrupters; i++) { 1876 1876 if (xhci->interrupters[i]) { 1877 1877 xhci_remove_interrupter(xhci, xhci->interrupters[i]); 1878 1878 xhci_free_interrupter(xhci, xhci->interrupters[i]);
+1
drivers/usb/host/xhci-ring.c
··· 2910 2910 process_isoc_td(xhci, ep, ep_ring, td, ep_trb, event); 2911 2911 else 2912 2912 process_bulk_intr_td(xhci, ep, ep_ring, td, ep_trb, event); 2913 + return 0; 2913 2914 2914 2915 check_endpoint_halted: 2915 2916 if (xhci_halted_host_endpoint(ep_ctx, trb_comp_code))
+5 -3
drivers/usb/host/xhci.c
··· 2837 2837 xhci->num_active_eps); 2838 2838 return -ENOMEM; 2839 2839 } 2840 - if ((xhci->quirks & XHCI_SW_BW_CHECKING) && 2840 + if ((xhci->quirks & XHCI_SW_BW_CHECKING) && !ctx_change && 2841 2841 xhci_reserve_bandwidth(xhci, virt_dev, command->in_ctx)) { 2842 2842 if ((xhci->quirks & XHCI_EP_LIMIT_QUIRK)) 2843 2843 xhci_free_host_resources(xhci, ctrl_ctx); ··· 4200 4200 mutex_unlock(&xhci->mutex); 4201 4201 ret = xhci_disable_slot(xhci, udev->slot_id); 4202 4202 xhci_free_virt_device(xhci, udev->slot_id); 4203 - if (!ret) 4204 - xhci_alloc_dev(hcd, udev); 4203 + if (!ret) { 4204 + if (xhci_alloc_dev(hcd, udev) == 1) 4205 + xhci_setup_addressable_virt_dev(xhci, udev); 4206 + } 4205 4207 kfree(command->completion); 4206 4208 kfree(command); 4207 4209 return -EPROTO;
+1
drivers/usb/misc/usb-ljca.c
··· 169 169 { "INTC1096" }, 170 170 { "INTC100B" }, 171 171 { "INTC10D1" }, 172 + { "INTC10B5" }, 172 173 {}, 173 174 }; 174 175
-1
drivers/usb/typec/tcpm/tcpm.c
··· 5655 5655 break; 5656 5656 case PORT_RESET: 5657 5657 tcpm_reset_port(port); 5658 - port->pd_events = 0; 5659 5658 if (port->self_powered) 5660 5659 tcpm_set_cc(port, TYPEC_CC_OPEN); 5661 5660 else
+1 -1
drivers/usb/typec/ucsi/ucsi.c
··· 137 137 if (ret) 138 138 return ret; 139 139 140 - return err; 140 + return err ?: UCSI_CCI_LENGTH(*cci); 141 141 } 142 142 143 143 static int ucsi_read_error(struct ucsi *ucsi, u8 connector_num)