From: Sonny Rao Date: Mon, 10 May 2010 15:13:41 +0000 (+0000) Subject: powerpc/pci: Check devices status property when scanning OF tree X-Git-Tag: v2.6.34.13~138 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=f1f8529d1c288ff6487fb76a6947d0804cebdb8f;p=karo-tx-linux.git 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 Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Paul Gortmaker --- diff --git a/arch/powerpc/kernel/pci_of_scan.c b/arch/powerpc/kernel/pci_of_scan.c index cd11d5ca80df..6ddb795f83e8 100644 --- a/arch/powerpc/kernel/pci_of_scan.c +++ b/arch/powerpc/kernel/pci_of_scan.c @@ -310,6 +310,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", ®len); if (reg == NULL || reglen < 20) continue;