From: Bjorn Helgaas <helgaas@kernel.org>
To: Lukas Wunner <lukas@wunner.de>
Cc: "Mario Limonciello" <mario.limonciello@amd.com>,
"Bjorn Helgaas" <bhelgaas@google.com>,
"Rafael J . Wysocki" <rjw@rjwysocki.net>,
"Mika Westerberg" <mika.westerberg@linux.intel.com>,
"Hans de Goede" <hdegoede@redhat.com>,
iain@orangesquash.org.uk,
"Shyam Sundar S K" <Shyam-sundar.S-k@amd.com>,
"open list:PCI SUBSYSTEM" <linux-pci@vger.kernel.org>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Subject: Re: [PATCH v22] PCI: Avoid D3 at suspend for AMD PCIe root ports w/ USB4 controllers
Date: Thu, 5 Oct 2023 13:58:16 -0500 [thread overview]
Message-ID: <20231005185816.GA786641@bhelgaas> (raw)
In-Reply-To: <20231005184730.GA11020@wunner.de>
On Thu, Oct 05, 2023 at 08:47:30PM +0200, Lukas Wunner wrote:
> On Thu, Oct 05, 2023 at 01:14:40PM -0500, Bjorn Helgaas wrote:
> > On Wed, Oct 04, 2023 at 09:49:59AM -0500, Mario Limonciello wrote:
> > > Iain reports that USB devices can't be used to wake a Lenovo Z13 from
> > > suspend. This occurs because on some AMD platforms, even though the Root
> > > Ports advertise PME_Support for D3hot and D3cold, they don't handle PME
> > > messages and generate wakeup interrupts from those states when amd-pmc has
> > > put the platform in a hardware sleep state.
> > >
> > > Iain reported this on an AMD Rembrandt platform, but it also affects
> > > Phoenix SoCs. On Iain's system, a USB4 router below the affected Root Port
> > > generates the PME. To avoid this issue, disable D3 for the root port
> > > associated with USB4 controllers at suspend time.
> > >
> > > Restore D3 support at resume so that it can be used by runtime suspend.
> > > The amd-pmc driver doesn't put the platform in a hardware sleep state for
> > > runtime suspend, so PMEs work as advertised.
> > >
> > > Cc: stable@vger.kernel.org
> > > Link: https://learn.microsoft.com/en-us/windows-hardware/design/device-experiences/platform-design-for-modern-standby#low-power-core-silicon-cpu-soc-dram [1]
> > > Fixes: 9d26d3a8f1b0 ("PCI: Put PCIe ports into D3 during suspend")
> > > Reported-by: Iain Lane <iain@orangesquash.org.uk>
> > > Closes: https://forums.lenovo.com/t5/Ubuntu/Z13-can-t-resume-from-suspend-with-external-USB-keyboard/m-p/5217121
> > > Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
> >
> > Applied to pci/pm for v6.7, thanks for all your patience!
>
> One belated thought I have on this is that it might be a better fit in
> arch/x86/pci/fixups.c rather than drivers/pci/quirks.c.
Good point, I moved it there, thanks. There are lots of other things
that should probably be moved, but no point in adding more.
Bjorn
prev parent reply other threads:[~2023-10-05 18:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-04 14:49 [PATCH v22] PCI: Avoid D3 at suspend for AMD PCIe root ports w/ USB4 controllers Mario Limonciello
2023-10-05 18:14 ` Bjorn Helgaas
2023-10-05 18:20 ` Mario Limonciello
2023-10-05 18:47 ` Lukas Wunner
2023-10-05 18:52 ` Mario Limonciello
2023-10-05 18:59 ` Lukas Wunner
2023-10-05 18:58 ` Bjorn Helgaas [this message]
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=20231005185816.GA786641@bhelgaas \
--to=helgaas@kernel.org \
--cc=Shyam-sundar.S-k@amd.com \
--cc=bhelgaas@google.com \
--cc=hdegoede@redhat.com \
--cc=iain@orangesquash.org.uk \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-pci@vger.kernel.org \
--cc=lukas@wunner.de \
--cc=mario.limonciello@amd.com \
--cc=mika.westerberg@linux.intel.com \
--cc=rjw@rjwysocki.net \
/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;
as well as URLs for NNTP newsgroup(s).