net: axienet: Set mac_managed_pm
PATCH 1/1 net: axienet: Set mac_managed_pm
The external PHY will undergo a soft reset twice during the resume process when it wake up from suspend. The first reset occurs when the axienet driver calls phylink_of_phy_connect(), and the second occurs when mdio_bus_phy_resume() invokes phy_init_hw(). The second soft reset of the external PHY does not reinitialize the internal PHY, which causes issues with the internal PHY, resulting in the PHY link being down. To prevent this, setting the mac_managed_pm flag skips the mdio_bus_phy_resume() function.
--- drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/ethernet/xilinx/xilinx_axienet_main.c +1 -0
@@ -3078,6 +3078,7 @@ static int axienet_probe(struct platform_device *pdev) lp->phylink_config.dev = &ndev->dev; lp->phylink_config.type =PHYLINK_NETDEV ; + lp->phylink_config.mac_managed_pm = true; lp->phylink_config.mac_capabilities =MAC_SYM_PAUSE |MAC_ASYM_PAUSE |MAC_10FD |MAC_100FD |MAC_1000FD ;
Signature · 1 line
2.17.1
On 2/16/2025 9:58 PM, Nick Hu wrote:
Nit: subject should include the "net" prefix since this is clearly a bug fix.
Quoted 9 lines
The external PHY will undergo a soft reset twice during the resume process when it wake up from suspend. The first reset occurs when the axienet driver calls
phylink_of_phy_connect(), and the second occurs whenmdio_bus_phy_resume()invokesphy_init_hw(). The second soft reset of the external PHY does not reinitialize the internal PHY, which causes issues with the internal PHY, resulting in the PHY link being down. To prevent this, setting themac_managed_pmflag skips themdio_bus_phy_resume()function.
Quoted 3 lines
Fixes a129b41fe0a8 ("Revert "net: phy: dp83867: perform soft reset and retain established link"")Signed-off-by Nick Hu <[email protected]>---
Otherwise, the fix seems correct to me.
Quoted 15 lines
drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 1 + 1 file changed, 1 insertion(+)drivers/net/ethernet/xilinx/xilinx_axienet_main.c +1
-0@@ -3078,6 +3078,7 @@ static int axienet_probe(struct platform_device *pdev) lp->phylink_config.dev = &ndev->dev; lp->phylink_config.type =PHYLINK_NETDEV ; + lp->phylink_config.mac_managed_pm = true; lp->phylink_config.mac_capabilities =MAC_SYM_PAUSE |MAC_ASYM_PAUSE |MAC_10FD |MAC_100FD |MAC_1000FD ;
Hi Jacob
Quoted 7 lines · Jacob Keller
On 2/16/2025 9:58 PM, Nick Hu wrote:
Nit: subject should include the "net" prefix since this is clearly a bug fix.
I've added the 'net' prefix to the subject 'net: axienet: Set mac_managed_pm'. Is there something I'm missing?
Quoted 26 lines
Quoted 9 lines
The external PHY will undergo a soft reset twice during the resume process when it wake up from suspend. The first reset occurs when the axienet driver calls
phylink_of_phy_connect(), and the second occurs whenmdio_bus_phy_resume()invokesphy_init_hw(). The second soft reset of the external PHY does not reinitialize the internal PHY, which causes issues with the internal PHY, resulting in the PHY link being down. To prevent this, setting themac_managed_pmflag skips themdio_bus_phy_resume()function.Quoted 3 lines
Fixes a129b41fe0a8 ("Revert "net: phy: dp83867: perform soft reset and retain established link"")Signed-off-by Nick Hu <[email protected]>---
Otherwise, the fix seems correct to me.
Reviewed-by Jacob Keller <[email protected]>Quoted 9 lines
drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 1 + 1 file changed, 1 insertion(+)drivers/net/ethernet/xilinx/xilinx_axienet_main.c +0
-0@@ -3078,6 +3078,7 @@ static int axienet_probe(struct platform_device *pdev)
Quoted 7 lines
drivers/net/ethernet/xilinx/xilinx_axienet_main.c static int axienet_probe(struct platform_device *pdev) · line 3084
Quoted 6 lines
drivers/net/ethernet/xilinx/xilinx_axienet_main.c +1
-0lp->phylink_config.dev = &ndev->dev; lp->phylink_config.type =PHYLINK_NETDEV ; + lp->phylink_config.mac_managed_pm = true; lp->phylink_config.mac_capabilities =MAC_SYM_PAUSE |MAC_ASYM_PAUSE |MAC_10FD |MAC_100FD |MAC_1000FD ;
Regards,
Nick
Quoted 6 lines · Nick Hu
Hi Jacob
Quoted 3 lines · Jacob Keller
Quoted 7 lines
Quoted 4 lines · Nick Hu
Nit: subject should include the "net" prefix since this is clearly a bug fix.
I've added the 'net' prefix to the subject 'net: axienet: Set
mac_managed_pm'. Is there something I'm missing?
It should be [PATCH net] net: axienet: Set mac_managed_pm Like here for example [1]. You can look at netdev FAQ [2]. It is described there how to specify the subject.
Probably you don't need to resend it only because of that.
[1] https://lore.kernel.org/netdev/CAL+tcoC3TuZPTwnHTDvXC+JPoJbgW2UywZ2=xv=E=utokb3pCQ@mail.gmail.com/T/#m2b5603fbf355216ab035aa0f69c10c5f4ba98772
[2] https://www.kernel.org/doc/Documentation/networking/netdev-FAQ.txt
Thanks,
Michal
Quoted 36 lines
Quoted 26 lines
Quoted 9 lines
The external PHY will undergo a soft reset twice during the resume process when it wake up from suspend. The first reset occurs when the axienet driver calls
phylink_of_phy_connect(), and the second occurs whenmdio_bus_phy_resume()invokesphy_init_hw(). The second soft reset of the external PHY does not reinitialize the internal PHY, which causes issues with the internal PHY, resulting in the PHY link being down. To prevent this, setting themac_managed_pmflag skips themdio_bus_phy_resume()function.Quoted 3 lines
Fixes a129b41fe0a8 ("Revert "net: phy: dp83867: perform soft reset and retain established link"")Signed-off-by Nick Hu <[email protected]>---
Otherwise, the fix seems correct to me.
Reviewed-by Jacob Keller <[email protected]>Quoted 9 lines
drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 1 + 1 file changed, 1 insertion(+)drivers/net/ethernet/xilinx/xilinx_axienet_main.c +0
-0@@ -3078,6 +3078,7 @@ static int axienet_probe(struct platform_device *pdev)Quoted 7 lines
drivers/net/ethernet/xilinx/xilinx_axienet_main.c static int axienet_probe(struct platform_device *pdev) · line 3084
Quoted 6 lines
drivers/net/ethernet/xilinx/xilinx_axienet_main.c +1
-0lp->phylink_config.dev = &ndev->dev; lp->phylink_config.type =PHYLINK_NETDEV ; + lp->phylink_config.mac_managed_pm = true; lp->phylink_config.mac_capabilities =MAC_SYM_PAUSE |MAC_ASYM_PAUSE |MAC_10FD |MAC_100FD |MAC_1000FD ;Regards,
Nick
Hi Michal
Thanks for the information! I'll pay attention next time.
Quoted 20 lines · Michal Swiatkowski
Quoted 6 lines · Nick Hu
Hi Jacob
Quoted 3 lines · Jacob Keller
Quoted 7 lines
Quoted 4 lines · Nick Hu
Nit: subject should include the "net" prefix since this is clearly a bug fix.
I've added the 'net' prefix to the subject 'net: axienet: Set
mac_managed_pm'. Is there something I'm missing?It should be [PATCH net] net: axienet: Set
mac_managed_pmLike here for example [1]. You can look at netdev FAQ [2]. It is described there how to specify the subject.
Quoted 44 lines
Probably you don't need to resend it only because of that.
[1] https://lore.kernel.org/netdev/CAL+tcoC3TuZPTwnHTDvXC+JPoJbgW2UywZ2=xv=E=utokb3pCQ@mail.gmail.com/T/#m2b5603fbf355216ab035aa0f69c10c5f4ba98772
[2] https://www.kernel.org/doc/Documentation/networking/netdev-FAQ.txtThanks,
MichalQuoted 36 lines
Quoted 26 lines
Quoted 9 lines
The external PHY will undergo a soft reset twice during the resume process when it wake up from suspend. The first reset occurs when the axienet driver calls
phylink_of_phy_connect(), and the second occurs whenmdio_bus_phy_resume()invokesphy_init_hw(). The second soft reset of the external PHY does not reinitialize the internal PHY, which causes issues with the internal PHY, resulting in the PHY link being down. To prevent this, setting themac_managed_pmflag skips themdio_bus_phy_resume()function.Quoted 3 lines
Fixes a129b41fe0a8 ("Revert "net: phy: dp83867: perform soft reset and retain established link"")Signed-off-by Nick Hu <[email protected]>---
Otherwise, the fix seems correct to me.
Reviewed-by Jacob Keller <[email protected]>Quoted 9 lines
drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 1 + 1 file changed, 1 insertion(+)drivers/net/ethernet/xilinx/xilinx_axienet_main.c +0
-0@@ -3078,6 +3078,7 @@ static int axienet_probe(struct platform_device *pdev)Quoted 7 lines
drivers/net/ethernet/xilinx/xilinx_axienet_main.c static int axienet_probe(struct platform_device *pdev) · line 3084
Quoted 6 lines
drivers/net/ethernet/xilinx/xilinx_axienet_main.c +1
-0lp->phylink_config.dev = &ndev->dev; lp->phylink_config.type =PHYLINK_NETDEV ; + lp->phylink_config.mac_managed_pm = true; lp->phylink_config.mac_capabilities =MAC_SYM_PAUSE |MAC_ASYM_PAUSE |MAC_10FD |MAC_100FD |MAC_1000FD ;Regards,
Nick
Regards,
Nick
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 10 lines · On Mon, 17 Feb 2025 13:58:42 +0800 you wrote:
The external PHY will undergo a soft reset twice during the resume process when it wake up from suspend. The first reset occurs when the axienet driver calls
phylink_of_phy_connect(), and the second occurs whenmdio_bus_phy_resume()invokesphy_init_hw(). The second soft reset of the external PHY does not reinitialize the internal PHY, which causes issues with the internal PHY, resulting in the PHY link being down. To prevent this, setting themac_managed_pmflag skips themdio_bus_phy_resume()function.[...]
Here is the summary with links:
- net: axienet: Set mac_managed_pm
https://git.kernel.org/netdev/net/c/a370295367b5
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
Quoted 11 lines · On Mon, 17 Feb 2025 13:58:42 +0800 Nick Hu wrote:
The external PHY will undergo a soft reset twice during the resume process when it wake up from suspend. The first reset occurs when the axienet driver calls
phylink_of_phy_connect(), and the second occurs whenmdio_bus_phy_resume()invokesphy_init_hw(). The second soft reset of the external PHY does not reinitialize the internal PHY, which causes issues with the internal PHY, resulting in the PHY link being down. To prevent this, setting themac_managed_pmflag skips themdio_bus_phy_resume()function.Fixes a129b41fe0a8 ("Revert "net: phy: dp83867: perform soft reset and retain established link"")Signed-off-by Nick Hu <[email protected]>
Applied, thanks!