[PATCH 3/5] powerpc/powernv: Avoid do complete reset for twice

Gavin Shan gwshan at linux.vnet.ibm.com
Tue Nov 25 09:38:45 AEDT 2014


For PHB complete reset case, EEH_RESET_DEACTIVATE followed by
EEH_RESET_{HOT,FUNDAMENTAL} requests are issued by EEH core.
All of them are translated to raising complete reset wrongly
and we did complete reset for twice unnecessarily for each
transaction.

The patch fixes above issue by translating the request properly.

Signed-off-by: Gavin Shan <gwshan at linux.vnet.ibm.com>
---
 arch/powerpc/platforms/powernv/eeh-ioda.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/platforms/powernv/eeh-ioda.c b/arch/powerpc/platforms/powernv/eeh-ioda.c
index 3b82384..d02a696 100644
--- a/arch/powerpc/platforms/powernv/eeh-ioda.c
+++ b/arch/powerpc/platforms/powernv/eeh-ioda.c
@@ -697,8 +697,13 @@ static int ioda_eeh_reset(struct eeh_pe *pe, int option)
 	 * reset. The side effect is that EEH core has to clear the frozen
 	 * state explicitly after BAR restore.
 	 */
-	if (pe->type & EEH_PE_PHB)
-		return ioda_eeh_phb_reset(hose, EEH_RESET_COMPLETE);
+	if (pe->type & EEH_PE_PHB) {
+		if (option == EEH_RESET_HOT ||
+		    option == EEH_RESET_FUNDAMENTAL)
+			return ioda_eeh_phb_reset(hose, EEH_RESET_COMPLETE);
+
+		return ioda_eeh_phb_reset(hose, option);
+	}
 
 	/*
 	 * The frozen PE might be caused by PAPR error injection
-- 
1.8.3.2



More information about the Linuxppc-dev mailing list