Skip to contentSkip to conversation

Fix logic of tx_empty.

PATCH New Simon Budig 1 participant 1 message Jul 22, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix logic of tx_empty.

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

---
 drivers/tty/serial/amba-pl011.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/tty/serial/amba-pl011.c +1 -1
index 05eb292..a23b419 100644
@@ -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)
Signature · 5 lines
1.7.0.4



--------------060708010803060308030706--