[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1424830542.4443.41.camel@xylophone.i.decadent.org.uk>
Date: Wed, 25 Feb 2015 02:15:42 +0000
From: Ben Hutchings <ben.hutchings@...ethink.co.uk>
To: yoshihiro shimoda <yoshihiro.shimoda.uh@...esas.com>
Cc: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@...esas.com>,
MITSUHIRO KIMURA <mitsuhiro.kimura.kc@...esas.com>,
"HISASHI NAKAMURA(Retired)" <a5077047@...esasgroup.onmicrosoft.com>,
Yoshihiro Kaneko <ykaneko0929@...il.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
ct-linux-kernel <linux-kernel@...ethink.co.uk>
Subject: Re: Questions about the sh_eth driver and hardware
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.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists