On Fri, Mar 08, 2024, Guilherme G. Piccoli wrote:
On 07/03/2024 23:40, Thinh Nguyen wrote:
If the device is configured for system wakeup, then make sure that the xHCI driver knows about it and make sure to permit wakeup only at the appropriate time.
For host mode, if the controller goes through the dwc3 code path, then a child xHCI platform device is created. Make sure the platform device also inherits the wakeup setting for xHCI to enable remote wakeup.
For device mode, make sure to disable system wakeup if no gadget driver is bound. We may experience unwanted system wakeup due to the wakeup signal from the controller PMU detecting connection/disconnection when in low power (D3). E.g. In the case of Steam Deck, the PCI PME prevents the system staying in suspend.
Cc: stable@vger.kernel.org Reported-by: Guilherme G. Piccoli gpiccoli@igalia.com Closes: https://urldefense.com/v3/__https://lore.kernel.org/linux-usb/70a7692d-647c-... Fixes: d07e8819a03d ("usb: dwc3: add xHCI Host support") Signed-off-by: Thinh Nguyen Thinh.Nguyen@synopsys.com
[CCing some interested parties here from Deck development teams]
Hi Thinh, thanks a bunch for the fix, and all the support and attention on this issue - much appreciated!
I've tested this fix on top of v6.8-rc7, in the Steam Deck, and it manages to resolve the sleep problems we have on device mode. So, feel free to add:
Tested-by: Guilherme G. Piccoli gpiccoli@igalia.com # Steam Deck
Should we try to get it included last minute on v6.8, or better to make use of the merge window opening next week? Cheers,
It's up to Greg. But at this point, I think we'll probably need to wait until after v6.9-rc1.
BR, Thinh