From patchwork Thu Aug 30 16:35:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Madhani, Himanshu" X-Patchwork-Id: 10582309 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 4D847175A for ; Thu, 30 Aug 2018 16:36:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3BDE62C12C for ; Thu, 30 Aug 2018 16:36:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 302AC2C137; Thu, 30 Aug 2018 16:36:06 +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 A2A542C12C for ; Thu, 30 Aug 2018 16:36:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727687AbeH3UjC (ORCPT ); Thu, 30 Aug 2018 16:39:02 -0400 Received: from mail-by2nam03on0074.outbound.protection.outlook.com ([104.47.42.74]:29995 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727676AbeH3UjC (ORCPT ); Thu, 30 Aug 2018 16:39:02 -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=ZP6kuCQkItszpWXkn5OP3oasdK+nfe7mAqMGDP04ZxR9R95021Ud3leeYDgxJ/QGbX27FbiVu2DV8WBbtoqse6SZEUm/h37Gh4ABF2Ax0vqL1cODmJE/9Fg6TuE7W73LXCrZQQxNdNL1/4gGQQonHI9RMgtg6n7qP8jAj2Q1WHA= Received: from CO2PR07CA0083.namprd07.prod.outlook.com (2603:10b6:100::51) by DM6PR07MB4395.namprd07.prod.outlook.com (2603:10b6:5:bf::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1101.14; Thu, 30 Aug 2018 16:36:00 +0000 Received: from CO1NAM05FT009.eop-nam05.prod.protection.outlook.com (2a01:111:f400:7e50::207) by CO2PR07CA0083.outlook.office365.com (2603:10b6:100::51) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1080.18 via Frontend Transport; Thu, 30 Aug 2018 16:36:00 +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 CO1NAM05FT009.mail.protection.outlook.com (10.152.96.116) 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:00 +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:50 -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 w7UGZp78027343; 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 w7UGZpPb027342; Thu, 30 Aug 2018 09:35:51 -0700 From: Himanshu Madhani To: , CC: , Subject: [PATCH 05/14] qla2xxx: Remove redundant check for fcport deletion Date: Thu, 30 Aug 2018 09:35:41 -0700 Message-ID: <20180830163550.27288-6-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)(136003)(346002)(376002)(39860400002)(396003)(2980300002)(438002)(199004)(189003)(106002)(81156014)(50226002)(356003)(81166006)(42186006)(26005)(69596002)(186003)(8936002)(305945005)(316002)(16586007)(575784001)(446003)(54906003)(110136005)(336012)(80596001)(126002)(86362001)(2906002)(11346002)(8676002)(106466001)(2616005)(476003)(44832011)(486006)(14444005)(1076002)(51416003)(6666003)(4326008)(47776003)(50466002)(5660300001)(48376002)(36756003)(72206003)(478600001)(87636003)(76176011);DIR:OUT;SFP:1101;SCL:1;SRVR:DM6PR07MB4395;H:CAEXCH02.caveonetworks.com;FPR:;SPF:Pass;LANG:en;PTR:50-232-66-26-static.hfc.comcastbusiness.net;A:1;MX:1; X-Microsoft-Exchange-Diagnostics: 1;CO1NAM05FT009;1:rGFwD4syzDlh/KX/NzzoTjpOU6/Pu+2N1G1KjoSH6sTGfIDmQfB5apgCRv5aC2EgwPKNrDbw14Hg9bYh2WiznBL99d7hYFalL9Rk+vAkzX6SQ+ViK0re4bd8AEL6yA5I X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7ce2967b-8283-4af2-7eae-08d60e96abad X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4608076)(2017052603328)(7153060);SRVR:DM6PR07MB4395; X-Microsoft-Exchange-Diagnostics: 1;DM6PR07MB4395;3:vnkqo+0JJqZCgp8HviLBuntBpKA2nC8N8lsbNrLJdCLN+8aCvA7h+TyeDAU5djNwWMcxjngcGOW5oPouHYPHLQ88dPYKcdwGefmwCzfHzBwlt+1Re0Xyuz3AUz4lEPW+TJ6zYMkvYFM5aCbli6xXZBlX+j+x0Weo+r1XJyCgKjI/axAjCsvScsLOPEGpL5vnsd29JGigYhscpTHEealVRPkYOAkq+AUN9LdmBimdVwN+64Vx1dk/SzlwChvBqzJ3ZXOCiZ10vLavuTMxdNdl3zQ0yoQU6A5GgDtpMtJhSEN0MToF4PZPfVXoN+U52BlmvpiKeNLPj5u6LynklibcB/QKv4brOKqT/TaTLk1z9Lg=;25:THbqqb1mtP/TtrVrITegKCWGJyg+k+vmZjLBqpM45Af9JXg+gdJHnx2L3Ft68LvGSjWYBpIWZTia5bxWmPZPd+zMtckVgxZN7CPfBLnSBE+kYNMf1R+F8qUArJKJG1U68/ZKrUeGU1Y9qh3CHqgJ7xDFWqX6kULHKVrbfLf99qFBxY/JnKJ/MJj9YmlA3D8iu3lsFkMEbgdh7IXJVO/uUwEgRjYTrSuG63IPdMyPrQWRS4Yy77FMpwQdxMTDJB59AEQ+uhpXJ41+LDfJ86/FTR0e/gAaAYDxdEnULnhMQTE6jusd/SiFnYS0R15jetJBHBRFpa2aQJ/gbwbpf82oCA== X-MS-TrafficTypeDiagnostic: DM6PR07MB4395: X-Microsoft-Exchange-Diagnostics: 1;DM6PR07MB4395;31:4UsdbGXWHWYyPw4aipVUIBD0akm6gcvMIo3+Sjua6f2QwrQ1cVWfEmqxleuxZTGQQKN7Huay76srfY5q+mDk7V6F/zECuKYWm8DubUitvz/jreuw+j5fTh924l0sNyYiMeOVhP2a87BDCYybARFFdGOjxyRv3nQshPuidDBOrKeEFawFyHzaT0Valtbsrr96Nhwz/m5aM5X7GPz/MM9/u1DVSXzxPIFg8OtS8e4rLac=;20:vLLaKi2xuAU5lYXAoIBidln7vQ1d1HGxHnzelTFCH7v1AElI9g/331vUgb2EfzlHNJrjksPENaz3dht/ad97QLHaYuNi7NaOPFvxUfHhzo6F7g8zliHvyzYWsbEM759/HZ4ub8VsOA+ekafcxyIa8w+SAoQs7eV70r8DmpNwauralGaK196hyh/Iv1DJLcZMqsWgDAiqcmnK4T8FvlCGu9oHVuO/axGVAFPzRJAVyaqVXvoNYQ2F6pcIHDieRxr5iG4fi6Xc3C1YQZ9ZIJSZMnv+xQEHXpSxZgbmKwe4942cQkgeqqamnfAl0xaIL+jt+9Oxn2gDsNYIOqcLX+wl/I18pcjMJLQUnJht7MLIBDCgLwBJruhz0FZlUQej6u/ZJ9wKFAxdHwARfIoOD71ntZQQlOdwm+DLLY750rA2ECXtIB81kg+8IjUIuHRDc87JZIkZf0QZcgrvxlYc8PlCEg09rAVgVhtKphQdMX5iBXjbw+gInZdgrGZWHz5+waM7 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)(8121501046)(5005006)(10201501046)(93006095)(93004095)(3231311)(944501410)(52105095)(3002001)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123560045)(20161123564045)(20161123562045)(201708071742011)(7699016);SRVR:DM6PR07MB4395;BCL:0;PCL:0;RULEID:;SRVR:DM6PR07MB4395; X-Microsoft-Exchange-Diagnostics: 1;DM6PR07MB4395;4:MKpLh6US2XZIMLINl8a3AdzfBTZxqQClIdmzJbK7Sd0BEQX7DbXRwC6MV7I3IS1Raru9w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PlB8duGQX/zjO5/vZoZRmEVfi8hkJVZVDVU7J5HQ3AqKU+Y/Prp1roH0p6r4Np0uFWI+1agG9dt1oANCQMMATu2QCe6TweSEJq3U5mUx9qlzRWAzAx9ElahLgtvA79pRsGj+RcKWHn5Kn2rIsntU4Qqrf6Y3MugMNeew6WNVAVMx3M2SGYNd/u5a7JA==;5:Ba7QIIgBA8CIWlqYeRWMXGT0AA+R88t9VcZjEd7U2IYFJtbcoLSYeP87AdSUAP1Y55PZA3atCA/FnpYALYD8xaPaagcaFf2q0myL6CTN011JzPsXvGipE9uA0ENeFFYtlbSimdNUNAe454v24AzF42cG5Aq9QoJcs+tZllisk/w=;7:zsQo2m11tLblMPfOp0sJADyPCvGfX9UgzEpNNwq/NCJYsk8qxJMXPjiy+CgOLq0mr0AfuwXDLeO3LKlURO8BlX5sjJkFTfb65PL/ZjZR1GJf8/unRZ9Md/qcCb42LndH8bq5fLPot2C/DnWJ4h0F9u95yov63k4COREcmklz7xS9CBPStR/Whwd9Ld7UCCWg8rCHFI6wiVbLUENN1Swpencsn3nz6NSOIIU/YoDaue/qXbLbSJOAbT3atRXj8VEI SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Aug 2018 16:36:00.2817 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7ce2967b-8283-4af2-7eae-08d60e96abad 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: DM6PR07MB4395 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); } }