Skip to content

Commit 29788ab

Browse files
MrVangregkh
authored andcommitted
tty: serial: fsl_lpuart: fix lpuart32_poll_get_char
The watermark is set to 1, so we need to input two chars to trigger RDRF using the original logic. With the new logic, we could always get the char when there is data in FIFO. Suggested-by: Fugang Duan <[email protected]> Signed-off-by: Peng Fan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 9ea40db commit 29788ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/tty/serial/fsl_lpuart.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,7 @@ static void lpuart32_poll_put_char(struct uart_port *port, unsigned char c)
680680

681681
static int lpuart32_poll_get_char(struct uart_port *port)
682682
{
683-
if (!(lpuart32_read(port, UARTSTAT) & UARTSTAT_RDRF))
683+
if (!(lpuart32_read(port, UARTWATER) >> UARTWATER_RXCNT_OFF))
684684
return NO_POLL_CHAR;
685685

686686
return lpuart32_read(port, UARTDATA);

0 commit comments

Comments
 (0)