RE: [PATCH net v2 2/2] net: phy: micrel: remove ksz9131_resume()

Biju Das
2026-04-09T11:19:46Z

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].

Cheers,
Biju

[1]
root@smarc-rzg3l:~# echo mem > /sys/power/state
[ 184.611719] PM: suspend entry (deep)
[ 184.616854] Filesystems sync: 0.000 seconds
[ 184.629390] Freezing user space processes
[ 184.637539] Freezing user space processes completed (elapsed 0.003 seconds)
[ 184.644541] OOM killer disabled.
[ 184.647758] Freezing remaining freezable tasks
[ 184.653520] Freezing remaining freezable tasks completed (elapsed 0.001 seconds)
[ 184.660941] printk: Suspending console(s) (use no_console_suspend to debug)
NOTICE: BL2: v2.10.5(release):2.10.5/rz_soc_dev-383-g15a06c881
NOTICE: BL2: Built : 12:13:18, Apr 2 2026
INFO: BL2: Doing platform setup
INFO: Configuring TrustZone Controller
INFO: Total 3 regions set.
INFO: Configuring TrustZone Controller
INFO: Total 1 regions set.
INFO: Configuring TrustZone Controller
INFO: Total 1 regions set.
INFO: eMMC boot from partition 1
INFO: Loading image id=39 at address 0x44428
INFO: emmcdrv_block_len: len: 0x00001000
INFO: Load dst=0x44428 src=(p:1)0x260000(4864) len=0x1000(8)
INFO: Image id=39 loaded: 0x44428 - 0x45428
INFO: DDR: Retention Exit (Rev. 02.05)
NOTICE: BL2: SYS_LSI_MODE: 0x12051
NOTICE: BL2: SYS_LSI_DEVID: 0x87d9447
INFO: BL2: Skip loading image id 3
INFO: BL2: Skip loading image id 5
NOTICE: BL2: Booting BL31
INFO: Entry point address = 0x44000000
INFO: SPSR = 0x3cd
[ 184.670380] renesas-gbeth 11c30000.ethernet end0: Link is Down
[ 184.674006] Disabling non-boot CPUs ...
[ 184.675870] psci: CPU3 killed (polled 4 ms)
[ 184.679357] psci: CPU2 killed (polled 0 ms)
[ 184.683525] psci: CPU1 killed (polled 0 ms)
[ 184.685755] Enabling non-boot CPUs ...
[ 184.686014] Detected VIPT I-cache on CPU1
[ 184.686070] GICv3: CPU1: found redistributor 100 region 0:0x0000000012460000
[ 184.686119] CPU1: Booted secondary processor 0x0000000100 [0x412fd050]
[ 184.687190] CPU1 is up
[ 184.687348] Detected VIPT I-cache on CPU2
[ 184.687384] GICv3: CPU2: found redistributor 200 region 0:0x0000000012480000
[ 184.687419] CPU2: Booted secondary processor 0x0000000200 [0x412fd050]
[ 184.688357] CPU2 is up
[ 184.688534] Detected VIPT I-cache on CPU3
[ 184.688573] GICv3: CPU3: found redistributor 300 region 0:0x00000000124a0000
[ 184.688615] CPU3: Booted secondary processor 0x0000000300 [0x412fd050]
[ 184.689702] CPU3 is up
[ 184.692965] da7213 3-001a: Unable to sync registers 0x23-0x23. -6
[ 184.767008] dwmac4: Master AXI performs fixed burst length
[ 184.767049] renesas-gbeth 11c30000.ethernet end0: No Safety Features support found
[ 184.767090] renesas-gbeth 11c30000.ethernet end0: IEEE 1588-2008 Advanced Timestamp supported
[ 184.769791] renesas-gbeth 11c30000.ethernet end0: configuring for phy/rgmii-id link mode
[ 184.839754] dwmac4: Master AXI performs fixed burst length
[ 184.839784] renesas-gbeth 11c40000.ethernet end1: No Safety Features support found
[ 184.839814] renesas-gbeth 11c40000.ethernet end1: IEEE 1588-2008 Advanced Timestamp supported
[ 184.840892] renesas-gbeth 11c40000.ethernet end1: configuring for phy/rgmii-id link mode
[ 184.994774] OOM killer enabled.
[ 184.997922] Restarting tasks: Starting
[ 185.002227] Restarting tasks: Done
[ 185.005781] random: crng reseeded on system resumption
[ 185.011124] PM: suspend exit
root@smarc-rzg3l:~#
root@smarc-rzg3l:~# [ 187.356951] renesas-gbeth 11c30000.ethernet end0: Link is Up - 1Gbps/Full - flow control rx/tx