* [PATCH] net: axienet: Set mac_managed_pm
@ 2025-02-17 5:58 Nick Hu
2025-02-19 23:29 ` Jacob Keller
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Nick Hu @ 2025-02-17 5:58 UTC (permalink / raw)
To: Radhey Shyam Pandey, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Michal Simek, Russell King,
Francesco Dolcini, Praneeth Bajjuri
Cc: Nick Hu, Andrew Lunn, netdev, linux-arm-kernel, linux-kernel
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.
Fixes: a129b41fe0a8 ("Revert "net: phy: dp83867: perform soft reset and retain established link"")
Signed-off-by: Nick Hu <nick.hu@sifive.com>
---
drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
index 2ffaad0b0477..2deeb982bf6b 100644
--- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
+++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
@@ -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;
--
2.17.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] net: axienet: Set mac_managed_pm
2025-02-17 5:58 [PATCH] net: axienet: Set mac_managed_pm Nick Hu
@ 2025-02-19 23:29 ` Jacob Keller
2025-02-20 2:47 ` Nick Hu
2025-02-20 8:30 ` patchwork-bot+netdevbpf
2025-02-20 16:58 ` Jakub Kicinski
2 siblings, 1 reply; 7+ messages in thread
From: Jacob Keller @ 2025-02-19 23:29 UTC (permalink / raw)
To: Nick Hu, Radhey Shyam Pandey, Andrew Lunn, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Michal Simek,
Russell King, Francesco Dolcini, Praneeth Bajjuri
Cc: Andrew Lunn, netdev, linux-arm-kernel, linux-kernel
On 2/16/2025 9:58 PM, Nick Hu wrote:
Nit: subject should include the "net" prefix since this is clearly a bug
fix.
> 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.
>
> Fixes: a129b41fe0a8 ("Revert "net: phy: dp83867: perform soft reset and retain established link"")
> Signed-off-by: Nick Hu <nick.hu@sifive.com>
> ---
Otherwise, the fix seems correct to me.
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
> drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
> index 2ffaad0b0477..2deeb982bf6b 100644
> --- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
> +++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
> @@ -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;
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] net: axienet: Set mac_managed_pm
2025-02-19 23:29 ` Jacob Keller
@ 2025-02-20 2:47 ` Nick Hu
2025-02-20 6:56 ` Michal Swiatkowski
0 siblings, 1 reply; 7+ messages in thread
From: Nick Hu @ 2025-02-20 2:47 UTC (permalink / raw)
To: Jacob Keller
Cc: Radhey Shyam Pandey, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Michal Simek, Russell King,
Francesco Dolcini, Praneeth Bajjuri, Andrew Lunn, netdev,
linux-arm-kernel, linux-kernel
Hi Jacob
On Thu, Feb 20, 2025 at 7:29 AM Jacob Keller <jacob.e.keller@intel.com> wrote:
>
>
>
> 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?
> > 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.
> >
> > Fixes: a129b41fe0a8 ("Revert "net: phy: dp83867: perform soft reset and retain established link"")
> > Signed-off-by: Nick Hu <nick.hu@sifive.com>
> > ---
>
> Otherwise, the fix seems correct to me.
>
> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
>
> > drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
> > index 2ffaad0b0477..2deeb982bf6b 100644
> > --- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
> > +++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
> > @@ -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;
> >
>
Regards,
Nick
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] net: axienet: Set mac_managed_pm
2025-02-20 2:47 ` Nick Hu
@ 2025-02-20 6:56 ` Michal Swiatkowski
2025-02-20 7:04 ` Nick Hu
0 siblings, 1 reply; 7+ messages in thread
From: Michal Swiatkowski @ 2025-02-20 6:56 UTC (permalink / raw)
To: Nick Hu
Cc: Jacob Keller, Radhey Shyam Pandey, Andrew Lunn, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Michal Simek,
Russell King, Francesco Dolcini, Praneeth Bajjuri, Andrew Lunn,
netdev, linux-arm-kernel, linux-kernel
On Thu, Feb 20, 2025 at 10:47:40AM +0800, Nick Hu wrote:
> Hi Jacob
>
> On Thu, Feb 20, 2025 at 7:29 AM Jacob Keller <jacob.e.keller@intel.com> wrote:
> >
> >
> >
> > 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?
>
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
> > > 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.
> > >
> > > Fixes: a129b41fe0a8 ("Revert "net: phy: dp83867: perform soft reset and retain established link"")
> > > Signed-off-by: Nick Hu <nick.hu@sifive.com>
> > > ---
> >
> > Otherwise, the fix seems correct to me.
> >
> > Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
> >
> > > drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 1 +
> > > 1 file changed, 1 insertion(+)
> > >
> > > diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
> > > index 2ffaad0b0477..2deeb982bf6b 100644
> > > --- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
> > > +++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
> > > @@ -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;
> > >
> >
>
> Regards,
> Nick
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] net: axienet: Set mac_managed_pm
2025-02-20 6:56 ` Michal Swiatkowski
@ 2025-02-20 7:04 ` Nick Hu
0 siblings, 0 replies; 7+ messages in thread
From: Nick Hu @ 2025-02-20 7:04 UTC (permalink / raw)
To: Michal Swiatkowski
Cc: Jacob Keller, Radhey Shyam Pandey, Andrew Lunn, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Michal Simek,
Russell King, Francesco Dolcini, Praneeth Bajjuri, Andrew Lunn,
netdev, linux-arm-kernel, linux-kernel
Hi Michal
Thanks for the information! I'll pay attention next time.
On Thu, Feb 20, 2025 at 3:00 PM Michal Swiatkowski
<michal.swiatkowski@linux.intel.com> wrote:
>
> On Thu, Feb 20, 2025 at 10:47:40AM +0800, Nick Hu wrote:
> > Hi Jacob
> >
> > On Thu, Feb 20, 2025 at 7:29 AM Jacob Keller <jacob.e.keller@intel.com> wrote:
> > >
> > >
> > >
> > > 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?
> >
>
> 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
>
> > > > 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.
> > > >
> > > > Fixes: a129b41fe0a8 ("Revert "net: phy: dp83867: perform soft reset and retain established link"")
> > > > Signed-off-by: Nick Hu <nick.hu@sifive.com>
> > > > ---
> > >
> > > Otherwise, the fix seems correct to me.
> > >
> > > Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
> > >
> > > > drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 1 +
> > > > 1 file changed, 1 insertion(+)
> > > >
> > > > diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
> > > > index 2ffaad0b0477..2deeb982bf6b 100644
> > > > --- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
> > > > +++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
> > > > @@ -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;
> > > >
> > >
> >
> > Regards,
> > Nick
Regards,
Nick
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] net: axienet: Set mac_managed_pm
2025-02-17 5:58 [PATCH] net: axienet: Set mac_managed_pm Nick Hu
2025-02-19 23:29 ` Jacob Keller
@ 2025-02-20 8:30 ` patchwork-bot+netdevbpf
2025-02-20 16:58 ` Jakub Kicinski
2 siblings, 0 replies; 7+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-02-20 8:30 UTC (permalink / raw)
To: Nick Hu
Cc: radhey.shyam.pandey, andrew+netdev, davem, edumazet, kuba, pabeni,
michal.simek, linux, francesco.dolcini, praneeth, andrew, netdev,
linux-arm-kernel, linux-kernel
Hello:
This patch was applied to netdev/net.git (main)
by Paolo Abeni <pabeni@redhat.com>:
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 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.
>
> [...]
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!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] net: axienet: Set mac_managed_pm
2025-02-17 5:58 [PATCH] net: axienet: Set mac_managed_pm Nick Hu
2025-02-19 23:29 ` Jacob Keller
2025-02-20 8:30 ` patchwork-bot+netdevbpf
@ 2025-02-20 16:58 ` Jakub Kicinski
2 siblings, 0 replies; 7+ messages in thread
From: Jakub Kicinski @ 2025-02-20 16:58 UTC (permalink / raw)
To: Nick Hu
Cc: Radhey Shyam Pandey, Andrew Lunn, David S. Miller, Eric Dumazet,
Paolo Abeni, Michal Simek, Russell King, Francesco Dolcini,
Praneeth Bajjuri, Andrew Lunn, netdev, linux-arm-kernel,
linux-kernel
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 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.
>
> Fixes: a129b41fe0a8 ("Revert "net: phy: dp83867: perform soft reset and retain established link"")
> Signed-off-by: Nick Hu <nick.hu@sifive.com>
Applied, thanks!
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-02-20 16:58 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-17 5:58 [PATCH] net: axienet: Set mac_managed_pm Nick Hu
2025-02-19 23:29 ` Jacob Keller
2025-02-20 2:47 ` Nick Hu
2025-02-20 6:56 ` Michal Swiatkowski
2025-02-20 7:04 ` Nick Hu
2025-02-20 8:30 ` patchwork-bot+netdevbpf
2025-02-20 16:58 ` Jakub Kicinski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).