diff options
author | Andrew Vasquez <andrew.vasquez@qlogic.com> | 2009-03-24 09:08:14 -0700 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2009-04-03 09:22:51 -0500 |
commit | 3d79038f92841052aced9aec43c9d9aa864d28ab (patch) | |
tree | 8d8d1323ac0ba111add5e0b5bd1c14a36e9a211a /drivers/scsi/qla2xxx/qla_attr.c | |
parent | d1b1bef4c9e67aa550e602a6a7f93bbb47dff0b8 (diff) | |
download | op-kernel-dev-3d79038f92841052aced9aec43c9d9aa864d28ab.zip op-kernel-dev-3d79038f92841052aced9aec43c9d9aa864d28ab.tar.gz |
[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.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c index 8779901..79bf751 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, struct qla_hw_data *ha = vha->hw; uint16_t cnt; - if (!capable(CAP_SYS_ADMIN) || off != 0 || count != ha->nvram_size) + if (!capable(CAP_SYS_ADMIN) || off != 0 || count != ha->nvram_size || + !ha->isp_ops->write_nvram) return 0; /* Checksum NVRAM. */ @@ -393,7 +394,8 @@ qla2x00_sysfs_write_vpd(struct kobject *kobj, struct qla_hw_data *ha = vha->hw; uint8_t *tmp_data; - if (!capable(CAP_SYS_ADMIN) || off != 0 || count != ha->vpd_size) + if (!capable(CAP_SYS_ADMIN) || off != 0 || count != ha->vpd_size || + !ha->isp_ops->write_nvram) return 0; if (qla2x00_wait_for_hba_online(vha) != QLA_SUCCESS) { |