diff options
author | Himanshu Madhani <himanshu.madhani@qlogic.com> | 2015-06-10 11:05:22 -0400 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2015-07-24 17:19:25 -0400 |
commit | 6bc85dd595a5438b50ec085668e53ef26058bb90 (patch) | |
tree | 22fa0be1e04db47b8b1b2dbc7e65880ccf95af6d | |
parent | e5fdee875f7918b37f7c3fce3025197d8f214a27 (diff) |
qla2xxx: Remove msleep in qlt_send_term_exchange
Remove unnecessary msleep from qlt_send_term_exchange as it
adds latency of 250 msec while sending terminate exchange to
an aborted task.
Cc: <stable@vger.kernel.org> # v3.18+
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Reviewed-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
-rw-r--r-- | drivers/scsi/qla2xxx/qla_target.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c index cda443462071..2491bc9dd2a5 100644 --- a/drivers/scsi/qla2xxx/qla_target.c +++ b/drivers/scsi/qla2xxx/qla_target.c | |||
@@ -2713,7 +2713,7 @@ static int __qlt_send_term_exchange(struct scsi_qla_host *vha, | |||
2713 | static void qlt_send_term_exchange(struct scsi_qla_host *vha, | 2713 | static void qlt_send_term_exchange(struct scsi_qla_host *vha, |
2714 | struct qla_tgt_cmd *cmd, struct atio_from_isp *atio, int ha_locked) | 2714 | struct qla_tgt_cmd *cmd, struct atio_from_isp *atio, int ha_locked) |
2715 | { | 2715 | { |
2716 | unsigned long flags; | 2716 | unsigned long flags = 0; |
2717 | int rc; | 2717 | int rc; |
2718 | 2718 | ||
2719 | if (qlt_issue_marker(vha, ha_locked) < 0) | 2719 | if (qlt_issue_marker(vha, ha_locked) < 0) |
@@ -2729,17 +2729,18 @@ static void qlt_send_term_exchange(struct scsi_qla_host *vha, | |||
2729 | rc = __qlt_send_term_exchange(vha, cmd, atio); | 2729 | rc = __qlt_send_term_exchange(vha, cmd, atio); |
2730 | if (rc == -ENOMEM) | 2730 | if (rc == -ENOMEM) |
2731 | qlt_alloc_qfull_cmd(vha, atio, 0, 0); | 2731 | qlt_alloc_qfull_cmd(vha, atio, 0, 0); |
2732 | spin_unlock_irqrestore(&vha->hw->hardware_lock, flags); | ||
2733 | 2732 | ||
2734 | done: | 2733 | done: |
2735 | if (cmd && ((cmd->state != QLA_TGT_STATE_ABORTED) || | 2734 | if (cmd && ((cmd->state != QLA_TGT_STATE_ABORTED) || |
2736 | !cmd->cmd_sent_to_fw)) { | 2735 | !cmd->cmd_sent_to_fw)) { |
2737 | if (!ha_locked && !in_interrupt()) | 2736 | if (cmd->sg_mapped) |
2738 | msleep(250); /* just in case */ | 2737 | qlt_unmap_sg(vha, cmd); |
2739 | |||
2740 | qlt_unmap_sg(vha, cmd); | ||
2741 | vha->hw->tgt.tgt_ops->free_cmd(cmd); | 2738 | vha->hw->tgt.tgt_ops->free_cmd(cmd); |
2742 | } | 2739 | } |
2740 | |||
2741 | if (!ha_locked) | ||
2742 | spin_unlock_irqrestore(&vha->hw->hardware_lock, flags); | ||
2743 | |||
2743 | return; | 2744 | return; |
2744 | } | 2745 | } |
2745 | 2746 | ||