From patchwork Mon Dec 4 22:44:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Madhani, Himanshu" X-Patchwork-Id: 10091691 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 8FBBC600C5 for ; Mon, 4 Dec 2017 22:45:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 812F829387 for ; Mon, 4 Dec 2017 22:45:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7628C29445; Mon, 4 Dec 2017 22:45: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=-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 0EC9A29387 for ; Mon, 4 Dec 2017 22:45:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752365AbdLDWpf (ORCPT ); Mon, 4 Dec 2017 17:45:35 -0500 Received: from mail-co1nam03on0089.outbound.protection.outlook.com ([104.47.40.89]:12277 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751793AbdLDWp3 (ORCPT ); Mon, 4 Dec 2017 17:45:29 -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=SQfdQ6KXGKU74vxRul1D+prw7rmw81tGw3/Ae+rPCww=; b=YATEbuJhRE4iN9QJPSLIsCDfa3BsKRujLeApMNcJCSAbrEcexFXm4+bMbgitdTCrOvRPFzRZ4WCgD6iN4136upxuj4wd/Ke0F9fjo93uPuDmqEtRHvh+OUhZV61/xd+YArHUnysa8Shm8rHKBTBYCo0dOx/aiw4Pkp2iqLHqqWs= Received: from SN1PR0701CA0083.namprd07.prod.outlook.com (10.163.126.51) by CY1PR0701MB1948.namprd07.prod.outlook.com (10.163.141.157) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.282.5; Mon, 4 Dec 2017 22:45:27 +0000 Received: from BL2FFO11FD008.protection.gbl (2a01:111:f400:7c09::112) by SN1PR0701CA0083.outlook.office365.com (2a01:111:e400:52fd::51) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.282.5 via Frontend Transport; Mon, 4 Dec 2017 22:45:27 +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 BL2FFO11FD008.mail.protection.outlook.com (10.173.161.4) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.20.239.4 via Frontend Transport; Mon, 4 Dec 2017 22:45:26 +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; Mon, 4 Dec 2017 14:45:18 -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 vB4MjIS2003453; Mon, 4 Dec 2017 14:45:18 -0800 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id vB4MjIrC003452; Mon, 4 Dec 2017 14:45:18 -0800 From: Himanshu Madhani To: , CC: , Subject: [PATCH v3 02/22] qla2xxx: Fix gpnid error processing Date: Mon, 4 Dec 2017 14:44:57 -0800 Message-ID: <20171204224517.3409-3-himanshu.madhani@cavium.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20171204224517.3409-1-himanshu.madhani@cavium.com> References: <20171204224517.3409-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)(376002)(346002)(2980300002)(428002)(199003)(189002)(316002)(76176011)(42186006)(87636003)(69596002)(80596001)(6666003)(50226002)(106466001)(101416001)(4326008)(478600001)(33646002)(2950100002)(51416003)(72206003)(105586002)(48376002)(1076002)(50466002)(36756003)(189998001)(5660300001)(47776003)(110136005)(2906002)(54906003)(356003)(16586007)(86362001)(8676002)(81156014)(81166006)(305945005)(8936002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR0701MB1948; H:CAEXCH02.caveonetworks.com; FPR:; SPF:None; PTR:50-232-66-26-static.hfc.comcastbusiness.net; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD008; 1:izWj0HanbXZqwPUNDAvp0heLMzjM4A/nWom96CWeC9ASwfFgepQhLmAuL85p6jzRO93qq4eXEtoFgA6wp8D+h7VWiTt3YpwuSTUu9I4NHS+TLPRW5LNQ9/s8vlpLAwW9 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: fa5fddcc-eecf-48a5-df35-08d53b68b6b6 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(5600026)(4604075)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(2017052603286); SRVR:CY1PR0701MB1948; X-Microsoft-Exchange-Di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d/qPbgKJMStcFShDLTyVjtr8/9BkbfHt1YrI11Ymhc18WnnklDM0WJSi9eDybBXz/AAW4g3ImnqweHqt7B1oYoSV0ynKQhb03nUpuT3Uhq0yVGXiz83J6r9npRPQ8umaAbJfdHnKk9gOIVSl9S8rgvITJL1ZQZdADkXtsGIjKus8oeHNvmdIFYFGMU5HX/b87mBJduyfttUdg4FwITt8gzFrtrxAtKLuikwwiw9KdnU/JPLiTWZXN5+Jo9VgYng3WYnEMSz478W1j8NFJELYUq+SvaRq+3mpbKYOwGafGIvIt7kPSGMwOj7AnyfpYuv44iaC97w4ktlD4919Zp8acSuHp53XAAK7BeXnOdbnc/qgIr3Emuh5PMSB10dCWSFBBu8TGnRnQHLSFFNv6hxAghXHxhJ7Fo0HQ4VQwlc0G2LXzVYnA5Wq9REGKYoest3ZLacjzt6JC6pYqpMHDtpztwRv9rhH0YZNJb4VfeTk4h/fKoxj1IPg/8b 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)(93006095)(93001095)(10201501046)(3231022)(3002001)(6041248)(20161123555025)(20161123564025)(20161123558100)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(6072148)(201708071742011); SRVR:CY1PR0701MB1948; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:CY1PR0701MB1948; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1948; 4:wkRZAu1fFWTW6zq2kwZuh9wRhPVL/bY5/5qQvZV6wHAsX70M4YOmRXA0QLxXVgKLEi6yCtr7TT6KQW6trfV/OeXJuu31xi/anZZ2TkDuXCD7k54xw+IHKkiVGNboq/SRELU109iOihNpX0wHZHUH2j5lUGAGfOJ2JTaar2PhlUijydUIlPcXEOnTJqo1cSW0PiXNhTSDeeXIbSQhBwzEQfZbgLUwZcrEWSQbSKIofnpu0OdQPcp7QiiJtSBjNIP3Ehx2yepoB5IT75CRWivorG/xjbCreIsbZQ374NkKWJvQcrAlML77tlTBALu6grOn X-Forefront-PRVS: 051158ECBB X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR0701MB1948; 23:JSda7T8wl5WLgDsWm0HftKG4Q1Swokbd6mQRAOU?= =?us-ascii?Q?DymSQUeWFf02zJstL8l4o3Xp7dxs1veEXJ11N3U6FMw+bfaEzcHVUNLsoBzW?= =?us-ascii?Q?Dj95e5NE5/YTcmN/xC4okIOuDR1cb3KPkHr/A1NbyWrdKAh+/bxpB/Q2suN3?= =?us-ascii?Q?QPhJX4R6HHsbuTwv/LPotAdUdhDRUxRrj5q70D84m9E+8P92ibgkyBdk38y2?= =?us-ascii?Q?WM20lPBbSn9TAbNZ9TVDkwD2QeeKLOurjLgw5s2onxu1VW0IxwMxOa3qkDGI?= =?us-ascii?Q?kRk2wKxmnxm3JkiInuTXI4q/nREUMrDTVNI5eyOb7q3Bupqk6iWIhp7iPcve?= =?us-ascii?Q?FD7d949a3GwaVq9ZzG3ACzX6L04bTo+KNZ9M7M9OJaWl660uDtrXh64ldtNx?= =?us-ascii?Q?pWl5Nac7cayKyffFxqlQ2DOFqA6ZBNk9J5kaNxp2rtb23/KtiOvQ16h1JZZf?= =?us-ascii?Q?eUcNeQ9cIfF4chts522DRPwHDpyqslL9y3h0Rfr8kniAIvEKsMIluelKFojy?= =?us-ascii?Q?l6/KDWoeEs5C+gtKBxlkP+19Z14FCBbzTMIQ/1/BSRYZiLeUqy/9O3qCXJ74?= =?us-ascii?Q?v51jPDdKpcskt8R2pnBHFRj6aSeqdToGR+wWdgHnBqbg0798RVzxOeoS1t6V?= =?us-ascii?Q?R86MkZ/VF7yNO8A+o3LEeikb4daBJNNvGUshyPOTOdkjQEoN7WALp9egwLvd?= =?us-ascii?Q?NqWPeoP1UsPLgN3BL9bZs8HI37brYAdpS+LUHQmoWH1HpG4nQGbpNJHno5tR?= =?us-ascii?Q?MZ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vQm0vUY4KdUoHDeZnDd7dtXKEafbIcO/IoPzS1azTYIqI+dAQq8hWPEN3USvsxpeBOp0p1/FwF9s6weaJApQr+Hhiyca3LTW9eNdaQqFgbgvGJnSGJaEV2Q/cfvhhH+dEpU+9RN1Yx9iywC7vqOdFMl/obZi SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Dec 2017 22:45:26.2288 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: fa5fddcc-eecf-48a5-df35-08d53b68b6b6 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: CY1PR0701MB1948 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 Stop GPNID command from advancing if command has failed. Fixes: 726b85487067d ("qla2xxx: Add framework for async fabric discovery") Cc: # 4.10+ Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Reviewed-by: Hannes Reinecke --- drivers/scsi/qla2xxx/qla_gs.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/scsi/qla2xxx/qla_gs.c b/drivers/scsi/qla2xxx/qla_gs.c index bc3db6abc9a0..ddc69d36877e 100644 --- a/drivers/scsi/qla2xxx/qla_gs.c +++ b/drivers/scsi/qla2xxx/qla_gs.c @@ -3211,6 +3211,11 @@ static void qla2x00_async_gpnid_sp_done(void *s, int res) sp->name, res, ct_req->req.port_id.port_id, ct_rsp->rsp.gpn_id.port_name); + if (res) { + sp->free(sp); + return; + } + memset(&ea, 0, sizeof(ea)); memcpy(ea.port_name, ct_rsp->rsp.gpn_id.port_name, WWN_SIZE); ea.sp = sp;