]> www.infradead.org Git - users/jedix/linux-maple.git/commit
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>
Mon, 21 Sep 2015 17:05:40 +0000 (10:05 -0700)
commitda5b2f0abeaa4816e8dbc8dffef33704f53db1b3
treece0e0551fedbeef2ed5ea8067b8f55f95fae033c
parent5fe45c8dbe3f1927db62fbbbc37b64cbe41967b4
serial: samsung: fix DMA mode enter condition for small FIFO sizes

commit 81ccb2a69f76b88295a1da9fc9484df715fe3bfa upstream.

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.

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