devices/r8169-2.6.24-ethercat.c
branchstable-1.5
changeset 2378 ca345abf0565
parent 2251 5023ce75fe91
child 2582 87e502828b3f
equal deleted inserted replaced
2377:aa0f6f939cb3 2378:ca345abf0565
  3235 	struct net_device *dev = pci_get_drvdata(pdev);
  3235 	struct net_device *dev = pci_get_drvdata(pdev);
  3236 	struct rtl8169_private *tp = netdev_priv(dev);
  3236 	struct rtl8169_private *tp = netdev_priv(dev);
  3237 	void __iomem *ioaddr = tp->mmio_addr;
  3237 	void __iomem *ioaddr = tp->mmio_addr;
  3238 
  3238 
  3239 	if (tp->ecdev)
  3239 	if (tp->ecdev)
  3240 		return;
  3240 		return -EBUSY;
  3241 
  3241 
  3242 	if (!netif_running(dev))
  3242 	if (!netif_running(dev))
  3243 		goto out_pci_suspend;
  3243 		goto out_pci_suspend;
  3244 
  3244 
  3245 	netif_device_detach(dev);
  3245 	netif_device_detach(dev);
  3267 {
  3267 {
  3268 	struct net_device *dev = pci_get_drvdata(pdev);
  3268 	struct net_device *dev = pci_get_drvdata(pdev);
  3269 	struct rtl8169_private *tp = netdev_priv(dev);
  3269 	struct rtl8169_private *tp = netdev_priv(dev);
  3270 
  3270 
  3271 	if (tp->ecdev)
  3271 	if (tp->ecdev)
  3272 		return;
  3272 		return -EBUSY;
  3273 
  3273 
  3274 	pci_set_power_state(pdev, PCI_D0);
  3274 	pci_set_power_state(pdev, PCI_D0);
  3275 	pci_restore_state(pdev);
  3275 	pci_restore_state(pdev);
  3276 	pci_enable_wake(pdev, PCI_D0, 0);
  3276 	pci_enable_wake(pdev, PCI_D0, 0);
  3277 
  3277