@@ -67,6 +67,7 @@
* | Target Mode Management | 0xf09b | 0xf002 |
* | | | 0xf046-0xf049 |
* | Target Mode Task Management | 0x1000d | |
+ * | NVME | 0x11000 | |
* ----------------------------------------------------------------------
*/
@@ -367,6 +367,8 @@ ql_log_qp(uint32_t, struct qla_qpair *, int32_t, const char *fmt, ...);
#define ql_dbg_tgt_tmr 0x00001000 /* Target mode task management */
#define ql_dbg_tgt_dif 0x00000800 /* Target mode dif */
+#define ql_dbg_nvme 0x00000400 /* NVME Target */
+
extern int qla27xx_dump_mpi_ram(struct qla_hw_data *, uint32_t, uint32_t *,
uint32_t, void **);
extern int qla24xx_dump_ram(struct qla_hw_data *, uint32_t, uint32_t *,
@@ -515,6 +515,9 @@ struct srb_iocb {
#define SRB_PRLI_CMD 21
#define SRB_CTRL_VP 22
#define SRB_PRLO_CMD 23
+#define SRB_NVME_ELS_RSP 24
+#define SRB_NVMET_LS 25
+#define SRB_NVMET_FCP 26
enum {
TYPE_SRB,
@@ -119,6 +119,13 @@ void qla_do_iidma_work(struct scsi_qla_host *vha, fc_port_t *fcport);
int qla2x00_reserve_mgmt_server_loop_id(scsi_qla_host_t *);
void qla_rscn_replay(fc_port_t *fcport);
+
+/*
+ * Used by FC-NVMe Target
+ */
+int qla_nvmet_ls(srb_t *sp, void *rsp_pkt);
+int qlt_send_els_resp(srb_t *sp, void *pkt);
+
/*
* Global Data in qla_os.c source file.
*/
@@ -2113,7 +2113,7 @@ __qla2x00_alloc_iocbs(struct qla_qpair *qpair, srb_t *sp)
req_cnt = 1;
handle = 0;
- if (sp && (sp->type != SRB_SCSI_CMD)) {
+ if (sp && (sp->type != SRB_SCSI_CMD) && (sp->type != SRB_NVMET_FCP)) {
/* Adjust entry-counts as needed. */
req_cnt = sp->iocbs;
}
@@ -3493,6 +3493,9 @@ qla2x00_start_sp(srb_t *sp)
case SRB_NVME_LS:
qla_nvme_ls(sp, pkt);
break;
+ case SRB_NVMET_LS:
+ qla_nvmet_ls(sp, pkt);
+ break;
case SRB_ABT_CMD:
IS_QLAFX00(ha) ?
qlafx00_abort_iocb(sp, pkt) :
@@ -3518,6 +3521,9 @@ qla2x00_start_sp(srb_t *sp)
case SRB_PRLO_CMD:
qla24xx_prlo_iocb(sp, pkt);
break;
+ case SRB_NVME_ELS_RSP:
+ qlt_send_els_resp(sp, pkt);
+ break;
default:
break;
}
@@ -445,6 +445,17 @@ static bool qlt_24xx_atio_pkt_all_vps(struct scsi_qla_host *vha,
return false;
}
+int qlt_send_els_resp(srb_t *sp, void *pkt)
+{
+ return 0;
+}
+
+int
+qla_nvmet_ls(srb_t *sp, void *rsp_pkt)
+{
+ return 0;
+}
+
void qlt_response_pkt_all_vps(struct scsi_qla_host *vha,
struct rsp_que *rsp, response_t *pkt)
{