Skip to content

Commit

Permalink
ata: pata_octeon_cf: Use correct byte order for DMA in when built lit…
Browse files Browse the repository at this point in the history
…tle-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>
  • Loading branch information
David Daney authored and Ralf Baechle committed Dec 13, 2012
1 parent 43f01da commit 1007c4b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/ata/pata_octeon_cf.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <linux/platform_device.h>
#include <scsi/scsi_host.h>

#include <asm/byteorder.h>
#include <asm/octeon/octeon.h>

/*
Expand Down Expand Up @@ -589,6 +590,9 @@ static void octeon_cf_dma_start(struct ata_queued_cmd *qc)

/* Set the direction of the DMA */
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.rw = ((qc->tf.flags & ATA_TFLAG_WRITE) != 0);

Expand Down

0 comments on commit 1007c4b

Please sign in to comment.