lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-ID: <TY3PR01MB113460004F6A57B3AAD77E86E864CA@TY3PR01MB11346.jpnprd01.prod.outlook.com> Date: Sun, 6 Jul 2025 08:45:14 +0000 From: Biju Das <biju.das.jz@...renesas.com> To: Biju Das <biju.das.jz@...renesas.com>, Russell King <linux@...linux.org.uk> CC: Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@...renesas.com>, Andrew Lunn <andrew+netdev@...n.ch>, "David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, Maxime Coquelin <mcoquelin.stm32@...il.com>, Alexandre Torgue <alexandre.torgue@...s.st.com>, "netdev@...r.kernel.org" <netdev@...r.kernel.org>, "linux-renesas-soc@...r.kernel.org" <linux-renesas-soc@...r.kernel.org>, "linux-stm32@...md-mailman.stormreply.com" <linux-stm32@...md-mailman.stormreply.com>, "linux-arm-kernel@...ts.infradead.org" <linux-arm-kernel@...ts.infradead.org>, "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, Geert Uytterhoeven <geert+renesas@...der.be>, biju.das.au <biju.das.au@...il.com> Subject: RE: [PATCH net-next] net: stmmac: dwmac-renesas-gbeth: Add PM suspend/resume callbacks Hi Russell King, > -----Original Message----- > From: Biju Das <biju.das.jz@...renesas.com> > Sent: 05 July 2025 21:27 > Subject: RE: [PATCH net-next] net: stmmac: dwmac-renesas-gbeth: Add PM suspend/resume callbacks > > > > > -----Original Message----- > > From: Russell King <linux@...linux.org.uk> > > Subject: Re: [PATCH net-next] net: stmmac: dwmac-renesas-gbeth: Add PM > > suspend/resume callbacks > > > > On Sat, Jul 05, 2025 at 06:03:24PM +0100, Biju Das wrote: > > > Add PM suspend/resume callbacks for RZ/G3E SMARC EVK. > > > > > > The PM deep entry is executed by pressing the SLEEP button and exit > > > from entry is by pressing the power button. > > > > > > Logs: > > > root@...rc-rzg3e:~# PM: suspend entry (deep) Filesystems sync: 0.115 > > > seconds Freezing user space processes Freezing user space processes > > > completed (elapsed 0.002 seconds) OOM killer disabled. > > > Freezing remaining freezable tasks > > > Freezing remaining freezable tasks completed (elapsed 0.001 seconds) > > > printk: Suspending console(s) (use no_console_suspend to debug) > > > NOTICE: BL2: v2.10.5(release):2.10.5/rz_soc_dev-162-g7148ba838 > > > NOTICE: BL2: Built : 14:23:58, Jul 5 2025 > > > NOTICE: BL2: SYS_LSI_MODE: 0x13e06 > > > NOTICE: BL2: SYS_LSI_DEVID: 0x8679447 > > > NOTICE: BL2: SYS_LSI_PRR: 0x0 > > > NOTICE: BL2: Booting BL31 > > > renesas-gbeth 15c30000.ethernet end0: Link is Down Disabling > > > non-boot CPUs ... > > > psci: CPU3 killed (polled 0 ms) > > > psci: CPU2 killed (polled 0 ms) > > > psci: CPU1 killed (polled 0 ms) > > > Enabling non-boot CPUs ... > > > Detected VIPT I-cache on CPU1 > > > GICv3: CPU1: found redistributor 100 region 0:0x0000000014960000 > > > CPU1: Booted secondary processor 0x0000000100 [0x412fd050] > > > CPU1 is up > > > Detected VIPT I-cache on CPU2 > > > GICv3: CPU2: found redistributor 200 region 0:0x0000000014980000 > > > CPU2: Booted secondary processor 0x0000000200 [0x412fd050] > > > CPU2 is up > > > Detected VIPT I-cache on CPU3 > > > GICv3: CPU3: found redistributor 300 region 0:0x00000000149a0000 > > > CPU3: Booted secondary processor 0x0000000300 [0x412fd050] > > > CPU3 is up > > > dwmac4: Master AXI performs fixed burst length 15c30000.ethernet end0: > > > No Safety Features support found 15c30000.ethernet end0: IEEE > > > 1588-2008 Advanced Timestamp supported 15c30000.ethernet end0: > > > configuring for phy/rgmii-id link mode > > > dwmac4: Master AXI performs fixed burst length 15c40000.ethernet end1: > > > No Safety Features support found 15c40000.ethernet end1: IEEE > > > 1588-2008 Advanced Timestamp supported 15c40000.ethernet end1: > > > configuring for phy/rgmii-id link mode OOM killer enabled. > > > Restarting tasks: Starting > > > Restarting tasks: Done > > > random: crng reseeded on system resumption > > > PM: suspend exit > > > > > > 15c30000.ethernet end0: Link is Up - 1Gbps/Full - flow control rx/tx > > > root@...rc-rzg3e:~# ifconfig end0 192.168.10.7 up > > > root@...rc-rzg3e:~# ping 192.168.10.1 PING 192.168.10.1 > > > (192.168.10.1) 56(84) bytes of data. > > > 64 bytes from 192.168.10.1: icmp_seq=1 ttl=64 time=2.05 ms > > > 64 bytes from 192.168.10.1: icmp_seq=2 ttl=64 time=0.928 ms > > > > You should also test with the interface configured before > > suspend/resume and confirm that it continues working afterwards without being reconfigured. > > Yes, I confirm it works without reconfiguration. > > Please see the logs: > root@...rc-rzg3e:~# ifconfig > eth0: flags=-28605<UP,BROADCAST,RUNNING,MULTICAST,DYNAMIC> mtu 1500 > inet 192.168.10.7 netmask 255.255.255.0 broadcast 192.168.10.255 > ether 00:11:22:33:44:55 txqueuelen 1000 (Ethernet) > RX packets 35 bytes 2208 (2.1 KiB) > RX errors 0 dropped 0 overruns 0 frame 0 > TX packets 27 bytes 5368 (5.2 KiB) > TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 > device interrupt 20 > > root@...rc-rzg3e:~# ping 192.168.10.1 > PING 192.168.10.1 (192.168.10.1) 56(84) bytes of data. > 64 bytes from 192.168.10.1: icmp_seq=1 ttl=64 time=0.866 ms > 64 bytes from 192.168.10.1: icmp_seq=2 ttl=64 time=0.900 ms > 64 bytes from 192.168.10.1: icmp_seq=3 ttl=64 time=0.938 ms > 64 bytes from 192.168.10.1: icmp_seq=4 ttl=64 time=0.929 ms > 64 bytes from 192.168.10.1: icmp_seq=5 ttl=64 time=0.890 ms > 64 bytes from 192.168.10.1: icmp_seq=6 ttl=64 time=1.02 ms > [ 75.812501] PM: suspend entry (deep) > [ 75.849939] Filesystems sync: 0.033 seconds > [ 75.855680] Freezing user space processes > [ 75.861550] Freezing user space processes completed (elapsed 0.001 seconds) > [ 75.868559] OOM killer disabled. > [ 75.871788] Freezing remaining freezable tasks > [ 75.877342] Freezing remaining freezable tasks completed (elapsed 0.001 seconds) > [ 75.884724] printk: Suspending console(s) (use no_console_suspend to debug) > NOTICE: BL2: v2.10.5(release):2.10.5/rz_soc_dev-162-g7148ba838 > NOTICE: BL2: Built : 14:23:58, Jul 5 2025 > NOTICE: BL2: SYS_LSI_MODE: 0x13e06 > NOTICE: BL2: SYS_LSI_DEVID: 0x8679447 > NOTICE: BL2: SYS_LSI_PRR: 0x0 > NOTICE: BL2: Booting BL31 > [ 75.939455] renesas-gbeth 15c30000.ethernet eth0: Link is Down > [ 75.948464] Disabling non-boot CPUs ... > [ 75.952584] psci: CPU3 killed (polled 0 ms) > [ 75.957722] psci: CPU2 killed (polled 0 ms) > [ 75.963385] psci: CPU1 killed (polled 4 ms) > [ 75.967815] Enabling non-boot CPUs ... > [ 75.968025] Detected VIPT I-cache on CPU1 > [ 75.968069] GICv3: CPU1: found redistributor 100 region 0:0x0000000014960000 > [ 75.968107] CPU1: Booted secondary processor 0x0000000100 [0x412fd050] > [ 75.968786] CPU1 is up > [ 75.968882] Detected VIPT I-cache on CPU2 > [ 75.968902] GICv3: CPU2: found redistributor 200 region 0:0x0000000014980000 > [ 75.968922] CPU2: Booted secondary processor 0x0000000200 [0x412fd050] > [ 75.969351] CPU2 is up > [ 75.969446] Detected VIPT I-cache on CPU3 > [ 75.969466] GICv3: CPU3: found redistributor 300 region 0:0x00000000149a0000 > [ 75.969486] CPU3: Booted secondary processor 0x0000000300 [0x412fd050] > [ 75.969980] CPU3 is up > [ 75.987181] dwmac4: Master AXI performs fixed burst length > [ 75.988097] renesas-gbeth 15c30000.ethernet eth0: No Safety Features support found > [ 75.988117] renesas-gbeth 15c30000.ethernet eth0: IEEE 1588-2008 Advanced Timestamp supported > [ 75.991717] renesas-gbeth 15c30000.ethernet eth0: configuring for phy/rgmii-id link mode > [ 76.007851] dwmac4: Master AXI performs fixed burst length > [ 76.008761] renesas-gbeth 15c40000.ethernet eth1: No Safety Features support found > [ 76.008777] renesas-gbeth 15c40000.ethernet eth1: IEEE 1588-2008 Advanced Timestamp supported > [ 76.012353] renesas-gbeth 15c40000.ethernet eth1: configuring for phy/rgmii-id link mode > [ 76.204477] OOM killer enabled. > [ 76.207609] Restarting tasks: Starting > [ 76.212024] Restarting tasks: Done > [ 76.215550] random: crng reseeded on system resumption > [ 76.220909] PM: suspend exit > [ 78.612495] renesas-gbeth 15c30000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx > From 192.168.10.7 icmp_seq=7 Destination Host Unreachable From 192.168.10.7 icmp_seq=8 Destination > Host Unreachable From 192.168.10.7 icmp_seq=9 Destination Host Unreachable > 64 bytes from 192.168.10.1: icmp_seq=11 ttl=64 time=0.663 ms > 64 bytes from 192.168.10.1: icmp_seq=12 ttl=64 time=1.19 ms > FYI, The above testing is done with rootFS mounted on SD card. But when I mount rootFS on NFS, after wakeup, I am not able to contact the NFS server. The below patch makes it to work[1]. Not sure, why the original code is failing if the rootFS is mounted on NFS? Cheers, Biju [1] diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-renesas-gbeth.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-renesas-gbeth.c index df4ca897a60c..434ef1802195 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-renesas-gbeth.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-renesas-gbeth.c @@ -25,6 +25,8 @@ struct renesas_gbeth { struct plat_stmmacenet_data *plat_dat; struct reset_control *rstc; struct device *dev; + + bool suspend; }; static const char *const renesas_gbeth_clks[] = { @@ -50,6 +52,13 @@ static int renesas_gbeth_init(struct platform_device *pdev, void *priv) if (ret) reset_control_assert(gbeth->rstc); + if (gbeth->suspend) { + struct net_device *ndev = platform_get_drvdata(pdev); + + gbeth->suspend = false; + phy_init_hw(ndev->phydev); + } + return ret; } @@ -66,6 +75,8 @@ static void renesas_gbeth_exit(struct platform_device *pdev, void *priv) ret = reset_control_assert(gbeth->rstc); if (ret) dev_err(gbeth->dev, "Reset assert failed\n"); + + gbeth->suspend = true; }
Powered by blists - more mailing lists