Re: [RFC PATCH] usb: host: xhci-sideband: fix deadlock in unregister path
From: Mathias Nyman
Date: Wed Feb 04 2026 - 04:54:56 EST
On 2/4/26 11:15, Guan-Yu Lin wrote:
Regarding xhci_sideband_check():Sounds reasonable to me
I have a concern regarding power management with the proposed check:
if (xhci->devs[i] && xhci->devs[i]->sideband)
return true;
vdev->sideband is assigned during xhci_sideband_register(), which
happens when the class driver probes (device connection), and it
persists until disconnect. If we use this check, the xHCI controller
will be prevented from PM suspending (system suspend) as long as the
device is connected, even if it is idle (not playing audio).
For mobile power optimization, we need to allow the controller to
suspend when the sideband is registered but idle.
Since we are proceeding with Option B, the class driver will be
maintaining the udev->offload_usage count via usb_offload_get/put(). I
propose we still rely on usb_offload_check() (or check offload_usage)
within the xHCI sideband check. This ensures we only block or adjust
the PM suspend flow only when there is active data transfer.
Thanks
Mathias