Commit 468b3e0a authored by Peter Wang's avatar Peter Wang Committed by Martin K. Petersen

scsi: ufs: ufs-mediatek: Fix MCQ mode TM cmd timeout

Fix TM cmd timeout issue in MCQ mode using the default resume call
ufshcd_make_hba_operational() to set TM cmd DMA address.

This flow is the same as UFS initialization after link startup and then
setting MCQ related registers if using MCQ mode.
Signed-off-by: default avatarPeter Wang <peter.wang@mediatek.com>
Link: https://lore.kernel.org/r/20231221110416.16176-3-peter.wang@mediatek.comReviewed-by: default avatarChun-Hung Wu <chun-hung.wu@mediatek.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 29b3a373
......@@ -1201,9 +1201,11 @@ static int ufs_mtk_link_set_hpm(struct ufs_hba *hba)
}
ufshcd_set_link_active(hba);
if (!hba->mcq_enabled) {
err = ufshcd_make_hba_operational(hba);
} else {
err = ufshcd_make_hba_operational(hba);
if (err)
return err;
if (is_mcq_enabled(hba)) {
ufs_mtk_config_mcq(hba, false);
ufshcd_mcq_make_queues_operational(hba);
ufshcd_mcq_config_mac(hba, hba->nutrs);
......@@ -1212,9 +1214,6 @@ static int ufs_mtk_link_set_hpm(struct ufs_hba *hba)
REG_UFS_MEM_CFG);
}
if (err)
return err;
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment