Improved r8169 for 3.4. stable-1.5
authorFlorian Pose <fp@igh-essen.com>
Tue, 26 Nov 2013 08:38:44 +0100
branchstable-1.5
changeset 2533 a1c25aee3112
parent 2532 bdadf6da4914
child 2534 a0e787e196cd
Improved r8169 for 3.4.
devices/r8169-3.4-ethercat.c
--- a/devices/r8169-3.4-ethercat.c	Mon Oct 21 19:27:50 2013 +0200
+++ b/devices/r8169-3.4-ethercat.c	Tue Nov 26 08:38:44 2013 +0100
@@ -1,9 +1,9 @@
 /*
-* r8169.c: RealTek 8169/8168/8101 ethernet driver.
-*
-* Copyright (c) 2002 ShuChen <shuchen@realtek.com.tw>
-* Copyright (c) 2003 - 2007 Francois Romieu <romieu@fr.zoreil.com>
-* Copyright (c) a lot of people too. Please respect their work.
+ * r8169.c: RealTek 8169/8168/8101 ethernet driver.
+ *
+ * Copyright (c) 2002 ShuChen <shuchen@realtek.com.tw>
+ * Copyright (c) 2003 - 2007 Francois Romieu <romieu@fr.zoreil.com>
+ * Copyright (c) a lot of people too. Please respect their work.
  *
  * See MAINTAINERS file for support contact information.
  */
@@ -31,6 +31,7 @@
 
 #include <asm/io.h>
 #include <asm/irq.h>
+
 #include "../globals.h"
 #include "ecdev.h"
 
@@ -744,9 +745,6 @@
 	struct mii_if_info mii;
 	struct rtl8169_counters counters;
 	u32 saved_wolopts;
-
-	ec_device_t *ecdev;
-	unsigned long ec_watchdog_jiffies;
 	u32 opts1_mask;
 
 	struct rtl_fw {
@@ -762,6 +760,9 @@
 		} phy_action;
 	} *rtl_fw;
 #define RTL_FIRMWARE_UNKNOWN	ERR_PTR(-EAGAIN)
+
+	ec_device_t *ecdev;
+	unsigned long ec_watchdog_jiffies;
 };
 
 MODULE_AUTHOR("Realtek and the Linux r8169 crew <netdev@vger.kernel.org>");
@@ -5548,7 +5549,7 @@
 	status = rtl_get_events(tp) & tp->event_slow;
 	rtl_ack_events(tp, status);
 
-	if (unlikely(!tp->ecdev && status & RxFIFOOver)) {
+	if (unlikely(!tp->ecdev && (status & RxFIFOOver))) {
 		switch (tp->mac_version) {
 		/* Work around for rx fifo overflow */
 		case RTL_GIGA_MAC_VER_11:
@@ -5560,7 +5561,7 @@
 		}
 	}
 
-	if (unlikely(!tp->ecdev && status & SYSErr))
+	if (unlikely(!tp->ecdev && (status & SYSErr)))
 		rtl8169_pcierr_interrupt(dev);
 
 	if (status & LinkChg)