Commit c3379065 authored by Chas Williams's avatar Chas Williams Committed by Stephen Hemminger

[ATM]: Cleanup/minor fixes to interrupt handler of LANAI driver (from mitch@sfgoth.com).

parent 654b80be
...@@ -1996,24 +1996,31 @@ static irqreturn_t lanai_int(int irq, void *devid, struct pt_regs *regs) ...@@ -1996,24 +1996,31 @@ static irqreturn_t lanai_int(int irq, void *devid, struct pt_regs *regs)
{ {
struct lanai_dev *lanai = (struct lanai_dev *) devid; struct lanai_dev *lanai = (struct lanai_dev *) devid;
u32 reason; u32 reason;
int handled = 0;
(void) irq; (void) regs; /* unused variables */ (void) irq; (void) regs; /* unused variables */
#ifdef USE_POWERDOWN #ifdef USE_POWERDOWN
if (unlikely(lanai->conf1 & CONFIG1_POWERDOWN)) { /*
lanai->conf1 &= ~CONFIG1_POWERDOWN; * If we're powered down we shouldn't be generating any interrupts -
conf1_write(lanai); * so assume that this is a shared interrupt line and it's for someone
printk(KERN_WARNING DEV_LABEL "(itf %d): Got interrupt " * else
"0x%08X while in POWERDOWN, powering up\n", lanai->number, */
(unsigned int) intr_pending(lanai)); if (unlikely(lanai->conf1 & CONFIG1_POWERDOWN))
conf2_write(lanai); return IRQ_NONE;
}
#endif #endif
while ((reason = intr_pending(lanai)) != 0) {
handled = 1; reason = intr_pending(lanai);
if (reason == 0)
return IRQ_NONE; /* Must be for someone else */
do {
if (unlikely(reason == 0xFFFFFFFF))
break; /* Maybe we've been unplugged? */
lanai_int_1(lanai, reason); lanai_int_1(lanai, reason);
} reason = intr_pending(lanai);
return IRQ_RETVAL(handled); } while (reason != 0);
return IRQ_HANDLED;
} }
/* TODO - it would be nice if we could use the "delayed interrupt" system /* TODO - it would be nice if we could use the "delayed interrupt" system
......
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