From patchwork Thu Apr 19 06:27:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sai Pavan Boddu X-Patchwork-Id: 10349153 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 88B72602B7 for ; Thu, 19 Apr 2018 06:31:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5F39A28952 for ; Thu, 19 Apr 2018 06:31:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 62B8828BB0; Thu, 19 Apr 2018 06:29:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D167528A2A for ; Thu, 19 Apr 2018 06:28:25 +0000 (UTC) Received: from localhost ([::1]:52972 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f933R-00054G-5O for patchwork-qemu-devel@patchwork.kernel.org; Thu, 19 Apr 2018 02:28:25 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59746) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f932l-0004hn-Rr for qemu-devel@nongnu.org; Thu, 19 Apr 2018 02:27:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f932g-00044U-U3 for qemu-devel@nongnu.org; Thu, 19 Apr 2018 02:27:43 -0400 Received: from mail-by2nam01on0072.outbound.protection.outlook.com ([104.47.34.72]:51478 helo=NAM01-BY2-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1f932g-00042t-Gd for qemu-devel@nongnu.org; Thu, 19 Apr 2018 02:27:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector1-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=9u/HKQhEbt4AH69bAPHyqgOUs7XYtxwCoy19gqwbdKs=; b=qDSCxAE1C36gVHPzWmnsmN38cbi+WCoA9WRZF+IwxhwMvYV9yDb0UXEQ21li8oZ02/ygMMhpKKsxwFOwOin7O6Bym7ghZsX9NiwDW7bkMY3+PJ56r9ze5RhhjHGMvpzSTuipdCkp5ilBixERmRedjHM8eJH7HTzmOPLVDO2CQ08= Received: from BN6PR02CA0034.namprd02.prod.outlook.com (2603:10b6:404:5f::20) by BL2PR02MB2002.namprd02.prod.outlook.com (2a01:111:e400:c749::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.696.12; Thu, 19 Apr 2018 06:27:35 +0000 Received: from CY1NAM02FT035.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e45::202) by BN6PR02CA0034.outlook.office365.com (2603:10b6:404:5f::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.696.12 via Frontend Transport; Thu, 19 Apr 2018 06:27:35 +0000 Authentication-Results: spf=none (sender IP is 149.199.60.100) smtp.mailfrom=xhdsaipava40.localdomain; nongnu.org; dkim=none (message not signed) header.d=none;nongnu.org; dmarc=none action=none header.from=xilinx.com; Received-SPF: None (protection.outlook.com: xhdsaipava40.localdomain does not designate permitted sender hosts) Received: from xsj-pvapsmtpgw02 (149.199.60.100) by CY1NAM02FT035.mail.protection.outlook.com (10.152.75.186) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.675.14 via Frontend Transport; Thu, 19 Apr 2018 06:27:35 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66]:53249 helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw02 with esmtp (Exim 4.63) (envelope-from ) id 1f932c-0000m9-L3; Wed, 18 Apr 2018 23:27:34 -0700 Received: from [127.0.0.1] (helo=xsj-smtp-dlp2.xlnx.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1f932X-0006Gb-HW; Wed, 18 Apr 2018 23:27:29 -0700 Received: from xsj-pvapsmtp01 (smtp3.xilinx.com [149.199.38.66]) by xsj-smtp-dlp2.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id w3J6RS87019719; Wed, 18 Apr 2018 23:27:28 -0700 Received: from [172.23.37.96] (helo=xhdsaipava40.localdomain) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1f932W-0006Fu-Cb; Wed, 18 Apr 2018 23:27:28 -0700 Received: by xhdsaipava40.localdomain (Postfix, from userid 14131) id 8CB1E4C10B4; Thu, 19 Apr 2018 11:57:27 +0530 (IST) From: Sai Pavan Boddu To: , , , , Date: Thu, 19 Apr 2018 11:57:23 +0530 Message-ID: <1524119244-1240-1-git-send-email-saipava@xilinx.com> X-Mailer: git-send-email 2.7.4 X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.2.0.1013-23620.005 X-TM-AS-Result: No--0.559-7.0-31-1 X-imss-scan-details: No--0.559-7.0-31-1;No--0.559-5.0-31-1 X-TM-AS-User-Approved-Sender: No;No X-TM-AS-Result-Xfilter: Match text exemption rules:No X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.100; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(376002)(396003)(346002)(39860400002)(39380400002)(2970300002)(428003)(189003)(199004)(9170700003)(26005)(106466001)(36756003)(59450400001)(6666003)(52956003)(42882007)(50466002)(110136005)(51416003)(54906003)(107886003)(2201001)(316002)(86372001)(42186006)(48376002)(16586007)(6266002)(336012)(50226002)(498600001)(2906002)(5660300001)(476003)(81166006)(63266004)(2616005)(90966002)(105586002)(8676002)(4326008)(356003)(8936002)(103686004)(305945005)(47776003)(486006)(126002)(107986001)(5001870100001); DIR:OUT; SFP:1101; SCL:1; SRVR:BL2PR02MB2002; H:xsj-pvapsmtpgw02; FPR:; SPF:None; LANG:en; MLV:ovrnspm; MX:0; A:0; PTR:xapps1.xilinx.com,unknown-60-100.xilinx.com; X-Microsoft-Exchange-Diagnostics: 1; CY1NAM02FT035; 1:m5pvuuu9rQhB+ohol4ysGu4rYDfF3R4eRjZMKY6y7MMDy3lJmgMYjuVqdoFHl9cfMYSBnZ/XZFk/olexrDiYeGXJ/2Qt3hHyw2/NMZuWkbTtdzB6Nuj1p7+Nl2rSmzwn MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4534165)(4627221)(201703031133081)(2017052603328)(7153060); SRVR:BL2PR02MB2002; X-Microsoft-Exchange-Diagnostics: 1; BL2PR02MB2002; 3:8HufhRrVaIF4VshNZER9GIs6CSfWZIBvwsHvNObMubceQKJbCNICasOnPIA+TJfGHKTyhf2KRKWHqp7402DPgkQ8hVhY+MZ2AEpIO6tKQkIRO1Xu7DBXYDInSBIw+4wtWTjNOsG8DjzQsMIRL8mxOunI1AHMo5BuZMzvGxIPuIMwDeJMUVYU9o7ow5EW6Ez1buE22qskglAFCnb7MZgLBgvSwza86qOx78qMvZSUpt4Bm98YqhCr84Mq/BGOHp29cSO6rZJysXBWVwCw/H9NQ3FEO32A5RX0IFsXKIV9tuhoYwOmtxoewBihv4dgAqEpDc/GTDxMH252NGLd5WvQ2UBhTd5IsCsu6t+LBdD8M6s=; 25:FKIRP6svAaD4CH8HFNsMxdAg65/ck2rRUstUugZRP8FZDWKcLTwI0Hp5MUZ2u590+67SmW52VURefSKFVMiP5xirz65tU/tumkR4Ulxfd7DhshxsLitZA3lSicwazGVZdR3hLHtNiR6Fx7GhYLr8og//y/61s/plntWYemOvlaa5rNpLtYFI//MBuS+2sO3RTO0MTvago8NG9rMIJgk3S+3YGe/ZHzHkZxsZF7AN6hNNs2AAz3IxzUGa66TcV2VTcwd8g3tjURmS439NzzhvdyMlRA8WNschZXvDg6/s6GuHcbPCZsyQzR74P4FgdYbDKSwgqK3Wa6kpUCCve15DLQ== X-MS-TrafficTypeDiagnostic: BL2PR02MB2002: X-Microsoft-Exchange-Diagnostics: 1; BL2PR02MB2002; 31:7ahuM0vgvrJLoGN4f0bD6L+WBvPNnu+D5YTsJoAKjJJE7kDC/4/OvYo+0yTC+P++5EoUBpJx62mr59hudFuUks0+BGftDFiG/zZZsfKLhu1ZXxiBkKVJonqc15ilLhVtAD2xgenshx8T4eFy0yxX5dHb4tkTmSe5H5fw+6272G7yw2l+mU9qZRahivr3EUjyLuDmi6PsDoOZFz/hqHyURLjXCQS79QjxZUKgQ2yhCPo=; 20:f46GBORzZYoE+acNDySRRURU0F0KPql+1TEiT76aP/t++0vEwzLq9jepflPNzWv7UrdQxR2X9i6XBtPR312LBo0MAcosTuPdzvmyZiT7eoVbWbXl5NDWcNRlPJgGhm6zunmqa6A3bJuXUfr2XgwIImK8I8T/T+Tc62Kzkzz9evQny26G9Ny+9GE8odduwrBt9QfwfUoHE+1rQT/0FwgqehV4tJqWArlr7elj9GWMAocGKnDOr8mmmkzIe0sXrodpQFuossMB718paYBt1oGO7owwLZVWPR8nmkMfVos83T2kKYv61CacvLMME2lsfaJqPRqYKCwvgVMFzFZhS4mUqOYOa7Q2bPz8AJNv+344nypOfvdUBjyLG0RYSVpP8D90pcoXpZK3CFEssYr1PhSe8m+R0oVso5mFYWAdNaDnpvw6IkiGYIa6Rjsge61ogs6Lk6Ef2bxKC3TjpM6wGHEYtM09a5pg/sQz7HaWPVEOMNWlXKMwPWuzgJ/jMbqp5PVx X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(192813158149592); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(93006095)(93001095)(3002001)(3231232)(944501327)(52105095)(10201501046)(6055026)(6041310)(20161123558120)(20161123560045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061750153)(20161123564045)(6072148)(201708071742011); SRVR:BL2PR02MB2002; BCL:0; PCL:0; RULEID:; SRVR:BL2PR02MB2002; X-Microsoft-Exchange-Diagnostics: 1; BL2PR02MB2002; 4:cOrZZC7+tb4ENXFaaWW+kdVcDQbtgLPzzvVkv4TxQ0UKncWI6VL/xq8/eD/xaxCwR4Fi6eQ3NJJJWgGRaJbGbZs7mxpvVKPMtFusdK4Q9B/lG8UvNdqJoW6pudaL4hZZBCDnVRwFpmp1K30pCR9pzq38aSkv51nvJRwtOsY9T2iAZWnHwYXgmw3Jz3JcalhZKKIUGigCIo/DGxtJMOkSnFTrzTWUg9owCzYrmN/BYF+ebc29g/CSoGU4gfYB3K+jm53VihC2zYclZ4z5PYUbZU7fpA8YNEwTXWttm3ErvPo+ROjCt/+ZImvhqSmu9Jp3 X-Forefront-PRVS: 0647963F84 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BL2PR02MB2002; 23:ez+B9BqwT/7I5UEC7oFSobc/B/Cd3vQ2WIgRJzzSv?= =?us-ascii?Q?54bK6H+0dDNlWHGJnOaKYriczP6+EM7KXR4fd1HXz31xJkD4UAzSFjaTgpht?= =?us-ascii?Q?WKq84JUNWbCRVqAPvLX/8oQ45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frlmYHye1HMjiglsUYDq1nAJjxFyaXbMjEPLtkT0ukqnLWVC9o=; 24:FahrRQqvpUKsuJwzZgBEDmSPNulqW9CNCMrx1UXp8AoMVpRKRN5rQORAxNSCeJD/N2bh5fR5qcVqG8fe14Dt/sGY/4Sn0rLqn95jftIPB5c= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BL2PR02MB2002; 7:wdNM2kvwbbiigkfZJ3vT8ZkGTgkrfpsNURFRs8IjqgCx5zLDjdvU09Ec6MchFDZk2Aaw/EMsZut898Du2B49ag8Zr84jWNIzzsrRdsnnmp+O7E16fpamiKwM80IHDwCz82SXdhPUuuRAaW2gMvmmtmE4Is8o0yUiObc3Mq1e9ZmxwXQEWQsne7ITFfnDoMnHwMKZK5voyWwZt/PJ5O5UiTmHg2YbUy+eF29UiIuEuT8pmDIyLBbgX0j24T6t8e8y X-MS-Office365-Filtering-Correlation-Id: c0b1242f-3901-4a22-c7db-08d5a5bea3c0 X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Apr 2018 06:27:35.1545 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c0b1242f-3901-4a22-c7db-08d5a5bea3c0 X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.60.100]; Helo=[xsj-pvapsmtpgw02] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL2PR02MB2002 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.34.72 Subject: [Qemu-devel] [PATCH v3] xilinx_spips: Correct SNOOP_NONE state when flushing the txfifo X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: saipava@xilinx.com, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP SNOOP_NONE state handle is moved above in the if ladder, as it's same as SNOOP_STRIPPING during data cycles. Signed-off-by: Sai Pavan Boddu Reviewed-by: Francisco Iglesias --- Changes for V2: Fixed commit message Reordered to code, to avoid code duplication. Changes for V3: Dropped the cover letter, as its a minor fix now Fixed commit message by explaining only what's fixed removed the dummy_byte decrement changes hw/ssi/xilinx_spips.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/ssi/xilinx_spips.c b/hw/ssi/xilinx_spips.c index 426f971..03f5fae 100644 --- a/hw/ssi/xilinx_spips.c +++ b/hw/ssi/xilinx_spips.c @@ -616,7 +616,8 @@ static void xilinx_spips_flush_txfifo(XilinxSPIPS *s) if (fifo8_is_empty(&s->tx_fifo)) { xilinx_spips_update_ixr(s); return; - } else if (s->snoop_state == SNOOP_STRIPING) { + } else if (s->snoop_state == SNOOP_STRIPING || + s->snoop_state == SNOOP_NONE) { for (i = 0; i < num_effective_busses(s); ++i) { tx_rx[i] = fifo8_pop(&s->tx_fifo); }