On Sat, Sep 19, 2015 at 7:11 PM, Bjorn Helgaas <bhelgaas@xxxxxxxxxx> wrote: > On Sat, Sep 19, 2015 at 3:58 PM, Yinghai Lu <yinghai@xxxxxxxxxx> wrote: >> On Thu, Sep 17, 2015 at 2:11 PM, Tang, Jason (ES) <Jason.Tang2@xxxxxxx> wrote: >>> This introduces a new kernel command line parameter, "hpbuses", that >>> allows the user to set how many bus numbers to reserve for hotplug >>> bridges. The default value is 0, which means do not reserve any bus >>> numbers for bridges that are hot-added after enumeration completes. >>> >>> During device probing, increment a hotplug bridge's subordinate bus >>> number by the amount set by "hpbuses". This way, bridges that are >>> hot-added after enumeration can have buses reserved for them. >> >>> diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c >>> index 58ae892..553b345 100644 >>> --- a/drivers/pci/probe.c >>> +++ b/drivers/pci/probe.c >>> @@ -930,6 +930,8 @@ int pci_scan_bridge(struct pci_bus *bus, struct pci_dev *dev, int max, int pass) >>> /* >>> * Set the subordinate bus number to its real value. >>> */ >>> + if (child->self->is_hotplug_bridge) >>> + max += pci_hotplug_buses; >>> child->subordinate = max; >>> pci_bus_update_busn_res_end(child, child->subordinate); >>> pci_write_config_byte(dev, PCI_SUBORDINATE_BUS, >> >> No, you can not increase the max blindly. > > It would be really useful if you could explain *why* this doesn't > work. Then Jason might be able to rework it so it would work. from bus [old_max, old_max+pci_hotplug_buses) could be used by other bridges, and other bridges could even get probed yet. Also it could even cross the boundary to other peer root bus range. -- 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