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: <da77b6f8-a511-4e3d-ba59-ca4c41415312@quicinc.com>
Date:   Wed, 16 Nov 2022 15:25:26 +0530
From:   Sibi Sankar <quic_sibis@...cinc.com>
To:     Luca Weiss <luca.weiss@...rphone.com>,
        <linux-arm-msm@...r.kernel.org>
CC:     <~postmarketos/upstreaming@...ts.sr.ht>,
        <phone-devel@...r.kernel.org>, Andy Gross <agross@...nel.org>,
        Bjorn Andersson <andersson@...nel.org>,
        Konrad Dybcio <konrad.dybcio@...ainline.org>,
        Mathieu Poirier <mathieu.poirier@...aro.org>,
        Siddharth Gupta <sidgup@...eaurora.org>,
        Rishabh Bhatnagar <rishabhb@...eaurora.org>,
        <linux-remoteproc@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/2] remoteproc: qcom_q6v5_pas: disable wakeup on probe
 fail or remove

Hey Luca,

Thanks for the patch.

On 11/11/22 17:24, Luca Weiss wrote:
> Leaving wakeup enabled during probe fail (-EPROBE_DEFER) or remove makes
> the subsequent probe fail.
> 
> [    3.749454] remoteproc remoteproc0: releasing 3000000.remoteproc
> [    3.752949] qcom_q6v5_pas: probe of 3000000.remoteproc failed with error -17
> [    3.878935] remoteproc remoteproc0: releasing 4080000.remoteproc
> [    3.887602] qcom_q6v5_pas: probe of 4080000.remoteproc failed with error -17
> [    4.319552] remoteproc remoteproc0: releasing 8300000.remoteproc
> [    4.332716] qcom_q6v5_pas: probe of 8300000.remoteproc failed with error -17
> 
> Fix this by disabling wakeup in both cases so the driver can properly
> probe on the next try.
> 
> Fixes: a781e5aa5911 ("remoteproc: core: Prevent system suspend during remoteproc recovery")
> Fixes: dc86c129b4fb ("remoteproc: qcom: pas: Mark devices as wakeup capable")
> Signed-off-by: Luca Weiss <luca.weiss@...rphone.com>
> ---
>   drivers/remoteproc/qcom_q6v5_pas.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c
> index 6afd0941e552..d830bf13c32c 100644
> --- a/drivers/remoteproc/qcom_q6v5_pas.c
> +++ b/drivers/remoteproc/qcom_q6v5_pas.c
> @@ -557,6 +557,7 @@ static int adsp_probe(struct platform_device *pdev)
>   	adsp_pds_detach(adsp, adsp->proxy_pds, adsp->proxy_pd_count);
>   free_rproc:
>   	rproc_free(rproc);
> +	device_init_wakeup(adsp->dev, false);

You would want to do ^^ before rproc free since adsp is a
private data of rproc struct.

>   
>   	return ret;
>   }
> @@ -573,6 +574,7 @@ static int adsp_remove(struct platform_device *pdev)
>   	qcom_remove_smd_subdev(adsp->rproc, &adsp->smd_subdev);
>   	qcom_remove_ssr_subdev(adsp->rproc, &adsp->ssr_subdev);
>   	rproc_free(adsp->rproc);
> +	device_init_wakeup(adsp->dev, false);

ditto.

>   
>   	return 0;
>   }

- Sibi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ