Lines Matching refs:iser_task

50 	struct iscsi_iser_task *iser_task = task->dd_data;  in iser_prepare_read_cmd()  local
53 struct iser_hdr *hdr = &iser_task->desc.iser_header; in iser_prepare_read_cmd()
54 struct iser_data_buf *buf_in = &iser_task->data[ISER_DIR_IN]; in iser_prepare_read_cmd()
56 err = iser_dma_map_task_data(iser_task, in iser_prepare_read_cmd()
63 if (edtl > iser_task->data[ISER_DIR_IN].data_len) { in iser_prepare_read_cmd()
66 iser_task->data[ISER_DIR_IN].data_len, edtl, in iser_prepare_read_cmd()
67 task->itt, iser_task->iser_conn); in iser_prepare_read_cmd()
71 err = iser_reg_rdma_mem(iser_task,ISER_DIR_IN); in iser_prepare_read_cmd()
76 regd_buf = &iser_task->rdma_regd[ISER_DIR_IN]; in iser_prepare_read_cmd()
99 struct iscsi_iser_task *iser_task = task->dd_data; in iser_prepare_write_cmd() local
102 struct iser_hdr *hdr = &iser_task->desc.iser_header; in iser_prepare_write_cmd()
103 struct iser_data_buf *buf_out = &iser_task->data[ISER_DIR_OUT]; in iser_prepare_write_cmd()
104 struct ib_sge *tx_dsg = &iser_task->desc.tx_sg[1]; in iser_prepare_write_cmd()
106 err = iser_dma_map_task_data(iser_task, in iser_prepare_write_cmd()
113 if (edtl > iser_task->data[ISER_DIR_OUT].data_len) { in iser_prepare_write_cmd()
116 iser_task->data[ISER_DIR_OUT].data_len, in iser_prepare_write_cmd()
121 err = iser_reg_rdma_mem(iser_task,ISER_DIR_OUT); in iser_prepare_write_cmd()
127 regd_buf = &iser_task->rdma_regd[ISER_DIR_OUT]; in iser_prepare_write_cmd()
146 iser_task->desc.num_sge = 2; in iser_prepare_write_cmd()
270 struct iscsi_iser_task *iser_task = task->dd_data; in iser_send_command() local
276 struct iser_tx_desc *tx_desc = &iser_task->desc; in iser_send_command()
285 data_buf = &iser_task->data[ISER_DIR_IN]; in iser_send_command()
287 data_buf = &iser_task->data[ISER_DIR_OUT]; in iser_send_command()
311 iser_task->status = ISER_TASK_STATUS_STARTED; in iser_send_command()
330 struct iscsi_iser_task *iser_task = task->dd_data; in iser_send_data_out() local
359 regd_buf = &iser_task->rdma_regd[ISER_DIR_OUT]; in iser_send_data_out()
366 if (buf_offset + data_seg_len > iser_task->data[ISER_DIR_OUT].data_len) { in iser_send_data_out()
370 iser_task->data[ISER_DIR_OUT].data_len, itt); in iser_send_data_out()
392 struct iscsi_iser_task *iser_task = task->dd_data; in iser_send_control() local
393 struct iser_tx_desc *mdesc = &iser_task->desc; in iser_send_control()
512 void iser_task_rdma_init(struct iscsi_iser_task *iser_task) in iser_task_rdma_init() argument
515 iser_task->status = ISER_TASK_STATUS_INIT; in iser_task_rdma_init()
517 iser_task->dir[ISER_DIR_IN] = 0; in iser_task_rdma_init()
518 iser_task->dir[ISER_DIR_OUT] = 0; in iser_task_rdma_init()
520 iser_task->data[ISER_DIR_IN].data_len = 0; in iser_task_rdma_init()
521 iser_task->data[ISER_DIR_OUT].data_len = 0; in iser_task_rdma_init()
523 memset(&iser_task->rdma_regd[ISER_DIR_IN], 0, in iser_task_rdma_init()
525 memset(&iser_task->rdma_regd[ISER_DIR_OUT], 0, in iser_task_rdma_init()
529 void iser_task_rdma_finalize(struct iscsi_iser_task *iser_task) in iser_task_rdma_finalize() argument
537 if (iser_task->data_copy[ISER_DIR_IN].copy_buf != NULL) { in iser_task_rdma_finalize()
539 iser_finalize_rdma_unaligned_sg(iser_task, ISER_DIR_IN); in iser_task_rdma_finalize()
541 if (iser_task->data_copy[ISER_DIR_OUT].copy_buf != NULL) { in iser_task_rdma_finalize()
543 iser_finalize_rdma_unaligned_sg(iser_task, ISER_DIR_OUT); in iser_task_rdma_finalize()
546 if (iser_task->dir[ISER_DIR_IN]) { in iser_task_rdma_finalize()
547 regd = &iser_task->rdma_regd[ISER_DIR_IN]; in iser_task_rdma_finalize()
552 if (iser_task->dir[ISER_DIR_OUT]) { in iser_task_rdma_finalize()
553 regd = &iser_task->rdma_regd[ISER_DIR_OUT]; in iser_task_rdma_finalize()
560 iser_dma_unmap_task_data(iser_task); in iser_task_rdma_finalize()