diff options
-rw-r--r-- | drivers/net/b44.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/net/b44.c b/drivers/net/b44.c index f1675dcf4d5c..e829beea668c 100644 --- a/drivers/net/b44.c +++ b/drivers/net/b44.c | |||
@@ -909,6 +909,12 @@ static irqreturn_t b44_interrupt(int irq, void *dev_id, struct pt_regs *regs) | |||
909 | istat &= imask; | 909 | istat &= imask; |
910 | if (istat) { | 910 | if (istat) { |
911 | handled = 1; | 911 | handled = 1; |
912 | |||
913 | if (unlikely(!netif_running(dev))) { | ||
914 | printk(KERN_INFO "%s: late interrupt.\n", dev->name); | ||
915 | goto irq_ack; | ||
916 | } | ||
917 | |||
912 | if (netif_rx_schedule_prep(dev)) { | 918 | if (netif_rx_schedule_prep(dev)) { |
913 | /* NOTE: These writes are posted by the readback of | 919 | /* NOTE: These writes are posted by the readback of |
914 | * the ISTAT register below. | 920 | * the ISTAT register below. |
@@ -921,6 +927,7 @@ static irqreturn_t b44_interrupt(int irq, void *dev_id, struct pt_regs *regs) | |||
921 | dev->name); | 927 | dev->name); |
922 | } | 928 | } |
923 | 929 | ||
930 | irq_ack: | ||
924 | bw32(bp, B44_ISTAT, istat); | 931 | bw32(bp, B44_ISTAT, istat); |
925 | br32(bp, B44_ISTAT); | 932 | br32(bp, B44_ISTAT); |
926 | } | 933 | } |
@@ -1446,6 +1453,8 @@ static int b44_close(struct net_device *dev) | |||
1446 | 1453 | ||
1447 | netif_stop_queue(dev); | 1454 | netif_stop_queue(dev); |
1448 | 1455 | ||
1456 | netif_poll_disable(dev); | ||
1457 | |||
1449 | del_timer_sync(&bp->timer); | 1458 | del_timer_sync(&bp->timer); |
1450 | 1459 | ||
1451 | spin_lock_irq(&bp->lock); | 1460 | spin_lock_irq(&bp->lock); |
@@ -1461,6 +1470,8 @@ static int b44_close(struct net_device *dev) | |||
1461 | 1470 | ||
1462 | free_irq(dev->irq, dev); | 1471 | free_irq(dev->irq, dev); |
1463 | 1472 | ||
1473 | netif_poll_enable(dev); | ||
1474 | |||
1464 | b44_free_consistent(bp); | 1475 | b44_free_consistent(bp); |
1465 | 1476 | ||
1466 | return 0; | 1477 | return 0; |