On Tue, Aug 16, 2022 at 01:07:37PM +0300, Mika Westerberg wrote: > Currently we distribute the spare resources only upon hot-add so if > there are PCI devices connected already when the initial root bus scan > is done, and they have not been fully configured by the BIOS, we may end > up allocating resources just enough to cover only what is currently > there. If some of those devices are hotplug bridges themselves we do not > leave any additional resource space for future expansion. > > For this reason distribute the available resources for root buses too to > make this work the same way we do in the normal hotplug case. > > Link: https://bugzilla.kernel.org/show_bug.cgi?id=216000 > Reported-by: Chris Chiu <chris.chiu@xxxxxxxxxxxxx> > Signed-off-by: Mika Westerberg <mika.westerberg@xxxxxxxxxxxxxxx> > --- > The diffstat is quite big here but this is due the fact that we move the > pci_assign_unassigned_root_bus_resources() below > pci_bridge_distribute_available_resources() so we can call it without > adding forward declaration. Perhaps you can split to move and actual update? -- With Best Regards, Andy Shevchenko