Linux PCI subsystem development
 help / color / mirror / Atom feed
From: Lukas Wunner <lukas@wunner.de>
To: "Adrià Vilanova Martínez" <me@avm99963.com>
Cc: Bjorn Helgaas <helgaas@kernel.org>,
	"Mario Limonciello (AMD) (kernel.org)" <superm1@kernel.org>,
	Bjorn Helgaas <bhelgaas@google.com>,
	regressions@lists.linux.dev, linux-pci@vger.kernel.org
Subject: Re: [REGRESSION] Intel Wireless adapter is not detected until suspending to RAM and resuming
Date: Wed, 22 Oct 2025 17:30:25 +0200	[thread overview]
Message-ID: <aPj4kUglHgBm4uAt@wunner.de> (raw)
In-Reply-To: <zmkurgnjb4zw7zcg6uucbtvuratxlaau5lvhkgknidpjz7vnb7@dnsyjbrqtvqw>

On Tue, Oct 21, 2025 at 03:35:42PM +0200, Adrià Vilanova Martínez wrote:
> [    0.220045] pcieport 0000:00:1c.0: pciehp: Slot Status            : 0x0048

In the working case (without 4d4c10f763d7), there's a stale
Presence Detect Changed event in the Slot Status register.
The event is cleared by pcie_init() prior to enabling interrupts.
However the event immediately re-appears:

> [    0.220308] pcieport 0000:00:1c.0: pciehp: pcie_enable_notification: SLOTCTRL 58 write cmd 1028
> [    0.220316] pcieport 0000:00:1c.0: pciehp: pending interrupts 0x0008 from Slot Status

I also note that in the working case there are a bunch of
Correctable Errors reported through AER several times in the log:

> [    1.949940] pcieport 0000:00:1c.0: AER: Multiple Correctable error message received from 0000:00:1c.0
> [    1.949950] pcieport 0000:00:1c.0: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Receiver ID)
> [    1.949955] pcieport 0000:00:1c.0:   device [8086:9d10] error status/mask=00000001/00002000
> [    1.949960] pcieport 0000:00:1c.0:    [ 0] RxErr                  (First)

Now here's the kicker:

Looking at the ASPM configuration in the lspci output you've provided,
I note that after booting without 4d4c10f763d7, ASPM is disabled on
the Root Port but L1 is enabled on the Wifi card!

After resuming from system sleep, ASPM is disabled on both of them
(with and without 4d4c10f763d7).

I suspect the incongruence of ASPM settings between Root Port and
Wifi card is the root cause of the Presence Detect Changed flaps
as well as the Correctable Errors.  I guess the BIOS set these
incorrectly.  Looking at the code in:

pcie_aspm_init_link_state()
  pcie_aspm_cap_init()

... it first disables L0s and L1 to initialize L1 substates,
then restores the register values as they were set by BIOS.
This feels wrong.  The safest option is probably to instead
disable L0s and/or L1 if either of them was only enabled
on one of the two link partners.

pcie_aspm_init_link_state() later does call pcie_config_aspm_path(),
which should rectify incongruent settings.  But it's only called
if the aspm_policy is something else than POLICY_POWERSAVE and
POLICY_POWER_SUPERSAVE.

Which policy is set in your kernel configuration?
(Search for CONFIG_PCIEASPM_...)

Does setting it to CONFIG_PCIEASPM_PERFORMANCE change the behavior?

With 4d4c10f763d7, the Wifi card falls off the bus and the link never
comes back.  I don't know why the commit is causing that.  As Mario
suggested, it may be caused by the platform.  Could you provide an
acpidump for further analysis?  The usual way to share large blobs
like this (as well as dmesg and lspci output) is by opening a bug
on bugzilla.kernel.org and attaching it there.

Thanks,

Lukas

  reply	other threads:[~2025-10-22 15:30 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-18 22:01 [REGRESSION] Intel Wireless adapter is not detected until suspending to RAM and resuming Adrià Vilanova Martínez
2025-10-19  5:12 ` Mario Limonciello
2025-10-19  9:35   ` Adrià Vilanova Martínez
2025-10-19 11:37     ` Adrià Vilanova Martínez
2025-10-19 18:22       ` Mario Limonciello
2025-10-19 23:08         ` Adrià Vilanova Martínez
2025-10-20  0:25           ` Mario Limonciello
2025-10-20 12:56             ` Adrià Vilanova Martínez
2025-10-20 16:37               ` Mario Limonciello (AMD) (kernel.org)
2025-10-20 17:38                 ` Mario Limonciello (AMD) (kernel.org)
2025-10-20 22:33                   ` Adrià Vilanova Martínez
2025-10-20 23:25                 ` Bjorn Helgaas
2025-10-21  7:37                   ` Lukas Wunner
2025-10-21  8:30                     ` Lukas Wunner
2025-10-21 13:35                     ` Adrià Vilanova Martínez
2025-10-22 15:30                       ` Lukas Wunner [this message]
2025-10-22 16:19                         ` Lukas Wunner
2025-10-27 16:36                           ` Adrià Vilanova Martínez
2025-10-28 14:30                             ` Adrià Vilanova Martínez
2025-10-27 15:49                         ` Adrià Vilanova Martínez

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=aPj4kUglHgBm4uAt@wunner.de \
    --to=lukas@wunner.de \
    --cc=bhelgaas@google.com \
    --cc=helgaas@kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=me@avm99963.com \
    --cc=regressions@lists.linux.dev \
    --cc=superm1@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