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: <87a60011-75da-f38c-07fe-105e97074f0c@codeaurora.org>
Date:   Mon, 20 Jan 2020 12:39:51 -0800
From:   "Asutosh Das (asd)" <asutoshd@...eaurora.org>
To:     Bean Huo <huobean@...il.com>, alim.akhtar@...sung.com,
        avri.altman@....com, jejb@...ux.ibm.com,
        martin.petersen@...cle.com, stanley.chu@...iatek.com,
        beanhuo@...ron.com, bvanassche@....org, tomas.winkler@...el.com,
        cang@...eaurora.org
Cc:     linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 4/8] scsi: ufs: Move ufshcd_get_max_pwr_mode() to
 ufshcd_device_params_init()

On 1/20/2020 5:08 AM, Bean Huo wrote:
> From: Bean Huo <beanhuo@...ron.com>
> 
> ufshcd_get_max_pwr_mode() only need to be called once while booting, take
> it out from ufshcd_probe_hba() and inline into ufshcd_device_params_init().
> 
> Reviewed-by: Stanley Chu <stanley.chu@...iatek.com>
> Signed-off-by: Bean Huo <beanhuo@...ron.com>
> ---

Reviewed-by: Asutosh Das <asutoshd@...eaurora.org>

>   drivers/scsi/ufs/ufshcd.c | 12 +++++++-----
>   1 file changed, 7 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
> index 935b50861864..5dfe760f2786 100644
> --- a/drivers/scsi/ufs/ufshcd.c
> +++ b/drivers/scsi/ufs/ufshcd.c
> @@ -6959,6 +6959,11 @@ static int ufshcd_device_params_init(struct ufs_hba *hba)
>   			QUERY_FLAG_IDN_PWR_ON_WPE, &flag))
>   		hba->dev_info.f_power_on_wp_en = flag;
>   
> +	/* Probe maximum power mode co-supported by both UFS host and device */
> +	if (ufshcd_get_max_pwr_mode(hba))
> +		dev_err(hba->dev,
> +			"%s: Failed getting max supported power mode\n",
> +			__func__);
>   out:
>   	return ret;
>   }
> @@ -7057,11 +7062,8 @@ static int ufshcd_probe_hba(struct ufs_hba *hba, bool async)
>   	ufshcd_force_reset_auto_bkops(hba);
>   	hba->wlun_dev_clr_ua = true;
>   
> -	if (ufshcd_get_max_pwr_mode(hba)) {
> -		dev_err(hba->dev,
> -			"%s: Failed getting max supported power mode\n",
> -			__func__);
> -	} else {
> +	/* Gear up to HS gear if supported */
> +	if (hba->max_pwr_info.is_valid) {
>   		/*
>   		 * Set the right value to bRefClkFreq before attempting to
>   		 * switch to HS gears.
> 


-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
Linux Foundation Collaborative Project

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ