diff mbox series

[v2,2/2] scsi: ufs-mediatek: Disable HCI before HW reset

Message ID 20210528033624.12170-3-alice.chao@mediatek.com (mailing list archive)
State Accepted
Headers show
Series scsi: ufs-mediatek: Disable HCI before HW reset | expand

Commit Message

Alice Chao May 28, 2021, 3:36 a.m. UTC
From: "Alice.Chao" <alice.chao@mediatek.com>

MediaTek ufshci needs to be disabled before HW reset to avoid potential issues.

Signed-off-by: Alice.Chao <alice.chao@mediatek.com>
---
 drivers/scsi/ufs/ufs-mediatek.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/drivers/scsi/ufs/ufs-mediatek.c b/drivers/scsi/ufs/ufs-mediatek.c
index a981f261b304..c62603ed3d33 100644
--- a/drivers/scsi/ufs/ufs-mediatek.c
+++ b/drivers/scsi/ufs/ufs-mediatek.c
@@ -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);
 
 	/*