[PATCH v2 5/8] scsi: ufs-mediatek: Disable reset confirm feature by UniPro

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Po-Wen Kao <powen.kao@xxxxxxxxxxxx>

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.

Reviewed-by: Stanley Chu <stanley.chu@xxxxxxxxxxxx>
Signed-off-by: Po-Wen Kao <powen.kao@xxxxxxxxxxxx>
Signed-off-by: Stanley Chu <stanley.chu@xxxxxxxxxxxx>
---
 drivers/ufs/host/ufs-mediatek.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/ufs/host/ufs-mediatek.c b/drivers/ufs/host/ufs-mediatek.c
index 8184e871ff8e..348966dbad78 100755
--- 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 */
-- 
2.18.0




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux