Lines Matching refs:srp_cmd

975 static inline void *srpt_get_desc_buf(struct srp_cmd *srp_cmd)  in srpt_get_desc_buf()  argument
982 BUILD_BUG_ON(!__same_type(srp_cmd->add_data[0], (s8)0) && in srpt_get_desc_buf()
983 !__same_type(srp_cmd->add_data[0], (u8)0)); in srpt_get_desc_buf()
990 return srp_cmd->add_data + (srp_cmd->add_cdb_len & ~3); in srpt_get_desc_buf()
1014 struct srp_cmd *srp_cmd, enum dma_data_direction *dir, in srpt_get_desc_tbl() argument
1026 if (srp_cmd->buf_fmt & 0xf) in srpt_get_desc_tbl()
1029 else if (srp_cmd->buf_fmt >> 4) in srpt_get_desc_tbl()
1038 if (((srp_cmd->buf_fmt & 0xf) == SRP_DATA_DESC_DIRECT) || in srpt_get_desc_tbl()
1039 ((srp_cmd->buf_fmt >> 4) == SRP_DATA_DESC_DIRECT)) { in srpt_get_desc_tbl()
1040 struct srp_direct_buf *db = srpt_get_desc_buf(srp_cmd); in srpt_get_desc_tbl()
1044 } else if (((srp_cmd->buf_fmt & 0xf) == SRP_DATA_DESC_INDIRECT) || in srpt_get_desc_tbl()
1045 ((srp_cmd->buf_fmt >> 4) == SRP_DATA_DESC_INDIRECT)) { in srpt_get_desc_tbl()
1046 struct srp_indirect_buf *idb = srpt_get_desc_buf(srp_cmd); in srpt_get_desc_tbl()
1051 (srp_cmd->data_out_desc_cnt + srp_cmd->data_in_desc_cnt)) { in srpt_get_desc_tbl()
1053 srp_cmd->data_out_desc_cnt, in srpt_get_desc_tbl()
1054 srp_cmd->data_in_desc_cnt, in srpt_get_desc_tbl()
1063 } else if ((srp_cmd->buf_fmt >> 4) == SRP_DATA_DESC_IMM) { in srpt_get_desc_tbl()
1064 struct srp_imm_buf *imm_buf = srpt_get_desc_buf(srp_cmd); in srpt_get_desc_tbl()
1065 void *data = (void *)srp_cmd + imm_data_offset; in srpt_get_desc_tbl()
1492 struct srp_cmd *srp_cmd; in srpt_handle_cmd() local
1501 srp_cmd = recv_ioctx->ioctx.buf + recv_ioctx->ioctx.offset; in srpt_handle_cmd()
1503 cmd->tag = srp_cmd->tag; in srpt_handle_cmd()
1505 switch (srp_cmd->task_attr) { in srpt_handle_cmd()
1521 rc = srpt_get_desc_tbl(recv_ioctx, send_ioctx, srp_cmd, &dir, in srpt_handle_cmd()
1526 srp_cmd->tag); in srpt_handle_cmd()
1532 scsilun_to_int(&srp_cmd->lun), data_len, in srpt_handle_cmd()
1536 srp_cmd->tag); in srpt_handle_cmd()
1540 if (target_submit_prep(cmd, srp_cmd->cdb, sg, sg_cnt, NULL, 0, NULL, 0, in srpt_handle_cmd()
1622 struct srp_cmd *srp_cmd; in srpt_handle_new_iu() local
1637 srp_cmd = recv_ioctx->ioctx.buf + recv_ioctx->ioctx.offset; in srpt_handle_new_iu()
1638 opcode = srp_cmd->opcode; in srpt_handle_new_iu()
2269 if (imm_data_offset >= sizeof(struct srp_cmd)) { in srpt_cm_req_recv()