Patchwork [2/2] powerpc/eeh: More accurate log

login
register
mail settings
Submitter Gavin Shan
Date Nov. 12, 2013, 6:49 a.m.
Message ID <1384238962-13170-2-git-send-email-shangw@linux.vnet.ibm.com>
Download mbox | patch
Permalink /patch/290543/
State Accepted, archived
Commit 0b5381a61821d1c074c76e01b27bf5f69cf2dd01
Headers show

Comments

Gavin Shan - Nov. 12, 2013, 6:49 a.m.
We possibly has fenced PHB except frozen PE. So the output log
doesn't cover all cases and the patch fixes it.

Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
---
 arch/powerpc/kernel/eeh_event.c |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

Patch

diff --git a/arch/powerpc/kernel/eeh_event.c b/arch/powerpc/kernel/eeh_event.c
index d27c5af..72d748b 100644
--- a/arch/powerpc/kernel/eeh_event.c
+++ b/arch/powerpc/kernel/eeh_event.c
@@ -74,8 +74,13 @@  static int eeh_event_handler(void * dummy)
 		pe = event->pe;
 		if (pe) {
 			eeh_pe_state_mark(pe, EEH_PE_RECOVERING);
-			pr_info("EEH: Detected PCI bus error on PHB#%d-PE#%x\n",
-				 pe->phb->global_number, pe->addr);
+			if (pe->type & EEH_PE_PHB)
+				pr_info("EEH: Detected error on PHB#%d\n",
+					 pe->phb->global_number);
+			else
+				pr_info("EEH: Detected PCI bus error on "
+					"PHB#%d-PE#%x\n",
+					pe->phb->global_number, pe->addr);
 			eeh_handle_event(pe);
 			eeh_pe_state_clear(pe, EEH_PE_RECOVERING);
 		} else {