[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20171207125636.913141547@linuxfoundation.org>
Date: Thu, 7 Dec 2017 13:56:03 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org,
Hiromitsu Yamasaki <hiromitsu.yamasaki.ym@...esas.com>,
Simon Horman <horms+renesas@...ge.net.au>,
Geert Uytterhoeven <geert+renesas@...der.be>,
Dirk Behme <dirk.behme@...bosch.com>,
Mark Brown <broonie@...nel.org>,
Sasha Levin <alexander.levin@...izon.com>
Subject: [PATCH 4.9 019/109] spi: sh-msiof: Fix DMA transfer size check
4.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hiromitsu Yamasaki <hiromitsu.yamasaki.ym@...esas.com>
[ Upstream commit 36735783fdb599c94b9c86824583df367c65900b ]
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@...esas.com>
Signed-off-by: Simon Horman <horms+renesas@...ge.net.au>
Acked-by: Geert Uytterhoeven <geert+renesas@...der.be>
Acked-by: Dirk Behme <dirk.behme@...bosch.com>
Signed-off-by: Mark Brown <broonie@...nel.org>
Signed-off-by: Sasha Levin <alexander.levin@...izon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
drivers/spi/spi-sh-msiof.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- 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
break;
copy32 = copy_bswap32;
} else if (bits <= 16) {
- if (l & 1)
+ if (l & 3)
break;
copy32 = copy_wswap32;
} else {
Powered by blists - more mailing lists