Fixed suspend/resume for r8169 drivers. stable-1.5
authorFlorian Pose <fp@igh-essen.com>
Tue, 10 Jan 2012 10:43:56 +0100
branchstable-1.5
changeset 2251 5023ce75fe91
parent 2250 db932582b674
child 2252 6001f50617a7
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))