mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v1] bus: mhi: ep: Use IRQF_NO_AUTOEN flag in request_irq()
@ 2026-09-23 23:54 Yuho Choi
  2026-09-26 11:34 ` Manivannan Sadhasivam
  2026-09-26 11:38 ` Manivannan Sadhasivam
  0 siblings, 2 replies; 3+ messages in thread
From: Yuho Choi @ 2026-09-23 23:54 UTC (permalink / raw)
  To: Manivannan Sadhasivam
  Cc: Jeff Hugo, mhi, linux-arm-msm, linux-kernel, Yuho Choi

mhi_ep_register_controller() sets IRQ_NOAUTOEN on the doorbell IRQ
descriptor before request_irq(), and the flag is never cleared on the
error paths or in mhi_ep_unregister_controller(), so it stays on the
descriptor after the IRQ is freed.

Pass IRQF_NO_AUTOEN to request_irq() instead. It keeps the IRQ disabled
until mhi_ep_power_up() enables it, without leaving state behind on the
descriptor.

Signed-off-by: Yuho Choi <oss.patchbox@gmail.com>
---
Compile-tested only (x86_64 and arm64 defconfig + CONFIG_MHI_BUS_EP=m, W=1).

 drivers/bus/mhi/ep/main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/bus/mhi/ep/main.c b/drivers/bus/mhi/ep/main.c
index db7ee6547eef..da498570113a 100644
--- a/drivers/bus/mhi/ep/main.c
+++ b/drivers/bus/mhi/ep/main.c
@@ -1534,8 +1534,8 @@ int mhi_ep_register_controller(struct mhi_ep_cntrl *mhi_cntrl,
 
 	mhi_cntrl->index = ret;
 
-	irq_set_status_flags(mhi_cntrl->irq, IRQ_NOAUTOEN);
-	ret = request_irq(mhi_cntrl->irq, mhi_ep_irq, IRQF_TRIGGER_HIGH,
+	ret = request_irq(mhi_cntrl->irq, mhi_ep_irq,
+			  IRQF_TRIGGER_HIGH | IRQF_NO_AUTOEN,
 			  "doorbell_irq", mhi_cntrl);
 	if (ret) {
 		dev_err(mhi_cntrl->cntrl_dev, "Failed to request Doorbell IRQ\n");

base-commit: f0100363d8c374bd8e9ea7c9ba02744f0b802ca4
-- 
2.43.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v1] bus: mhi: ep: Use IRQF_NO_AUTOEN flag in request_irq()
  2026-09-23 23:54 [PATCH v1] bus: mhi: ep: Use IRQF_NO_AUTOEN flag in request_irq() Yuho Choi
@ 2026-09-26 11:34 ` Manivannan Sadhasivam
  2026-09-26 11:38 ` Manivannan Sadhasivam
  1 sibling, 0 replies; 3+ messages in thread
From: Manivannan Sadhasivam @ 2026-09-26 11:34 UTC (permalink / raw)
  To: Yuho Choi; +Cc: Jeff Hugo, mhi, linux-arm-msm, linux-kernel

On Wed, Sep 23, 2026 at 07:54:21PM -0400, Yuho Choi wrote:
> mhi_ep_register_controller() sets IRQ_NOAUTOEN on the doorbell IRQ
> descriptor before request_irq(), and the flag is never cleared on the
> error paths or in mhi_ep_unregister_controller(), so it stays on the
> descriptor after the IRQ is freed.
> 
> Pass IRQF_NO_AUTOEN to request_irq() instead. It keeps the IRQ disabled
> until mhi_ep_power_up() enables it, without leaving state behind on the
> descriptor.
> 
> Signed-off-by: Yuho Choi <oss.patchbox@gmail.com>

Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>

- Mani

-- 
மணிவண்ணன் சதாசிவம்

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v1] bus: mhi: ep: Use IRQF_NO_AUTOEN flag in request_irq()
  2026-09-23 23:54 [PATCH v1] bus: mhi: ep: Use IRQF_NO_AUTOEN flag in request_irq() Yuho Choi
  2026-09-26 11:34 ` Manivannan Sadhasivam
@ 2026-09-26 11:38 ` Manivannan Sadhasivam
  1 sibling, 0 replies; 3+ messages in thread
From: Manivannan Sadhasivam @ 2026-09-26 11:38 UTC (permalink / raw)
  To: Yuho Choi; +Cc: Jeff Hugo, mhi, linux-arm-msm, linux-kernel


On Wed, 23 Sep 2026 19:54:21 -0400, Yuho Choi wrote:
> mhi_ep_register_controller() sets IRQ_NOAUTOEN on the doorbell IRQ
> descriptor before request_irq(), and the flag is never cleared on the
> error paths or in mhi_ep_unregister_controller(), so it stays on the
> descriptor after the IRQ is freed.
> 
> Pass IRQF_NO_AUTOEN to request_irq() instead. It keeps the IRQ disabled
> until mhi_ep_power_up() enables it, without leaving state behind on the
> descriptor.
> 
> [...]

Applied, thanks!

[1/1] bus: mhi: ep: Use IRQF_NO_AUTOEN flag in request_irq()
      commit: 3ae2c076ed38afe76b4c223fbc2e87738a5b44dd

Best regards,
-- 
மணிவண்ணன் சதாசிவம்



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-09-26 11:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-23 23:54 [PATCH v1] bus: mhi: ep: Use IRQF_NO_AUTOEN flag in request_irq() Yuho Choi
2026-09-26 11:34 ` Manivannan Sadhasivam
2026-09-26 11:38 ` Manivannan Sadhasivam

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®