All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] serial: 8250_dma: terminate transfer explicitly when timeout
@ 2014-11-28 14:17 Andy Shevchenko
  0 siblings, 0 replies; only message in thread
From: Andy Shevchenko @ 2014-11-28 14:17 UTC (permalink / raw)
  To: Jiri Slaby, Heikki Krogerus, Loic Poulain, linux-serial,
	Greg Kroah-Hartman
  Cc: Andy Shevchenko

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 <andriy.shevchenko@linux.intel.com>
---
 drivers/tty/serial/8250/8250_dma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/8250/8250_dma.c b/drivers/tty/serial/8250/8250_dma.c
index fcd7ac6..e508939 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:
-- 
2.1.3


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-11-28 14:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-28 14:17 [PATCH v1] serial: 8250_dma: terminate transfer explicitly when timeout Andy Shevchenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.