Dear Timur Tabi,

> Now that phy_startup() can return an actual error code, check for that
> error code and abort network initialization if the PHY fails.
> 
> Signed-off-by: Timur Tabi <ti...@freescale.com>
> ---
>  drivers/net/fec_mxc.c         |    7 ++++++-
>  drivers/net/fm/eth.c          |    9 ++++++++-
>  drivers/net/sh_eth.c          |    6 +++++-
>  drivers/net/tsec.c            |    8 +++++++-
>  drivers/net/xilinx_axi_emac.c |    6 +++++-
>  drivers/net/xilinx_ll_temac.c |    8 +++++++-
>  6 files changed, 38 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
> index eee41d7..e62ae61 100644
> --- a/drivers/net/fec_mxc.c
> +++ b/drivers/net/fec_mxc.c
> @@ -510,7 +510,12 @@ static int fec_open(struct eth_device *edev)
>               fec_eth_phy_config(edev);
>       if (fec->phydev) {
>               /* Start up the PHY */
> -             phy_startup(fec->phydev);
> +             int ret = phy_startup(fec->phydev);
> +             if (ret) {
> +                     printf("Could not initialize PHY %s\n",
> +                            fec->phydev->dev->name);
> +                     return ret;
> +             }
>               speed = fec->phydev->speed;
>       } else {
>               speed = _100BASET;
For the FEC

Reviewed-by: Marek Vasut <ma...@denx.de>

Best regards,
Marek Vasut
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to