[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 <[email protected]>
Signed-off-by: Andrew Vasquez <[email protected]>
Signed-off-by: Giridhar Malavali <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
This commit is contained in:
Lalit Chandivade 2009-08-25 11:36:18 -07:00 • committed by James Bottomley
commit d970432c48

View file

@ -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;