From 3d79038f92841052aced9aec43c9d9aa864d28ab Mon Sep 17 00:00:00 2001 From: Andrew Vasquez Date: Tue, 24 Mar 2009 09:08:14 -0700 Subject: [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 Signed-off-by: James Bottomley --- drivers/scsi/qla2xxx/qla_attr.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'drivers/scsi/qla2xxx/qla_attr.c') 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, 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) { -- cgit v1.2.2