Skip to contentSkip to conversation

scsi: ufs-mediatek: Fix HWReset timing

PATCH New Alice 1 participant 2 messages May 27, 2021 SCSI

lore
Share & tools
lore

Alice

author
#0 lore raw

PATCH 1/1 scsi: ufs-mediatek: Fix HWReset timing

From: "Alice.Chao" <[email protected]>

HCI disable before HW Reset.
Because of the property of mtk ufshci,
we need to change reset flow to avoid potential issues.

---
 drivers/scsi/ufs/ufs-mediatek.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/scsi/ufs/ufs-mediatek.c +3 -0
index a981f261b304..c62603ed3d33 100644
@@ -846,6 +846,9 @@ static int ufs_mtk_device_reset(struct ufs_hba *hba)
 {
 	struct arm_smccc_res res;
 
+	/* disable hba before device reset */
+	ufshcd_hba_stop(hba);
+
 	ufs_mtk_device_reset_ctrl(0, res);
 
 	/*
Signature · 1 line
2.18.0
author
#1 lore raw

PATCH 1/1 scsi: ufs-mediatek: Fix HWReset timing

From: "Alice.Chao" <[email protected]>

HCI disable before HW Reset.
Because of the property of mtk ufshci,
we need to change reset flow to avoid potential issues.

Change-Id I3eb917fd2953b58dcf7e021286d1de71c9232cfb

CR-Id: ALPS05728133
Feature: UFS(Universal Flash Storage)

---
 drivers/scsi/ufs/ufs-mediatek.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/scsi/ufs/ufs-mediatek.c +3 -0
index a981f261b304..c62603ed3d33 100644
@@ -846,6 +846,9 @@ static int ufs_mtk_device_reset(struct ufs_hba *hba)
 {
 	struct arm_smccc_res res;
 
+	/* disable hba before device reset */
+	ufshcd_hba_stop(hba);
+
 	ufs_mtk_device_reset_ctrl(0, res);
 
 	/*
Signature · 1 line
2.18.0