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: <a8e12926-58e7-43c3-f4d1-a67b4bfbc1@linux.intel.com>
Date:   Thu, 13 Apr 2023 11:55:46 +0300 (EEST)
From:   Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
To:     Sherry Sun <sherry.sun@....com>
cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Jiri Slaby <jirislaby@...nel.org>,
        philippe.schenker@...adex.com,
        linux-serial <linux-serial@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>, linux-imx@....com
Subject: Re: [PATCH] tty: serial: fsl_lpuart: use UARTMODIR register bits
 for lpuart32 platform

On Thu, 13 Apr 2023, Sherry Sun wrote:

> For lpuart32 platforms, UARTMODIR register is used instead of UARTMODEM.
> So here should configure the corresponding UARTMODIR register bits.
> 
> Fixes: 67b01837861c ("tty: serial: lpuart: Add RS485 support for 32-bit uart flavour")

The patch is good but I don't think Fixes tag is warranted here because 
TXRTSPOL and TXRTSE bits are the same for both registers. ...So this 
is mostly to avoid reader confusion rather than fix an actual problem.

Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>

-- 
 i.

> Signed-off-by: Sherry Sun <sherry.sun@....com>
> ---
>  drivers/tty/serial/fsl_lpuart.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c
> index 074bfed57fc9..9845d3f5b84b 100644
> --- a/drivers/tty/serial/fsl_lpuart.c
> +++ b/drivers/tty/serial/fsl_lpuart.c
> @@ -1406,12 +1406,12 @@ static int lpuart32_config_rs485(struct uart_port *port, struct ktermios *termio
>  			struct lpuart_port, port);
>  
>  	unsigned long modem = lpuart32_read(&sport->port, UARTMODIR)
> -				& ~(UARTMODEM_TXRTSPOL | UARTMODEM_TXRTSE);
> +				& ~(UARTMODIR_TXRTSPOL | UARTMODIR_TXRTSE);
>  	lpuart32_write(&sport->port, modem, UARTMODIR);
>  
>  	if (rs485->flags & SER_RS485_ENABLED) {
>  		/* Enable auto RS-485 RTS mode */
> -		modem |= UARTMODEM_TXRTSE;
> +		modem |= UARTMODIR_TXRTSE;
>  
>  		/*
>  		 * The hardware defaults to RTS logic HIGH while transfer.
> @@ -1420,9 +1420,9 @@ static int lpuart32_config_rs485(struct uart_port *port, struct ktermios *termio
>  		 * Note: UART is assumed to be active high.
>  		 */
>  		if (rs485->flags & SER_RS485_RTS_ON_SEND)
> -			modem |= UARTMODEM_TXRTSPOL;
> +			modem |= UARTMODIR_TXRTSPOL;
>  		else if (rs485->flags & SER_RS485_RTS_AFTER_SEND)
> -			modem &= ~UARTMODEM_TXRTSPOL;
> +			modem &= ~UARTMODIR_TXRTSPOL;
>  	}
>  
>  	lpuart32_write(&sport->port, modem, UARTMODIR);
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ