Commit 9e298463 authored by Andrew Morton's avatar Andrew Morton Committed by Jeff Garzik

[PATCH] drivers/net/wan/z85230.c interrupt handling fix

From: tom watson <lkml@tommywatson.com>

While working on a driver for z85230 based board I noticed what looks like
it could be a problem.  If the interrupt handler is handling an interrupt
on port b and an interrupt comes in for port a, it seems to me that the
port b handler would be called instead of the port a handler, and possibly
hang the board until reset.

Attached is a patch to set the irq methods back to port a before attempting
to call them.
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarJeff Garzik <jgarzik@pobox.com>
parent 4d655d05
...@@ -734,7 +734,7 @@ irqreturn_t z8530_interrupt(int irq, void *dev_id, struct pt_regs *regs) ...@@ -734,7 +734,7 @@ irqreturn_t z8530_interrupt(int irq, void *dev_id, struct pt_regs *regs)
u8 intr; u8 intr;
static volatile int locker=0; static volatile int locker=0;
int work=0; int work=0;
struct z8530_irqhandler *irqs=dev->chanA.irqs; struct z8530_irqhandler *irqs;
if(locker) if(locker)
{ {
...@@ -758,6 +758,8 @@ irqreturn_t z8530_interrupt(int irq, void *dev_id, struct pt_regs *regs) ...@@ -758,6 +758,8 @@ irqreturn_t z8530_interrupt(int irq, void *dev_id, struct pt_regs *regs)
/* Now walk the chip and see what it is wanting - it may be /* Now walk the chip and see what it is wanting - it may be
an IRQ for someone else remember */ an IRQ for someone else remember */
irqs=dev->chanA.irqs;
if(intr & (CHARxIP|CHATxIP|CHAEXT)) if(intr & (CHARxIP|CHATxIP|CHAEXT))
{ {
if(intr&CHARxIP) if(intr&CHARxIP)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment