From patchwork Fri Aug 31 18:24:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Madhani, Himanshu" X-Patchwork-Id: 10584333 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 42D0C5A4 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 305972C535 for ; Fri, 31 Aug 2018 18:24:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 24E522C5B3; 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 9B9062C535 for ; Fri, 31 Aug 2018 18:24:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727536AbeHaWdc (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 S1727405AbeHaWdb (ORCPT ); Fri, 31 Aug 2018 18:33:31 -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=3rfL93jTnka9zLwn2YuzeMaSl9qD9rdLkNXDPu+Q8JM=; b=JV2ic7Do9FS+DSbHDLy3chNl3E2c5ggPLLEKsFhNhXidg2MwxTza3+5NoETtWB9ejJF1Re0jl0nNqWdcIzYW1sbjEysxazxhMAlPM/34npnCfL8XwPBK4yJjcEz5X5RrIKX22ul97yMu2u+nXUht6ExovnoOhElE5bEiw/6Nh6w= 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:47 +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:47 +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 w7VIOeBO024233; 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 w7VIOehY024232; Fri, 31 Aug 2018 11:24:40 -0700 From: Himanshu Madhani To: , CC: , Subject: [PATCH v2 04/14] qla2xxx: Update rscn_rcvd field to more meaningful scan_needed Date: Fri, 31 Aug 2018 11:24:29 -0700 Message-ID: <20180831182439.24182-5-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:iSpigCOBSU8RuTNS4YnE72kGi3iEWz3iFKau1b5K+7nmAKcSeiu5k+hDsYjd0wPSEstGFOIhAJc18YHN7QwbpxUf9tFxP0jiifU8M+ro2ywRjU/OFhWm9fFfZ1J19DwH X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3bd33d04-83e0-4507-53c3-08d60f6f0853 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:kS0hCn8IF6UqIpGAkhgBn7PsD3tNFjimy9jLXRAbLTe5NeMBxqRranHA0tcscOLMVivWOVghTKWcvMks/b4IrIANdYkzSSVBSRn5ecxTFfHUgYNbWJ0wbs6ln5neNVrgueWbeP5wX85bS9fyQUmnse0ZL866jU/S6svU7l8oAg68yRk5Ye8DlGLqjXeUfIPg6Yn8ywYmPZO6vXFjK5us7UhKojP6nz5VALdDqIKlM5MF2c2rCD/JyI+ARNvJtRQtG37AirKpWCXsXamWuy7QeAqQ87zDsstAHF1+daLb2QlMq0C+HwTu6P8mNrebHzRm6VTv+Hw6kQSHsnOa9CRIQt81JDq6jPg5ecIapx9PWBc=;25:yUNh9OjkrwJ3vAfmpkDWDUftB5IZHeiJ0Nx2q3cFPnLbtfyfGSZz3ImA91laAXwSj4Qz77GC66p0E3ZqMIZa3RtQQ1IphjWqV/qW2wLL39ffVPohr8tfDC82kQBaXJMBSurPimjugs2AjA1zSjeiDrBpW0HSLqxJbMY74M8iFKfxRL9dlw1HROylX2RF76TPkRiAL6+ezA87mNhvADITUDe3poLsfuJ3ybquJ0cGkYJE/CoLWFykrO2d5vpExum2WWtGWpFixQgzzUGLpdcJdm5bBFBmEJrzQvVzkTpy27xL8e22QDQKQibtQgRA+9pMPEECdYrV9NEJPM7/duJ/1w== X-MS-TrafficTypeDiagnostic: SN6PR07MB4400: X-Microsoft-Exchange-Diagnostics: 1;SN6PR07MB4400;31:OsiEytf7crMYKBL/sqv3lg9akH6QiSpnXkviI1INLA8EfNx/dFrI/pPBM5t0c6TdiUNd5ef/jbaJlg0erxwFDKRBpk3JWkdePlMBV6qLJ2M7gktdlgC708G47EJX7WUnZUSgyxjsQPAwR8V24DQhNKJiKherQnJ3bfme6F7zvFgJuqq3zMSwZGhwxTHi5AebKMbSnBZgOXJ7ZXimCqJGVETQnSS7VzTbPDgYC2uOz2E=;20:lQdrCwwasdTS04avzbMkcQh0SfZLuY1TivmRTNil8vMup8s76Z51WKNqyQen0/lbpqC1ifOWFjCew9zAgT6KlD1ZShtZiglzzGqz3dYFiz5HyeL43NPYaY924VanLjdR+DeI4h6aLcSlA3ID9k7Hoe1ZiS1+qqWCJeKd7FWj5iABI8/URcpYHwXwgKh9d6gznviT+rTDdwHFYqGxFPNbug7/IhUT26/B0lMeswo57H+40B65F2+aDsrXCf2qdmKj3Q1GId5uplHGhIWMl9xUw0rLBBFHJZgQJ4gDnHPFFwgLZpyZOCkG8KP6uW4mnW1vQevmk9gjRoykgA82+6XmyN8/WnqATPgPlSt1OsjOEbsAfixSl0UNZ0tYb+G/XymZKfjqm4Gl9V8MbYcl79zbqYutbPdKQtCWdfQfaU4251CFuymygSIXawOwjL1ao5Oig0MvS+nj55SLZ0KruKTgF1fG71Lv/cGxCgOxY5Xa2qQehF9EWpuj/7TEf3I9aEAP 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:Rd7ynEmY/R+gg0aRF3IlZG/r3V5Vs9s3aYfXQ6VJkI+nM5R0e/1O3gDuJ8LuRcmLd3v2h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JyHNWVYyw9OGJLT9XngtQK7hZTDfaXV/cCna95Bpz9AzGIo4lH/GUaZE+HAuxVMkyLR83QABYBYD9Ug+bwdduiAwfCobJSGFXExqJjKmEGQ22Py0OT4xFvVUEPEKRoSkowkbm4gZ78tx3LR7I3xPxohdpOXXDorBvl0Wj6gnBA==;5:xqYYKwrVAQ1HOBKn8cH7CTrGjkkGZbz25EuC1P6rhxO1kB/CHwJLpd6z1QJrDal+Qjztz2pSzoEE/7x+Hx/8xOmdaEsLkdJ2xWlshP8OmOzVq8mEHPQmPx8gH88FW/4L9NrsAddAmnUoLbJ48fU0hokyQ5osi3l473dtoznX81U=;7:IUy9IsiP/d5CeABcuQ12CJi9wdsDaVVhCJ90ZXy9fCuI6WESaWm4NpF06pvFc48haHK1mhyWwdSvKNClIRJWbYILV7gZ5+qZ5dPLnmZ613msD4kAyjQkt7yad+eOXdBYxo/YlqHwu2YCJQr7fGIlonXlnJYl5JbUZ7PjIzHfZ9RMejcKMBL9WgFmtfnWBzYPlznX4F1UngG+G7GovgaHGWMWoebw3q5cOHdZv3+s144w0lXx5VdIcVsxtfCoIVS0 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Aug 2018 18:24:47.2152 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3bd33d04-83e0-4507-53c3-08d60f6f0853 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 Rename rscn_rcvd field to scan_needed to be more meaningful. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_def.h | 2 +- drivers/scsi/qla2xxx/qla_gs.c | 12 ++++++------ drivers/scsi/qla2xxx/qla_init.c | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h index a9dc9c4a6382..c41d0dbbbd79 100644 --- a/drivers/scsi/qla2xxx/qla_def.h +++ b/drivers/scsi/qla2xxx/qla_def.h @@ -2351,7 +2351,7 @@ typedef struct fc_port { unsigned int login_succ:1; unsigned int query:1; unsigned int id_changed:1; - unsigned int rscn_rcvd:1; + unsigned int scan_needed:1; struct work_struct nvme_del_work; struct completion nvme_del_done; diff --git a/drivers/scsi/qla2xxx/qla_gs.c b/drivers/scsi/qla2xxx/qla_gs.c index a0038d879b9d..c0c738bbdace 100644 --- a/drivers/scsi/qla2xxx/qla_gs.c +++ b/drivers/scsi/qla2xxx/qla_gs.c @@ -3951,7 +3951,7 @@ void qla24xx_async_gnnft_done(scsi_qla_host_t *vha, srb_t *sp) list_for_each_entry(fcport, &vha->vp_fcports, list) { if (memcmp(rp->port_name, fcport->port_name, WWN_SIZE)) continue; - fcport->rscn_rcvd = 0; + fcport->scan_needed = 0; fcport->scan_state = QLA_FCPORT_FOUND; found = true; /* @@ -3981,12 +3981,12 @@ void qla24xx_async_gnnft_done(scsi_qla_host_t *vha, srb_t *sp) */ list_for_each_entry(fcport, &vha->vp_fcports, list) { if ((fcport->flags & FCF_FABRIC_DEVICE) == 0) { - fcport->rscn_rcvd = 0; + fcport->scan_needed = 0; continue; } if (fcport->scan_state != QLA_FCPORT_FOUND) { - fcport->rscn_rcvd = 0; + fcport->scan_needed = 0; if ((qla_dual_mode_enabled(vha) || qla_ini_mode_enabled(vha)) && atomic_read(&fcport->state) == FCS_ONLINE) { @@ -4005,7 +4005,7 @@ void qla24xx_async_gnnft_done(scsi_qla_host_t *vha, srb_t *sp) } } } else { - if (fcport->rscn_rcvd || + if (fcport->scan_needed || fcport->disc_state != DSC_LOGIN_COMPLETE) { if (fcport->login_retry == 0) { fcport->login_retry = @@ -4015,7 +4015,7 @@ void qla24xx_async_gnnft_done(scsi_qla_host_t *vha, srb_t *sp) fcport->port_name, fcport->loop_id, fcport->login_retry); } - fcport->rscn_rcvd = 0; + fcport->scan_needed = 0; qla24xx_fcport_handle_login(vha, fcport); } } @@ -4030,7 +4030,7 @@ void qla24xx_async_gnnft_done(scsi_qla_host_t *vha, srb_t *sp) if (recheck) { list_for_each_entry(fcport, &vha->vp_fcports, list) { - if (fcport->rscn_rcvd) { + if (fcport->scan_needed) { set_bit(LOCAL_LOOP_UPDATE, &vha->dpc_flags); set_bit(LOOP_RESYNC_NEEDED, &vha->dpc_flags); break; diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index 3eb3c4f554fa..6d9c8a017ae9 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c @@ -1551,7 +1551,7 @@ void qla2x00_fcport_event_handler(scsi_qla_host_t *vha, struct event_arg *ea) fcport = qla2x00_find_fcport_by_nportid (vha, &ea->id, 1); if (fcport) - fcport->rscn_rcvd = 1; + fcport->scan_needed = 1; spin_lock_irqsave(&vha->work_lock, flags); if (vha->scan.scan_flags == 0) {