[PATCH 17/23] [BUG] atmel-spi && DMA: OOPS if buffer > 4400 bytes

Richard Genoud richard.genoud at gmail.com
Tue Aug 14 09:49:31 EDT 2012


this is just a quick and suboptimal workaround
---
 drivers/spi/spi-atmel.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/spi/spi-atmel.c b/drivers/spi/spi-atmel.c
index d629422..0899da2 100644
--- a/drivers/spi/spi-atmel.c
+++ b/drivers/spi/spi-atmel.c
@@ -638,7 +638,8 @@ static void atmel_spi_next_xfer(struct spi_master *master,
 
 	as->current_transfer = xfer;
 
-	if (atmel_spi_use_dma(xfer)) {
+	/* quick (and *really* not optimal) workaround for DMA BUG */
+	if (atmel_spi_use_dma(xfer) && (xfer->len < BUFFER_SIZE)) {
 		if (!atmel_spi_next_xfer_dma(master, xfer))
 			return;
 		else
-- 
1.7.2.5




More information about the linux-arm-kernel mailing list