aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2010-06-09 07:00:10 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2010-06-09 07:00:47 +0000
commit9c54951a0024fefe80a01bba7e2a009bf369d8f6 (patch)
tree97f5916495affe5a2a7ac53eb0d1660d02dccf56
parente013968ac05acb7b91d9ad5642ed8e70b017c87b (diff)
downloadalpine_aports-1.10.4.tar.bz2
alpine_aports-1.10.4.tar.xz
alpine_aports-1.10.4.zip
main/linux-grsec: more r8169 fixesv1.10.4
(cherry picked from commit df41d8f169f98412989bfd811beea619c3289262)
-rw-r--r--main/linux-grsec/APKBUILD4
-rw-r--r--main/linux-grsec/r8169-fix-mdio_read-and-update-mdio_write-according-to-hw-specs.patch56
2 files changed, 59 insertions, 1 deletions
diff --git a/main/linux-grsec/APKBUILD b/main/linux-grsec/APKBUILD
index b3126d2ec2..16eb88ebb8 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=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"
@@ -32,6 +32,7 @@ source="ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-$_kernver.tar.bz2
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 r8169-fix-random-mdio_write-failures.patch
35 r8169-fix-mdio_read-and-update-mdio_write-according-to-hw-specs.patch
35 x86-setup-When-restoring-the-screen-update-boot_params-screen_info.patch 36 x86-setup-When-restoring-the-screen-update-boot_params-screen_info.patch
36 kernelconfig.x86 37 kernelconfig.x86
37 " 38 "
@@ -162,5 +163,6 @@ c09b82b89a49ba2a3836a0bc3a3312f4 0015-xfrm-cache-bundles-instead-of-policies-fo
16245a676c7a1759fec60b724d557b4e295 0018-xfrm-Fix-crashes-in-xfrm_lookup.patch 16345a676c7a1759fec60b724d557b4e295 0018-xfrm-Fix-crashes-in-xfrm_lookup.patch
163c7e606c11c05ff03012b21c3fe0ece47 xfrm-fix-policy-unreferencing-on-larval-drop.patch 164c7e606c11c05ff03012b21c3fe0ece47 xfrm-fix-policy-unreferencing-on-larval-drop.patch
164ce4a74190febe13713bab1b886dd5bee r8169-fix-random-mdio_write-failures.patch 165ce4a74190febe13713bab1b886dd5bee r8169-fix-random-mdio_write-failures.patch
166b41ee19f13498fb25992fd60cd1126d4 r8169-fix-mdio_read-and-update-mdio_write-according-to-hw-specs.patch
165a1bcf76870b63a4a4035a8948fb758e2 x86-setup-When-restoring-the-screen-update-boot_params-screen_info.patch 167a1bcf76870b63a4a4035a8948fb758e2 x86-setup-When-restoring-the-screen-update-boot_params-screen_info.patch
166442d7174a9755ed7bba22ebd4918bbe5 kernelconfig.x86" 168442d7174a9755ed7bba22ebd4918bbe5 kernelconfig.x86"
diff --git a/main/linux-grsec/r8169-fix-mdio_read-and-update-mdio_write-according-to-hw-specs.patch b/main/linux-grsec/r8169-fix-mdio_read-and-update-mdio_write-according-to-hw-specs.patch
new file mode 100644
index 0000000000..bd111e8772
--- /dev/null
+++ b/main/linux-grsec/r8169-fix-mdio_read-and-update-mdio_write-according-to-hw-specs.patch
@@ -0,0 +1,56 @@
1From patchwork Wed Jun 9 05:22:10 2010
2Content-Type: text/plain; charset="utf-8"
3MIME-Version: 1.0
4Content-Transfer-Encoding: 8bit
5Subject: r8169: fix mdio_read and update mdio_write according to hw specs
6Date: Tue, 08 Jun 2010 19:22:10 -0000
7From: =?utf-8?b?VGltbyBUZXLDpHMgPHRpbW8udGVyYXNAaWtpLmZpPg==?=
8X-Patchwork-Id: 55049
9Message-Id: <1276060930-15697-1-git-send-email-timo.teras@iki.fi>
10To: netdev@vger.kernel.org
11Cc: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>,
12 Francois Romieu <romieu@fr.zoreil.com>, Hayeswang <hayeswang@realtek.com>
13
14Realtek confirmed that a 20us delay is needed after mdio_read and
15mdio_write operations. Reduce the delay in mdio_write, and add it
16to mdio_read too. Also add a comment that the 20us is from hw specs.
17
18Signed-off-by: Timo Teräs <timo.teras@iki.fi>
19Cc: Francois Romieu <romieu@fr.zoreil.com>
20Cc: Hayeswang <hayeswang@realtek.com>
21
22---
23drivers/net/r8169.c | 12 +++++++++---
24 1 files changed, 9 insertions(+), 3 deletions(-)
25
26diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
27index 03a8318..96b6cfb 100644
28--- a/drivers/net/r8169.c
29+++ b/drivers/net/r8169.c
30@@ -560,10 +560,10 @@ static void mdio_write(void __iomem *ioaddr, int reg_addr, int value)
31 udelay(25);
32 }
33 /*
34- * Some configurations require a small delay even after the write
35- * completed indication or the next write might fail.
36+ * According to hardware specs a 20us delay is required after write
37+ * complete indication, but before sending next command.
38 */
39- udelay(25);
40+ udelay(20);
41 }
42
43 static int mdio_read(void __iomem *ioaddr, int reg_addr)
44@@ -583,6 +583,12 @@ static int mdio_read(void __iomem *ioaddr, int reg_addr)
45 }
46 udelay(25);
47 }
48+ /*
49+ * According to hardware specs a 20us delay is required after read
50+ * complete indication, but before sending next command.
51+ */
52+ udelay(20);
53+
54 return value;
55 }
56