|
@@ -1626,14 +1626,18 @@ static int w840_resume (struct pci_dev *pdev)
|
|
{
|
|
{
|
|
struct net_device *dev = pci_get_drvdata (pdev);
|
|
struct net_device *dev = pci_get_drvdata (pdev);
|
|
struct netdev_private *np = netdev_priv(dev);
|
|
struct netdev_private *np = netdev_priv(dev);
|
|
|
|
+ int retval = 0;
|
|
|
|
|
|
rtnl_lock();
|
|
rtnl_lock();
|
|
if (netif_device_present(dev))
|
|
if (netif_device_present(dev))
|
|
goto out; /* device not suspended */
|
|
goto out; /* device not suspended */
|
|
if (netif_running(dev)) {
|
|
if (netif_running(dev)) {
|
|
- pci_enable_device(pdev);
|
|
|
|
- /* pci_power_on(pdev); */
|
|
|
|
-
|
|
|
|
|
|
+ if ((retval = pci_enable_device(pdev))) {
|
|
|
|
+ printk (KERN_ERR
|
|
|
|
+ "%s: pci_enable_device failed in resume\n",
|
|
|
|
+ dev->name);
|
|
|
|
+ goto out;
|
|
|
|
+ }
|
|
spin_lock_irq(&np->lock);
|
|
spin_lock_irq(&np->lock);
|
|
iowrite32(1, np->base_addr+PCIBusCfg);
|
|
iowrite32(1, np->base_addr+PCIBusCfg);
|
|
ioread32(np->base_addr+PCIBusCfg);
|
|
ioread32(np->base_addr+PCIBusCfg);
|
|
@@ -1651,7 +1655,7 @@ static int w840_resume (struct pci_dev *pdev)
|
|
}
|
|
}
|
|
out:
|
|
out:
|
|
rtnl_unlock();
|
|
rtnl_unlock();
|
|
- return 0;
|
|
|
|
|
|
+ return retval;
|
|
}
|
|
}
|
|
#endif
|
|
#endif
|
|
|
|
|