In the deepest low power modes the pinctrl are lost and never restored if the interface is down. This commit makes sure that pinctrl modes are set in all the cases. Signed-off-by: Christophe Roullier --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index c63099a77cc0c..067b17f03cd09 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -8133,6 +8133,8 @@ int stmmac_suspend(struct device *dev) ethtool_mmsv_stop(&priv->fpe_cfg.mmsv); suspend_bsp: + /* Select sleep pin state */ + pinctrl_pm_select_sleep_state(dev); if (priv->plat->suspend) return priv->plat->suspend(dev, priv->plat->bsp_priv); @@ -8194,8 +8196,11 @@ int stmmac_resume(struct device *dev) return ret; } - if (!netif_running(ndev)) + if (!netif_running(ndev)) { + /* Select default pin state */ + pinctrl_pm_select_default_state(priv->device); return 0; + } /* Power Down bit, into the PM register, is cleared * automatically as soon as a magic packet or a Wake-up frame -- 2.43.0