Lines Matching refs:cmd
85 struct se_cmd *cmd, in core_tmr_handle_tas_abort() argument
90 transport_cmd_finish_abort(cmd, 1); in core_tmr_handle_tas_abort()
97 (tmr_nacl == cmd->se_sess->se_node_acl)) || tas) in core_tmr_handle_tas_abort()
98 transport_send_task_abort(cmd); in core_tmr_handle_tas_abort()
100 transport_cmd_finish_abort(cmd, 0); in core_tmr_handle_tas_abort()
109 struct se_cmd *cmd; in core_tmr_lun_reset() local
159 cmd = tmr_p->task_cmd; in core_tmr_lun_reset()
160 if (!(cmd)) { in core_tmr_lun_reset()
171 preempt_and_abort_list, cmd) != 0)) in core_tmr_lun_reset()
175 spin_lock_irqsave(&T_TASK(cmd)->t_state_lock, flags); in core_tmr_lun_reset()
176 if (!(atomic_read(&T_TASK(cmd)->t_transport_active))) { in core_tmr_lun_reset()
177 spin_unlock_irqrestore(&T_TASK(cmd)->t_state_lock, flags); in core_tmr_lun_reset()
181 if (cmd->t_state == TRANSPORT_ISTATE_PROCESSING) { in core_tmr_lun_reset()
182 spin_unlock_irqrestore(&T_TASK(cmd)->t_state_lock, flags); in core_tmr_lun_reset()
189 tmr_p->function, tmr_p->response, cmd->t_state); in core_tmr_lun_reset()
190 spin_unlock_irqrestore(&T_TASK(cmd)->t_state_lock, flags); in core_tmr_lun_reset()
192 transport_cmd_finish_abort_tmr(cmd); in core_tmr_lun_reset()
224 cmd = TASK_CMD(task); in core_tmr_lun_reset()
226 if (!T_TASK(cmd)) { in core_tmr_lun_reset()
228 " %p ITT: 0x%08x\n", task, cmd, in core_tmr_lun_reset()
229 CMD_TFO(cmd)->get_task_tag(cmd)); in core_tmr_lun_reset()
238 preempt_and_abort_list, cmd) != 0)) in core_tmr_lun_reset()
243 if (prout_cmd == cmd) in core_tmr_lun_reset()
250 spin_lock_irqsave(&T_TASK(cmd)->t_state_lock, flags); in core_tmr_lun_reset()
254 (preempt_and_abort_list) ? "Preempt" : "", cmd, task, in core_tmr_lun_reset()
255 CMD_TFO(cmd)->get_task_tag(cmd), 0, in core_tmr_lun_reset()
256 CMD_TFO(cmd)->get_cmd_state(cmd), cmd->t_state, in core_tmr_lun_reset()
257 cmd->deferred_t_state, T_TASK(cmd)->t_task_cdb[0]); in core_tmr_lun_reset()
262 CMD_TFO(cmd)->get_task_tag(cmd), cmd->pr_res_key, in core_tmr_lun_reset()
263 T_TASK(cmd)->t_task_cdbs, in core_tmr_lun_reset()
264 atomic_read(&T_TASK(cmd)->t_task_cdbs_left), in core_tmr_lun_reset()
265 atomic_read(&T_TASK(cmd)->t_task_cdbs_sent), in core_tmr_lun_reset()
266 atomic_read(&T_TASK(cmd)->t_transport_active), in core_tmr_lun_reset()
267 atomic_read(&T_TASK(cmd)->t_transport_stop), in core_tmr_lun_reset()
268 atomic_read(&T_TASK(cmd)->t_transport_sent)); in core_tmr_lun_reset()
273 &T_TASK(cmd)->t_state_lock, flags); in core_tmr_lun_reset()
280 spin_lock_irqsave(&T_TASK(cmd)->t_state_lock, flags); in core_tmr_lun_reset()
281 atomic_dec(&T_TASK(cmd)->t_task_cdbs_left); in core_tmr_lun_reset()
291 if (!(atomic_dec_and_test(&T_TASK(cmd)->t_task_cdbs_ex_left))) { in core_tmr_lun_reset()
293 &T_TASK(cmd)->t_state_lock, flags); in core_tmr_lun_reset()
296 atomic_read(&T_TASK(cmd)->t_task_cdbs_ex_left)); in core_tmr_lun_reset()
301 fe_count = atomic_read(&T_TASK(cmd)->t_fe_count); in core_tmr_lun_reset()
303 if (atomic_read(&T_TASK(cmd)->t_transport_active)) { in core_tmr_lun_reset()
307 atomic_set(&T_TASK(cmd)->t_transport_aborted, 1); in core_tmr_lun_reset()
308 spin_unlock_irqrestore(&T_TASK(cmd)->t_state_lock, in core_tmr_lun_reset()
310 core_tmr_handle_tas_abort(tmr_nacl, cmd, tas, fe_count); in core_tmr_lun_reset()
317 atomic_set(&T_TASK(cmd)->t_transport_aborted, 1); in core_tmr_lun_reset()
318 spin_unlock_irqrestore(&T_TASK(cmd)->t_state_lock, flags); in core_tmr_lun_reset()
319 core_tmr_handle_tas_abort(tmr_nacl, cmd, tas, fe_count); in core_tmr_lun_reset()
334 cmd = (struct se_cmd *)qr->cmd; in core_tmr_lun_reset()
335 if (!(cmd)) { in core_tmr_lun_reset()
353 preempt_and_abort_list, cmd) != 0)) in core_tmr_lun_reset()
358 if (prout_cmd == cmd) in core_tmr_lun_reset()
361 atomic_dec(&T_TASK(cmd)->t_transport_queue_active); in core_tmr_lun_reset()
371 "Preempt" : "", cmd, state, in core_tmr_lun_reset()
372 atomic_read(&T_TASK(cmd)->t_fe_count)); in core_tmr_lun_reset()
381 transport_new_cmd_failure(cmd); in core_tmr_lun_reset()
383 core_tmr_handle_tas_abort(tmr_nacl, cmd, tas, in core_tmr_lun_reset()
384 atomic_read(&T_TASK(cmd)->t_fe_count)); in core_tmr_lun_reset()