]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
net: stmmac: Enable mac_managed_pm phylink config
authorShenwei Wang <shenwei.wang@nxp.com>
Fri, 14 Oct 2022 14:47:29 +0000 (09:47 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 29 Oct 2022 08:08:32 +0000 (10:08 +0200)
[ Upstream commit f151c147b3afcf92dedff53f5f0e965414e4fd2c ]

Enable the mac_managed_pm configuration in the phylink_config
structure to avoid the kernel warning during system resume.

Fixes: 744d23c71af3 ("net: phy: Warn about incorrect mdio_bus_phy_resume() state")
Signed-off-by: Shenwei Wang <shenwei.wang@nxp.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c

index 9083159b93f140ba9fabe003afd0238cff7b4c32..bc060ef558d373faf1ebac1c5f4a078479c31847 100644 (file)
@@ -1214,6 +1214,7 @@ static int stmmac_phy_setup(struct stmmac_priv *priv)
        if (priv->plat->tx_queues_to_use > 1)
                priv->phylink_config.mac_capabilities &=
                        ~(MAC_10HD | MAC_100HD | MAC_1000HD);
+       priv->phylink_config.mac_managed_pm = true;
 
        phylink = phylink_create(&priv->phylink_config, fwnode,
                                 mode, &stmmac_phylink_mac_ops);