|
@@ -692,15 +692,6 @@ void target_complete_cmd(struct se_cmd *cmd, u8 scsi_status)
|
|
|
success = 1;
|
|
|
}
|
|
|
|
|
|
- /*
|
|
|
- * See if we are waiting to complete for an exception condition.
|
|
|
- */
|
|
|
- if (cmd->transport_state & CMD_T_REQUEST_STOP) {
|
|
|
- spin_unlock_irqrestore(&cmd->t_state_lock, flags);
|
|
|
- complete(&cmd->task_stop_comp);
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
/*
|
|
|
* Check for case where an explicit ABORT_TASK has been received
|
|
|
* and transport_wait_for_tasks() will be waiting for completion..
|
|
@@ -1202,7 +1193,6 @@ void transport_init_se_cmd(
|
|
|
INIT_LIST_HEAD(&cmd->state_list);
|
|
|
init_completion(&cmd->t_transport_stop_comp);
|
|
|
init_completion(&cmd->cmd_wait_comp);
|
|
|
- init_completion(&cmd->task_stop_comp);
|
|
|
spin_lock_init(&cmd->t_state_lock);
|
|
|
kref_init(&cmd->cmd_kref);
|
|
|
cmd->transport_state = CMD_T_DEV_ACTIVE;
|
|
@@ -1633,33 +1623,6 @@ int target_submit_tmr(struct se_cmd *se_cmd, struct se_session *se_sess,
|
|
|
}
|
|
|
EXPORT_SYMBOL(target_submit_tmr);
|
|
|
|
|
|
-/*
|
|
|
- * If the cmd is active, request it to be stopped and sleep until it
|
|
|
- * has completed.
|
|
|
- */
|
|
|
-bool target_stop_cmd(struct se_cmd *cmd, unsigned long *flags)
|
|
|
- __releases(&cmd->t_state_lock)
|
|
|
- __acquires(&cmd->t_state_lock)
|
|
|
-{
|
|
|
- bool was_active = false;
|
|
|
-
|
|
|
- if (cmd->transport_state & CMD_T_BUSY) {
|
|
|
- cmd->transport_state |= CMD_T_REQUEST_STOP;
|
|
|
- spin_unlock_irqrestore(&cmd->t_state_lock, *flags);
|
|
|
-
|
|
|
- pr_debug("cmd %p waiting to complete\n", cmd);
|
|
|
- wait_for_completion(&cmd->task_stop_comp);
|
|
|
- pr_debug("cmd %p stopped successfully\n", cmd);
|
|
|
-
|
|
|
- spin_lock_irqsave(&cmd->t_state_lock, *flags);
|
|
|
- cmd->transport_state &= ~CMD_T_REQUEST_STOP;
|
|
|
- cmd->transport_state &= ~CMD_T_BUSY;
|
|
|
- was_active = true;
|
|
|
- }
|
|
|
-
|
|
|
- return was_active;
|
|
|
-}
|
|
|
-
|
|
|
/*
|
|
|
* Handle SAM-esque emulation for generic transport request failures.
|
|
|
*/
|