Message ID | 20141210050238.14156.80403.stgit@thinktux.in.ibm.com |
---|---|
State | Accepted |
Headers | show |
On Wed, 2014-12-10 at 10:32 +0530, Ananth N Mavinakayanahalli wrote: > 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. That will do for now, though I'm not sure what's supposed to happen when we have a second FSP to take over but let's ignore that :-) Ack. > Signed-off-by: Ananth N Mavinakayanahalli <ananth@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, > > _______________________________________________ > Skiboot mailing list > Skiboot@lists.ozlabs.org > https://lists.ozlabs.org/listinfo/skiboot
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,
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> --- hw/fsp/fsp.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)