]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
net: zynq_gem: Modify phy supported features after max-speed was set
authorSiva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Wed, 27 Mar 2019 12:09:59 +0000 (17:39 +0530)
committerMichal Simek <michal.simek@xilinx.com>
Tue, 16 Apr 2019 09:52:02 +0000 (11:52 +0200)
The phydev supported features were reset in phy_set_supported() so,
move the setting of driver supported features after this so that it
wont lost in phy_set_supported().

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drivers/net/zynq_gem.c

index 3bd0093b7ab1e001939136e140fcf52b0a37e53c..94a04fe75005bc5720f51ddbf69c259423c099d8 100644 (file)
@@ -359,14 +359,15 @@ static int zynq_phy_init(struct udevice *dev)
        if (!priv->phydev)
                return -ENODEV;
 
-       priv->phydev->supported &= supported | ADVERTISED_Pause |
-                                 ADVERTISED_Asym_Pause;
        if (priv->max_speed) {
                ret = phy_set_supported(priv->phydev, priv->max_speed);
                if (ret)
                        return ret;
        }
 
+       priv->phydev->supported &= supported | ADVERTISED_Pause |
+                                 ADVERTISED_Asym_Pause;
+
        priv->phydev->advertising = priv->phydev->supported;
        priv->phydev->node = priv->phy_of_node;