diff options
author | Andrew Vasquez <andrew.vasquez@qlogic.com> | 2009-01-22 12:45:34 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2009-01-25 08:57:49 -0500 |
commit | 7c283177fad8786afa1bbf7ef848038284084e41 (patch) | |
tree | 79c06f3983824c35d2f0303ce6c89691b882d298 /drivers/scsi | |
parent | ad038fa8242a1f4547045f9213c3881a34bbcc21 (diff) |
[SCSI] qla2xxx: Correct endianness issue during flash manipulation.
The flash data was incorrectly being converted (cpu_to_le32())
when using the bulk-flash-write mailbox command (ISP25xx and
above).
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_sup.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/scsi/qla2xxx/qla_sup.c b/drivers/scsi/qla2xxx/qla_sup.c index afec7f90f58a..ed9582603afa 100644 --- a/drivers/scsi/qla2xxx/qla_sup.c +++ b/drivers/scsi/qla2xxx/qla_sup.c | |||
@@ -980,12 +980,11 @@ qla24xx_write_flash_data(scsi_qla_host_t *vha, uint32_t *dwptr, uint32_t faddr, | |||
980 | uint32_t dwords) | 980 | uint32_t dwords) |
981 | { | 981 | { |
982 | int ret; | 982 | int ret; |
983 | uint32_t liter, miter; | 983 | uint32_t liter; |
984 | uint32_t sec_mask, rest_addr; | 984 | uint32_t sec_mask, rest_addr; |
985 | uint32_t fdata; | 985 | uint32_t fdata; |
986 | dma_addr_t optrom_dma; | 986 | dma_addr_t optrom_dma; |
987 | void *optrom = NULL; | 987 | void *optrom = NULL; |
988 | uint32_t *s, *d; | ||
989 | struct qla_hw_data *ha = vha->hw; | 988 | struct qla_hw_data *ha = vha->hw; |
990 | 989 | ||
991 | ret = QLA_SUCCESS; | 990 | ret = QLA_SUCCESS; |
@@ -1031,9 +1030,7 @@ qla24xx_write_flash_data(scsi_qla_host_t *vha, uint32_t *dwptr, uint32_t faddr, | |||
1031 | /* Go with burst-write. */ | 1030 | /* Go with burst-write. */ |
1032 | if (optrom && (liter + OPTROM_BURST_DWORDS) <= dwords) { | 1031 | if (optrom && (liter + OPTROM_BURST_DWORDS) <= dwords) { |
1033 | /* Copy data to DMA'ble buffer. */ | 1032 | /* Copy data to DMA'ble buffer. */ |
1034 | for (miter = 0, s = optrom, d = dwptr; | 1033 | memcpy(optrom, dwptr, OPTROM_BURST_SIZE); |
1035 | miter < OPTROM_BURST_DWORDS; miter++, s++, d++) | ||
1036 | *s = cpu_to_le32(*d); | ||
1037 | 1034 | ||
1038 | ret = qla2x00_load_ram(vha, optrom_dma, | 1035 | ret = qla2x00_load_ram(vha, optrom_dma, |
1039 | flash_data_addr(ha, faddr), | 1036 | flash_data_addr(ha, faddr), |