Commit 8919358e authored by Tomas Henzl's avatar Tomas Henzl Committed by James Bottomley

[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: default avatarTomas Henzl <thenzl@redhat.com>
Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
parent 9846590e
...@@ -4142,7 +4142,7 @@ static int hpsa_register_scsi(struct ctlr_info *h) ...@@ -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, static int wait_for_device_to_become_ready(struct ctlr_info *h,
unsigned char lunaddr[]) unsigned char lunaddr[])
{ {
int rc = 0; int rc;
int count = 0; int count = 0;
int waittime = 1; /* seconds */ int waittime = 1; /* seconds */
struct CommandList *c; struct CommandList *c;
...@@ -4162,6 +4162,7 @@ static int wait_for_device_to_become_ready(struct ctlr_info *h, ...@@ -4162,6 +4162,7 @@ static int wait_for_device_to_become_ready(struct ctlr_info *h,
*/ */
msleep(1000 * waittime); msleep(1000 * waittime);
count++; count++;
rc = 0; /* Device ready. */
/* Increase wait time with each try, up to a point. */ /* Increase wait time with each try, up to a point. */
if (waittime < HPSA_MAX_WAIT_INTERVAL_SECS) if (waittime < HPSA_MAX_WAIT_INTERVAL_SECS)
......
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