Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 97652
b: refs/heads/master
c: 56997fa
h: refs/heads/master
v: v3
  • Loading branch information
Grant Grundler authored and Jeff Garzik committed May 31, 2008
1 parent 0ae911f commit 4ba2385
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 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: aefdbf1a3b832a580a50cf3d1dcbb717be7cbdbe
refs/heads/master: 56997fa838e333cea33ab641d4aeedd23aef0eb1
10 changes: 8 additions & 2 deletions trunk/drivers/net/tulip/tulip_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1729,12 +1729,15 @@ static int tulip_suspend (struct pci_dev *pdev, pm_message_t state)
if (!dev)
return -EINVAL;

if (netif_running(dev))
tulip_down(dev);
if (!netif_running(dev))
goto save_state;

tulip_down(dev);

netif_device_detach(dev);
free_irq(dev->irq, dev);

save_state:
pci_save_state(pdev);
pci_disable_device(pdev);
pci_set_power_state(pdev, pci_choose_state(pdev, state));
Expand All @@ -1754,6 +1757,9 @@ static int tulip_resume(struct pci_dev *pdev)
pci_set_power_state(pdev, PCI_D0);
pci_restore_state(pdev);

if (!netif_running(dev))
return 0;

if ((retval = pci_enable_device(pdev))) {
printk (KERN_ERR "tulip: pci_enable_device failed in resume\n");
return retval;
Expand Down

0 comments on commit 4ba2385

Please sign in to comment.