From: Robin Gong Date: Tue, 19 Jun 2018 16:56:58 +0000 (+0800) Subject: tty: serial: imx: correct dma cookie status X-Git-Tag: for-linus-20180825~51^2~71 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=fb7f1bf8d05e4f339450f3f74bd91c72ce980748;p=linux-block.git tty: serial: imx: correct dma cookie status Correct to check the right rx dma cookie status in spit of it works because only one cookie is running in the current sdma. But it will not once sdma driver support multi cookies running based on virt-dma. Signed-off-by: Robin Gong Reviewed-by: Sascha Hauer Acked-by: Uwe Kleine-König Tested-by: Lucas Stach Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index 3f2b33ecf30a..239c0fa2e981 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c @@ -1052,7 +1052,7 @@ static void imx_uart_dma_rx_callback(void *data) unsigned int r_bytes; unsigned int bd_size; - status = dmaengine_tx_status(chan, (dma_cookie_t)0, &state); + status = dmaengine_tx_status(chan, sport->rx_cookie, &state); if (status == DMA_ERROR) { imx_uart_clear_rx_errors(sport);