diff options
author | Tomas Henzl <thenzl@redhat.com> | 2014-02-21 16:25:05 -0600 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2014-03-15 10:19:23 -0700 |
commit | 8919358e3d3e78b97490d9d6b0179685962df58f (patch) | |
tree | 049b69bcd71c372f3bc359dac60df917494f241c /drivers/scsi/hpsa.c | |
parent | 9846590edadb3c961fed095d6b3c0af947230e69 (diff) | |
download | linux-8919358e3d3e78b97490d9d6b0179685962df58f.tar.bz2 |
[SCSI] hpsa: increase the probability of a reported success after a device reset
rc is set in the loop, and it isn't set back to zero anywhere
this patch fixes it
Signed-off-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/hpsa.c')
-rw-r--r-- | drivers/scsi/hpsa.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index 6e5e6939ce39..388e229cdcec 100644 --- a/drivers/scsi/hpsa.c +++ b/drivers/scsi/hpsa.c @@ -4142,7 +4142,7 @@ static int hpsa_register_scsi(struct ctlr_info *h) static int wait_for_device_to_become_ready(struct ctlr_info *h, unsigned char lunaddr[]) { - int rc = 0; + int rc; int count = 0; int waittime = 1; /* seconds */ struct CommandList *c; @@ -4162,6 +4162,7 @@ static int wait_for_device_to_become_ready(struct ctlr_info *h, */ msleep(1000 * waittime); count++; + rc = 0; /* Device ready. */ /* Increase wait time with each try, up to a point. */ if (waittime < HPSA_MAX_WAIT_INTERVAL_SECS) |