tty: serial: fsl_lpuart: Clear the error flags by writing 1 for lpuart32 platforms
authorSherry Sun <sherry.sun@nxp.com>
Tue, 1 Aug 2023 02:23:04 +0000 (10:23 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 1 Aug 2023 05:31:53 +0000 (07:31 +0200)
commit282069845af388b08d622ad192b831dcd0549c62
tree04403ca0ce29fe63ef1bf05ef4de26ae725b7f6a
parent5d0c230f1de8c7515b6567d9afba1f196fb4e2f4
tty: serial: fsl_lpuart: Clear the error flags by writing 1 for lpuart32 platforms

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@kernel.org>
Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Link: https://lore.kernel.org/r/20230801022304.24251-1-sherry.sun@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/fsl_lpuart.c