aboutsummaryrefslogtreecommitdiffstats
path: root/main/linux-grsec
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 09:49:11 +0000
commit0079a165feacb1846b5449993744cf1e2b57a186 (patch)
treec8d52da484ba81241da4373c15b7b9e852ec1ea8 /main/linux-grsec
parente34f311f0382f1a04aa28ceab6c7773f568dd3e3 (diff)
downloadaports-0079a165feacb1846b5449993744cf1e2b57a186.tar.bz2
aports-0079a165feacb1846b5449993744cf1e2b57a186.tar.xz
main/linux-grsec: fix for r8169
Diffstat (limited to 'main/linux-grsec')
-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
pkgname=linux-${_flavor}
pkgver=2.6.32.15
_kernver=2.6.32
-pkgrel=0
+pkgrel=1
pkgdesc="Linux kernel with grsecurity"
url=http://grsecurity.net
depends="mkinitfs linux-firmware"
@@ -31,6 +31,7 @@ source="ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-$_kernver.tar.bz2
0017-flow-delayed-deletion-of-flow-cache-entries.patch
0018-xfrm-Fix-crashes-in-xfrm_lookup.patch
xfrm-fix-policy-unreferencing-on-larval-drop.patch
+ r8169-fix-random-mdio_write-failures.patch
kernelconfig.x86
"
subpackages="$pkgname-dev linux-firmware:firmware"
@@ -157,4 +158,5 @@ c09b82b89a49ba2a3836a0bc3a3312f4 0015-xfrm-cache-bundles-instead-of-policies-fo
3b83f0972ab715819d1119b120a987e7 0017-flow-delayed-deletion-of-flow-cache-entries.patch
45a676c7a1759fec60b724d557b4e295 0018-xfrm-Fix-crashes-in-xfrm_lookup.patch
c7e606c11c05ff03012b21c3fe0ece47 xfrm-fix-policy-unreferencing-on-larval-drop.patch
+ce4a74190febe13713bab1b886dd5bee r8169-fix-random-mdio_write-failures.patch
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 @@
+From 024a07bacf8287a6ddfa83e9d5b951c5e8b4070e Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
+Date: Sun, 6 Jun 2010 15:38:47 -0700
+Subject: [PATCH 1/1] r8169: fix random mdio_write failures
+MIME-Version: 1.0
+Content-Type: text/plain; charset=utf8
+Content-Transfer-Encoding: 8bit
+
+Some configurations need delay between the "write completed" indication
+and new write to work reliably.
+
+Realtek driver seems to use longer delay when polling the "write complete"
+bit, so it waits long enough between writes with high probability (but
+could probably break too). This patch adds a new udelay to make sure we
+wait unconditionally some time after the write complete indication.
+
+This caused a regression with XID 18000000 boards when the board specific
+phy configuration writing many mdio registers was added in commit
+2e955856ff (r8169: phy init for the 8169scd). Some of the configration
+mdio writes would almost always fail, and depending on failure might leave
+the PHY in non-working state.
+
+Signed-off-by: Timo Teräs <timo.teras@iki.fi>
+Acked-off-by: Francois Romieu <romieu@fr.zoreil.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+---
+ drivers/net/r8169.c | 5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
+diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
+index 217e709..03a8318 100644
+--- a/drivers/net/r8169.c
++++ b/drivers/net/r8169.c
+@@ -559,6 +559,11 @@ static void mdio_write(void __iomem *ioaddr, int reg_addr, int value)
+ break;
+ udelay(25);
+ }
++ /*
++ * Some configurations require a small delay even after the write
++ * completed indication or the next write might fail.
++ */
++ udelay(25);
+ }
+
+ static int mdio_read(void __iomem *ioaddr, int reg_addr)
+--
+1.7.1
+