From: Mika Westerberg <westeri@kernel.org>
To: Marco Sousa <marcomsousa@gmail.com>
Cc: lukas@wunner.de, superm1@kernel.org,
mika.westerberg@linux.intel.com, linux-usb@vger.kernel.org,
linux-pci@vger.kernel.org, linux-pm@vger.kernel.org,
bhelgaas@google.com, rafael@kernel.org, Shyam-sundar.S-k@amd.com,
Alexander.Kovacs@amd.com
Subject: Re: [BUG] AMD Strix Point USB4 (1022:150a): mid-s2idle pciehp hot-add causes D3cold->D0 failure and hard hang
Date: Wed, 2 Dec 2026 12:23:24 +0200 [thread overview]
Message-ID: <20261202102324.GA1056513@thinkpad> (raw)
In-Reply-To: <CAHRsBfa7kHpw0Xqujg+uqWk4OsQWVEjUt+zog_n2pFiSn2gN6A@mail.gmail.com>
Hi,
On Tue, Dec 01, 2026 at 11:40:19PM -0800, Marco Sousa wrote:
> Hi Lukas,
>
> On Tue, Dec 01, 2026 at 11:04:14PM +0100, Lukas Wunner wrote:
> > On Tue, Dec 01, 2026 at 10:52:45PM +0100, Marco Sousa wrote:
> > > - At 9.615 s, GPE 0x1A (\_GPE._L1A) DID fire once (gpe1A counter = 1)
> > > when the dock's USB2 hub woke xhci_hcd 0000:c6:00.3 (XHC3), briefly
> > > waking 0000:00:01.1 to D0 (9.617 s) and back to D3cold (9.769 s) —
> > > about 1 second BEFORE tb_tunnel_pci() activated 0:5 <-> 2:9 (PCI).
> >
> > In drivers/pci/pcie/portdrv.c, pcie_portdrv_probe() calls
> > pm_runtime_set_autosuspend_delay() with 100, which sets the default
> > delay to 100 msec before the port can runtime suspend. This can be
> > changed from user space via the power/autosuspend_delay_ms knob in
> > the PCIe port's sysfs directory.
> >
> > Does increasing the timeout to > 1 sec avoid the issue? Maybe it
> > just takes longer for the tunnel to be established and the PCI adapter
> > to see the link go up.
> >
> > It may be necessary to enforce a higher minimum delay in that case.
>
> I just tested this on stock 7.3.6-arch1-2 with power/autosuspend_delay_ms
> set to 5000 on 0000:00:01.1 (with pci-acpi.c and thunderbolt dyndbg
> enabled and my local workaround paused) by hot-unplugging the dock for
> ~20 s so everything entered D3cold, then hot-replugging it:
>
> [329.041949] pcieport 0000:00:01.1: pciehp: Slot(0): Link Down
> [329.045050] pcieport 0000:00:01.1: pciehp: Slot(0): Card not present
> [329.063469] pcieport 0000:00:01.1: PME: Spurious native interrupt!
> [329.165023] pcieport 0000:00:01.1: power state changed by ACPI to D3cold
> [329.385055] xhci_hcd 0000:c6:00.3: power state changed by ACPI to D3cold
> [347.587035] thunderbolt 0000:c6:00.5: power state changed by ACPI to D3cold
> -- replug --
> [367.049141] thunderbolt 0000:c6:00.5: power state changed by ACPI to D0
> [368.549082] thunderbolt 0-2: HP Thunderbolt Dock G4
> [368.933030] xhci_hcd 0000:c6:00.3: power state changed by ACPI to D0
> [369.160038] usb 5-1: new high-speed USB device number 14 using xhci_hcd
> [370.193830] thunderbolt 0000:c6:00.5: 0:5 <-> 2:9 (PCI): activating
> [370.194462] thunderbolt 0000:c6:00.5: PCIe Down path activation complete
> [370.195088] thunderbolt 0000:c6:00.5: PCIe Up path activation complete
>
> Result with autosuspend_delay_ms=5000:
> - 0000:00:01.1 stayed in D3cold the entire time after replug; 0000:01:00.0
> and igc (enp96s0) never enumerated.
> - Notably, gpe1A did NOT fire on replug at all (stayed at 1 from early
> boot). 0000:c6:00.5 (NHI0) and 0000:c6:00.3 (XHC3) woke from D3cold
> directly (they sit behind internal bridge 0000:00:08.3 which stays in
> D0), while 0000:00:01.1 (a Root Port itself in D3cold) never woke at
> all.
> - Also even on boot, relying on autosuspend_delay_ms to bridge an
> incidental gpe1A wake from XHC3 would still break for manual boltd
> authorization (user taking >5 s) or PCIe-only USB4 devices without a
> USB hub.
>
> Given that Mario confirmed his own Zen 5 system also omits FADT bit 14,
> and 0000:00:01.1 never gets a wake event when tb_tunnel_pci() activates
> 0:5 <-> 2:9 (PCI) from D3cold:
> 1. Would it make sense for drivers/thunderbolt (e.g. tb_tunnel_pci()
> when activating a host PCIe tunnel) to pm_request_resume() the linked
> PCIe Root Port (already discovered via usb4-host-interface in
> tb_acpi_add_link())?
It should really wake up when the PCIE tunnel is established (through
PME). As long as the root port/downstream port is marked with ACPI _DSD
HotPlugSupportInD3, and I think this is requirement for the TB/USB4
tunneled PCIe ports.
next prev parent reply other threads:[~2026-12-02 10:23 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-25 21:40 [BUG] AMD Strix Point USB4 (1022:150a): mid-s2idle pciehp hot-add causes D3cold->D0 failure and hard hang Marco Sousa
2026-11-26 6:48 ` Mika Westerberg
2026-11-28 7:55 ` Marco Sousa
2026-11-30 6:33 ` Mika Westerberg
2026-11-30 23:23 ` Mario Limonciello
2026-12-01 21:52 ` Marco Sousa
2026-12-01 22:04 ` Lukas Wunner
2026-12-02 7:40 ` Marco Sousa
2026-12-02 10:23 ` Mika Westerberg [this message]
2026-12-01 22:07 ` Mario Limonciello
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=20261202102324.GA1056513@thinkpad \
--to=westeri@kernel.org \
--cc=Alexander.Kovacs@amd.com \
--cc=Shyam-sundar.S-k@amd.com \
--cc=bhelgaas@google.com \
--cc=linux-pci@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=lukas@wunner.de \
--cc=marcomsousa@gmail.com \
--cc=mika.westerberg@linux.intel.com \
--cc=rafael@kernel.org \
--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