From patchwork Fri Aug 31 18:24:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Madhani, Himanshu" X-Patchwork-Id: 10584335 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 DC0C61709 for ; Fri, 31 Aug 2018 18:24:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C96962C535 for ; Fri, 31 Aug 2018 18:24:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BDB662C5B3; Fri, 31 Aug 2018 18:24:52 +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 46E1A2C535 for ; Fri, 31 Aug 2018 18:24:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727539AbeHaWdc (ORCPT ); Fri, 31 Aug 2018 18:33:32 -0400 Received: from mail-eopbgr710089.outbound.protection.outlook.com ([40.107.71.89]:58496 "EHLO NAM05-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727533AbeHaWdc (ORCPT ); Fri, 31 Aug 2018 18:33:32 -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=ob9YUdlNJ45AQO641iwb7WEDoYzoeJ5eK9N7QHpQaXc=; b=lOw32/+UFAg+InruzqLr9iwDg79jG+kC57kyHwiZczfEQIAftW+CQaye0YznwL/SJpzqZJTwXamdSO+hECYrQC7bKIdAKc8og5AWEVABAQQDYlF1q1ec1ZTIQZ+LwskoIwxHZo4Tn6Ewq0xBDZV8XSlwEZ0sHnw3pzdPOaleLpU= Received: from DM5PR07CA0119.namprd07.prod.outlook.com (2603:10b6:4:ae::48) by SN6PR07MB4400.namprd07.prod.outlook.com (2603:10b6:805:58::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1101.17; Fri, 31 Aug 2018 18:24:48 +0000 Received: from DM3NAM05FT030.eop-nam05.prod.protection.outlook.com (2a01:111:f400:7e51::206) by DM5PR07CA0119.outlook.office365.com (2603:10b6:4:ae::48) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1101.16 via Frontend Transport; Fri, 31 Aug 2018 18:24:48 +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 DM3NAM05FT030.mail.protection.outlook.com (10.152.98.142) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P256) id 15.20.1122.2 via Frontend Transport; Fri, 31 Aug 2018 18:24:47 +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:40 -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 w7VIOe1C024237; Fri, 31 Aug 2018 11:24:40 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id w7VIOek3024236; Fri, 31 Aug 2018 11:24:40 -0700 From: Himanshu Madhani To: , CC: , Subject: [PATCH v2 05/14] qla2xxx: Remove redundant check for fcport deletion Date: Fri, 31 Aug 2018 11:24:30 -0700 Message-ID: <20180831182439.24182-6-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)(396003)(136003)(39860400002)(376002)(346002)(2980300002)(438002)(189003)(199004)(1076002)(69596002)(26005)(106466001)(80596001)(76176011)(51416003)(50466002)(4326008)(305945005)(356003)(8676002)(81156014)(8936002)(81166006)(2906002)(5660300001)(6666003)(50226002)(54906003)(42186006)(110136005)(16586007)(316002)(106002)(36756003)(48376002)(87636003)(478600001)(126002)(72206003)(486006)(47776003)(446003)(476003)(11346002)(2616005)(86362001)(186003)(575784001)(14444005)(336012)(44832011);DIR:OUT;SFP:1101;SCL:1;SRVR:SN6PR07MB4400;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;DM3NAM05FT030;1:tfYEPduLjTT4jTXWbH5YRdZ2F7Nx4XIWSs56GWPglmDq8QCon5qmoUzFpthGsxtslNrC/PJuA4ud7qMeFnrC8xG+uUVyoy0FmyU6VNayCEfAizxEN7Ta2/nQBc5DZGTY X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 947a7fc0-e79a-4414-8a5e-08d60f6f08ca X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4608076)(2017052603328)(7153060);SRVR:SN6PR07MB4400; X-Microsoft-Exchange-Diagnostics: 1;SN6PR07MB4400;3:2LZOmoZMxQ+YaEl+T43vcjIaw6Az4qtpJtfs08b4mDp1M/hxWmBaSL4Hzhbb58E4jz54bTvU01Lv5njcpF9WRPJveLgtwKrarUhQgSr7epIjWExn9sNr8Ui8BGwjHFMonUJw/lL0fQ8iMnvQ6ugAu55PdoJ/xAlScCv/6+XOJX8cjJ+rTaFpdEQAdctstApq0wZPsFQY6l4C+BDbQWiVY6M42Fcg6c/F5xz0dXCFVZyq2qlbOipJQB+Hj1WHL3vNnI3zBxOIdvWv3XKI6bVUkNYaLSgvbIctwUJfhoK2O6hRsvHKI32OlveEi2IzXarB6izXotGbF6VcyDn8ZBozicdWNTGccLNbRuWHvyFDgcQ=;25:wkJC1/faXlw4DDMS/Klxj5pMrlG17pXztLUtlVZMRsoOv+MOJgisMIN630v7O0Y80WmjLG0D5pUvRiZVaCw/oC/l5y96BBN8uwNN821qx1PMOXrfHeZBjdIwO8ATCOTaQ0gsguEsONC8hP8w0vOpXd+4ZjEaFOB6tqdxyhYveWQMRYHkUyUyGp+Sy/41aIHX7Ty6pmFoArT2fQ9jxiErIGSP37BHaASN0h7+PYV+TBmgb+kip7X0wEHRWlnokkEXY9bV7vcr+3EnYYGxkG7iSwDG0Ubeb+zU1pK/+fVjPTr/PZKd9ZuP+Rql1O/y09ACrzzw7mb7+9Y0qbZvmhT4NQ== X-MS-TrafficTypeDiagnostic: SN6PR07MB4400: X-Microsoft-Exchange-Diagnostics: 1;SN6PR07MB4400;31:cEVYiwkiuVzwOVcQ78mmb2tAhKYaIpsB8uB0ah+4CHBL7p6LxBtWs/qyJgqweAHhP6CSYKqhZLczPmcmzb+pFI1Fyko5f4ytndzZsDpYIPHd/riJ+Ik4esLA5vMXzK1C9J30PZuRXKnAIAKrBbWTcxORn9r61aW1NmWxB05Q6w0Qgry798H99CDtIznKLHGuZH+djTu1GusDnMzje/Os8CbQzrK2koJG6jp6S8ntGZU=;20:LdqPnqAVtenHbnOJbWE0n2hQONxZ2GThQsNAILASySRZY5KWOm0+YmX3LcxCcoNYdAJAh/zVER/P0aPcArdViC5Y44VR+bmLQP9KXC/53p2LMa5ANo/X+jih2LYRyh11wjGIPVpDBonVxrsquaWmn6MKo4GcFtlmt37PLgPB4gyPt2vOygkpKfTMrUbQnVs+ejv9ou3l/9oBP9TxVBDsrWR4RJQUxRSlCYwNNRdjw16NUuWBXt9CXOSSW/HfZxLgFTzP5DG/be6puE56tZ1yZQopwsOBfNLLbKMBFk1FFXHtYcb61GLVAsOl6U8thbZlGvs6BEyfzXf99L53940nzQMdGY7MVS9nztSo3ncUCv+w+asnVMS/8D6PGt3XqfkbfIqgxeFY/J6SLDrgU8BgW1qYwzMBBiDUXRHBTVM6g0R1B8GkcQzr/9uvmSZdbKPJWpSpj23WbWDxRneX98g0kmVIR4FoqM1GVyAjpPLVp1efhHNbOibdhVZbXWMMmq5r 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:SN6PR07MB4400;BCL:0;PCL:0;RULEID:;SRVR:SN6PR07MB4400; X-Microsoft-Exchange-Diagnostics: 1;SN6PR07MB4400;4:25Gc3pP0ZBe8Eop+VGpvYpnrhRUW/+TJ2yFm8txb199H4dpmB5yPKhdr+Roby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mEX/p9tQm+tPAICcOHSQ+ehRVmzNxD/EeYDFjwS0kkPu6FB9oJhDQ/mmH4Tas8reyF74kNDtQrl9lhBCAodbXmCbIaYkniJUBAd/3k/poL3RBIrL4nyQgmpiqD69mJlvScWqipbOYpZAt65TdHD/VLfEbq6DEEDkz0568Q==;5:F2fOP6v2VYyzyEmPXRFGyl5QcJKXu9ftoeQ6F9w+YclPE+D5CRts5bUiRkSIGSOmkgFvZmTpU+OUWgVgSsY0/kSuathscIvYdE7roHJ5inXquSBFhf0iyXzix9Qr81jsLzIbM7qlaU2Mw84WmOBuG6WrN2rU8iCeijpjj8XC5Bo=;7:4QpreknEimqVS2q6WUJrEY3xJrFkYc/9i8rmwEhq9ihQnQ/RuzxIGMp12amob/52uzwmy4YPuxnjq4yi8aX0M+ZTCTOfghlNgWZP75JMHwdB8Civ5hNMR9OpExsmAHTUtUeHmGrAbcep242YoVq13HhzzoAj5ATNPIyynJ8TcyQXZPf1nIcfRNNIlyQ3Vmie0KVJGXJG7J5ao535WSMvWwRz8oYkiB3PHidKKL+OdfkE5dRxhemzQIxlPta8ELzR SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Aug 2018 18:24:47.9969 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 947a7fc0-e79a-4414-8a5e-08d60f6f08ca 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: SN6PR07MB4400 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 Remove redundant check for fcport is deleted or being delete. The same check is already in the deletion routine. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_gs.c | 62 +++++++------------------------------------ 1 file changed, 9 insertions(+), 53 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_gs.c b/drivers/scsi/qla2xxx/qla_gs.c index c0c738bbdace..6e95ba0d3c8b 100644 --- a/drivers/scsi/qla2xxx/qla_gs.c +++ b/drivers/scsi/qla2xxx/qla_gs.c @@ -3442,26 +3442,10 @@ void qla24xx_handle_gpnid_event(scsi_qla_host_t *vha, struct event_arg *ea) if (ea->rc) { /* cable is disconnected */ list_for_each_entry_safe(fcport, t, &vha->vp_fcports, list) { - if (fcport->d_id.b24 == ea->id.b24) { - ql_dbg(ql_dbg_disc, vha, 0xffff, - "%s %d %8phC DS %d\n", - __func__, __LINE__, - fcport->port_name, - fcport->disc_state); + if (fcport->d_id.b24 == ea->id.b24) fcport->scan_state = QLA_FCPORT_SCAN; - switch (fcport->disc_state) { - case DSC_DELETED: - case DSC_DELETE_PEND: - break; - default: - ql_dbg(ql_dbg_disc, vha, 0xffff, - "%s %d %8phC post del sess\n", - __func__, __LINE__, - fcport->port_name); - qlt_schedule_sess_for_deletion(fcport); - break; - } - } + + qlt_schedule_sess_for_deletion(fcport); } } else { /* cable is connected */ @@ -3470,32 +3454,16 @@ void qla24xx_handle_gpnid_event(scsi_qla_host_t *vha, struct event_arg *ea) list_for_each_entry_safe(conflict, t, &vha->vp_fcports, list) { if ((conflict->d_id.b24 == ea->id.b24) && - (fcport != conflict)) { - /* 2 fcports with conflict Nport ID or + (fcport != conflict)) + /* + * 2 fcports with conflict Nport ID or * an existing fcport is having nport ID * conflict with new fcport. */ - ql_dbg(ql_dbg_disc, vha, 0xffff, - "%s %d %8phC DS %d\n", - __func__, __LINE__, - conflict->port_name, - conflict->disc_state); conflict->scan_state = QLA_FCPORT_SCAN; - switch (conflict->disc_state) { - case DSC_DELETED: - case DSC_DELETE_PEND: - break; - default: - ql_dbg(ql_dbg_disc, vha, 0xffff, - "%s %d %8phC post del sess\n", - __func__, __LINE__, - conflict->port_name); - qlt_schedule_sess_for_deletion - (conflict); - break; - } - } + + qlt_schedule_sess_for_deletion(conflict); } fcport->rscn_gen++; @@ -3548,19 +3516,7 @@ void qla24xx_handle_gpnid_event(scsi_qla_host_t *vha, struct event_arg *ea) conflict->disc_state); conflict->scan_state = QLA_FCPORT_SCAN; - switch (conflict->disc_state) { - case DSC_DELETED: - case DSC_DELETE_PEND: - break; - default: - ql_dbg(ql_dbg_disc, vha, 0xffff, - "%s %d %8phC post del sess\n", - __func__, __LINE__, - conflict->port_name); - qlt_schedule_sess_for_deletion - (conflict); - break; - } + qlt_schedule_sess_for_deletion(conflict); } }