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

From: Lovekesh Solanki

Date: Wed Sep 16 2026 - 14:32:23 EST


On Fri, Sep 04, 2026 at 06:43:43PM +0530, Lovekesh Solanki wrote:
> On Thu, Sep 03, 2026 at 10:42:48AM +0300, Mathias Nyman wrote:
> > On 9/2/26 21:21, Lovekesh Solanki wrote:
> > > On Wed, Sep 02, 2026 at 03:10:41PM +0300, Mathias Nyman wrote:
> > > > 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.
> > > Alright, would you like to me to work on this? I could look into
> > > that side and possibly come up with an approach.
> >
> > Yes, please, that would be great.
> I took a look at the PCI / PM side, and it seems to me there isn't any
> reliable approach for xhci driver to use right now.
>
> The pci_check_pme_status() both checks and clears the pme status bit
> and the pci core devours it inside pci_pme_wakeup(), and
> pm_request_resume is async so xhci's runtime_resume may run much later
> after the bit is already gone. We can't simply export pci_check_pme_status()
> that wouldn't give any useful info.
>
> One solution I can think of would be adding a pme_wake_detected bitfield
> on pci_dev struct, we set it in pci_pme_wakeup() when PME is confirmed
> and we clear it in pci_pm_runtime_resume() after the driver has
> returned.
> Then, we could directly read via pdev->pme_wake_detected in its own
> resume.
>
> What are your thoughts on this?

Hey Mathias,

Just wondering if you have looked into the proposal above.
I suggested adding a new field to pci_dev struct for knowing whether a
resume came from PCI PME side.

Would it be better to send it as an RFC too?

Thanks,
Lovekesh