From: <peter.wang@mediatek.com>
To: <chun-hung.wu@mediatek.com>, <linux-scsi@vger.kernel.org>,
<martin.petersen@oracle.com>, <avri.altman@wdc.com>,
<alim.akhtar@samsung.com>, <jejb@linux.ibm.com>
Cc: <wsd_upstream@mediatek.com>, <linux-mediatek@lists.infradead.org>,
<peter.wang@mediatek.com>, <alice.chao@mediatek.com>,
<cc.chou@mediatek.com>, <chaotian.jing@mediatek.com>,
<jiajie.hao@mediatek.com>, <powen.kao@mediatek.com>,
<qilin.tan@mediatek.com>, <lin.gui@mediatek.com>,
<tun-yu.yu@mediatek.com>, <eddie.huang@mediatek.com>,
<naomi.chu@mediatek.com>, <chu.stanley@gmail.com>
Subject: [PATCH v1 2/3] ufs: host: mediatek: fix mcq mode tm cmd timeout
Date: Thu, 21 Dec 2023 19:04:15 +0800 [thread overview]
Message-ID: <20231221110416.16176-3-peter.wang@mediatek.com> (raw)
In-Reply-To: <20231221110416.16176-1-peter.wang@mediatek.com>
From: Peter Wang <peter.wang@mediatek.com>
Fix tm cmd timeout issue in mcq mode by default resume call
ufshcd_make_hba_operational to set tm cmd dma address.
This flow same as ufs init make operational after link startup then
set mcq related register if use mcq mode.
Signed-off-by: Peter Wang <peter.wang@mediatek.com>
---
drivers/ufs/host/ufs-mediatek.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/ufs/host/ufs-mediatek.c b/drivers/ufs/host/ufs-mediatek.c
index 104354a4d899..eb1934126c87 100644
--- a/drivers/ufs/host/ufs-mediatek.c
+++ b/drivers/ufs/host/ufs-mediatek.c
@@ -1220,9 +1220,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);
@@ -1231,9 +1233,6 @@ static int ufs_mtk_link_set_hpm(struct ufs_hba *hba)
REG_UFS_MEM_CFG);
}
- if (err)
- return err;
-
return 0;
}
--
2.18.0
next prev parent reply other threads:[~2023-12-21 11:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-21 11:04 [PATCH v1 0/3] ufs: host: mediatek: Provide fixes in MediaTek platforms peter.wang
2023-12-21 11:04 ` [PATCH v1 1/3] ufs: host: mediatek: check link status after exit hibern8 peter.wang
2023-12-25 7:20 ` Chun-Hung Wu (巫駿宏)
2023-12-21 11:04 ` peter.wang [this message]
2023-12-25 7:20 ` [PATCH v1 2/3] ufs: host: mediatek: fix mcq mode tm cmd timeout Chun-Hung Wu (巫駿宏)
2023-12-21 11:04 ` [PATCH v1 3/3] ufs: host: mediatek: disable mcq irq when clock off peter.wang
2023-12-25 7:22 ` Chun-Hung Wu (巫駿宏)
2024-01-24 2:06 ` [PATCH v1 0/3] ufs: host: mediatek: Provide fixes in MediaTek platforms Martin K. Petersen
2024-01-30 2:27 ` Martin K. Petersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231221110416.16176-3-peter.wang@mediatek.com \
--to=peter.wang@mediatek.com \
--cc=alice.chao@mediatek.com \
--cc=alim.akhtar@samsung.com \
--cc=avri.altman@wdc.com \
--cc=cc.chou@mediatek.com \
--cc=chaotian.jing@mediatek.com \
--cc=chu.stanley@gmail.com \
--cc=chun-hung.wu@mediatek.com \
--cc=eddie.huang@mediatek.com \
--cc=jejb@linux.ibm.com \
--cc=jiajie.hao@mediatek.com \
--cc=lin.gui@mediatek.com \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=naomi.chu@mediatek.com \
--cc=powen.kao@mediatek.com \
--cc=qilin.tan@mediatek.com \
--cc=tun-yu.yu@mediatek.com \
--cc=wsd_upstream@mediatek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox