]> git.karo-electronics.de Git - karo-tx-linux.git/commit
r8169: fix random mdio_write failures
authorTimo Teräs <timo.teras@iki.fi>
Sun, 6 Jun 2010 22:38:47 +0000 (15:38 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 2 Aug 2010 17:29:18 +0000 (10:29 -0700)
commit3e3435c62f1c8df22a08d50efea3b0ad910b1284
treee9bd1bc08a3ef1e24917f26821e4047424e31dea
parent71bd6170745cbaac9f16817c23cc830edc89e1fe
r8169: fix random mdio_write failures

[ Upstream commit 024a07bacf8287a6ddfa83e9d5b951c5e8b4070e ]

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/net/r8169.c