Skip to content

Commit 5df884d

Browse files
ndreysgregkh
authored andcommitted
tty: serial: fsl_lpuart: Fix lpuart_flush_buffer()
Fix incorrect read-modify-write sequence in lpuart_flush_buffer() that was reading from UARTPFIFO and writing to UARTCFIFO instead of operating solely on the latter. Fixes: 9bc19af ("tty: serial: fsl_lpuart: Flush HW FIFOs in .flush_buffer") Signed-off-by: Andrey Smirnov <[email protected]> Reported-by: Vivien Didelot <[email protected]> Tested-by: Vivien Didelot <[email protected]> Tested-by: Andrew Lunn <[email protected]> Reviewed-by: Fabio Estevam <[email protected]> Cc: Stefan Agner <[email protected]> Cc: Chris Healy <[email protected]> Cc: Cory Tusar <[email protected]> Cc: Lucas Stach <[email protected]> Cc: Jiri Slaby <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 47934ef commit 5df884d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/tty/serial/fsl_lpuart.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ static void lpuart_flush_buffer(struct uart_port *port)
548548
val |= UARTFIFO_TXFLUSH | UARTFIFO_RXFLUSH;
549549
lpuart32_write(&sport->port, val, UARTFIFO);
550550
} else {
551-
val = readb(sport->port.membase + UARTPFIFO);
551+
val = readb(sport->port.membase + UARTCFIFO);
552552
val |= UARTCFIFO_TXFLUSH | UARTCFIFO_RXFLUSH;
553553
writeb(val, sport->port.membase + UARTCFIFO);
554554
}

0 commit comments

Comments
 (0)