From: sonic zhang <sonic.adi@gmail.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>,
Linux Kernel <linux-kernel@vger.kernel.org>,
Linux Serial <linux-serial@vger.kernel.org>
Subject: [PATCH] [bfin-sport-uart] The waiting loop to stop SPORT TX from TX interrupt is too long
Date: Mon, 21 Sep 2009 19:02:53 +0800 [thread overview]
Message-ID: <1253530973.22138.16.camel@eight.analog.com> (raw)
The waiting loop to stop SPORT TX from TX interrupt is
too long. This may block SPORT RX interrupts and cause
RX FIFO overflow. So, do stop sport TX only after the last
char in TX FIFO is moved into the shift register.
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
---
drivers/serial/bfin_sport_uart.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/drivers/serial/bfin_sport_uart.c b/drivers/serial/bfin_sport_uart.c
index c108b1a..fb9f7cd 100644
--- a/drivers/serial/bfin_sport_uart.c
+++ b/drivers/serial/bfin_sport_uart.c
@@ -303,7 +303,13 @@ static void sport_uart_tx_chars(struct sport_uart_port *up)
}
if (uart_circ_empty(xmit) || uart_tx_stopped(&up->port)) {
- sport_stop_tx(&up->port);
+ /* The waiting loop to stop SPORT TX from TX interrupt is
+ * too long. This may block SPORT RX interrupts and cause
+ * RX FIFO overflow. So, do stop sport TX only after the last
+ * char in TX FIFO is moved into the shift register.
+ */
+ if (SPORT_GET_STAT(up) & TXHRE)
+ sport_stop_tx(&up->port);
return;
}
--
1.6.0
reply other threads:[~2009-09-21 11:02 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1253530973.22138.16.camel@eight.analog.com \
--to=sonic.adi@gmail.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).