From patchwork Thu Aug 30 16:35:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Madhani, Himanshu" X-Patchwork-Id: 10582327 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 80E385A4 for ; Thu, 30 Aug 2018 16:40:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6EFD92C122 for ; Thu, 30 Aug 2018 16:40:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5F7982C12C; Thu, 30 Aug 2018 16:40: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=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,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 DE49A2C122 for ; Thu, 30 Aug 2018 16:40:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727702AbeH3Um6 (ORCPT ); Thu, 30 Aug 2018 16:42:58 -0400 Received: from mail-dm3nam03on0066.outbound.protection.outlook.com ([104.47.41.66]:57920 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727073AbeH3Um6 (ORCPT ); Thu, 30 Aug 2018 16:42:58 -0400 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:X-MS-Exchange-SenderADCheck; bh=tByVxeUrbuuPLjEJU3p0Nv7ovxW6/mjSvnTGoHq7baw=; b=JAUEAGX6pif5UXnrDORrru6nV3kL0Z+iTO91dMme25RF18+AwRlNigcOfAMfWiDIBwqWOWgO+4rcu1KVU0L4xoItu+UnsUeN9GFXdh3jHVyC+t6KFtAqw2CeKXFR2Xihda2t6fJ5cLOAHQ7yopTc+ioVtWNHlzaqRAtZ4RmmRu0= Received: from BYAPR07CA0054.namprd07.prod.outlook.com (2603:10b6:a03:60::31) by BN7PR07MB4388.namprd07.prod.outlook.com (2603:10b6:406:b6::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1080.17; Thu, 30 Aug 2018 16:36:05 +0000 Received: from CO1NAM05FT023.eop-nam05.prod.protection.outlook.com (2a01:111:f400:7e50::202) by BYAPR07CA0054.outlook.office365.com (2603:10b6:a03:60::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1080.16 via Frontend Transport; Thu, 30 Aug 2018 16:36:05 +0000 Authentication-Results: spf=pass (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=bestguesspass action=none header.from=cavium.com; Received-SPF: Pass (protection.outlook.com: domain of cavium.com designates 50.232.66.26 as permitted sender) receiver=protection.outlook.com; client-ip=50.232.66.26; helo=CAEXCH02.caveonetworks.com; Received: from CAEXCH02.caveonetworks.com (50.232.66.26) by CO1NAM05FT023.mail.protection.outlook.com (10.152.96.131) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.20.1122.2 via Frontend Transport; Thu, 30 Aug 2018 16:36:05 +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; Thu, 30 Aug 2018 09:35:51 -0700 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 w7UGZpEC027359; Thu, 30 Aug 2018 09:35:51 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id w7UGZpxs027358; Thu, 30 Aug 2018 09:35:51 -0700 From: Himanshu Madhani To: , CC: , Subject: [PATCH 09/14] qla2xxx: Force fw cleanup on ADISC error Date: Thu, 30 Aug 2018 09:35:45 -0700 Message-ID: <20180830163550.27288-10-himanshu.madhani@cavium.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20180830163550.27288-1-himanshu.madhani@cavium.com> References: <20180830163550.27288-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)(39860400002)(136003)(396003)(376002)(346002)(2980300002)(438002)(189003)(199004)(356003)(478600001)(72206003)(87636003)(5660300001)(86362001)(106466001)(2906002)(69596002)(305945005)(80596001)(44832011)(36756003)(54906003)(110136005)(16586007)(486006)(42186006)(106002)(4326008)(336012)(1076002)(11346002)(476003)(126002)(316002)(76176011)(2616005)(51416003)(446003)(48376002)(47776003)(50466002)(8676002)(26005)(14444005)(8936002)(81156014)(81166006)(6666003)(186003)(50226002);DIR:OUT;SFP:1101;SCL:1;SRVR:BN7PR07MB4388;H:CAEXCH02.caveonetworks.com;FPR:;SPF:Pass;LANG:en;PTR:50-232-66-26-static.hfc.comcastbusiness.net;MX:1;A:1; X-Microsoft-Exchange-Diagnostics: 1;CO1NAM05FT023;1:HoDjvcJETMzdK9QdeIn8YQZXMgzqAMt0+5qp63oXkRt0NkYv9iV0wcKTb4U22/WXh4Cs7CsOS/cwof+i9O7fe8ev+pAoeYTZTJTkJwPshgc31NGCS8Qc5FJgcXHCbb5i X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0f0b3cdc-0a81-4d5e-f459-08d60e96ae86 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4608076)(2017052603328)(7153060);SRVR:BN7PR07MB4388; X-Microsoft-Exchange-Diagnostics: 1;BN7PR07MB4388;3:A/AOmOL9LKIX0aNONaYygXNrykx9WtPvSIEtfpDcFp5garSHPvG0yz/+s56m3QywkseZ4z8zStgW5xKpyFGZfCIfKbCNc/GdrAxWSJW6kqPV1o7Y0bAeqjhUnmJ5X1qJaz4i1NzO/m+DX2WS/7/+C3zxYKLoqmTbnvN6WPFWx0VJFq54gc4qyaj7LyH8+qYygEjfbVPmfqE3/+XQgL6EX/vKfRO39K887dj/MEnuuvtP12RacEX6lMRXIgzdUAG/PPZU93lJGEL0MeNVnx3Q8nsLizlp+w6tlx5S2U41JL58tw6+cudhUFst44jzTzljJoopU/3NwHWcqmb0NnD/rJVFvqo7FKVou8wzEJqi+Lc=;25:LyNKjQAhYS0c6llZYGGUktqehg0lHcEl++vwLA0jO0wsQJ0UHGxjS5x8zuErVbn+EpcMOozmMy/rEEzpMMkRNFYw4GgWaB49UoV470zdqLhf84EBl5r2Ndw2saR9pnZTUBeA5VocwwsX/2XhMGsgTEj3G8um5z0cE7aSAr4nJYR27hdGb1PPDNiRCgLeZbHnaPo32Zwk2WMa2JxVOFOZi63jzMZDqXsSKHdJSqBjSbXJ9mhHAKkk4YygWJdGra0T4uwHxPiGCHbOS7KMcsqCt73xY+zkyrrt5PDLoTXgila52m3zVB6zGUEftbm8vkQvpA4J4TgWPNNDVKRAtwTJ7w== X-MS-TrafficTypeDiagnostic: BN7PR07MB4388: X-Microsoft-Exchange-Diagnostics: 1;BN7PR07MB4388;31:oeZevR4ab+gkAxS6hSRwkJd78l9VHE6e8iav8gCC17nzwtpmuIfNw0iaJLOV0Cq8rMd2C+QOtUH/vJKO0OyPMZIa1OR/BNYflrJ+ouLHjItWwbFKDXrj9x53vs2Ah6R//3sPqQcFTbGBWvCz4pJXBmbdg2608wSpurWcdqYE9pUQSYAdGBdcIRtHn3IqyqSBIcujhneN8NzmhfrMejyw2Ea6m6RgHK+7xA4EGZjyxLE=;20:icv7e2dFfTPUiN/7xk4LTFfhNKXTtxsF0wTObZel/Msxjus0m8SRqxVPJSpX6AyvWV8gGnQnBs/5Ibu1eShTHpjRvKVmG13ubVNd44fCrstsioqEgrFy7n7EE+qeKfkdFQ6WjoDptWak6UrvZ2ueHW9F4dS5LlaZKnn0pihotcWBNc3LH3zhxIh4YW48AL9QFzFXLu5OIb08kz7XcWMFoDc5N4mXzu8Wx6BuM9Cx8HKnzp6+u5UCxDa6W+9GiZZskEGQgQWSwL1XXoKzDeC7qM2aMmxA8m3+8kPQPIvMyReh8R5hqaNzY/YnAaKYKutp/53uqAVRCR2ggwy4L3bm1h0OIvpbV84U1RGGbeuw61wYRKk0WqPAnP+1DQYE4g5CaUrQifHXKygG0DB6zEl+FPzdgAtqZhgX2MjfZ2/lAc9/UAXJo6M5UHs+WaObAOkYZrrbz8ut6+JSYryy/9orWsnaFiyUW1yY09ZvZBl4/rdmVOZH4PlgtWJqJou1KzlY X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(10201501046)(3002001)(93006095)(93004095)(3231311)(944501410)(52105095)(149027)(150027)(6041310)(20161123558120)(20161123560045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(201708071742011)(7699016);SRVR:BN7PR07MB4388;BCL:0;PCL:0;RULEID:;SRVR:BN7PR07MB4388; X-Microsoft-Exchange-Diagnostics: 1;BN7PR07MB4388;4:F8SYttsn4EdpwShJfEHWoEZUQXhLxq6qMDYQgw4mgkOkmjCbI4u+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PPOaOmj0xMycYkHAlvA+Rng0TK06PXL0RzlbwSyAp37JPUOGQB1TNG3dmDSj8k07qwEk5zMo1jNG2dnt6HDMdfqb95PpgNr28Q+5sUYde4ZpzJBX9agvfN1R4oB9dGmn734IhNALO0hhkfBIG2dfR0nSF1efdFm5Ww==;5:ZtQDEQgSjsPLvyoZRsO0YxBttyCBTgHR2ekYX2AD+OBhqzU7QQZSJmQ5R8Zv3h3E6jJVPYUEJzjg72Big0x3i5OF9ecqy7JttSrzRSSwKET/LBOxm1dRwHK6d5LrY8yxYbm3d1BgU0go5ey1TIhK/LgQDyHyYy9/lgd5MwtqPv4=;7:0u2zAgr+KR9saFCbzzp/baio6WVbFsLS7p9lJDzW7+S/KHjTIxlV3rxRi8CJSQooGLvJoJ9S8w4j1YvGoIIKYZM9rWG+7b82uMNXklllLKG2Ci2A6TUpWJVszAcsR42P4tTiZlVUz57RPTK2F4cumhQp1nQPqHLa2rgFGuinOEKhgDANzV5mwTKLGw+CEcToaMpp5gS2XXCs+bYI0vkLP+6ozpKeczObaZsZF1/x1KxUaYoauDn9rgKX/RIylwQh SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Aug 2018 16:36:05.2967 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0f0b3cdc-0a81-4d5e-f459-08d60e96ae86 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: BN7PR07MB4388 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 Turn ON logout_on_delete flag to make sure firmware resource for fcport is cleaned up on ADISC error. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_init.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index fa6f2400a508..f840199d31cc 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c @@ -396,6 +396,9 @@ void qla24xx_handle_adisc_event(scsi_qla_host_t *vha, struct event_arg *ea) ql_dbg(ql_dbg_disc, vha, 0x2066, "%s %8phC: adisc fail: post delete\n", __func__, ea->fcport->port_name); + /* deleted = 0 & logout_on_delete = force fw cleanup */ + fcport->deleted = 0; + fcport->logout_on_delete = 1; qlt_schedule_sess_for_deletion(ea->fcport); return; }