Re: [PATCH 2/2] xhci: drop 120ms U3 LFPS wake retry wait from runtime resume

From: Mathias Nyman

Date: Wed Sep 02 2026 - 08:18:59 EST


On 9/1/26 18:50, Lovekesh Solanki wrote:
On Tue, Sep 01, 2026 at 03:53:47PM +0300, Mathias Nyman wrote:
I looked into this again and remember now why we didn't remove the msleep(120)
earlier.

If we want the hub driver to keep us awake to detect delayed port activity,
then we need to wake the (root) hub driver in xhci resume.

That means always calling usb_hcd_resume_root_hub() in runtime resume cases where
resume is caused by usb device remote wake. (xHCI PME# in PCI case), even if there
isn't any port activity yet.
Got it, thanks for the explanation.

We don't currently check if runtime resume is caused by xHC PME# wake in the xhci-pci
driver. Not sure if there's a driver api for it.
Instead we in resume sleep for 120ms if there exists connected and suspended USB3
devices without port activity, and then check again.

This msleep(120) is unnecessary if runtime resume was caused by userspace instead
of usb device initiated wake (seen as PME for PCI hosts)
So the better implementation will cross into the PCI side, are there any
plans to implement that? Or any interest in it at all that you know of?

It's possible PCI side or pm core already provides some easy way for xhci driver to check this.
This specific issue is currently not on my todo list, yet.


Probably best to just take Patch 1/1 and look at this xhci resume part separately.
Do I need to resend the 1/2 Patch independently now that this one is
dropped? Or it'll be taken as is..? I'm still figuring the process out.

Maybe better to send it again, remember to include Greg k-h and Alan Stern

I have some minor, mostly personal taste based nitpicks that could be changed
in the patch. I'll reply with those comments directly to it.

Thanks

Mathias