diff options
author | Grant Grundler <grundler@parisc-linux.org> | 2008-04-05 10:14:22 -0600 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-04-11 17:16:28 -0400 |
commit | 423eef6fbb989f316d268d0d96812165fbaed26c (patch) | |
tree | adf223794164237c9ce3d28aa967e1495bbdbee5 /drivers/scsi | |
parent | 9f448b5554b485012b8a80c1c889175b3cb84940 (diff) | |
download | kernel_samsung_smdk4412-423eef6fbb989f316d268d0d96812165fbaed26c.zip kernel_samsung_smdk4412-423eef6fbb989f316d268d0d96812165fbaed26c.tar.gz kernel_samsung_smdk4412-423eef6fbb989f316d268d0d96812165fbaed26c.tar.bz2 |
[SCSI] initio: fix big endian problems for auto request sense
Most of the cpu_to_le32() usage was wrong in one way or another.
Compiler warning on BE builds was just the tip of the iceberg.
This patch attempts to make this driver work on BE though I
don't have the HW to test it.
Signed-off-by: Grant Grundler <grundler@parisc-linux.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/initio.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/scsi/initio.c b/drivers/scsi/initio.c index 0cc8868..dbae3fd 100644 --- a/drivers/scsi/initio.c +++ b/drivers/scsi/initio.c @@ -2581,8 +2581,8 @@ static void initio_build_scb(struct initio_host * host, struct scsi_ctrl_blk * c /* Map the sense buffer into bus memory */ dma_addr = dma_map_single(&host->pci_dev->dev, cmnd->sense_buffer, SENSE_SIZE, DMA_FROM_DEVICE); - cblk->senseptr = cpu_to_le32((u32)dma_addr); - cblk->senselen = cpu_to_le32(SENSE_SIZE); + cblk->senseptr = (u32)dma_addr; + cblk->senselen = SENSE_SIZE; cmnd->SCp.ptr = (char *)(unsigned long)dma_addr; cblk->cdblen = cmnd->cmd_len; @@ -2606,7 +2606,7 @@ static void initio_build_scb(struct initio_host * host, struct scsi_ctrl_blk * c dma_addr = dma_map_single(&host->pci_dev->dev, &cblk->sglist[0], sizeof(struct sg_entry) * TOTAL_SG_ENTRY, DMA_BIDIRECTIONAL); - cblk->bufptr = cpu_to_le32((u32)dma_addr); + cblk->bufptr = (u32)dma_addr; cmnd->SCp.dma_handle = dma_addr; cblk->sglen = nseg; @@ -2616,7 +2616,8 @@ static void initio_build_scb(struct initio_host * host, struct scsi_ctrl_blk * c sg = &cblk->sglist[0]; scsi_for_each_sg(cmnd, sglist, cblk->sglen, i) { sg->data = cpu_to_le32((u32)sg_dma_address(sglist)); - total_len += sg->len = cpu_to_le32((u32)sg_dma_len(sglist)); + sg->len = cpu_to_le32((u32)sg_dma_len(sglist)); + total_len += sg_dma_len(sglist); ++sg; } |