浏览代码

ata: pata_octeon_cf: Use correct byte order for DMA in when built little-endian.

We need to set the 'endian' bit in this case.

Acked-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: David Daney <david.daney@cavium.com>
David Daney 14 年之前
父节点
当前提交
1007c4bc0f
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      drivers/ata/pata_octeon_cf.c

+ 4 - 0
drivers/ata/pata_octeon_cf.c

@@ -20,6 +20,7 @@
 #include <linux/platform_device.h>
 #include <linux/platform_device.h>
 #include <scsi/scsi_host.h>
 #include <scsi/scsi_host.h>
 
 
+#include <asm/byteorder.h>
 #include <asm/octeon/octeon.h>
 #include <asm/octeon/octeon.h>
 
 
 /*
 /*
@@ -589,6 +590,9 @@ static void octeon_cf_dma_start(struct ata_queued_cmd *qc)
 
 
 	/* Set the direction of the DMA */
 	/* Set the direction of the DMA */
 	mio_boot_dma_cfg.u64 = 0;
 	mio_boot_dma_cfg.u64 = 0;
+#ifdef __LITTLE_ENDIAN
+	mio_boot_dma_cfg.s.endian = 1;
+#endif
 	mio_boot_dma_cfg.s.en = 1;
 	mio_boot_dma_cfg.s.en = 1;
 	mio_boot_dma_cfg.s.rw = ((qc->tf.flags & ATA_TFLAG_WRITE) != 0);
 	mio_boot_dma_cfg.s.rw = ((qc->tf.flags & ATA_TFLAG_WRITE) != 0);