Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4e4ba944 authored by Bjorn Helgaas's avatar Bjorn Helgaas
Browse files

x86/PCI: Don't try to move IORESOURCE_PCI_FIXED resources



Don't attempt to move resource marked IORESOURCE_PCI_FIXED, even if
pci_claim_resource() fails.  In some cases, these are legacy resources that
cannot be moved.

Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
parent 0b2d7076
Loading
Loading
Loading
Loading
+10 −5
Original line number Diff line number Diff line
@@ -271,6 +271,10 @@ static void pcibios_allocate_dev_resources(struct pci_dev *dev, int pass)
					"BAR %d: reserving %pr (d=%d, p=%d)\n",
					idx, r, disabled, pass);
				if (pci_claim_resource(dev, idx) < 0) {
					if (r->flags & IORESOURCE_PCI_FIXED) {
						dev_info(&dev->dev, "BAR %d %pR is immovable\n",
							 idx, r);
					} else {
						/* We'll assign a new address later */
						pcibios_save_fw_addr(dev,
								idx, r->start);
@@ -279,6 +283,7 @@ static void pcibios_allocate_dev_resources(struct pci_dev *dev, int pass)
					}
				}
			}
		}
	if (!pass) {
		r = &dev->resource[PCI_ROM_RESOURCE];
		if (r->flags & IORESOURCE_ROM_ENABLE) {