]> git.baikalelectronics.ru Git - uboot.git/commitdiff
net: mvneta: Fix 10Mbps speed
authorMarek Behún <marek.behun@nic.cz>
Wed, 27 Apr 2022 10:41:45 +0000 (12:41 +0200)
committerStefan Roese <sr@denx.de>
Wed, 4 May 2022 05:05:51 +0000 (07:05 +0200)
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 <marek.behun@nic.cz>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
drivers/net/mvneta.c

index d1c5f7930df2c05e20d4181612ec5742720f7333..79cdb93341c1d519055739789ee9ed5583a1d121 100644 (file)
@@ -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);