From patchwork Fri Aug 31 18:24:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Madhani, Himanshu" X-Patchwork-Id: 10584351 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 AB9D51709 for ; Fri, 31 Aug 2018 18:25:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9A4982C5B2 for ; Fri, 31 Aug 2018 18:25:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8E1EF2C5B7; Fri, 31 Aug 2018 18:25:01 +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 2DE762C5B3 for ; Fri, 31 Aug 2018 18:25:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727599AbeHaWdl (ORCPT ); Fri, 31 Aug 2018 18:33:41 -0400 Received: from mail-eopbgr680086.outbound.protection.outlook.com ([40.107.68.86]:26328 "EHLO NAM04-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727545AbeHaWdl (ORCPT ); Fri, 31 Aug 2018 18:33:41 -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=U2fJ3yULDJohEWWnthJpxbTiVMkyN9o/t+Fv9hg8+pg=; b=QF+YsLYPtGWb3YmlnfbBTGgwQZapNUTfs3q0RQRdLYzDhOuD3Z8fcd9CLmGmIZFz484A+y7Zp4iWis9S5PIaDRstr0Jb2gODXhJ+by7HekZWF++lg8HpP36yYw9ZmA3rDEDDqCYlR3bRAZfkzQ5qgE7KS5Ey4hKjR9m/vhBDFKA= Received: from DM5PR07CA0113.namprd07.prod.outlook.com (2603:10b6:4:ae::42) by BN7PR07MB4385.namprd07.prod.outlook.com (2603:10b6:406:b5::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1080.16; Fri, 31 Aug 2018 18:24:56 +0000 Received: from DM3NAM05FT030.eop-nam05.prod.protection.outlook.com (2a01:111:f400:7e51::203) by DM5PR07CA0113.outlook.office365.com (2603:10b6:4:ae::42) 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:56 +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:56 +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:42 -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 w7VIOf1v024269; Fri, 31 Aug 2018 11:24:41 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id w7VIOfZE024268; Fri, 31 Aug 2018 11:24:41 -0700 From: Himanshu Madhani To: , CC: , Subject: [PATCH v2 13/14] qla2xxx: Terminate Plogi/PRLI if WWN is 0 Date: Fri, 31 Aug 2018 11:24:38 -0700 Message-ID: <20180831182439.24182-14-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)(136003)(376002)(346002)(39860400002)(396003)(2980300002)(438002)(189003)(199004)(476003)(51416003)(44832011)(14444005)(2616005)(356003)(69596002)(72206003)(478600001)(47776003)(486006)(106002)(126002)(8676002)(336012)(1076002)(26005)(11346002)(446003)(76176011)(186003)(50466002)(110136005)(86362001)(54906003)(42186006)(16586007)(2906002)(48376002)(316002)(5660300001)(4326008)(305945005)(87636003)(81156014)(81166006)(50226002)(36756003)(106466001)(8936002)(80596001)(6666003);DIR:OUT;SFP:1101;SCL:1;SRVR:BN7PR07MB4385;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:JVFQ2ttDYKkhz+eIQdJIm/ExmQAggFIo1h/8aBouHtInPaXHc9fAcAzi5Mjh5wSMSKau5fssk3ZKFQRmYlrvDRb3JoeFUJ9EVv0KOeK8oiHkIEiJTnBWhNvUgeti2+z3 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0e2916d7-2bfc-43f9-8e89-08d60f6f0dc8 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4608076)(2017052603328)(7153060);SRVR:BN7PR07MB4385; X-Microsoft-Exchange-Diagnostics: 1;BN7PR07MB4385;3:Y5a4/XFSSMhNZK3ALXpgVKVwmdqPP7pIJUMKRTGziaXCQEcgrSk5hjzyIFBKanr+au850gjEHe6yGLaangCcLrp15wPXlhaWKo6lJuPLYlJgUyfK6xBI9abOcXaRydq/zCwJDYJ3m/T0+TscvHS8Gr0kqcVc+XY2a7EeZ0yw0pHuIjQxcN+XYdZhuV7AXi17Wx/x68bfFzQ+ldMcgdF9xqYulGemwzn0wsKBSeLTi4Po5G6d9xQKt8krxvoleNnIPz76SQkyP3sB57yM0C+4Jm0k4mcoqD/Y7L7jaI79f0TOhpR0JesNYLH57LB18pZGgzUFwvSSDLw5fstoB2QedwulWVpCfUnVs0nk4W6YXmE=;25:g3S++Qp1uncw/EWWKpHg2NMT32tRPAzVK9i1/BP9aYUuqBar0Ez4/LI1DwpuoUn0eP6XhAV0zeYq5BEfPnT3I8f1FujHNnvHe9iRyigQzzhi2wEy11z6JFXrQ2S7Y8Ccxvrz8ISXE1SgmWhC0ybL3ZFuy8aWxUhcI0UiA537rIK/UuPMfoR3bYaj4yztHPOYtNAwHVzvl2J6TTt9iXHdjd/X46wuofHv1ZxJVjoLLXonsVZayx4AuLzt0kRcmlv16xY0LHIna2e9sQv3kKjqA9b0NSKtlUORQFgcCoB7xaZdE80ECiYv2ioWwtJiPFWRxsumAEqwG7pbnBIR+D2c7w== X-MS-TrafficTypeDiagnostic: BN7PR07MB4385: X-Microsoft-Exchange-Diagnostics: 1;BN7PR07MB4385;31:FTaN80dJZRMaaOJ4150q25FuMjmMJpEY78caPKb9jhK0VXB4vi03XvWUvhTjzgSOL5S5Sxczgoy16fqKBVS/BJ6rDq+9dMLwaTKkQl11XtEC1lU1cVlPnDMzNA89OpUuMwiyFrvGzj9xRVhTjGnpB96wfKaZwt7kG+wTjpnlMTHxCsTQfW3AkLapS44KQ64WJqYy036qCSX28mpjl3wRLVZHFOPHOgUn46TKpXPTTqs=;20:eQuULHIogunLjwyvWTQFWHSFdYYpW3+0g8PkLjNgIqBIHC2Tn29dkOPde9l9TIjPQ9ECi0PlHGtRt1zLziZy2olx6KF27QE1KzrwcVWl7y89QOu6DqtmsHS72+nn58LeCAE+eBDJJJScGMN9/xVYchqSnUFaYvB1j63yz6D0ZQL0p8zvEaVVUSVt04ff0HWTF4SgYzHKl1n/ydYWlhkPFYtMGLb0+GgT5scXbyIFGQCAXGT279wo7zqW82LMxNmQMp+xgH0Nprl3Q1N6vFRWNxnR0bDP3KbLVraycVPJEsYG8UFgNs23EYWubN57r9e5CV3rK4/fgmFQmGvLv+T0EovT0uUmq+42eEAue9lRSQVQ7AdHHRuU0q6u5Z8isjoGuqtMwIn81BmUIpLk27X2Bwpju5JGvhPXlQVTS7RQp6kHcUsfFFMfC69DPojmWXTro41cypiY+tAz6stUSH8kf1ErXBc3vOHh6RnB9QpIxnKSzNRv6dhVaecGRhQQoluQ 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)(3002001)(3231311)(944501410)(52105095)(149027)(150027)(6041310)(20161123558120)(20161123562045)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699016);SRVR:BN7PR07MB4385;BCL:0;PCL:0;RULEID:;SRVR:BN7PR07MB4385; X-Microsoft-Exchange-Diagnostics: 1;BN7PR07MB4385;4:ratGNRmVq/8sD9onR59Em4BIbw+qeUobSqbejvFO+b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ks/yzb7YVU9PoedqPASPUgK6rECh4wcDke0cmj20X/3/c5OqaoNlenVvkuS/5cJu++YQrwza2pMVb/zYmJvBTE9MinijQGBzSEZcLXntTkqeEO6Yb12SqX0OIH9RZlmSs/ny/9MXP74GDrekJKGmsLZvF1l7XIPCkRu9zoeqC6aKlFR8jvu3M6DUP5GvU8ORdgjytyFs8Oc+m3oR3duITC0lBRi6ITJbnqqBfv5cpgDj6HdccVnHG8BEXd1lX5x1ZrU51DFsdcrvISHuUohvF8xo5t3alMPBW6VDSGtXHy7+MJA3KAhFGD35lWOaQU+cTtRpKK1KZ2PJeEUwZFi1Tm69Ep2aji1ujAcU9JXCElRB X-Microsoft-Antispam-Message-Info: ttZMpBSKR1aUk5wrbLTj0JgsgsKfL0CvbPco18l6ilOgy8pJ7qGF1ob/6xYk3qObRREI2kiDNnalKAFvyvGK8WEj0yZHYQdavePALibzgMuSF90I1mfmhdxkRZUPBf6d4uxzZ5G1d9WX/hn1balmKIwALt7GOMbcbsES2ZNPEETr74vbISnPF3k9ZXslKQ/0BRSCH8Du65qnVapm+rB6mthao+XygVG51o4PvFM2cLOn4sqQKz2W+XpEFThIQoNxJKJkFESfOH+/DBZeygAG6x+Nos7qB75yZU35/JWgrfkv6zoq32xRVvYpYzOygjKVk7ayn8BnPPMRg0H7QTR7A7j/ZBVAdnrnl+37Swlv21k= X-Microsoft-Exchange-Diagnostics: 1;BN7PR07MB4385;6:khBdUTGJ2sH2+bupbjMe+5B7E/kwEYBhwKl8ujBqKVRweUamB2N8VIzA+o5GUO9yQU13spM2NM015NHQo3bldW5Q782RIyMscw0VuMY33eJVaUwtriGDiMUqoF+mhlRDsebMiyUkhVmQh5RA//FkCsfBY5CkLWrcLBNQfGE0aB1/mZ4CVVw67dnoAOWvon680G05c7JkogWjEY+GRYoS6v4lqK3dJ0oScmD1myC9BpG+0nKe3rQu2GILW7ebMgoF3EudHjYcZbZIGayzTlRhSSDWN50s37pnD8qP7pfDzMzwEyxW8OMM+apRmEUZezFNmVTDFZgz67kPibp3b3MruGjuZMuHJOaTRLKZAbmpxfWLAtBciGrN74+oZWruGr5Lx1RHv3+9MfuN/B8VExgkMxd/HM1DrI0ENcBaDZTILsW+UiGSjiRgbOgdyNNUwCdbRRGqtQNRHF6aJ9Qaid9osA==;5:w1fS51azfzqomHpErCqFDO3SzzVu1qSxKEqEWAwuYf8loWJxUmQnsALc/DsDzli/twsyevYLnLkzkhZnWxcRLoIEnrkTyoXbntkC6rMLSj0lADAN6cXQO4n9qVP4RpBieWWSKhLyRZeJa2Hn+aYxNBWcYiQ6QEfE+6iUdLI3MlI=;7:gbYnH6GReTVIJGqk7mIcQjggX1j84oh1fwCPtKfshsMSb8q9l/j+LLA+/wMYRYvpxgn2gOl5nWg2/wsDpQmgFkKEbi5oVzlVgr5CpdGI3HOdeMNXFfGNm4eLn5G4hfKmvHx5nITSeZGcrUIsxjkXVrfOi6tCKvDgm7GfMEe5SYq0BVVUjsYoEkagadhWyVfMKSjXvUenxu8XKGVdWAXyT//VSiQGzkoMWg0tX6nY37ZQEbVZ16YwHQGOdwOvcIru SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Aug 2018 18:24:56.3412 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0e2916d7-2bfc-43f9-8e89-08d60f6f0dc8 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: BN7PR07MB4385 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 When driver receive PLOGI/PRLI from FW, the WWPN value will be provided. If it is not, then driver will terminate it. The WWPN allows driver to locate the session or create a new session. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_target.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c index 34fadd320f55..396c8a6d502c 100644 --- a/drivers/scsi/qla2xxx/qla_target.c +++ b/drivers/scsi/qla2xxx/qla_target.c @@ -4723,6 +4723,12 @@ static int qlt_handle_login(struct scsi_qla_host *vha, sess = qlt_find_sess_invalidate_other(vha, wwn, port_id, loop_id, &conflict_sess); spin_unlock_irqrestore(&vha->hw->tgt.sess_lock, flags); + } else { + ql_dbg(ql_dbg_disc, vha, 0xffff, + "%s %d Term INOT due to WWN=0 lid=%d, NportID %06X ", + __func__, __LINE__, loop_id, port_id.b24); + qlt_send_term_imm_notif(vha, iocb, 1); + goto out; } if (IS_SW_RESV_ADDR(port_id)) {