Fixed suspend/resume for r8169 drivers.
--- a/devices/r8169-2.6.24-ethercat.c Tue Jan 10 10:43:36 2012 +0100
+++ b/devices/r8169-2.6.24-ethercat.c Tue Jan 10 10:43:56 2012 +0100
@@ -3237,7 +3237,7 @@
void __iomem *ioaddr = tp->mmio_addr;
if (tp->ecdev)
- return;
+ return -EBUSY;
if (!netif_running(dev))
goto out_pci_suspend;
@@ -3269,7 +3269,7 @@
struct rtl8169_private *tp = netdev_priv(dev);
if (tp->ecdev)
- return;
+ return -EBUSY;
pci_set_power_state(pdev, PCI_D0);
pci_restore_state(pdev);
--- a/devices/r8169-2.6.28-ethercat.c Tue Jan 10 10:43:36 2012 +0100
+++ b/devices/r8169-2.6.28-ethercat.c Tue Jan 10 10:43:56 2012 +0100
@@ -3858,7 +3858,7 @@
void __iomem *ioaddr = tp->mmio_addr;
if (tp->ecdev)
- return;
+ return -EBUSY;
if (!netif_running(dev))
goto out_pci_suspend;
@@ -3889,7 +3889,7 @@
struct rtl8169_private *tp = netdev_priv(dev);
if (tp->ecdev)
- return;
+ return -EBUSY;
pci_set_power_state(pdev, PCI_D0);
pci_restore_state(pdev);
--- a/devices/r8169-2.6.37-ethercat.c Tue Jan 10 10:43:36 2012 +0100
+++ b/devices/r8169-2.6.37-ethercat.c Tue Jan 10 10:43:56 2012 +0100
@@ -4956,6 +4956,9 @@
struct net_device *dev = pci_get_drvdata(pdev);
struct rtl8169_private *tp = netdev_priv(dev);
+ if (tp->ecdev)
+ return -EBUSY;
+
rtl8169_init_phy(dev, tp);
if (netif_running(dev))