aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/probe.c
diff options
context:
space:
mode:
authorYinghai Lu <yinghai@kernel.org>2012-01-21 05:08:23 -0500
committerJesse Barnes <jbarnes@virtuousgeek.org>2012-02-14 11:44:53 -0500
commit9b03088f955552299f50a1f660372698b07ab339 (patch)
tree4cc4a7d8059186eca4b20a9733f3c0954ff09d96 /drivers/pci/probe.c
parent2f320521a0d2d11fb857be09d05e2fbbf3ef8c13 (diff)
PCI: Make pci_rescan_bus handle add_list
This allows us to allocate resources to hotplug bridges during remove/rescan. We need to move the function to setup-bus.c so it can use __pci_bus_size_bridges and __pci_bus_assign_resources directly to take the add_list resource tracking list. Signed-off-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci/probe.c')
-rw-r--r--drivers/pci/probe.c32
1 files changed, 0 insertions, 32 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 0e84e8c2a6d..aad7d0ff6b0 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -1691,38 +1691,6 @@ unsigned int __ref pci_rescan_bus_bridge_resize(struct pci_dev *bridge)
1691 return max; 1691 return max;
1692} 1692}
1693 1693
1694/**
1695 * pci_rescan_bus - scan a PCI bus for devices.
1696 * @bus: PCI bus to scan
1697 *
1698 * Scan a PCI bus and child buses for new devices, adds them,
1699 * and enables them.
1700 *
1701 * Returns the max number of subordinate bus discovered.
1702 */
1703unsigned int __ref pci_rescan_bus(struct pci_bus *bus)
1704{
1705 unsigned int max;
1706 struct pci_dev *dev;
1707
1708 max = pci_scan_child_bus(bus);
1709
1710 down_read(&pci_bus_sem);
1711 list_for_each_entry(dev, &bus->devices, bus_list)
1712 if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE ||
1713 dev->hdr_type == PCI_HEADER_TYPE_CARDBUS)
1714 if (dev->subordinate)
1715 pci_bus_size_bridges(dev->subordinate);
1716 up_read(&pci_bus_sem);
1717
1718 pci_bus_assign_resources(bus);
1719 pci_enable_bridges(bus);
1720 pci_bus_add_devices(bus);
1721
1722 return max;
1723}
1724EXPORT_SYMBOL_GPL(pci_rescan_bus);
1725
1726EXPORT_SYMBOL(pci_add_new_bus); 1694EXPORT_SYMBOL(pci_add_new_bus);
1727EXPORT_SYMBOL(pci_scan_slot); 1695EXPORT_SYMBOL(pci_scan_slot);
1728EXPORT_SYMBOL(pci_scan_bridge); 1696EXPORT_SYMBOL(pci_scan_bridge);