diff options
| -rw-r--r-- | arch/microblaze/pci/pci-common.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/arch/microblaze/pci/pci-common.c b/arch/microblaze/pci/pci-common.c index b30e41c0c033..48528fb81eff 100644 --- a/arch/microblaze/pci/pci-common.c +++ b/arch/microblaze/pci/pci-common.c | |||
| @@ -1026,6 +1026,8 @@ static void pcibios_allocate_bus_resources(struct pci_bus *bus) | |||
| 1026 | pr, (pr && pr->name) ? pr->name : "nil"); | 1026 | pr, (pr && pr->name) ? pr->name : "nil"); |
| 1027 | 1027 | ||
| 1028 | if (pr && !(pr->flags & IORESOURCE_UNSET)) { | 1028 | if (pr && !(pr->flags & IORESOURCE_UNSET)) { |
| 1029 | struct pci_dev *dev = bus->self; | ||
| 1030 | |||
| 1029 | if (request_resource(pr, res) == 0) | 1031 | if (request_resource(pr, res) == 0) |
| 1030 | continue; | 1032 | continue; |
| 1031 | /* | 1033 | /* |
| @@ -1035,6 +1037,12 @@ static void pcibios_allocate_bus_resources(struct pci_bus *bus) | |||
| 1035 | */ | 1037 | */ |
| 1036 | if (reparent_resources(pr, res) == 0) | 1038 | if (reparent_resources(pr, res) == 0) |
| 1037 | continue; | 1039 | continue; |
| 1040 | |||
| 1041 | if (dev && i < PCI_BRIDGE_RESOURCE_NUM && | ||
| 1042 | pci_claim_bridge_resource(dev, | ||
| 1043 | i + PCI_BRIDGE_RESOURCES) == 0) | ||
| 1044 | continue; | ||
| 1045 | |||
| 1038 | } | 1046 | } |
| 1039 | pr_warn("PCI: Cannot allocate resource region "); | 1047 | pr_warn("PCI: Cannot allocate resource region "); |
| 1040 | pr_cont("%d of PCI bridge %d, will remap\n", i, bus->number); | 1048 | pr_cont("%d of PCI bridge %d, will remap\n", i, bus->number); |
| @@ -1227,7 +1235,10 @@ void pcibios_claim_one_bus(struct pci_bus *bus) | |||
| 1227 | (unsigned long long)r->end, | 1235 | (unsigned long long)r->end, |
| 1228 | (unsigned int)r->flags); | 1236 | (unsigned int)r->flags); |
| 1229 | 1237 | ||
| 1230 | pci_claim_resource(dev, i); | 1238 | if (pci_claim_resource(dev, i) == 0) |
| 1239 | continue; | ||
| 1240 | |||
| 1241 | pci_claim_bridge_resource(dev, i); | ||
| 1231 | } | 1242 | } |
| 1232 | } | 1243 | } |
| 1233 | 1244 | ||
