Commit d970432c authored by Lalit Chandivade's avatar Lalit Chandivade Committed by James Bottomley

[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: default avatarLalit Chandivade <lalit.chandivade@qlogic.com>
Signed-off-by: default avatarAndrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: default avatarGiridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
parent ab671149
...@@ -568,11 +568,8 @@ qla2x00_eh_wait_on_command(struct scsi_cmnd *cmd) ...@@ -568,11 +568,8 @@ qla2x00_eh_wait_on_command(struct scsi_cmnd *cmd)
unsigned long wait_iter = ABORT_WAIT_ITER; unsigned long wait_iter = ABORT_WAIT_ITER;
int ret = QLA_SUCCESS; int ret = QLA_SUCCESS;
while (CMD_SP(cmd)) { while (CMD_SP(cmd) && wait_iter--) {
msleep(ABORT_POLLING_PERIOD); msleep(ABORT_POLLING_PERIOD);
if (--wait_iter)
break;
} }
if (CMD_SP(cmd)) if (CMD_SP(cmd))
ret = QLA_FUNCTION_FAILED; ret = QLA_FUNCTION_FAILED;
......
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