Skip to content

Commit

Permalink
tty: serial: imx: correct dma cookie status
Browse files Browse the repository at this point in the history
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 <yibin.gong@nxp.com>
Reviewed-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Tested-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Robin Gong authored and Greg Kroah-Hartman committed Jun 28, 2018
1 parent e51e597 commit fb7f1bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/tty/serial/imx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit fb7f1bf

Please sign in to comment.