diff mbox series

[v4,2/2] net: stmmac: Enable mac_managed_pm phylink config

Message ID 20221010204827.153296-3-shenwei.wang@nxp.com (mailing list archive)
State New, archived
Headers show
Series net: phylink: add phylink_set_mac_pm() helper | expand

Commit Message

Shenwei Wang Oct. 10, 2022, 8:48 p.m. UTC
Enable the mac_managed_pm configuration in the phylink_config
structure to avoid the kernel warning during system resume.

Signed-off-by: Shenwei Wang <shenwei.wang@nxp.com>
---
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Jakub Kicinski Oct. 13, 2022, 12:45 a.m. UTC | #1
On Mon, 10 Oct 2022 15:48:27 -0500 Shenwei Wang wrote:
> Enable the mac_managed_pm configuration in the phylink_config
> structure to avoid the kernel warning during system resume.
> 
> Signed-off-by: Shenwei Wang <shenwei.wang@nxp.com>

Could you add a Fixes tag pointing to where the warning first appeared?
diff mbox series

Patch

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 8418e795cc21..537e8e61bb97 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -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);