diff options
author | Andrew Vasquez <andrew.vasquez@qlogic.com> | 2009-03-24 12:08:14 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2009-04-03 10:22:51 -0400 |
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 d525808afc4e..997c83b07e8a 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) | |||
4344 | 4344 | ||
4345 | /* Determine NVRAM starting address. */ | 4345 | /* Determine NVRAM starting address. */ |
4346 | ha->nvram_size = sizeof(struct nvram_81xx); | 4346 | ha->nvram_size = sizeof(struct nvram_81xx); |
4347 | ha->nvram_base = FA_NVRAM_FUNC0_ADDR; | ||
4348 | ha->vpd_size = FA_NVRAM_VPD_SIZE; | 4347 | ha->vpd_size = FA_NVRAM_VPD_SIZE; |
4349 | ha->vpd_base = FA_NVRAM_VPD0_ADDR; | ||
4350 | if (PCI_FUNC(ha->pdev->devfn) & 1) { | ||
4351 | ha->nvram_base = FA_NVRAM_FUNC1_ADDR; | ||
4352 | ha->vpd_base = FA_NVRAM_VPD1_ADDR; | ||
4353 | } | ||
4354 | 4348 | ||
4355 | /* Get VPD data into cache */ | 4349 | /* Get VPD data into cache */ |
4356 | ha->vpd = ha->nvram + VPD_OFFSET; | 4350 | ha->vpd = ha->nvram + VPD_OFFSET; |
4357 | ha->isp_ops->read_nvram(vha, (uint8_t *)ha->vpd, | 4351 | ha->isp_ops->read_optrom(vha, ha->vpd, ha->flt_region_vpd << 2, |
4358 | ha->nvram_base - FA_NVRAM_FUNC0_ADDR, FA_NVRAM_VPD_SIZE * 4); | 4352 | ha->vpd_size); |
4359 | 4353 | ||
4360 | /* Get NVRAM data into cache and calculate checksum. */ | 4354 | /* Get NVRAM data into cache and calculate checksum. */ |
4361 | dptr = (uint32_t *)nv; | 4355 | ha->isp_ops->read_optrom(vha, ha->nvram, ha->flt_region_nvram << 2, |
4362 | ha->isp_ops->read_nvram(vha, (uint8_t *)dptr, ha->nvram_base, | ||
4363 | ha->nvram_size); | 4356 | ha->nvram_size); |
4357 | dptr = (uint32_t *)nv; | ||
4364 | for (cnt = 0, chksum = 0; cnt < ha->nvram_size >> 2; cnt++) | 4358 | for (cnt = 0, chksum = 0; cnt < ha->nvram_size >> 2; cnt++) |
4365 | chksum += le32_to_cpu(*dptr++); | 4359 | chksum += le32_to_cpu(*dptr++); |
4366 | 4360 | ||