[Skiboot] [PATCH V2] FSP: Reset the response outstanding bitmap on reset start

Ananth N Mavinakayanahalli ananth at in.ibm.com
Wed Dec 10 16:02:38 AEDT 2014


Once we have the FSP in reset, we don't expect it to respond to any
outstanding mbox commands for which we are expecting one. Reset the
bitmap to reflect the same.

While there, remove the stale comment about timeout resets. We use
the fsp_cmdclass->timeout as a constant for all classes and a value
0 indicates an invalid class entry in the discontiguous fsp_cmdclass[].
The bitmap is what gates whether we process outstanding messages in
the class.

Signed-off-by: Ananth N Mavinakayanahalli <ananth at in.ibm.com>
---
 hw/fsp/fsp.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/hw/fsp/fsp.c b/hw/fsp/fsp.c
index 1bc236c..527991a 100644
--- a/hw/fsp/fsp.c
+++ b/hw/fsp/fsp.c
@@ -349,13 +349,17 @@ static void fsp_reset_cmdclass(void)
 	int i;
 	struct fsp_msg *msg;
 
+	/*
+	 * The FSP is in reset and hence we can't expect any response
+	 * to outstanding messages that we've already sent. Clear the
+	 * bitmap to reflect that.
+	 */
+	fsp_cmdclass_resp_bitmask = 0;
 	for (i = 0; i <= (FSP_MCLASS_LAST - FSP_MCLASS_FIRST); i++) {
 		struct fsp_cmdclass *cmdclass = &fsp_cmdclass[i];
 		cmdclass->busy = false;
 		cmdclass->timesent = 0;
 
-		/* We also need to reset the 'timeout' timers here */
-
 		/* Make sure the message queue is empty */
 		while(!list_empty(&cmdclass->msgq)) {
 			msg = list_pop(&cmdclass->msgq, struct fsp_msg,



More information about the Skiboot mailing list