tty: serial: lpuart: disable flow control when wait transmit engine complete
PATCH 1/1 tty: serial: lpuart: disable flow control when wait transmit engine complete
When TX fifo has dirty data, user initialize the port and wait transmit engine complete, it should disable the flow control, otherwise tx fifo never be empty.
--- drivers/tty/serial/fsl_lpuart.c | 1 + 1 file changed, 1 insertion(+)
drivers/tty/serial/fsl_lpuart.c +1 -0
@@ -2172,6 +2172,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 */
Signature · 1 line
2.17.1
Jiri Slaby
maintainerQuoted 3 lines · Sherry Sun
When TX fifo has dirty data, user initialize the port and wait transmit engine complete, it should disable the flow control, otherwise tx fifo never be empty.
Sorry I cannot parse the above. Care to rephrase? (And maybe spellcheck?)
Quoted 10 lines
Signed-off-by Sherry Sun <[email protected]>--- drivers/tty/serial/fsl_lpuart.c | 1 + 1 file changed, 1 insertion(+)drivers/tty/serial/fsl_lpuart.c +0
-0
drivers/tty/serial/fsl_lpuart.c lpuart32_set_termios(struct uart_port *port, struct ktermios *termios, · line 2178
Quoted 7 lines
drivers/tty/serial/fsl_lpuart.c +1
-0@@ -2172,6 +2172,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 */
thanks,
Signature · 2 lines
js suse labs
Quoted 7 lines · Sherry Sun
Quoted 3 lines
When TX fifo has dirty data, user initialize the port and wait transmit engine complete, it should disable the flow control, otherwise tx fifo never be empty.
Sorry I cannot parse the above. Care to rephrase? (And maybe spellcheck?)
Hi Jiri, sure, maybe some grammatical errors in the commit log, I can send V2 for your check. Thanks!
Best regards
Sherry
Quoted 25 lines
drivers/tty/serial/fsl_lpuart.c lpuart32_set_termios(struct uart_port *port,
Quoted 12 lines
Signed-off-by Sherry Sun <[email protected]>--- drivers/tty/serial/fsl_lpuart.c | 1 + 1 file changed, 1 insertion(+)(quoted diff) +0
-0
b/drivers/tty/serial/fsl_lpuart.cindexfc7d235a1e27..f0fccd2ff7ac100644drivers/tty/serial/fsl_lpuart.c +0
-0@@ -2172,6 +2172,7 @@ lpuart32_set_termios(struct uart_port *port,struct ktermios *termios,
drivers/tty/serial/fsl_lpuart.c lpuart32_set_termios(struct uart_port *port, struct ktermios *termios, · line 2178
Quoted 7 lines
drivers/tty/serial/fsl_lpuart.c +1
-0uart_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 */ thanks,
--
js
suse labs