From patchwork Wed Sep 26 16:25:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Madhani, Himanshu" X-Patchwork-Id: 10616221 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 E8A0E174A for ; Wed, 26 Sep 2018 16:32:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D8A722B503 for ; Wed, 26 Sep 2018 16:32:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D6E422B506; Wed, 26 Sep 2018 16:32:09 +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 3EDBE2B50F for ; Wed, 26 Sep 2018 16:32:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728422AbeIZWpx (ORCPT ); Wed, 26 Sep 2018 18:45:53 -0400 Received: from mail-bn3nam01on0068.outbound.protection.outlook.com ([104.47.33.68]:14608 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727782AbeIZWpx (ORCPT ); Wed, 26 Sep 2018 18:45:53 -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=mQ7gENtrbmRueEWEAFJLELbnbEyettLBdhv2cGRGMpM=; b=iO/nocSlh7CP/CtR10HP5SX4qav/jWBkvNp0DvtLUAy3QL0CfjaxgB+LtCEanVAwg+gSXU825G7TTtTmHk06+blyhYf3DKxYfUpojI1C5m/84QUQLhKhlm4Gd4p7Ve5Dokh08mfIxmybcCzmzNpqOQ1xJvI7WhVGMMhaNR+U4Kk= Received: from CO2PR07CA0062.namprd07.prod.outlook.com (2603:10b6:100::30) by BYAPR07MB4664.namprd07.prod.outlook.com (2603:10b6:a02:f1::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1164.25; Wed, 26 Sep 2018 16:32:00 +0000 Received: from DM3NAM05FT038.eop-nam05.prod.protection.outlook.com (2a01:111:f400:7e51::206) by CO2PR07CA0062.outlook.office365.com (2603:10b6:100::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1164.22 via Frontend Transport; Wed, 26 Sep 2018 16:31:59 +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 DM3NAM05FT038.mail.protection.outlook.com (10.152.98.151) 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; Wed, 26 Sep 2018 16:31: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; Wed, 26 Sep 2018 09:25:35 -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 w8QGPaWp024349; Wed, 26 Sep 2018 09:25:36 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id w8QGPZ93024348; Wed, 26 Sep 2018 09:25:35 -0700 From: Himanshu Madhani To: , , , , , , CC: Subject: [PATCH v2 0/5] qla2xxx: Add FC-NVMe Target support Date: Wed, 26 Sep 2018 09:25:30 -0700 Message-ID: <20180926162535.24314-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)(396003)(39860400002)(376002)(346002)(136003)(2980300002)(438002)(199004)(189003)(478600001)(106466001)(16586007)(486006)(126002)(36756003)(336012)(107886003)(69596002)(80596001)(51416003)(110136005)(2616005)(47776003)(106002)(50466002)(72206003)(44832011)(476003)(87636003)(48376002)(42186006)(316002)(2906002)(1076002)(5660300001)(305945005)(6666003)(2201001)(26005)(14444005)(8676002)(81156014)(81166006)(34290500001)(50226002)(186003)(356003)(4326008)(86362001)(8936002);DIR:OUT;SFP:1101;SCL:1;SRVR:BYAPR07MB4664;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;DM3NAM05FT038;1:7jDIMuSWhCVLg4CcNw08pp9XxHkfnFrYDlkB3eW9aU/GDR4znI3Us4O9PuBDHr9ruRVjBGOJt/kuCH/IoEe/fYotXQxyGjmHl784AgqyzhhAXvZ248JEQBvW9Tl4KKCE X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: efb7791f-a52a-4114-a8b1-08d623cd951e X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(4534165)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4608076)(2017052603328)(7153060);SRVR:BYAPR07MB4664; X-Microsoft-Exchange-Diagnostics: 1;BYAPR07MB4664;3:RT3yX8hfJV8av4WmNxuerUL9JEkCXVo8yI2nmi4ngdAs5PQHWTmFuaX95Sml/NK5lS34cBECRWtq7AHZXGzBllkv4GJxS1i9NOHoChIem2xCCZvw/i5t49C6C+eixUSZa+lL7U2Ornm8n6hVcdzXYUoTs8LApf+7E05mzcgVP8FUtIsZ0KwQKWpK5zzc+At2+GVhNNK2zNkVDoeHcU1dglsNDxKs8OnLL14AlHk1oJL8VwTnKxyntvQfMVHTB9EKtVZQpJadGuSZgpj2DbzmewhhfM+2Nja2tOd+71MaDskUilddJKEL4PHIcrIi3arvsXHXv7IvlUrZqMRuQC8v9J2OIGiBRjJ+Iw3h69S1Fcw=;25:xF2radEJRVu4jA6pKXsewVUvGmFzoIZ7kVXx90aTbpaRQyDFuinA+Daw7V08fU9rLN5E3SDxWGZnHXUJ8mSdjqgjQ/pHb3IZ821xPbRBH7Dii7foWhWUE6CivrTOq/03NMQHZ8TRbW7JBLQpfMmuvx+3p9ZxhBR78KtluFZbVtXYnk/QiTrWcF4qipNeDN+xIMl4JbZqG89ywaRtwIP+QLRBjqmESjbnjr4WpJOFghLoVwc02j8aS01WdfieInmzvQo4kun2Chr7vcQ7i28HPFp06fbyrrSIY7c9cvSZT8ZNj8FO5RXH5UNCpHN8FFntrSdUEcO2DhHdrPv16TcIJQ== X-MS-TrafficTypeDiagnostic: BYAPR07MB4664: X-Microsoft-Exchange-Diagnostics: 1;BYAPR07MB4664;31:3ASpD6YRrmBqWFovfemsoTFMqKo0gETcjePGnTmCKEDykMmVYr+vXPHZI3cUV7tXWYeiy7IPGLKQrGxvMUVhufJDth/vRrS5VbgJ/D3oau6r/30lTrxKVbAH0oHTas8WgqveFiwXaUoJMhG4gH1MUM5HQBIQGDCfe2v/ROpCac4QR58Z6jBxzvpRFxvICFgR/ecynA2kuHNCzGxQDmyFJvanRUExWlIJvrv68vs4u7k=;20:bDO1FGoN1Mv81rcENXPGNNBPe1UEpUAGx6kf7RSbyabaH9ETQl1/aFjiRcizX44Eaq3Gdbvn9jmmwnOKiD879+sdaBG6r40XVUACMgtyyPp2gynj8jJPHB5uy6qHivTckkowR1EM25twDSV1m9K2YCF/h4mM7d82rLOr9oaAaZqpUcQntr4ohaIbqwPStIdW+kcRGVlwNRwHb4psclypzvU1duVi5Zd+eJnuQgD/KTs6HU5Qu5cHeBwiqwxCRzdbEpfHso54JfWDyAcAT3VBo0PnwYdfyRTQATzMoRqLOy1VibSSRcc1g0W9Rq0jOSBtELO/I2u1spfUzae2Pc3vNhCe3ND/UAXsJmjzjcrFRHdzSJBtOnCwMvROe9nrgWU+xeIQ0+qicfGGd7WhKqAJm9ZgL4zC0pIYOtSqngHaEbilZ8TrvIraKcSk7bycDzFBqqa/c3PXxnDvkZthDrKnp4rWwLB5n9JJz4P6I9Fyxceyk93hW81bMVnZNd5MbYYe 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)(10201501046)(93006095)(93004095)(3231355)(944501410)(52105095)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123558120)(20161123562045)(20161123560045)(201708071742011)(7699051);SRVR:BYAPR07MB4664;BCL:0;PCL:0;RULEID:;SRVR:BYAPR07MB4664; X-Microsoft-Exchange-Diagnostics: 1;BYAPR07MB4664;4:BPMCPFs1ozsaGBKDNORMZ2F6Sn2G3irbUOIsUsptng8ZoRymOXIgKe0fJxaVZ/TxuMbkqS4t94Oz+SCdIsDHMA1wQWY31Y9PyYMxEBN46ex8CG3wthC7jYYoYkSI2vduXvFwTbTC7olPYrWCJgLO+iEXdgQ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Yqq/wm5EFPk0XGwq5I8u9CFOA9WqKow==;5:bYy1PKkpODRb/0sVoG7bDgoPBHDsmfFY2lP85WN4yc/Ks/cqq6TdcNUxVTltVT9tUFKIVDKvwWlVyeN/adPwdYInHJRTQz6czOKMYICiF7k8ehXlGD2uoQNt2etMbRpdPx0ABxZpqHs4Km2OybxuHkTmG9jwHvpsh5q/G5KhOmk=;7:vD9VjUf5Cw8WYNQv4elKiPqxzdeATtz7bLetGEMUUL5dgGZooAXXF5L5n0y+6BqrSHV6LDP1/+W33hGQ/Yje3AEjZofwZ2BZSKKdnANPILsWC44SAn8+aYVHd2eAfnfLDolvOfySzNHPXKx2ERX6IeXHQYocRbccTx/cyLNGXUbtz2mCP8tJ7sEJ00+XjNlg5e2EHjuw0QsapXxTU5qIgEIU3i4lKriQcqExOEJQnHw8zoSS1HYc34tIv/wLU7QC SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Sep 2018 16:31:59.1117 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: efb7791f-a52a-4114-a8b1-08d623cd951e 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: BYAPR07MB4664 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 addes new qla_nvmet files for FC-NVMe Target support. Patch #2 adds Kconfig and Makefile changes to prepare code compile. Patch #3, #4 has bulk of changes to handle FC-NVMe Target LS4 processing via Purex pass through path. Patch #4 adds SysFS hook to enable NVMe Target for the port. Note: All the patches in this series must be applied before they can be compilable. Please apply them to 4.20/scsi-queue 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. Qlogic 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 files for FC-NVMe Target support qla2xxx_nvmet: Add FC-NVMe Target Link Service request handling 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 | 17 +- drivers/scsi/qla2xxx/qla_gs.c | 16 +- drivers/scsi/qla2xxx/qla_init.c | 49 +- drivers/scsi/qla2xxx/qla_iocb.c | 42 +- 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 | 798 ++++++++++++++++++++++++++++++ drivers/scsi/qla2xxx/qla_nvmet.h | 129 +++++ drivers/scsi/qla2xxx/qla_os.c | 77 ++- drivers/scsi/qla2xxx/qla_target.c | 977 ++++++++++++++++++++++++++++++++++++- drivers/scsi/qla2xxx/qla_target.h | 90 ++++ drivers/scsi/qla2xxx/qla_version.h | 4 +- 19 files changed, 2708 insertions(+), 74 deletions(-) create mode 100644 drivers/scsi/qla2xxx/qla_nvmet.c create mode 100644 drivers/scsi/qla2xxx/qla_nvmet.h