BAR resizing calls to pci_reassign_bridge_resources() that attempts to release any upstream bridge window to allow them to accommodate the new BAR size. The release can only be performed if there are no other child resources for the bridge window. The code just silently continues when this condition is detects.
Add pci_warn() to inform user that a bridge window could not be released because of child resources. As too small bridge window is often the reason why the BAR resize cannot succeed, this warning will help to pinpoint to the cause. Signed-off-by: Ilpo Järvinen <ilpo.jarvi...@linux.intel.com> --- drivers/pci/setup-bus.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index 5ef6362b5166..55289cd58e2c 100644 --- a/drivers/pci/setup-bus.c +++ b/drivers/pci/setup-bus.c @@ -2556,6 +2556,10 @@ int pbus_reassign_bridge_resources(struct pci_bus *bus, struct resource *res) goto cleanup; pci_release_resource(bridge, i); + } else { + pci_warn(bridge, + "%s %pR: was not released (still contains assigned resources)\n", + res_name, res); } bus = bus->parent; -- 2.39.5