diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2014-04-14 17:30:09 -0400 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2014-04-25 13:09:04 -0400 |
commit | 4e4ba9441fb431f3996de2454522342e0b1d9263 (patch) | |
tree | d3c3f093bcf34b5946ff9876d363491b38efa880 | |
parent | 0b2d70764bb39242dcc49c0ebd10fcb8258ce5fa (diff) |
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: Bjorn Helgaas <bhelgaas@google.com>
-rw-r--r-- | arch/x86/pci/i386.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/arch/x86/pci/i386.c b/arch/x86/pci/i386.c index db6b1ab43255..6db58d68feb5 100644 --- a/arch/x86/pci/i386.c +++ b/arch/x86/pci/i386.c | |||
@@ -271,11 +271,16 @@ static void pcibios_allocate_dev_resources(struct pci_dev *dev, int pass) | |||
271 | "BAR %d: reserving %pr (d=%d, p=%d)\n", | 271 | "BAR %d: reserving %pr (d=%d, p=%d)\n", |
272 | idx, r, disabled, pass); | 272 | idx, r, disabled, pass); |
273 | if (pci_claim_resource(dev, idx) < 0) { | 273 | if (pci_claim_resource(dev, idx) < 0) { |
274 | /* We'll assign a new address later */ | 274 | if (r->flags & IORESOURCE_PCI_FIXED) { |
275 | pcibios_save_fw_addr(dev, | 275 | dev_info(&dev->dev, "BAR %d %pR is immovable\n", |
276 | idx, r->start); | 276 | idx, r); |
277 | r->end -= r->start; | 277 | } else { |
278 | r->start = 0; | 278 | /* We'll assign a new address later */ |
279 | pcibios_save_fw_addr(dev, | ||
280 | idx, r->start); | ||
281 | r->end -= r->start; | ||
282 | r->start = 0; | ||
283 | } | ||
279 | } | 284 | } |
280 | } | 285 | } |
281 | } | 286 | } |