diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2010-06-07 09:49:11 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2010-06-07 11:22:29 +0000 |
commit | 40427bebdbd5fb4b4506fdbb971a1164a1bc85b6 (patch) | |
tree | 608d4aa206c32260f02703bcefc0e87a01a0175e | |
parent | 638f229c484439918cf26212ba2c4022965f6f12 (diff) | |
download | alpine_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/APKBUILD | 4 | ||||
-rw-r--r-- | main/linux-grsec/r8169-fix-random-mdio_write-failures.patch | 48 |
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 | |||
4 | pkgname=linux-${_flavor} | 4 | pkgname=linux-${_flavor} |
5 | pkgver=2.6.32.15 | 5 | pkgver=2.6.32.15 |
6 | _kernver=2.6.32 | 6 | _kernver=2.6.32 |
7 | pkgrel=0 | 7 | pkgrel=1 |
8 | pkgdesc="Linux kernel with grsecurity" | 8 | pkgdesc="Linux kernel with grsecurity" |
9 | url=http://grsecurity.net | 9 | url=http://grsecurity.net |
10 | depends="mkinitfs linux-firmware" | 10 | depends="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 | " |
36 | subpackages="$pkgname-dev linux-firmware:firmware" | 37 | subpackages="$pkgname-dev linux-firmware:firmware" |
@@ -157,4 +158,5 @@ c09b82b89a49ba2a3836a0bc3a3312f4 0015-xfrm-cache-bundles-instead-of-policies-fo | |||
157 | 3b83f0972ab715819d1119b120a987e7 0017-flow-delayed-deletion-of-flow-cache-entries.patch | 158 | 3b83f0972ab715819d1119b120a987e7 0017-flow-delayed-deletion-of-flow-cache-entries.patch |
158 | 45a676c7a1759fec60b724d557b4e295 0018-xfrm-Fix-crashes-in-xfrm_lookup.patch | 159 | 45a676c7a1759fec60b724d557b4e295 0018-xfrm-Fix-crashes-in-xfrm_lookup.patch |
159 | c7e606c11c05ff03012b21c3fe0ece47 xfrm-fix-policy-unreferencing-on-larval-drop.patch | 160 | c7e606c11c05ff03012b21c3fe0ece47 xfrm-fix-policy-unreferencing-on-larval-drop.patch |
161 | ce4a74190febe13713bab1b886dd5bee r8169-fix-random-mdio_write-failures.patch | ||
160 | 442d7174a9755ed7bba22ebd4918bbe5 kernelconfig.x86" | 162 | 442d7174a9755ed7bba22ebd4918bbe5 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 @@ | |||
1 | From 024a07bacf8287a6ddfa83e9d5b951c5e8b4070e Mon Sep 17 00:00:00 2001 | ||
2 | From: =?utf8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi> | ||
3 | Date: Sun, 6 Jun 2010 15:38:47 -0700 | ||
4 | Subject: [PATCH 1/1] r8169: fix random mdio_write failures | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=utf8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | Some configurations need delay between the "write completed" indication | ||
10 | and new write to work reliably. | ||
11 | |||
12 | Realtek driver seems to use longer delay when polling the "write complete" | ||
13 | bit, so it waits long enough between writes with high probability (but | ||
14 | could probably break too). This patch adds a new udelay to make sure we | ||
15 | wait unconditionally some time after the write complete indication. | ||
16 | |||
17 | This caused a regression with XID 18000000 boards when the board specific | ||
18 | phy configuration writing many mdio registers was added in commit | ||
19 | 2e955856ff (r8169: phy init for the 8169scd). Some of the configration | ||
20 | mdio writes would almost always fail, and depending on failure might leave | ||
21 | the PHY in non-working state. | ||
22 | |||
23 | Signed-off-by: Timo Teräs <timo.teras@iki.fi> | ||
24 | Acked-off-by: Francois Romieu <romieu@fr.zoreil.com> | ||
25 | Signed-off-by: David S. Miller <davem@davemloft.net> | ||
26 | --- | ||
27 | drivers/net/r8169.c | 5 +++++ | ||
28 | 1 files changed, 5 insertions(+), 0 deletions(-) | ||
29 | |||
30 | diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c | ||
31 | index 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 | -- | ||
47 | 1.7.1 | ||
48 | |||