From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
To: Bart Van Assche <bvanassche@acm.org>
Cc: Alim Akhtar <alim.akhtar@samsung.com>,
Avri Altman <avri.altman@wdc.com>,
"James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-msm@vger.kernel.org,
Kyoungrul Kim <k831.kim@samsung.com>,
Amit Pundir <amit.pundir@linaro.org>
Subject: Re: [PATCH v2 1/3] ufs: core: Rename LSDB to LSDBS to reflect the UFSHCI 4.0 spec
Date: Fri, 16 Aug 2024 10:33:06 +0530 [thread overview]
Message-ID: <20240816050306.GB2331@thinkpad> (raw)
In-Reply-To: <f339f1be-4d5f-46f4-8d57-473f38901bd8@acm.org>
On Thu, Aug 15, 2024 at 11:09:06AM -0700, Bart Van Assche wrote:
> On 8/14/24 10:16 PM, Manivannan Sadhasivam via B4 Relay wrote:
> > /*
> > * The UFSHCI 3.0 specification does not define MCQ_SUPPORT and
> > - * LSDB_SUPPORT, but [31:29] as reserved bits with reset value 0s, which
> > + * LSDBS_SUPPORT, but [31:29] as reserved bits with reset value 0s, which
> > * means we can simply read values regardless of version.
> > */
>
> Hmm ... neither MCQ_SUPPORT nor LSDBS_SUPPORT occurs in the UFSHCI 4.0
> specification. I found the acronyms "MCQS" and "LSDBS" in that
> specification. I propose either not to modify the above comment or to use
> the acronyms used in the UFSHCI 4.0 standard.
>
> > hba->mcq_sup = FIELD_GET(MASK_MCQ_SUPPORT, hba->capabilities);
> > @@ -2426,7 +2426,7 @@ static inline int ufshcd_hba_capabilities(struct ufs_hba *hba)
> > * 0h: legacy single doorbell support is available
> > * 1h: indicate that legacy single doorbell support has been removed
> > */
> > - hba->lsdb_sup = !FIELD_GET(MASK_LSDB_SUPPORT, hba->capabilities);
> > + hba->lsdbs_sup = !FIELD_GET(MASK_LSDBS_SUPPORT, hba->capabilities);
> > if (!hba->mcq_sup)
> > return 0;
>
> The final "s" in "lsdbs" stands for "support" so there are now two
> references to the word "support" in the "lsdbs_sup" member name. Isn't
> the original structure member name ("lsdb_sup") better because it doesn't
> have that redundancy?
>
> > MASK_CRYPTO_SUPPORT = 0x10000000,
> > - MASK_LSDB_SUPPORT = 0x20000000,
> > + MASK_LSDBS_SUPPORT = 0x20000000,
> > MASK_MCQ_SUPPORT = 0x40000000,
>
> Same comment here: in the constant name "MASK_LSDBS_SUPPORT" there are
> two references to the word "support". Isn't the original name better?
> Additionally, this change introduces an inconsistency between the
> constant names "MASK_LSDBS_SUPPORT" and "MASK_MCQ_SUPPORT". The former
> name includes the acronym from the spec (LSDBS) but the latter name not
> (MCQS). Wouldn't it be better to leave this change out?
>
Hmm, agree. My intention was to align with the spec, but then the _SUPPORT
suffix is screwing it up :/
I'll drop the patch then.
- Mani
--
மணிவண்ணன் சதாசிவம்
next prev parent reply other threads:[~2024-08-16 5:03 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-15 5:16 [PATCH v2 0/3] ufs: qcom: Fix probe failure on SM8550 SoC due to broken LSDBS field Manivannan Sadhasivam via B4 Relay
2024-08-15 5:16 ` [PATCH v2 1/3] ufs: core: Rename LSDB to LSDBS to reflect the UFSHCI 4.0 spec Manivannan Sadhasivam via B4 Relay
2024-08-15 18:09 ` Bart Van Assche
2024-08-16 5:03 ` Manivannan Sadhasivam [this message]
2024-08-15 5:16 ` [PATCH v2 2/3] ufs: core: Add a quirk for handling broken LSDBS field in controller capabilities register Manivannan Sadhasivam via B4 Relay
2024-08-15 18:12 ` Bart Van Assche
2024-08-16 5:35 ` Manivannan Sadhasivam
2024-08-15 18:25 ` Bart Van Assche
2024-08-16 5:24 ` Manivannan Sadhasivam
2024-08-15 5:16 ` [PATCH v2 3/3] ufs: qcom: Add UFSHCD_QUIRK_BROKEN_LSDBS_CAP for SM8550 SoC Manivannan Sadhasivam via B4 Relay
2024-08-15 18:01 ` Bart Van Assche
2024-08-16 5:28 ` Manivannan Sadhasivam
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=20240816050306.GB2331@thinkpad \
--to=manivannan.sadhasivam@linaro.org \
--cc=James.Bottomley@HansenPartnership.com \
--cc=alim.akhtar@samsung.com \
--cc=amit.pundir@linaro.org \
--cc=avri.altman@wdc.com \
--cc=bvanassche@acm.org \
--cc=k831.kim@samsung.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.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