From: Andy Shevchenko Date: Fri, 28 Nov 2014 14:17:11 +0000 (+0200) Subject: serial: 8250_dma: terminate transfer explicitly when timeout X-Git-Tag: firefly_0821_release~176^2~2319^2~108 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=9bdd6369aa64fade997c6f11325f7c7b60ec3f6a;p=firefly-linux-kernel-4.4.55.git serial: 8250_dma: terminate transfer explicitly when timeout There is no need to terminate transfer in the __dma_rx_complete() since it's called at the end of transfer. Special case when serial timeout occurs is handled separately where we have to terminate transfer. Signed-off-by: Andy Shevchenko Reviewed-by: Heikki Krogerus Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/serial/8250/8250_dma.c b/drivers/tty/serial/8250/8250_dma.c index fcd7ac6af2fc..e508939daea3 100644 --- a/drivers/tty/serial/8250/8250_dma.c +++ b/drivers/tty/serial/8250/8250_dma.c @@ -59,7 +59,6 @@ static void __dma_rx_complete(void *param) dma->rx_running = 0; dmaengine_tx_status(dma->rxchan, dma->rx_cookie, &state); - dmaengine_terminate_all(dma->rxchan); count = dma->rx_size - state.residue; @@ -131,6 +130,7 @@ int serial8250_rx_dma(struct uart_8250_port *p, unsigned int iir) if (dma->rx_running) { dmaengine_pause(dma->rxchan); __dma_rx_complete(p); + dmaengine_terminate_all(dma->rxchan); } return -ETIMEDOUT; default: