All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] powerpc/powernv: Force an freset if IODA reset fails
@ 2019-01-18  4:14 Oliver O'Halloran
  0 siblings, 0 replies; only message in thread
From: Oliver O'Halloran @ 2019-01-18  4:14 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Oliver O'Halloran

The IODA reset can fail in cases where the PHB has encounted a fatal error
during early boot. Typically this is due a malfunctioning device directly below
the root complex, but can occur for other reasons. This patch fixes the problem
by forcing a reset of the PHB if we get an error back from firmware when doing
the IODA reset.

Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
---
 arch/powerpc/platforms/powernv/pci-ioda.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c
index 1d6406a..53982f8 100644
--- a/arch/powerpc/platforms/powernv/pci-ioda.c
+++ b/arch/powerpc/platforms/powernv/pci-ioda.c
@@ -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);
-- 
2.9.4


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2019-01-18  4:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-18  4:14 [PATCH] powerpc/powernv: Force an freset if IODA reset fails Oliver O'Halloran

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.