summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx
diff options
context:
space:
mode:
authorLalit Chandivade <lalit.chandivade@qlogic.com>2009-08-25 11:36:18 -0700
committerJames Bottomley <James.Bottomley@suse.de>2009-09-12 09:35:21 -0500
commitd970432c48ab8dd28216e80942723aeb505b623e (patch)
tree67bfe6caa2b18fc6e7c740f0d0b0e1b634da5c02 /drivers/scsi/qla2xxx
parentab67114935d611caffe18063d1777f8c4f8b4272 (diff)
downloadblackbird-op-linux-d970432c48ab8dd28216e80942723aeb505b623e.tar.gz
blackbird-op-linux-d970432c48ab8dd28216e80942723aeb505b623e.zip
[SCSI] qla2xxx: Correct qla2x00_eh_wait_on_command() to wait correctly.
Original code would break-out of loop after only one iteration. Signed-off-by: Lalit Chandivade <lalit.chandivade@qlogic.com> Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/qla2xxx')
-rw-r--r--drivers/scsi/qla2xxx/qla_os.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index 649fd75d37b6..ea9f91756c1e 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -568,11 +568,8 @@ qla2x00_eh_wait_on_command(struct scsi_cmnd *cmd)
unsigned long wait_iter = ABORT_WAIT_ITER;
int ret = QLA_SUCCESS;
- while (CMD_SP(cmd)) {
+ while (CMD_SP(cmd) && wait_iter--) {
msleep(ABORT_POLLING_PERIOD);
-
- if (--wait_iter)
- break;
}
if (CMD_SP(cmd))
ret = QLA_FUNCTION_FAILED;
OpenPOWER on IntegriCloud