diff options
author | Timo Teräs <timo.teras@iki.fi> | 2010-06-09 17:31:48 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-08-02 10:29:19 -0700 |
commit | efa4be3c2cb92b1d9d7d04ab91736cfc937a9764 (patch) | |
tree | cbf0232d52dbda7aef179d4ad123e8fa912acb4b /drivers | |
parent | 3e3435c62f1c8df22a08d50efea3b0ad910b1284 (diff) |
r8169: fix mdio_read and update mdio_write according to hw specs
[ Upstream commit 81a95f049962ec20a9aed888e676208b206f0f2e ]
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>
Acked-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | 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 bb273b6cf37..17382c390b8 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c @@ -558,10 +558,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) @@ -581,6 +581,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; } |