aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial
diff options
context:
space:
mode:
authorPradeep Goudagunta <pgoudagunta@nvidia.com>2014-06-06 07:18:08 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-07-10 18:53:20 -0400
commit5e3dbfca3b14a4a2950255c1628cd53b384d963e (patch)
tree179c7922d6132716bbf39ed758c3321b2bcb6264 /drivers/tty/serial
parent080029b149258b9ccb05f26ee5f5d18e359bce2d (diff)
serial: tegra: update tx_circular buffer only when TX_DMA is in progress
When channel is require to stop transmit then update the Tx circular buffer only when DMA based transfer is in progress. If there is no DMA based transfer then no need to update the Tx buffer. Signed-off-by: Pradeep Goudagunta <pgoudagunta@nvidia.com> Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial')
-rw-r--r--drivers/tty/serial/serial-tegra.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/tty/serial/serial-tegra.c b/drivers/tty/serial/serial-tegra.c
index d5c2a287b7e7..117d8d1382f9 100644
--- a/drivers/tty/serial/serial-tegra.c
+++ b/drivers/tty/serial/serial-tegra.c
@@ -482,6 +482,9 @@ static void tegra_uart_stop_tx(struct uart_port *u)
482 struct dma_tx_state state; 482 struct dma_tx_state state;
483 int count; 483 int count;
484 484
485 if (tup->tx_in_progress != TEGRA_UART_TX_DMA)
486 return;
487
485 dmaengine_terminate_all(tup->tx_dma_chan); 488 dmaengine_terminate_all(tup->tx_dma_chan);
486 dmaengine_tx_status(tup->tx_dma_chan, tup->tx_cookie, &state); 489 dmaengine_tx_status(tup->tx_dma_chan, tup->tx_cookie, &state);
487 count = tup->tx_bytes_requested - state.residue; 490 count = tup->tx_bytes_requested - state.residue;