]> asedeno.scripts.mit.edu Git - linux.git/commit
PCI: Distribute available buses to hotplug-capable bridges
authorMika Westerberg <mika.westerberg@linux.intel.com>
Fri, 13 Oct 2017 18:35:44 +0000 (21:35 +0300)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 7 Nov 2017 00:48:59 +0000 (18:48 -0600)
commit1c02ea81006548a5cd55f7ac6df77cf8d7b08e00
tree85355a6bb5135d62bc149701211f8304eb9e06cb
parenta20c7f36bd3d20d245616ae223bb9d05dfb6f050
PCI: Distribute available buses to hotplug-capable bridges

System BIOS sometimes allocates extra bus space for hotplug-capable PCIe
root/downstream ports. This space is needed if the device plugged to the
port will have more hotplug-capable downstream ports. A good example of
this is Thunderbolt. Each Thunderbolt device contains a PCIe switch and
one or more hotplug-capable PCIe downstream ports where the daisy chain
can be extended.

Currently Linux only allocates minimal bus space to make sure all the
enumerated devices barely fit there. The BIOS reserved extra space is
not taken into consideration at all. Because of this we run out of bus
space pretty quickly when more PCIe devices are attached to hotplug
downstream ports in order to extend the chain.

Modify the PCI core so we distribute the available BIOS allocated bus space
equally between hotplug-capable bridges to make sure there is enough bus
space for extending the hierarchy later on.

Update kernel docs of the affected functions.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/probe.c