Skip to content

Commit

Permalink
[SCSI] hpsa: increase the probability of a reported success after a d…
Browse files Browse the repository at this point in the history
…evice 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>
  • Loading branch information
Tomas Henzl authored and James Bottomley committed Mar 15, 2014
1 parent 9846590 commit 8919358
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/scsi/hpsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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)
Expand Down

0 comments on commit 8919358

Please sign in to comment.