PCI: pciehp / thunderbolt: Fix resume with a slow Thunderbolt host link
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 4 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | PCI: pciehp: Defer device replacement handling until ->resume()drivers/ | +24 | 0 replies | |
| 2/2 | thunderbolt: Don't resume the software CM if the host controller is gonedrivers/ | +13 | 4 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/2] PCI: pciehp / thunderbolt: Fix resume with a slow Thunderbolt host link
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
Signature · 1 line
2.54.0