diff options
author | Duane Grigsby <duane.grigsby@cavium.com> | 2017-06-21 13:48:43 -0700 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2017-06-27 21:21:47 -0400 |
commit | e84067d7430107a982858f11c5239542b56a8449 (patch) | |
tree | 2e193153376c3f300617869f0faae31ec71890c7 /drivers/scsi/qla2xxx/qla_mbx.c | |
parent | 7401bc18d1ee39e46b668341097e0183975c02eb (diff) | |
download | linux-e84067d7430107a982858f11c5239542b56a8449.tar.bz2 |
scsi: qla2xxx: Add FC-NVMe F/W initialization and transport registration
This code provides the interfaces to register remote and local ports of
FC4 type 0x28 with the FC-NVMe transport and transports the requests
(FC-NVMe FC link services and FC-NVMe commands IUs) to the fabric. It
also provides the support for allocating h/w queues and aborting FC-NVMe
FC requests.
Signed-off-by: Darren Trapp <darren.trapp@cavium.com>
Signed-off-by: Duane Grigsby <duane.grigsby@cavium.com>
Signed-off-by: Anil Gurumurthy <anil.gurumurhty@cavium.com>
Signed-off-by: Giridhar Malavali <giridhar.malavali@cavium.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_mbx.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_mbx.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c index 1eac67e8fdfd..0764b6172ed1 100644 --- a/drivers/scsi/qla2xxx/qla_mbx.c +++ b/drivers/scsi/qla2xxx/qla_mbx.c @@ -560,6 +560,8 @@ qla2x00_load_ram(scsi_qla_host_t *vha, dma_addr_t req_dma, uint32_t risc_addr, } #define EXTENDED_BB_CREDITS BIT_0 +#define NVME_ENABLE_FLAG BIT_3 + /* * qla2x00_execute_fw * Start adapter firmware. @@ -601,6 +603,9 @@ qla2x00_execute_fw(scsi_qla_host_t *vha, uint32_t risc_addr) } else mcp->mb[4] = 0; + if (ql2xnvmeenable && IS_QLA27XX(ha)) + mcp->mb[4] |= NVME_ENABLE_FLAG; + if (ha->flags.exlogins_enabled) mcp->mb[4] |= ENABLE_EXTENDED_LOGIN; @@ -941,6 +946,22 @@ qla2x00_get_fw_version(scsi_qla_host_t *vha) ql_dbg(ql_dbg_mbx + ql_dbg_verbose, vha, 0x1191, "%s: Firmware supports Exchange Offload 0x%x\n", __func__, ha->fw_attributes_h); + + /* bit 26 of fw_attributes */ + if ((ha->fw_attributes_h & 0x400) && ql2xnvmeenable) { + struct init_cb_24xx *icb; + + icb = (struct init_cb_24xx *)ha->init_cb; + /* + * fw supports nvme and driver load + * parameter requested nvme + */ + vha->flags.nvme_enabled = 1; + icb->firmware_options_2 &= cpu_to_le32(~0xf); + ha->zio_mode = 0; + ha->zio_timer = 0; + } + } if (IS_QLA27XX(ha)) { |