FAILED: patch "[PATCH] tty: serial: lpuart: disable flow control while waiting for" failed to apply to 4.19-stable tree
Subsystems (2)
[email protected]
maintainerThe patch below does not apply to the 4.19-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From d5a2e0834364377a5d5a2fff1890a0b3f0bafd1f Mon Sep 17 00:00:00 2001
From: Sherry Sun <[email protected]>
Date: Sun, 21 Aug 2022 18:15:27 +0800
Subject: [PATCH] tty: serial: lpuart: disable flow control while waiting for
the transmit engine to complete
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.
drivers/tty/serial/fsl_lpuart.c +1 -0
@@ -2191,6 +2191,7 @@ lpuart32_set_termios(struct uart_port *port, struct ktermios *termios,uart_update_timeout (port, termios->c_cflag, baud);/* wait transmit engin complete */ +lpuart32_write (&sport->port,0 ,UARTMODIR );lpuart32_wait_bit_set (&sport->port,UARTSTAT ,UARTSTAT_TC );/* disable transmit and receive */