In pci_scan_bridge(), a newly allocated child bus's resource are added using the bus number "max+1". The current enumeration algorithm numbers each child sequentially, thus the new child's number happens to always be max+1; see the call to pci_add_new_bus() a few lines earlier. An upcoming patch will allow static enumeration, such that the new child bus's number might no longer be max+1. Thus when inserting the child's resources, use the number actually assigned to child instead of assuming that it is always max+1. Signed-off-by: Jason Tang <jason.tang2@xxxxxxx> --- drivers/pci/probe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 873030b..18bee64 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -866,7 +866,7 @@ int pci_scan_bridge(struct pci_bus *bus, struct pci_dev *dev, int max, int pass) child = pci_add_new_bus(bus, dev, max+1); if (!child) goto out; - pci_bus_insert_busn_res(child, max+1, 0xff); + pci_bus_insert_busn_res(child, child->number, 0xff); } max++; buses = (buses & 0xff000000) -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html