diff options
author | Michal Simek <michal.simek@xilinx.com> | 2016-05-18 12:48:57 +0200 |
---|---|---|
committer | Michal Simek <michal.simek@xilinx.com> | 2016-05-24 13:17:59 +0200 |
commit | ef5e821bd89aa059a20841e041221dadbf60aa7d (patch) | |
tree | 4561d886f5e471891c407cd784527509f71b841b /drivers/net/phy/marvell.c | |
parent | 55259e7cda875bff3e0fcfd5fc61478f40872841 (diff) | |
download | u-boot-ef5e821bd89aa059a20841e041221dadbf60aa7d.tar.gz u-boot-ef5e821bd89aa059a20841e041221dadbf60aa7d.tar.xz u-boot-ef5e821bd89aa059a20841e041221dadbf60aa7d.zip |
phy: Return correct error code when timeout happens
Return -ETIMEDOUT if timeout happens.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Diffstat (limited to 'drivers/net/phy/marvell.c')
-rw-r--r-- | drivers/net/phy/marvell.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c index b8b1157a0a..d24451be0a 100644 --- a/drivers/net/phy/marvell.c +++ b/drivers/net/phy/marvell.c @@ -103,7 +103,7 @@ static int m88e1011s_config(struct phy_device *phydev) /* Parse the 88E1011's status register for speed and duplex * information */ -static uint m88e1xxx_parse_status(struct phy_device *phydev) +static int m88e1xxx_parse_status(struct phy_device *phydev) { unsigned int speed; unsigned int mii_reg; @@ -120,7 +120,7 @@ static uint m88e1xxx_parse_status(struct phy_device *phydev) if (i > PHY_AUTONEGOTIATE_TIMEOUT) { puts(" TIMEOUT !\n"); phydev->link = 0; - break; + return -ETIMEDOUT; } if ((i++ % 1000) == 0) |