Context |
Check |
Description |
snowpatch_ozlabs/apply_patch |
warning
|
Failed to apply on branch powerpc/merge (6b450d0404ca83dc131dadffd40c5aa6f7a603af)
|
snowpatch_ozlabs/apply_patch |
warning
|
Failed to apply on branch powerpc/next (612ee81b9461475b5a5612c2e8d71559dd3c7920)
|
snowpatch_ozlabs/apply_patch |
warning
|
Failed to apply on branch linus/master (f116b96685a046a89c25d4a6ba2da489145c8888)
|
snowpatch_ozlabs/apply_patch |
warning
|
Failed to apply on branch powerpc/fixes (d10f60ae27d26d811e2a1bb39ded47df96d7499f)
|
snowpatch_ozlabs/apply_patch |
warning
|
Failed to apply on branch linux-next (12d61c6996999e6562cbbed5f270d572248a11c5)
|
snowpatch_ozlabs/apply_patch |
fail
|
Failed to apply to any branch
|
@@ -3195,20 +3195,22 @@ static unsigned int pci_dev_count_res_mask(struct pci_dev *dev)
return res_mask;
}
-static void pci_bus_rescan_prepare(struct pci_bus *bus)
+static void pci_bus_rescan_prepare(struct pci_bus *bus, int last_bus_number)
{
struct pci_dev *dev;
if (bus->self)
pci_config_pm_runtime_get(bus->self);
+ bus->busn_res.end = last_bus_number;
+
list_for_each_entry(dev, &bus->devices, bus_list) {
struct pci_bus *child = dev->subordinate;
dev->res_mask = pci_dev_count_res_mask(dev);
if (child)
- pci_bus_rescan_prepare(child);
+ pci_bus_rescan_prepare(child, last_bus_number);
if (dev->driver &&
dev->driver->rescan_prepare)
@@ -3439,7 +3441,7 @@ unsigned int pci_rescan_bus(struct pci_bus *bus)
if (pci_can_move_bars) {
pcibios_root_bus_rescan_prepare(root);
- pci_bus_rescan_prepare(root);
+ pci_bus_rescan_prepare(root, root->busn_res.end);
pci_bus_update_immovable_range(root);
pci_bus_release_root_bridge_resources(root);
When hotplugging a bridge, the parent bus may not have [enough] reserved bus numbers. So before rescanning the bus, set its subordinate number to the maximum possible value: it is 255 when there is only one root bridge in the domain. During the PCI rescan, the subordinate bus number of every bus will be contracted to the actual value. Signed-off-by: Sergey Miroshnichenko <s.miroshnichenko@yadro.com> --- drivers/pci/probe.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)