driver: net: ethernet: mtk_star_emac: fix suspend/resume issue
Subsystems (5)
PATCH 1/1 driver: net: ethernet: mtk_star_emac: fix suspend/resume issue
From: Yanqing Wang <[email protected]>
Identify the cause of the suspend/resume hang: netif_carrier_off() is called during link state changes and becomes stuck while executing linkwatch_work().
To resolve this issue, call netif_device_detach() during the Ethernet suspend process to temporarily detach the network device from the kernel and prevent the suspend/resume hang.
--- drivers/net/ethernet/mediatek/mtk_star_emac.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/net/ethernet/mediatek/mtk_star_emac.c +4 -0
@@ -1463,6 +1463,8 @@ static __maybe_unused int mtk_star_suspend(struct device *dev)if (netif_running (ndev))mtk_star_disable (ndev); +netif_device_detach (ndev); +clk_bulk_disable_unprepare (MTK_STAR_NCLKS , priv->clks);return 0 ;
@@ -1487,6 +1489,8 @@ static __maybe_unused int mtk_star_resume(struct device *dev)clk_bulk_disable_unprepare (MTK_STAR_NCLKS , priv->clks); } +netif_device_attach (ndev); +return ret; }
Signature · 1 line
2.45.2
kernel test robot
build botFYI: kernel test robot notices the stable kernel rule is not satisfied.
Hi,
Thanks for your patch.
FYI: kernel test robot notices the stable kernel rule is not satisfied.
The check is based on https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html#option-1
Rule: add the tag "Cc: [email protected]" in the sign-off area to have the patch automatically included in the stable tree.
Subject: [PATCH] driver: net: ethernet: mtk_star_emac: fix suspend/resume issue
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
This patch was applied to netdev/net.git (main) by Paolo Abeni <[email protected]>:
Hello:
This patch was applied to netdev/net.git (main)
by Paolo Abeni <[email protected]>:
Quoted 11 lines · On Wed, 28 May 2025 15:53:51 +0800 you wrote:
From: Yanqing Wang <[email protected]>
Identify the cause of the suspend/resume hang:
netif_carrier_off()is called during link state changes and becomes stuck while executinglinkwatch_work().To resolve this issue, call
netif_device_detach()during the Ethernet suspend process to temporarily detach the network device from the kernel and prevent the suspend/resume hang.[...]
Here is the summary with links:
- driver: net: ethernet: mtk_star_emac: fix suspend/resume issue
https://git.kernel.org/netdev/net/c/ba99c627aac8
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html