]> git.baikalelectronics.ru Git - kernel.git/commit
serial: 8250: 8250_omap: Terminate DMA before pushing data on RX timeout
authorVignesh Raghavendra <vigneshr@ti.com>
Thu, 19 Mar 2020 11:03:39 +0000 (16:33 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 24 Mar 2020 11:25:10 +0000 (12:25 +0100)
commit499acaabc499baf44257b97ca16dfe655eab53b7
treee272e6f184995214f9df29d328a0716f9f73c689
parent1ae03f5b79fcd71d801e473ca0347ae08ede8b43
serial: 8250: 8250_omap: Terminate DMA before pushing data on RX timeout

Terminate and flush DMA internal buffers, before pushing RX data to
higher layer. Otherwise, this will lead to data corruption, as driver
would end up pushing stale buffer data to higher layer while actual data
is still stuck inside DMA hardware and has yet not arrived at the
memory.
While at that, replace deprecated dmaengine_terminate_all() with
dmaengine_terminate_async().

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Link: https://lore.kernel.org/r/20200319110344.21348-2-vigneshr@ti.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/8250/8250_omap.c