summaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorLalit Chandivade <lalit.chandivade@qlogic.com>2009-08-25 20:36:18 +0200
committerJames Bottomley <James.Bottomley@suse.de>2009-09-12 16:35:21 +0200
commitd970432c48ab8dd28216e80942723aeb505b623e (patch)
tree67bfe6caa2b18fc6e7c740f0d0b0e1b634da5c02 /drivers/scsi
parent[SCSI] qla2xxx: Further limit device-table (qla_devtbl) lookup to non-24xx. (diff)
downloadlinux-d970432c48ab8dd28216e80942723aeb505b623e.tar.xz
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')
-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;