diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2012-12-11 12:14:43 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2012-12-12 20:02:44 +0100 |
commit | a1a50a465485dea02aa58ed861ae4594922e7c54 (patch) | |
tree | 745a0b95440f20cbcaf11802222928d0d69f6305 /net | |
parent | 11cb1620fec786ced1be458a21c4c53ee6870d1d (diff) | |
download | barebox-a1a50a465485dea02aa58ed861ae4594922e7c54.tar.gz barebox-a1a50a465485dea02aa58ed861ae4594922e7c54.tar.xz |
net phylib: force to wait for link
When starting a network device wait until the link is up. Otherwise
autobooting does not work with little timeout and several attempts
have to be made until the network is finally up.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'net')
-rw-r--r-- | net/eth.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -138,6 +138,9 @@ static int eth_carrier_check(int force) if (!eth_current->phydev) return 0; + if (force) + phy_wait_aneg_done(eth_current->phydev); + if (force || is_timeout(last_link_check, 5 * SECOND) || !eth_current->phydev->link) { ret = phy_update_status(eth_current->phydev); |