mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
PCI: Make rescan bus increase bridge resource size if needed
Current rescan will not touch bridge MMIO and IO. Try to reuse pci_assign_unassigned_bridge_resources(bridge) to update bridge resources, if child devices need more resources. Only do that for bridges whose children are all removed already; i.e. don't release resources that could already be in use by drivers on child devices. Signed-off-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
This commit is contained in:
parent
8424d7592e
commit
2f320521a0
3 changed files with 30 additions and 1 deletions
|
@ -366,7 +366,10 @@ dev_bus_rescan_store(struct device *dev, struct device_attribute *attr,
|
|||
|
||||
if (val) {
|
||||
mutex_lock(&pci_remove_rescan_mutex);
|
||||
pci_rescan_bus(bus);
|
||||
if (!pci_is_root_bus(bus) && list_empty(&bus->devices))
|
||||
pci_rescan_bus_bridge_resize(bus->self);
|
||||
else
|
||||
pci_rescan_bus(bus);
|
||||
mutex_unlock(&pci_remove_rescan_mutex);
|
||||
}
|
||||
return count;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue