--- a/devices/8139too-2.6.31-ethercat.c Thu Sep 06 14:21:02 2012 +0200
+++ b/devices/8139too-2.6.31-ethercat.c Mon Nov 03 15:20:05 2014 +0100
@@ -647,7 +647,7 @@
struct mii_if_info mii;
unsigned int regs_len;
unsigned long fifo_copy_timeout;
-
+
ec_device_t *ecdev;
};
@@ -1134,9 +1134,12 @@
if (rtl_chip_info[tp->chipset].flags & HasHltClk)
RTL_W8 (HltClk, 'H'); /* 'R' would leave the clock running. */
- if (tp->ecdev && ecdev_open(tp->ecdev)) {
- ecdev_withdraw(tp->ecdev);
- goto err_out;
+ if (tp->ecdev) {
+ i = ecdev_open(tp->ecdev);
+ if (i) {
+ ecdev_withdraw(tp->ecdev);
+ goto err_out;
+ }
}
return 0;
@@ -1799,9 +1802,9 @@
wmb();
RTL_W32_F (TxStatus0 + (entry * sizeof (u32)),
tp->tx_flag | max(len, (unsigned int)ETH_ZLEN));
-
+
dev->trans_start = jiffies;
-
+
tp->cur_tx++;
} else {
spin_lock_irqsave(&tp->lock, flags);