mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: btmtksdio: Prevent enabling interrupts after IRQ handler removal
@ 2025-03-12  1:25 sean.wang
  2025-03-20 19:00 ` patchwork-bot+bluetooth
  0 siblings, 1 reply; 2+ messages in thread
From: sean.wang @ 2025-03-12  1:25 UTC (permalink / raw)
  To: marcel, johan.hedberg, luiz.dentz
  Cc: linux-bluetooth, linux-mediatek, linux-kernel, Sean Wang,
	Pedro Tsai, Felix Freimann

From: Sean Wang <sean.wang@mediatek.com>

Ensure interrupts are not re-enabled when the IRQ handler has already been
removed. This prevents unexpected IRQ handler execution due to stale or
unhandled interrupts.

Modify btmtksdio_txrx_work to check if bdev->func->irq_handler exists
before calling sdio_writel to enable interrupts.

Co-developed-by: Pedro Tsai <pedro.tsai@mediatek.com>
Signed-off-by: Pedro Tsai <pedro.tsai@mediatek.com>
Co-developed-by: Felix Freimann <felix.freimann@mediatek.com>
Signed-off-by: Felix Freimann <felix.freimann@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
---
 drivers/bluetooth/btmtksdio.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/bluetooth/btmtksdio.c b/drivers/bluetooth/btmtksdio.c
index bd5464bde174..edd5eead1e93 100644
--- a/drivers/bluetooth/btmtksdio.c
+++ b/drivers/bluetooth/btmtksdio.c
@@ -610,7 +610,8 @@ static void btmtksdio_txrx_work(struct work_struct *work)
 	} while (int_status || time_is_before_jiffies(txrx_timeout));
 
 	/* Enable interrupt */
-	sdio_writel(bdev->func, C_INT_EN_SET, MTK_REG_CHLPCR, NULL);
+	if (bdev->func->irq_handler)
+		sdio_writel(bdev->func, C_INT_EN_SET, MTK_REG_CHLPCR, NULL);
 
 	sdio_release_host(bdev->func);
 
-- 
2.25.1


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

* Re: [PATCH] Bluetooth: btmtksdio: Prevent enabling interrupts after IRQ handler removal
  2025-03-12  1:25 [PATCH] Bluetooth: btmtksdio: Prevent enabling interrupts after IRQ handler removal sean.wang
@ 2025-03-20 19:00 ` patchwork-bot+bluetooth
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+bluetooth @ 2025-03-20 19:00 UTC (permalink / raw)
  To: Sean Wang
  Cc: marcel, johan.hedberg, luiz.dentz, linux-bluetooth,
	linux-mediatek, linux-kernel, sean.wang, pedro.tsai,
	felix.freimann

Hello:

This patch was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Tue, 11 Mar 2025 18:25:22 -0700 you wrote:
> From: Sean Wang <sean.wang@mediatek.com>
> 
> Ensure interrupts are not re-enabled when the IRQ handler has already been
> removed. This prevents unexpected IRQ handler execution due to stale or
> unhandled interrupts.
> 
> Modify btmtksdio_txrx_work to check if bdev->func->irq_handler exists
> before calling sdio_writel to enable interrupts.
> 
> [...]

Here is the summary with links:
  - Bluetooth: btmtksdio: Prevent enabling interrupts after IRQ handler removal
    https://git.kernel.org/bluetooth/bluetooth-next/c/01c13f057bb7

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2025-03-20 19:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-03-12  1:25 [PATCH] Bluetooth: btmtksdio: Prevent enabling interrupts after IRQ handler removal sean.wang
2025-03-20 19:00 ` patchwork-bot+bluetooth

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®