* [PATCH] Fix for AMBA PL011 serial driver (tx_empty logic)
@ 2011-08-02 18:57 Simon Budig
2011-08-02 18:57 ` [PATCH] Fix logic of tx_empty Simon Budig
0 siblings, 1 reply; 3+ messages in thread
From: Simon Budig @ 2011-08-02 18:57 UTC (permalink / raw)
To: linux-arm-kernel
From: Simon Budig <simon@budig.de>
Hi all.
This is a resend of a patch i submitted a few days ago although with a
mangled formatting. I don't know who maintains the PL011 AMBA driver, so
I hope someone steps up and helps me in bringing this upstream.
There is a problem with the logic of tx_empty in the amba-pl011 serial
port driver. Instead of checking for an empty FIFO it checks for a
not-full FIFO, which - according to Documentation/serial/driver - is
wrong.
Thanks,
Simon
Simon Budig (1):
Fix logic of tx_empty.
drivers/tty/serial/amba-pl011.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
^ permalink raw reply [flat|nested] 3+ 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; 3+ 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] 3+ messages in thread
* [PATCH] Fix logic of tx_empty.
@ 2011-07-22 11:07 Simon Budig
0 siblings, 0 replies; 3+ 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] 3+ messages in thread
end of thread, other threads:[~2011-08-02 18:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
-- strict thread matches above, loose matches on Subject: below --
2011-07-22 11:07 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).