Re: [PATCH v2] PCI/DPC: Increase recovery timeout to 60 seconds

From: Bjorn Helgaas

Date: Fri Nov 06 2026 - 10:34:35 EST


On Fri, Nov 06, 2026 at 04:56:55PM +0800, Ziyou Wang (Lenovo) wrote:
> Some NVMe devices need more than 5 seconds to recover after DPC
> containment, but pci_dpc_recovered() waits only 4 seconds. If the device
> hasn't recovered by then, pciehp reports "device recovery failed" and
> the device is re-enumerated.
>
> Move PCIE_RESET_READY_POLL_MS definition from pci.c to pci.h so it can be
> used in dpc.c. Use PCIE_RESET_READY_POLL_MS (60 seconds) as the timeout
> so pciehp waits as long as pci_dev_wait() does, which is sufficient for
> all known devices.
>
> Tested with INNOGRIT NVMe SSD [1dbe:5668] with ACS Fatal error
> injection:
>
> Upstream kernel (7.3.0-master+, 4s timeout):
> [123.018691] nvme: not ready 1023ms after DPC; waiting
> [124.106690] nvme: not ready 2047ms after DPC; waiting

Was there a "not ready ... after DPC; giving up" message here?
pci_dev_wait() should log *something* about how it resolved this
situation.

> [125.642703] pciehp: Slot(64): Link Down
> [126.218696] AER: subordinate device reset failed
> [126.218700] AER: device recovery failed
> Device re-enumerated as nvme1
>
> With this patch (60s timeout):
> [74.894811] nvme: not ready 1023ms after DPC; waiting
> [75.982813] nvme: not ready 2047ms after DPC; waiting
> [78.094810] nvme: ready 4095ms after DPC
> [78.094816] nvme: restart after slot reset
> [78.111620] AER: device recovery successful
> Device works normally
>
> Fixes: a97396c6eb13 ("PCI: pciehp: Ignore Link Down/Up caused by DPC")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Ziyou Wang (Lenovo) <ziyou.dev@xxxxxxxxxxx>
> ---

30 minutes after v1 is too soon to post a v2. A couple days is a
reasonable interval.

v2 should include a note here (after the "---") about what changed
since v1 and ideally a lore link to the v1 posting.