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 22/23] x86, PCI: add __pcibios_scan_specific_bus that can skip bus_add
Date
So could insert pci_assign_unassigned_bus_resources() before do bus_add.

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

diff --git a/arch/x86/pci/legacy.c b/arch/x86/pci/legacy.c
index a1df191..aab0e41 100644
--- a/arch/x86/pci/legacy.c
+++ b/arch/x86/pci/legacy.c
@@ -34,25 +34,32 @@ int __init pci_legacy_init(void)
return 0;
}

-void __devinit pcibios_scan_specific_bus(int busn)
+static __devinit struct pci_bus *__pcibios_scan_specific_bus(int busn,
+ bool bus_add)
{
int devfn;
long node;
u32 l;

- if (pci_find_bus(0, busn))
- return;
-
node = get_mp_bus_to_node(busn);
for (devfn = 0; devfn < 256; devfn += 8) {
if (!raw_pci_read(0, busn, devfn, PCI_VENDOR_ID, 2, &l) &&
l != 0x0000 && l != 0xffff) {
DBG("Found device at %02x:%02x [%04x]\n", busn, devfn, l);
printk(KERN_INFO "PCI: Discovered peer bus %02x\n", busn);
- pci_scan_bus_on_node(busn, &pci_root_ops, node);
- return;
+ return __pci_scan_bus_on_node(busn, &pci_root_ops, node,
+ bus_add);
}
}
+
+ return NULL;
+}
+void __devinit pcibios_scan_specific_bus(int busn)
+{
+ if (pci_find_bus(0, busn))
+ return;
+
+ __pcibios_scan_specific_bus(busn, true);
}
EXPORT_SYMBOL_GPL(pcibios_scan_specific_bus);

--
1.7.7


\
 
 \ /
  Last update: 2012-03-06 08:21    [W:0.248 / U:1.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site