Skip to content

Commit 28abed6

Browse files
Sebastian Andrzej SiewiorThomas Gleixner
authored andcommitted
Bluetooth: btintel_pcie: Use IRQF_ONESHOT and default primary handler
There is no added value in btintel_pcie_msix_isr() compared to irq_default_primary_handler(). Using a threaded interrupt without a dedicated primary handler mandates the IRQF_ONESHOT flag to mask the interrupt source while the threaded handler is active. Otherwise the interrupt can fire again before the threaded handler had a chance to run. Use the default primary interrupt handler by specifying NULL and set IRQF_ONESHOT so the interrupt source is masked until the secondary handler is done. Fixes: c2b636b ("Bluetooth: btintel_pcie: Add support for PCIe transport") Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@kernel.org> Link: https://patch.msgid.link/20260128095540.863589-7-bigeasy@linutronix.de
1 parent 29d4ff5 commit 28abed6

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

drivers/bluetooth/btintel_pcie.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1431,11 +1431,6 @@ static void btintel_pcie_msix_rx_handle(struct btintel_pcie_data *data)
14311431
}
14321432
}
14331433

1434-
static irqreturn_t btintel_pcie_msix_isr(int irq, void *data)
1435-
{
1436-
return IRQ_WAKE_THREAD;
1437-
}
1438-
14391434
static inline bool btintel_pcie_is_rxq_empty(struct btintel_pcie_data *data)
14401435
{
14411436
return data->ia.cr_hia[BTINTEL_PCIE_RXQ_NUM] == data->ia.cr_tia[BTINTEL_PCIE_RXQ_NUM];
@@ -1537,9 +1532,9 @@ static int btintel_pcie_setup_irq(struct btintel_pcie_data *data)
15371532

15381533
err = devm_request_threaded_irq(&data->pdev->dev,
15391534
msix_entry->vector,
1540-
btintel_pcie_msix_isr,
1535+
NULL,
15411536
btintel_pcie_irq_msix_handler,
1542-
IRQF_SHARED,
1537+
IRQF_ONESHOT | IRQF_SHARED,
15431538
KBUILD_MODNAME,
15441539
msix_entry);
15451540
if (err) {

0 commit comments

Comments
 (0)