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_init.c | |
parent | d1b1bef4c9e67aa550e602a6a7f93bbb47dff0b8 (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_init.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_init.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index d525808afc4..997c83b07e8 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c @@ -4344,23 +4344,17 @@ qla81xx_nvram_config(scsi_qla_host_t *vha) /* Determine NVRAM starting address. */ ha->nvram_size = sizeof(struct nvram_81xx); - ha->nvram_base = FA_NVRAM_FUNC0_ADDR; ha->vpd_size = FA_NVRAM_VPD_SIZE; - ha->vpd_base = FA_NVRAM_VPD0_ADDR; - if (PCI_FUNC(ha->pdev->devfn) & 1) { - ha->nvram_base = FA_NVRAM_FUNC1_ADDR; - ha->vpd_base = FA_NVRAM_VPD1_ADDR; - } /* Get VPD data into cache */ ha->vpd = ha->nvram + VPD_OFFSET; - ha->isp_ops->read_nvram(vha, (uint8_t *)ha->vpd, - ha->nvram_base - FA_NVRAM_FUNC0_ADDR, FA_NVRAM_VPD_SIZE * 4); + ha->isp_ops->read_optrom(vha, ha->vpd, ha->flt_region_vpd << 2, + ha->vpd_size); /* Get NVRAM data into cache and calculate checksum. */ - dptr = (uint32_t *)nv; - ha->isp_ops->read_nvram(vha, (uint8_t *)dptr, ha->nvram_base, + ha->isp_ops->read_optrom(vha, ha->nvram, ha->flt_region_nvram << 2, ha->nvram_size); + dptr = (uint32_t *)nv; for (cnt = 0, chksum = 0; cnt < ha->nvram_size >> 2; cnt++) chksum += le32_to_cpu(*dptr++); |