diff options
Diffstat (limited to 'drivers/net/tulip/tulip_core.c')
-rw-r--r-- | drivers/net/tulip/tulip_core.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/net/tulip/tulip_core.c b/drivers/net/tulip/tulip_core.c index eca984f89bbf..7040a59fa3c9 100644 --- a/drivers/net/tulip/tulip_core.c +++ b/drivers/net/tulip/tulip_core.c | |||
@@ -294,6 +294,10 @@ static void tulip_up(struct net_device *dev) | |||
294 | int next_tick = 3*HZ; | 294 | int next_tick = 3*HZ; |
295 | int i; | 295 | int i; |
296 | 296 | ||
297 | #ifdef CONFIG_TULIP_NAPI | ||
298 | napi_enable(&tp->napi); | ||
299 | #endif | ||
300 | |||
297 | /* Wake the chip from sleep/snooze mode. */ | 301 | /* Wake the chip from sleep/snooze mode. */ |
298 | tulip_set_power_state (tp, 0, 0); | 302 | tulip_set_power_state (tp, 0, 0); |
299 | 303 | ||
@@ -728,6 +732,10 @@ static void tulip_down (struct net_device *dev) | |||
728 | 732 | ||
729 | flush_scheduled_work(); | 733 | flush_scheduled_work(); |
730 | 734 | ||
735 | #ifdef CONFIG_TULIP_NAPI | ||
736 | napi_disable(&tp->napi); | ||
737 | #endif | ||
738 | |||
731 | del_timer_sync (&tp->timer); | 739 | del_timer_sync (&tp->timer); |
732 | #ifdef CONFIG_TULIP_NAPI | 740 | #ifdef CONFIG_TULIP_NAPI |
733 | del_timer_sync (&tp->oom_timer); | 741 | del_timer_sync (&tp->oom_timer); |
@@ -1606,8 +1614,7 @@ static int __devinit tulip_init_one (struct pci_dev *pdev, | |||
1606 | dev->tx_timeout = tulip_tx_timeout; | 1614 | dev->tx_timeout = tulip_tx_timeout; |
1607 | dev->watchdog_timeo = TX_TIMEOUT; | 1615 | dev->watchdog_timeo = TX_TIMEOUT; |
1608 | #ifdef CONFIG_TULIP_NAPI | 1616 | #ifdef CONFIG_TULIP_NAPI |
1609 | dev->poll = tulip_poll; | 1617 | netif_napi_add(dev, &tp->napi, tulip_poll, 16); |
1610 | dev->weight = 16; | ||
1611 | #endif | 1618 | #endif |
1612 | dev->stop = tulip_close; | 1619 | dev->stop = tulip_close; |
1613 | dev->get_stats = tulip_get_stats; | 1620 | dev->get_stats = tulip_get_stats; |