summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorSonny Rao <sonnyrao@us.ibm.com>2010-05-10 15:13:41 +0000
committerGreg Kroah-Hartman <gregkh@suse.de>2011-11-07 12:31:53 -0800
commitce59b9c3178f2786f08ce424d1db712dc1e6bc06 (patch)
tree144a2b2ba9d29263584c940dcd7cd8b623998f9f /arch
parent1badd98ea79b7b20fb4ddfea110d1bb99c33a55f (diff)
powerpc/pci: Check devices status property when scanning OF tree
commit 5b339bdf164d8aee394609768f7e2e4415b0252a upstream. We ran into an issue where it looks like we're not properly ignoring a pci device with a non-good status property when we walk the device tree and instanciate the Linux side PCI devices. However, the EEH init code does look for the property and disables EEH on these devices. This leaves us in an inconsistent where we are poking at a supposedly bad piece of hardware and RTAS will block our config cycles because EEH isn't enabled anyway. Signed-of-by: Sonny Rao <sonnyrao@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/kernel/pci_of_scan.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/pci_of_scan.c b/arch/powerpc/kernel/pci_of_scan.c
index 7311fdfb9bf8..59a70f10df36 100644
--- a/arch/powerpc/kernel/pci_of_scan.c
+++ b/arch/powerpc/kernel/pci_of_scan.c
@@ -300,6 +300,8 @@ static void __devinit __of_scan_bus(struct device_node *node,
/* Scan direct children */
for_each_child_of_node(node, child) {
pr_debug(" * %s\n", child->full_name);
+ if (!of_device_is_available(child))
+ continue;
reg = of_get_property(child, "reg", &reglen);
if (reg == NULL || reglen < 20)
continue;