]> git.baikalelectronics.ru Git - kernel.git/commit
tty: serial: lpuart: disable flow control while waiting for the transmit engine to...
authorSherry Sun <sherry.sun@nxp.com>
Sun, 21 Aug 2022 10:15:27 +0000 (18:15 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 Sep 2022 10:04:51 +0000 (12:04 +0200)
commitfe631b51a124896ac75e1e406a4b5e45b4b829c2
tree3b8e5e27a5bac6f09349d3a8ac457c9e826d559d
parent78f22559b06aa4a3ea0a608995c8a0a6dc1e5477
tty: serial: lpuart: disable flow control while waiting for the transmit engine to complete

commit cfe8a009db0fc153345332bc321871ef7a6d4e7b upstream.

When the user initializes the uart port, and waits for the transmit
engine to complete in lpuart32_set_termios(), if the UART TX fifo has
dirty data and the UARTMODIR enable the flow control, the TX fifo may
never be empty. So here we should disable the flow control first to make
sure the transmit engin can complete.

Fixes: ecdab422d769 ("tty: serial: fsl_lpuart: add 32-bit register interface support")
Cc: stable <stable@kernel.org>
Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Link: https://lore.kernel.org/r/20220821101527.10066-1-sherry.sun@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/fsl_lpuart.c