From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Ben Hutchings <ben.hutchings@codethink.co.uk>, netdev@vger.kernel.org
Cc: linux-kernel@lists.codethink.co.uk,
Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>,
Mitsuhiro Kimura <mitsuhiro.kimura.kc@renesas.com>,
Yoshihiro Kaneko <ykaneko0929@gmail.com>,
Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Subject: Re: [PATCH net 3/4] Revert "sh_eth: Enable Rx descriptor word 0 shift for r8a7790"
Date: Thu, 26 Feb 2015 22:17:55 +0300 [thread overview]
Message-ID: <54EF7163.80900@cogentembedded.com> (raw)
In-Reply-To: <1424960474.4444.21.camel@xylophone.i.decadent.org.uk>
Hello.
On 02/26/2015 05:21 PM, Ben Hutchings wrote:
> This reverts commit fd9af07c3404ac9ecbd0d859563360f51ce1ffde.
> The hardware manual states that the frame error and multicast bits are
> copied to bits 9:0 of RD0, not bits 25:16. I've tested that this is
> true for RFS1 (CRC error), RFS3 (frame too short), RFS4 (frame too
> long) and RFS8 (multicast).
Well, if your testing does match the manual, the reverted patch was most
probably just wrong in the first place.
> Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
> ---
> drivers/net/ethernet/renesas/sh_eth.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
> diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
> index ed67951f5271..317722e16043 100644
> --- a/drivers/net/ethernet/renesas/sh_eth.c
> +++ b/drivers/net/ethernet/renesas/sh_eth.c
[...]
> @@ -1459,8 +1458,8 @@ static int sh_eth_rx(struct net_device *ndev, u32 intr_status, int *quota)
>
> /* In case of almost all GETHER/ETHERs, the Receive Frame State
> * (RFS) bits in the Receive Descriptor 0 are from bit 9 to
> - * bit 0. However, in case of the R8A7740, R8A779x, and
> - * R7S72100 the RFS bits are from bit 25 to bit 16. So, the
> + * bit 0. However, in case of the R8A7740 and R7S72100
> + * the RFS bits are from bit 25 to bit 16. So, the
And that seems more logical to me, as we have the RFS bits starting with
bit 16 only on the SoCs with the GEther compatible register layout (though the
latter SoC doesn't support Gigabit speed).
Having the RFS bits start at bit 16 is most probably connected to a SoC
having support for hardware checksumming (bit 0-15 store the received frame
checksum for at least R7S72100), so merging the 'shift_rd0' and 'hw_crc' flags
seemed the reasonable next step to me (not taken due to the lack of
documentation)...
> * driver needs right shifting by 16.
> */
> if (mdp->cd->shift_rd0)
This hunk (inverted) was not a part of the commit you're reverting.
Perhaps you shouldn't call this patch revert? Or make a remark about this hunk
in the change-log?
WBR, Sergei
next prev parent reply other threads:[~2015-02-26 19:18 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-26 14:12 [PATCH net 0/4] Fixes for sh_eth #4 Ben Hutchings
2015-02-26 14:13 ` [PATCH net 1/4] sh_eth: Ensure proper ordering of descriptor active bit write/read Ben Hutchings
2015-02-26 14:19 ` [PATCH net 2/4] sh_eth: Fix RX recovery on R-Car in case of RX ring underrun Ben Hutchings
2015-02-27 20:20 ` Sergei Shtylyov
2015-02-26 14:21 ` [PATCH net 3/4] Revert "sh_eth: Enable Rx descriptor word 0 shift for r8a7790" Ben Hutchings
2015-02-26 16:14 ` Ben Hutchings
2015-02-26 19:17 ` Sergei Shtylyov [this message]
2015-02-26 20:13 ` Ben Hutchings
2015-02-26 20:35 ` Sergei Shtylyov
2015-02-28 19:47 ` David Miller
2015-02-26 14:21 ` [PATCH net 4/4] sh_eth: Really fix padding of short frames on TX Ben Hutchings
2015-02-27 22:43 ` [PATCH net 0/4] Fixes for sh_eth #4 David Miller
-- strict thread matches above, loose matches on Subject: below --
2015-03-03 0:51 [PATCH net 0/4] Fixes for sh_eth #4 v2 Ben Hutchings
2015-03-03 0:52 ` [PATCH net 3/4] Revert "sh_eth: Enable Rx descriptor word 0 shift for r8a7790" Ben Hutchings
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=54EF7163.80900@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=ben.hutchings@codethink.co.uk \
--cc=linux-kernel@lists.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;
as well as URLs for NNTP newsgroup(s).