summaryrefslogtreecommitdiff
path: root/drivers/net/phy/phy.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2016-05-24 12:20:43 (GMT)
committerTom Rini <trini@konsulko.com>2016-05-24 12:20:43 (GMT)
commitec8fb48ce98987065493b27422200897cf0909f8 (patch)
treee56d70ee24a04ee26fe75ac2af46c22705da61ed /drivers/net/phy/phy.c
parentc98dc5a13399414fb651a80d05fa682236c4444e (diff)
parentad5b5801264e573bfbf17a20b04c546985c5bfc1 (diff)
downloadu-boot-fsl-qoriq-ec8fb48ce98987065493b27422200897cf0909f8.tar.xz
Merge branch 'master' of git://www.denx.de/git/u-boot-microblaze
Diffstat (limited to 'drivers/net/phy/phy.c')
-rw-r--r--drivers/net/phy/phy.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index 23c82bb..4b6c09f 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -248,7 +248,7 @@ int genphy_update_link(struct phy_device *phydev)
if (i > PHY_ANEG_TIMEOUT) {
printf(" TIMEOUT !\n");
phydev->link = 0;
- return 0;
+ return -ETIMEDOUT;
}
if (ctrlc()) {
@@ -431,10 +431,13 @@ int genphy_config(struct phy_device *phydev)
int genphy_startup(struct phy_device *phydev)
{
- genphy_update_link(phydev);
- genphy_parse_link(phydev);
+ int ret;
- return 0;
+ ret = genphy_update_link(phydev);
+ if (ret)
+ return ret;
+
+ return genphy_parse_link(phydev);
}
int genphy_shutdown(struct phy_device *phydev)
@@ -876,9 +879,7 @@ __weak int board_phy_config(struct phy_device *phydev)
int phy_config(struct phy_device *phydev)
{
/* Invoke an optional board-specific helper */
- board_phy_config(phydev);
-
- return 0;
+ return board_phy_config(phydev);
}
int phy_shutdown(struct phy_device *phydev)