From patchwork Thu Nov 30 03:40:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Madhani, Himanshu" X-Patchwork-Id: 10084173 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 F15DF602B9 for ; Thu, 30 Nov 2017 03:41:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E787B29935 for ; Thu, 30 Nov 2017 03:41:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DC3D329B02; Thu, 30 Nov 2017 03:41:01 +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 5CF0329935 for ; Thu, 30 Nov 2017 03:41:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753275AbdK3DlA (ORCPT ); Wed, 29 Nov 2017 22:41:00 -0500 Received: from mail-co1nam03on0059.outbound.protection.outlook.com ([104.47.40.59]:57454 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753091AbdK3Dk6 (ORCPT ); Wed, 29 Nov 2017 22:40:58 -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=ohnm/9+MHrke8aC9rCPBNS++7rKiBRWH/lzKvl7izWg=; b=TFtnKRRlzPPySYVuNnUi1w4RckyCTv+I7PR2KB2OFRLg3760rMeA3BVkFfBOKR0nspQNYID/aDIKAu2BCKFvgxzXjEyTFhOxigbaqTNM+8bkzpUIjI0pFwR8otj+hIM8g4Uxf2naaQElQFCj/1XvkBwuSSWYIOTgLdFZHiL+0aM= Received: from BY2PR07CA0095.namprd07.prod.outlook.com (10.166.107.48) by BLUPR0701MB1938.namprd07.prod.outlook.com (10.163.121.156) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.282.5; Thu, 30 Nov 2017 03:40:56 +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:40:56 +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:40:55 +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:48 -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 vAU3emkr015113; Wed, 29 Nov 2017 19:40:48 -0800 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id vAU3emc6015112; Wed, 29 Nov 2017 19:40:48 -0800 From: Himanshu Madhani To: , CC: , Subject: [PATCH v2 02/22] qla2xxx: Fix gpnid error processing Date: Wed, 29 Nov 2017 19:40:27 -0800 Message-ID: <20171130034047.15070-3-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)(87636003)(8936002)(478600001)(101416001)(356003)(36756003)(72206003)(2950100002)(6666003)(305945005)(48376002)(50466002)(50226002)(189998001)(50986010)(76176010)(47776003)(106466001)(54906003)(8676002)(81166006)(2906002)(81156014)(110136005)(16586007)(316002)(42186006)(80596001)(69596002)(105586002)(33646002)(4326008)(1076002)(86362001)(5660300001)(51416003); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0701MB1938; 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:6FMnIV8QUjDfxrd+qDG7Ppile4nqicEAZTvakFB+GxRM/SJ5YkHiWeq1x1xS1UnU71lM9RCYklcFARR6O0XO7QcV0TxFkQnYZbBLW7XZGcXA9+Pc2xnENb1Wmljxrn1W X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b0317432-d14c-4546-21d5-08d537a429da X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603280); SRVR:BLUPR0701MB1938; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1938; 3:LvTzVg0pQZwNrSlmJsLFxUiyD71hKUoV3YkVHKA19IwspUe42j1XNkFEoAeen+Aq961y8saJzVTGNNaU+XVL35pztkstPY7glHlSW7Q59BtzyfZzL5FBRW/DUsBOGomooDrTsnowghNPHWbM3Xspw69pqVarCnkZbw08eL8s+mhX27mf0coDFkHhjjCUh7lwFrvhaqLmqI81As+zhjshRY1Wu33S1rUH9T9o59aUFWSLJr8RqMjt5wW8mQxvVlSk2GMwOtJcy9ffvrvBuw/ozufC9UmSpx1dl7B8+efMk6u6qsT1cAaek8/JDpHtT4eHKBZfFdokJIBOhWVP+qf3WeMbZQFd+wwf5wFkm00ghdc=; 25:P82PHuQy5lli1345ugASy5aWAe71ekkxO8p9XT6W7KHDKkqkKcgI6swEieouIcNwPmIP+1xEnDetHh92kYwpXLaLBgk/fMWRHJdEbaU4+cUFkpEIcPCFwpUxMdFYTDqyQfAZr/Hx+cvAuAm+3GYTdOBZMs3O17tuDX606OZHdk8B/OmEt37nDwVsH0hScw+6Xeob6ja3Q5RQKoToZD6NfHtX1MlDYruiGsl7Kt9UzAM/wHDpzUbVtQpYJS+4tbd9kKsL3kz3j0GDCyPPMtF0lo1iG6sgWy5tSW3FH5CZHgphbN+FnkQTgjkphVr7IOcUB3W8bo8FrSLaOMdCB6bW6Va0EdM0QrlGK9rXvnQUKd0= X-MS-TrafficTypeDiagnostic: BLUPR0701MB1938: X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1938; 31:2fgdxFhBT08zUD7JKyAISQMqdhwupyY84oA0kFJM60c0n/AUrjvVWj2BxhXc2AT7ZSMAMwavr5ydZurePrWss1s+T3VFeTPAIVGfxhS+wLg1bivM4zMAqMLbIG0r1eFuSJwPYlif1o07qREpRyjmOZ9fS3CCVTvhn6F4SyvqtHWM4EQusccbNPFI+M9w6sdCqxv/452SZ4TzH58AM0nb57Oq05kBuQNm2ScWjQdeDvY=; 20:HtZImbb2H+mSfJVYs62hceEpCFRITxE5c1NSLgfUCpUreO7jbBrFlFhoiKpAqHPqJRTVHqmiNoG/0eMefFYY1OGgzVql9pxuCtTvwRfrbX4BSNfMUbAqXlrgobQLjRwYA6uGqKvwWeUpxICjtOi4CV1BqU0sLaSiXhQBbmPuKXprKxKbTND3C7cSmTeOcME1ucz6fIKd6BZ48PSB+TQTpbyr65sNvaR1clxMESyYwoY/7YZPFQeJJYXNXl4sfBQIv23u1lIh93FjULqtO7cflpzcnSH3KDszlq6BPuGokXBEmabyivSpQsPA0VLhx1tLDw30f6QRLgc9WcYB1nyFLfFxSwDswS5o3LOdFk/az/mfTDZZgOnDB8PR4x1fGLhX9Vr7gguLsCxvWaxZ+X+McGGbBWAksDVvhQCbTe0wYYm1o+zd7EtIg7m8ZxrkQ05Ugx4YC/9N4j+BahAcJ2R/D/X5gN8KL6mRLSkQADlM12mCpblibpFx1oOjLzNdTxBB 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)(3002001)(3231022)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(20161123562025)(20161123555025)(20161123560025)(20161123558100)(6072148)(201708071742011); SRVR:BLUPR0701MB1938; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:BLUPR0701MB1938; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1938; 4:6TYBulcwgLUZouPXsjmGkgEedXd4JuRXU3b/2wML82aY7D7+tB5B7pgbaFe79RFYJIomzhAdMg6lWtYuxn0Id8wVUpMEDxEJ4v9Vg6KqSSBWQowh2NYvmXWcEfBojbmLHvGmcMzDTFv7Jv//2A7s0ZcBxraZlI4Krg8nCqG5hloAtfNTCUlO0vhRdLgg4FD5qb/d17TJBhF5A8qZ979a30ncfFl+e9uBS/3Zp55dzx0ufW+FbfkjXhd74oqFFCB0ZHrM+nckfZ0JB9Il4dQRUqCk9AfTnyZh+6ActbpqS9kr6evkfCXKJhBvoQnpPaY8 X-Forefront-PRVS: 05079D8470 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR0701MB1938; 23:ko1tI9DVzId5ZRLr4G/8/DGpIw023TtNrbA304F?= =?us-ascii?Q?nK+dggyXZgIOXWsVm92cBDb4ZtXPcaA7kl2SSLxK6KK4p2//MP+GFWUYPtB9?= =?us-ascii?Q?WQboAuDP8jkkWvTDdCw+tzB6uDbccegROX1LiBS0SM3YWhKkaSw3R/7joUyy?= =?us-ascii?Q?kMi4tFwyU8pFfOo769P1kA8PC0oSDBlowVnfzpnww/fMz/e9RZU3q2Jr/iJP?= =?us-ascii?Q?EHpIXulm44Y5y+BL0DxsDiworsza5Y4wJ0cVc9k5xMRjLzL+9ynNNeRE96Sw?= =?us-ascii?Q?RRnxNd1ZjF1DZk1lGnEn94GZy9Big4Y7QyjPSTsxXtYFo0tS2hSkrcCSRj8z?= =?us-ascii?Q?rvJFmYiKXvTbhqDyb0lLp9Zk5sLt6Oe5YyOE89gO1JyYzWY4mBHqiTs8U9El?= =?us-ascii?Q?w709l9ZzYiXX3nxZU7DUUi8lDbMXZaS0ClNca9/yh99H4E6UnOqtw8b0Un7Y?= =?us-ascii?Q?bloQARWAnekpaUtYJ5hnCz28YDw4h+SKQ2N4VHC/03eNHfRIMaRlxvG7QL0c?= =?us-ascii?Q?9SzTyLB9igAnicOKW/3BfjqXEdZAko1nS/WkFtzesKtDFu7F57q+oAzl2gTp?= =?us-ascii?Q?rw+xbc1B87X5bNAUsWX9pp/ccSxCGOSXZ8fuIBSeqx0Kll2lEz2n/r4Xooms?= =?us-ascii?Q?p6hB/p1j0lg0Io0pbYZs9ajlUEazJ6a/sQ4+TdgR3iYfcTCnQxCei4/YHoUA?= =?us-ascii?Q?+yraClzzGKXgwGVdPLFgw9pu0aepaZ1cOLunYCf+2UbixnXjKywVmPIaIjux?= =?us-ascii?Q?TWg6nuQX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JSbeUOXRs+GdZUnMUgfaF1cjH8RW9oQhAu/cZJ7AvlF7XFjlANKx3ZvRuhO1x4nxnlILC1UVtuWUr+k9fowJWc6CDRAfjWa65DnY039VCuWAQGOWKKKcemuaQcTF1bDB2pZ/e/HzfczIbJNXFxxoXpz43JSK5CF34iuArVdzlPRKyBhvEUZhKxIhGwM SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Nov 2017 03:40:55.5531 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b0317432-d14c-4546-21d5-08d537a429da 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: BLUPR0701MB1938 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;