From patchwork Wed Jan 30 17:50:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Himanshu Madhani X-Patchwork-Id: 10789115 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 7F7D113B4 for ; Wed, 30 Jan 2019 17:51:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6C3282F8B6 for ; Wed, 30 Jan 2019 17:51:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5AAFA2FC30; Wed, 30 Jan 2019 17:51:54 +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 DDD3D2F8B6 for ; Wed, 30 Jan 2019 17:51:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732579AbfA3Rvx (ORCPT ); Wed, 30 Jan 2019 12:51:53 -0500 Received: from mail-eopbgr680087.outbound.protection.outlook.com ([40.107.68.87]:42912 "EHLO NAM04-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727169AbfA3Rvw (ORCPT ); Wed, 30 Jan 2019 12:51:52 -0500 Received: from DM5PR07CA0032.namprd07.prod.outlook.com (2603:10b6:3:16::18) by DM6PR07MB5468.namprd07.prod.outlook.com (2603:10b6:5:76::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1580.16; Wed, 30 Jan 2019 17:51:50 +0000 Received: from CO1NAM05FT037.eop-nam05.prod.protection.outlook.com (2a01:111:f400:7e50::202) by DM5PR07CA0032.outlook.office365.com (2603:10b6:3:16::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1558.17 via Frontend Transport; Wed, 30 Jan 2019 17:51:50 +0000 Authentication-Results: spf=fail (sender IP is 199.233.58.38) 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 199.233.58.38 as permitted sender) receiver=protection.outlook.com; client-ip=199.233.58.38; helo=CAEXCH02.caveonetworks.com; Received: from CAEXCH02.caveonetworks.com (199.233.58.38) by CO1NAM05FT037.mail.protection.outlook.com (10.152.96.150) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA) id 15.20.1580.2 via Frontend Transport; Wed, 30 Jan 2019 17:51:49 +0000 Received: from dut1171.mv.qlogic.com (10.112.88.18) by CAEXCH02.caveonetworks.com (10.67.98.110) with Microsoft SMTP Server (TLS) id 14.2.347.0; Wed, 30 Jan 2019 09:50:44 -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 x0UHoiA5003047; Wed, 30 Jan 2019 09:50:44 -0800 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id x0UHoiOg003046; Wed, 30 Jan 2019 09:50:44 -0800 From: Himanshu Madhani To: , CC: , Subject: [PATCH] qla2xxx: Add new FC-NVMe enable BIT to enable FC-NVMe feature Date: Wed, 30 Jan 2019 09:50:44 -0800 Message-ID: <20190130175044.3012-1-hmadhani@marvell.com> X-Mailer: git-send-email 2.12.0 MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131933443098811145;(abac79dc-c90b-41ba-8033-08d666125e47);(abac79dc-c90b-41ba-8033-08d666125e47) X-Forefront-Antispam-Report: CIP:199.233.58.38;IPV:CAL;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(39860400002)(136003)(346002)(396003)(376002)(2980300002)(1110001)(1109001)(339900001)(189003)(199004)(69596002)(26826003)(50466002)(110136005)(498600001)(48376002)(80596001)(305945005)(26005)(36756003)(68736007)(1076003)(36906005)(86362001)(356004)(54906003)(50226002)(8676002)(81166006)(53936002)(81156014)(316002)(16586007)(85426001)(476003)(51416003)(105606002)(106466001)(2616005)(97736004)(336012)(2906002)(87636003)(47776003)(486006)(126002)(4326008)(14444005)(8936002)(42186006);DIR:OUT;SFP:1101;SCL:1;SRVR:DM6PR07MB5468;H:CAEXCH02.caveonetworks.com;FPR:;SPF:Fail;LANG:en;PTR:InfoDomainNonexistent;MX:1;A:1; X-Microsoft-Exchange-Diagnostics: 1;CO1NAM05FT037;1:Q6M/eYjYG3kIgQNvRlIVx4T2EngnFqiaSIQMd/5wikpbwoIgtKGYeZtELggQuL8q76TtAfslgzhk3ugtt9J5CoAYFgPaRTpJaqHxvi6Bm6MsoFs8jmU1/TqTtJRZFrBn5G3c3JdYcJbHNcVqPY5k9l34RIm4NBKcjjGY/C0zcjw= X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f9eca41e-b3c5-4bb9-e777-08d686db9c4e X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(5600110)(711020)(4605077)(2017052603328);SRVR:DM6PR07MB5468; X-Microsoft-Exchange-Diagnostics: 1;DM6PR07MB5468;3:ZF1fBc0k0a3v5ztEoysWXN+zVZz9/F0o82ODKzidg2LZKB77gYBYyJ7/VMkFl56F9i2UzLUeiQnSxjchUrUk5tHyvMxUE52h0dz2Rbro7QxMG5lytyJBOVi+5XYi0YZeFDSFbrz4xo3BuQqeZO0OFrO/htvX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/kMGYSxPsvOQkM5iqgyPmkJddfhew1Xmf8btRyMAAJfE6qWlebb3lvGDnsbYnKqiw1vyShVzZZhbPdNsW0cPjusrl026K/rFKBLmg3iODPYboY6dweDBGsEKTM/KT0rLWXTKV/EuXwyS4qf+REXE9LXXgmCBmuoAK7v9lViI5zuZe6+S3O3MrtA==;5:u3bOKFu9xHLx52j2pi2Kmq5u08dPyZP1CQafOXnre2/W4C8gEOalQvY7VQEq8uyCaliYQeiKZCxbBhm7AIVDVQ66hVe4asEKHDuO90L8YMTZ31iwYsDIV6MhcWspSEKV0lMUWJHkzBPKVnr5w/IJKzTSSgmwKrrsW86Q69U0Kcyh7b1qgE6hlVCSaZpSuc8zQr+zOhpALhk3Yg4lx5RwBw==;7:H/P1BGHt1IRTl4rHKQgOL6sLzycnYYHln/Yz9VBlU++46P+Vd0GAShmmwbBnK25G/9wDciwMvwBUyw7orp6NGN9HOSUIcxKUuO5glEktXn/eT2mnObmsPT4YA9qyMg5LQYSHn7NCEOCh8oAKXGRf1w== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jan 2019 17:51:49.4897 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f9eca41e-b3c5-4bb9-e777-08d686db9c4e X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e;Ip=[199.233.58.38];Helo=[CAEXCH02.caveonetworks.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR07MB5468 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 adds new BIT detection to enable FC-NVMe feature in the driver. Signed-off-by: Giridhar Malavali Signed-off-by: Himanshu Madhani Reviewed-by: Ewan D. Milne --- Hi Martin, This patch adds additional bit to enable FC-NVMe in the driver. Please apply this patch to 5.1/scsi-queue at your earliest convenience. Thanks, Himanshu --- drivers/scsi/qla2xxx/qla_def.h | 3 +++ drivers/scsi/qla2xxx/qla_mbx.c | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h index 05b5c6fa011d..199713f29cbd 100644 --- a/drivers/scsi/qla2xxx/qla_def.h +++ b/drivers/scsi/qla2xxx/qla_def.h @@ -3958,6 +3958,9 @@ struct qla_hw_data { uint16_t fw_subminor_version; uint16_t fw_attributes; uint16_t fw_attributes_h; +#define FW_ATTR_H_NVME BIT_10 +#define FW_ATTR_H_NVME_UPDATED BIT_14 + uint16_t fw_attributes_ext[2]; uint32_t fw_memory_size; uint32_t fw_transfer_size; diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c index 3181235c3a32..f4adf6baee69 100644 --- a/drivers/scsi/qla2xxx/qla_mbx.c +++ b/drivers/scsi/qla2xxx/qla_mbx.c @@ -1109,7 +1109,9 @@ qla2x00_get_fw_version(scsi_qla_host_t *vha) * FW supports nvme and driver load parameter requested nvme. * BIT 26 of fw_attributes indicates NVMe support. */ - if ((ha->fw_attributes_h & 0x400) && ql2xnvmeenable) { + if ((ha->fw_attributes_h & + (FW_ATTR_H_NVME | FW_ATTR_H_NVME_UPDATED)) && + ql2xnvmeenable) { vha->flags.nvme_enabled = 1; ql_log(ql_log_info, vha, 0xd302, "%s: FC-NVMe is Enabled (0x%x)\n",