aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx
diff options
context:
space:
mode:
authorAndrew Vasquez <andrew.vasquez@qlogic.com>2009-03-24 12:08:17 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2009-04-03 10:22:52 -0400
commit6749ce362d38b47bd4669ccc0cafcc0014bff6e9 (patch)
tree2122b1dc9de76c5f3e4e09970064023db5a9ccc7 /drivers/scsi/qla2xxx
parent24a081386e4236e10e80af4c62d5f6e68feb2081 (diff)
[SCSI] qla2xxx: Don't cache VPD data for newer ISPs.
As updates will occur using low-level option-rom manipulation routines. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/qla2xxx')
-rw-r--r--drivers/scsi/qla2xxx/qla_attr.c8
-rw-r--r--drivers/scsi/qla2xxx/qla_def.h1
2 files changed, 7 insertions, 2 deletions
diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c
index 79bf7514a385..15573f6dc36b 100644
--- a/drivers/scsi/qla2xxx/qla_attr.c
+++ b/drivers/scsi/qla2xxx/qla_attr.c
@@ -96,7 +96,9 @@ qla2x00_sysfs_read_nvram(struct kobject *kobj,
96 if (!capable(CAP_SYS_ADMIN)) 96 if (!capable(CAP_SYS_ADMIN))
97 return 0; 97 return 0;
98 98
99 /* Read NVRAM data from cache. */ 99 if (IS_NOCACHE_VPD_TYPE(ha))
100 ha->isp_ops->read_optrom(vha, ha->vpd, ha->flt_region_nvram << 2,
101 ha->nvram_size);
100 return memory_read_from_buffer(buf, count, &off, ha->nvram, 102 return memory_read_from_buffer(buf, count, &off, ha->nvram,
101 ha->nvram_size); 103 ha->nvram_size);
102} 104}
@@ -380,7 +382,9 @@ qla2x00_sysfs_read_vpd(struct kobject *kobj,
380 if (!capable(CAP_SYS_ADMIN)) 382 if (!capable(CAP_SYS_ADMIN))
381 return 0; 383 return 0;
382 384
383 /* Read NVRAM data from cache. */ 385 if (IS_NOCACHE_VPD_TYPE(ha))
386 ha->isp_ops->read_optrom(vha, ha->vpd, ha->flt_region_vpd << 2,
387 ha->vpd_size);
384 return memory_read_from_buffer(buf, count, &off, ha->vpd, ha->vpd_size); 388 return memory_read_from_buffer(buf, count, &off, ha->vpd, ha->vpd_size);
385} 389}
386 390
diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h
index e3d4d48905ee..714ee67567e1 100644
--- a/drivers/scsi/qla2xxx/qla_def.h
+++ b/drivers/scsi/qla2xxx/qla_def.h
@@ -2343,6 +2343,7 @@ struct qla_hw_data {
2343#define IS_NOPOLLING_TYPE(ha) ((IS_QLA25XX(ha) || IS_QLA81XX(ha)) && \ 2343#define IS_NOPOLLING_TYPE(ha) ((IS_QLA25XX(ha) || IS_QLA81XX(ha)) && \
2344 (ha)->flags.msix_enabled) 2344 (ha)->flags.msix_enabled)
2345#define IS_FAC_REQUIRED(ha) (IS_QLA81XX(ha)) 2345#define IS_FAC_REQUIRED(ha) (IS_QLA81XX(ha))
2346#define IS_NOCACHE_VPD_TYPE(ha) (IS_QLA81XX(ha))
2346 2347
2347#define IS_IIDMA_CAPABLE(ha) ((ha)->device_type & DT_IIDMA) 2348#define IS_IIDMA_CAPABLE(ha) ((ha)->device_type & DT_IIDMA)
2348#define IS_FWI2_CAPABLE(ha) ((ha)->device_type & DT_FWI2) 2349#define IS_FWI2_CAPABLE(ha) ((ha)->device_type & DT_FWI2)