Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PCI: Perform reset_resource() and build fail list in sync
Resetting a resource is problematic as it prevents attempting to allocate the resource later, unless something in between restores the resource. Similarly, if fail_head does not contain all resources that were reset, those resources cannot be restored later. The entire reset/restore cycle adds complexity and leaving resources in the reset state causes issues to other code such as for checks done in pci_enable_resources(). Take a small step towards not resetting resources by delaying reset until the end of resource assignment and build failure list (fail_head) in sync with the reset to avoid leaving behind resources that cannot be restored (for the case where the caller provides fail_head in the first place to allow restore somewhere in the callchain, as is not all callers pass non-NULL fail_head). Leave the Expansion ROM check temporarily in place while building the failure list until an upcoming change that reworks optional resource handling. Ideally, whole resource reset could be removed but doing that in one step would be non-tractable due to complexity of all related code. Link: https://lore.kernel.org/r/20241216175632.4175-25-ilpo.jarvinen@linux.intel.com Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Tested-by: Xiaochun Lee <lixc17@lenovo.com>
- Loading branch information