]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Oct 2012 00:32:15 +0000 (09:32 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Oct 2012 00:32:15 +0000 (09:32 +0900)
added patches:
r8169-8168c-and-later-require-bit-0x20-to-be-set-in-config2-for-pme-signaling.patch
r8169-config1-is-read-only-on-8168c-and-later.patch

queue-3.4/r8169-8168c-and-later-require-bit-0x20-to-be-set-in-config2-for-pme-signaling.patch [new file with mode: 0644]
queue-3.4/r8169-config1-is-read-only-on-8168c-and-later.patch [new file with mode: 0644]
queue-3.4/series

diff --git a/queue-3.4/r8169-8168c-and-later-require-bit-0x20-to-be-set-in-config2-for-pme-signaling.patch b/queue-3.4/r8169-8168c-and-later-require-bit-0x20-to-be-set-in-config2-for-pme-signaling.patch
new file mode 100644 (file)
index 0000000..e448667
--- /dev/null
@@ -0,0 +1,44 @@
+From stable-owner@vger.kernel.org Sat Oct  6 18:39:51 2012
+From: Francois Romieu <romieu@fr.zoreil.com>
+Date: Sat,  6 Oct 2012 11:19:53 +0200
+Subject: r8169: 8168c and later require bit 0x20 to be set in Config2 for PME signaling.
+To: stable@vger.kernel.org
+Cc: Hayes Wang <hayeswang@realtek.com>
+
+From: Francois Romieu <romieu@fr.zoreil.com>
+
+commit d387b427c973974dd619a33549c070ac5d0e089f upstream.
+
+The new 84xx stopped flying below the radars.
+
+Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
+Cc: Hayes Wang <hayeswang@realtek.com>
+Acked-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/ethernet/realtek/r8169.c |    6 ++++++
+ 1 file changed, 6 insertions(+)
+
+--- a/drivers/net/ethernet/realtek/r8169.c
++++ b/drivers/net/ethernet/realtek/r8169.c
+@@ -319,6 +319,8 @@ enum rtl_registers {
+       Config0         = 0x51,
+       Config1         = 0x52,
+       Config2         = 0x53,
++#define PME_SIGNAL                    (1 << 5)        /* 8168c and later */
++
+       Config3         = 0x54,
+       Config4         = 0x55,
+       Config5         = 0x56,
+@@ -1426,6 +1428,10 @@ static void __rtl8169_set_wol(struct rtl
+               RTL_W8(Config1, options);
+               break;
+       default:
++              options = RTL_R8(Config2) & ~PME_SIGNAL;
++              if (wolopts)
++                      options |= PME_SIGNAL;
++              RTL_W8(Config2, options);
+               break;
+       }
diff --git a/queue-3.4/r8169-config1-is-read-only-on-8168c-and-later.patch b/queue-3.4/r8169-config1-is-read-only-on-8168c-and-later.patch
new file mode 100644 (file)
index 0000000..cece90b
--- /dev/null
@@ -0,0 +1,61 @@
+From stable-owner@vger.kernel.org Sat Oct  6 18:39:51 2012
+From: Francois Romieu <romieu@fr.zoreil.com>
+Date: Sat,  6 Oct 2012 11:19:52 +0200
+Subject: r8169: Config1 is read-only on 8168c and later.
+To: stable@vger.kernel.org
+Cc: Hayes Wang <hayeswang@realtek.com>
+
+From: Francois Romieu <romieu@fr.zoreil.com>
+
+commit 851e60221926a53344b4227879858bef841b0477 upstream.
+
+Suggested by Hayes.
+
+Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
+Cc: Hayes Wang <hayeswang@realtek.com>
+Acked-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/ethernet/realtek/r8169.c |   15 +++++++++++++--
+ 1 file changed, 13 insertions(+), 2 deletions(-)
+
+--- a/drivers/net/ethernet/realtek/r8169.c
++++ b/drivers/net/ethernet/realtek/r8169.c
+@@ -1400,7 +1400,6 @@ static void __rtl8169_set_wol(struct rtl
+               u16 reg;
+               u8  mask;
+       } cfg[] = {
+-              { WAKE_ANY,   Config1, PMEnable },
+               { WAKE_PHY,   Config3, LinkUp },
+               { WAKE_MAGIC, Config3, MagicPacket },
+               { WAKE_UCAST, Config5, UWF },
+@@ -1408,16 +1407,28 @@ static void __rtl8169_set_wol(struct rtl
+               { WAKE_MCAST, Config5, MWF },
+               { WAKE_ANY,   Config5, LanWake }
+       };
++      u8 options;
+       RTL_W8(Cfg9346, Cfg9346_Unlock);
+       for (i = 0; i < ARRAY_SIZE(cfg); i++) {
+-              u8 options = RTL_R8(cfg[i].reg) & ~cfg[i].mask;
++              options = RTL_R8(cfg[i].reg) & ~cfg[i].mask;
+               if (wolopts & cfg[i].opt)
+                       options |= cfg[i].mask;
+               RTL_W8(cfg[i].reg, options);
+       }
++      switch (tp->mac_version) {
++      case RTL_GIGA_MAC_VER_01 ... RTL_GIGA_MAC_VER_17:
++              options = RTL_R8(Config1) & ~PMEnable;
++              if (wolopts)
++                      options |= PMEnable;
++              RTL_W8(Config1, options);
++              break;
++      default:
++              break;
++      }
++
+       RTL_W8(Cfg9346, Cfg9346_Lock);
+ }
index 02d66177a48598cc9ed3780d141bfef37b5973f5..d9041e0e905af432de1dc1fa4eb363b8c93c05b8 100644 (file)
@@ -96,3 +96,5 @@ cris-add-missing-rcu-idle-apis-on-idle-loop.patch
 m32r-add-missing-rcu-idle-apis-on-idle-loop.patch
 score-add-missing-rcu-idle-apis-on-idle-loop.patch
 rcu-fix-day-one-dyntick-idle-stall-warning-bug.patch
+r8169-config1-is-read-only-on-8168c-and-later.patch
+r8169-8168c-and-later-require-bit-0x20-to-be-set-in-config2-for-pme-signaling.patch