public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scsi: ufs: qcom: move ufs_qcom_host_reset() to ufs_qcom_device_reset()
@ 2023-10-24 11:10 Ziqi Chen
  2023-10-25  7:41 ` Manivannan Sadhasivam
  0 siblings, 1 reply; 9+ messages in thread
From: Ziqi Chen @ 2023-10-24 11:10 UTC (permalink / raw)
  To: quic_asutoshd, quic_cang, bvanassche, mani, beanhuo, avri.altman,
	junwoo80.lee, martin.petersen, quic_ziqichen, quic_nguyenb,
	quic_nitirawa, quic_rampraka
  Cc: linux-scsi, Andy Gross, Bjorn Andersson, Konrad Dybcio,
	James E.J. Bottomley, open list:ARM/QUALCOMM SUPPORT, open list

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@quicinc.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


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-12-01 12:14 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-24 11:10 [PATCH] scsi: ufs: qcom: move ufs_qcom_host_reset() to ufs_qcom_device_reset() Ziqi Chen
2023-10-25  7:41 ` Manivannan Sadhasivam
2023-11-22  6:14   ` Can Guo
2023-11-27 19:40     ` Ziqi Chen
2023-11-28 11:27       ` Manivannan Sadhasivam
2023-11-29 12:10         ` Ziqi Chen
2023-12-01  5:18           ` Manivannan Sadhasivam
2023-12-01 12:13             ` Can Guo
2023-11-28 11:15     ` Manivannan Sadhasivam

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox