[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1698145815-17396-1-git-send-email-quic_ziqichen@quicinc.com>
Date: Tue, 24 Oct 2023 19:10:15 +0800
From: Ziqi Chen <quic_ziqichen@...cinc.com>
To: quic_asutoshd@...cinc.com, quic_cang@...cinc.com,
bvanassche@....org, mani@...nel.org, beanhuo@...ron.com,
avri.altman@....com, junwoo80.lee@...sung.com,
martin.petersen@...cle.com, quic_ziqichen@...cinc.com,
quic_nguyenb@...cinc.com, quic_nitirawa@...cinc.com,
quic_rampraka@...cinc.com
Cc: 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>,
linux-arm-msm@...r.kernel.org (open list:ARM/QUALCOMM SUPPORT),
linux-kernel@...r.kernel.org (open list)
Subject: [PATCH] scsi: ufs: qcom: move ufs_qcom_host_reset() to ufs_qcom_device_reset()
During PISI test, we found the issue that host Tx still bursting after
H/W reset. Move ufs_qcom_host_reset() to ufs_qcom_device_reset() and
reset host before device reset to stop tx burst.
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