浏览代码

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>
Pradeep Goudagunta 11 年之前
父节点
当前提交
b31245b942
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      drivers/tty/serial/serial-tegra.c

+ 1 - 0
drivers/tty/serial/serial-tegra.c

@@ -602,6 +602,7 @@ static void tegra_uart_handle_rx_dma(struct tegra_uart_port *tup,
 
 
 	dmaengine_terminate_all(tup->rx_dma_chan);
 	dmaengine_terminate_all(tup->rx_dma_chan);
 	dmaengine_tx_status(tup->rx_dma_chan,  tup->rx_cookie, &state);
 	dmaengine_tx_status(tup->rx_dma_chan,  tup->rx_cookie, &state);
+	async_tx_ack(tup->rx_dma_desc);
 	count = tup->rx_bytes_requested - state.residue;
 	count = tup->rx_bytes_requested - state.residue;
 
 
 	/* If we are here, DMA is stopped */
 	/* If we are here, DMA is stopped */