mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2026-03-11 03:28:39 +01:00
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>
This commit is contained in:
parent
4ed4aa20de
commit
6f9b93723a
1 changed files with 4 additions and 0 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue