]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
scsi: qla2xxx: Add new FC-NVMe enable BIT to enable FC-NVMe feature
authorGiridhar Malavali <gmalavali@marvell.com>
Wed, 30 Jan 2019 17:50:44 +0000 (09:50 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 1 Feb 2019 23:11:44 +0000 (18:11 -0500)
This patch adds new BIT detection to enable FC-NVMe feature in the driver.

[mkp: fixed Giridhar's SoB]

Signed-off-by: Giridhar Malavali <gmalavali@marvell.com>
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Reviewed-by: Ewan D. Milne <emilne@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/qla2xxx/qla_def.h
drivers/scsi/qla2xxx/qla_mbx.c

index 97f66b142ff2b32499794f296297a0f369306cf8..8858bb1ea1b24d3d58a885fc903a587ea1a360d6 100644 (file)
@@ -3966,6 +3966,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;
index 191b6b7c8747df06419b998a8fbf06541658080a..f753aa495753909c029f3c7376bb16f70cd0563b 100644 (file)
@@ -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",