mirror-linux/drivers/usb/core
Guan-Yu Lin bd3d245b0f usb: core: use dedicated spinlock for offload state
Replace the coarse USB device lock with a dedicated offload_lock
spinlock to reduce contention during offload operations. Use
offload_pm_locked to synchronize with PM transitions and replace
the legacy offload_at_suspend flag.

Optimize usb_offload_get/put by switching from auto-resume/suspend
to pm_runtime_get_if_active(). This ensures offload state is only
modified when the device is already active, avoiding unnecessary
power transitions.

Cc: stable <stable@kernel.org>
Fixes: ef82a4803a ("xhci: sideband: add api to trace sideband usage")
Signed-off-by: Guan-Yu Lin <guanyulin@google.com>
Tested-by: Hailong Liu <hailong.liu@oppo.com>
Acked-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://patch.msgid.link/20260401123238.3790062-2-guanyulin@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-04-02 09:43:26 +02:00
..
Kconfig usb: core: Kconfig: Improve USB authorization mode help 2024-02-17 16:38:35 +01:00
Makefile usb: core: Add tracepoints for device allocation and state changes 2025-10-22 10:58:30 +02:00
buffer.c
config.c usb: core: new quirk to handle devices with zero configurations 2026-03-11 16:17:19 +01:00
devices.c
devio.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
driver.c usb: core: use dedicated spinlock for offload state 2026-04-02 09:43:26 +02:00
endpoint.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
file.c
generic.c USB: lower "Device is not authorized for usage" message to info 2025-08-13 16:55:27 +02:00
hcd-pci.c usb: core: modify comments xhci_hc_driver has HCD_MEMORY just like ehci ohci 2025-06-19 12:31:16 +02:00
hcd.c usb: hcd: queue wakeup_work to system_freezable_wq workqueue 2026-03-18 16:17:08 +01:00
hub.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
hub.h usb: hub: Fix flushing of delayed work used for post resume purposes 2025-06-30 15:36:00 +02:00
ledtrig-usbport.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
message.c USB: core: Limit the length of unkillable synchronous timeouts 2026-03-11 16:16:56 +01:00
notify.c
of.c usb: core: add missing of_node_put() in usb_of_has_devices_or_graph 2024-07-03 16:04:10 +02:00
offload.c usb: core: use dedicated spinlock for offload state 2026-04-02 09:43:26 +02:00
otg_productlist.h
phy.c usb: core: phy: avoid double use of 'usb3-phy' 2026-04-02 09:19:31 +02:00
phy.h usb: core: add phy notify connect and disconnect 2024-01-27 17:36:14 -08:00
port.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
quirks.c USB: core: add NO_LPM quirk for Razer Kiyo Pro webcam 2026-04-02 09:30:44 +02:00
sysfs.c sysfs: treewide: switch back to attribute_group::bin_attrs 2025-06-17 10:44:15 +02:00
trace.c usb: core: Add tracepoints for device allocation and state changes 2025-10-22 10:58:30 +02:00
trace.h usb: core: Add tracepoints for device allocation and state changes 2025-10-22 10:58:30 +02:00
urb.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
usb-acpi.c usb: acpi: fix device link removal 2025-06-19 12:36:19 +02:00
usb.c usb: core: use dedicated spinlock for offload state 2026-04-02 09:43:26 +02:00
usb.h USB: make to_usb_device_driver() use container_of_const() 2024-11-14 17:57:33 +01:00