[PATCH v2 2/7] net: dwc_eth_qos: Return error code when start fails

Ramon Fried rfried.dev at gmail.com
Fri Oct 6 22:32:37 CEST 2023


On Sun, Oct 1, 2023 at 10:17 PM Jonas Karlman <jonas at kwiboo.se> wrote:
>
> Return error code when phy_connect fails or no link can be established.
>
> Signed-off-by: Jonas Karlman <jonas at kwiboo.se>
> Reviewed-by: Kever Yang <kever.yang at rock-chips.com>
> ---
> v2:
> - Collect r-b tag
>
>  drivers/net/dwc_eth_qos.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/net/dwc_eth_qos.c b/drivers/net/dwc_eth_qos.c
> index 555eaee3bbc3..7565e716823a 100644
> --- a/drivers/net/dwc_eth_qos.c
> +++ b/drivers/net/dwc_eth_qos.c
> @@ -811,6 +811,7 @@ static int eqos_start(struct udevice *dev)
>
>                 if (!eqos->phy) {
>                         pr_err("phy_connect() failed");
> +                       ret = -ENODEV;
>                         goto err_stop_resets;
>                 }
>
> @@ -838,6 +839,7 @@ static int eqos_start(struct udevice *dev)
>
>         if (!eqos->phy->link) {
>                 pr_err("No link");
> +               ret = -EAGAIN;
>                 goto err_shutdown_phy;
>         }
>
> --
> 2.42.0
>
Reviewed-by: Ramon Fried <rfried.dev at gmail.com>


More information about the U-Boot mailing list