cbus-retu: Fix nested IRQ handling
PATCH 1/1 cbus-retu: Fix nested IRQ handling
handle_nested_irq() expects a global IRQ number, so the irq_base has to be added to the RETU irq number.
---
drivers/cbus/retu.c +1 -1
@@ -205,7 +205,7 @@ static irqreturn_t retu_irq_handler(intreturn IRQ_NONE ; } -for (i =0 ; idr !=0 ; i++, idr >>=1 ) { +for (i = retu->irq_base; idr !=0 ; i++, idr >>=1 ) {if (!(idr &1 ))continue ;
Quoted 4 lines · Michael Buesch
handle_nested_irq()expects a global IRQ number, so theirq_basehas to be added to the RETU irq number.Signed-off-by Michael Buesch <[email protected]>
Good catch, while at that, could you also cook another patch to add locking on retu_irq_handler ? We are using the internal lockless version of the read/write functions, so we need to hold the mutex before reading/writing to avoid problems.
Signature · 1 line
balbi
Quoted 10 lines · Felipe Balbi
Quoted 4 lines · Michael Buesch
handle_nested_irq()expects a global IRQ number, so theirq_basehas to be added to the RETU irq number.Signed-off-by Michael Buesch <[email protected]>Good catch, while at that, could you also cook another patch to add locking on
retu_irq_handler? We are using the internal lockless version of the read/write functions, so we need to hold the mutex before reading/writing to avoid problems.
Ok, it probably is safe without locking (due to the reads being atomic), but I agree that it's more robust to add some locking here. I'll send a patch.
Signature · 1 line
Greetings Michael.