This is a note to let you know that I've just added the patch titled tty: serial: fsl_lpuart: Clear the error flags by writing 1 for lpuart32 platforms to the 6.1-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: tty-serial-fsl_lpuart-clear-the-error-flags-by-writing-1-for-lpuart32-platforms.patch and it can be found in the queue-6.1 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 282069845af388b08d622ad192b831dcd0549c62 Mon Sep 17 00:00:00 2001 From: Sherry Sun <sherry.sun@xxxxxxx> Date: Tue, 1 Aug 2023 10:23:04 +0800 Subject: tty: serial: fsl_lpuart: Clear the error flags by writing 1 for lpuart32 platforms From: Sherry Sun <sherry.sun@xxxxxxx> commit 282069845af388b08d622ad192b831dcd0549c62 upstream. Do not read the data register to clear the error flags for lpuart32 platforms, the additional read may cause the receive FIFO underflow since the DMA has already read the data register. Actually all lpuart32 platforms support write 1 to clear those error bits, let's use this method to better clear the error flags. Fixes: 42b68768e51b ("serial: fsl_lpuart: DMA support for 32-bit variant") Cc: stable <stable@xxxxxxxxxx> Signed-off-by: Sherry Sun <sherry.sun@xxxxxxx> Link: https://lore.kernel.org/r/20230801022304.24251-1-sherry.sun@xxxxxxx Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/tty/serial/fsl_lpuart.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/tty/serial/fsl_lpuart.c +++ b/drivers/tty/serial/fsl_lpuart.c @@ -1125,8 +1125,8 @@ static void lpuart_copy_rx_to_tty(struct unsigned long sr = lpuart32_read(&sport->port, UARTSTAT); if (sr & (UARTSTAT_PE | UARTSTAT_FE)) { - /* Read DR to clear the error flags */ - lpuart32_read(&sport->port, UARTDATA); + /* Clear the error flags */ + lpuart32_write(&sport->port, sr, UARTSTAT); if (sr & UARTSTAT_PE) sport->port.icount.parity++; Patches currently in stable-queue which might be from sherry.sun@xxxxxxx are queue-6.1/tty-serial-fsl_lpuart-clear-the-error-flags-by-writing-1-for-lpuart32-platforms.patch