Lines Matching refs:task_params
52 static u32 calc_rw_task_size(struct iscsi_task_params *task_params, in calc_rw_task_size() argument
61 io_size = task_params->tx_io_size; in calc_rw_task_size()
63 io_size = task_params->rx_io_size; in calc_rw_task_size()
90 static void init_sqe(struct iscsi_task_params *task_params, in init_sqe() argument
98 if (!task_params->sqe) in init_sqe()
101 memset(task_params->sqe, 0, sizeof(*task_params->sqe)); in init_sqe()
102 task_params->sqe->task_id = cpu_to_le16(task_params->itid); in init_sqe()
104 SET_FIELD(task_params->sqe->flags, ISCSI_WQE_WQE_TYPE, in init_sqe()
115 init_dif_context_flags(&task_params->sqe->prot_flags, in init_sqe()
118 SET_FIELD(task_params->sqe->flags, ISCSI_WQE_WQE_TYPE, in init_sqe()
121 if (task_params->tx_io_size) { in init_sqe()
122 buf_size = calc_rw_task_size(task_params, task_type, in init_sqe()
134 SET_FIELD(task_params->sqe->flags, ISCSI_WQE_NUM_SGES, in init_sqe()
136 SET_FIELD(task_params->sqe->contlen_cdbsize, ISCSI_WQE_CONT_LEN, in init_sqe()
141 SET_FIELD(task_params->sqe->contlen_cdbsize, in init_sqe()
147 SET_FIELD(task_params->sqe->flags, ISCSI_WQE_WQE_TYPE, in init_sqe()
152 SET_FIELD(task_params->sqe->contlen_cdbsize, in init_sqe()
162 SET_FIELD(task_params->sqe->flags, ISCSI_WQE_WQE_TYPE, in init_sqe()
165 SET_FIELD(task_params->sqe->flags, ISCSI_WQE_WQE_TYPE, in init_sqe()
178 SET_FIELD(task_params->sqe->flags, ISCSI_WQE_RESPONSE, in init_sqe()
181 if (task_params->tx_io_size) { in init_sqe()
182 SET_FIELD(task_params->sqe->contlen_cdbsize, in init_sqe()
183 ISCSI_WQE_CONT_LEN, task_params->tx_io_size); in init_sqe()
187 SET_FIELD(task_params->sqe->flags, ISCSI_WQE_NUM_SGES, in init_sqe()
190 SET_FIELD(task_params->sqe->flags, ISCSI_WQE_NUM_SGES, in init_sqe()
201 static void init_default_iscsi_task(struct iscsi_task_params *task_params, in init_default_iscsi_task() argument
210 context = task_params->context; in init_default_iscsi_task()
224 cpu_to_le16(task_params->conn_icid); in init_default_iscsi_task()
230 context->ustorm_st_context.cq_rss_number = task_params->cq_rss_number; in init_default_iscsi_task()
231 context->ustorm_ag_context.icid = cpu_to_le16(task_params->conn_icid); in init_default_iscsi_task()
481 static int init_rw_iscsi_task(struct iscsi_task_params *task_params, in init_rw_iscsi_task() argument
495 task_size = calc_rw_task_size(task_params, task_type, sgl_task_params, in init_rw_iscsi_task()
498 init_default_iscsi_task(task_params, (struct data_hdr *)pdu_header, in init_rw_iscsi_task()
501 cxt = task_params->context; in init_rw_iscsi_task()
525 if (task_params->tx_io_size) { in init_rw_iscsi_task()
545 } else if (task_params->rx_io_size) { in init_rw_iscsi_task()
563 init_ustorm_task_contexts(&task_params->context->ustorm_st_context, in init_rw_iscsi_task()
564 &task_params->context->ustorm_ag_context, in init_rw_iscsi_task()
569 set_rw_exp_data_acked_and_cont_len(task_params->context, conn_params, in init_rw_iscsi_task()
576 init_rtdif_task_context(&task_params->context->rdif_context, in init_rw_iscsi_task()
577 &task_params->context->tdif_context, in init_rw_iscsi_task()
580 init_sqe(task_params, sgl_task_params, dif_task_params, pdu_header, in init_rw_iscsi_task()
586 int init_initiator_rw_iscsi_task(struct iscsi_task_params *task_params, in init_initiator_rw_iscsi_task() argument
595 return init_rw_iscsi_task(task_params, in init_initiator_rw_iscsi_task()
602 (task_params->rx_io_size == 0 && task_params->tx_io_size == 0)) in init_initiator_rw_iscsi_task()
603 return init_rw_iscsi_task(task_params, in init_initiator_rw_iscsi_task()
613 int init_initiator_login_request_task(struct iscsi_task_params *task_params, in init_initiator_login_request_task() argument
620 cxt = task_params->context; in init_initiator_login_request_task()
622 init_default_iscsi_task(task_params, in init_initiator_login_request_task()
628 task_params->rx_io_size ? in init_initiator_login_request_task()
630 task_params->tx_io_size ? in init_initiator_login_request_task()
634 if (task_params->tx_io_size) in init_initiator_login_request_task()
639 if (task_params->rx_io_size) in init_initiator_login_request_task()
645 cpu_to_le32(task_params->rx_io_size ? in init_initiator_login_request_task()
648 init_sqe(task_params, tx_params, NULL, in init_initiator_login_request_task()
655 int init_initiator_nop_out_task(struct iscsi_task_params *task_params, in init_initiator_nop_out_task() argument
662 cxt = task_params->context; in init_initiator_nop_out_task()
664 init_default_iscsi_task(task_params, in init_initiator_nop_out_task()
669 set_local_completion_context(task_params->context); in init_initiator_nop_out_task()
671 if (task_params->tx_io_size) in init_initiator_nop_out_task()
676 if (task_params->rx_io_size) in init_initiator_nop_out_task()
683 task_params->rx_io_size ? in init_initiator_nop_out_task()
685 task_params->tx_io_size ? in init_initiator_nop_out_task()
690 cpu_to_le32(task_params->rx_io_size ? in init_initiator_nop_out_task()
694 init_sqe(task_params, tx_sgl_task_params, NULL, in init_initiator_nop_out_task()
701 int init_initiator_logout_request_task(struct iscsi_task_params *task_params, in init_initiator_logout_request_task() argument
708 cxt = task_params->context; in init_initiator_logout_request_task()
710 init_default_iscsi_task(task_params, in init_initiator_logout_request_task()
714 if (task_params->tx_io_size) in init_initiator_logout_request_task()
719 if (task_params->rx_io_size) in init_initiator_logout_request_task()
726 task_params->rx_io_size ? in init_initiator_logout_request_task()
728 task_params->tx_io_size ? in init_initiator_logout_request_task()
733 cpu_to_le32(task_params->rx_io_size ? in init_initiator_logout_request_task()
736 init_sqe(task_params, tx_params, NULL, in init_initiator_logout_request_task()
743 int init_initiator_tmf_request_task(struct iscsi_task_params *task_params, in init_initiator_tmf_request_task() argument
746 init_default_iscsi_task(task_params, (struct data_hdr *)tmf_header, in init_initiator_tmf_request_task()
749 init_sqe(task_params, NULL, NULL, in init_initiator_tmf_request_task()
756 int init_initiator_text_request_task(struct iscsi_task_params *task_params, in init_initiator_text_request_task() argument
763 cxt = task_params->context; in init_initiator_text_request_task()
765 init_default_iscsi_task(task_params, in init_initiator_text_request_task()
769 if (task_params->tx_io_size) in init_initiator_text_request_task()
774 if (task_params->rx_io_size) in init_initiator_text_request_task()
780 cpu_to_le32(task_params->rx_io_size ? in init_initiator_text_request_task()
785 task_params->rx_io_size ? in init_initiator_text_request_task()
787 task_params->tx_io_size ? in init_initiator_text_request_task()
790 init_sqe(task_params, tx_params, NULL, in init_initiator_text_request_task()
797 int init_cleanup_task(struct iscsi_task_params *task_params) in init_cleanup_task() argument
799 init_sqe(task_params, NULL, NULL, NULL, NULL, ISCSI_TASK_TYPE_MIDPATH, in init_cleanup_task()