mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-19 21:51:31 +00:00
net: phy: Increase link up delay in genphy_update_link()
I've noticed that in most cases when genphy_update_link() is called, the ethernet driver (mt7628-eth in this case) fails with the first ethernet packets. Resulting in a timeout of the first tftp command. Increasing the delay in the link check look from 1 to 50 ms and moving it below the BMSR register read fixes this issue, resulting in a stable ethernet traffic, even after initial link autonogotiation. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Weijie Gao <weijie.gao@mediatek.com> Cc: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
This commit is contained in:
parent
7d9701db40
commit
27c3f70f3b
1 changed files with 2 additions and 2 deletions
|
@ -256,11 +256,11 @@ int genphy_update_link(struct phy_device *phydev)
|
||||||
return -EINTR;
|
return -EINTR;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((i++ % 500) == 0)
|
if ((i++ % 10) == 0)
|
||||||
printf(".");
|
printf(".");
|
||||||
|
|
||||||
udelay(1000); /* 1 ms */
|
|
||||||
mii_reg = phy_read(phydev, MDIO_DEVAD_NONE, MII_BMSR);
|
mii_reg = phy_read(phydev, MDIO_DEVAD_NONE, MII_BMSR);
|
||||||
|
mdelay(50); /* 50 ms */
|
||||||
}
|
}
|
||||||
printf(" done\n");
|
printf(" done\n");
|
||||||
phydev->link = 1;
|
phydev->link = 1;
|
||||||
|
|
Loading…
Add table
Reference in a new issue