Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Po-Wen Kao and committed by
Martin K. Petersen
4918694c f53f1913

+5
+5
drivers/ufs/host/ufs-mediatek.c
··· 1079 1079 { 1080 1080 int err; 1081 1081 1082 + /* Disable reset confirm feature by UniPro */ 1083 + ufshcd_writel(hba, 1084 + (ufshcd_readl(hba, REG_UFS_XOUFS_CTRL) & ~0x100), 1085 + REG_UFS_XOUFS_CTRL); 1086 + 1082 1087 err = ufs_mtk_unipro_set_lpm(hba, true); 1083 1088 if (err) { 1084 1089 /* Resume UniPro state for following error recovery */