diff options
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index 29dd87c675dc..8ea770a89f25 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | |||
@@ -2011,12 +2011,13 @@ static int stmmac_suspend(struct device *dev) | |||
2011 | if (!ndev || !netif_running(ndev)) | 2011 | if (!ndev || !netif_running(ndev)) |
2012 | return 0; | 2012 | return 0; |
2013 | 2013 | ||
2014 | if (priv->phydev) | ||
2015 | phy_stop(priv->phydev); | ||
2016 | |||
2014 | spin_lock(&priv->lock); | 2017 | spin_lock(&priv->lock); |
2015 | 2018 | ||
2016 | netif_device_detach(ndev); | 2019 | netif_device_detach(ndev); |
2017 | netif_stop_queue(ndev); | 2020 | netif_stop_queue(ndev); |
2018 | if (priv->phydev) | ||
2019 | phy_stop(priv->phydev); | ||
2020 | 2021 | ||
2021 | #ifdef CONFIG_STMMAC_TIMER | 2022 | #ifdef CONFIG_STMMAC_TIMER |
2022 | priv->tm->timer_stop(); | 2023 | priv->tm->timer_stop(); |
@@ -2074,12 +2075,13 @@ static int stmmac_resume(struct device *dev) | |||
2074 | #endif | 2075 | #endif |
2075 | napi_enable(&priv->napi); | 2076 | napi_enable(&priv->napi); |
2076 | 2077 | ||
2077 | if (priv->phydev) | ||
2078 | phy_start(priv->phydev); | ||
2079 | |||
2080 | netif_start_queue(ndev); | 2078 | netif_start_queue(ndev); |
2081 | 2079 | ||
2082 | spin_unlock(&priv->lock); | 2080 | spin_unlock(&priv->lock); |
2081 | |||
2082 | if (priv->phydev) | ||
2083 | phy_start(priv->phydev); | ||
2084 | |||
2083 | return 0; | 2085 | return 0; |
2084 | } | 2086 | } |
2085 | 2087 | ||