From 47f0e8e21a16a97963b639df3529759840730d65 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Beh=C3=BAn?= Date: Wed, 27 Apr 2022 12:41:45 +0200 Subject: [PATCH] net: mvneta: Fix 10Mbps speed MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit In mvneta_adjust_link() we need to set MII_SPEED bit only if PHY reports the speed at 100Mbps. Signed-off-by: Marek Behún Reviewed-by: Ramon Fried Reviewed-by: Stefan Roese --- drivers/net/mvneta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/mvneta.c b/drivers/net/mvneta.c index d1c5f7930d..79cdb93341 100644 --- a/drivers/net/mvneta.c +++ b/drivers/net/mvneta.c @@ -1195,7 +1195,7 @@ static void mvneta_adjust_link(struct udevice *dev) if (phydev->speed == SPEED_1000) val |= MVNETA_GMAC_CONFIG_GMII_SPEED; - else + else if (pp->speed == SPEED_100) val |= MVNETA_GMAC_CONFIG_MII_SPEED; mvreg_write(pp, MVNETA_GMAC_AUTONEG_CONFIG, val); -- 2.39.5