--- a/devices/r8169-2.6.32-ethercat.c Thu Sep 06 14:21:02 2012 +0200
+++ b/devices/r8169-2.6.32-ethercat.c Mon Nov 03 15:20:05 2014 +0100
@@ -2704,7 +2704,7 @@
if (!tp->ecdev)
spin_lock_irq(&tp->lock);
-
+
if (tp->phy_reset_pending(ioaddr)) {
/*
* A busy loop could burn quite a few cycles on nowadays CPU.
@@ -3228,9 +3228,13 @@
RTL_W16(CPlusCmd, RTL_R16(CPlusCmd) | RxVlan);
device_set_wakeup_enable(&pdev->dev, tp->features & RTL_FEATURE_WOL);
- if (tp->ecdev && ecdev_open(tp->ecdev)) {
- ecdev_withdraw(tp->ecdev);
- goto err_out_msi_5;
+
+ if (tp->ecdev) {
+ rc = ecdev_open(tp->ecdev);
+ if (rc) {
+ ecdev_withdraw(tp->ecdev);
+ goto err_out_msi_5;
+ }
}
out:
@@ -3319,7 +3323,6 @@
goto err_release_ring_2;
napi_enable(&tp->napi);
-
}
rtl_hw_start(dev);
@@ -4765,7 +4768,6 @@
netif_stop_queue(dev);
napi_disable(&tp->napi);
-
}
core_down:
@@ -4925,7 +4927,7 @@
struct pci_dev *pdev = to_pci_dev(device);
struct net_device *dev = pci_get_drvdata(pdev);
struct rtl8169_private *tp = netdev_priv(dev);
-
+
if (tp->ecdev)
return -EBUSY;