Re: [PATCH v5 5/5] usb: host: enable sideband transfer during system sleep

From: Mathias Nyman
Date: Mon Oct 14 2024 - 09:06:56 EST


On 14.10.2024 11.50, Guan-Yu Lin wrote:
Sharing a USB controller with another entity via xhci-sideband driver
creates power management complexities. To prevent the USB controller
from being inadvertently deactivated while in use by the other entity, a
usage-count based mechanism is implemented. This allows the system to
manage power effectively, ensuring the controller remains available
whenever needed.

I don't think all this is needed to prevent USB controller from being
deactivated while sideband is in use. The modified audio class driver
that uses sideband is still bound to a usb interface device, and all
normal pm reference counting should work.

To me it looks like this code is tricking pm framework into believing
the usb device and host controller have successfully suspended during
system suspend when they in reality are fully up and running.

I'm not sure I fully understand the case this series is solving.

Thanks
Mathias