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 1/2] serial: tegra: update tx_circular buffer only when TX_DMA is in progress
Date: Fri, 6 Jun 2014 16:48:08 +0530 [thread overview]
Message-ID: <1402053489-21262-1-git-send-email-ldewangan@nvidia.com> (raw)
From: Pradeep Goudagunta <pgoudagunta@nvidia.com>
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>
---
drivers/tty/serial/serial-tegra.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/tty/serial/serial-tegra.c b/drivers/tty/serial/serial-tegra.c
index d5c2a28..117d8d1 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)
struct dma_tx_state state;
int count;
+ if (tup->tx_in_progress != TEGRA_UART_TX_DMA)
+ return;
+
dmaengine_terminate_all(tup->tx_dma_chan);
dmaengine_tx_status(tup->tx_dma_chan, tup->tx_cookie, &state);
count = tup->tx_bytes_requested - state.residue;
--
1.8.1.5
next 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 Laxman Dewangan [this message]
2014-06-06 11:18 ` [PATCH 2/2] serial: tegra: ack the rx dma desc after transfer terminated Laxman Dewangan
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-1-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®