From: Laxman Dewangan <ldewangan@nvidia.com>
To: <gregkh@linuxfoundation.org>
Cc: <swarren@wwwdotorg.org>, <linux-serial@vger.kernel.org>,
<linux-tegra@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
Pradeep Goudagunta <pgoudagunta@nvidia.com>,
Laxman Dewangan <ldewangan@nvidia.com>
Subject: [PATCH 2/2] serial: tegra: ack the rx dma desc after transfer terminated
Date: Fri, 6 Jun 2014 16:48:09 +0530 [thread overview]
Message-ID: <1402053489-21262-2-git-send-email-ldewangan@nvidia.com> (raw)
In-Reply-To: <1402053489-21262-1-git-send-email-ldewangan@nvidia.com>
From: Pradeep Goudagunta <pgoudagunta@nvidia.com>
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>
---
drivers/tty/serial/serial-tegra.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/tty/serial/serial-tegra.c b/drivers/tty/serial/serial-tegra.c
index 117d8d1..53d7c31 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,
dmaengine_terminate_all(tup->rx_dma_chan);
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;
/* If we are here, DMA is stopped */
--
1.8.1.5
prev parent reply other threads:[~2014-06-06 11:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-06 11:18 [PATCH 1/2] serial: tegra: update tx_circular buffer only when TX_DMA is in progress Laxman Dewangan
2014-06-06 11:18 ` Laxman Dewangan [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1402053489-21262-2-git-send-email-ldewangan@nvidia.com \
--to=ldewangan@nvidia.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=pgoudagunta@nvidia.com \
--cc=swarren@wwwdotorg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®