]> git.karo-electronics.de Git - linux-beck.git/commitdiff
[SCSI] hpsa: update raid offload status on device rescan
authorStephen M. Cameron <scameron@beardog.cce.hp.com>
Tue, 18 Feb 2014 19:55:38 +0000 (13:55 -0600)
committerJames Bottomley <JBottomley@Parallels.com>
Sat, 15 Mar 2014 17:19:03 +0000 (10:19 -0700)
When rescanning for logical drives, store information about whather
raid offload is enabled for each logical drive, and update the driver's
internal record of this.

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/hpsa.c

index e8489a964ea41784306fe57a8f7ec68b584cabcc..98af5c3ed6791b2ac813ddc496cb73ef14b4a8f9 100644 (file)
@@ -787,6 +787,11 @@ static void hpsa_scsi_update_entry(struct ctlr_info *h, int hostno,
 
        /* Raid level changed. */
        h->dev[entry]->raid_level = new_entry->raid_level;
+
+       /* Raid offload parameters changed. */
+       h->dev[entry]->offload_config = new_entry->offload_config;
+       h->dev[entry]->offload_enabled = new_entry->offload_enabled;
+
        dev_info(&h->pdev->dev, "%s device c%db%dt%dl%d updated.\n",
                scsi_device_type(new_entry->devtype), hostno, new_entry->bus,
                new_entry->target, new_entry->lun);
@@ -907,6 +912,10 @@ static inline int device_updated(struct hpsa_scsi_dev_t *dev1,
         */
        if (dev1->raid_level != dev2->raid_level)
                return 1;
+       if (dev1->offload_config != dev2->offload_config)
+               return 1;
+       if (dev1->offload_enabled != dev2->offload_enabled)
+               return 1;
        return 0;
 }