From: Bart Van Assche <bvanassche@acm.org>
To: Po-Wen Kao <powen.kao@mediatek.com>,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org,
Alim Akhtar <alim.akhtar@samsung.com>,
Avri Altman <avri.altman@wdc.com>,
"James E.J. Bottomley" <jejb@linux.ibm.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
Matthias Brugger <matthias.bgg@gmail.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>
Cc: wsd_upstream@mediatek.com, peter.wang@mediatek.com,
stanley.chu@mediatek.com, alice.chao@mediatek.com,
naomi.chu@mediatek.com, chun-hung.wu@mediatek.com,
cc.chou@mediatek.com, eddie.huang@mediatek.com,
mason.zhang@mediatek.com, chaotian.jing@mediatek.com,
jiajie.hao@mediatek.com
Subject: Re: [PATCH 1/2] scsi: ufs: core: Add host quirk UFSHCD_QUIRK_MCQ_BROKEN_INTR
Date: Tue, 28 Mar 2023 20:07:27 -0700 [thread overview]
Message-ID: <b66e0433-040d-34b8-05f1-a6741861c684@acm.org> (raw)
In-Reply-To: <20230328103801.11198-1-powen.kao@mediatek.com>
On 3/28/23 03:37, Po-Wen Kao wrote:
> diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
> index acae4e194ec4..1e1271aca1f2 100644
> --- a/drivers/ufs/core/ufshcd.c
> +++ b/drivers/ufs/core/ufshcd.c
> @@ -8493,11 +8493,15 @@ static int ufshcd_alloc_mcq(struct ufs_hba *hba)
> static void ufshcd_config_mcq(struct ufs_hba *hba)
> {
> int ret;
> -
> + u32 intrs;
> ret = ufshcd_mcq_vops_config_esi(hba);
> +
> dev_info(hba->dev, "ESI %sconfigured\n", ret ? "is not " : "");
The use of blank lines in the above code is weird. Please make sure
there is no blank line inside the declaration block and also that there
is a blank line between declarations and statements as required by the
kernel coding style.
> - ufshcd_enable_intr(hba, UFSHCD_ENABLE_MCQ_INTRS);
> + intrs = (hba->quirks & UFSHCD_QUIRK_MCQ_BROKEN_INTR) ?
> + (UFSHCD_ENABLE_MCQ_INTRS & ~MCQ_CQ_EVENT_STATUS) : UFSHCD_ENABLE_MCQ_INTRS;
All parentheses in the above expression are superfluous. Please leave
these out. Or even better, rewrite the above code as follows:
intrs = UFSHCD_ENABLE_MCQ_INTRS;
if (hba->quirks & UFSHCD_QUIRK_MCQ_BROKEN_INTR)
intrs &= ~MCQ_CQ_EVENT_STATUS;
> +
> + /*
> + * Some platform raises interrupt (per queue) in addition to
> + * CQES (traditional) when ESI is disabled.
> + * Enable this quirk will disable CQES and use per queue interrupt.
> + */
> + UFSHCD_QUIRK_MCQ_BROKEN_INTR = 1 << 20,
Isn't this an UFS controller behavior instead of a platform behavior?
Please consider changing "platform raises" into "controllers raise".
Thanks,
Bart.
prev parent reply other threads:[~2023-03-29 3:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-28 10:37 Po-Wen Kao
2023-03-28 10:37 ` [PATCH 2/2] scsi: ufs: ufs-mediatek: Add UFSHCD_QUIRK_MCQ_BROKEN_INTR quirk Po-Wen Kao
2023-03-29 1:32 ` Stanley Chu
2023-03-29 3:08 ` Bart Van Assche
2023-03-29 1:32 ` [PATCH 1/2] scsi: ufs: core: Add host quirk UFSHCD_QUIRK_MCQ_BROKEN_INTR Stanley Chu
2023-03-29 3:07 ` Bart Van Assche [this message]
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=b66e0433-040d-34b8-05f1-a6741861c684@acm.org \
--to=bvanassche@acm.org \
--cc=alice.chao@mediatek.com \
--cc=alim.akhtar@samsung.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=avri.altman@wdc.com \
--cc=cc.chou@mediatek.com \
--cc=chaotian.jing@mediatek.com \
--cc=chun-hung.wu@mediatek.com \
--cc=eddie.huang@mediatek.com \
--cc=jejb@linux.ibm.com \
--cc=jiajie.hao@mediatek.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=martin.petersen@oracle.com \
--cc=mason.zhang@mediatek.com \
--cc=matthias.bgg@gmail.com \
--cc=naomi.chu@mediatek.com \
--cc=peter.wang@mediatek.com \
--cc=powen.kao@mediatek.com \
--cc=stanley.chu@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
all inboxes | Powered by JetHome®