public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
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: Sun, 12 Apr 2026 19:13:21 +0200	[thread overview]
Message-ID: <20260412171321.GA1520797@ragnatech.se> (raw)
In-Reply-To: <CAMuHMdULBf3fBZU62F3YgBtJGzyTQgM-S-c9rhtX=cUCkqDQbA@mail.gmail.com>

Hi Geert,

On 2026-04-08 09:44:33 +0200, Geert Uytterhoeven wrote:
> Hi Niklas,
> 
> On Tue, 7 Apr 2026 at 20:54, Niklas Söderlund
> <niklas.soderlund+renesas@ragnatech.se> wrote:
> > On 2026-04-07 11:03:38 +0200, Geert Uytterhoeven wrote:
> > > 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
> 
> Looks good. Major difference seems to be that I use either Wake-on-LAN
> or gpio-keys wake-up, and I always have WoL enabled for ravb.

WoL was indeed the key.

Having iperf3 blasting traffic to the target made no difference and 
access to URAM is allowed to be suspended and no warning was triggered,
however just enabling WoL and no traffic.

    # ethtool -s end0 wol g

And URAM access will not be suspended and reported active when checking 
DTS in CSR register and this warning will be printed. I will send a 
patch to ignore the check if WoL is enabled (when net-next open), but 
still keep the request to stop URAM access. Nice catch!

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

      reply	other threads:[~2026-04-12 17:13 UTC|newest]

Thread overview: 6+ 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
2026-04-08  7:44     ` Geert Uytterhoeven
2026-04-12 17:13       ` 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=20260412171321.GA1520797@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