From d1fea47c36c13df5fc7e5a379ed5c4d2059de583 Mon Sep 17 00:00:00 2001 From: "Stephen M. Cameron" Date: Thu, 3 Jul 2014 10:17:58 -0500 Subject: 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 Reviewed-by: Scott Teel Reviewed-by: Joe Handzik Reviewed by: Mike MIller Signed-off-by: Christoph Hellwig --- drivers/scsi/hpsa.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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); -- cgit v1.2.3