public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] PCI: dpc: Increase pciehp waiting time for DPC recovery
@ 2026-01-23 10:40 LeoLiu-oc
  2026-01-23 20:21 ` Bjorn Helgaas
  0 siblings, 1 reply; 11+ messages in thread
From: LeoLiu-oc @ 2026-01-23 10:40 UTC (permalink / raw)
  To: mahesh, oohall, bhelgaas, linuxppc-dev, linux-pci, linux-kernel
  Cc: CobeChen, TonyWWang, ErosZhang

Commit a97396c6eb13 ("PCI: pciehp: Ignore Link Down/Up caused by DPC")
amended PCIe hotplug to not bring down the slot upon Data Link Layer State
Changed events caused by Downstream Port Containment.

However, PCIe hotplug (pciehp) waits up to 4 seconds before assuming that
DPC recovery has failed and disabling the slot. This timeout period is
insufficient for some PCIe devices.
For example, the E810 dual-port network card driver needs to take over
10 seconds to execute its err_detected() callback.
Since this exceeds the maximum wait time allowed for DPC recovery by the
hotplug IRQ threads, a race condition occurs between the hotplug thread and
the dpc_handler() thread.

Signed-off-by: LeoLiu-oc <LeoLiu-oc@zhaoxin.com>
---
 drivers/pci/pcie/dpc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pci/pcie/dpc.c b/drivers/pci/pcie/dpc.c
index fc18349614d7..08b5f275699a 100644
--- a/drivers/pci/pcie/dpc.c
+++ b/drivers/pci/pcie/dpc.c
@@ -121,7 +121,7 @@ bool pci_dpc_recovered(struct pci_dev *pdev)
 	 * but reports indicate that DPC completes within 4 seconds.
 	 */
 	wait_event_timeout(dpc_completed_waitqueue, dpc_completed(pdev),
-			   msecs_to_jiffies(4000));
+			   msecs_to_jiffies(16000));
 
 	return test_and_clear_bit(PCI_DPC_RECOVERED, &pdev->priv_flags);
 }
-- 
2.43.0


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

end of thread, other threads:[~2026-02-06  9:00 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-23 10:40 [PATCH] PCI: dpc: Increase pciehp waiting time for DPC recovery LeoLiu-oc
2026-01-23 20:21 ` Bjorn Helgaas
2026-01-28 10:07   ` LeoLiu-oc
2026-01-28 19:48     ` Bjorn Helgaas
2026-02-02  5:55       ` LeoLiu-oc
2026-01-30 11:59     ` Lukas Wunner
2026-02-02  6:00       ` LeoLiu-oc
2026-02-02  9:02         ` Lukas Wunner
2026-02-03 11:23           ` Przemek Kitszel
2026-02-04  2:10           ` LeoLiu-oc
2026-02-06  8:13             ` LeoLiu-oc

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