Re: [Bug 216877] New: Regression in PCI powermanagement breaks resume after suspend

From: Bjorn Helgaas
Date: Thu Feb 02 2023 - 15:50:09 EST


On Thu, Jan 26, 2023 at 08:24:23PM +0100, Thomas Witt wrote:
> On 04/01/2023 16:37, Thomas Witt wrote:
> > On 04/01/2023 16:02, Bjorn Helgaas wrote:
> > > Thanks for testing it.  Maybe Vidya will have more ideas.  The patch
> > > below (based on v6.2-rc1) would revert 5e85eba6f50d and 4ff116d0d5fd.
> > > If 5e85eba6f50d is the culprit, it should fix the regression.  It
> > > would also potentially break L1 substates after resume, so we'd like
> > > to avoid reverting it if possible.
> > >
> > > But the "Unable to change power state from D3hot to D0, device
> > > inaccessible" symptom suggests that the device is still in D3, which
> > > would be more like a wakeup issue than an ASPM issue.
> > >
> > > Your bisect log said 3e347969a577 ("PCI/PM: Reduce D3hot delay with
> > > usleep_range()") was "good", but it would be worth double-checking,
> > > e.g., see if reverting it from v6.2-rc1 makes any difference.
> > >
> > > Bjorn
> > >
> > > commit 61de2691d549 ("Revert "PCI/ASPM: Refactor L1 PM Substates
> > > Control Register programming"")
> > > parent 1b929c02afd3
> > > Author: Bjorn Helgaas <bhelgaas@xxxxxxxxxx>
> > > Date:   Wed Jan 4 08:38:53 2023 -0600
> > >
> > >      Revert "PCI/ASPM: Refactor L1 PM Substates Control Register
> > > programming"
> >
> > With this patch on top of 6.2-rc1 suspend/resume works and my PCI
> > devices come back online.
>
> do you have an Idea what went wrong in that commit to cause my PCI devices
> to not return from D3?

I do not have any ideas yet.

I suspect maybe we should plan to revert 5e85eba6f50d ("PCI/ASPM:
Refactor L1 PM Substates Control Register programming") and
4ff116d0d5fd ("PCI/ASPM: Save L1 PM Substates Capability for
suspend/resume") for now.

It's odd that they both appeared in v6.1, and we haven't seen a flood
of reports about this, so maybe there's something unusual about your
machine, Thomas.

I'll post a revert, and we can do that for v6.2 if we don't come up
with any other ideas.

Bjorn