[Skiboot] [PATCH] FSP: Improve timeout message

Vasant Hegde hegdevasant at linux.vnet.ibm.com
Tue Jun 13 14:42:16 AEST 2017


Presently we print word0 and word1 in error log. word0 contains
sequence number and command class. One has to understand word0
format to identify command class.

Lets explicitly print command class, sub command etc. Also remove
duplicate logs (both prlog and log_simple_error logs message to
OPAL console).

CC: Ananth N Mavinakayanahalli <ananth at linux.vnet.ibm.com>
Signed-off-by: Vasant Hegde <hegdevasant at linux.vnet.ibm.com>
---
 hw/fsp/fsp.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/hw/fsp/fsp.c b/hw/fsp/fsp.c
index 162d9b4..4a8eaee 100644
--- a/hw/fsp/fsp.c
+++ b/hw/fsp/fsp.c
@@ -2168,8 +2168,8 @@ static void fsp_timeout_poll(void *data __unused)
 			w1 = req->word1;
 			mstate = req->state;
 			prlog(PR_WARNING, "FSP: Response from FSP timed out,"
-			      " word0 = %x, word1 = %x state: %d\n",
-			      w0, w1, mstate);
+			      " cmd = %x subcmd = %x mod = %x state: %d\n",
+			      w0 & 0xff, w1 & 0xff, (w1 >> 8) & 0xff, mstate);
 			fsp_reg_dump();
 			fsp_cmdclass_resp_bitmask &= ~(1ull << index);
 			cmdclass->timesent = 0;
@@ -2180,8 +2180,9 @@ static void fsp_timeout_poll(void *data __unused)
 			unlock(&fsp_lock);
 			fsp_hir_reason_plid = log_simple_error(
 				&e_info(OPAL_RC_FSP_POLL_TIMEOUT),
-				"FSP: Response from FSP timed out, word0 = %x,"
-				"word1 = %x state: %d\n", w0, w1, mstate);
+				"FSP: Response from FSP timed out,"
+				" cmd = %x subcmd = %x mod = %x state: %d\n",
+				w0 & 0xff, w1 & 0xff, (w1 >> 8) & 0xff, mstate);
 		}
 	next_bit:
 		cmdclass_resp_bitmask = cmdclass_resp_bitmask >> 1;
-- 
2.9.3



More information about the Skiboot mailing list