diff mbox series

[v3,7/7] net: enetc: propagate the return code from phy_startup() to eth_ops::start

Message ID 20210629175317.2607470-8-vladimir.oltean@nxp.com
State Accepted
Commit c4428507683d2abb840e0752feea8f2fa465ca94
Delegated to: Ramon Fried
Headers show
Series Fixes for the NXP LS1028A-QDS boards | expand

Commit Message

Vladimir Oltean June 29, 2021, 5:53 p.m. UTC
Make sure that errors in the PHY driver .startup() method, such as no
link, are propagated and not ignored.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
---
v2->v3: patch is new

 drivers/net/fsl_enetc.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Ramon Fried June 29, 2021, 11:05 p.m. UTC | #1
On Tue, Jun 29, 2021 at 8:55 PM Vladimir Oltean <vladimir.oltean@nxp.com> wrote:
>
> Make sure that errors in the PHY driver .startup() method, such as no
> link, are propagated and not ignored.
>
> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
> ---
> v2->v3: patch is new
>
>  drivers/net/fsl_enetc.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/net/fsl_enetc.c b/drivers/net/fsl_enetc.c
> index 6a5a38c1ffe2..566cdc7e546a 100644
> --- a/drivers/net/fsl_enetc.c
> +++ b/drivers/net/fsl_enetc.c
> @@ -568,11 +568,9 @@ static int enetc_start(struct udevice *dev)
>         enetc_setup_tx_bdr(dev);
>         enetc_setup_rx_bdr(dev);
>
> -       phy_startup(priv->phy);
> -
>         enetc_setup_mac_iface(dev, priv->phy);
>
> -       return 0;
> +       return phy_startup(priv->phy);
>  }
>
>  /*
> --
> 2.25.1
>
Applied to u-boot-net/master, Thanks !
Ramon
diff mbox series

Patch

diff --git a/drivers/net/fsl_enetc.c b/drivers/net/fsl_enetc.c
index 6a5a38c1ffe2..566cdc7e546a 100644
--- a/drivers/net/fsl_enetc.c
+++ b/drivers/net/fsl_enetc.c
@@ -568,11 +568,9 @@  static int enetc_start(struct udevice *dev)
 	enetc_setup_tx_bdr(dev);
 	enetc_setup_rx_bdr(dev);
 
-	phy_startup(priv->phy);
-
 	enetc_setup_mac_iface(dev, priv->phy);
 
-	return 0;
+	return phy_startup(priv->phy);
 }
 
 /*