Lines Matching refs:srp_cmd

981 static inline void *srpt_get_desc_buf(struct srp_cmd *srp_cmd)  in srpt_get_desc_buf()  argument
988 BUILD_BUG_ON(!__same_type(srp_cmd->add_data[0], (s8)0) && in srpt_get_desc_buf()
989 !__same_type(srp_cmd->add_data[0], (u8)0)); in srpt_get_desc_buf()
996 return srp_cmd->add_data + (srp_cmd->add_cdb_len & ~3); in srpt_get_desc_buf()
1020 struct srp_cmd *srp_cmd, enum dma_data_direction *dir, in srpt_get_desc_tbl() argument
1032 if (srp_cmd->buf_fmt & 0xf) in srpt_get_desc_tbl()
1035 else if (srp_cmd->buf_fmt >> 4) in srpt_get_desc_tbl()
1044 if (((srp_cmd->buf_fmt & 0xf) == SRP_DATA_DESC_DIRECT) || in srpt_get_desc_tbl()
1045 ((srp_cmd->buf_fmt >> 4) == SRP_DATA_DESC_DIRECT)) { in srpt_get_desc_tbl()
1046 struct srp_direct_buf *db = srpt_get_desc_buf(srp_cmd); in srpt_get_desc_tbl()
1050 } else if (((srp_cmd->buf_fmt & 0xf) == SRP_DATA_DESC_INDIRECT) || in srpt_get_desc_tbl()
1051 ((srp_cmd->buf_fmt >> 4) == SRP_DATA_DESC_INDIRECT)) { in srpt_get_desc_tbl()
1052 struct srp_indirect_buf *idb = srpt_get_desc_buf(srp_cmd); in srpt_get_desc_tbl()
1057 (srp_cmd->data_out_desc_cnt + srp_cmd->data_in_desc_cnt)) { in srpt_get_desc_tbl()
1059 srp_cmd->data_out_desc_cnt, in srpt_get_desc_tbl()
1060 srp_cmd->data_in_desc_cnt, in srpt_get_desc_tbl()
1069 } else if ((srp_cmd->buf_fmt >> 4) == SRP_DATA_DESC_IMM) { in srpt_get_desc_tbl()
1070 struct srp_imm_buf *imm_buf = srpt_get_desc_buf(srp_cmd); in srpt_get_desc_tbl()
1071 void *data = (void *)srp_cmd + imm_data_offset; in srpt_get_desc_tbl()
1498 struct srp_cmd *srp_cmd; in srpt_handle_cmd() local
1507 srp_cmd = recv_ioctx->ioctx.buf + recv_ioctx->ioctx.offset; in srpt_handle_cmd()
1509 cmd->tag = srp_cmd->tag; in srpt_handle_cmd()
1511 switch (srp_cmd->task_attr) { in srpt_handle_cmd()
1527 rc = srpt_get_desc_tbl(recv_ioctx, send_ioctx, srp_cmd, &dir, in srpt_handle_cmd()
1532 srp_cmd->tag); in srpt_handle_cmd()
1538 scsilun_to_int(&srp_cmd->lun), data_len, in srpt_handle_cmd()
1542 srp_cmd->tag); in srpt_handle_cmd()
1546 if (target_submit_prep(cmd, srp_cmd->cdb, sg, sg_cnt, NULL, 0, NULL, 0, in srpt_handle_cmd()
1628 struct srp_cmd *srp_cmd; in srpt_handle_new_iu() local
1643 srp_cmd = recv_ioctx->ioctx.buf + recv_ioctx->ioctx.offset; in srpt_handle_new_iu()
1644 opcode = srp_cmd->opcode; in srpt_handle_new_iu()
2274 if (imm_data_offset >= sizeof(struct srp_cmd)) { in srpt_cm_req_recv()