diff options
| -rw-r--r-- | drivers/target/target_core_tmr.c | 7 | ||||
| -rw-r--r-- | drivers/target/target_core_transport.c | 7 | ||||
| -rw-r--r-- | include/target/target_core_base.h | 1 |
3 files changed, 1 insertions, 14 deletions
diff --git a/drivers/target/target_core_tmr.c b/drivers/target/target_core_tmr.c index bd0b4e62e9c6..84caf1bed9a3 100644 --- a/drivers/target/target_core_tmr.c +++ b/drivers/target/target_core_tmr.c | |||
| @@ -333,13 +333,6 @@ static void core_tmr_drain_state_list( | |||
| 333 | spin_lock_irqsave(&cmd->t_state_lock, flags); | 333 | spin_lock_irqsave(&cmd->t_state_lock, flags); |
| 334 | target_stop_cmd(cmd, &flags); | 334 | target_stop_cmd(cmd, &flags); |
| 335 | 335 | ||
| 336 | if (!atomic_dec_and_test(&cmd->t_task_cdbs_ex_left)) { | ||
| 337 | spin_unlock_irqrestore(&cmd->t_state_lock, flags); | ||
| 338 | pr_debug("LUN_RESET: Skipping cmd: %p, dev: %p for" | ||
| 339 | " t_task_cdbs_ex_left: %d\n", cmd, dev, | ||
| 340 | atomic_read(&cmd->t_task_cdbs_ex_left)); | ||
| 341 | continue; | ||
| 342 | } | ||
| 343 | fe_count = atomic_read(&cmd->t_fe_count); | 336 | fe_count = atomic_read(&cmd->t_fe_count); |
| 344 | 337 | ||
| 345 | if (!(cmd->transport_state & CMD_T_ACTIVE)) { | 338 | if (!(cmd->transport_state & CMD_T_ACTIVE)) { |
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c index 28df7b8ea9c4..d110ead38721 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c | |||
| @@ -457,7 +457,6 @@ static void target_remove_from_state_list(struct se_cmd *cmd) | |||
| 457 | spin_lock_irqsave(&dev->execute_task_lock, flags); | 457 | spin_lock_irqsave(&dev->execute_task_lock, flags); |
| 458 | if (cmd->state_active) { | 458 | if (cmd->state_active) { |
| 459 | list_del(&cmd->state_list); | 459 | list_del(&cmd->state_list); |
| 460 | atomic_dec(&cmd->t_task_cdbs_ex_left); | ||
| 461 | cmd->state_active = false; | 460 | cmd->state_active = false; |
| 462 | } | 461 | } |
| 463 | spin_unlock_irqrestore(&dev->execute_task_lock, flags); | 462 | spin_unlock_irqrestore(&dev->execute_task_lock, flags); |
| @@ -1771,9 +1770,7 @@ void transport_generic_request_failure(struct se_cmd *cmd) | |||
| 1771 | pr_debug("-----[ i_state: %d t_state: %d scsi_sense_reason: %d\n", | 1770 | pr_debug("-----[ i_state: %d t_state: %d scsi_sense_reason: %d\n", |
| 1772 | cmd->se_tfo->get_cmd_state(cmd), | 1771 | cmd->se_tfo->get_cmd_state(cmd), |
| 1773 | cmd->t_state, cmd->scsi_sense_reason); | 1772 | cmd->t_state, cmd->scsi_sense_reason); |
| 1774 | pr_debug("-----[ t_task_cdbs_ex_left: %d --" | 1773 | pr_debug("-----[ 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", | ||
| 1776 | atomic_read(&cmd->t_task_cdbs_ex_left), | ||
| 1777 | (cmd->transport_state & CMD_T_ACTIVE) != 0, | 1774 | (cmd->transport_state & CMD_T_ACTIVE) != 0, |
| 1778 | (cmd->transport_state & CMD_T_STOP) != 0, | 1775 | (cmd->transport_state & CMD_T_STOP) != 0, |
| 1779 | (cmd->transport_state & CMD_T_SENT) != 0); | 1776 | (cmd->transport_state & CMD_T_SENT) != 0); |
| @@ -3503,8 +3500,6 @@ int transport_generic_new_cmd(struct se_cmd *cmd) | |||
| 3503 | atomic_inc(&cmd->t_fe_count); | 3500 | atomic_inc(&cmd->t_fe_count); |
| 3504 | atomic_inc(&cmd->t_se_count); | 3501 | atomic_inc(&cmd->t_se_count); |
| 3505 | 3502 | ||
| 3506 | atomic_set(&cmd->t_task_cdbs_ex_left, 1); | ||
| 3507 | |||
| 3508 | /* | 3503 | /* |
| 3509 | * For WRITEs, let the fabric know its buffer is ready. | 3504 | * For WRITEs, let the fabric know its buffer is ready. |
| 3510 | * | 3505 | * |
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index f176b8215302..6c83b14b3075 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h | |||
| @@ -549,7 +549,6 @@ struct se_cmd { | |||
| 549 | unsigned long long t_task_lba; | 549 | unsigned long long t_task_lba; |
| 550 | atomic_t t_fe_count; | 550 | atomic_t t_fe_count; |
| 551 | atomic_t t_se_count; | 551 | atomic_t t_se_count; |
| 552 | atomic_t t_task_cdbs_ex_left; | ||
| 553 | unsigned int transport_state; | 552 | unsigned int transport_state; |
| 554 | #define CMD_T_ABORTED (1 << 0) | 553 | #define CMD_T_ABORTED (1 << 0) |
| 555 | #define CMD_T_ACTIVE (1 << 1) | 554 | #define CMD_T_ACTIVE (1 << 1) |
