diff options
author | Valerie Henson <val_henson@linux.intel.com> | 2006-09-08 14:15:41 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-09-11 09:05:37 -0400 |
commit | 9f486ae1d9ea700a952b77a8881de05ebc1610c3 (patch) | |
tree | 702247e52d2d8ce81758aec6dd3362db52a3cd36 /drivers/net/tulip/winbond-840.c | |
parent | 42eab56776b7c9686ee39f8f677a3e3b09caa170 (diff) |
[PATCH] Handle pci_enable_device() errors in resume
Signed-off-by: Valerie Henson <val_henson@linux.intel.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/tulip/winbond-840.c')
-rw-r--r-- | drivers/net/tulip/winbond-840.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/net/tulip/winbond-840.c b/drivers/net/tulip/winbond-840.c index b54378fac8f0..a64d6828d9aa 100644 --- a/drivers/net/tulip/winbond-840.c +++ b/drivers/net/tulip/winbond-840.c | |||
@@ -1626,14 +1626,18 @@ static int w840_resume (struct pci_dev *pdev) | |||
1626 | { | 1626 | { |
1627 | struct net_device *dev = pci_get_drvdata (pdev); | 1627 | struct net_device *dev = pci_get_drvdata (pdev); |
1628 | struct netdev_private *np = netdev_priv(dev); | 1628 | struct netdev_private *np = netdev_priv(dev); |
1629 | int retval = 0; | ||
1629 | 1630 | ||
1630 | rtnl_lock(); | 1631 | rtnl_lock(); |
1631 | if (netif_device_present(dev)) | 1632 | if (netif_device_present(dev)) |
1632 | goto out; /* device not suspended */ | 1633 | goto out; /* device not suspended */ |
1633 | if (netif_running(dev)) { | 1634 | if (netif_running(dev)) { |
1634 | pci_enable_device(pdev); | 1635 | if ((retval = pci_enable_device(pdev))) { |
1635 | /* pci_power_on(pdev); */ | 1636 | printk (KERN_ERR |
1636 | 1637 | "%s: pci_enable_device failed in resume\n", | |
1638 | dev->name); | ||
1639 | goto out; | ||
1640 | } | ||
1637 | spin_lock_irq(&np->lock); | 1641 | spin_lock_irq(&np->lock); |
1638 | iowrite32(1, np->base_addr+PCIBusCfg); | 1642 | iowrite32(1, np->base_addr+PCIBusCfg); |
1639 | ioread32(np->base_addr+PCIBusCfg); | 1643 | ioread32(np->base_addr+PCIBusCfg); |
@@ -1651,7 +1655,7 @@ static int w840_resume (struct pci_dev *pdev) | |||
1651 | } | 1655 | } |
1652 | out: | 1656 | out: |
1653 | rtnl_unlock(); | 1657 | rtnl_unlock(); |
1654 | return 0; | 1658 | return retval; |
1655 | } | 1659 | } |
1656 | #endif | 1660 | #endif |
1657 | 1661 | ||