From patchwork Fri Jan 25 07:23:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Himanshu Madhani X-Patchwork-Id: 10780727 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 CA48213BF for ; Fri, 25 Jan 2019 07:28:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A67ED2EF78 for ; Fri, 25 Jan 2019 07:28:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9A64E2EFD3; Fri, 25 Jan 2019 07:28:19 +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,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 5978A2EF78 for ; Fri, 25 Jan 2019 07:28:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726520AbfAYH2R (ORCPT ); Fri, 25 Jan 2019 02:28:17 -0500 Received: from mail-eopbgr810051.outbound.protection.outlook.com ([40.107.81.51]:43968 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727210AbfAYH2R (ORCPT ); Fri, 25 Jan 2019 02:28:17 -0500 Received: from BYAPR07CA0053.namprd07.prod.outlook.com (2603:10b6:a03:60::30) by SN6PR07MB4382.namprd07.prod.outlook.com (2603:10b6:805:58::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1558.16; Fri, 25 Jan 2019 07:25:35 +0000 Received: from DM3NAM05FT009.eop-nam05.prod.protection.outlook.com (2a01:111:f400:7e51::209) by BYAPR07CA0053.outlook.office365.com (2603:10b6:a03:60::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1558.18 via Frontend Transport; Fri, 25 Jan 2019 07:25:35 +0000 Authentication-Results: spf=fail (sender IP is 199.233.58.38) smtp.mailfrom=marvell.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=fail action=none header.from=marvell.com; Received-SPF: Fail (protection.outlook.com: domain of marvell.com does not designate 199.233.58.38 as permitted sender) receiver=protection.outlook.com; client-ip=199.233.58.38; helo=CAEXCH02.caveonetworks.com; Received: from CAEXCH02.caveonetworks.com (199.233.58.38) by DM3NAM05FT009.mail.protection.outlook.com (10.152.98.115) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA) id 15.20.1580.2 via Frontend Transport; Fri, 25 Jan 2019 07:25:35 +0000 Received: from dut1171.mv.qlogic.com (10.112.88.18) by CAEXCH02.caveonetworks.com (10.67.98.110) with Microsoft SMTP Server (TLS) id 14.2.347.0; Thu, 24 Jan 2019 23:24:28 -0800 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 x0P7ORLS003596; Thu, 24 Jan 2019 23:24:27 -0800 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id x0P7ORUw003595; Thu, 24 Jan 2019 23:24:27 -0800 From: Himanshu Madhani To: , CC: , Subject: [PATCH 12/13] qla2xxx: Use complete switch scan for RSCN events Date: Thu, 24 Jan 2019 23:23:50 -0800 Message-ID: <20190125072351.3504-13-hmadhani@marvell.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20190125072351.3504-1-hmadhani@marvell.com> References: <20190125072351.3504-1-hmadhani@marvell.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131928747353705450;(abac79dc-c90b-41ba-8033-08d666125e47);(abac79dc-c90b-41ba-8033-08d666125e47) X-Forefront-Antispam-Report: CIP:199.233.58.38;IPV:CAL;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(376002)(346002)(396003)(136003)(39860400002)(2980300002)(1109001)(1110001)(339900001)(189003)(199004)(110136005)(11346002)(105606002)(446003)(8936002)(336012)(50226002)(2906002)(8676002)(81166006)(81156014)(36756003)(305945005)(36906005)(26826003)(87636003)(26005)(498600001)(54906003)(106466001)(42186006)(316002)(16586007)(51416003)(76176011)(4326008)(14444005)(53936002)(86362001)(1076003)(85426001)(48376002)(486006)(80596001)(47776003)(68736007)(476003)(50466002)(97736004)(2616005)(6666004)(356004)(126002)(69596002);DIR:OUT;SFP:1101;SCL:1;SRVR:SN6PR07MB4382;H:CAEXCH02.caveonetworks.com;FPR:;SPF:Fail;LANG:en;PTR:InfoDomainNonexistent;MX:1;A:1; X-Microsoft-Exchange-Diagnostics: 1;DM3NAM05FT009;1:XPhat2hbVUzhpb0XBoadL73aZq08U5Z/VQFoJ8IRHksFCFsksVNP2cuDWughlQQ8YOrQGvm2DFjAw1MCf+esZoiGsKvcMK5s5vjEHXbDp7cwjcGb0nvlTR6wiZP5RbCyoEWgu+Sd5Mswj/YkqJPlFA== X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f5ac0cff-7858-4ac6-9679-08d682964c24 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(5600110)(711020)(4605077)(2017052603328);SRVR:SN6PR07MB4382; X-Microsoft-Exchange-Diagnostics: 1;SN6PR07MB4382;3:hhoiFMqdMdqMFrahwUxd1TbRHJD4N1IaYT3pDB394mme4shbkWYx+11bObt8LtLr2pWT6WisdxbgtN0MUHAAShsqbuhqYYLUgpREJuIeYGynZuO5pM41WTQP5R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O1xnJZGRbXFn81Yb2jz60bCpywtceD2aP7pwrLgD+vrt9X45x5DmOWI12Y7CjK7gKDRqKN0WW8kYR+MaNMsqmEUFfNurRAucJab66n3BlHGkjoLvpcrD7DjYhl/xyMI+Qi61HCZxP8XevMYiKRgEFGafqfXOWyVLLdMAAp8mh6YY2UbO7sPnP+xWUdpKEY3haTKvfKCKgi93o48lrK3M/xKzrEcwHv958Ub1Xy9QrdLkhGZzNMr4AUv2lOktN255MVqd4YjOSivXw==;5:RAYTxA1k+b68zN9DZIQFraypb7uOjH5fyHgqfNzJD1wV4/CzsGnD8IkcAirndJnCNwwtcQCXe+2UvBLcquSd9EP50Ox8GeTMYYX3yPY3ZyyiolS3KlnkWcldi5XCjxAUaDRp8QCoqxJWNELPLihadGaT1v3eU+ENUNjvXtsBTn+DfQcot/uqozHFAGUhQFTu2erDamL9T3YDLU1BSpe6IQ==;7:MznPXfoiCOoRODteNgRiNwxMUIOZ07QhbvFMrwLPEtduzKO30XKRQ1eujmbeuSUGoorkT0qjome+Q4I32DuJLXdzgVoZteh55KINfcKulW4RDGWDmPWjzO3i4R1grHNPcCe7bVbvJUZ2gPtrnHCZbw== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jan 2019 07:25:35.0212 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f5ac0cff-7858-4ac6-9679-08d682964c24 X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e;Ip=[199.233.58.38];Helo=[CAEXCH02.caveonetworks.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR07MB4382 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 This patch removes unnecessary code to handle RSCN, instead performs full scan everytime driver receives RSCN Fixes: d4f7a16aeca6f ("scsi: qla2xxx: Remove ASYNC GIDPN switch command") Cc: stable@vger.kernel.org #4.19 Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_init.c | 86 ----------------------------------------- 1 file changed, 86 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index 3bb4fa97e40a..8307eac796a2 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c @@ -1471,29 +1471,6 @@ int qla24xx_fcport_handle_login(struct scsi_qla_host *vha, fc_port_t *fcport) return 0; } -static -void qla24xx_handle_rscn_event(fc_port_t *fcport, struct event_arg *ea) -{ - fcport->rscn_gen++; - - ql_dbg(ql_dbg_disc, fcport->vha, 0x210c, - "%s %8phC DS %d LS %d\n", - __func__, fcport->port_name, fcport->disc_state, - fcport->fw_login_state); - - if (fcport->flags & FCF_ASYNC_SENT) - return; - - switch (fcport->disc_state) { - case DSC_DELETED: - case DSC_LOGIN_COMPLETE: - qla24xx_post_gpnid_work(fcport->vha, &ea->id); - break; - default: - break; - } -} - int qla24xx_post_newsess_work(struct scsi_qla_host *vha, port_id_t *id, u8 *port_name, u8 *node_name, void *pla, u8 fc4_type) { @@ -1560,8 +1537,6 @@ static void qla_handle_els_plogi_done(scsi_qla_host_t *vha, void qla2x00_fcport_event_handler(scsi_qla_host_t *vha, struct event_arg *ea) { - fc_port_t *f, *tf; - uint32_t id = 0, mask, rid; fc_port_t *fcport; switch (ea->event) { @@ -1574,10 +1549,6 @@ void qla2x00_fcport_event_handler(scsi_qla_host_t *vha, struct event_arg *ea) case FCME_RSCN: if (test_bit(UNLOADING, &vha->dpc_flags)) return; - switch (ea->id.b.rsvd_1) { - case RSCN_PORT_ADDR: -#define BIGSCAN 1 -#if defined BIGSCAN & BIGSCAN > 0 { unsigned long flags; fcport = qla2x00_find_fcport_by_nportid @@ -1596,59 +1567,6 @@ void qla2x00_fcport_event_handler(scsi_qla_host_t *vha, struct event_arg *ea) } spin_unlock_irqrestore(&vha->work_lock, flags); } -#else - { - int rc; - fcport = qla2x00_find_fcport_by_nportid(vha, &ea->id, 1); - if (!fcport) { - /* cable moved */ - rc = qla24xx_post_gpnid_work(vha, &ea->id); - if (rc) { - ql_log(ql_log_warn, vha, 0xd044, - "RSCN GPNID work failed %06x\n", - ea->id.b24); - } - } else { - ea->fcport = fcport; - fcport->scan_needed = 1; - qla24xx_handle_rscn_event(fcport, ea); - } - } -#endif - break; - case RSCN_AREA_ADDR: - case RSCN_DOM_ADDR: - if (ea->id.b.rsvd_1 == RSCN_AREA_ADDR) { - mask = 0xffff00; - ql_dbg(ql_dbg_async, vha, 0x5044, - "RSCN: Area 0x%06x was affected\n", - ea->id.b24); - } else { - mask = 0xff0000; - ql_dbg(ql_dbg_async, vha, 0x507a, - "RSCN: Domain 0x%06x was affected\n", - ea->id.b24); - } - - rid = ea->id.b24 & mask; - list_for_each_entry_safe(f, tf, &vha->vp_fcports, - list) { - id = f->d_id.b24 & mask; - if (rid == id) { - ea->fcport = f; - qla24xx_handle_rscn_event(f, ea); - } - } - break; - case RSCN_FAB_ADDR: - default: - ql_log(ql_log_warn, vha, 0xd045, - "RSCN: Fabric was affected. Addr format %d\n", - ea->id.b.rsvd_1); - qla2x00_mark_all_devices_lost(vha, 1); - set_bit(LOOP_RESYNC_NEEDED, &vha->dpc_flags); - set_bit(LOCAL_LOOP_UPDATE, &vha->dpc_flags); - } break; case FCME_GNL_DONE: qla24xx_handle_gnl_done_event(vha, ea); @@ -1709,11 +1627,7 @@ void qla_rscn_replay(fc_port_t *fcport) ea.event = FCME_RSCN; ea.id = fcport->d_id; ea.id.b.rsvd_1 = RSCN_PORT_ADDR; -#if defined BIGSCAN & BIGSCAN > 0 qla2x00_fcport_event_handler(fcport->vha, &ea); -#else - qla24xx_post_gpnid_work(fcport->vha, &ea.id); -#endif } }