diff options
Diffstat (limited to 'arch/powerpc/kernel/pci-common.c')
-rw-r--r-- | arch/powerpc/kernel/pci-common.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c index 37d512d35943..2a525c938158 100644 --- a/arch/powerpc/kernel/pci-common.c +++ b/arch/powerpc/kernel/pci-common.c | |||
@@ -1184,6 +1184,8 @@ static void pcibios_allocate_bus_resources(struct pci_bus *bus) | |||
1184 | pr, (pr && pr->name) ? pr->name : "nil"); | 1184 | pr, (pr && pr->name) ? pr->name : "nil"); |
1185 | 1185 | ||
1186 | if (pr && !(pr->flags & IORESOURCE_UNSET)) { | 1186 | if (pr && !(pr->flags & IORESOURCE_UNSET)) { |
1187 | struct pci_dev *dev = bus->self; | ||
1188 | |||
1187 | if (request_resource(pr, res) == 0) | 1189 | if (request_resource(pr, res) == 0) |
1188 | continue; | 1190 | continue; |
1189 | /* | 1191 | /* |
@@ -1193,6 +1195,11 @@ static void pcibios_allocate_bus_resources(struct pci_bus *bus) | |||
1193 | */ | 1195 | */ |
1194 | if (reparent_resources(pr, res) == 0) | 1196 | if (reparent_resources(pr, res) == 0) |
1195 | continue; | 1197 | continue; |
1198 | |||
1199 | if (dev && i < PCI_BRIDGE_RESOURCE_NUM && | ||
1200 | pci_claim_bridge_resource(dev, | ||
1201 | i + PCI_BRIDGE_RESOURCES) == 0) | ||
1202 | continue; | ||
1196 | } | 1203 | } |
1197 | pr_warning("PCI: Cannot allocate resource region " | 1204 | pr_warning("PCI: Cannot allocate resource region " |
1198 | "%d of PCI bridge %d, will remap\n", i, bus->number); | 1205 | "%d of PCI bridge %d, will remap\n", i, bus->number); |
@@ -1401,7 +1408,10 @@ void pcibios_claim_one_bus(struct pci_bus *bus) | |||
1401 | (unsigned long long)r->end, | 1408 | (unsigned long long)r->end, |
1402 | (unsigned int)r->flags); | 1409 | (unsigned int)r->flags); |
1403 | 1410 | ||
1404 | pci_claim_resource(dev, i); | 1411 | if (pci_claim_resource(dev, i) == 0) |
1412 | continue; | ||
1413 | |||
1414 | pci_claim_bridge_resource(dev, i); | ||
1405 | } | 1415 | } |
1406 | } | 1416 | } |
1407 | 1417 | ||