summaryrefslogtreecommitdiff
path: root/drivers/net/tsec.c
diff options
context:
space:
mode:
authorAnton Vorontsov <avorontsov@ru.mvista.com>2008-03-14 23:20:30 +0300
committerKim Phillips <kim.phillips@freescale.com>2008-03-25 19:16:48 -0500
commitc7604783b236e368f225efb7b3efb418fe20b404 (patch)
treee4d998e18a74c97c598668d27e5e158159a6fb11 /drivers/net/tsec.c
parent7fa9cbb00dc83fcf175042b6f20c2c9bce9a15f4 (diff)
tsec: fix link detection for the RTL8211B PHY
RTL8211B sets link state register after autonegotiation complete, so with bootdelay=0 RTL8211B will report lack of the link. To fix this, we should wait for aneg to complete, even if the link is currently down. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Diffstat (limited to 'drivers/net/tsec.c')
-rw-r--r--drivers/net/tsec.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/tsec.c b/drivers/net/tsec.c
index e91d9eadc1..431a8d2f23 100644
--- a/drivers/net/tsec.c
+++ b/drivers/net/tsec.c
@@ -583,10 +583,11 @@ uint mii_parse_RTL8211B_sr(uint mii_reg, struct tsec_private * priv)
uint speed;
mii_reg = read_phy_reg(priv, MIIM_RTL8211B_PHY_STATUS);
- if ((mii_reg & MIIM_RTL8211B_PHYSTAT_LINK) &&
- !(mii_reg & MIIM_RTL8211B_PHYSTAT_SPDDONE)) {
+ if (!(mii_reg & MIIM_RTL8211B_PHYSTAT_SPDDONE)) {
int i = 0;
+ /* in case of timeout ->link is cleared */
+ priv->link = 1;
puts("Waiting for PHY realtime link");
while (!(mii_reg & MIIM_RTL8211B_PHYSTAT_SPDDONE)) {
/* Timeout reached ? */