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]
Date:   Tue, 23 Nov 2021 08:42:19 +0100
From:   Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
To:     Sherry Sun <sherry.sun@....com>
Cc:     gregkh@...uxfoundation.org, jirislaby@...nel.org,
        linux-serial@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-imx@....com
Subject: Re: [PATCH] tty: serial: imx: clear RTSD status before suspend

On Tue, Nov 23, 2021 at 03:03:49PM +0800, Sherry Sun wrote:
> From: Fugang Duan <fugang.duan@....com>
> 
> Clear RTSD status before suspend due to the port also
> use RTS pin as wakeup source, need to clear the flag first.

I'd write:

	Clear RTSD status before enabling the irq event for RTSD.

That this happens in the context of suspend isn't that important.

> Signed-off-by: Fugang Duan <fugang.duan@....com>
> Signed-off-by: Sherry Sun <sherry.sun@....com>
> ---
>  drivers/tty/serial/imx.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
> index 90f82e6c54e4..fb75e3e0d828 100644
> --- a/drivers/tty/serial/imx.c
> +++ b/drivers/tty/serial/imx.c
> @@ -2482,10 +2482,12 @@ static void imx_uart_enable_wakeup(struct imx_port *sport, bool on)
>  
>  	if (sport->have_rtscts) {
>  		u32 ucr1 = imx_uart_readl(sport, UCR1);
> -		if (on)
> +		if (on) {
> +			imx_uart_writel(sport, USR1_RTSD, USR1);
>  			ucr1 |= UCR1_RTSDEN;
> -		else
> +		} else {
>  			ucr1 &= ~UCR1_RTSDEN;
> +		}
>  		imx_uart_writel(sport, ucr1, UCR1);
>  	}

The change looks fine.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ