From patchwork Fri Sep 28 22:46:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Madhani, Himanshu" X-Patchwork-Id: 10620503 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 3C9EC913 for ; Fri, 28 Sep 2018 22:46:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 29E782BE78 for ; Fri, 28 Sep 2018 22:46:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1A9072BE84; Fri, 28 Sep 2018 22:46:38 +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 411242BE78 for ; Fri, 28 Sep 2018 22:46:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727420AbeI2FMa (ORCPT ); Sat, 29 Sep 2018 01:12:30 -0400 Received: from mail-co1nam03on0051.outbound.protection.outlook.com ([104.47.40.51]:4656 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726713AbeI2FM3 (ORCPT ); Sat, 29 Sep 2018 01:12:29 -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=Ul+9D0D39aYfqyGa1HJusogoYRpmhDb9eGIyW3Y6sbo=; b=nYPaafy328Ch97PoxVsIZz+YWZurAMLNAr5kGoOXkU0iveVVjleIFYdi02j3a7FpD1sQEPQngod5CyPF4dIZcr8pjFTCRO9EkILH32+bXj0OfxlTqNuylnl00Gg+RV8nMzSOXQxaA4vFrhtaoX8gdFduUZA7LCVlYlnbQG7+rwo= Received: from SN4PR0701CA0019.namprd07.prod.outlook.com (2603:10b6:803:28::29) by BYAPR07MB4389.namprd07.prod.outlook.com (2603:10b6:a02:c0::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1164.25; Fri, 28 Sep 2018 22:46:29 +0000 Received: from DM3NAM05FT042.eop-nam05.prod.protection.outlook.com (2a01:111:f400:7e51::200) by SN4PR0701CA0019.outlook.office365.com (2603:10b6:803:28::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1164.22 via Frontend Transport; Fri, 28 Sep 2018 22:46:29 +0000 Authentication-Results: spf=pass (sender IP is 50.232.66.26) smtp.mailfrom=cavium.com; oracle.com; dkim=none (message not signed) header.d=none;oracle.com; 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 DM3NAM05FT042.mail.protection.outlook.com (10.152.98.156) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P256) id 15.20.1185.5 via Frontend Transport; Fri, 28 Sep 2018 22:46:29 +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, 28 Sep 2018 15:46:26 -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 w8SMkQ6e019812; Fri, 28 Sep 2018 15:46:26 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id w8SMkQHk019811; Fri, 28 Sep 2018 15:46:26 -0700 From: Himanshu Madhani To: , , , , , , CC: Subject: [PATCH v3 0/5] qla2xxx: Add FC-NVMe Target support Date: Fri, 28 Sep 2018 15:46:21 -0700 Message-ID: <20180928224626.19777-1-himanshu.madhani@cavium.com> X-Mailer: git-send-email 2.12.0 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)(39860400002)(396003)(136003)(376002)(346002)(2980300002)(438002)(199004)(189003)(106466001)(26005)(336012)(6666003)(44832011)(186003)(305945005)(126002)(2906002)(486006)(356003)(2616005)(5660300001)(1076002)(476003)(47776003)(86362001)(2201001)(51416003)(36756003)(107886003)(72206003)(8676002)(81156014)(48376002)(50466002)(478600001)(87636003)(81166006)(69596002)(50226002)(34290500001)(8936002)(42186006)(316002)(106002)(110136005)(4326008)(16586007)(14444005)(80596001);DIR:OUT;SFP:1101;SCL:1;SRVR:BYAPR07MB4389;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;DM3NAM05FT042;1:OdySf9TVKMxCcdQWd1CtJtArE/CX9IPpFfn6TkaoBHvIytX1SRO/OF8Z0GMTL99fqI58TnwIBO5PRByaAh25PLmqReFTnT0zylo89rf/gMooCnyrGhCdjIZ85GY0D1Mf X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0e0433e0-550c-4a5b-2bd4-08d625943b13 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(4534165)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4608076)(2017052603328)(7153060);SRVR:BYAPR07MB4389; X-Microsoft-Exchange-Diagnostics: 1;BYAPR07MB4389;3:j9h3L49oK0y9NkPgVI0mdCALlV7fnoUD8jHkjhRg7zxMF6HjBeGArxletHgfwIHOf5ocj8YaWbnkJS9Hrwf5WSC5jj8egmfWmxNO7GwxE1lETjCxD7BRhVK2b+EtNt6QUl4F091gSNFXkgPC8899H+lBGVUveMz6cX629Y8+YDjZsKFuRSeFgV12o/IFJw3AjaIFNdnrzVkflKW114dKkVNGtXC0djNTMNjwgov6iD8qz8RP3UvKwm6VeXomGvdNS1WMYFz1nUNJqH7UdT9Qf332kuFRrSMmAkas4Mh3rvDpTuOGYO2ICrDp9DuzVKe6L/oF5hfd2SVb2WB6JNa4TG+oTwfUgELrotlaRXoqoG8=;25:ibcsaMtO0yaNkRLReqXjuSJPNWJ4HjoLv1Pjao69HarwcSkqE3TyHZ8zyioxJuCottD1HohKVLYTRAQKJwmrtAhoVmq5iZra8VCj6kAuVUK3eutx5U4y6E9mzAcB/PR1ILuzyYxy/Aql837je+BrGdP60aZruuME5rxs10gr5kZSEHLtj2GcTwS0ju45D+6xyrMfHzHOFTdAwFwnWOrkZkMWiuAn2pQhK+/aq9hOC4B6Lt6dyctJStQd9hvv+CUCzrFgOznRnd9ju3C9XjmL/yO8Ie6Vxpzu8A4wCO9YyaO/U/7fGbsoF1tkGjAWZkg/eAgQ9G1TzEmviH9tdXPPFg== X-MS-TrafficTypeDiagnostic: BYAPR07MB4389: X-Microsoft-Exchange-Diagnostics: 1;BYAPR07MB4389;31:PgBnjP9i4G/2YMHb90AMEcgmeAtQ3CNMXN2qc/t8oumEaSvrL3XIcBlOFIsFyyKQzJZIe3SnR309I4H9Lw6/k958+nd6CrMzK6fTdHPwrTypj37G7ODMtLoPuUYczp8KjYhgwPyoiPrrm9iqwgB6Ck35dl1hC2juof4RyaMbQkpdzmFqTn/HMEmOpnyh5416ZImyDf1Fcgr/VZ5UT0Bu2Wy8p3g9OkAP7PzopiawaBw=;20:GhmDjj2wxSuTfdc8TXudrIj7S4Qu/SwiyqZjyQ9AlhydIRo9G288yXrZi8NxSjT4eHDxM9RF0lFvwhr8CoaaJnxlEcN+PQ6rXQBzcZV9eYAeo5yRG0D58L7LOsm+tZUfDMW0SbJhzE6agQ93QhZv1ILG2rgYlswxF8uSsGUaSinwUAnrOv6GffWAVpB/eTMRbwFL0P2m58tTVoM7k6Y4Z56BKCr2jwrX+/U1ihqtKtVscyQDU5d8BRYuai0qYJYCZVX2Le+pWT7XRq5AhLJrTvJrDIJR1TImSeWAQG5L3iK0rnnuGE/1UF48iQKKUiXzb3ZS2wyhw69CwZ/6E3TBtbJ5BSaTCMQW+ovMhuaS80m04q1INCNkgAZRDNOAy4snxFaOzYlJbAu20VLVYa8DfZBvdwpOXQPBJnkRM7cKtxt+UwO5L4NLfgeVGj3xQALYvNeOLzfWPyaiIi4RK5riaX/Q1Y/djv9R4DnG7ada6Vh2x69BiacC8sJM7hmfcNbs 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)(3002001)(93006095)(93004095)(3231355)(944501410)(52105095)(10201501046)(149066)(150057)(6041310)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123560045)(20161123558120)(201708071742011)(7699051);SRVR:BYAPR07MB4389;BCL:0;PCL:0;RULEID:;SRVR:BYAPR07MB4389; X-Microsoft-Exchange-Diagnostics: 1;BYAPR07MB4389;4:d6EXZ67P7CfkxkCx7LgieiyUc2SIJ3WpZ6lH+gSURQXa+h99IT5XAqy0EfKeH9Es6ljNIB8VQfGsCjsT/Jl44e4aNdk9KBqToKSv+dF4J71xYUhkswmqBGISCJ1yAL4YUb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vCbAuHMUQM3rZaO1JXELN8pBndXafeioSdLQkO8fi34fmYMnC+BDRUEH+W/kkXAZrLYA==;5:YMyv8NNQnCS9wfnQ3PoMF1m20IdaW+Kg9c1Os/XqUEjLg/h9gl2IMlwgTFq5EWZYuDnf0OCtao0OZ4MVLSoYpNvaC7IY0zo9eUNbiwmJDw6fJN1pJ9qRO1uy5zq419xmHYPdwPnAxubDawAvIhS78s0s8+L7S+f8JKwgMgTEzyI=;7:LCxujALrOwnNiYuXq2YoRcpkBVNfdx7vdPk4YY25oZbyXOPHbsW4nzTVKL0CUvD5AWF6QWv1jxa51nL7oxyuboKZad+TMGJFuXA7OShg2m852am4kBscN2Qq11aLCoyMZJ6BVtPZT5TIym1oG+wxp6dsydCrir+LFL1JH+u9EnnguikH3CMZFKxtWTugd/EQqNMqH5/7mRRaTn0/ibzZKGZFid+aQtzSeesbDP+A3ePHECgD+LzH0mkmhj48yDaD SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Sep 2018 22:46:29.0535 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0e0433e0-550c-4a5b-2bd4-08d625943b13 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: BYAPR07MB4389 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 Hi Martin, This series adds support for FC-NVMe Target. Patch #1 adds infrastructure to support FC-NVMeT Link Service processing. Patch #2 adds addes new qla_nvmet.[ch] files for FC-NVMe Target support. Patch #3 has bulk of changes to add hooks into common code infrastucture and adds support for FC-NVMe Target LS4 processing via Purex path. Patch #4 adds SysFS hook to enable NVMe Target for the port. Please apply them to 4.20/scsi-queue at your earliest convenience. Changes from v2 -> v3 o Reordered patches so that each patch compiles individually and is bisectable. Changes from v1 -> v2 o Addressed all comments from Bart. o Consolidated Patch 1 and Patch 2 into single patch. o Fixed smatch warning reported by kbuild autommation. o NVMe Target mode is exclusive at the moment. Cavium driver does not support both FCP Target and NVMe Target at the same time. This will be fixed in later updates. Thanks, Himanshu Anil Gurumurthy (4): qla2xxx_nvmet: Add FC-NVMe Target Link Service request handling qla2xxx_nvmet: Add files for FC-NVMe Target support qla2xxx_nvmet: Add FC-NVMe Target handling qla2xxx_nvmet: Add SysFS node for FC-NVMe Target Himanshu Madhani (1): qla2xxx: Update driver version to 11.00.00.00-k drivers/scsi/qla2xxx/Makefile | 3 +- drivers/scsi/qla2xxx/qla_attr.c | 33 ++ drivers/scsi/qla2xxx/qla_dbg.c | 1 + drivers/scsi/qla2xxx/qla_dbg.h | 2 + drivers/scsi/qla2xxx/qla_def.h | 35 +- drivers/scsi/qla2xxx/qla_fw.h | 263 ++++++++++ drivers/scsi/qla2xxx/qla_gbl.h | 24 +- drivers/scsi/qla2xxx/qla_gs.c | 16 +- drivers/scsi/qla2xxx/qla_init.c | 49 +- drivers/scsi/qla2xxx/qla_iocb.c | 8 +- drivers/scsi/qla2xxx/qla_isr.c | 112 ++++- drivers/scsi/qla2xxx/qla_mbx.c | 101 +++- drivers/scsi/qla2xxx/qla_nvme.h | 33 -- drivers/scsi/qla2xxx/qla_nvmet.c | 833 +++++++++++++++++++++++++++++++ drivers/scsi/qla2xxx/qla_nvmet.h | 129 +++++ drivers/scsi/qla2xxx/qla_os.c | 75 ++- drivers/scsi/qla2xxx/qla_target.c | 977 ++++++++++++++++++++++++++++++++++++- drivers/scsi/qla2xxx/qla_target.h | 90 ++++ drivers/scsi/qla2xxx/qla_version.h | 4 +- 19 files changed, 2713 insertions(+), 75 deletions(-) create mode 100644 drivers/scsi/qla2xxx/qla_nvmet.c create mode 100644 drivers/scsi/qla2xxx/qla_nvmet.h