aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2013-01-22 10:58:19 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2013-02-01 15:52:46 +0000
commit26dd1ce9031a1d0ad89cf0442142c6c820bb67fe (patch)
tree4b32036b6081f85186e4305b0042423521992153
parent489613e1e98ec0a0776595cb0fb91d326e00ed3d (diff)
downloadalpine_aports-26dd1ce9031a1d0ad89cf0442142c6c820bb67fe.tar.bz2
alpine_aports-26dd1ce9031a1d0ad89cf0442142c6c820bb67fe.tar.xz
alpine_aports-26dd1ce9031a1d0ad89cf0442142c6c820bb67fe.zip
main/linux-grsec: r8169: fix for vlan tagging issues
Should fix issue with interfaces freezing with heavy load over vlans (cherry picked from commit 059b4e0e9ba1ebd22ed6801cb85b7e0f0f6d7b63) Conflicts: main/linux-grsec/APKBUILD
-rw-r--r--main/linux-grsec/0001-r8169-remove-the-obsolete-and-incorrect-AMD-workarou.patch58
-rw-r--r--main/linux-grsec/APKBUILD4
2 files changed, 61 insertions, 1 deletions
diff --git a/main/linux-grsec/0001-r8169-remove-the-obsolete-and-incorrect-AMD-workarou.patch b/main/linux-grsec/0001-r8169-remove-the-obsolete-and-incorrect-AMD-workarou.patch
new file mode 100644
index 0000000000..dc7e84df4e
--- /dev/null
+++ b/main/linux-grsec/0001-r8169-remove-the-obsolete-and-incorrect-AMD-workarou.patch
@@ -0,0 +1,58 @@
1From f5829ee75361832b9b52e7230f57ecadc1db0125 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
3Date: Tue, 22 Jan 2013 10:39:08 +0200
4Subject: [PATCH] r8169: remove the obsolete and incorrect AMD workaround
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9This was introduced in commit 6dccd16 "r8169: merge with version
106.001.00 of Realtek's r8169 driver". I did not find the version
116.001.00 online, but in 6.002.00 or any later r8169 from Realtek
12this hunk is no longer present.
13
14Also commit 05af214 "r8169: fix Ethernet Hangup for RTL8110SC
15rev d" claims to have fixed this issue otherwise.
16
17The magic compare mask of 0xfffe000 is dubious as it masks
18parts of the Reserved part, and parts of the VLAN tag. But this
19does not make much sense as the VLAN tag parts are perfectly
20valid there. In matter of fact this seems to be triggered with
21any VLAN tagged packet as RxVlanTag bit is matched. I would
22suspect 0xfffe0000 was intended to test reserved part only.
23
24Finally, this hunk is evil as it can cause more packets to be
25handled than what was NAPI quota causing net/core/dev.c:
26net_rx_action(): WARN_ON_ONCE(work > weight) to trigger, and
27mess up the NAPI state causing device to hang.
28
29As result, any system using VLANs and having high receive
30traffic (so that NAPI poll budget limits rtl_rx) would result
31in device hang.
32
33Signed-off-by: Timo Teräs <timo.teras@iki.fi>
34---
35 drivers/net/ethernet/realtek/r8169.c | 7 -------
36 1 file changed, 7 deletions(-)
37
38diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
39index 9cc0215..3fbb0ca 100644
40--- a/drivers/net/ethernet/realtek/r8169.c
41+++ b/drivers/net/ethernet/realtek/r8169.c
42@@ -5450,13 +5450,6 @@ process_pkt:
43 tp->rx_stats.bytes += pkt_size;
44 u64_stats_update_end(&tp->rx_stats.syncp);
45 }
46-
47- /* Work around for AMD plateform. */
48- if ((desc->opts2 & cpu_to_le32(0xfffe000)) &&
49- (tp->mac_version == RTL_GIGA_MAC_VER_05)) {
50- desc->opts2 = 0;
51- cur_rx++;
52- }
53 }
54
55 count = cur_rx - tp->cur_rx;
56--
571.8.1.1
58
diff --git a/main/linux-grsec/APKBUILD b/main/linux-grsec/APKBUILD
index 3f48051c4f..f58dda3e74 100644
--- a/main/linux-grsec/APKBUILD
+++ b/main/linux-grsec/APKBUILD
@@ -4,7 +4,7 @@ _flavor=grsec
4pkgname=linux-${_flavor} 4pkgname=linux-${_flavor}
5pkgver=3.6.11 5pkgver=3.6.11
6_kernver=3.6 6_kernver=3.6
7pkgrel=3 7pkgrel=4
8pkgdesc="Linux kernel with grsecurity" 8pkgdesc="Linux kernel with grsecurity"
9url=http://grsecurity.net 9url=http://grsecurity.net
10depends="mkinitfs linux-firmware" 10depends="mkinitfs linux-firmware"
@@ -20,6 +20,7 @@ source="http://ftp.kernel.org/pub/linux/kernel/v3.x/linux-$_kernver.tar.xz
20 r8169-num-rx-desc.patch 20 r8169-num-rx-desc.patch
21 xsa40.patch 21 xsa40.patch
22 ipv4-remove-output-route-check-in-ipv4_mtu.patch 22 ipv4-remove-output-route-check-in-ipv4_mtu.patch
23 0001-r8169-remove-the-obsolete-and-incorrect-AMD-workarou.patch
23 24
24 kernelconfig.x86 25 kernelconfig.x86
25 kernelconfig.x86_64 26 kernelconfig.x86_64
@@ -148,5 +149,6 @@ dce5c43ac3b5d8e35e245b35e90e1837 grsecurity-2.9.1-3.6.11-unofficial-1.patch
148daf2cbb558588c49c138fe9ca2482b64 r8169-num-rx-desc.patch 149daf2cbb558588c49c138fe9ca2482b64 r8169-num-rx-desc.patch
149d9de28f8a74fe0347866705b4bd6db85 xsa40.patch 150d9de28f8a74fe0347866705b4bd6db85 xsa40.patch
150d9b4a528e722d10ba53034ebd440c31b ipv4-remove-output-route-check-in-ipv4_mtu.patch 151d9b4a528e722d10ba53034ebd440c31b ipv4-remove-output-route-check-in-ipv4_mtu.patch
15263468b44e34fa19237e0a2a1f6737b14 0001-r8169-remove-the-obsolete-and-incorrect-AMD-workarou.patch
151373db5888708938c6b1baed6da781fcb kernelconfig.x86 153373db5888708938c6b1baed6da781fcb kernelconfig.x86
152190788fb10e79abce9d570d5e87ec3b4 kernelconfig.x86_64" 154190788fb10e79abce9d570d5e87ec3b4 kernelconfig.x86_64"