Skip to content

Commit

Permalink
PCI: Don't auto-realloc if we're preserving firmware config
Browse files Browse the repository at this point in the history
Prevent auto-enabling of bridges reallocation when the FW tells us that the
initial configuration must be preserved for a given host bridge.

Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Benjamin Herrenschmidt <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
  • Loading branch information
ozbenh authored and bjorn-helgaas committed Jun 21, 2019
1 parent a78cf96 commit 7ac0d09
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/pci/setup-bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -1684,10 +1684,15 @@ static enum enable_type pci_realloc_detect(struct pci_bus *bus,
enum enable_type enable_local)
{
bool unassigned = false;
struct pci_host_bridge *host;

if (enable_local != undefined)
return enable_local;

host = pci_find_host_bridge(bus);
if (host->preserve_config)
return auto_disabled;

pci_walk_bus(bus, iov_resources_unassigned, &unassigned);
if (unassigned)
return auto_enabled;
Expand Down

0 comments on commit 7ac0d09

Please sign in to comment.