# HG changeset patch # User Florian Pose # Date 1385451524 -3600 # Node ID a1c25aee3112b23468bc25349a8a17ddd07eb9df # Parent bdadf6da49147a21b449df0ff9a4d7c623f1924a Improved r8169 for 3.4. diff -r bdadf6da4914 -r a1c25aee3112 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 -* Copyright (c) 2003 - 2007 Francois Romieu -* Copyright (c) a lot of people too. Please respect their work. + * r8169.c: RealTek 8169/8168/8101 ethernet driver. + * + * Copyright (c) 2002 ShuChen + * Copyright (c) 2003 - 2007 Francois Romieu + * Copyright (c) a lot of people too. Please respect their work. * * See MAINTAINERS file for support contact information. */ @@ -31,6 +31,7 @@ #include #include + #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 "); @@ -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)