[PATCH v1 3/3] net: dsa: sja1105: fall back to default speed configuration if no link was detected

Oleksij Rempel o.rempel at pengutronix.de
Thu Mar 16 06:42:09 PDT 2023


Rather than generating an error, revert to the default link
configuration. Some configuration is performed during the port pre-enable
sequence.

Signed-off-by: Oleksij Rempel <o.rempel at pengutronix.de>
---
 drivers/net/sja1105.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/sja1105.c b/drivers/net/sja1105.c
index 693730f96c..328e5a6369 100644
--- a/drivers/net/sja1105.c
+++ b/drivers/net/sja1105.c
@@ -2778,8 +2778,7 @@ static void sja1105_adjust_link(struct eth_device *edev)
 		mac[port].speed =
 			priv->dcfg->port_speed[SJA1105_SPEED_10MBPS];
 	} else {
-		dev_err(priv->dev, "Invalid PHY speed %d on port %d\n",
-			phy->speed, port);
+		mac[port].speed = priv->dcfg->port_speed[SJA1105_SPEED_AUTO];
 		return;
 	}
 
-- 
2.30.2




More information about the barebox mailing list