From: Benjamin Herrenschmidt Date: Fri, 8 Jul 2016 06:37:17 +0000 (+1000) Subject: powerpc/powernv/pci: Check status of a PHB before using it X-Git-Tag: v4.9.8~1628^2~64 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=08a45b320a0ec76866acca7db2fe2647387e5c21;p=platform%2Fkernel%2Flinux-rpi3.git 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 Signed-off-by: Michael Ellerman --- diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c index ed27f4c..891fc4a 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));