Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 73582
b: refs/heads/master
c: 62768e2
h: refs/heads/master
v: v3
  • Loading branch information
Johannes Berg authored and David S. Miller committed Nov 13, 2007
1 parent 97293ef commit 9331a94
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cd228d5458186f66bc36c4884f4f26ed955c5945
refs/heads/master: 62768e28d606c10ba54217f908123de34dad9374
11 changes: 5 additions & 6 deletions trunk/drivers/net/sungem.c
Original file line number Diff line number Diff line change
Expand Up @@ -2333,10 +2333,10 @@ static int gem_close(struct net_device *dev)
{
struct gem *gp = dev->priv;

napi_disable(&gp->napi);

mutex_lock(&gp->pm_mutex);

napi_disable(&gp->napi);

gp->opened = 0;
if (!gp->asleep)
gem_do_stop(dev, 0);
Expand All @@ -2355,8 +2355,6 @@ static int gem_suspend(struct pci_dev *pdev, pm_message_t state)

mutex_lock(&gp->pm_mutex);

napi_disable(&gp->napi);

printk(KERN_INFO "%s: suspending, WakeOnLan %s\n",
dev->name,
(gp->wake_on_lan && gp->opened) ? "enabled" : "disabled");
Expand All @@ -2370,6 +2368,8 @@ static int gem_suspend(struct pci_dev *pdev, pm_message_t state)

/* If the driver is opened, we stop the MAC */
if (gp->opened) {
napi_disable(&gp->napi);

/* Stop traffic, mark us closed */
netif_device_detach(dev);

Expand Down Expand Up @@ -2460,6 +2460,7 @@ static int gem_resume(struct pci_dev *pdev)
/* Re-attach net device */
netif_device_attach(dev);

napi_enable(&gp->napi);
}

spin_lock_irqsave(&gp->lock, flags);
Expand All @@ -2479,8 +2480,6 @@ static int gem_resume(struct pci_dev *pdev)
spin_unlock(&gp->tx_lock);
spin_unlock_irqrestore(&gp->lock, flags);

napi_enable(&gp->napi);

mutex_unlock(&gp->pm_mutex);

return 0;
Expand Down

0 comments on commit 9331a94

Please sign in to comment.