Lines Matching defs:task

77  * @task:	transport layer's cmd struct pointer
84 static void bnx2i_setup_write_cmd_bd_info(struct iscsi_task *task)
86 struct bnx2i_cmd *cmd = task->dd_data;
95 if (!iscsi_task_has_unsol_data(task) && !task->imm_count)
99 buffer_offset += task->imm_count;
100 if (task->imm_count == cmd_len)
103 if (iscsi_task_has_unsol_data(task)) {
108 buffer_offset += task->unsol_r2t.data_length;
114 if ((start_bd_offset > task->conn->session->first_burst) ||
118 iscsi_conn_printk(KERN_ALERT, task->conn,
124 iscsi_conn_printk(KERN_ALERT, task->conn,
473 struct iscsi_task *task = session->cmds[i];
474 struct bnx2i_cmd *cmd = task->dd_data;
498 struct iscsi_task *task = session->cmds[i];
499 struct bnx2i_cmd *cmd = task->dd_data;
501 task->hdr = &cmd->hdr;
502 task->hdr_max = sizeof(struct iscsi_hdr);
973 * Mgmt task DNA resources are allocated in this routine.
1074 * @task: transport layer task pointer
1079 static int bnx2i_iscsi_send_generic_request(struct iscsi_task *task)
1081 struct bnx2i_cmd *cmd = task->dd_data;
1088 switch (task->hdr->opcode & ISCSI_OPCODE_MASK) {
1090 bnx2i_send_iscsi_login(bnx2i_conn, task);
1096 rc = bnx2i_send_iscsi_nopout(bnx2i_conn, task,
1099 rc = bnx2i_send_iscsi_nopout(bnx2i_conn, task,
1103 rc = bnx2i_send_iscsi_logout(bnx2i_conn, task);
1106 rc = bnx2i_send_iscsi_tmf(bnx2i_conn, task);
1109 rc = bnx2i_send_iscsi_text(bnx2i_conn, task);
1114 task->hdr->opcode);
1156 static void bnx2i_cleanup_task(struct iscsi_task *task)
1158 struct iscsi_conn *conn = task->conn;
1163 * mgmt task or cmd was never sent to us to transmit.
1165 if (!task->sc || task->state == ISCSI_TASK_PENDING)
1168 * need to clean-up task context to claim dma buffers
1170 if (task->state == ISCSI_TASK_ABRT_TMF) {
1171 bnx2i_send_cmd_cleanup_req(hba, task->dd_data);
1178 bnx2i_iscsi_unmap_sg_list(task->dd_data);
1184 * @task: transport layer command structure pointer
1187 bnx2i_mtask_xmit(struct iscsi_conn *conn, struct iscsi_task *task)
1191 struct bnx2i_cmd *cmd = task->dd_data;
1196 bnx2i_conn->gen_pdu.req_buf_size = task->data_count;
1200 ADD_STATS_64(hba, tx_bytes, task->data_count);
1202 if (task->data_count) {
1203 memcpy(bnx2i_conn->gen_pdu.req_buf, task->data,
1204 task->data_count);
1206 bnx2i_conn->gen_pdu.req_buf + task->data_count;
1210 return bnx2i_iscsi_send_generic_request(task);
1215 * @task: transport layer command structure pointer
1219 static int bnx2i_task_xmit(struct iscsi_task *task)
1221 struct iscsi_conn *conn = task->conn;
1226 struct scsi_cmnd *sc = task->sc;
1227 struct bnx2i_cmd *cmd = task->dd_data;
1228 struct iscsi_scsi_req *hdr = (struct iscsi_scsi_req *)task->hdr;
1235 * If there is no scsi_cmnd this must be a mgmt task
1238 return bnx2i_mtask_xmit(conn, task);
1253 cmd->req.itt = task->itt |
1255 bnx2i_setup_write_cmd_bd_info(task);
1259 cmd->req.itt = task->itt |