Commit 6bc85dd5 authored by Himanshu Madhani's avatar Himanshu Madhani Committed by Nicholas Bellinger

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: default avatarHimanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: default avatarGiridhar Malavali <giridhar.malavali@qlogic.com>
Reviewed-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
parent e5fdee87
...@@ -2713,7 +2713,7 @@ static int __qlt_send_term_exchange(struct scsi_qla_host *vha, ...@@ -2713,7 +2713,7 @@ static int __qlt_send_term_exchange(struct scsi_qla_host *vha,
static void qlt_send_term_exchange(struct scsi_qla_host *vha, static void qlt_send_term_exchange(struct scsi_qla_host *vha,
struct qla_tgt_cmd *cmd, struct atio_from_isp *atio, int ha_locked) struct qla_tgt_cmd *cmd, struct atio_from_isp *atio, int ha_locked)
{ {
unsigned long flags; unsigned long flags = 0;
int rc; int rc;
if (qlt_issue_marker(vha, ha_locked) < 0) if (qlt_issue_marker(vha, ha_locked) < 0)
...@@ -2729,17 +2729,18 @@ static void qlt_send_term_exchange(struct scsi_qla_host *vha, ...@@ -2729,17 +2729,18 @@ static void qlt_send_term_exchange(struct scsi_qla_host *vha,
rc = __qlt_send_term_exchange(vha, cmd, atio); rc = __qlt_send_term_exchange(vha, cmd, atio);
if (rc == -ENOMEM) if (rc == -ENOMEM)
qlt_alloc_qfull_cmd(vha, atio, 0, 0); qlt_alloc_qfull_cmd(vha, atio, 0, 0);
spin_unlock_irqrestore(&vha->hw->hardware_lock, flags);
done: done:
if (cmd && ((cmd->state != QLA_TGT_STATE_ABORTED) || if (cmd && ((cmd->state != QLA_TGT_STATE_ABORTED) ||
!cmd->cmd_sent_to_fw)) { !cmd->cmd_sent_to_fw)) {
if (!ha_locked && !in_interrupt()) if (cmd->sg_mapped)
msleep(250); /* just in case */ qlt_unmap_sg(vha, cmd);
qlt_unmap_sg(vha, cmd);
vha->hw->tgt.tgt_ops->free_cmd(cmd); vha->hw->tgt.tgt_ops->free_cmd(cmd);
} }
if (!ha_locked)
spin_unlock_irqrestore(&vha->hw->hardware_lock, flags);
return; return;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment