summaryrefslogtreecommitdiff
path: root/drivers/ufs
diff options
context:
space:
mode:
authorPo-Wen Kao <powen.kao@mediatek.com>2022-06-23 06:50:49 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2022-06-28 06:17:36 +0300
commit4918694ccd6974f3ec8eeda3f34ace0ce480153e (patch)
tree45904f522038a4a3f883bb9c6c6ab85aef15af26 /drivers/ufs
parentf53f19135765780f93dd0c9506a138d1b27ffd0e (diff)
downloadlinux-4918694ccd6974f3ec8eeda3f34ace0ce480153e.tar.xz
scsi: ufs: ufs-mediatek: Disable reset confirm feature by UniPro
In MediaTek UFS platforms, UniPro will not return reset confirm if it is in POWERDOWN state thus hang issue may happen while disabling UFSHCI. Simply disable this feature before UniPro leaves POWERDOWN state. Link: https://lore.kernel.org/r/20220623035052.18802-6-stanley.chu@mediatek.com Reviewed-by: Stanley Chu <stanley.chu@mediatek.com> Reviewed-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Po-Wen Kao <powen.kao@mediatek.com> Signed-off-by: Stanley Chu <stanley.chu@mediatek.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/ufs')
-rw-r--r--drivers/ufs/host/ufs-mediatek.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/ufs/host/ufs-mediatek.c b/drivers/ufs/host/ufs-mediatek.c
index 0cc7d4faccec..a7482f530f27 100644
--- a/drivers/ufs/host/ufs-mediatek.c
+++ b/drivers/ufs/host/ufs-mediatek.c
@@ -1079,6 +1079,11 @@ static int ufs_mtk_link_set_lpm(struct ufs_hba *hba)
{
int err;
+ /* Disable reset confirm feature by UniPro */
+ ufshcd_writel(hba,
+ (ufshcd_readl(hba, REG_UFS_XOUFS_CTRL) & ~0x100),
+ REG_UFS_XOUFS_CTRL);
+
err = ufs_mtk_unipro_set_lpm(hba, true);
if (err) {
/* Resume UniPro state for following error recovery */