All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH/RFC] spi: sh-msiof: Fix DMA transfer size check
@ 2016-11-07 14:07 Simon Horman
  2016-11-07 14:52 ` Geert Uytterhoeven
  2017-11-02 13:21   ` Mark Brown
  0 siblings, 2 replies; 4+ messages in thread
From: Simon Horman @ 2016-11-07 14:07 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: Magnus Damm, linux-spi, linux-renesas-soc

From: Hiromitsu Yamasaki <hiromitsu.yamasaki.ym@renesas.com>

DMA supports 32-bit words only,
even if BITLEN1 of SITMDR2 register is 16bit.

Fixes: b0d0ce8b6b91 ("spi: sh-msiof: Add DMA support")
Signed-off-by: Hiromitsu Yamasaki <hiromitsu.yamasaki.ym@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
Geert, this is a patch from the Gen3 BSP 3.3.2 kernel.
Please consider if it is appropriate for mainline.
---
 drivers/spi/spi-sh-msiof.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/spi-sh-msiof.c b/drivers/spi/spi-sh-msiof.c
index 1de3a772eb7d..cbf02ebb30a2 100644
--- a/drivers/spi/spi-sh-msiof.c
+++ b/drivers/spi/spi-sh-msiof.c
@@ -862,7 +862,7 @@ static int sh_msiof_transfer_one(struct spi_master *master,
 				break;
 			copy32 = copy_bswap32;
 		} else if (bits <= 16) {
-			if (l & 1)
+			if (l & 3)
 				break;
 			copy32 = copy_wswap32;
 		} else {
-- 
2.7.0.rc3.207.g0ac5344

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-11-02 13:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-07 14:07 [PATCH/RFC] spi: sh-msiof: Fix DMA transfer size check Simon Horman
2016-11-07 14:52 ` Geert Uytterhoeven
2017-11-02 13:21 ` Applied "spi: sh-msiof: Fix DMA transfer size check" to the spi tree Mark Brown
2017-11-02 13:21   ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.