aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2010-06-07 09:49:11 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2010-06-07 11:22:29 +0000
commit40427bebdbd5fb4b4506fdbb971a1164a1bc85b6 (patch)
tree608d4aa206c32260f02703bcefc0e87a01a0175e
parent638f229c484439918cf26212ba2c4022965f6f12 (diff)
downloadalpine_aports-40427bebdbd5fb4b4506fdbb971a1164a1bc85b6.tar.bz2
alpine_aports-40427bebdbd5fb4b4506fdbb971a1164a1bc85b6.tar.xz
alpine_aports-40427bebdbd5fb4b4506fdbb971a1164a1bc85b6.zip
main/linux-grsec: fix for r8169
(cherry picked from commit 0079a165feacb1846b5449993744cf1e2b57a186)
-rw-r--r--main/linux-grsec/APKBUILD4
-rw-r--r--main/linux-grsec/r8169-fix-random-mdio_write-failures.patch48
2 files changed, 51 insertions, 1 deletions
diff --git a/main/linux-grsec/APKBUILD b/main/linux-grsec/APKBUILD
index c17fa89384..c2fa87917a 100644
--- a/main/linux-grsec/APKBUILD
+++ b/main/linux-grsec/APKBUILD
@@ -4,7 +4,7 @@ _flavor=grsec
4pkgname=linux-${_flavor} 4pkgname=linux-${_flavor}
5pkgver=2.6.32.15 5pkgver=2.6.32.15
6_kernver=2.6.32 6_kernver=2.6.32
7pkgrel=0 7pkgrel=1
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"
@@ -31,6 +31,7 @@ source="ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-$_kernver.tar.bz2
31 0017-flow-delayed-deletion-of-flow-cache-entries.patch 31 0017-flow-delayed-deletion-of-flow-cache-entries.patch
32 0018-xfrm-Fix-crashes-in-xfrm_lookup.patch 32 0018-xfrm-Fix-crashes-in-xfrm_lookup.patch
33 xfrm-fix-policy-unreferencing-on-larval-drop.patch 33 xfrm-fix-policy-unreferencing-on-larval-drop.patch
34 r8169-fix-random-mdio_write-failures.patch
34 kernelconfig.x86 35 kernelconfig.x86
35 " 36 "
36subpackages="$pkgname-dev linux-firmware:firmware" 37subpackages="$pkgname-dev linux-firmware:firmware"
@@ -157,4 +158,5 @@ c09b82b89a49ba2a3836a0bc3a3312f4 0015-xfrm-cache-bundles-instead-of-policies-fo
1573b83f0972ab715819d1119b120a987e7 0017-flow-delayed-deletion-of-flow-cache-entries.patch 1583b83f0972ab715819d1119b120a987e7 0017-flow-delayed-deletion-of-flow-cache-entries.patch
15845a676c7a1759fec60b724d557b4e295 0018-xfrm-Fix-crashes-in-xfrm_lookup.patch 15945a676c7a1759fec60b724d557b4e295 0018-xfrm-Fix-crashes-in-xfrm_lookup.patch
159c7e606c11c05ff03012b21c3fe0ece47 xfrm-fix-policy-unreferencing-on-larval-drop.patch 160c7e606c11c05ff03012b21c3fe0ece47 xfrm-fix-policy-unreferencing-on-larval-drop.patch
161ce4a74190febe13713bab1b886dd5bee r8169-fix-random-mdio_write-failures.patch
160442d7174a9755ed7bba22ebd4918bbe5 kernelconfig.x86" 162442d7174a9755ed7bba22ebd4918bbe5 kernelconfig.x86"
diff --git a/main/linux-grsec/r8169-fix-random-mdio_write-failures.patch b/main/linux-grsec/r8169-fix-random-mdio_write-failures.patch
new file mode 100644
index 0000000000..1e2beadd0f
--- /dev/null
+++ b/main/linux-grsec/r8169-fix-random-mdio_write-failures.patch
@@ -0,0 +1,48 @@
1From 024a07bacf8287a6ddfa83e9d5b951c5e8b4070e Mon Sep 17 00:00:00 2001
2From: =?utf8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
3Date: Sun, 6 Jun 2010 15:38:47 -0700
4Subject: [PATCH 1/1] r8169: fix random mdio_write failures
5MIME-Version: 1.0
6Content-Type: text/plain; charset=utf8
7Content-Transfer-Encoding: 8bit
8
9Some configurations need delay between the "write completed" indication
10and new write to work reliably.
11
12Realtek driver seems to use longer delay when polling the "write complete"
13bit, so it waits long enough between writes with high probability (but
14could probably break too). This patch adds a new udelay to make sure we
15wait unconditionally some time after the write complete indication.
16
17This caused a regression with XID 18000000 boards when the board specific
18phy configuration writing many mdio registers was added in commit
192e955856ff (r8169: phy init for the 8169scd). Some of the configration
20mdio writes would almost always fail, and depending on failure might leave
21the PHY in non-working state.
22
23Signed-off-by: Timo Teräs <timo.teras@iki.fi>
24Acked-off-by: Francois Romieu <romieu@fr.zoreil.com>
25Signed-off-by: David S. Miller <davem@davemloft.net>
26---
27 drivers/net/r8169.c | 5 +++++
28 1 files changed, 5 insertions(+), 0 deletions(-)
29
30diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
31index 217e709..03a8318 100644
32--- a/drivers/net/r8169.c
33+++ b/drivers/net/r8169.c
34@@ -559,6 +559,11 @@ static void mdio_write(void __iomem *ioaddr, int reg_addr, int value)
35 break;
36 udelay(25);
37 }
38+ /*
39+ * Some configurations require a small delay even after the write
40+ * completed indication or the next write might fail.
41+ */
42+ udelay(25);
43 }
44
45 static int mdio_read(void __iomem *ioaddr, int reg_addr)
46--
471.7.1
48