]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
powerpc/powernv: Escalate reset when IODA reset fails
authorOliver O'Halloran <oohall@gmail.com>
Fri, 1 Feb 2019 00:42:01 +0000 (11:42 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 6 Feb 2019 13:29:20 +0000 (00:29 +1100)
The IODA reset is used to flush out any OS controlled state from the PHB.
This reset can fail if a PHB fatal error has occurred in early boot,
probably due to a because of a bad device. We already do a fundemental
reset of the device in some cases, so this patch just adds a test to force
a full reset if firmware reports an error when performing the IODA reset.

Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/platforms/powernv/pci-ioda.c

index 1d6406a051f1216782094ee5bfcf9a662de9e0f1..53982f887a7f64a016a91c28cb2d911600e4662f 100644 (file)
@@ -3943,9 +3943,12 @@ static void __init pnv_pci_init_ioda_phb(struct device_node *np,
         * shutdown PCI devices correctly. We already got IODA table
         * cleaned out. So we have to issue PHB reset to stop all PCI
         * transactions from previous kernel. The ppc_pci_reset_phbs
-        * kernel parameter will force this reset too.
+        * kernel parameter will force this reset too. Additionally,
+        * if the IODA reset above failed then use a bigger hammer.
+        * This can happen if we get a PHB fatal error in very early
+        * boot.
         */
-       if (is_kdump_kernel() || pci_reset_phbs) {
+       if (is_kdump_kernel() || pci_reset_phbs || rc) {
                pr_info("  Issue PHB reset ...\n");
                pnv_eeh_phb_reset(hose, EEH_RESET_FUNDAMENTAL);
                pnv_eeh_phb_reset(hose, EEH_RESET_DEACTIVATE);