summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlice.Chao <alice.chao@mediatek.com>2021-05-28 05:36:22 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2021-06-02 06:56:14 +0200
commitf9c602f3bd9c79c06ccd7621744472a64e93fd49 (patch)
tree7eb015f28dd1cd68ce80bde38c28c72641c01173
parentscsi: ufs: core: Export ufshcd_hba_stop() (diff)
downloadlinux-f9c602f3bd9c79c06ccd7621744472a64e93fd49.tar.xz
linux-f9c602f3bd9c79c06ccd7621744472a64e93fd49.zip
scsi: ufs: ufs-mediatek: Disable HCI before HW reset
MediaTek ufshci needs to be disabled before HW reset to avoid potential issues. Link: https://lore.kernel.org/r/20210528033624.12170-3-alice.chao@mediatek.com Reviewed-by: Stanley Chu <stanley.chu@mediatek.com> Signed-off-by: Alice.Chao <alice.chao@mediatek.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-rw-r--r--drivers/scsi/ufs/ufs-mediatek.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/scsi/ufs/ufs-mediatek.c b/drivers/scsi/ufs/ufs-mediatek.c
index 9912e208c2a1..bbe0596afc9d 100644
--- a/drivers/scsi/ufs/ufs-mediatek.c
+++ b/drivers/scsi/ufs/ufs-mediatek.c
@@ -844,6 +844,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);
/*