PCI: Distribute available resources for root buses, too
authorMika Westerberg <mika.westerberg@linux.intel.com>
Mon, 5 Sep 2022 08:02:30 +0000 (11:02 +0300)
committerBjorn Helgaas <bhelgaas@google.com>
Wed, 21 Sep 2022 19:47:07 +0000 (14:47 -0500)
commite96e27fc6f7971380283768e9a734af16b1716ee
tree6ed1b4d9528356e4511206cba56b4eb9cf8e8765
parentd1caf229c7587b5c514910fff8dc382e69fdcdf5
PCI: Distribute available resources for root buses, too

Previously we distributed spare resources only upon hot-add, so if the
initial root bus scan found devices that had not been fully configured by
the BIOS, we allocated only enough resources to cover what was then
present. If some of those devices were hotplug bridges, we did not leave
any additional resource space for future expansion.

Distribute the available resources for root buses, too, to make this work
the same way as the normal hotplug case.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=216000
Link: https://lore.kernel.org/r/20220905080232.36087-5-mika.westerberg@linux.intel.com
Reported-by: Chris Chiu <chris.chiu@canonical.com>
Tested-by: Chris Chiu <chris.chiu@canonical.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/pci/setup-bus.c