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] [day] [month] [year] [list]
Date:   Wed, 23 Oct 2019 09:47:13 -0700
From:   asutoshd@...eaurora.org
To:     cang@...eaurora.org, rnayak@...eaurora.org, vinholikatti@...il.com,
        jejb@...ux.vnet.ibm.com, martin.petersen@...cle.com
Cc:     linux-scsi@...r.kernel.org, kernel-team@...roid.com,
        saravanak@...gle.com, salyzyn@...gle.com,
        Andy Gross <agross@...nel.org>,
        Alim Akhtar <alim.akhtar@...sung.com>,
        Avri Altman <avri.altman@....com>,
        Pedro Sousa <pedrom.sousa@...opsys.com>,
        "James E.J. Bottomley" <jejb@...ux.ibm.com>,
        linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-scsi-owner@...r.kernel.org
Subject: Re: [PATCH v2 2/2] scsi: ufs-qcom: enter and exit hibern8 during
 clock scaling

On 2019-10-23 09:39, Asutosh Das wrote:
> Qualcomm controller needs to be in hibern8 before scaling clocks.
> This change puts the controller in hibern8 state before scaling
> and brings it out after scaling of clocks.
> 
> Signed-off-by: Asutosh Das <asutoshd@...eaurora.org>
> ---
>  drivers/scsi/ufs/ufs-qcom.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/scsi/ufs/ufs-qcom.c b/drivers/scsi/ufs/ufs-qcom.c
> index a5b7148..d117088 100644
> --- a/drivers/scsi/ufs/ufs-qcom.c
> +++ b/drivers/scsi/ufs/ufs-qcom.c
> @@ -1305,6 +1305,9 @@ static int ufs_qcom_clk_scale_notify(struct 
> ufs_hba *hba,
>  	int err = 0;
> 
>  	if (status == PRE_CHANGE) {
> +		err = ufshcd_uic_hibern8_enter(hba);
> +		if (err)
> +			return err;
>  		if (scale_up)
>  			err = ufs_qcom_clk_scale_up_pre_change(hba);
The error handling is not done here.

>  		else
> @@ -1324,6 +1327,7 @@ static int ufs_qcom_clk_scale_notify(struct 
> ufs_hba *hba,
>  				    dev_req_params->hs_rate,
>  				    false);
>  		ufs_qcom_update_bus_bw_vote(host);
> +		ufshcd_uic_hibern8_exit(hba);
>  	}
> 
>  out:

In the post-change condition as well, the error handling is not done.
On error, it should be brought out of hibernate.
I'll put up another change fixing that.

-asd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ