summaryrefslogtreecommitdiff
path: root/arch/powerpc/platforms/powernv
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2016-07-08 09:37:17 +0300
committerMichael Ellerman <mpe@ellerman.id.au>2016-07-17 09:42:49 +0300
commit08a45b320a0ec76866acca7db2fe2647387e5c21 (patch)
treed52230dd5d911385138dd03357774181de5a3c65 /arch/powerpc/platforms/powernv
parenta1339faf72ac0d90797516ad0996cec18fe534b5 (diff)
downloadlinux-08a45b320a0ec76866acca7db2fe2647387e5c21.tar.xz
powerpc/powernv/pci: Check status of a PHB before using it
If the firmware encounters an error (internal or HW) during initialization of a PHB, it might leave the device-node in the tree but mark it disabled using the "status" property. We should check it. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/platforms/powernv')
-rw-r--r--arch/powerpc/platforms/powernv/pci-ioda.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c
index ed27f4cb28ca..891fc4a453df 100644
--- a/arch/powerpc/platforms/powernv/pci-ioda.c
+++ b/arch/powerpc/platforms/powernv/pci-ioda.c
@@ -3516,6 +3516,9 @@ static void __init pnv_pci_init_ioda_phb(struct device_node *np,
void *aux;
long rc;
+ if (!of_device_is_available(np))
+ return;
+
pr_info("Initializing %s PHB (%s)\n",
pnv_phb_names[ioda_type], of_node_full_name(np));