From patchwork Thu Aug 30 16:35:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Madhani, Himanshu" X-Patchwork-Id: 10582307 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 568E15A4 for ; Thu, 30 Aug 2018 16:36:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 47A8C2C12C for ; Thu, 30 Aug 2018 16:36:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3C3202C137; Thu, 30 Aug 2018 16:36:04 +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 B9F222C132 for ; Thu, 30 Aug 2018 16:36:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727686AbeH3UjA (ORCPT ); Thu, 30 Aug 2018 16:39:00 -0400 Received: from mail-sn1nam02on0040.outbound.protection.outlook.com ([104.47.36.40]:27098 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727675AbeH3UjA (ORCPT ); Thu, 30 Aug 2018 16:39:00 -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=Wm68DLLUCqG6ve579GW1Nt9ciAovhIySm7i91eEfyM0=; b=E7Dinu9Gt5KRosp/irRuYNtLc6jdoIqx50vGJPRZR8tdVFhSLWGPlAb6jpe/fFhRDO/OIwyFRc/sPcIbjvQY9aqx8T3c2gjRmTLvC+qCIb1vJZtLSMJUxdPcvHxn+kZ7lWL3sGh07L7Np/5uYd1LAtHnKOStGwmT1TT0Fp7sRvU= Received: from CO2PR07CA0050.namprd07.prod.outlook.com (2603:10b6:100::18) by BN7PR07MB4660.namprd07.prod.outlook.com (2603:10b6:406:f1::18) 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:35:59 +0000 Received: from CO1NAM05FT009.eop-nam05.prod.protection.outlook.com (2a01:111:f400:7e50::203) by CO2PR07CA0050.outlook.office365.com (2603:10b6:100::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1101.16 via Frontend Transport; Thu, 30 Aug 2018 16:35:59 +0000 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:35:59 +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 w7UGZo6n027339; Thu, 30 Aug 2018 09:35:50 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id w7UGZo7F027338; Thu, 30 Aug 2018 09:35:50 -0700 From: Himanshu Madhani To: , CC: , Subject: [PATCH 04/14] qla2xxx: Update rscn_rcvd field to more meaningful scan_needed Date: Thu, 30 Aug 2018 09:35:40 -0700 Message-ID: <20180830163550.27288-5-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)(396003)(376002)(346002)(136003)(39860400002)(2980300002)(438002)(199004)(189003)(356003)(50226002)(2906002)(5660300001)(72206003)(87636003)(86362001)(8676002)(81166006)(48376002)(186003)(26005)(81156014)(478600001)(575784001)(50466002)(51416003)(76176011)(42186006)(106002)(14444005)(6346003)(44832011)(446003)(16586007)(80596001)(110136005)(2616005)(486006)(476003)(47776003)(6666003)(69596002)(336012)(305945005)(106466001)(126002)(54906003)(1076002)(36756003)(4326008)(316002)(11346002)(8936002);DIR:OUT;SFP:1101;SCL:1;SRVR:BN7PR07MB4660;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:8nkWxV+DBY7P5U160boEcGZiD3Kcuec/3Dj+hVs3XGVh4OTT5+xawk6gsXNM7xs8k9LntUPCqESPxKeV/3/WkM7z59X6JoZHIgwyBviOuDyGohxAf/CUq0llvkDhZ7qE X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2bcedb96-6bd0-4612-ad0a-08d60e96aafa X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989137)(5600074)(711020)(4608076)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060);SRVR:BN7PR07MB4660; X-Microsoft-Exchange-Diagnostics: 1;BN7PR07MB4660;3:/T+6kc/iV/BHUoZnrs9770NvowvGQfpyVBehMp8Svw2QuzxVYeErhM3hZAIaVftJox+V3vyp7Y0yoS+/zLlu8dldCdJve7HLdrw5Ii6xwUeabodpOKpebtJoDspxDEmLIqmOyggCq2LxnjGmI+LOvGr3P5HO+DCQjXl0MFQH4Me68EisIao239HpGWJJzlwo4NELHA9vsBt0kZoqIJq43+E1QVMcGN8MC9TfIySPKw6HnP0pjYizgy+v5NECMjGB6WgGL4ElvQV45dUS2ACNaaqyQHWND3ArBRZdmqSMkjT5ocV8O/DX6ztr8/mA3vuTnYSbz/qXBSohxU80MhgpkTfolMS6J1p0yAe0McLUGXw=;25:5UvI6dJYGGzzEJagVEvwab7U2P7tsEhM8VPZELVtvWLoHpshRuYEzftwS270IJTVwM8skj99q7ohG3cPxzekPOguf+5bliv0MTl1/OHPL1kNTm6RmwvmvgrcoKf0WmZYa7886QhUshWsQAT8Y2cU4t5HJvZaeu6jvowgxL2sv4+Q8ZTuJSHhztmGbvbb8ANnsB13lOQqPbS8aIlgHTrfmvSqwJSj4AAYOZDS6Hd8qaX3RyEQNxr8MMOnG/GBgC1VxRNOQCrJVSFUB5sZ+eYq3f8bLT48rzZxrPEVOyNAPcp0jGazLWnN14MmrFIU4E/o2JFvkD/uhz+pLpC5RkM73g== X-MS-TrafficTypeDiagnostic: BN7PR07MB4660: X-Microsoft-Exchange-Diagnostics: 1;BN7PR07MB4660;31:u0BUFh2zatPFvF1jxRPfPirIIKCj1T1KP5kMI0lZaBSuHN6rj1iuLdDF05r7ypEBPF4Hdcnj+a4kkmoxbi7AS9/JRjgG8Qru3+Oou3zInM9ZSVS1MEsEfC+1Eaq8s5TAAY69KwgU44f6OouIoSTzARj7mtET8NZZq1PICYQ8h/N5zaihT5pOT5LABKooniMsnWqN5Qhl5SAq2wi8JNzkYn3tKecJv9lQNnosbyFsUJo=;20:6xsAp/mVQeGu4NExrji9X+uJHyqFNGnTtfRNcsgiiEn/GfxXTsi2DazMH7gi5rP+3b05wsMDUccOsF5fua9XR2klrdJE7+1SkeKOZjK+yZ/68qw/juuFl9aQz7X2I/x1Vu631v/wSkQrsSANK3oun2vHY7Lg64MLH9mMdnBRnzHSK+dW8nXBthhBuz1HEfXbswmaUxcotHJEXd4JfkNdCf67WQWMVA1rFC779jlNJafaCv3ZOzS7+9EH76kRqKFrEWDzc7/Iln2qjw7o1fA5PG6H+p3Y8Oy52/6dce9I6kCfVgAfq4jJBVkk1bwoM2xpGweeOxe8MtCZZpDRNXmjEn4mOy3F4ysPy9EB+aSUnWWyV7U9LKZfHvD/cwzHSQjZ+kbrwijeIxS+Thuk3vLqGkXYffzxtuRoozIZbzmHLoDnXSn67OL2FL+qcODY+iz7bJxaReukFbUN6c7n0amp9btKbGuLjjdC7jDAmue6nMYChwA3RLOOodOsa2zuBOZK 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)(3231311)(944501410)(52105095)(93006095)(93004095)(149027)(150027)(6041310)(20161123558120)(20161123562045)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699016);SRVR:BN7PR07MB4660;BCL:0;PCL:0;RULEID:;SRVR:BN7PR07MB4660; X-Microsoft-Exchange-Diagnostics: 1;BN7PR07MB4660;4:OM7hBYLKuXEhf6O2h7yPX2OE72UnuZ+Mz34maSgbsn098neiq3LOzJQcEVm8sVN4POL8KJL4VPtVLl+uT75sTO1MkN7gc8w2TPZRrijMns7pLriBJlm5u5FeUNaYCFfq3+OVotW8FA2Ab2b1R5Wlawqtj49+dV96FsvNwe837wVLRydzFjl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puwFVrp4+CTVmwCF6LPrWp6PTUth9jaMr5NPEVld6fDwi/oardM82Xg58XAiht0qnrSxF7wjPG2SjCh9Q==;5:fNC+PTgYF5ki4FW5RiDU0B+XQTJbNaL6kDTCKZ/p5P+P38fH8k73eFuy3hk7l2ORFzJdou2+eEdfk5gyTNKcGDGA3KMnI7Sca/ItKRyB09siXUbAlZmolYV5UFUDxUIviTc852cetA8JkFwota7BaFlZk+VZoRXE78XdgBkTRt4=;7:lqDE7Elw1zJOMtwrtlCcSVPxnLBlRmvLoVHzcafctfpSGHJciLzFjovRQRtkzAmXb/xHwNKAuhsnRUEUEzOwJs1hePxOsSlAZkXdZiyii3X1SCsXAVZYOTSwYnFlxrX9Xkyb22FKuwC3zEn0VcUOaurBH2wpmBIHUv6Zc7+raIThGI6TxtU9QwGzmnpo9U/zsenKHnTMFA/GZ5GSGLsbitMn9C/NuZUgAeIJJpBrkQlAOGA4CSHzqOYEcUtaNM29 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Aug 2018 16:35:59.3442 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2bcedb96-6bd0-4612-ad0a-08d60e96aafa 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: BN7PR07MB4660 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 53c4eb3b9c27..cb00fd740d29 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) {