diff options
author | Michal Simek <michal.simek@xilinx.com> | 2013-11-21 15:15:51 (GMT) |
---|---|---|
committer | Michal Simek <michal.simek@xilinx.com> | 2014-02-04 15:42:45 (GMT) |
commit | 6f9b93723a39dc6d6231c842bb0166bd6258ee53 (patch) | |
tree | 2039b5daf76023f3af3c25a3f7525ede25ecf9af /drivers/net/xilinx_axi_emac.c | |
parent | 4ed4aa20de50661de89dbe7896595e2b0bf44d5c (diff) | |
download | u-boot-fsl-qoriq-6f9b93723a39dc6d6231c842bb0166bd6258ee53.tar.xz |
net: axi_emac: Check if phy was correctly detected
As tsec and fm drivers checking phydev->link
ensure that u-boot don't try access device if link is not ready.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Diffstat (limited to 'drivers/net/xilinx_axi_emac.c')
-rw-r--r-- | drivers/net/xilinx_axi_emac.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/xilinx_axi_emac.c b/drivers/net/xilinx_axi_emac.c index bb5044b..262b67b 100644 --- a/drivers/net/xilinx_axi_emac.c +++ b/drivers/net/xilinx_axi_emac.c @@ -261,6 +261,10 @@ static int setup_phy(struct eth_device *dev) phydev->dev->name); return 0; } + if (!phydev->link) { + printf("%s: No link.\n", phydev->dev->name); + return 0; + } switch (phydev->speed) { case 1000: |