net: mvpp2: Fix 2.5G GMII_SPEED configurations
authorStefan Chulski <stefanc@marvell.com>
Mon, 3 May 2021 06:08:48 +0000 (08:08 +0200)
committerStefan Roese <sr@denx.de>
Thu, 20 May 2021 11:03:30 +0000 (13:03 +0200)
GMII_SPEED should be enabled for 2.5G speed

Signed-off-by: Stefan Chulski <stefanc@marvell.com>
Reviewed-by: Yan Markman <ymarkman@marvell.com>
Reviewed-by: Kostya Porotchkin <kostap@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
drivers/net/mvpp2.c

index 2043bdf..ec7cb89 100644 (file)
@@ -4445,7 +4445,8 @@ static void mvpp2_link_event(struct mvpp2_port *port)
                        if (phydev->duplex)
                                val |= MVPP2_GMAC_CONFIG_FULL_DUPLEX;
 
-                       if (phydev->speed == SPEED_1000)
+                       if (phydev->speed == SPEED_1000 ||
+                           phydev->speed == 2500)
                                val |= MVPP2_GMAC_CONFIG_GMII_SPEED;
                        else if (phydev->speed == SPEED_100)
                                val |= MVPP2_GMAC_CONFIG_MII_SPEED;