diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2010-06-09 07:00:10 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2010-06-09 07:00:10 +0000 |
commit | df41d8f169f98412989bfd811beea619c3289262 (patch) | |
tree | 33f01bbfc52f1681fc2e5876fff2bca8b35c2489 | |
parent | 84b3968834360e1ea7564fc123b8cb934734480c (diff) | |
download | aports-df41d8f169f98412989bfd811beea619c3289262.tar.bz2 aports-df41d8f169f98412989bfd811beea619c3289262.tar.xz |
main/linux-grsec: more r8169 fixes
-rw-r--r-- | main/linux-grsec/APKBUILD | 4 | ||||
-rw-r--r-- | main/linux-grsec/r8169-fix-mdio_read-and-update-mdio_write-according-to-hw-specs.patch | 56 |
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 pkgname=linux-${_flavor} pkgver=2.6.32.15 _kernver=2.6.32 -pkgrel=3 +pkgrel=4 pkgdesc="Linux kernel with grsecurity" url=http://grsecurity.net depends="mkinitfs linux-firmware" @@ -32,6 +32,7 @@ source="ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-$_kernver.tar.bz2 0018-xfrm-Fix-crashes-in-xfrm_lookup.patch xfrm-fix-policy-unreferencing-on-larval-drop.patch r8169-fix-random-mdio_write-failures.patch + r8169-fix-mdio_read-and-update-mdio_write-according-to-hw-specs.patch x86-setup-When-restoring-the-screen-update-boot_params-screen_info.patch kernelconfig.x86 " @@ -162,5 +163,6 @@ c09b82b89a49ba2a3836a0bc3a3312f4 0015-xfrm-cache-bundles-instead-of-policies-fo 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 +b41ee19f13498fb25992fd60cd1126d4 r8169-fix-mdio_read-and-update-mdio_write-according-to-hw-specs.patch a1bcf76870b63a4a4035a8948fb758e2 x86-setup-When-restoring-the-screen-update-boot_params-screen_info.patch 442d7174a9755ed7bba22ebd4918bbe5 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 @@ +From patchwork Wed Jun 9 05:22:10 2010 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 8bit +Subject: r8169: fix mdio_read and update mdio_write according to hw specs +Date: Tue, 08 Jun 2010 19:22:10 -0000 +From: =?utf-8?b?VGltbyBUZXLDpHMgPHRpbW8udGVyYXNAaWtpLmZpPg==?= +X-Patchwork-Id: 55049 +Message-Id: <1276060930-15697-1-git-send-email-timo.teras@iki.fi> +To: netdev@vger.kernel.org +Cc: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>, + Francois Romieu <romieu@fr.zoreil.com>, Hayeswang <hayeswang@realtek.com> + +Realtek confirmed that a 20us delay is needed after mdio_read and +mdio_write operations. Reduce the delay in mdio_write, and add it +to mdio_read too. Also add a comment that the 20us is from hw specs. + +Signed-off-by: Timo Teräs <timo.teras@iki.fi> +Cc: Francois Romieu <romieu@fr.zoreil.com> +Cc: Hayeswang <hayeswang@realtek.com> + +--- +drivers/net/r8169.c | 12 +++++++++--- + 1 files changed, 9 insertions(+), 3 deletions(-) + +diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c +index 03a8318..96b6cfb 100644 +--- a/drivers/net/r8169.c ++++ b/drivers/net/r8169.c +@@ -560,10 +560,10 @@ static void mdio_write(void __iomem *ioaddr, int reg_addr, int value) + udelay(25); + } + /* +- * Some configurations require a small delay even after the write +- * completed indication or the next write might fail. ++ * According to hardware specs a 20us delay is required after write ++ * complete indication, but before sending next command. + */ +- udelay(25); ++ udelay(20); + } + + static int mdio_read(void __iomem *ioaddr, int reg_addr) +@@ -583,6 +583,12 @@ static int mdio_read(void __iomem *ioaddr, int reg_addr) + } + udelay(25); + } ++ /* ++ * According to hardware specs a 20us delay is required after read ++ * complete indication, but before sending next command. ++ */ ++ udelay(20); ++ + return value; + } + |