From patchwork Thu Nov 30 03:40:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Madhani, Himanshu" X-Patchwork-Id: 10084203 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 7DFDA602B9 for ; Thu, 30 Nov 2017 03:41:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 74C7A29935 for ; Thu, 30 Nov 2017 03:41:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 69B2E29B02; Thu, 30 Nov 2017 03:41:31 +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=-6.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D307429935 for ; Thu, 30 Nov 2017 03:41:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753481AbdK3Dl2 (ORCPT ); Wed, 29 Nov 2017 22:41:28 -0500 Received: from mail-by2nam03on0076.outbound.protection.outlook.com ([104.47.42.76]:32160 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753237AbdK3DlN (ORCPT ); Wed, 29 Nov 2017 22:41:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=AQkTADwJNQlQL16Zk4FkCjq2tCE9tFRUorQIM46tGCs=; b=Qbwn3JFeWh+AbHojbgCt6zpgfSseax3X7EUNp6zgD/ELF74CxgSxrOUVyyxitsjTNKbE5P6XDE20eUt6kuq2MXLleM/vFy12w7K9slC2puefvkRCU/r0wDBrPN9i2p4BD9mwdkqwUUT+KjqiT5R1tqoSrynl0JkF9MBTVz4C7Rs= Received: from BY2PR07CA0095.namprd07.prod.outlook.com (2a01:111:e400:7bff::48) by SN4PR0701MB3821.namprd07.prod.outlook.com (2603:10b6:803:4e::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.260.4; Thu, 30 Nov 2017 03:41:11 +0000 Received: from BL2FFO11FD049.protection.gbl (2a01:111:f400:7c09::147) by BY2PR07CA0095.outlook.office365.com (2a01:111:e400:7bff::48) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.282.5 via Frontend Transport; Thu, 30 Nov 2017 03:41:11 +0000 Authentication-Results: spf=none (sender IP is 50.232.66.26) smtp.mailfrom=cavium.com; vger.kernel.org; dkim=none (message not signed) header.d=none; vger.kernel.org; dmarc=none action=none header.from=cavium.com; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) Received: from CAEXCH02.caveonetworks.com (50.232.66.26) by BL2FFO11FD049.mail.protection.outlook.com (10.173.161.211) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.20.218.12 via Frontend Transport; Thu, 30 Nov 2017 03:41:10 +0000 Received: from dut1171.mv.qlogic.com (172.29.51.171) by CAEXCH02.caveonetworks.com (10.17.4.29) with Microsoft SMTP Server id 14.2.347.0; Wed, 29 Nov 2017 19:40:50 -0800 Received: from dut1171.mv.qlogic.com (localhost [127.0.0.1]) by dut1171.mv.qlogic.com (8.14.7/8.14.7) with ESMTP id vAU3eodj015158; Wed, 29 Nov 2017 19:40:50 -0800 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id vAU3eol4015157; Wed, 29 Nov 2017 19:40:50 -0800 From: Himanshu Madhani To: , CC: , Subject: [PATCH v2 13/22] qla2xxx: Fix PRLI state check Date: Wed, 29 Nov 2017 19:40:38 -0800 Message-ID: <20171130034047.15070-14-himanshu.madhani@cavium.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20171130034047.15070-1-himanshu.madhani@cavium.com> References: <20171130034047.15070-1-himanshu.madhani@cavium.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:50.232.66.26; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(346002)(376002)(2980300002)(428002)(189002)(199003)(105586002)(356003)(5660300001)(54906003)(33646002)(305945005)(80596001)(110136005)(16586007)(101416001)(81166006)(81156014)(36756003)(316002)(50986010)(76176010)(106466001)(8676002)(69596002)(50226002)(50466002)(2906002)(47776003)(8936002)(189998001)(4326008)(51416003)(1076002)(42186006)(87636003)(6666003)(86362001)(478600001)(48376002)(2950100002)(72206003); DIR:OUT; SFP:1101; SCL:1; SRVR:SN4PR0701MB3821; H:CAEXCH02.caveonetworks.com; FPR:; SPF:None; PTR:50-232-66-26-static.hfc.comcastbusiness.net; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD049; 1:dYqgFd/2o5faoBIP96IK0OIalKkbCzPLQBPbjITuEL//7LxNe6wAgqNgNDU3U/VTmd7y+jFpKbjL7hLFgwsuBidk+KOrCWHPXPavtHmguZ6aEDnW9n5G5xETH04Brk5m X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0f3ca212-d2d2-47cc-ff4d-08d537a432fa X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603280); SRVR:SN4PR0701MB3821; X-Micros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bd3qLgHMA0jC/B/gkFlifOB/FK91DlEY0a/0aReym+jqbufPgifbAeey/TXmuEKTkGSv4DeGc6aQnNDBZKSjOcRJaVPKZunW2rFoG/ycvp7KIJpnNx9QCUgFb9BxZHWy3+b8D5dL1p3fegTlhVwUwfYWJI8LA8iufu/Iu+D6QnsJzvcWgAS7Dts1mGAT1zrzhQc3gYXkQBFDx8NvyTAWY2awTDla2XyQVehVlUja3nR2sP6SIwLLkdeu7pOt/mOyUI71twyyg4IQX+ftgT3DurBd3V+llqyS9EfwOT9DqBMU2flW1mQ8HNjAQAn7pwVXl4rWXfwHd5SQyatJMH0aPG9d1te1dbiALQwb+mqpmRarheo5+hvkpRsgVpZmtuKqCewFO2AT3HAECx6OEqqJlik/0lb0mIga46JIa0rcWXoJvXJOyobTg/6fiOwy2dVaIioN6A571eYMKPqfecY6LtsWgTddgqFsQ94w1gbKc6V X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(9452136761055); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(2401047)(5005006)(8121501046)(3231022)(93006095)(93001095)(10201501046)(3002001)(6041248)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123558100)(20161123555025)(20161123560025)(6072148)(201708071742011); SRVR:SN4PR0701MB3821; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:SN4PR0701MB3821; X-Microsoft-Exchange-Diagnostics: 1; SN4PR0701MB3821; 4:MxW8FOvMq/GjBGqL5rAOaN414M2ZVEmv3vxzRgbYS9/Es86Yo35w+RBme0zv4vsfaXcvpw4Ce/pFp2WQbYfACZi+2EOmt/SnYvPDdppSc0M4NH9LYQlr9X8RxyEvvqv9iZs5YgaGfxUDAIjPceVJ1nGiZ2DTed0xOviS9qelQGCJbVVZbopmOXHK4If8H3nKoaXz/QuC7MTsqYoNlRnOPUSDAcObrJSFsz5+SatQjddhiUxLmvdrxAhhpmXltv2iEcug1YZrz9L7RPXih2x+rldXyXPT3FAQa4YoAFai9ZcsayWW/ZkYQ5j0/j7D3FnR X-Forefront-PRVS: 05079D8470 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN4PR0701MB3821; 23:vQBRyCVdn66edkWxyeVkTXvyKeUC3lXaVkOtOda?= =?us-ascii?Q?/SZ3Jyy+r0lIJwv0D7AD8oyI6ZdoxcWESfq8eEQ/KZ/ak3k/4A7eRHYwyvtA?= =?us-ascii?Q?r3p29ILk9H3f4i+lnK8xJncg0xzxpJdMKfzvIrnHMxvNxM5BrFaOBD6wO9IC?= =?us-ascii?Q?yeUzoiQZuTrb1PbWMcVIXqx5USI5a6v6GdXgPmJnycZEzjUw7dfG8WlbBTe9?= =?us-ascii?Q?W8nLNpnhFwW3QJr9x62aCUXPYMttiAxOlM0ESZQHC3frWajWNrDSw3PwyfSQ?= =?us-ascii?Q?dalQex4SmWiPUjk/foz1/bikifvgkh2S4gVtEOa0j5ORAVPh/AAuhVUlyuH7?= =?us-ascii?Q?FMiocnAtBHltBNw9wGK9b50qJ1tFxDhKHWEq21kBbP+/xVLvxwoKZaqHS4rL?= =?us-ascii?Q?P50k/58l69OLVdvgj/vw/INTK2zrkaSH7qSLDyW8vdCEm5R+DOVTxBuxYL3D?= =?us-ascii?Q?bj4lRiyN8MmAqRUuVsQhUQp0x4o6KhwstUnYCrCD9v7M42EqLyhaPYGtpiZs?= =?us-ascii?Q?YQ4U2ckxAIUtg5AQrJOjJHo9k4tTRdaB8bUA2JGg1+PZu1Bb2spDmUhblS9N?= =?us-ascii?Q?43Rl9gfrjQozGwLIHAkh106DhoYSw3zf1j/yHDVEQu1fQF+G2/K+ZBisD43T?= =?us-ascii?Q?uDV9fSUtaLPyZxY1yk8hlTcgffwHWCKw3+K9RFXbTX65/XyQYCUtKMxU54jj?= =?us-ascii?Q?fF6Sw8KHIhUHdIzMru+B9KCDTS6SVnJA0LZEwj37IwcJxfqwMiCInaDBmsO1?= =?us-ascii?Q?pS005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YAlK6FnJXJkYVyP4POOd5iArwwFNTD26gAAmnJgZYkx8VUj1jjBCU+dRv0K+Z1TfhNJkK84/xD13YgqniTOYhIdKbTDl8rrWVGXkB7t0yFoFg1MXsboUt21zTJ4LzH77GJN1es3xBd0lp7Z7rvzWi0SHP+gbdncr+QY3AdE1VdVwQ02P140/qWoL SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Nov 2017 03:41:10.8680 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0f3ca212-d2d2-47cc-ff4d-08d537a432fa X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=711e4ccf-2e9b-4bcf-a551-4094005b6194; Ip=[50.232.66.26]; Helo=[CAEXCH02.caveonetworks.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN4PR0701MB3821 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Quinn Tran Get Port Database MBX cmd is to validate current Login state upon PRLI completion. Current code looks at the last login state for re-validation which was incorrect. This patch removed incorrect state check. Fixes: 15f30a5752287 ("qla2xxx: Use IOCB interface to submit non-critical MBX.") Cc: # 4.10+ Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Reviewed-by: Hannes Reinecke --- drivers/scsi/qla2xxx/qla_mbx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c index cb717d47339f..e2b5fa47bb57 100644 --- a/drivers/scsi/qla2xxx/qla_mbx.c +++ b/drivers/scsi/qla2xxx/qla_mbx.c @@ -6160,8 +6160,7 @@ int __qla24xx_parse_gpdb(struct scsi_qla_host *vha, fc_port_t *fcport, } /* Check for logged in state. */ - if (current_login_state != PDS_PRLI_COMPLETE && - last_login_state != PDS_PRLI_COMPLETE) { + if (current_login_state != PDS_PRLI_COMPLETE) { ql_dbg(ql_dbg_mbx, vha, 0x119a, "Unable to verify login-state (%x/%x) for loop_id %x.\n", current_login_state, last_login_state, fcport->loop_id);