]> git.dujemihanovic.xyz Git - u-boot.git/commit
drivers: net: cpsw: abort init() on aneg timeout
authorSekhar Nori <nsekhar@ti.com>
Mon, 8 May 2017 15:19:56 +0000 (20:49 +0530)
committerJoe Hershberger <joe.hershberger@ni.com>
Fri, 2 Jun 2017 19:44:19 +0000 (14:44 -0500)
commit96d1d84c79b63e5882f09be451227f7145ea8599
tree4d451d679e44f65489ecf88893d0e477727d235a
parent6de046eaa74a2a0fb68f1055a1d38bc93f4f16c7
drivers: net: cpsw: abort init() on aneg timeout

Abort CPSW driver init when auto-negotiation of link
times out. Currently, the code ignores return status
of phy_startup(), and goes ahead with network operation
(like DHCP) even though the link may be down.

Instead, abort init process if link is down or if there
is another error, so phy_startup() can easily be retried
again. This also helps quick fallback to next network interface
(like USB RNDIS) without inordinate delay.

Tested on AM571x IDK and AM335x BeagleBone black.

Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
drivers/net/cpsw.c