From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Biju Das <biju.das.jz@bp.renesas.com>
Cc: Ovidiu Panait <ovidiu.panait.rb@renesas.com>,
"andrew@lunn.ch" <andrew@lunn.ch>,
"hkallweit1@gmail.com" <hkallweit1@gmail.com>,
"davem@davemloft.net" <davem@davemloft.net>,
"edumazet@google.com" <edumazet@google.com>,
"kuba@kernel.org" <kuba@kernel.org>,
"pabeni@redhat.com" <pabeni@redhat.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-renesas-soc@vger.kernel.org"
<linux-renesas-soc@vger.kernel.org>
Subject: Re: [PATCH net v2 2/2] net: phy: micrel: remove ksz9131_resume()
Date: Thu, 9 Apr 2026 13:33:09 +0100 [thread overview]
Message-ID: <adechY4Y6zUQkFwq@shell.armlinux.org.uk> (raw)
In-Reply-To: <TY3PR01MB11346DC74FBC1043C9C0A27D186582@TY3PR01MB11346.jpnprd01.prod.outlook.com>
On Thu, Apr 09, 2026 at 11:58:04AM +0000, Biju Das wrote:
> Hi Russell King,
>
> > -----Original Message-----
> > From: Russell King <linux@armlinux.org.uk>
> > Sent: 09 April 2026 12:30
> > Subject: Re: [PATCH net v2 2/2] net: phy: micrel: remove ksz9131_resume()
> >
> > On Thu, Apr 09, 2026 at 11:19:43AM +0000, Biju Das wrote:
> > > Hi Russell King,
> > >
> > > > -----Original Message-----
> > > > From: Russell King <linux@armlinux.org.uk>
> > > > Sent: 09 April 2026 12:05
> > > > Subject: Re: [PATCH net v2 2/2] net: phy: micrel: remove
> > > > ksz9131_resume()
> > > >
> > > > On Thu, Apr 09, 2026 at 10:52:35AM +0000, Biju Das wrote:
> > > > > Hi Russell King,
> > > > >
> > > > > Thanks for the feedback.
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: Russell King <linux@armlinux.org.uk>
> > > > > > Sent: 09 April 2026 11:30
> > > > > > Subject: Re: [PATCH net v2 2/2] net: phy: micrel: remove
> > > > > > ksz9131_resume()
> > > > > >
> > > > > > phy_init_hw() will also call drv->config_intr(), so that doesn't need to be done either.
> > > > > >
> > > > > > It will also call drv->config_init(), which will call kszphy_config_reset().
> > > > > >
> > > > > > So most of kszphy_resume() becomes unnecessary. I think the only
> > > > > > thing that remains would be the call to kszphy_enable_clk() -
> > > > > > and is it fine to call that after
> > > > phy_init_hw() ?
> > > > >
> > > > > It just needs kszphy_enable_clk() and phydev->drv->config_intr()
> > > > > to enable PHY interrupts for suspend-to-RAM to work on RZ/G3E SMARC EVK.
> > > >
> > > > I think you mean WoL rather than suspend-to-RAM, although I don't
> > > > see anything in micrel.c that hints that WoL is supported, so please explain why and how the PHY
> > interrupt impacts suspend-to-RAM.
> > >
> > > This is not WoL. During Suspend-to-RAM, the DDR goes into retention
> > > mode while the CPU, SoC, and PHY power is cut off.
> > >
> > > During resume, TF-A detects WARM_RESET, brings DDR out of retention,
> > > and jumps to the PSCI resume path.
> > >
> > > >
> > > > Note that a particular interrupt should not wake the system unless
> > > > enable_irq_wake() has been called for that specific interrupt.
> > >
> > > If PHY interrupts are not configured during resume, no link interrupt is received and the message:
> > > "renesas-gbeth 11c30000.ethernet end0: Link is Up - 1Gbps/Full - flow control rx/tx"
> > > is not seen, as shown in [1].
> >
> > ... and why does that happen? Is it because the PHY has lost its interrupt configuration and that needs
> > to be reprogrammed?
>
> Yes, but phy_init_hw() reconfigures the PHY interrupt during resume.
> This is due to phydev->interrupts = PHY_INTERRUPT_DISABLED; in the suspend path, as you mentioned below.
>
> >
> > If you don't disable the PHY interrupt in the suspend path, then will the call to drv->config_intr()
> > via phy_init_hw() before
> > phy_resume() be sufficient?
>
> Yes, I confirm that if the PHY interrupt is not disabled in the suspend path, the call to
> drv->config_intr() via phy_init_hw() before phy_resume() would be sufficient.
I think we need a simple solution for 7.0, but subject to Andrew's
agreement, I think we should consider having phy_init_hw() inside
phy_resume(), and a series of cleanup patches that result from that
change, including getting rid of unnecessary code in micrel.c for
the next kernel cycle. As I say, subject to Andrew's agreement, please
can you look into this. Thanks.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
next prev parent reply other threads:[~2026-04-09 12:33 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-09 9:56 [PATCH net v2 0/2] net: phylink: fix PHY reinitialization on resume Ovidiu Panait
2026-04-09 9:56 ` [PATCH net v2 1/2] net: phylink: call phy_init_hw() in phylink resume path Ovidiu Panait
2026-04-09 10:42 ` Russell King (Oracle)
2026-04-09 9:56 ` [PATCH net v2 2/2] net: phy: micrel: remove ksz9131_resume() Ovidiu Panait
2026-04-09 10:13 ` Biju Das
2026-04-09 10:29 ` Russell King (Oracle)
2026-04-09 10:52 ` Biju Das
2026-04-09 11:05 ` Russell King (Oracle)
2026-04-09 11:19 ` Biju Das
2026-04-09 11:30 ` Russell King (Oracle)
2026-04-09 11:58 ` Biju Das
2026-04-09 12:33 ` Russell King (Oracle) [this message]
2026-04-09 12:44 ` Andrew Lunn
2026-04-09 13:25 ` Biju Das
2026-04-09 12:58 ` Ovidiu Panait
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=adechY4Y6zUQkFwq@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=andrew@lunn.ch \
--cc=biju.das.jz@bp.renesas.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=ovidiu.panait.rb@renesas.com \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox