Linux PCI subsystem development
 help / color / mirror / Atom feed
* [PATCH] pciehp: sync interrupts for bus resets
@ 2025-08-27 22:45 Keith Busch
  2025-08-27 22:48 ` Keith Busch
  2025-08-31 13:43 ` Lukas Wunner
  0 siblings, 2 replies; 6+ messages in thread
From: Keith Busch @ 2025-08-27 22:45 UTC (permalink / raw)
  To: linux-pci; +Cc: Keith Busch, Lukas Wunner

From: Keith Busch <kbusch@kernel.org>

Synchronize the interrupt to ensure the reset isn't going to disrupt a
previously pending handler from igoring the reset's link flap. Back to
back secondary bus resets create a window when the previous reset
proceeds with DLLLA, waking the pending pciehp interrupt thread, but the
subsequent reset tears it down while the irq thread tries to confirm the
link is active, triggering unexpected re-enumeration.

Fixes: bbf10cd686835d5 ("PCI: pciehp: Ignore belated Presence Detect Changed caused by DPC")
Cc: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Keith Busch <kbusch@kernel.org>
---
 drivers/pci/hotplug/pciehp_hpc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c
index bcc51b26d03d5..f27ff20a3c34c 100644
--- a/drivers/pci/hotplug/pciehp_hpc.c
+++ b/drivers/pci/hotplug/pciehp_hpc.c
@@ -946,6 +946,7 @@ int pciehp_reset_slot(struct hotplug_slot *hotplug_slot, bool probe)
 
 	down_write_nested(&ctrl->reset_lock, ctrl->depth);
 
+	synchronize_irq(ctrl->pcie->irq);
 	pci_hp_ignore_link_change(pdev);
 
 	rc = pci_bridge_secondary_bus_reset(ctrl->pcie->port);
-- 
2.47.3


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-09-03 16:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-27 22:45 [PATCH] pciehp: sync interrupts for bus resets Keith Busch
2025-08-27 22:48 ` Keith Busch
2025-08-31 13:43 ` Lukas Wunner
2025-09-02 17:59   ` Keith Busch
2025-09-03  8:21     ` Lukas Wunner
2025-09-03 16:19       ` Keith Busch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox