public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: "Stephen M. Cameron" <scameron@beardog.cce.hp.com>
To: james.bottomley@hansenpartnership.com
Cc: martin.petersen@oracle.com, linux-scsi@vger.kernel.org,
	stephenmcameron@gmail.com, joseph.t.handzik@hp.com,
	thenzl@redhat.com, michael.miller@canonical.com,
	scott.teel@hp.com
Subject: [PATCH 3/6] hpsa: increase the probability of a reported success after a device reset
Date: Fri, 21 Feb 2014 16:25:05 -0600	[thread overview]
Message-ID: <20140221222505.31344.94687.stgit@beardog.cce.hp.com> (raw)
In-Reply-To: <20140221222153.31344.99129.stgit@beardog.cce.hp.com>

From: Tomas Henzl <thenzl@redhat.com>

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>
---
 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 a0fcaa6..23110a8 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)


  parent reply	other threads:[~2014-02-21 22:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-21 22:24 [PATCH 0/6] hpsa: supplemental February 2014 driver updates Stephen M. Cameron
2014-02-21 22:24 ` [PATCH 1/6] hpsa: remove unused kthread.h header Stephen M. Cameron
2014-02-21 22:25 ` [PATCH 2/6] hpsa: bring format-in-progress drives online when ready Stephen M. Cameron
2014-02-21 22:25 ` Stephen M. Cameron [this message]
2014-02-21 22:25 ` [PATCH 4/6] hpsa: remove unused struct request from CommandList Stephen M. Cameron
2014-02-21 22:25 ` [PATCH 5/6] hpsa: Add hba mode to the hpsa driver Stephen M. Cameron
2014-02-21 22:25 ` [PATCH 6/6] hpsa: Do not zero fields of ioaccel2 command structure twice Stephen M. Cameron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140221222505.31344.94687.stgit@beardog.cce.hp.com \
    --to=scameron@beardog.cce.hp.com \
    --cc=james.bottomley@hansenpartnership.com \
    --cc=joseph.t.handzik@hp.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=michael.miller@canonical.com \
    --cc=scott.teel@hp.com \
    --cc=stephenmcameron@gmail.com \
    --cc=thenzl@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox