diff options
author | Ananth N Mavinakayanahalli <ananth@in.ibm.com> | 2014-12-10 10:32:38 +0530 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2014-12-10 17:50:19 +1100 |
commit | 27148cd0f998384e2e53e73cf3a001a4a2e794b7 (patch) | |
tree | f8daefd007b24dfb563efeded408e1ba23411fe0 | |
parent | 65b98fd4ce95d55285faf1efa355fda04aa94627 (diff) | |
download | skiboot-27148cd0f998384e2e53e73cf3a001a4a2e794b7.zip skiboot-27148cd0f998384e2e53e73cf3a001a4a2e794b7.tar.gz skiboot-27148cd0f998384e2e53e73cf3a001a4a2e794b7.tar.bz2 |
FSP: Reset the response outstanding bitmap on reset start
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@in.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
-rw-r--r-- | hw/fsp/fsp.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/hw/fsp/fsp.c b/hw/fsp/fsp.c index bc9131e..fcffbfd 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, |