From patchwork Fri Aug 31 18:24:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Madhani, Himanshu" X-Patchwork-Id: 10584343 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 404A2112B for ; Fri, 31 Aug 2018 18:24:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2F1E72C535 for ; Fri, 31 Aug 2018 18:24:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 237A12C5B3; Fri, 31 Aug 2018 18:24:58 +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 A90D82C535 for ; Fri, 31 Aug 2018 18:24:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727589AbeHaWdi (ORCPT ); Fri, 31 Aug 2018 18:33:38 -0400 Received: from mail-eopbgr700053.outbound.protection.outlook.com ([40.107.70.53]:46796 "EHLO NAM04-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727557AbeHaWdh (ORCPT ); Fri, 31 Aug 2018 18:33:37 -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=LuJJb2PCV+imqraTASxzlvv7bmhE0B6g3Ct+gK2XVyg=; b=WaRL33RL5GUfe7ql8O4m8C/qBtTFKCANO82LQXZfAMSAkF+YCfmZKe/b7/7Bk8bMiwZ/t1RMcKHY7bdM7K0mElMmMgVkenmqFjgQk5H4S1tKLIjActVnGfW7Zl+Wg7YHsuEAmUFAGDTwx8VsOecO+dBaH2aI+GxxgcDScIFzmFQ= Received: from BYAPR07CA0005.namprd07.prod.outlook.com (2603:10b6:a02:bc::18) by BY2PR07MB1442.namprd07.prod.outlook.com (2a01:111:e400:515f::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1080.17; Fri, 31 Aug 2018 18:24:53 +0000 Received: from DM3NAM05FT013.eop-nam05.prod.protection.outlook.com (2a01:111:f400:7e51::204) by BYAPR07CA0005.outlook.office365.com (2603:10b6:a02:bc::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1101.15 via Frontend Transport; Fri, 31 Aug 2018 18:24:53 +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 DM3NAM05FT013.mail.protection.outlook.com (10.152.98.122) 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; Fri, 31 Aug 2018 18:24:52 +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; Fri, 31 Aug 2018 11:24:41 -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 w7VIOfLa024253; Fri, 31 Aug 2018 11:24:41 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id w7VIOeA2024252; Fri, 31 Aug 2018 11:24:40 -0700 From: Himanshu Madhani To: , CC: , Subject: [PATCH v2 09/14] qla2xxx: Force fw cleanup on ADISC error Date: Fri, 31 Aug 2018 11:24:34 -0700 Message-ID: <20180831182439.24182-10-himanshu.madhani@cavium.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20180831182439.24182-1-himanshu.madhani@cavium.com> References: <20180831182439.24182-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)(346002)(136003)(39860400002)(376002)(396003)(2980300002)(438002)(189003)(199004)(5660300001)(6666003)(4326008)(106002)(47776003)(69596002)(336012)(80596001)(11346002)(486006)(1076002)(2616005)(126002)(476003)(2906002)(446003)(48376002)(356003)(106466001)(50466002)(76176011)(305945005)(51416003)(8676002)(81166006)(81156014)(36756003)(186003)(86362001)(44832011)(16586007)(54906003)(110136005)(316002)(14444005)(50226002)(42186006)(72206003)(8936002)(478600001)(87636003)(26005);DIR:OUT;SFP:1101;SCL:1;SRVR:BY2PR07MB1442;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;DM3NAM05FT013;1:bt5L3wuygNeOn9QAwb4+irFI9YO7oheHqP3r+Z8eaGEda+HaDATWWf+39vg+/8GaWwwc3GQZHBjNds4aFxV2kmN/Sahs2v7vUXCQ78NwRbYfBI0iD4GqL6qw5VQSrS1c X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a8bb1410-4466-4984-b31d-08d60f6f0b95 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4608076)(2017052603328)(7153060);SRVR:BY2PR07MB1442; X-Microsoft-Exchange-Diagnostics: 1;BY2PR07MB1442;3:rEICRTjRBFH8sGqeKXGTBrVZg2KNtRZGj/O25+TZMW4vPie4NwS5oRlcFU9EcbtY/2Lmt3SAPreZUF27i99s/CmryIImOv3dx/kArKzpp7h7mjJUD73F5mqP66p49EC2p7DvqHIWBdwHZ3ARqh047HyOKxNQ+oZlBpciW9sjX/kBko9X9IP8I9awNKJ5u9bsp7lAOSyQp3Fgs8BBga31mOxLKgTNWDqMItAtnE4wKFvkM+pxVz0GJZmW26eG7HYBuB+5eV6LsIv6DxVi6FrXVZAqUkk12l1XNN9FtHZiw1Im2MW4CO/eZqbrGn++CLNyWzKtEc5hA2fe0YdeTUA2hsnttpaLc8Pqumi1y7tP0W0=;25:9iwGTCj7tR7KJ65tnQHmb2MP9h+n7FRxozofv/KyIjO/gUJHDKuD4ipyO/BaQIYtaGyrQNf2W1hf9+XkQ43RKvlj96zHR6ArOCdppIEjdSSCbenJmwAs2P9OFIMIkEBm0wcppdU5BiB2fSU7nJ8BEoWAxWbYCf8nMYejYzYp7oR+kWL7KJuvnWXH0Hrx4FT0/eZu1Mn1XI4OTEKyZM8LBm4re1JXkfMw4j5TvJikNEpaTJZexITDMqQ+uDe15uQj3ZXcnLR1arTZiN/+NwhZXv+DJMBbGDxUXoxcBuhj6Gs9hox/qhTk5qV5+7Q7+XnR5WifmPtM6pfMkLEYF6UZbQ== X-MS-TrafficTypeDiagnostic: BY2PR07MB1442: X-Microsoft-Exchange-Diagnostics: 1;BY2PR07MB1442;31:lTZJoBo1vmMrhXfLxuADSlY6x3yrmQflxab5gaHBIvCtH5eyhnHinAazwOPPJOYYfnMADpklf3clVmT8h1cfHEtQbX6aKslxteqlzcKBIxoo7nNHKkvEtGSS85dO4915iqEdSLnSaIMYRRmow0dbW5DouL1ohCX1DyLfNOZBPcGXB9S1EyCG4CpPnSaZEn0m5tE/2wt3yA4wjaGWgSwt78+xraZd2rsbD2ozeHRd5l0=;20:hmkUVcltKpplIgTdI6eZM+vULCT7mumEzhMZVIwfeIF62T5WzMqHzaMECaTQZ+9uBwZtYRvw2rZDj50ZgfXopkNvyOXbIO2v4NpGkX08vjQtOtAF9YA0rXfL8nOIZkD9hNkPkm+ghX+ZFxCvmt+i+eNYksERt0zBIl5R8RdOZXXayT8k1CC+lFn9N7Pe6vK+bApUolfzv/7w+Zcsa3CFyfh62IXrNqiaLteBaJxfKhjVCd3xkDCQTyFNLztRwGRmz+AYa9dSocJMFe6y3w0iPGKhT9DLxnAUX/wZrxWA1/uBWolvx/K5jKXWdM4pj6/AgNzAkJ35vGykBCslfx45E03nFpMF0qtyhVRxKBVYA1cgrBrJkDQnaTtTZpO5+7xzy9xpaWHBVeBpvehEp9RBnrORKtSK6g8k+xiwZ9UBaj9ETglTi5L2LAAEeF39GR4NEKIIuKSqXACPaw3WkKOXYspb/d3hLPrXhlRp1recY9IlHD1vH/bnXDg8Q+39NqCy 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)(93006095)(93004095)(3231311)(944501410)(52105095)(3002001)(10201501046)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123564045)(20161123558120)(20161123560045)(201708071742011)(7699016);SRVR:BY2PR07MB1442;BCL:0;PCL:0;RULEID:;SRVR:BY2PR07MB1442; X-Microsoft-Exchange-Diagnostics: 1;BY2PR07MB1442;4:ZJL1j/zrMjSicq4hjKl3+i80/EdnxFSucYBEj/harYof+rMMbdyiqYGE1HL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yPdu9crXMgVIr04ZQElxffqnHkFzJr/cHQixIna1hcdPJG3BFCxTK3Lnk/tdyh2R9ZGEqZwSgusvE2VZDrc7i6/fkJELIUu83xW6UOV7KQdNf3Pgzk7FXg4ledygzlE/oow0g+lIOTq2wwt/YdHC89cuXsg==;5:8/U+jDQwslGHo5LxUfsbSQ3UpJ3HbbzUNQzicAE/RcYcUjH6/WTJC1LQhej4TBY1mSWzhikPCVoLzaRQ9lBJVydf4UqFHpZ1ukrjNyf8/mh9raQoQKXAxgoe3uCAKErIxbOIlom0qFw4VgdYfplaBiLFUngbe/TALGpatKpM0U8=;7:O6WUWZZEfWldVguH2BXdBMORs1/GbILN0bdh5ePg1vtGIiuA9LlIg7dAOzMKXR1y96tppXfcFJptQ5hoCs0eIeBZPESEs5BIWWA5mujgsYyTswcJIY9iPJc0Z/xC3eZQC/YNBd5+FXSWqyYejzgtFsFdJnaXVV44p5B5+Z3WwSkZHLbBDv1JYexN1yJZsvFERxAUEgHae+X18ZV9QiFEU3xif3OixeEJZH2f39rri4DunOWnRjjuquznyMK3ZOMR SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Aug 2018 18:24:52.6681 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a8bb1410-4466-4984-b31d-08d60f6f0b95 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: BY2PR07MB1442 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 0f069eb06d8b..f8f55184f542 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; }