diff options
Diffstat (limited to 'drivers/net/ethernet/stmicro/stmmac/stmmac_main.c')
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index 5dd303212e28..27b4376b0bb2 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -4460,6 +4460,7 @@ int stmmac_suspend(struct device *dev) mutex_lock(&priv->lock); + netif_carrier_off(ndev); netif_device_detach(ndev); stmmac_stop_all_queues(priv); @@ -4477,7 +4478,8 @@ int stmmac_suspend(struct device *dev) pinctrl_pm_select_sleep_state(priv->device); /* Disable clock in case of PWM is off */ clk_disable(priv->plat->pclk); - clk_disable(priv->plat->stmmac_clk); + if (!of_machine_is_compatible("altr,socfpga-stratix10")) + clk_disable(priv->plat->stmmac_clk); } mutex_unlock(&priv->lock); @@ -4528,6 +4530,9 @@ int stmmac_resume(struct device *dev) if (!netif_running(ndev)) return 0; + if (ndev->phydev) + phy_start(ndev->phydev); + /* Power Down bit, into the PM register, is cleared * automatically as soon as a magic packet or a Wake-up frame * is received. Anyway, it's better to manually clear @@ -4567,9 +4572,6 @@ int stmmac_resume(struct device *dev) mutex_unlock(&priv->lock); - if (ndev->phydev) - phy_start(ndev->phydev); - return 0; } EXPORT_SYMBOL_GPL(stmmac_resume); |