diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index c1298a0aef0692108e04deb93ef600c2862d3100..df7d8d618233dc6d63c040c6a681a30b8c4c79d6 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -43,6 +43,7 @@ #include #include #include +#include #ifdef CONFIG_STMMAC_DEBUG_FS #include #include @@ -2864,6 +2865,7 @@ int stmmac_suspend(struct net_device *ndev) priv->hw->mac->pmt(priv->ioaddr, priv->wolopts); else { stmmac_set_mac(priv->ioaddr, false); + pinctrl_pm_select_sleep_state(priv->device); /* Disable clock in case of PWM is off */ clk_disable_unprepare(priv->stmmac_clk); } @@ -2890,6 +2892,7 @@ int stmmac_resume(struct net_device *ndev) if (device_may_wakeup(priv->device)) { priv->hw->mac->pmt(priv->ioaddr, 0); } else { + pinctrl_pm_select_default_state(priv->device); /* enable the clk prevously disabled */ clk_prepare_enable(priv->stmmac_clk); /* reset the phy so that it's ready */