diff -r af21f0bdc7c9 -r 2b9c78543663 devices/r8169-2.6.33-ethercat.c --- a/devices/r8169-2.6.33-ethercat.c Thu Sep 06 14:21:02 2012 +0200 +++ b/devices/r8169-2.6.33-ethercat.c Mon Nov 03 15:20:05 2014 +0100 @@ -2709,7 +2709,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. @@ -3234,9 +3234,12 @@ 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: @@ -3339,7 +3342,6 @@ goto err_release_ring_2; napi_enable(&tp->napi); - } rtl_hw_start(dev); @@ -4943,7 +4945,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;