diff options
author | Andrew Vasquez <andrew.vasquez@qlogic.com> | 2007-07-19 20:37:34 -0700 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.localdomain> | 2007-07-20 09:25:29 -0500 |
commit | c3a2f0dfe1cecac76950f340f540c1a887dd2500 (patch) | |
tree | be6cce05e0fba81e9bf91351aebab23918ae5115 /drivers/scsi/qla2xxx/qla_sup.c | |
parent | af6177d88d76834b4d05499482d471d64559a6af (diff) |
[SCSI] qla2xxx: Add ISP25XX support.
Large code-reuse from ISP24xx, consolidate RISC memory
extraction routines during firmware-dump.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_sup.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_sup.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/qla_sup.c b/drivers/scsi/qla2xxx/qla_sup.c index aafd60467230..a925a3f179f9 100644 --- a/drivers/scsi/qla2xxx/qla_sup.c +++ b/drivers/scsi/qla2xxx/qla_sup.c @@ -766,6 +766,29 @@ qla24xx_write_nvram_data(scsi_qla_host_t *ha, uint8_t *buf, uint32_t naddr, return ret; } +uint8_t * +qla25xx_read_nvram_data(scsi_qla_host_t *ha, uint8_t *buf, uint32_t naddr, + uint32_t bytes) +{ + uint32_t i; + uint32_t *dwptr; + + /* Dword reads to flash. */ + dwptr = (uint32_t *)buf; + for (i = 0; i < bytes >> 2; i++, naddr++) + dwptr[i] = cpu_to_le32(qla24xx_read_flash_dword(ha, + flash_data_to_access_addr(FA_VPD_NVRAM_ADDR | naddr))); + + return buf; +} + +int +qla25xx_write_nvram_data(scsi_qla_host_t *ha, uint8_t *buf, uint32_t naddr, + uint32_t bytes) +{ + return qla24xx_write_flash_data(ha, (uint32_t *)buf, + FA_VPD_NVRAM_ADDR | naddr, bytes >> 2); +} static inline void qla2x00_flip_colors(scsi_qla_host_t *ha, uint16_t *pflags) |