aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sungem.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/sungem.c')
-rw-r--r--drivers/net/sungem.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/net/sungem.c b/drivers/net/sungem.c
index 53b8344a68ef..f6fedcc32de1 100644
--- a/drivers/net/sungem.c
+++ b/drivers/net/sungem.c
@@ -2333,10 +2333,10 @@ static int gem_close(struct net_device *dev)
2333{ 2333{
2334 struct gem *gp = dev->priv; 2334 struct gem *gp = dev->priv;
2335 2335
2336 napi_disable(&gp->napi);
2337
2338 mutex_lock(&gp->pm_mutex); 2336 mutex_lock(&gp->pm_mutex);
2339 2337
2338 napi_disable(&gp->napi);
2339
2340 gp->opened = 0; 2340 gp->opened = 0;
2341 if (!gp->asleep) 2341 if (!gp->asleep)
2342 gem_do_stop(dev, 0); 2342 gem_do_stop(dev, 0);
@@ -2355,8 +2355,6 @@ static int gem_suspend(struct pci_dev *pdev, pm_message_t state)
2355 2355
2356 mutex_lock(&gp->pm_mutex); 2356 mutex_lock(&gp->pm_mutex);
2357 2357
2358 napi_disable(&gp->napi);
2359
2360 printk(KERN_INFO "%s: suspending, WakeOnLan %s\n", 2358 printk(KERN_INFO "%s: suspending, WakeOnLan %s\n",
2361 dev->name, 2359 dev->name,
2362 (gp->wake_on_lan && gp->opened) ? "enabled" : "disabled"); 2360 (gp->wake_on_lan && gp->opened) ? "enabled" : "disabled");
@@ -2370,6 +2368,8 @@ static int gem_suspend(struct pci_dev *pdev, pm_message_t state)
2370 2368
2371 /* If the driver is opened, we stop the MAC */ 2369 /* If the driver is opened, we stop the MAC */
2372 if (gp->opened) { 2370 if (gp->opened) {
2371 napi_disable(&gp->napi);
2372
2373 /* Stop traffic, mark us closed */ 2373 /* Stop traffic, mark us closed */
2374 netif_device_detach(dev); 2374 netif_device_detach(dev);
2375 2375
@@ -2460,6 +2460,7 @@ static int gem_resume(struct pci_dev *pdev)
2460 /* Re-attach net device */ 2460 /* Re-attach net device */
2461 netif_device_attach(dev); 2461 netif_device_attach(dev);
2462 2462
2463 napi_enable(&gp->napi);
2463 } 2464 }
2464 2465
2465 spin_lock_irqsave(&gp->lock, flags); 2466 spin_lock_irqsave(&gp->lock, flags);
@@ -2479,8 +2480,6 @@ static int gem_resume(struct pci_dev *pdev)
2479 spin_unlock(&gp->tx_lock); 2480 spin_unlock(&gp->tx_lock);
2480 spin_unlock_irqrestore(&gp->lock, flags); 2481 spin_unlock_irqrestore(&gp->lock, flags);
2481 2482
2482 napi_enable(&gp->napi);
2483
2484 mutex_unlock(&gp->pm_mutex); 2483 mutex_unlock(&gp->pm_mutex);
2485 2484
2486 return 0; 2485 return 0;