diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c index f3658fc49029..6b26f767768e 100644 --- a/drivers/tty/serial/xilinx_uartps.c +++ b/drivers/tty/serial/xilinx_uartps.c @@ -650,8 +650,8 @@ static unsigned int cdns_uart_tx_empty(struct uart_port *port) unsigned int status; status = readl(port->membase + CDNS_UART_SR) & - CDNS_UART_SR_TXEMPTY; - return status ? TIOCSER_TEMT : 0; + (CDNS_UART_SR_TXEMPTY | CDNS_UART_SR_TACTIVE); + return (status == CDNS_UART_SR_TXEMPTY) ? TIOCSER_TEMT : 0; } /**