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: <4efa0d56-7c36-2e4f-5597-fbade94231b1@quicinc.com>
Date:   Wed, 8 Nov 2023 15:47:53 +0800
From:   Can Guo <quic_cang@...cinc.com>
To:     Andrew Halaney <ahalaney@...hat.com>,
        Can Guo <cang@....qualcomm.com>
CC:     <bvanassche@....org>, <mani@...nel.org>,
        <stanley.chu@...iatek.com>, <adrian.hunter@...el.com>,
        <beanhuo@...ron.com>, <avri.altman@....com>,
        <junwoo80.lee@...sung.com>, <martin.petersen@...cle.com>,
        <linux-scsi@...r.kernel.org>,
        "Bao D . Nguyen" <quic_nguyenb@...cinc.com>,
        Andy Gross <agross@...nel.org>,
        Bjorn Andersson <andersson@...nel.org>,
        Konrad Dybcio <konrad.dybcio@...aro.org>,
        "James E.J. Bottomley" <jejb@...ux.ibm.com>,
        "open list:ARM/QUALCOMM SUPPORT" <linux-arm-msm@...r.kernel.org>,
        open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 2/7] scsi: ufs: ufs-qcom: Setup host power mode during
 init

Hi Andrew,

On 11/8/2023 4:14 AM, Andrew Halaney wrote:
> On Mon, Nov 06, 2023 at 08:46:08PM -0800, Can Guo wrote:
>> From: Can Guo <quic_cang@...cinc.com>
>>
>> Setup host power mode and its limitations during UFS host driver init to
>> avoid repetitive work during every power mode change.
>>
>> Co-developed-by: Bao D. Nguyen <quic_nguyenb@...cinc.com>
>> Signed-off-by: Bao D. Nguyen <quic_nguyenb@...cinc.com>
>> Signed-off-by: Can Guo <quic_cang@...cinc.com>
>> ---
>>   drivers/ufs/host/ufs-qcom.c | 22 ++++++++++++++--------
>>   drivers/ufs/host/ufs-qcom.h |  1 +
>>   2 files changed, 15 insertions(+), 8 deletions(-)
>>
>> diff --git a/drivers/ufs/host/ufs-qcom.c b/drivers/ufs/host/ufs-qcom.c
>> index aee66a3..cc0eb37 100644
>> --- a/drivers/ufs/host/ufs-qcom.c
>> +++ b/drivers/ufs/host/ufs-qcom.c
>> @@ -898,7 +898,7 @@ static int ufs_qcom_pwr_change_notify(struct ufs_hba *hba,
>>   				struct ufs_pa_layer_attr *dev_req_params)
>>   {
>>   	struct ufs_qcom_host *host = ufshcd_get_variant(hba);
>> -	struct ufs_host_params host_params;
>> +	struct ufs_host_params *host_params = &host->host_params;
>>   	int ret = 0;
>>   
>>   	if (!dev_req_params) {
>> @@ -908,13 +908,7 @@ static int ufs_qcom_pwr_change_notify(struct ufs_hba *hba,
>>   
>>   	switch (status) {
>>   	case PRE_CHANGE:
>> -		ufshcd_init_host_param(&host_params);
>> -		host_params.hs_rate = UFS_QCOM_LIMIT_HS_RATE;
> You drop the setting of hs_rate in your new function. It seems setting that's
> also overkill since UFS_QCOM_LIMIT_HS_RATE == PA_HS_MODE_B. hs_rate is
> already set to that in ufshcd_init_host_param(), so removing it makes
> sense.
>
> Can you remove it prior in its own patch, and remove the now unused
> UFS_QCOM_LIMIT_HS_RATE as well from ufs-qcom.h?

Sure, will address this in next version.

>
> With that in place this seems like a good improvement:
>
> Acked-by: Andrew Halaney <ahalaney@...hat.com>


Thanks,

Can Guo.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ