mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
Bluetooth: btmtksdio: Prevent enabling interrupts after IRQ handler removal
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> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
parent
33634e2ab7
commit
6ac4233afb
1 changed files with 2 additions and 1 deletions
|
@ -610,7 +610,8 @@ static void btmtksdio_txrx_work(struct work_struct *work)
|
||||||
} while (int_status || time_is_before_jiffies(txrx_timeout));
|
} while (int_status || time_is_before_jiffies(txrx_timeout));
|
||||||
|
|
||||||
/* Enable interrupt */
|
/* 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);
|
sdio_release_host(bdev->func);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue