Re: [PATCH 2/3] PCI: Introduce per-device reset_ready_poll override

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2020-02-24 at 08:34 -0600, Bjorn Helgaas wrote:
> I like the factoring out of the timeout, since all callers of
> pci_dev_wait() supply the same value.  That could be its own separate
> preliminary patch...

Agreed. The next version of this patch series will do the refactor separately.

I am thinking we might also want to replace the "reset_type" with an enum
that indexes into an array to get the string, but -- more importantly --
indexes into an array of per-device overrides for the various reset types.
As per discussion on PATCH 1, I noticed the ACPI _DSM method detailed in
PCI Firmware Spec r3.2, 4.6.9 can provide individual delay values for five
different scenarios (Conventional Reset, DL_Up, FLR, D3hot to D0, VF Enable),
so we should probably store each of them in struct pci_dev.

> I'm a little wary of "lowering the global default post-reset timeout"
> because that's not safe in general.  For example, a hot-added device
> that is completely spec compliant regarding post-reset timing may not
> work correctly if we've lowered a global timeout.
> 

That makes sense. However, the timeout is currently 1 minute.
The only user of this value is pci_dev_wait(), which is itself
only invoked as part of various resets. Are there any scenarios
where that much time is truly needed after a device reset?





Amazon Development Center Germany GmbH
Krausenstr. 38
10117 Berlin
Geschaeftsfuehrung: Christian Schlaeger, Jonathan Weiss
Eingetragen am Amtsgericht Charlottenburg unter HRB 149173 B
Sitz: Berlin
Ust-ID: DE 289 237 879






[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux