3c503: fix broken IRQ autoprobing
authorOndrej Zary <linux@rainbow-software.org>
Sun, 12 Jun 2011 09:40:49 +0000 (09:40 +0000)
committerDavid S. Miller <davem@conan.davemloft.net>
Mon, 13 Jun 2011 22:25:19 +0000 (18:25 -0400)
Fix broken IRQ autoprobing in 3c503 driver:
 - improper IRQ freeing (does not free IRQs causes WARN)
 - missing break when an working IRQ is found

The driver works with this patch.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Reviewed-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@conan.davemloft.net>
drivers/net/3c503.c

index d84f6e8903a58f6334acd9e67d1811823c73ee86..5b732988d49389c9811ae2d5c19c87ebdda92807 100644 (file)
@@ -412,7 +412,7 @@ el2_open(struct net_device *dev)
                outb_p(0x04 << ((*irqp == 9) ? 2 : *irqp), E33G_IDCFR);
                outb_p(0x00, E33G_IDCFR);
                msleep(1);
-               free_irq(*irqp, el2_probe_interrupt);
+               free_irq(*irqp, &seen);
                if (!seen)
                        continue;
 
@@ -422,6 +422,7 @@ el2_open(struct net_device *dev)
                        continue;
                if (retval < 0)
                        goto err_disable;
+               break;
        } while (*++irqp);
 
        if (*irqp == 0) {