]> git.karo-electronics.de Git - linux-beck.git/commitdiff
hpsa: remove online devices from offline device list
authorStephen M. Cameron <scameron@beardog.cce.hp.com>
Thu, 3 Jul 2014 15:17:58 +0000 (10:17 -0500)
committerChristoph Hellwig <hch@lst.de>
Fri, 25 Jul 2014 21:17:00 +0000 (17:17 -0400)
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>
drivers/scsi/hpsa.c

index 6b4d0467dff092e443b7385ecd20a18c8986ece3..e58581c320ee32989df7427ba4ee495b9dfcf31b 100644 (file)
@@ -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);