lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AS8PR04MB8404EB2F6EDA79EB7A2BF4F292689@AS8PR04MB8404.eurprd04.prod.outlook.com>
Date:   Mon, 15 Aug 2022 08:04:09 +0000
From:   Sherry Sun <sherry.sun@....com>
To:     "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
        "jirislaby@...nel.org" <jirislaby@...nel.org>
CC:     "linux-serial@...r.kernel.org" <linux-serial@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        dl-linux-imx <linux-imx@....com>
Subject: RE: [PATCH V2] tty: serial: lpuart: disable flow control while
 waiting for the transmit engine to complete

Gentle ping...

Best regards
Sherry

> -----Original Message-----
> From: Sherry Sun
> Sent: 2022年8月4日 15:06
> To: gregkh@...uxfoundation.org; jirislaby@...nel.org
> Cc: linux-serial@...r.kernel.org; linux-kernel@...r.kernel.org; dl-linux-imx
> <linux-imx@....com>
> Subject: [PATCH V2] 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.
> 
> Signed-off-by: Sherry Sun <sherry.sun@....com>
> ---
> Changes in V2:
> 1. Rephrase the commit log as suggested by Jiri.
> ---
>  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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ