[PATCH v2 05/16] PCI: acpiphp: Use pci_assign_unassigned_slot_resources()
From: Ilpo Järvinen
Date: Fri Nov 20 2026 - 08:50:58 EST
enable_slot() calls the internal sizing and assignment functions
directly to size only the bridges in the slot. Use
pci_assign_unassigned_slot_resources() instead.
Sizing now happens after scanning all bridges in the slot instead of
right after scanning each bridge. Sizing a bridge window only walks the
hierarchy below that bridge, so the order does not matter. Sizing now
also holds pci_bus_sem.
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@xxxxxxxxxxxxxxx>
Cc: stable@xxxxxxxxxxxxxxx
---
drivers/pci/hotplug/acpiphp_glue.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c
index 632344f34cae..fc95d5814ecb 100644
--- a/drivers/pci/hotplug/acpiphp_glue.c
+++ b/drivers/pci/hotplug/acpiphp_glue.c
@@ -497,7 +497,6 @@ static void enable_slot(struct acpiphp_slot *slot, bool bridge)
acpiphp_native_scan_bridge(dev);
}
} else {
- LIST_HEAD(add_list);
int max, pass;
acpiphp_rescan_slot(slot);
@@ -511,12 +510,10 @@ static void enable_slot(struct acpiphp_slot *slot, bool bridge)
if (pass && dev->subordinate) {
check_hotplug_bridge(slot, dev);
pcibios_resource_survey_bus(dev->subordinate);
- __pci_bus_size_bridges(dev->subordinate,
- &add_list);
}
}
}
- __pci_bus_assign_resources(bus, &add_list, NULL);
+ pci_assign_unassigned_slot_resources(bus, slot->device);
}
acpiphp_sanitize_bus(bus);
--
2.47.3