From patchwork Wed Dec 10 05:02:38 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ananth N Mavinakayanahalli X-Patchwork-Id: 419397 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 37450140079 for ; Wed, 10 Dec 2014 15:59:12 +1100 (AEDT) Received: from ozlabs.org (ozlabs.org [103.22.144.67]) by lists.ozlabs.org (Postfix) with ESMTP id 242921A0834 for ; Wed, 10 Dec 2014 15:59:12 +1100 (AEDT) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Received: from e23smtp07.au.ibm.com (e23smtp07.au.ibm.com [202.81.31.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 76D921A05C8 for ; Wed, 10 Dec 2014 15:59:09 +1100 (AEDT) Received: from /spool/local by e23smtp07.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 10 Dec 2014 14:59:07 +1000 Received: from d23dlp01.au.ibm.com (202.81.31.203) by e23smtp07.au.ibm.com (202.81.31.204) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 10 Dec 2014 14:59:06 +1000 Received: from d23relay06.au.ibm.com (d23relay06.au.ibm.com [9.185.63.219]) by d23dlp01.au.ibm.com (Postfix) with ESMTP id 656AE2CE8059 for ; Wed, 10 Dec 2014 15:59:06 +1100 (EST) Received: from d23av01.au.ibm.com (d23av01.au.ibm.com [9.190.234.96]) by d23relay06.au.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id sBA4x6Wv36306960 for ; Wed, 10 Dec 2014 15:59:06 +1100 Received: from d23av01.au.ibm.com (localhost [127.0.0.1]) by d23av01.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id sBA4x5pg027472 for ; Wed, 10 Dec 2014 15:59:05 +1100 Received: from thinktux.in.ibm.com (thinktux.in.ibm.com [9.124.35.35]) by d23av01.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id sBA4wwFg027183 for ; Wed, 10 Dec 2014 15:59:04 +1100 To: skiboot@lists.ozlabs.org From: Ananth N Mavinakayanahalli Date: Wed, 10 Dec 2014 10:32:38 +0530 Message-ID: <20141210050238.14156.80403.stgit@thinktux.in.ibm.com> User-Agent: StGit/0.16 MIME-Version: 1.0 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14121004-0025-0000-0000-000000B25FF3 Subject: [Skiboot] [PATCH V2] FSP: Reset the response outstanding bitmap on reset start X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" 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 --- 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,