summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/hpsa.c
diff options
context:
space:
mode:
authorStephen M. Cameron <scameron@beardog.cce.hp.com>2014-02-18 13:55:38 -0600
committerJames Bottomley <JBottomley@Parallels.com>2014-03-15 10:19:03 -0700
commit250fb125ff94465a20429c4765f079aa142c9d80 (patch)
treed1bedbdcf3a21c8ac9c114aa6a9a1a41a36524ea /drivers/scsi/hpsa.c
parent283b4a9b98b192ebc0e15351fd6fb60e1be78c5d (diff)
downloadop-kernel-dev-250fb125ff94465a20429c4765f079aa142c9d80.zip
op-kernel-dev-250fb125ff94465a20429c4765f079aa142c9d80.tar.gz
[SCSI] hpsa: update raid offload status on device rescan
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>
Diffstat (limited to 'drivers/scsi/hpsa.c')
-rw-r--r--drivers/scsi/hpsa.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index e8489a9..98af5c3 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -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;
}
OpenPOWER on IntegriCloud