From: "Niklas Söderlund" <niklas.soderlund+renesas@ragnatech.se>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>,
Paul Barker <paul@pbarker.dev>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
netdev@vger.kernel.org, linux-renesas-soc@vger.kernel.org
Subject: Re: [net-next] net: ethernet: ravb: Suspend and resume the transmission flow
Date: Tue, 7 Apr 2026 20:54:43 +0200 [thread overview]
Message-ID: <20260407185443.GC2551274@ragnatech.se> (raw)
In-Reply-To: <CAMuHMdWnjV=HGE1o08zLhUfTgOSene5fYx1J5GG10mB+Toq8qg@mail.gmail.com>
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
prev parent reply other threads:[~2026-04-07 18:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
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=20260407185443.GC2551274@ragnatech.se \
--to=niklas.soderlund+renesas@ragnatech.se \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=geert@linux-m68k.org \
--cc=kuba@kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=paul@pbarker.dev \
--cc=yoshihiro.shimoda.uh@renesas.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