Fixed suspend/resume for r8169 drivers. redundancy
authorFlorian Pose <fp@igh-essen.com>
Tue, 10 Jan 2012 10:43:56 +0100
branchredundancy
changeset 2342 4033d0d394ec
parent 2341 80c03df98a49
child 2343 0d2e24f2e1b2
Fixed suspend/resume for r8169 drivers.
devices/r8169-2.6.24-ethercat.c
devices/r8169-2.6.28-ethercat.c
devices/r8169-2.6.37-ethercat.c
--- 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))