Lines Matching refs:srp_cmd

192 static int srp_indirect_data(struct ibmvscsis_cmd *cmd, struct srp_cmd *srp_cmd,  in srp_indirect_data()  argument
211 if ((dir == DMA_FROM_DEVICE && nmd == srp_cmd->data_in_desc_cnt) || in srp_indirect_data()
212 (dir == DMA_TO_DEVICE && nmd == srp_cmd->data_out_desc_cnt)) { in srp_indirect_data()
269 static int data_out_desc_size(struct srp_cmd *cmd) in data_out_desc_size()
295 int srp_transfer_data(struct ibmvscsis_cmd *cmd, struct srp_cmd *srp_cmd, in srp_transfer_data() argument
307 offset = srp_cmd->add_cdb_len & ~3; in srp_transfer_data()
309 dir = srp_cmd_direction(srp_cmd); in srp_transfer_data()
311 offset += data_out_desc_size(srp_cmd); in srp_transfer_data()
314 format = srp_cmd->buf_fmt >> 4; in srp_transfer_data()
316 format = srp_cmd->buf_fmt & ((1U << 4) - 1); in srp_transfer_data()
322 md = (struct srp_direct_buf *)(srp_cmd->add_data + offset); in srp_transfer_data()
326 id = (struct srp_indirect_buf *)(srp_cmd->add_data + offset); in srp_transfer_data()
327 err = srp_indirect_data(cmd, srp_cmd, id, dir, rdma_io, dma_map, in srp_transfer_data()
338 u64 srp_data_length(struct srp_cmd *cmd, enum dma_data_direction dir) in srp_data_length()
371 int srp_get_desc_table(struct srp_cmd *srp_cmd, enum dma_data_direction *dir, in srp_get_desc_table() argument
384 BUILD_BUG_ON(!__same_type(srp_cmd->add_data[0], (s8)0) in srp_get_desc_table()
385 && !__same_type(srp_cmd->add_data[0], (u8)0)); in srp_get_desc_table()
395 if (srp_cmd->buf_fmt & 0xf) in srp_get_desc_table()
397 else if (srp_cmd->buf_fmt >> 4) in srp_get_desc_table()
400 add_cdb_offset = srp_cmd->add_cdb_len & ~3; in srp_get_desc_table()
401 if (((srp_cmd->buf_fmt & 0xf) == SRP_DATA_DESC_DIRECT) || in srp_get_desc_table()
402 ((srp_cmd->buf_fmt >> 4) == SRP_DATA_DESC_DIRECT)) { in srp_get_desc_table()
403 db = (struct srp_direct_buf *)(srp_cmd->add_data in srp_get_desc_table()
406 } else if (((srp_cmd->buf_fmt & 0xf) == SRP_DATA_DESC_INDIRECT) || in srp_get_desc_table()
407 ((srp_cmd->buf_fmt >> 4) == SRP_DATA_DESC_INDIRECT)) { in srp_get_desc_table()
408 idb = (struct srp_indirect_buf *)(srp_cmd->add_data in srp_get_desc_table()