From patchwork Mon Dec 10 20:36:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Himanshu Madhani X-Patchwork-Id: 10722399 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 6CBF918A7 for ; Mon, 10 Dec 2018 20:37:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5D5102A485 for ; Mon, 10 Dec 2018 20:37:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 51DCC2A498; Mon, 10 Dec 2018 20:37:53 +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 5C3EF2A536 for ; Mon, 10 Dec 2018 20:37:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728465AbeLJUhq (ORCPT ); Mon, 10 Dec 2018 15:37:46 -0500 Received: from mail-eopbgr720041.outbound.protection.outlook.com ([40.107.72.41]:42437 "EHLO NAM05-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726100AbeLJUhp (ORCPT ); Mon, 10 Dec 2018 15:37:45 -0500 Received: from CO2PR07CA0074.namprd07.prod.outlook.com (2603:10b6:100::42) by BYAPR07MB4759.namprd07.prod.outlook.com (2603:10b6:a02:f0::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1404.22; Mon, 10 Dec 2018 20:37:43 +0000 Received: from CO1NAM05FT044.eop-nam05.prod.protection.outlook.com (2a01:111:f400:7e50::209) by CO2PR07CA0074.outlook.office365.com (2603:10b6:100::42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1404.19 via Frontend Transport; Mon, 10 Dec 2018 20:37:43 +0000 Authentication-Results: spf=fail (sender IP is 50.232.66.26) 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 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 CO1NAM05FT044.mail.protection.outlook.com (10.152.96.158) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA) id 15.20.1446.5 via Frontend Transport; Mon, 10 Dec 2018 20:37:42 +0000 Received: from dut1171.mv.qlogic.com (10.112.88.18) by CAEXCH02.caveonetworks.com (10.17.4.29) with Microsoft SMTP Server (TLS) id 14.2.347.0; Mon, 10 Dec 2018 12:36:35 -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 wBAKaY0g015291; Mon, 10 Dec 2018 12:36:34 -0800 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id wBAKaY4j015290; Mon, 10 Dec 2018 12:36:34 -0800 From: Himanshu Madhani To: , CC: , Subject: [PATCH 3/4] qla2xxx: Fix for FC-NVMe discovery for NPIV port Date: Mon, 10 Dec 2018 12:36:24 -0800 Message-ID: <20181210203625.15244-4-hmadhani@marvell.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20181210203625.15244-1-hmadhani@marvell.com> References: <20181210203625.15244-1-hmadhani@marvell.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131889478629559846;(ed7a8be2-8232-4c02-72fe-08d477275f2b);(ed7a8be2-8232-4c02-72fe-08d477275f2b) X-Forefront-Antispam-Report: CIP:50.232.66.26;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(136003)(376002)(346002)(39860400002)(396003)(2980300002)(1109001)(1110001)(339900001)(189003)(199004)(80596001)(47776003)(8676002)(336012)(76176011)(51416003)(14444005)(8936002)(36756003)(69596002)(2906002)(26005)(81156014)(81166006)(508600001)(305945005)(50466002)(110136005)(54906003)(6666004)(356004)(16586007)(4326008)(86362001)(87636003)(50226002)(5660300001)(1076002)(48376002)(446003)(486006)(11346002)(106466001)(105606002)(2616005)(126002)(316002)(476003)(85426001)(42186006);DIR:OUT;SFP:1101;SCL:1;SRVR:BYAPR07MB4759;H:CAEXCH02.caveonetworks.com;FPR:;SPF:Fail;LANG:en;PTR:50-232-66-26-static.hfc.comcastbusiness.net;MX:1;A:1; X-Microsoft-Exchange-Diagnostics: 1;CO1NAM05FT044;1:HQr5d2tmY8fL+q0+59lcctlmWhDtaGBf1qnCaGutSTw2XFSmGtDizxN3KlzwX+s71/W8DeV4p0nddSwsmPDIKvSTVdnNPMo8JQAuaSCODw0h0tv19KF4U28MigGuY02E X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4f708702-98f5-48ed-8e26-08d65edf55ca X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(2390098)(7020095)(5600074)(711020)(2017052603328);SRVR:BYAPR07MB4759; X-Microsoft-Exchange-Diagnostics: 1;BYAPR07MB4759;3:clA7EUJXhA6OkWsIjXBdBokmBtMCYKpUcm80lI4ii2cCgb0PZ2VB2Ornl2yFnxVmSosuCRms8gnjddKcwtz4feYA2i02+5kqTWjMcLJ2lARk+tM/0MTBOYhzvBO4SdXwdTrQsAXEuCfBN+JGvcqigC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/eIkm8mHchxgMFHSOkFtPjLGMfeDXvv1cBRojrXUcWPzl4sPZVGMAayA== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(3230017)(999002)(6095135)(2401047)(8121501046)(5005006)(3231472)(944501520)(52105112)(3002001)(93006095)(93001095)(10201501046)(6055026)(148016)(6096035)(20161123559100)(201703131430075)(201703131448075)(201703131433075)(20161123561025)(20161123556025)(20161123565025)(20161123563025)(201708071742011)(7699051)(76991095);SRVR:BYAPR07MB4759;BCL:0;PCL:0;RULEID:(400006);SRVR:BYAPR07MB4759; X-Forefront-PRVS: 08828D20BC X-Microsoft-Exchange-Diagnostics: 1;BYAPR07MB4759;23:9wIvwDbGOi8UVJZbG9ZCwcX7lPVapQMdBD6pBmFJrqEPd5EVZLnomEMwpVEU6QWDfNnh32BdkfB0Gw2g4eqinQIQLaigp2v8gvmFM+hqbZbXBJIuS64jdxtWU+D00r2J0zKf8VPECpmNFqDofZ6oMdEcwVNpt2QQF3PgvjNRMdmMrtyodFWzcttJ5Lu/3secgLEwJrn4bTrtXxqb5EoEOS//6qrn9DASkBlwevdUVQraTpt3Q7dAKN51VC+Txtd67v4EffHtV/aKiCD6gH67hXhcI250WuPIBbyRvmcQ28qDj5pNiBXoVG6nQOnlwoxuJgr/DRT1VHoOn4h6WAl5G+rbTGloVR+92lab7bAeEgDpnm40/1JvAYSjPT4NAcBymdIVswODs3Sw3blVxgp9nD1Zr1CuhqLitXwwjkyYCcIF36YU2sFP/6uEB3yByFFFwkbRuGD2tISn27CRobGAP2EGzdWi9rwf6v04xOjU6JFgov48Bj6LSfjTCpqJdPEgc9fL6m+FY5Yo09hxhxNJYUpcJ9R5VodhJiVAB7tBIcI4WSMgrKmfdT2lqf1gUjaXtpDo+IxeA4vKZH62ISH4N/PjtsJ4T22kB3USJ6LA0XhDGmMlLjxoISgGPWEuYAlEwL8tZrIBRs9QlHidBG5vxm/TIK99PTjQpVkgrYJmjtm+aPW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D2QA0ftn+yo4KAXfX95j0Ojgq+bgKmlxtM+fGLgJJWWXUN6pHQ1bf+c+EgOW0t1RTegYBauHiVZ03oIDDwVTLjSZAF7H3t0kZGSzB+3RIpviXl+J0L5QE7vuF2oEqd1jMQy1tjTvRtmm/S0bV76gDjNXM9BHrhJ7NBXo2Ps9/eQjI9PUg6ig2Jn0ZiVRnLMvZ7B1TGfWGDqWur3DaN1FINY1K4mDoveZPDq4RyaD9jdIMryntao6v3vkYoADWBA==;5:kTYfZjkGeSmPeiEZ7yZrb9OqSpGkpR86Da3epq3TZcFenDQqhKL7bxQh23zRhLOCyQzi2iIrI/BlebVDb422j83UE0QGUYjy6rcfFOA4ph3rtfRlljIhYu0YG+TYt4HUgZaPjuNysYjsbkZUMdDAkv/F5xXAuNnB+H+2/A9Bvi8=;7:BidvR7z/nJIyGocrnEmyotP7tsv7Qaxm0F929kbaIBFXhSy9n/trYkfNcsT2l2MKPnbnS27z5oTI1lFo5uqRYAz/XQxAX4aQMq75LmPVnSjnTU23cYBEiqHfb/1PbQd8pB81od3Gf0Qk/Yxbbo9EWQ== SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Dec 2018 20:37:42.6903 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4f708702-98f5-48ed-8e26-08d65edf55ca X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e;Ip=[50.232.66.26];Helo=[CAEXCH02.caveonetworks.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR07MB4759 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: Giridhar Malavali This patch fixes NVMe discovery by setting SKIP_PRLI flag, so that PRLI is driven by driver and is retried when the NPIV port is detected to have NVMe capability. Signed-off-by: Giridhar Malavali Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_attr.c | 2 ++ drivers/scsi/qla2xxx/qla_init.c | 10 ++++------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c index 0bb9ac6ece92..00444dc79756 100644 --- a/drivers/scsi/qla2xxx/qla_attr.c +++ b/drivers/scsi/qla2xxx/qla_attr.c @@ -2712,6 +2712,8 @@ qla24xx_vport_delete(struct fc_vport *fc_vport) test_bit(FCPORT_UPDATE_NEEDED, &vha->dpc_flags)) msleep(1000); + qla_nvme_delete(vha); + qla24xx_disable_vp(vha); qla2x00_wait_for_sess_deletion(vha); diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index eb59c796a795..364bb52ed2a6 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c @@ -237,15 +237,13 @@ qla2x00_async_login(struct scsi_qla_host *vha, fc_port_t *fcport, qla2x00_init_timer(sp, qla2x00_get_async_timeout(vha) + 2); sp->done = qla2x00_async_login_sp_done; - if (N2N_TOPO(fcport->vha->hw) && fcport_is_bigger(fcport)) { + if (N2N_TOPO(fcport->vha->hw) && fcport_is_bigger(fcport)) lio->u.logio.flags |= SRB_LOGIN_PRLI_ONLY; - } else { + else lio->u.logio.flags |= SRB_LOGIN_COND_PLOGI; - if (fcport->fc4f_nvme) - lio->u.logio.flags |= SRB_LOGIN_SKIP_PRLI; - - } + if (fcport->fc4f_nvme) + lio->u.logio.flags |= SRB_LOGIN_SKIP_PRLI; ql_dbg(ql_dbg_disc, vha, 0x2072, "Async-login - %8phC hdl=%x, loopid=%x portid=%02x%02x%02x "