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: <85d7a1ef-92c4-49ae-afe0-727c1b446f55@quicinc.com>
Date:   Wed, 22 Nov 2023 14:14:57 +0800
From:   Can Guo <quic_cang@...cinc.com>
To:     Manivannan Sadhasivam <mani@...nel.org>,
        Ziqi Chen <quic_ziqichen@...cinc.com>
CC:     <quic_asutoshd@...cinc.com>, <bvanassche@....org>,
        <beanhuo@...ron.com>, <avri.altman@....com>,
        <junwoo80.lee@...sung.com>, <martin.petersen@...cle.com>,
        <quic_nguyenb@...cinc.com>, <quic_nitirawa@...cinc.com>,
        <quic_rampraka@...cinc.com>, <linux-scsi@...r.kernel.org>,
        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] scsi: ufs: qcom: move ufs_qcom_host_reset() to
 ufs_qcom_device_reset()



On 10/25/2023 3:41 PM, Manivannan Sadhasivam wrote:
> On Tue, Oct 24, 2023 at 07:10:15PM +0800, Ziqi Chen wrote:
>> During PISI test, we found the issue that host Tx still bursting after
> 
> What is PISI test?
> 
>> H/W reset. Move ufs_qcom_host_reset() to ufs_qcom_device_reset() and
>> reset host before device reset to stop tx burst.
>>
> 
> device_reset() callback is supposed to reset only the device and not the host.
> So NACK for this patch.

Agree, the change should come in a more reasonable way.

Actually, similar code is already there in ufs_mtk_device_reset() in 
ufs-mediatek.c, I guess here is trying to mimic that fashion.

This change, from its functionality point of view, we do need it, 
because I occasionally (2 out of 10) hit PHY error on lane 0 during 
reboot test (in my case, I tried SM8350, SM8450 and SM8550, all same).

[    1.911188] [DEBUG]ufshcd_update_uic_error: UECPA:0x80000002
[    1.922843] [DEBUG]ufshcd_update_uic_error: UECDL:0x80004000
[    1.934473] [DEBUG]ufshcd_update_uic_error: UECN:0x0
[    1.944688] [DEBUG]ufshcd_update_uic_error: UECT:0x0
[    1.954901] [DEBUG]ufshcd_update_uic_error: UECDME:0x0

I found out that the PHY error pops out right after UFS device gets 
reset in the 2nd init. After having this change in place, the PA/DL 
errors are gone.

Thanks,
Can Guo.
> 
> - Mani
> 
>> Signed-off-by: Ziqi Chen <quic_ziqichen@...cinc.com>
>> ---
>>   drivers/ufs/host/ufs-qcom.c | 13 +++++++------
>>   1 file changed, 7 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/ufs/host/ufs-qcom.c b/drivers/ufs/host/ufs-qcom.c
>> index 96cb8b5..43163d3 100644
>> --- a/drivers/ufs/host/ufs-qcom.c
>> +++ b/drivers/ufs/host/ufs-qcom.c
>> @@ -445,12 +445,6 @@ static int ufs_qcom_power_up_sequence(struct ufs_hba *hba)
>>   	struct phy *phy = host->generic_phy;
>>   	int ret;
>>   
>> -	/* Reset UFS Host Controller and PHY */
>> -	ret = ufs_qcom_host_reset(hba);
>> -	if (ret)
>> -		dev_warn(hba->dev, "%s: host reset returned %d\n",
>> -				  __func__, ret);
>> -
>>   	/* phy initialization - calibrate the phy */
>>   	ret = phy_init(phy);
>>   	if (ret) {
>> @@ -1709,6 +1703,13 @@ static void ufs_qcom_dump_dbg_regs(struct ufs_hba *hba)
>>   static int ufs_qcom_device_reset(struct ufs_hba *hba)
>>   {
>>   	struct ufs_qcom_host *host = ufshcd_get_variant(hba);
>> +	int ret = 0;
>> +
>> +	/* Reset UFS Host Controller and PHY */
>> +	ret = ufs_qcom_host_reset(hba);
>> +	if (ret)
>> +		dev_warn(hba->dev, "%s: host reset returned %d\n",
>> +				  __func__, ret);
>>   
>>   	/* reset gpio is optional */
>>   	if (!host->device_reset)
>> -- 
>> 2.7.4
>>
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ