diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2014-11-28 09:17:11 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-01-09 17:16:27 -0500 |
commit | 9bdd6369aa64fade997c6f11325f7c7b60ec3f6a (patch) | |
tree | b2d6128b7c6d16ce4c5799d31f30736c96f00afc /drivers/tty | |
parent | 9e5df9f88c5d874a9154e137a2e99413750540cd (diff) |
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 <andriy.shevchenko@linux.intel.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/8250/8250_dma.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) | |||
59 | 59 | ||
60 | dma->rx_running = 0; | 60 | dma->rx_running = 0; |
61 | dmaengine_tx_status(dma->rxchan, dma->rx_cookie, &state); | 61 | dmaengine_tx_status(dma->rxchan, dma->rx_cookie, &state); |
62 | dmaengine_terminate_all(dma->rxchan); | ||
63 | 62 | ||
64 | count = dma->rx_size - state.residue; | 63 | count = dma->rx_size - state.residue; |
65 | 64 | ||
@@ -131,6 +130,7 @@ int serial8250_rx_dma(struct uart_8250_port *p, unsigned int iir) | |||
131 | if (dma->rx_running) { | 130 | if (dma->rx_running) { |
132 | dmaengine_pause(dma->rxchan); | 131 | dmaengine_pause(dma->rxchan); |
133 | __dma_rx_complete(p); | 132 | __dma_rx_complete(p); |
133 | dmaengine_terminate_all(dma->rxchan); | ||
134 | } | 134 | } |
135 | return -ETIMEDOUT; | 135 | return -ETIMEDOUT; |
136 | default: | 136 | default: |