* [net-next] net: ethernet: ravb: Suspend and resume the transmission flow @ 2026-04-01 18:36 Niklas Söderlund 2026-04-03 23:20 ` patchwork-bot+netdevbpf 2026-04-07 9:03 ` Geert Uytterhoeven 0 siblings, 2 replies; 4+ messages in thread From: Niklas Söderlund @ 2026-04-01 18:36 UTC (permalink / raw) To: Paul Barker, Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni, netdev, linux-renesas-soc Cc: Yoshihiro Shimoda, Niklas Söderlund From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> The current driver does not follow the latest datasheet and does not suspend the flow when stopping DMA and resume it when starting. Update the driver to do so. Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> [Niklas: Rebase from BSP and reword commit message] Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> --- drivers/net/ethernet/renesas/ravb_main.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c index 2c725824b348..1dbfadb2a881 100644 --- a/drivers/net/ethernet/renesas/ravb_main.c +++ b/drivers/net/ethernet/renesas/ravb_main.c @@ -694,6 +694,9 @@ static int ravb_dmac_init(struct net_device *ndev) const struct ravb_hw_info *info = priv->info; int error; + /* Clear transmission suspension */ + ravb_modify(ndev, CCC, CCC_DTSR, 0); + /* Set CONFIG mode */ error = ravb_set_opmode(ndev, CCC_OPC_CONFIG); if (error) @@ -1103,6 +1106,12 @@ static int ravb_stop_dma(struct net_device *ndev) if (error) return error; + /* Request for transmission suspension */ + ravb_modify(ndev, CCC, CCC_DTSR, CCC_DTSR); + error = ravb_wait(ndev, CSR, CSR_DTS, CSR_DTS); + if (error) + netdev_err(ndev, "failed to stop AXI BUS\n"); + /* Stop AVB-DMAC process */ return ravb_set_opmode(ndev, CCC_OPC_CONFIG); } -- 2.53.0 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [net-next] net: ethernet: ravb: Suspend and resume the transmission flow 2026-04-01 18:36 [net-next] net: ethernet: ravb: Suspend and resume the transmission flow Niklas Söderlund @ 2026-04-03 23:20 ` patchwork-bot+netdevbpf 2026-04-07 9:03 ` Geert Uytterhoeven 1 sibling, 0 replies; 4+ messages in thread From: patchwork-bot+netdevbpf @ 2026-04-03 23:20 UTC (permalink / raw) To: =?utf-8?q?Niklas_S=C3=B6derlund_=3Cniklas=2Esoderlund+renesas=40ragnatech=2E?=, =?utf-8?q?se=3E?= Cc: paul, andrew+netdev, davem, edumazet, kuba, pabeni, netdev, linux-renesas-soc, yoshihiro.shimoda.uh Hello: This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <kuba@kernel.org>: On Wed, 1 Apr 2026 20:36:08 +0200 you wrote: > From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> > > The current driver does not follow the latest datasheet and does not > suspend the flow when stopping DMA and resume it when starting. Update > the driver to do so. > > Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> > [Niklas: Rebase from BSP and reword commit message] > Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> > > [...] Here is the summary with links: - [net-next] net: ethernet: ravb: Suspend and resume the transmission flow https://git.kernel.org/netdev/net-next/c/353d8e7989b6 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] 4+ messages in thread
* Re: [net-next] net: ethernet: ravb: Suspend and resume the transmission flow 2026-04-01 18:36 [net-next] net: ethernet: ravb: Suspend and resume the transmission flow Niklas Söderlund 2026-04-03 23:20 ` patchwork-bot+netdevbpf @ 2026-04-07 9:03 ` Geert Uytterhoeven 2026-04-07 18:54 ` Niklas Söderlund 1 sibling, 1 reply; 4+ messages in thread From: Geert Uytterhoeven @ 2026-04-07 9:03 UTC (permalink / raw) To: Niklas Söderlund, Yoshihiro Shimoda Cc: Paul Barker, Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni, netdev, linux-renesas-soc Hi Niklas, Shimoda-san, On Wed, 1 Apr 2026 at 20:39, Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> wrote: > > From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> > > The current driver does not follow the latest datasheet and does not > suspend the flow when stopping DMA and resume it when starting. Update > the driver to do so. > > Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> > [Niklas: Rebase from BSP and reword commit message] > Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Thanks for your patch, which is now commit 353d8e7989b6babe ("net: ethernet: ravb: Suspend and resume the transmission flow") in linux-next/master net-next. > --- a/drivers/net/ethernet/renesas/ravb_main.c > +++ b/drivers/net/ethernet/renesas/ravb_main.c > @@ -694,6 +694,9 @@ static int ravb_dmac_init(struct net_device *ndev) > const struct ravb_hw_info *info = priv->info; > int error; > > + /* Clear transmission suspension */ > + ravb_modify(ndev, CCC, CCC_DTSR, 0); > + > /* Set CONFIG mode */ > error = ravb_set_opmode(ndev, CCC_OPC_CONFIG); > if (error) > @@ -1103,6 +1106,12 @@ static int ravb_stop_dma(struct net_device *ndev) > if (error) > return error; > > + /* Request for transmission suspension */ > + ravb_modify(ndev, CCC, CCC_DTSR, CCC_DTSR); > + error = ravb_wait(ndev, CSR, CSR_DTS, CSR_DTS); > + if (error) > + netdev_err(ndev, "failed to stop AXI BUS\n"); This error message is printed during resume from s2idle or s2ram on e.g. Salvator-XS and Gray Hawk Single. Ethernet (nfsroot) still works fine, though. > + > /* Stop AVB-DMAC process */ > return ravb_set_opmode(ndev, CCC_OPC_CONFIG); > } Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [net-next] net: ethernet: ravb: Suspend and resume the transmission flow 2026-04-07 9:03 ` Geert Uytterhoeven @ 2026-04-07 18:54 ` Niklas Söderlund 0 siblings, 0 replies; 4+ messages in thread From: Niklas Söderlund @ 2026-04-07 18:54 UTC (permalink / raw) To: Geert Uytterhoeven Cc: Yoshihiro Shimoda, Paul Barker, Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni, netdev, linux-renesas-soc Hi Geert, Thanks for your report. On 2026-04-07 11:03:38 +0200, Geert Uytterhoeven wrote: > Hi Niklas, Shimoda-san, > > On Wed, 1 Apr 2026 at 20:39, Niklas Söderlund > <niklas.soderlund+renesas@ragnatech.se> wrote: > > > > From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> > > > > The current driver does not follow the latest datasheet and does not > > suspend the flow when stopping DMA and resume it when starting. Update > > the driver to do so. > > > > Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> > > [Niklas: Rebase from BSP and reword commit message] > > Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> > > Thanks for your patch, which is now commit 353d8e7989b6babe ("net: > ethernet: ravb: Suspend and resume the transmission flow") in > linux-next/master net-next. > > > --- a/drivers/net/ethernet/renesas/ravb_main.c > > +++ b/drivers/net/ethernet/renesas/ravb_main.c > > @@ -694,6 +694,9 @@ static int ravb_dmac_init(struct net_device *ndev) > > const struct ravb_hw_info *info = priv->info; > > int error; > > > > + /* Clear transmission suspension */ > > + ravb_modify(ndev, CCC, CCC_DTSR, 0); > > + > > /* Set CONFIG mode */ > > error = ravb_set_opmode(ndev, CCC_OPC_CONFIG); > > if (error) > > @@ -1103,6 +1106,12 @@ static int ravb_stop_dma(struct net_device *ndev) > > if (error) > > return error; > > > > + /* Request for transmission suspension */ > > + ravb_modify(ndev, CCC, CCC_DTSR, CCC_DTSR); > > + error = ravb_wait(ndev, CSR, CSR_DTS, CSR_DTS); > > + if (error) > > + netdev_err(ndev, "failed to stop AXI BUS\n"); > > This error message is printed during resume from s2idle or s2ram on > e.g. Salvator-XS and Gray Hawk Single. Ethernet (nfsroot) still works > fine, though. I was not able to reproduce this on M3N (r8a77965-salvator-xs.dts) nor Sparrow Hawk (r8a779g3-sparrow-hawk.dts). I'm using the following to test, is your test-case different? # echo enabled > /sys/class/tty/ttySC0/power/wakeup # echo s2idle > /sys/power/mem_sleep # echo 0 > /sys/module/printk/parameters/console_suspend # echo mem > /sys/power/state Console log from M3N (console wakeup) [ 149.278623] Freezing user space processes [ 149.287951] Freezing user space processes completed (elapsed 0.005 seconds) [ 149.295439] OOM killer disabled. [ 149.298796] Freezing remaining freezable tasks [ 149.305367] Freezing remaining freezable tasks completed (elapsed 0.002 seconds) [ 149.364876] ravb e6800000.ethernet end0: Link is Down [ 149.701951] usb usb2: root hub lost power or was reset [ 149.708295] usb usb1: root hub lost power or was reset [ 149.793871] usb usb3: root hub lost power or was reset [ 149.799174] usb usb4: root hub lost power or was reset [ 149.931707] Micrel KSZ9031 Gigabit PHY e6800000.ethernet-ffffffff:00: attached PHY driver (mii_bus:phy_addr=e6800000.ethernet-ffffffff:00, irq=170) [ 150.008695] OOM killer enabled. [ 150.012003] Restarting tasks: Starting [ 150.020596] Restarting tasks: Done [ 150.024234] random: crng reseeded on system resumption [ 150.036191] PM: suspend exit [ 150.235966] ata1: link resume succeeded after 1 retries [ 150.344391] ata1: SATA link down (SStatus 0 SControl 300) [ 156.499184] ravb e6800000.ethernet end0: Link is Up - 1Gbps/Full - flow control off Console log from V4H (console wakeup) [ 64.982935] Filesystems sync: 0.000 seconds [ 64.992414] Freezing user space processes [ 64.996111] Freezing user space processes completed (elapsed 0.002 seconds) [ 64.997280] OOM killer disabled. [ 64.997711] Freezing remaining freezable tasks [ 65.000580] Freezing remaining freezable tasks completed (elapsed 0.002 seconds) [ 65.012959] ravb e6800000.ethernet end0: Link is Down [ 65.167569] Micrel KSZ9031 Gigabit PHY e6800000.ethernet-ffffffff:00: attached PHY driver (mii_bus:phy_addr=e6800000.ethernet-ffffffff:00, irq=108) [ 65.190614] OOM killer enabled. [ 65.191058] Restarting tasks: Starting [ 65.195133] Restarting tasks: Done [ 65.195743] random: crng reseeded on system resumption [ 65.201052] PM: suspend exit [ 71.305027] ravb e6800000.ethernet end0: Link is Up - 1Gbps/Full - flow control off > > > + > > /* Stop AVB-DMAC process */ > > return ravb_set_opmode(ndev, CCC_OPC_CONFIG); > > } > > Gr{oetje,eeting}s, > > Geert > > -- > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org > > In personal conversations with technical people, I call myself a hacker. But > when I'm talking to journalists I just say "programmer" or something like that. > -- Linus Torvalds -- Kind Regards, Niklas Söderlund ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-04-07 18:54 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-04-01 18:36 [net-next] net: ethernet: ravb: Suspend and resume the transmission flow Niklas Söderlund 2026-04-03 23:20 ` patchwork-bot+netdevbpf 2026-04-07 9:03 ` Geert Uytterhoeven 2026-04-07 18:54 ` Niklas Söderlund
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox