mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] tty: serial: lpuart: disable flow control when wait transmit engine complete
@ 2022-08-03  1:55 Sherry Sun
  2022-08-04  6:21 ` Jiri Slaby
  0 siblings, 1 reply; 3+ messages in thread
From: Sherry Sun @ 2022-08-03  1:55 UTC (permalink / raw)
  To: gregkh, jirislaby; +Cc: linux-serial, linux-kernel, linux-imx

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.

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
---
 drivers/tty/serial/fsl_lpuart.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c
index fc7d235a1e27..f0fccd2ff7ac 100644
--- a/drivers/tty/serial/fsl_lpuart.c
+++ b/drivers/tty/serial/fsl_lpuart.c
@@ -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 */
-- 
2.17.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] tty: serial: lpuart: disable flow control when wait transmit engine complete
  2022-08-03  1:55 [PATCH] tty: serial: lpuart: disable flow control when wait transmit engine complete Sherry Sun
@ 2022-08-04  6:21 ` Jiri Slaby
  2022-08-04  6:33   ` Sherry Sun
  0 siblings, 1 reply; 3+ messages in thread
From: Jiri Slaby @ 2022-08-04  6:21 UTC (permalink / raw)
  To: Sherry Sun, gregkh; +Cc: linux-serial, linux-kernel, linux-imx

On 03. 08. 22, 3:55, Sherry Sun wrote:
> 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?)

> Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
> ---
>   drivers/tty/serial/fsl_lpuart.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c
> index fc7d235a1e27..f0fccd2ff7ac 100644
> --- a/drivers/tty/serial/fsl_lpuart.c
> +++ b/drivers/tty/serial/fsl_lpuart.c
> @@ -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,
-- 
js
suse labs

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [PATCH] tty: serial: lpuart: disable flow control when wait transmit engine complete
  2022-08-04  6:21 ` Jiri Slaby
@ 2022-08-04  6:33   ` Sherry Sun
  0 siblings, 0 replies; 3+ messages in thread
From: Sherry Sun @ 2022-08-04  6:33 UTC (permalink / raw)
  To: Jiri Slaby, gregkh; +Cc: linux-serial, linux-kernel, dl-linux-imx


> On 03. 08. 22, 3:55, Sherry Sun wrote:
> > 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
> 
> > Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
> > ---
> >   drivers/tty/serial/fsl_lpuart.c | 1 +
> >   1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/tty/serial/fsl_lpuart.c
> > b/drivers/tty/serial/fsl_lpuart.c index fc7d235a1e27..f0fccd2ff7ac
> > 100644
> > --- a/drivers/tty/serial/fsl_lpuart.c
> > +++ b/drivers/tty/serial/fsl_lpuart.c
> > @@ -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,
> --
> js
> suse labs

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-08-04  6:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-03  1:55 [PATCH] tty: serial: lpuart: disable flow control when wait transmit engine complete Sherry Sun
2022-08-04  6:21 ` Jiri Slaby
2022-08-04  6:33   ` Sherry Sun

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®