diff options
author | Andrew Vasquez <andrew.vasquez@qlogic.com> | 2007-07-19 23:37:34 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.localdomain> | 2007-07-20 10:25:29 -0400 |
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, | |||
766 | return ret; | 766 | return ret; |
767 | } | 767 | } |
768 | 768 | ||
769 | uint8_t * | ||
770 | qla25xx_read_nvram_data(scsi_qla_host_t *ha, uint8_t *buf, uint32_t naddr, | ||
771 | uint32_t bytes) | ||
772 | { | ||
773 | uint32_t i; | ||
774 | uint32_t *dwptr; | ||
775 | |||
776 | /* Dword reads to flash. */ | ||
777 | dwptr = (uint32_t *)buf; | ||
778 | for (i = 0; i < bytes >> 2; i++, naddr++) | ||
779 | dwptr[i] = cpu_to_le32(qla24xx_read_flash_dword(ha, | ||
780 | flash_data_to_access_addr(FA_VPD_NVRAM_ADDR | naddr))); | ||
781 | |||
782 | return buf; | ||
783 | } | ||
784 | |||
785 | int | ||
786 | qla25xx_write_nvram_data(scsi_qla_host_t *ha, uint8_t *buf, uint32_t naddr, | ||
787 | uint32_t bytes) | ||
788 | { | ||
789 | return qla24xx_write_flash_data(ha, (uint32_t *)buf, | ||
790 | FA_VPD_NVRAM_ADDR | naddr, bytes >> 2); | ||
791 | } | ||
769 | 792 | ||
770 | static inline void | 793 | static inline void |
771 | qla2x00_flip_colors(scsi_qla_host_t *ha, uint16_t *pflags) | 794 | qla2x00_flip_colors(scsi_qla_host_t *ha, uint16_t *pflags) |