Re: [PATCH RFC 0/3] PCI: Allow a device more time for its link to return after a reset

From: Lukas Wunner

Date: Thu Dec 03 2026 - 03:45:24 EST


On Wed, Dec 02, 2026 at 04:43:25PM -0800, Brett Creeley wrote:
> - Is a device quirk the right place for this, rather than having the
> device's driver set the value at probe? A quirk covers the card even
> when no driver is bound to its functions, and it is set before any
> driver probes.

It's the right place.

> - Should the core cap link_up_timeout (e.g. at
> PCIE_RESET_READY_POLL_MS), or is the quirk's value trusted as is?

It's trusted.

> - Hotplug-capable slots are not handled yet. Vulcano cards are deployed
> in slots that support hotplug, and there pciehp waits only 4 s in
> pci_dpc_recovered() for DPC recovery before treating the Link Down as
> a removal, so a ~12 s outage still ends in the card being torn down.
> That wait covers the DPC recovery which, with this series, already
> includes link_up_timeout, so one possible approach is to reuse the
> same field: have pci_dpc_recovered() extend its 4 s by the amount a
> quirked device below the port adds to the link-up wait, leaving other
> devices unchanged. Bjorn has suggested instead that this wait match
> PCIE_RESET_READY_POLL_MS for everyone [2]. Which would you prefer?
> This part is not implemented or tested yet.

I don't really know.

> - Ports at or below 5 GT/s still use the fixed 1 s budget. Is it worth
> extending that path too, or is it fine to leave it until a device
> needs it?

Leave it until a need arises.

I'm wondering if it would be possible to detect in the driver's
->error_detected() callback that the card is undergoing a power cycle,
wait 12 sec if so, then when dpc_reset_link() brings the port out of
containment, the link comes back quicker? Maybe the ->error_detected()
callback has a way to talk to some OOB management controller on the card
to detect a power cycle?

Thanks,

Lukas