[kernel] r15880 - in dists/sid/linux-2.6/debian: . patches/bugfix/all patches/series

Ben Hutchings benh at alioth.debian.org
Wed Jun 16 02:04:42 UTC 2010


Author: benh
Date: Wed Jun 16 02:04:02 2010
New Revision: 15880

Log:
r8169: Fix MDIO timing (Closes: #583139)

Added:
   dists/sid/linux-2.6/debian/patches/bugfix/all/r8169-fix-mdio_read-and-update-mdio_write.patch
   dists/sid/linux-2.6/debian/patches/bugfix/all/r8169-fix-random-mdio_write-failures.patch
Modified:
   dists/sid/linux-2.6/debian/changelog
   dists/sid/linux-2.6/debian/patches/series/16

Modified: dists/sid/linux-2.6/debian/changelog
==============================================================================
--- dists/sid/linux-2.6/debian/changelog	Wed Jun 16 01:06:19 2010	(r15879)
+++ dists/sid/linux-2.6/debian/changelog	Wed Jun 16 02:04:02 2010	(r15880)
@@ -30,6 +30,7 @@
     - option, qcserial: Use generic USB WWAN code
     - qcserial: Add support for Qualcomm Gobi 2000 devices
   * radeon: Fix MacBook Pro connector quirk (Closes: #585943)
+  * r8169: Fix MDIO timing (Closes: #583139)
 
   [ Aurelien Jarno ]
   * [sh4] fix sh_tmu clocksource following recent nohz changes.

Added: dists/sid/linux-2.6/debian/patches/bugfix/all/r8169-fix-mdio_read-and-update-mdio_write.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/sid/linux-2.6/debian/patches/bugfix/all/r8169-fix-mdio_read-and-update-mdio_write.patch	Wed Jun 16 02:04:02 2010	(r15880)
@@ -0,0 +1,51 @@
+From: Timo Teräs <timo.teras at iki.fi>
+Date: Wed, 9 Jun 2010 17:31:48 -0700
+Subject: [PATCH] r8169: fix mdio_read and update mdio_write according to hw specs
+
+commit 81a95f049962ec20a9aed888e676208b206f0f2e upstream.
+
+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 at iki.fi>
+Acked-by: Francois Romieu <romieu at fr.zoreil.com>
+Signed-off-by: David S. Miller <davem at davemloft.net>
+---
+ 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;
+ }
+ 
+-- 
+1.7.1
+

Added: dists/sid/linux-2.6/debian/patches/bugfix/all/r8169-fix-random-mdio_write-failures.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/sid/linux-2.6/debian/patches/bugfix/all/r8169-fix-random-mdio_write-failures.patch	Wed Jun 16 02:04:02 2010	(r15880)
@@ -0,0 +1,46 @@
+From: Timo Teräs <timo.teras at iki.fi>
+Date: Sun, 6 Jun 2010 15:38:47 -0700
+Subject: [PATCH] r8169: fix random mdio_write failures
+
+commit 024a07bacf8287a6ddfa83e9d5b951c5e8b4070e upstream.
+
+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 at iki.fi>
+Acked-off-by: Francois Romieu <romieu at fr.zoreil.com>
+Signed-off-by: David S. Miller <davem at 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
+

Modified: dists/sid/linux-2.6/debian/patches/series/16
==============================================================================
--- dists/sid/linux-2.6/debian/patches/series/16	Wed Jun 16 01:06:19 2010	(r15879)
+++ dists/sid/linux-2.6/debian/patches/series/16	Wed Jun 16 02:04:02 2010	(r15880)
@@ -143,3 +143,5 @@
 + features/all/USB-qcserial-Use-generic-USB-wwan-code.patch
 + features/all/USB-qcserial-Add-support-for-Qualcomm-Gobi-2000.patch
 + bugfix/x86/drm-radeon-kms-fix-macbookpro-connector-quirk.patch
++ bugfix/all/r8169-fix-random-mdio_write-failures.patch
++ bugfix/all/r8169-fix-mdio_read-and-update-mdio_write.patch



More information about the Kernel-svn-changes mailing list