diff options
author | Lalit Chandivade <lalit.chandivade@qlogic.com> | 2009-08-25 14:36:18 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2009-09-12 10:35:21 -0400 |
commit | d970432c48ab8dd28216e80942723aeb505b623e (patch) | |
tree | 67bfe6caa2b18fc6e7c740f0d0b0e1b634da5c02 /drivers/scsi | |
parent | ab67114935d611caffe18063d1777f8c4f8b4272 (diff) |
[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.c | 5 |
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) | |||
568 | unsigned long wait_iter = ABORT_WAIT_ITER; | 568 | unsigned long wait_iter = ABORT_WAIT_ITER; |
569 | int ret = QLA_SUCCESS; | 569 | int ret = QLA_SUCCESS; |
570 | 570 | ||
571 | while (CMD_SP(cmd)) { | 571 | while (CMD_SP(cmd) && wait_iter--) { |
572 | msleep(ABORT_POLLING_PERIOD); | 572 | msleep(ABORT_POLLING_PERIOD); |
573 | |||
574 | if (--wait_iter) | ||
575 | break; | ||
576 | } | 573 | } |
577 | if (CMD_SP(cmd)) | 574 | if (CMD_SP(cmd)) |
578 | ret = QLA_FUNCTION_FAILED; | 575 | ret = QLA_FUNCTION_FAILED; |