[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210204101550.21595-3-qiangqing.zhang@nxp.com>
Date: Thu, 4 Feb 2021 18:15:50 +0800
From: Joakim Zhang <qiangqing.zhang@....com>
To: peppe.cavallaro@...com, alexandre.torgue@...com,
joabreu@...opsys.com, davem@...emloft.net, kuba@...nel.org
Cc: netdev@...r.kernel.org, andrew@...n.ch, f.fainelli@...il.com,
willemdebruijn.kernel@...il.com
Subject: [PATCH net-next 2/2] net: stmmac: slightly adjust the order of the codes in stmmac_resume()
Slightly adjust the order of the codes in stmmac_resume(), remove the
check "if (!device_may_wakeup(priv->device) || !priv->plat->pmt)".
Signed-off-by: Joakim Zhang <qiangqing.zhang@....com>
---
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 11e0b30b2e01..94d4f5d294f4 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -5295,6 +5295,12 @@ int stmmac_resume(struct device *dev)
/* reset the phy so that it's ready */
if (priv->mii)
stmmac_mdio_reset(priv->mii);
+
+ rtnl_lock();
+ phylink_start(priv->phylink);
+ /* We may have called phylink_speed_down before */
+ phylink_speed_up(priv->phylink);
+ rtnl_unlock();
}
if (priv->plat->serdes_powerup) {
@@ -5305,14 +5311,6 @@ int stmmac_resume(struct device *dev)
return ret;
}
- if (!device_may_wakeup(priv->device) || !priv->plat->pmt) {
- rtnl_lock();
- phylink_start(priv->phylink);
- /* We may have called phylink_speed_down before */
- phylink_speed_up(priv->phylink);
- rtnl_unlock();
- }
-
rtnl_lock();
mutex_lock(&priv->lock);
--
2.17.1
Powered by blists - more mailing lists