Linux USB
 help / color / mirror / Atom feed
From: Lovekesh Solanki <lovekeshsolanki00@gmail.com>
To: Mathias Nyman <mathias.nyman@linux.intel.com>
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	 Michal Pecio <michal.pecio@gmail.com>,
	Mathieu Fluhr <mathieu.fluhr@gmail.com>,
	 Mario Limonciello <mario.limonciello@amd.com>,
	Thorsten Leemhuis <regressions@leemhuis.info>,
	 regressions@lists.linux.dev, stable@vger.kernel.org
Subject: Re: [PATCH 2/2] xhci: drop 120ms U3 LFPS wake retry wait from runtime resume
Date: Fri, 4 Sep 2026 18:43:43 +0530	[thread overview]
Message-ID: <apq4FFSD2QKG-jUu@eggarch> (raw)
In-Reply-To: <082467bf-d045-45d7-b097-97a5790e79d6@linux.intel.com>

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?

Regards,
Lovekesh

  reply	other threads:[~2026-09-04 13:13 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-31 19:03 [PATCH 1/2] usb: hub: use shorter 120ms post resume hold for SS root hubs Lovekesh Solanki
2026-08-31 19:03 ` [PATCH 2/2] xhci: drop 120ms U3 LFPS wake retry wait from runtime resume Lovekesh Solanki
2026-09-01 12:53   ` Mathias Nyman
2026-09-01 15:50     ` Lovekesh Solanki
2026-09-02 12:10       ` Mathias Nyman
2026-09-02 18:21         ` Lovekesh Solanki
2026-09-03  7:42           ` Mathias Nyman
2026-09-04 13:13             ` Lovekesh Solanki [this message]
2026-09-02 13:29 ` [PATCH 1/2] usb: hub: use shorter 120ms post resume hold for SS root hubs Mathias Nyman
2026-09-02 18:43   ` Lovekesh Solanki
2026-09-03  7:50     ` Mathias Nyman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=apq4FFSD2QKG-jUu@eggarch \
    --to=lovekeshsolanki00@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mario.limonciello@amd.com \
    --cc=mathias.nyman@linux.intel.com \
    --cc=mathieu.fluhr@gmail.com \
    --cc=michal.pecio@gmail.com \
    --cc=regressions@leemhuis.info \
    --cc=regressions@lists.linux.dev \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox