Commit 206f54b6 authored by Doug Berger's avatar Doug Berger Committed by David S. Miller

net: bcmgenet: Utilize bcmgenet_set_features() during resume/open

During driver resume and open, the HW may have lost its context/state,
utilize bcmgenet_set_features() to make sure we do restore the correct
set of features that were previously configured.
Signed-off-by: default avatarDoug Berger <opendmb@gmail.com>
Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f63db4ef
...@@ -2884,6 +2884,11 @@ static int bcmgenet_open(struct net_device *dev) ...@@ -2884,6 +2884,11 @@ static int bcmgenet_open(struct net_device *dev)
init_umac(priv); init_umac(priv);
/* Apply features again in case we changed them while interface was
* down
*/
bcmgenet_set_features(dev, dev->features);
bcmgenet_set_hw_addr(priv, dev->dev_addr); bcmgenet_set_hw_addr(priv, dev->dev_addr);
if (priv->internal_phy) { if (priv->internal_phy) {
...@@ -3687,6 +3692,9 @@ static int bcmgenet_resume(struct device *d) ...@@ -3687,6 +3692,9 @@ static int bcmgenet_resume(struct device *d)
genphy_config_aneg(dev->phydev); genphy_config_aneg(dev->phydev);
bcmgenet_mii_config(priv->dev, false); bcmgenet_mii_config(priv->dev, false);
/* Restore enabled features */
bcmgenet_set_features(dev, dev->features);
bcmgenet_set_hw_addr(priv, dev->dev_addr); bcmgenet_set_hw_addr(priv, dev->dev_addr);
if (priv->internal_phy) { if (priv->internal_phy) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment