From: "Chun-Hung Wu (巫駿宏)" <Chun-hung.Wu@mediatek.com>
To: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
"avri.altman@wdc.com" <avri.altman@wdc.com>,
"alim.akhtar@samsung.com" <alim.akhtar@samsung.com>,
"Peter Wang (王信友)" <peter.wang@mediatek.com>,
"jejb@linux.ibm.com" <jejb@linux.ibm.com>,
"martin.petersen@oracle.com" <martin.petersen@oracle.com>
Cc: "linux-mediatek@lists.infradead.org"
<linux-mediatek@lists.infradead.org>,
"Jiajie Hao (郝加节)" <jiajie.hao@mediatek.com>,
"CC Chou (周志杰)" <cc.chou@mediatek.com>,
"Eddie Huang (黃智傑)" <eddie.huang@mediatek.com>,
"Alice Chao (趙珮均)" <Alice.Chao@mediatek.com>,
wsd_upstream <wsd_upstream@mediatek.com>,
"Lin Gui (桂林)" <Lin.Gui@mediatek.com>,
"Tun-yu Yu (游敦聿)" <Tun-yu.Yu@mediatek.com>,
"chu.stanley@gmail.com" <chu.stanley@gmail.com>,
"Chaotian Jing (井朝天)" <Chaotian.Jing@mediatek.com>,
"Powen Kao (高伯文)" <Powen.Kao@mediatek.com>,
"Naomi Chu (朱詠田)" <Naomi.Chu@mediatek.com>,
"Qilin Tan (谭麒麟)" <Qilin.Tan@mediatek.com>
Subject: Re: [PATCH v1 2/3] ufs: host: mediatek: fix mcq mode tm cmd timeout
Date: Mon, 25 Dec 2023 07:20:38 +0000 [thread overview]
Message-ID: <6a7ec616c48e45702750efbd62bb48ef946ce1bb.camel@mediatek.com> (raw)
In-Reply-To: <20231221110416.16176-3-peter.wang@mediatek.com>
On Thu, 2023-12-21 at 19:04 +0800, peter.wang@mediatek.com wrote:
> 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;
> }
>
Reviewed-by: Chun-Hung Wu <chun-hung.wu@mediatek.com>
Chun-Hung
next prev parent reply other threads:[~2023-12-25 7:20 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 ` [PATCH v1 2/3] ufs: host: mediatek: fix mcq mode tm cmd timeout peter.wang
2023-12-25 7:20 ` Chun-Hung Wu (巫駿宏) [this message]
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=6a7ec616c48e45702750efbd62bb48ef946ce1bb.camel@mediatek.com \
--to=chun-hung.wu@mediatek.com \
--cc=Alice.Chao@mediatek.com \
--cc=Chaotian.Jing@mediatek.com \
--cc=Lin.Gui@mediatek.com \
--cc=Naomi.Chu@mediatek.com \
--cc=Powen.Kao@mediatek.com \
--cc=Qilin.Tan@mediatek.com \
--cc=Tun-yu.Yu@mediatek.com \
--cc=alim.akhtar@samsung.com \
--cc=avri.altman@wdc.com \
--cc=cc.chou@mediatek.com \
--cc=chu.stanley@gmail.com \
--cc=eddie.huang@mediatek.com \
--cc=jejb@linux.ibm.com \
--cc=jiajie.hao@mediatek.com \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=peter.wang@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