From: "Chun-Hung Wu (巫駿宏)" <Chun-hung.Wu@mediatek.com>
To: "ebiggers@google.com" <ebiggers@google.com>,
"quic_nguyenb@quicinc.com" <quic_nguyenb@quicinc.com>,
"jejb@linux.ibm.com" <jejb@linux.ibm.com>,
"martin.petersen@oracle.com" <martin.petersen@oracle.com>,
"bvanassche@acm.org" <bvanassche@acm.org>,
"quic_asutoshd@quicinc.com" <quic_asutoshd@quicinc.com>,
"alim.akhtar@samsung.com" <alim.akhtar@samsung.com>,
"avri.altman@wdc.com" <avri.altman@wdc.com>,
"Arthur.Simchaev@wdc.com" <Arthur.Simchaev@wdc.com>,
"keosung.park@samsung.com" <keosung.park@samsung.com>,
"mani@kernel.org" <mani@kernel.org>,
"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
"quic_cang@quicinc.com" <quic_cang@quicinc.com>,
"angelogioacchino.delregno@collabora.com"
<angelogioacchino.delregno@collabora.com>,
"yang.lee@linux.alibaba.com" <yang.lee@linux.alibaba.com>
Cc: "Peter Wang (王信友)" <peter.wang@mediatek.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Jiajie Hao (郝加节)" <jiajie.hao@mediatek.com>,
"CC Chou (周志杰)" <cc.chou@mediatek.com>,
"linux-mediatek@lists.infradead.org"
<linux-mediatek@lists.infradead.org>,
"Alice Chao (趙珮均)" <Alice.Chao@mediatek.com>,
"Eddie Huang (黃智傑)" <eddie.huang@mediatek.com>,
wsd_upstream <wsd_upstream@mediatek.com>,
"Casper Li (李中榮)" <casper.li@mediatek.com>,
"Tun-yu Yu (游敦聿)" <Tun-yu.Yu@mediatek.com>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
"Lin Gui (桂林)" <Lin.Gui@mediatek.com>,
"Chaotian Jing (井朝天)" <Chaotian.Jing@mediatek.com>,
"Powen Kao (高伯文)" <Powen.Kao@mediatek.com>,
"Naomi Chu (朱詠田)" <Naomi.Chu@mediatek.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"Qilin Tan (谭麒麟)" <Qilin.Tan@mediatek.com>,
"kernel-team@android.com" <kernel-team@android.com>
Subject: Re: [PATCH v1 1/1] ufs: core: Add host quirk QUIRK_MCQ_EXPAND_QUEUE_SLOT
Date: Mon, 30 Oct 2023 06:19:31 +0000 [thread overview]
Message-ID: <bb1e65a60d16a5a3ffd665eb6b84fc91f9baae91.camel@mediatek.com> (raw)
In-Reply-To: <a16dc8ba-ca3b-4dd6-a8b5-dbb3ac7a49a5@acm.org>
On Fri, 2023-10-27 at 13:55 -0700, Bart Van Assche wrote:
>
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
> On 10/26/23 20:27, Chun-Hung Wu (巫駿宏) wrote:
> > From UFSHCI 4.0 spec "When the head and tail doorbells are equal,
> the
> > queue is empty. *Nothe that this definition means there will always
> be
> > one empty queue entry"
> > One of our platform does not keep one empty queue
> > entry for CQ full
> > case, that's why we need this patch to fix this corner case.
>
> The UFSHCI driver should make sure that there is always one empty
> queue
> entry. Does "platform" in the above text refer to the SoC that
> includes
> the UFSHCI controller?
Yes here "platform" indicates SoC that includes the UFSHCI controller.
>
> What is totally unclear to me is why the following code depends on
> the
> UFSHCI controller type:
>
> +if (ufshcd_is_mcq_expand_queue_slot(hba))
> +hwq->max_entries = hba->nutrs + 1;
> +else
> +hwq->max_entries = hba->nutrs;
>
> Shouldn't hwq->max_entries = hba->nutrs + 1 be used for all UFSHCI
> 4.0
> controllers?
>
> Thanks,
>
> Bart.
>
I think UFSHCI 4.0 spec "When the head and tail doorbells are equal,the
queue is empty. *Nothe that this definition means there will alwaysbe
one empty queue entry" means that "UFSHCI controller" should always
keep one empty queue entry.
One of our host does not follow the spec, therefore, this host will
treat CQ full(head = tail) as CQ empty (head = tail). That's why we
propose this quirk to expand one queue slot for hosts have such issue.
It will make CQ full(head != tail)[keep one empty queue entry] not
equal to CQ empty(head = tail).
hwq->max_entries will be used to set SQ&CQ size in SQ&CQ Configuration
Registers, we think it should only apply to specific hosts need this
quirk not all.
Thanks,
Chun-Hung
next prev parent reply other threads:[~2023-10-30 6:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-25 8:56 [PATCH v1 0/1] ufs: core: Add host quirk QUIRK_MCQ_EXPAND_QUEUE_SLOT Chun-Hung Wu
2023-10-25 8:56 ` [PATCH v1 1/1] " Chun-Hung Wu
2023-10-25 18:10 ` Bart Van Assche
2023-10-27 3:27 ` Chun-Hung Wu (巫駿宏)
2023-10-27 20:55 ` Bart Van Assche
2023-10-30 6:19 ` Chun-Hung Wu (巫駿宏) [this message]
2023-10-25 11:36 ` [PATCH v1 0/1] " Avri Altman
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=bb1e65a60d16a5a3ffd665eb6b84fc91f9baae91.camel@mediatek.com \
--to=chun-hung.wu@mediatek.com \
--cc=Alice.Chao@mediatek.com \
--cc=Arthur.Simchaev@wdc.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=angelogioacchino.delregno@collabora.com \
--cc=avri.altman@wdc.com \
--cc=bvanassche@acm.org \
--cc=casper.li@mediatek.com \
--cc=cc.chou@mediatek.com \
--cc=ebiggers@google.com \
--cc=eddie.huang@mediatek.com \
--cc=jejb@linux.ibm.com \
--cc=jiajie.hao@mediatek.com \
--cc=keosung.park@samsung.com \
--cc=kernel-team@android.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-scsi@vger.kernel.org \
--cc=mani@kernel.org \
--cc=martin.petersen@oracle.com \
--cc=matthias.bgg@gmail.com \
--cc=peter.wang@mediatek.com \
--cc=quic_asutoshd@quicinc.com \
--cc=quic_cang@quicinc.com \
--cc=quic_nguyenb@quicinc.com \
--cc=wsd_upstream@mediatek.com \
--cc=yang.lee@linux.alibaba.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