diff options
Diffstat (limited to 'drivers/target')
-rw-r--r-- | drivers/target/target_core_tmr.c | 2 | ||||
-rw-r--r-- | drivers/target/target_core_transport.c | 11 |
2 files changed, 1 insertions, 12 deletions
diff --git a/drivers/target/target_core_tmr.c b/drivers/target/target_core_tmr.c index 6e2378a88bda..bd0b4e62e9c6 100644 --- a/drivers/target/target_core_tmr.c +++ b/drivers/target/target_core_tmr.c | |||
@@ -313,11 +313,9 @@ static void core_tmr_drain_state_list( | |||
313 | cmd->se_tfo->get_cmd_state(cmd), cmd->t_state, | 313 | cmd->se_tfo->get_cmd_state(cmd), cmd->t_state, |
314 | cmd->t_task_cdb[0]); | 314 | cmd->t_task_cdb[0]); |
315 | pr_debug("LUN_RESET: ITT[0x%08x] - pr_res_key: 0x%016Lx" | 315 | pr_debug("LUN_RESET: ITT[0x%08x] - pr_res_key: 0x%016Lx" |
316 | " t_task_cdbs_left: %d" | ||
317 | " -- CMD_T_ACTIVE: %d" | 316 | " -- CMD_T_ACTIVE: %d" |
318 | " CMD_T_STOP: %d CMD_T_SENT: %d\n", | 317 | " CMD_T_STOP: %d CMD_T_SENT: %d\n", |
319 | cmd->se_tfo->get_task_tag(cmd), cmd->pr_res_key, | 318 | cmd->se_tfo->get_task_tag(cmd), cmd->pr_res_key, |
320 | atomic_read(&cmd->t_task_cdbs_left), | ||
321 | (cmd->transport_state & CMD_T_ACTIVE) != 0, | 319 | (cmd->transport_state & CMD_T_ACTIVE) != 0, |
322 | (cmd->transport_state & CMD_T_STOP) != 0, | 320 | (cmd->transport_state & CMD_T_STOP) != 0, |
323 | (cmd->transport_state & CMD_T_SENT) != 0); | 321 | (cmd->transport_state & CMD_T_SENT) != 0); |
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c index 47669c6d9175..28df7b8ea9c4 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c | |||
@@ -700,11 +700,6 @@ void target_complete_cmd(struct se_cmd *cmd, u8 scsi_status) | |||
700 | if (!success) | 700 | if (!success) |
701 | cmd->transport_state |= CMD_T_FAILED; | 701 | cmd->transport_state |= CMD_T_FAILED; |
702 | 702 | ||
703 | if (!atomic_dec_and_test(&cmd->t_task_cdbs_left)) { | ||
704 | spin_unlock_irqrestore(&cmd->t_state_lock, flags); | ||
705 | return; | ||
706 | } | ||
707 | |||
708 | /* | 703 | /* |
709 | * Check for case where an explict ABORT_TASK has been received | 704 | * Check for case where an explict ABORT_TASK has been received |
710 | * and transport_wait_for_tasks() will be waiting for completion.. | 705 | * and transport_wait_for_tasks() will be waiting for completion.. |
@@ -1755,7 +1750,6 @@ bool target_stop_cmd(struct se_cmd *cmd, unsigned long *flags) | |||
1755 | pr_debug("cmd %p stopped successfully\n", cmd); | 1750 | pr_debug("cmd %p stopped successfully\n", cmd); |
1756 | 1751 | ||
1757 | spin_lock_irqsave(&cmd->t_state_lock, *flags); | 1752 | spin_lock_irqsave(&cmd->t_state_lock, *flags); |
1758 | atomic_dec(&cmd->t_task_cdbs_left); | ||
1759 | cmd->transport_state &= ~CMD_T_REQUEST_STOP; | 1753 | cmd->transport_state &= ~CMD_T_REQUEST_STOP; |
1760 | cmd->transport_state &= ~CMD_T_BUSY; | 1754 | cmd->transport_state &= ~CMD_T_BUSY; |
1761 | was_active = true; | 1755 | was_active = true; |
@@ -1777,10 +1771,8 @@ void transport_generic_request_failure(struct se_cmd *cmd) | |||
1777 | pr_debug("-----[ i_state: %d t_state: %d scsi_sense_reason: %d\n", | 1771 | pr_debug("-----[ i_state: %d t_state: %d scsi_sense_reason: %d\n", |
1778 | cmd->se_tfo->get_cmd_state(cmd), | 1772 | cmd->se_tfo->get_cmd_state(cmd), |
1779 | cmd->t_state, cmd->scsi_sense_reason); | 1773 | cmd->t_state, cmd->scsi_sense_reason); |
1780 | pr_debug("-----[ t_task_cdbs_left: %d" | 1774 | pr_debug("-----[ t_task_cdbs_ex_left: %d --" |
1781 | " t_task_cdbs_ex_left: %d --" | ||
1782 | " CMD_T_ACTIVE: %d CMD_T_STOP: %d CMD_T_SENT: %d\n", | 1775 | " CMD_T_ACTIVE: %d CMD_T_STOP: %d CMD_T_SENT: %d\n", |
1783 | atomic_read(&cmd->t_task_cdbs_left), | ||
1784 | atomic_read(&cmd->t_task_cdbs_ex_left), | 1776 | atomic_read(&cmd->t_task_cdbs_ex_left), |
1785 | (cmd->transport_state & CMD_T_ACTIVE) != 0, | 1777 | (cmd->transport_state & CMD_T_ACTIVE) != 0, |
1786 | (cmd->transport_state & CMD_T_STOP) != 0, | 1778 | (cmd->transport_state & CMD_T_STOP) != 0, |
@@ -3511,7 +3503,6 @@ int transport_generic_new_cmd(struct se_cmd *cmd) | |||
3511 | atomic_inc(&cmd->t_fe_count); | 3503 | atomic_inc(&cmd->t_fe_count); |
3512 | atomic_inc(&cmd->t_se_count); | 3504 | atomic_inc(&cmd->t_se_count); |
3513 | 3505 | ||
3514 | atomic_set(&cmd->t_task_cdbs_left, 1); | ||
3515 | atomic_set(&cmd->t_task_cdbs_ex_left, 1); | 3506 | atomic_set(&cmd->t_task_cdbs_ex_left, 1); |
3516 | 3507 | ||
3517 | /* | 3508 | /* |