From: Stephen M. Cameron <scame...@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 <scame...@beardog.cce.hp.com>
Reviewed-by: Scott Teel <scott.t...@hp.com>
Reviewed-by: Joe Handzik <joseph.t.hand...@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);

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to