From: "Stephen M. Cameron" <scameron@beardog.cce.hp.com>
To: james.bottomley@parallels.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, elliott@hp.com,
scott.teel@hp.com, hch@lst.de
Subject: [PATCH 1/5] hpsa: remove online devices from offline device list
Date: Thu, 03 Jul 2014 10:17:58 -0500 [thread overview]
Message-ID: <20140703151758.22132.55045.stgit@beardog.cce.hp.com> (raw)
In-Reply-To: <20140703151534.22132.49663.stgit@beardog.cce.hp.com>
From: Stephen M. Cameron <scameron@beardog.cce.hp.com>
When devices come on line, they should be removed from the list of
offline devices that are monitored.
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Reviewed-by: Scott Teel <scott.teel@hp.com>
Reviewed-by: Joe Handzik <joseph.t.handzik@hp.com>
---
drivers/scsi/hpsa.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index 31184b3..8cd1a9b 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -6913,8 +6913,12 @@ static int hpsa_offline_devices_ready(struct ctlr_info *h)
d = list_entry(this, struct offline_device_entry,
offline_list);
spin_unlock_irqrestore(&h->offline_device_lock, flags);
- if (!hpsa_volume_offline(h, d->scsi3addr))
+ if (!hpsa_volume_offline(h, d->scsi3addr)) {
+ spin_lock_irqsave(&h->offline_device_lock, flags);
+ list_del(&d->offline_list);
+ spin_unlock_irqrestore(&h->offline_device_lock, flags);
return 1;
+ }
spin_lock_irqsave(&h->offline_device_lock, flags);
}
spin_unlock_irqrestore(&h->offline_device_lock, flags);
next prev parent reply other threads:[~2014-07-03 15:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-03 15:17 [PATCH 0/5] hpsa a few small updates for early July 2014 Stephen M. Cameron
2014-07-03 15:17 ` Stephen M. Cameron [this message]
2014-07-03 15:18 ` [PATCH 2/5] hpsa: fix bad -ENOMEM return value in hpsa_big_passthru_ioctl Stephen M. Cameron
2014-07-03 15:18 ` [PATCH 3/5] hpsa: make hpsa_init_one return -ENOMEM if allocation of h->lockup_detected fails Stephen M. Cameron
2014-07-03 15:18 ` [PATCH 4/5] hpsa: fix 6-byte READ/WRITE with 0 length data xfer Stephen M. Cameron
2014-07-03 15:18 ` [PATCH 5/5] hpsa: do not unconditionally copy sense data Stephen M. Cameron
2014-07-03 17:31 ` [PATCH 0/5] hpsa a few small updates for early July 2014 Christoph Hellwig
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=20140703151758.22132.55045.stgit@beardog.cce.hp.com \
--to=scameron@beardog.cce.hp.com \
--cc=elliott@hp.com \
--cc=hch@lst.de \
--cc=james.bottomley@parallels.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