Netdev List
 help / color / mirror / Atom feed
From: Ben Hutchings <ben.hutchings@codethink.co.uk>
To: yoshihiro shimoda <yoshihiro.shimoda.uh@renesas.com>
Cc: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>,
	MITSUHIRO KIMURA <mitsuhiro.kimura.kc@renesas.com>,
	"HISASHI NAKAMURA(Retired)"
	<a5077047@renesasgroup.onmicrosoft.com>,
	Yoshihiro Kaneko <ykaneko0929@gmail.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	ct-linux-kernel <linux-kernel@codethink.co.uk>
Subject: Re: Questions about the sh_eth driver and hardware
Date: Wed, 25 Feb 2015 02:15:42 +0000	[thread overview]
Message-ID: <1424830542.4443.41.camel@xylophone.i.decadent.org.uk> (raw)
In-Reply-To: <SIXPR06MB333899AF34FC0BBADA5A29ED82D0@SIXPR06MB333.apcprd06.prod.outlook.com>

On Thu, 2015-02-19 at 04:41 +0000, yoshihiro shimoda wrote:
> Hi Ben,
> 
> This is Shimoda of Renesas. I'm a software engineer.
> I asked hardware team about your questions.

Thank you.

[...]
> > 2. In case of a Receive Descriptor Empty error (RDE), we currently read
> > the RDFAR register to find the next descriptor the DMA engine will use.
> > But this register is not documented for the R8A7790 and the driver does
> > not define an offset for it on R-Car chips.  The manual doesn't say how
> > to set the address of the next descriptor to use.  Maybe we should
> > assume that R-Car chips will never skip descriptors after RDE?
> 
> They said that software should find the next descriptor without RDFAR register somehow
> after RDE. However, I checked this driver handling on the R-Car M2, and the following
> code didn't run actually.

Is that because the hardware doesn't actually set RDE?  Otherwise, I
don't see what would prevent this code from running.

> So, we should assume the R-Car chips will never skip descriptors
> after RDE.

OK.

> < sh_eth.c: sh_eth_rx() >
> 	if (!(sh_eth_read(ndev, EDRRR) & EDRRR_R)) {
> 		/* fix the values for the next receiving if RDE is set */
> 		if (intr_status & EESR_RDE) {
> /*vvvvvvv The code below didn't run on R-Car Gen2 vvvvvvv*/
> 			u32 count = (sh_eth_read(ndev, RDFAR) -
> 				     sh_eth_read(ndev, RDLAR)) >> 4;
> 
> 			mdp->cur_rx = count;
> 			mdp->dirty_rx = count;
> /*^^^^^^^ The code above didn't run on R-Car Gen2 ^^^^^^^*/
> 		}
> 		sh_eth_write(ndev, EDRRR_R, EDRRR);
> 	}
> 
> < Test method >
>  Host PC $ sudo ping -f -l 128 <the board's ip address>

I've tried things like that, but the CPU cores seem to be fast enough to
handle a few gigabits per second.  I think we would need to slow down
the CPUs or inject memory allocation failures to provoke an RDE.

Ben.

      reply	other threads:[~2015-02-25  2:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-21 17:24 Questions about the sh_eth driver and hardware Ben Hutchings
2015-02-19  4:41 ` yoshihiro shimoda
2015-02-25  2:15   ` Ben Hutchings [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=1424830542.4443.41.camel@xylophone.i.decadent.org.uk \
    --to=ben.hutchings@codethink.co.uk \
    --cc=a5077047@renesasgroup.onmicrosoft.com \
    --cc=linux-kernel@codethink.co.uk \
    --cc=mitsuhiro.kimura.kc@renesas.com \
    --cc=netdev@vger.kernel.org \
    --cc=nobuhiro.iwamatsu.yj@renesas.com \
    --cc=ykaneko0929@gmail.com \
    --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