summaryrefslogtreecommitdiff
path: root/drivers/scsi
diff options
context:
space:
mode:
authorStephen M. Cameron <scameron@beardog.cce.hp.com>2014-07-03 19:17:58 +0400
committerChristoph Hellwig <hch@lst.de>2014-07-26 01:17:00 +0400
commitd1fea47c36c13df5fc7e5a379ed5c4d2059de583 (patch)
tree20cdc9e098f74a4b102ba4c7d6d7094da33ad73b /drivers/scsi
parent0b9e7b741f2bf8103b15bb14d5b4a6f5ee91c59a (diff)
downloadlinux-d1fea47c36c13df5fc7e5a379ed5c4d2059de583.tar.xz
hpsa: remove online devices from offline device list
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> Reviewed by: Mike MIller <michael.miller@canonical.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/hpsa.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index 6b4d0467dff0..e58581c320ee 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -6914,8 +6914,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);