Message ID | 8898674D84E3B24BA3A2D289B872026A69F95F68@G01JPEXMBKW03 (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | tty: pl011:write to TXFIFO may miss some characters form interrupt routine | expand |
diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c index 4b40a5b..9ca9f37 100644 --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c @@ -1380,8 +1380,8 @@ __acquires(&uap->port.lock) static bool pl011_tx_char(struct uart_amba_port *uap, unsigned char c, bool from_irq) { - if (unlikely(!from_irq) && - pl011_read(uap, REG_FR) & UART01x_FR_TXFF) + /* Even from irq routine, we need to check UART01x_FR_TXFF bit */ + if ( pl011_read(uap, REG_FR) & UART01x_FR_TXFF) return false; /* unable to transmit character */ pl011_write(c, uap, REG_DR);