From patchwork Wed Sep 26 04:03:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Madhani, Himanshu" X-Patchwork-Id: 10615271 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 33A94112B for ; Wed, 26 Sep 2018 04:27:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2527128A52 for ; Wed, 26 Sep 2018 04:27:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 199E52A5E3; Wed, 26 Sep 2018 04:27:04 +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 A1E9A28A52 for ; Wed, 26 Sep 2018 04:27:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726421AbeIZKiA (ORCPT ); Wed, 26 Sep 2018 06:38:00 -0400 Received: from mail-by2nam03on0050.outbound.protection.outlook.com ([104.47.42.50]:5200 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726314AbeIZKh7 (ORCPT ); Wed, 26 Sep 2018 06:37:59 -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=Cj3PccO9Evvw5R55kD41rhFwhP1uj460y4B+gnPzc8UEsnJWHmOq8FnQ1C1Oj8Tn/8CmAJPFOImMNFwDq9/fvAvOE8tqt243Qk14ychYNoa9goFeCn1Cj5NhcZSHocf+eitb7sDx2piMUS4uGCwdqo2TaaqWP/ARXz8Ba7Jr8bc= Received: from SN4PR0701CA0017.namprd07.prod.outlook.com (2603:10b6:803:28::27) by SN6PR07MB4670.namprd07.prod.outlook.com (2603:10b6:805:3a::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1143.18; Wed, 26 Sep 2018 04:26:56 +0000 Received: from DM3NAM05FT008.eop-nam05.prod.protection.outlook.com (2a01:111:f400:7e51::200) by SN4PR0701CA0017.outlook.office365.com (2603:10b6:803:28::27) 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 04:26: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 DM3NAM05FT008.mail.protection.outlook.com (10.152.98.114) 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 04:26: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; Tue, 25 Sep 2018 21:03:41 -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 w8Q43eW0009750; Tue, 25 Sep 2018 21:03:40 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id w8Q43dJI009749; Tue, 25 Sep 2018 21:03:39 -0700 From: Himanshu Madhani To: , CC: , Subject: [PATCH v2 0/5] qla2xxx: Add FC-NVMe Target support Date: Tue, 25 Sep 2018 21:03:34 -0700 Message-ID: <20180926040339.9715-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)(136003)(376002)(346002)(39860400002)(2980300002)(438002)(199004)(189003)(305945005)(48376002)(42186006)(69596002)(80596001)(2906002)(5660300001)(47776003)(110136005)(316002)(106002)(34290500001)(50466002)(8676002)(14444005)(51416003)(36756003)(87636003)(476003)(126002)(81166006)(486006)(44832011)(1076002)(478600001)(81156014)(2616005)(72206003)(16586007)(54906003)(356003)(186003)(50226002)(26005)(8936002)(336012)(86362001)(106466001)(6666003)(4326008);DIR:OUT;SFP:1101;SCL:1;SRVR:SN6PR07MB4670;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;DM3NAM05FT008;1:NAjg511oB6k1awlM8Sr0gZ5dEGJwgJt/VQ53jsE1ciid0m2EWw8OojkyLsOVXhN127FbzcrqTS06t9lOrvqxgiebKH5n6S6BmQpG5LRfe0eMefHv5W0KqOjw8N9UtbRE X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 509e9569-e001-4f90-e82d-08d623684b1d X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(4534165)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4608076)(2017052603328)(7153060);SRVR:SN6PR07MB4670; X-Microsoft-Exchange-Diagnostics: 1;SN6PR07MB4670;3:9y0M0z/rqbmxADRmDDNXHkcXGOfZGiNvLSniVdxeFsFyrVvsLmXV4A3hKHkTasA8IjI5EELlbjUNMEloBZZPVWn+75KuS4gl8zeMeHBkobx+0JbCUZxlsTFaLR2QmGNA00OvkVlA0MgoBcq1c8yrkdccZDo+x0HF9C3FBIGvrbzeui1gSQBKRmadMaE28Rm3I5S0JRybVcYnVZYZbyKkyDkUxOVsOuNGOhAolMxY9/LvzAqD9aNrm0GJA7091+t9As/SupJ9DOZCwGXUJd3qH4p8d1TtgODO1PnwY2PRfndgQKLpz3ebrKgrnsd2353lbGF2aCX4EEB+0u94Gvzos0KRoYRBuyiC3wuXjdOTf7E=;25:WwpYRZ7ZlZEEMWdH5aVO9M00mBx5chPmGIZFwAVJQZyIWExhGCxXJtUTlNlnnssyj5+ICCZ6cYbYbmEBKxttvi/PhuubtMd4qu7awQQYxo+GgtRf13ZNhX+/sEL1QPILeId0+wLr7SpEdG2pGlonRw6yaJnAtZ3a2LCmi0vlHk5JPUiXEwYWDFW6S6N9qeJElrpoz2FbpRUVw7RU/7t/+xsVS8dW7ak3H7vo6w7AJ1QLVja2Z866pIaX1YwUPIxOeV6TOSzE6oeR/ur9ScsNH187ZTCHcQ7SWoZJstI5OntqboYwja4KDjbIAExfpncqi11vFKWDfaRg/VVkEFJvig== X-MS-TrafficTypeDiagnostic: SN6PR07MB4670: X-Microsoft-Exchange-Diagnostics: 1;SN6PR07MB4670;31:LowbhGmH4+5t2+SOT2bQGLWP6CaAIk3ZM/qFCKNpYZKhZOK81ajcX0vnGI6XKWcAZ+ag/QjBC8AbvkTRnPPNf6Gq4DeO9LlJpMCqQ6QX1zYt6SnE/+yKtH9jYcO7kUr6jrT6+QA9tTCmFdSvvgA0B6ieVbaGCsSuSiEEjtmL1JB9gZ2w10ACX1mLy+eRKdABUFuq24E3rzU5eK2zEAB2rlKOM2981+nLlLzBNO7pzX0=;20:1DJ31SL0eG5/9Xr7qnpf/ad2vKafdrJg8+OSFD0gxIBpwMXWVOQrLtq1h2dx6cuRdk/LtxzZ6iZitKvS3EiV2WBVWA4wRc69b1G51OeN26gprVAazm351x6uHsZiKpjhahacizJhZDS9JipcsDEmT9vlJ73Bl/uFLGIIHqbZFlAiXnzen2j7o4sFQ55Fkk9OVGgvqsbw+ISesYLFphMHVnUpYTEdjfi6vZAAboEq0X0DDH6v2jM4OxzmbBz9P5pRN5KYJd9q4aSWIKh+s/eJ6S5nwOz5k9GkMcZhOW+LQtZuxIqbJX/CZhFYtY8E3ArJvvzq4FHn3tnRAUOv6Pcq5aESaON+81JHsNgXSgA36y23qfj8VotaWgiCg/61ABUCF5rc6d+Psi5iMBcOfH2M5EAekrqkzKzGscpKwlfWeHD8n8DeX32EqrRz/6aPPHS9L6d1ilLEZ/WBhvJjMdIznAMEC0+/+zns6mZhTDxa4bBZNOsG1q0tnOYNBufObMsg 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)(3231355)(944501410)(52105095)(93006095)(93004095)(3002001)(149066)(150027)(6041310)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(20161123562045)(201708071742011)(7699051);SRVR:SN6PR07MB4670;BCL:0;PCL:0;RULEID:;SRVR:SN6PR07MB4670; X-Microsoft-Exchange-Diagnostics: 1;SN6PR07MB4670;4:4pN+Gp7+4yUwAva8LUwdoCX3kCJfcG88DwwVdt7LtK6MuX/NNlil9T305AlxvuIS6pIWxvknVrSxJ9tRZySNZy8oHTxDYTPbcflBOpKKtRyhbXaZCFywmo1YhktYW4UxPIePd8o2CNWd6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OkCxi3BbBHKHmoDwH34puRDkKTItxsOFzUBkhzBeriPJofh2A==;5:SpGI20G60O3sKQrqawN9AqNmdfw21L+yryuYcjA8Hq6tek1avKtobFUe5mk2CzKqJ0k8SwORD6sE2pNBcMlVPgJQTHzcaIyQsc/EWrCh7mp7g9/rBl6X3T9yO55Hk08TIqBrMIrZgc/8Z4WFg7z0jezxqsoCZKX5fDnj2nCceJY=;7:qQf4wFWe4RvPdIKv3C6u99FyvdPJIBy8SsK+CskuJqlBSpKDsq2mI9S6xdfzHCl1R9rjXmGI3REkDpvKhej+I9ocQ9GDjQ34TN4ZZJBBsZVDbWYzQE8ic6PMPJQoi9+K0jHUwCCZgnQffdg+zVu0IUE6ggGqy8RGhPZ7dk5fEOG3fCjFkFPOPlcvZTv3ZtnGRlvm6BnAAmh0Mk+qT1ZdjZd/uv03MKm72rk6q4MMo8TWuoaILcP8eppDff0vBIos SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Sep 2018 04:26:56.0357 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 509e9569-e001-4f90-e82d-08d623684b1d 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: SN6PR07MB4670 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