aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_attr.c
diff options
context:
space:
mode:
authorAndrew Vasquez <andrew.vasquez@qlogic.com>2009-03-24 12:08:14 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2009-04-03 10:22:51 -0400
commit3d79038f92841052aced9aec43c9d9aa864d28ab (patch)
tree8d8d1323ac0ba111add5e0b5bd1c14a36e9a211a /drivers/scsi/qla2xxx/qla_attr.c
parentd1b1bef4c9e67aa550e602a6a7f93bbb47dff0b8 (diff)
[SCSI] qla2xxx: Always use an FLT's NVRAM/VPD region information.
Rather than assuming a particular layout of the data. Applies to recent ISPs only. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_attr.c')
-rw-r--r--drivers/scsi/qla2xxx/qla_attr.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c
index 877990115f53..79bf7514a385 100644
--- a/drivers/scsi/qla2xxx/qla_attr.c
+++ b/drivers/scsi/qla2xxx/qla_attr.c
@@ -111,7 +111,8 @@ qla2x00_sysfs_write_nvram(struct kobject *kobj,
111 struct qla_hw_data *ha = vha->hw; 111 struct qla_hw_data *ha = vha->hw;
112 uint16_t cnt; 112 uint16_t cnt;
113 113
114 if (!capable(CAP_SYS_ADMIN) || off != 0 || count != ha->nvram_size) 114 if (!capable(CAP_SYS_ADMIN) || off != 0 || count != ha->nvram_size ||
115 !ha->isp_ops->write_nvram)
115 return 0; 116 return 0;
116 117
117 /* Checksum NVRAM. */ 118 /* Checksum NVRAM. */
@@ -393,7 +394,8 @@ qla2x00_sysfs_write_vpd(struct kobject *kobj,
393 struct qla_hw_data *ha = vha->hw; 394 struct qla_hw_data *ha = vha->hw;
394 uint8_t *tmp_data; 395 uint8_t *tmp_data;
395 396
396 if (!capable(CAP_SYS_ADMIN) || off != 0 || count != ha->vpd_size) 397 if (!capable(CAP_SYS_ADMIN) || off != 0 || count != ha->vpd_size ||
398 !ha->isp_ops->write_nvram)
397 return 0; 399 return 0;
398 400
399 if (qla2x00_wait_for_hba_online(vha) != QLA_SUCCESS) { 401 if (qla2x00_wait_for_hba_online(vha) != QLA_SUCCESS) {