* [PATCH] Fix logic of tx_empty.
@ 2011-07-22 11:07 Simon Budig
0 siblings, 0 replies; 2+ messages in thread
From: Simon Budig @ 2011-07-22 11:07 UTC (permalink / raw)
To: linux-arm-kernel
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
--------------060708010803060308030706--
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] Fix logic of tx_empty.
2011-08-02 18:57 [PATCH] Fix for AMBA PL011 serial driver (tx_empty logic) Simon Budig
@ 2011-08-02 18:57 ` Simon Budig
0 siblings, 0 replies; 2+ messages in thread
From: Simon Budig @ 2011-08-02 18:57 UTC (permalink / raw)
To: linux-arm-kernel
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-08-02 18:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-22 11:07 [PATCH] Fix logic of tx_empty Simon Budig
-- strict thread matches above, loose matches on Subject: below --
2011-08-02 18:57 [PATCH] Fix for AMBA PL011 serial driver (tx_empty logic) Simon Budig
2011-08-02 18:57 ` [PATCH] Fix logic of tx_empty Simon Budig
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).