diff --git a/qla2x00t/qla2x00-target/qla2x00t.c b/qla2x00t/qla2x00-target/qla2x00t.c index 04186f177..c715a93ca 100644 --- a/qla2x00t/qla2x00-target/qla2x00t.c +++ b/qla2x00t/qla2x00-target/qla2x00t.c @@ -3097,10 +3097,9 @@ out_unlock: spin_unlock_irqrestore(&pha->hardware_lock, flags); if (do_tgt_cmd_done) { - if (!ha_locked && !in_interrupt()) { - msleep(250); /* just in case */ + if (!ha_locked && !in_interrupt()) scst_tgt_cmd_done(cmd->scst_cmd, SCST_CONTEXT_DIRECT); - } else + else scst_tgt_cmd_done(cmd->scst_cmd, SCST_CONTEXT_TASKLET); /* !! At this point cmd could be already freed !! */ } @@ -3175,10 +3174,9 @@ out_unlock: spin_unlock_irqrestore(&pha->hardware_lock, flags); if (do_tgt_cmd_done) { - if (!ha_locked && !in_interrupt()) { - msleep(250); /* just in case */ + if (!ha_locked && !in_interrupt()) scst_tgt_cmd_done(cmd->scst_cmd, SCST_CONTEXT_DIRECT); - } else + else scst_tgt_cmd_done(cmd->scst_cmd, SCST_CONTEXT_TASKLET); /* !! At this point cmd could be already freed !! */ }