Lines Matching refs:cmd

36 	struct iscsi_cmd *cmd,
40 struct iscsi_conn *conn = cmd->conn;
42 cmd->next_burst_len = 0;
43 cmd->read_data_done = 0;
46 if ((cmd->next_burst_len +
49 cmd->read_data_done +=
51 cmd->next_burst_len +=
54 cmd->read_data_done +=
56 cmd->next_burst_len);
57 cmd->next_burst_len = 0;
64 struct iscsi_cmd *cmd)
67 struct iscsi_conn *conn = cmd->conn;
69 cmd->data_sn = 0;
70 cmd->next_burst_len = 0;
72 while (cmd->write_data_done > write_data_done) {
74 cmd->write_data_done)
80 cmd->write_data_done = write_data_done;
129 struct iscsi_cmd *cmd, *cmd_tmp;
138 list_for_each_entry_safe(cmd, cmd_tmp,
141 list_del_init(&cmd->i_conn_node);
142 cmd->conn = NULL;
144 iscsit_free_cmd(cmd, true);
160 list_for_each_entry_safe(cmd, cmd_tmp,
163 list_del_init(&cmd->i_conn_node);
164 cmd->conn = NULL;
166 iscsit_free_cmd(cmd, true);
207 struct iscsi_cmd *cmd,
212 if (!cmd->cr) {
214 " is NULL!\n", cmd->init_task_tag);
217 cr = cmd->cr;
219 list_del_init(&cmd->i_conn_node);
228 struct iscsi_cmd *cmd, *cmd_tmp;
232 list_for_each_entry_safe(cmd, cmd_tmp,
235 if (((cmd->deferred_i_state != ISTATE_SENT_STATUS) &&
236 (cmd->deferred_i_state != ISTATE_REMOVE)) ||
237 (cmd->stat_sn >= exp_statsn)) {
243 " 0x%08x, CID: %hu.\n", cmd->init_task_tag,
244 cmd->stat_sn, cr->cid);
246 iscsit_remove_cmd_from_connection_recovery(cmd, sess);
249 iscsit_free_cmd(cmd, true);
276 struct iscsi_cmd *cmd, *cmd_tmp;
296 list_for_each_entry_safe(cmd, cmd_tmp, &conn->conn_cmd_list, i_conn_node) {
297 if (!(cmd->cmd_flags & ICF_OOO_CMDSN))
300 list_del_init(&cmd->i_conn_node);
303 iscsit_free_cmd(cmd, true);
317 struct iscsi_cmd *cmd, *cmd_tmp;
338 * list_del_init(&cmd->i_conn_node); to release the command to the
345 list_for_each_entry_safe(cmd, cmd_tmp, &conn->conn_cmd_list, i_conn_node) {
347 if ((cmd->iscsi_opcode != ISCSI_OP_SCSI_CMD) &&
348 (cmd->iscsi_opcode != ISCSI_OP_NOOP_OUT)) {
351 " CID: %hu\n", cmd->iscsi_opcode,
352 cmd->init_task_tag, cmd->cmd_sn, conn->cid);
354 list_del_init(&cmd->i_conn_node);
356 iscsit_free_cmd(cmd, true);
372 if (!(cmd->cmd_flags & ICF_OOO_CMDSN) && !cmd->immediate_cmd &&
373 iscsi_sna_gte(cmd->cmd_sn, conn->sess->exp_cmd_sn)) {
374 list_del_init(&cmd->i_conn_node);
376 iscsit_free_cmd(cmd, true);
384 " realligence.\n", cmd->iscsi_opcode,
385 cmd->init_task_tag, cmd->cmd_sn, cmd->stat_sn,
388 cmd->deferred_i_state = cmd->i_state;
389 cmd->i_state = ISTATE_IN_CONNECTION_RECOVERY;
391 if (cmd->data_direction == DMA_TO_DEVICE)
392 iscsit_stop_dataout_timer(cmd);
394 cmd->sess = conn->sess;
396 list_del_init(&cmd->i_conn_node);
399 iscsit_free_all_datain_reqs(cmd);
401 transport_wait_for_tasks(&cmd->se_cmd);
403 * Add the struct iscsi_cmd to the connection recovery cmd list
406 list_add_tail(&cmd->i_conn_node, &cr->conn_recovery_cmd_list);
410 cmd->cr = cr;
411 cmd->conn = NULL;