Make sure AUART is not busy before returning tx empty. Signed-off-by: Hector Palacios <hector.palacios@xxxxxxxx> --- drivers/tty/serial/mxs-auart.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/tty/serial/mxs-auart.c b/drivers/tty/serial/mxs-auart.c index d9bf6e103f65..e5540c89dd48 100644 --- a/drivers/tty/serial/mxs-auart.c +++ b/drivers/tty/serial/mxs-auart.c @@ -776,10 +776,13 @@ static void mxs_auart_shutdown(struct uart_port *u) static unsigned int mxs_auart_tx_empty(struct uart_port *u) { - if (readl(u->membase + AUART_STAT) & AUART_STAT_TXFE) + unsigned long stat; + + stat = readl(u->membase + AUART_STAT); + if ((stat & (AUART_STAT_BUSY | AUART_STAT_TXFE)) == AUART_STAT_TXFE) return TIOCSER_TEMT; - else - return 0; + + return 0; } /* -- To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html