diff options
author | Alistair Popple <alistair@popple.id.au> | 2017-05-09 18:00:52 +1000 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2017-05-10 14:32:27 +1000 |
commit | 8b1df791543bd0c390df01463a1601d4b5eb67ea (patch) | |
tree | eccff05efcfe680e7a79b4033480d82e44c5eb3c /core/pci.c | |
parent | e5f672430e0848c596c784dcc9d97c97ea36be79 (diff) | |
download | blackbird-skiboot-8b1df791543bd0c390df01463a1601d4b5eb67ea.tar.gz blackbird-skiboot-8b1df791543bd0c390df01463a1601d4b5eb67ea.zip |
core/pci.c: Don't reserve PCI slots for non-pluggable slots
If a downstream PCIe link is down we currently reserve a number of
busses for hot pluggable devices. However we do not need to do this
when we know a slot is not hotplug capable.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
Acked-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'core/pci.c')
-rw-r--r-- | core/pci.c | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -751,13 +751,16 @@ uint8_t pci_scan_bus(struct phb *phb, uint8_t bus, uint8_t max_bus, max_sub = pci_scan_bus(phb, next_bus, max_bus, &pd->children, pd, true); } else if (!use_max) { - /* XXX Empty bridge... we leave room for hotplug - * slots etc.. but we should be smarter at figuring - * out if this is actually a hotpluggable one + /* Empty bridge. We leave room for hotplug + * slots if the downstream port is pluggable. */ - max_sub = next_bus + 4; - if (max_sub > max_bus) - max_sub = max_bus; + if (pd->slot && !pd->slot->pluggable) + max_sub = next_bus; + else { + max_sub = next_bus + 4; + if (max_sub > max_bus) + max_sub = max_bus; + } } /* Update the max subordinate as described previously */ |