[PATCH 3/4] pci: Do not auto-enable PCI reallocation when _DSM #5 returns 0

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

 



This prevents auto-enabling of bridges reallocation when the FW tells
us that the initial configuration must be preserved for a given host
bridge.

Signed-off-by: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/pci/setup-bus.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
index 0cdd5ff389de..049a5602b942 100644
--- a/drivers/pci/setup-bus.c
+++ b/drivers/pci/setup-bus.c
@@ -1684,10 +1684,16 @@ static enum enable_type pci_realloc_detect(struct pci_bus *bus,
 					   enum enable_type enable_local)
 {
 	bool unassigned = false;
+	struct pci_host_bridge *hb;
 
 	if (enable_local != undefined)
 		return enable_local;
 
+	/* Don't realloc if ACPI tells us not to */
+	hb = pci_find_host_bridge(bus);
+	if (hb->preserve_config)
+		return auto_disabled;
+
 	pci_walk_bus(bus, iov_resources_unassigned, &unassigned);
 	if (unassigned)
 		return auto_enabled;
-- 
2.17.1




[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