serial: samsung: fix DMA mode enter condition for small FIFO sizes
authorMarek Szyprowski <m.szyprowski@samsung.com>
Fri, 31 Jul 2015 08:58:27 +0000 (10:58 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Aug 2015 05:07:23 +0000 (22:07 -0700)
commit81ccb2a69f76b88295a1da9fc9484df715fe3bfa
treed2aaff91175f5c1d578b8e19eb916fec668e9fe4
parent9e31364fc3272073ec8c5fac18a3e01d4f013418
serial: samsung: fix DMA mode enter condition for small FIFO sizes

Due to some of serial ports can have FIFO size smaller than cache line
size, and because of need to align DMA buffer address to cache line size,
it's necessary to calculate minimum number of bytes for which we want
to start DMA transaction to be at least cache line size. The simplest
way to meet this requirement is to get maximum of cache line size and
FIFO size.

Cc: <stable@vger.kernel.org> # v3.18+
Reported-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/samsung.c
drivers/tty/serial/samsung.h
This page took 0.031043 seconds and 5 git commands to generate.