[PATCH 2/7] net: dwc_eth_qos: Return error code when start fails
Jonas Karlman
jonas at kwiboo.se
Mon Aug 7 02:08:21 CEST 2023
Return error code when phy_connect fails or no link can be established.
Signed-off-by: Jonas Karlman <jonas at kwiboo.se>
---
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.41.0
More information about the U-Boot
mailing list