* [PATCH] scsi: ufs: Allows the driver to choose the interrupt handler type
@ 2026-07-10 6:59 Kui Sun
2026-07-10 11:29 ` André Draszik
2026-07-10 13:40 ` Bart Van Assche
0 siblings, 2 replies; 4+ messages in thread
From: Kui Sun @ 2026-07-10 6:59 UTC (permalink / raw)
To: Alim Akhtar, Avri Altman, Bart Van Assche,
James E . J . Bottomley, Martin K . Petersen
Cc: linux-scsi, linux-kernel, rain.zhang, yuelin.tang, wenchao.chen,
cixi.geng
This capability allows the host controller driver to choose whether
To register interrupts in a threaded manner or in a
Standard (non-threaded) manner
Signed-off-by: Kui Sun <kui.sun@unisoc.com>
---
drivers/ufs/core/ufshcd.c | 7 ++++++-
include/ufs/ufshcd.h | 7 +++++++
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
index d3044a3089b5..40fc6a60a4e7 100644
--- a/drivers/ufs/core/ufshcd.c
+++ b/drivers/ufs/core/ufshcd.c
@@ -11236,8 +11236,13 @@ int ufshcd_init(struct ufs_hba *hba, void __iomem *mmio_base, unsigned int irq)
ufshcd_readl(hba, REG_INTERRUPT_ENABLE);
/* IRQ registration */
- err = devm_request_threaded_irq(dev, irq, ufshcd_intr, ufshcd_threaded_intr,
+ if (hba->caps & UFSHCD_CAP_INTR_THREAD) {
+ err = devm_request_threaded_irq(dev, irq, ufshcd_intr, ufshcd_threaded_intr,
IRQF_ONESHOT | IRQF_SHARED, UFSHCD, hba);
+ } else {
+ err = devm_request_irq(dev, irq, ufshcd_threaded_intr, IRQF_SHARED, UFSHCD, hba);
+ }
+
if (err) {
dev_err(hba->dev, "request irq failed\n");
goto out_disable;
diff --git a/include/ufs/ufshcd.h b/include/ufs/ufshcd.h
index 248d0a5bef40..c1494a459b87 100644
--- a/include/ufs/ufshcd.h
+++ b/include/ufs/ufshcd.h
@@ -897,6 +897,13 @@ enum ufshcd_caps {
* specific operations and TX Equaliztion Training procedure.
*/
UFSHCD_CAP_TX_EQUALIZATION = 1 << 13,
+
+ /*
+ * This capability allows the host controller driver to choose whether
+ * to register interrupts in a threaded manner or in a standard
+ * (non-threaded) manner
+ */
+ UFSHCD_CAP_INTR_THREAD = 1 << 14,
};
struct ufs_hba_variant_params {
--
2.34.1
________________________________
This email (including its attachments) is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. Unauthorized use, dissemination, distribution or copying of this email or the information herein or taking any action in reliance on the contents of this email or the information herein, by anyone other than the intended recipient, or an employee or agent responsible for delivering the message to the intended recipient, is strictly prohibited. If you are not the intended recipient, please do not read, copy, use or disclose any part of this e-mail to others. Please notify the sender immediately and permanently delete this e-mail and any attachments if you received it in error. Internet communications cannot be guaranteed to be timely, secure, error-free or virus-free. The sender does not accept liability for any errors or omissions.
本邮件及其附件具有保密性质,受法律保护不得泄露,仅发送给本邮件所指特定收件人。严禁非经授权使用、宣传、发布或复制本邮件或其内容。若非该特定收件人,请勿阅读、复制、 使用或披露本邮件的任何内容。若误收本邮件,请从系统中永久性删除本邮件及所有附件,并以回复邮件的方式即刻告知发件人。无法保证互联网通信及时、安全、无误或防毒。发件人对任何错漏均不承担责任。
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi: ufs: Allows the driver to choose the interrupt handler type
2026-07-10 6:59 [PATCH] scsi: ufs: Allows the driver to choose the interrupt handler type Kui Sun
@ 2026-07-10 11:29 ` André Draszik
2026-07-10 12:45 ` André Draszik
2026-07-10 13:40 ` Bart Van Assche
1 sibling, 1 reply; 4+ messages in thread
From: André Draszik @ 2026-07-10 11:29 UTC (permalink / raw)
To: Kui Sun, Alim Akhtar, Avri Altman, Bart Van Assche,
James E . J . Bottomley, Martin K . Petersen
Cc: linux-scsi, linux-kernel, rain.zhang, yuelin.tang, wenchao.chen,
cixi.geng
Hi,
On Fri, 2026-07-10 at 14:59 +0800, Kui Sun wrote:
> This capability allows the host controller driver to choose whether
> To register interrupts in a threaded manner or in a
> Standard (non-threaded) manner
I believe it should at the least default to the original behaviour to
avoid the regression on pre-existing platforms out of the box without
taking additional steps, and make the threaded handling an opt-in until
a better solution is found for platforms that benefit from it without
adversely affecting other platforms.
Alternatively, I suggest to drop the threaded handler altogether (making it a
full revert).
For context:
https://lore.kernel.org/all/4enen7mopxtx4ijl5qyrd2gnxvv3kygtlnhxpr64egckpvkja4@hjli25ndhxwc/#t
and
https://lore.kernel.org/all/a4003ac352f382fa4ff329acdfa561eb06e77289.camel@linaro.org/
and related.
Cheers,
Andre'
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi: ufs: Allows the driver to choose the interrupt handler type
2026-07-10 11:29 ` André Draszik
@ 2026-07-10 12:45 ` André Draszik
0 siblings, 0 replies; 4+ messages in thread
From: André Draszik @ 2026-07-10 12:45 UTC (permalink / raw)
To: Kui Sun, Alim Akhtar, Avri Altman, Bart Van Assche,
James E . J . Bottomley, Martin K . Petersen
Cc: linux-scsi, linux-kernel, rain.zhang, yuelin.tang, wenchao.chen,
cixi.geng
On Fri, 2026-07-10 at 12:29 +0100, André Draszik wrote:
> Hi,
>
> On Fri, 2026-07-10 at 14:59 +0800, Kui Sun wrote:
> > This capability allows the host controller driver to choose whether
> > To register interrupts in a threaded manner or in a
> > Standard (non-threaded) manner
>
> I believe it should at the least default to the original behaviour to
> avoid the regression on pre-existing platforms out of the box without
> taking additional steps, and make the threaded handling an opt-in until
> a better solution is found for platforms that benefit from it without
> adversely affecting other platforms.
... as done here :-)
A.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi: ufs: Allows the driver to choose the interrupt handler type
2026-07-10 6:59 [PATCH] scsi: ufs: Allows the driver to choose the interrupt handler type Kui Sun
2026-07-10 11:29 ` André Draszik
@ 2026-07-10 13:40 ` Bart Van Assche
1 sibling, 0 replies; 4+ messages in thread
From: Bart Van Assche @ 2026-07-10 13:40 UTC (permalink / raw)
To: Kui Sun, Alim Akhtar, Avri Altman, James E . J . Bottomley,
Martin K . Petersen
Cc: linux-scsi, linux-kernel, rain.zhang, yuelin.tang, wenchao.chen,
cixi.geng, André Draszik
On 7/9/26 11:59 PM, Kui Sun wrote:
> This capability allows the host controller driver to choose whether
> To register interrupts in a threaded manner or in a
> Standard (non-threaded) manner
A patch description should not only explain what has been changed but
also why. Why do you want to make this change? Why do you want to change
the default behavior from threaded to not threaded?
Bart.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-07-10 13:40 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-10 6:59 [PATCH] scsi: ufs: Allows the driver to choose the interrupt handler type Kui Sun
2026-07-10 11:29 ` André Draszik
2026-07-10 12:45 ` André Draszik
2026-07-10 13:40 ` Bart Van Assche
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®