From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
Jian-Hong Pan <jhp@endlessos.org>,
Linux PCI <linux-pci@vger.kernel.org>,
Linux PM <linux-pm@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
"Thorsten Leemhuis (regressions address)"
<regressions@leemhuis.info>,
Linux regressions mailing list <regressions@lists.linux.dev>
Subject: Re: [Regression in 6.14-rc1] System suspend/resume broken by PCI commit 1db806ec06b7c
Date: Tue, 4 Feb 2025 09:48:15 +0200 (EET) [thread overview]
Message-ID: <9aa469fd-da5b-70fc-147e-dd4a50cf5af6@linux.intel.com> (raw)
In-Reply-To: <CAJZ5v0i=yBSFW82E=s=mx7ztVzmnoUwbxkDRnYyDztAWK9VcsQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 3036 bytes --]
On Mon, 3 Feb 2025, Rafael J. Wysocki wrote:
> On Mon, Feb 3, 2025 at 9:12 PM Rafael J. Wysocki <rafael@kernel.org> wrote:
> >
> > Hi,
Hi Rafael,
> > The following commit:
> >
> > commit 1db806ec06b7c6e08e8af57088da067963ddf117
> > Author: Jian-Hong Pan <jhp@endlessos.org>
> > Date: Fri Nov 15 15:22:02 2024 +0800
> >
> > PCI/ASPM: Save parent L1SS config in pci_save_aspm_l1ss_state()
> >
> > After 17423360a27a ("PCI/ASPM: Save L1 PM Substates Capability for
> > suspend/resume"), pci_save_aspm_l1ss_state(dev) saves the L1SS state for
> > "dev", and pci_restore_aspm_l1ss_state(dev) restores the state for both
> > "dev" and its parent.
> >
> > The problem is that unless pci_save_state() has been used in some other
> > path and has already saved the parent L1SS state, we will restore junk to
> > the parent, which means the L1 Substates likely won't work correctly.
> >
> > Save the L1SS config for both the device and its parent in
> > pci_save_aspm_l1ss_state(). When restoring, we need both because L1SS must
> > be enabled at the parent (the Downstream Port) before being enabled at the
> > child (the Upstream Port).
> >
> > Link: https://lore.kernel.org/r/20241115072200.37509-3-jhp@endlessos.org
> > Fixes: 17423360a27a ("PCI/ASPM: Save L1 PM Substates Capability for
> > suspend/resume")
> > Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218394
> > Suggested-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
> > Signed-off-by: Jian-Hong Pan <jhp@endlessos.org>
> > [bhelgaas: parallel save/restore structure, simplify commit log, patch at
> > https://lore.kernel.org/r/20241212230340.GA3267194@bhelgaas]
> > Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
> > Tested-by: Jian-Hong Pan <jhp@endlessos.org> # Asus B1400CEAE
> >
> > broke system suspend/resume on my Dell XPS13 9360. It doesn't even
> > pass suspend/resume testing after "echo devices > /sys/power/pm_test".
> >
> > It looks like PCIe links are all down during resume after the above
> > commit, but it is rather hard to collect any data in that state.
> >
> > Reverting the above commit on top of 6.14-rc1 makes things work again,
> > no problem.
> >
> > I'm unsure what exactly the problem is ATM, but I'm going to check a
> > couple of theories.
>
> The attached change makes it work again, FWIW, but moving the
> parent->l1ss check alone below the pdev l1ss saving doesn't help.
>
> So it is either the parent check against NULL or the
> pcie_downstream_port(pdev) one that breaks it. I guess the former,
> but I'll test it tomorrow.
Neither of those is the root cause but it's bit hard to see from the code
itself because the parent->saved_state check your test patch also removed
looks very logical on a glance (but that's the problematic line).
The fix is already here with the explanation:
https://lore.kernel.org/linux-pci/20250131152913.2507-1-ilpo.jarvinen@linux.intel.com/T/#u
--
i.
next prev parent reply other threads:[~2025-02-04 7:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-03 20:12 [Regression in 6.14-rc1] System suspend/resume broken by PCI commit 1db806ec06b7c Rafael J. Wysocki
2025-02-03 20:31 ` Rafael J. Wysocki
2025-02-04 7:48 ` Ilpo Järvinen [this message]
2025-02-04 15:10 ` Rafael J. Wysocki
2025-02-04 15:54 ` Ilpo Järvinen
2025-02-04 16:05 ` Rafael J. Wysocki
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=9aa469fd-da5b-70fc-147e-dd4a50cf5af6@linux.intel.com \
--to=ilpo.jarvinen@linux.intel.com \
--cc=bhelgaas@google.com \
--cc=jhp@endlessos.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=regressions@leemhuis.info \
--cc=regressions@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.