linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: simon.budig@kernelconcepts.de (Simon Budig)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] Fix logic of tx_empty.
Date: Tue,  2 Aug 2011 20:57:46 +0200	[thread overview]
Message-ID: <1312311466-3814-2-git-send-email-simon.budig@kernelconcepts.de> (raw)
In-Reply-To: <1312311466-3814-1-git-send-email-simon.budig@kernelconcepts.de>

From: Simon Budig <simon@budig.de>

   test for TX-FIFO *not empty* instead of TX-FIFO full.

Signed-off-by: Simon Budig <simon.budig@kernelconcepts.de>
---
 drivers/tty/serial/amba-pl011.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
index 05eb292..a23b419 100644
--- a/drivers/tty/serial/amba-pl011.c
+++ b/drivers/tty/serial/amba-pl011.c
@@ -792,7 +792,7 @@ static unsigned int pl01x_tx_empty(struct uart_port *port)
 {
 	struct uart_amba_port *uap = (struct uart_amba_port *)port;
 	unsigned int status = readw(uap->port.membase + UART01x_FR);
-	return status & (UART01x_FR_BUSY|UART01x_FR_TXFF) ? 0 : TIOCSER_TEMT;
+	return (status & UART01x_FR_BUSY) || !(status & UART011_FR_TXFE) ? 0 : TIOCSER_TEMT;
 }
 
 static unsigned int pl01x_get_mctrl(struct uart_port *port)
-- 
1.7.0.4

  reply	other threads:[~2011-08-02 18:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-02 18:57 [PATCH] Fix for AMBA PL011 serial driver (tx_empty logic) Simon Budig
2011-08-02 18:57 ` Simon Budig [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-07-22 11:07 [PATCH] Fix logic of tx_empty Simon Budig

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=1312311466-3814-2-git-send-email-simon.budig@kernelconcepts.de \
    --to=simon.budig@kernelconcepts.de \
    --cc=linux-arm-kernel@lists.infradead.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).