spi: au1550_spi full duplex dma fix

Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4e253d23003b54c88d0919d6088be74f00eec3c7
Commit:     4e253d23003b54c88d0919d6088be74f00eec3c7
Parent:     6a010b56e9bd2fdb32efd153e1a08305949b6b53
Author:     Jan Nikitenko <jan.nikitenko <at> gmail.com>
AuthorDate: Mon Dec 1 13:13:56 2008 -0800
Committer:  Linus Torvalds <torvalds <at> linux-foundation.org>
CommitDate: Mon Dec 1 19:55:24 2008 -0800

    spi: au1550_spi full duplex dma fix

    Fix unsafe order in dma mapping operation: always flush data from the
    cache *BEFORE* invalidating it, to allow full duplex transfers where the
    same buffer may be used for both writes and reads.  Tested with mmc-spi.

    Signed-off-by: Jan Nikitenko <jan.nikitenko <at> gmail.com>
    Signed-off-by: David Brownell <dbrownell <at> users.sourceforge.net>
    Signed-off-by: Andrew Morton <akpm <at> linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds <at> linux-foundation.org>
---
 drivers/spi/au1550_spi.c |   26 ++++++++++++++++----------
 1 files changed, 16 insertions(+), 10 deletions(-)

diff --git a/drivers/spi/au1550_spi.c b/drivers/spi/au1550_spi.c
index 87b73e0..b02f25c 100644
--- a/drivers/spi/au1550_spi.c
+++ b/drivers/spi/au1550_spi.c
@@ -369,10 +369,23 @@ static int au1550_spi_dma_txrxb(struct spi_device *spi, struct spi_transfer *t)
 	dma_rx_addr = t->rx_dma;

 	/*
(Continue reading)


Gmane