FROMGIT: 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> (cherry picked from commit 4918694ccd6974f3ec8eeda3f34ace0ce480153e git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next) Bug: 239946304 Signed-off-by: Bart Van Assche <bvanassche@google.com> Change-Id: I071c730b557ca5daca39ecb8f314eb62cc21409d
This commit is contained in:
committed by
Treehugger Robot
parent
84b0ffaa5a
commit
b208eb5f34
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user