[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240126024433.2928223-1-xiaoning.wang@nxp.com>
Date: Fri, 26 Jan 2024 10:44:32 +0800
From: Clark Wang <xiaoning.wang@....com>
To: alexandre.torgue@...s.st.com,
joabreu@...opsys.com,
davem@...emloft.net,
edumazet@...gle.com,
kuba@...nel.org,
pabeni@...hat.com,
mcoquelin.stm32@...il.com,
shawnguo@...nel.org,
s.hauer@...gutronix.de,
kernel@...gutronix.de,
festevam@...il.com
Cc: linux-imx@....com,
netdev@...r.kernel.org,
linux-stm32@...md-mailman.stormreply.com,
linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] net: stmmac: fix wrong place to call pinctrl state change
The previous patch put the phylink_suspend after the pm_runtime_force_suspend
to fix an issue. But in phylink_suspend, it will call mdio read/write. If the
iomux of the pins of MDIO bus have been changed to others, the MDIO bus will
not functional.
So put pinctrl_pm_select_sleep_state to the right place to fix this issue.
Fixes: 90702dcd19c0 ("net: stmmac: fix MAC not working when system resume back with WoL active")
Signed-off-by: Clark Wang <xiaoning.wang@....com>
Reviewed-by: Wei Fang <wei.fang@....com>
---
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index b334eb16da23..9104ebf49c5d 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -7851,7 +7851,6 @@ int stmmac_suspend(struct device *dev)
priv->irq_wake = 1;
} else {
stmmac_mac_set(priv, priv->ioaddr, false);
- pinctrl_pm_select_sleep_state(priv->device);
}
mutex_unlock(&priv->lock);
@@ -7863,6 +7862,7 @@ int stmmac_suspend(struct device *dev)
if (device_may_wakeup(priv->device))
phylink_speed_down(priv->phylink, false);
phylink_suspend(priv->phylink, false);
+ pinctrl_pm_select_sleep_state(priv->device);
}
rtnl_unlock();
--
2.34.1
Powered by blists - more mailing lists