diff options
author | Pradeep Goudagunta <pgoudagunta@nvidia.com> | 2014-06-06 07:18:09 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-07-10 18:53:20 -0400 |
commit | b31245b9420731cc62bb1eea0a2240b3e90a2e78 (patch) | |
tree | 199b9ed722f37fb0331f9658d0402f0bca07b44f /drivers/tty | |
parent | 5e3dbfca3b14a4a2950255c1628cd53b384d963e (diff) |
serial: tegra: ack the rx dma desc after transfer terminated
The Rx dma descriptor allocated without the DMA_ACK flags so that
once after tarnsfer done or terminated, client can ack the descriptor
to free it for later use.
If the Rx DMA is terminated for some reason then rx-dma descriptor
is not getting acked which causes the memory leak and list of usage
desc to grow continuously.
Hence, acknowledge the rx-dma descriptor once transfer is terminated
to avoid memory leak and desc list to grow.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/serial-tegra.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/tty/serial/serial-tegra.c b/drivers/tty/serial/serial-tegra.c index 117d8d1382f9..53d7c31ce098 100644 --- a/drivers/tty/serial/serial-tegra.c +++ b/drivers/tty/serial/serial-tegra.c | |||
@@ -602,6 +602,7 @@ static void tegra_uart_handle_rx_dma(struct tegra_uart_port *tup, | |||
602 | 602 | ||
603 | dmaengine_terminate_all(tup->rx_dma_chan); | 603 | dmaengine_terminate_all(tup->rx_dma_chan); |
604 | dmaengine_tx_status(tup->rx_dma_chan, tup->rx_cookie, &state); | 604 | dmaengine_tx_status(tup->rx_dma_chan, tup->rx_cookie, &state); |
605 | async_tx_ack(tup->rx_dma_desc); | ||
605 | count = tup->rx_bytes_requested - state.residue; | 606 | count = tup->rx_bytes_requested - state.residue; |
606 | 607 | ||
607 | /* If we are here, DMA is stopped */ | 608 | /* If we are here, DMA is stopped */ |