[PATCH 0/2] PCI: pciehp / thunderbolt: Fix resume with a slow Thunderbolt host link
From: Cole Leavitt
Date: Sun Oct 18 2026 - 12:45:56 EST
On a Lenovo ThinkPad P16 Gen 3 with a discrete Intel JHL9580 (Barlow
Ridge) Thunderbolt 5 host controller below Root Port 0000:80:1b.4,
resume from suspend-to-idle intermittently hangs with a black screen.
The link to the controller is not up in time when the Root Port leaves
D3cold, pciehp concludes that the device in the slot was replaced, and
the resulting removal races with the thunderbolt driver's
->resume_noirq() callback, which dereferences tb->root_switch after
tb_stop() cleared it.
Patch 1 defers acting on the synthesized Presence Detect Changed event
in pciehp until the ->resume() phase, where the PM core serializes the
removal against the drivers below the port.
Patch 2 stops the thunderbolt software connection manager from going
through its resume sequence when nhi_resume_noirq() already found that
the host controller is gone. Without it every control channel request
fails with -ESHUTDOWN and triggers a WARN in tb_cfg_read() or
tb_cfg_write().
The patches are independent and can be applied through the PCI and
thunderbolt trees separately.
Cole Leavitt (2):
PCI: pciehp: Defer device replacement handling until ->resume()
thunderbolt: Don't resume the software CM if the host controller is
gone
drivers/pci/hotplug/pciehp_core.c | 26 ++++++++++++++++++++++++--
drivers/thunderbolt/tb.c | 13 +++++++++++++
2 files changed, 37 insertions(+), 2 deletions(-)
base-commit: 32c52ec87d6245ee2d12ed5dd509e40062939b50
--
2.54.0