summaryrefslogtreecommitdiff
path: root/recipes-kernel/linux/linux-3.12.70/linux-3.12-spi-atmel-dma-min.patch
blob: 4aba504c83e098940095b389d1aa43d714aa4506 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Index: linux-3.12.27/drivers/spi/spi-atmel.c
===================================================================
--- linux-3.12.27.orig/drivers/spi/spi-atmel.c
+++ linux-3.12.27/drivers/spi/spi-atmel.c
@@ -187,7 +187,12 @@
 /* use PIO for small transfers, avoiding DMA setup/teardown overhead and
  * cache operations; better heuristics consider wordsize and bitrate.
  */
-#define DMA_MIN_BYTES	16
+
+/* MTS: set DMA_MIN_BYTES=0 to use DMA all the time due to Rx buffer issues 
+ * when switching between smaller PIO and larger DMA transfers 
+ * https://lkml.org/lkml/2013/10/21/534
+ */
+#define DMA_MIN_BYTES	0
 
 struct atmel_spi_dma {
 	struct dma_chan			*chan_rx;