lkml.org 
[lkml]   [2012]   [Mar]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 23/23] x86, PCI: add pcibios_root_rescan
Date
need use it to rescan root bus that was not added via acpi probe.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
---
arch/x86/pci/legacy.c | 25 +++++++++++++++++++++++++
1 files changed, 25 insertions(+), 0 deletions(-)

diff --git a/arch/x86/pci/legacy.c b/arch/x86/pci/legacy.c
index aab0e41..7a7c78f 100644
--- a/arch/x86/pci/legacy.c
+++ b/arch/x86/pci/legacy.c
@@ -79,3 +79,28 @@ int __init pci_subsys_init(void)
return 0;
}
subsys_initcall(pci_subsys_init);
+
+void __devinit pcibios_root_rescan(void)
+{
+ int busn;
+ struct pci_bus *bus;
+
+ if (pcibios_last_bus <= 0 || pcibios_last_bus > 0xff)
+ return;
+
+ for (busn = 0; busn <= pcibios_last_bus; busn++) {
+ bus = pci_find_bus(0, busn);
+
+ if (bus)
+ continue;
+
+ bus = __pcibios_scan_specific_bus(busn, false);
+
+ if (!bus)
+ continue;
+
+ pci_assign_unassigned_bus_resources(bus);
+
+ pci_bus_add_devices(bus);
+ }
+}
--
1.7.7


\
 
 \ /
  Last update: 2012-03-06 08:21    [W:0.227 / U:1.444 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site