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, 30 May 2023 08:06:31 -0700
From:   Bjorn Andersson <andersson@...nel.org>
To:     Mehul Raninga <quic_mraninga@...cinc.com>
Cc:     agross@...nel.org, konrad.dybcio@...aro.org,
        gregkh@...uxfoundation.org, jirislaby@...nel.org,
        linux-arm-msm@...r.kernel.org, linux-serial@...r.kernel.org,
        linux-kernel@...r.kernel.org, quic_vdadhani@...cinc.com,
        quic_vtanuku@...cinc.com, quic_vnivarth@...cinc.com
Subject: Re: [PATCH] serial: qcom_geni_serial: Setup serial port after Deep
 sleep

On Tue, May 30, 2023 at 04:45:57PM +0530, Mehul Raninga wrote:
> While exiting deep sleep, serial port loses its configuration
> hence it prints garbage characters on console.

Presumably it lost its configuration sometime after suspend, rather than
while resuming the system?

> 
> Set serial port configuration while resume from deep sleep.
> 

What happens if you do this unconditionally?

> Signed-off-by: Mehul Raninga <quic_mraninga@...cinc.com>
> ---
>  drivers/tty/serial/qcom_geni_serial.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qcom_geni_serial.c
> index 8582479f0211..c04b8fec30ba 100644
> --- a/drivers/tty/serial/qcom_geni_serial.c
> +++ b/drivers/tty/serial/qcom_geni_serial.c
> @@ -20,6 +20,7 @@
>  #include <linux/serial.h>
>  #include <linux/serial_core.h>
>  #include <linux/slab.h>
> +#include <linux/suspend.h>
>  #include <linux/tty.h>
>  #include <linux/tty_flip.h>
>  #include <dt-bindings/interconnect/qcom,icc.h>
> @@ -1737,6 +1738,8 @@ static int qcom_geni_serial_sys_resume(struct device *dev)
>  	if (uart_console(uport)) {
>  		geni_icc_set_tag(&port->se, QCOM_ICC_TAG_ALWAYS);
>  		geni_icc_set_bw(&port->se);
> +		if (pm_suspend_via_firmware())

I'm not familiar with this api, but aren't all our systems implementing
firmware-assisted suspend?

Regards,
Bjorn

> +			qcom_geni_serial_port_setup(uport);
>  	}
>  	return ret;
>  }
> -- 
> 2.17.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ