Skip to content

Commit

Permalink
3c59x: Fix shared IRQ handling
Browse files Browse the repository at this point in the history
As its first order of business, boomerang_interrupt() checks whether
the device really has any pending interrupts. If it does not,
it does nothing and returns, but it still returns IRQ_HANDLED.

This is wrong: interrupt was not handled, IRQ handlers of other
devices sharing this IRQ line need to be called.

vortex_interrupt() has it right: it returns IRQ_NONE in this case
via IRQ_RETVAL(0).

Do the same in boomerang_interrupt().

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
CC: David S. Miller <davem@davemloft.net>
CC: linux-kernel@vger.kernel.org
CC: netdev@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Denys Vlasenko authored and David S. Miller committed Jul 9, 2015
1 parent 0769636 commit 4eed4d8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/net/ethernet/3com/3c59x.c
Original file line number Diff line number Diff line change
Expand Up @@ -2382,6 +2382,7 @@ boomerang_interrupt(int irq, void *dev_id)
void __iomem *ioaddr;
int status;
int work_done = max_interrupt_work;
int handled = 0;

ioaddr = vp->ioaddr;

Expand All @@ -2400,6 +2401,7 @@ boomerang_interrupt(int irq, void *dev_id)

if ((status & IntLatch) == 0)
goto handler_exit; /* No interrupt: shared IRQs can cause this */
handled = 1;

if (status == 0xffff) { /* h/w no longer present (hotplug)? */
if (vortex_debug > 1)
Expand Down Expand Up @@ -2501,7 +2503,7 @@ boomerang_interrupt(int irq, void *dev_id)
handler_exit:
vp->handling_irq = 0;
spin_unlock(&vp->lock);
return IRQ_HANDLED;
return IRQ_RETVAL(handled);
}

static int vortex_rx(struct net_device *dev)
Expand Down

0 comments on commit 4eed4d8

Please sign in to comment.