Skip to content

Commit 7427847

Browse files
vapierholtmann
authored andcommitted
Bluetooth: Redo checks in IRQ handler for shared IRQ support
Commit ac01936 changed the irq handler logic to BUG_ON rather than returning IRQ_NONE when the incoming argument is invalid. While this works in most cases, it doesn't work when the IRQ is shared with other devices (or when DEBUG_SHIRQ is enabled). So revert the previous change and replace the warning message with a comment explaining that we want this behavior. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
1 parent e420aba commit 7427847

4 files changed

Lines changed: 12 additions & 4 deletions

File tree

‎drivers/bluetooth/bluecard_cs.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,9 @@ static irqreturn_t bluecard_interrupt(int irq, void *dev_inst)
503503
unsigned int iobase;
504504
unsigned char reg;
505505

506-
BUG_ON(!info->hdev);
506+
if (!info || !info->hdev)
507+
/* our irq handler is shared */
508+
return IRQ_NONE;
507509

508510
if (!test_bit(CARD_READY, &(info->hw_state)))
509511
return IRQ_HANDLED;

‎drivers/bluetooth/bt3c_cs.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,9 @@ static irqreturn_t bt3c_interrupt(int irq, void *dev_inst)
345345
int iir;
346346
irqreturn_t r = IRQ_NONE;
347347

348-
BUG_ON(!info->hdev);
348+
if (!info || !info->hdev)
349+
/* our irq handler is shared */
350+
return IRQ_NONE;
349351

350352
iobase = info->p_dev->io.BasePort1;
351353

‎drivers/bluetooth/btuart_cs.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,9 @@ static irqreturn_t btuart_interrupt(int irq, void *dev_inst)
295295
int iir, lsr;
296296
irqreturn_t r = IRQ_NONE;
297297

298-
BUG_ON(!info->hdev);
298+
if (!info || !info->hdev)
299+
/* our irq handler is shared */
300+
return IRQ_NONE;
299301

300302
iobase = info->p_dev->io.BasePort1;
301303

‎drivers/bluetooth/dtl1_cs.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,9 @@ static irqreturn_t dtl1_interrupt(int irq, void *dev_inst)
299299
int iir, lsr;
300300
irqreturn_t r = IRQ_NONE;
301301

302-
BUG_ON(!info->hdev);
302+
if (!info || !info->hdev)
303+
/* our irq handler is shared */
304+
return IRQ_NONE;
303305

304306
iobase = info->p_dev->io.BasePort1;
305307

0 commit comments

Comments
 (0)