On Sat, Feb 08, 2025 at 05:50:04AM +0100, Lukas Wunner wrote: > On Fri, Feb 07, 2025 at 12:43:10PM -0800, Keith Busch wrote: > > The spec does not provide any upper limit to how long a device may > > return Request Retry Status. It just says "Some devices require a > > lengthy self-initialization sequence to complete". The kernel > > arbitrarily chose 60 seconds since that really ought to be enough. But > > there are devices where this turns out not to be enough. > > > > Since any timeout choice would be arbitrary, and 60 seconds is generally > > more than enough for the majority of hardware, let's make this a > > parameter so an admin can adjust it specifically to their needs if the > > default timeout isn't appropriate. > > There are d3hot_delay and d3cold_delay members in struct pci_dev. > How about adding a reset_delay which can be set in a device-specific > quirk? I think I'd prefer that over a command line parameter. > > A D3cold -> D0 transition implies a reset, but I'm not sure it's > appropriate to (ab)use d3cold_delay as a reset_delay. My concern with quirking it is that we'd have to settle on what we think is the worst case timeout, then it becomes compiled into that kernel for that device. The devices I'm dealing with are actively under development, and the time to ready gets bigger or smaller as updates occur, or some new worst case scenario is discovered. Making this a boot time decicion really helps with experimentation here.