Lines Matching refs:srp_cmd

1040 static inline void *srpt_get_desc_buf(struct srp_cmd *srp_cmd)  in srpt_get_desc_buf()  argument
1047 BUILD_BUG_ON(!__same_type(srp_cmd->add_data[0], (s8)0) && in srpt_get_desc_buf()
1048 !__same_type(srp_cmd->add_data[0], (u8)0)); in srpt_get_desc_buf()
1055 return srp_cmd->add_data + (srp_cmd->add_cdb_len & ~3); in srpt_get_desc_buf()
1079 struct srp_cmd *srp_cmd, enum dma_data_direction *dir, in srpt_get_desc_tbl() argument
1091 if (srp_cmd->buf_fmt & 0xf) in srpt_get_desc_tbl()
1094 else if (srp_cmd->buf_fmt >> 4) in srpt_get_desc_tbl()
1103 if (((srp_cmd->buf_fmt & 0xf) == SRP_DATA_DESC_DIRECT) || in srpt_get_desc_tbl()
1104 ((srp_cmd->buf_fmt >> 4) == SRP_DATA_DESC_DIRECT)) { in srpt_get_desc_tbl()
1105 struct srp_direct_buf *db = srpt_get_desc_buf(srp_cmd); in srpt_get_desc_tbl()
1109 } else if (((srp_cmd->buf_fmt & 0xf) == SRP_DATA_DESC_INDIRECT) || in srpt_get_desc_tbl()
1110 ((srp_cmd->buf_fmt >> 4) == SRP_DATA_DESC_INDIRECT)) { in srpt_get_desc_tbl()
1111 struct srp_indirect_buf *idb = srpt_get_desc_buf(srp_cmd); in srpt_get_desc_tbl()
1116 (srp_cmd->data_out_desc_cnt + srp_cmd->data_in_desc_cnt)) { in srpt_get_desc_tbl()
1118 srp_cmd->data_out_desc_cnt, in srpt_get_desc_tbl()
1119 srp_cmd->data_in_desc_cnt, in srpt_get_desc_tbl()
1128 } else if ((srp_cmd->buf_fmt >> 4) == SRP_DATA_DESC_IMM) { in srpt_get_desc_tbl()
1129 struct srp_imm_buf *imm_buf = srpt_get_desc_buf(srp_cmd); in srpt_get_desc_tbl()
1130 void *data = (void *)srp_cmd + imm_data_offset; in srpt_get_desc_tbl()
1557 struct srp_cmd *srp_cmd; in srpt_handle_cmd() local
1566 srp_cmd = recv_ioctx->ioctx.buf + recv_ioctx->ioctx.offset; in srpt_handle_cmd()
1568 cmd->tag = srp_cmd->tag; in srpt_handle_cmd()
1570 switch (srp_cmd->task_attr) { in srpt_handle_cmd()
1586 rc = srpt_get_desc_tbl(recv_ioctx, send_ioctx, srp_cmd, &dir, in srpt_handle_cmd()
1591 srp_cmd->tag); in srpt_handle_cmd()
1597 scsilun_to_int(&srp_cmd->lun), data_len, in srpt_handle_cmd()
1601 srp_cmd->tag); in srpt_handle_cmd()
1605 if (target_submit_prep(cmd, srp_cmd->cdb, sg, sg_cnt, NULL, 0, NULL, 0, in srpt_handle_cmd()
1687 struct srp_cmd *srp_cmd; in srpt_handle_new_iu() local
1702 srp_cmd = recv_ioctx->ioctx.buf + recv_ioctx->ioctx.offset; in srpt_handle_new_iu()
1703 opcode = srp_cmd->opcode; in srpt_handle_new_iu()
2332 if (imm_data_offset >= sizeof(struct srp_cmd)) { in srpt_cm_req_recv()