[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>
This commit is contained in:
parent
ab67114935
commit
d970432c48
1 changed files with 1 additions and 4 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue