Re: [PATCH v2] PCI/DPC: Increase recovery timeout to 60 seconds
From: Creeley, Brett
Date: Fri Dec 04 2026 - 12:19:24 EST
On 12/4/2026 2:44 AM, Lukas Wunner wrote:
Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
[cc += Brett]
Thanks for the pointer, appreciate it.
Brett
On Fri, Nov 06, 2026 at 04:56:55PM +0800, Ziyou Wang (Lenovo) wrote:
+++ b/drivers/pci/pci.cPlease delete the code comment above the #define (since you're
@@ -80,7 +80,6 @@ struct pci_pme_device {
* limit, but 60 sec ought to be enough for any device to become
* responsive.
*/
-#define PCIE_RESET_READY_POLL_MS 60000 /* msec */
moving it to drivers/pci/pci.h).
+++ b/drivers/pci/pcie/dpc.cAfter this patch is applied, nobody will understand "The 4 second
@@ -116,12 +116,13 @@ bool pci_dpc_recovered(struct pci_dev *pdev)
return false;
/*
- * Need a timeout in case DPC never completes due to failure of
- * dpc_wait_rp_inactive(). The spec doesn't mandate a time limit,
- * but reports indicate that DPC completes within 4 seconds.
+ * Wait for DPC recovery completion. Use PCIE_RESET_READY_POLL_MS
+ * (60s) to match pci_dev_wait() timeout. Some devices need >5 seconds
+ * to recover after DPC containment. The 4 second timeout is too short.
*/
timeout is too short" unless they dig around in the git history.
The "(60s)" is problematic because it needs to be updated whenever
PCIE_RESET_READY_POLL_MS changes.
pci_dev_wait() doesn't use PCIE_RESET_READY_POLL_MS.
pci_bridge_wait_for_secondary_bus() does.
How about a one line change à la:
- * but reports indicate that DPC completes within 4 seconds.Thanks,
+ * so use the same timeout as pci_bridge_wait_for_secondary_bus().
Lukas