public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Greg Ungerer <gerg@uclinux•org>
To: Johannes Berg <johannes@sipsolutions•net>, netdev@vger•kernel.org
Cc: Lucas Stach <l.stach@pengutronix•de>,
	Fugang Duan <B38611@freescale•com>, Arnd Bergmann <arnd@arndb•de>,
	Shawn Guo <shawnguo@kernel•org>
Subject: Re: [PATCH v2] net: fec: make driver endian-safe
Date: Mon, 25 Jan 2016 10:52:17 +1000	[thread overview]
Message-ID: <56A571C1.5050905@uclinux.org> (raw)
In-Reply-To: <1453650757-27459-1-git-send-email-johannes@sipsolutions.net>

Hi Johannes,

On 25/01/16 01:52, Johannes Berg wrote:
> The driver treats the device descriptors as CPU-endian, which appears
> to be correct with the default endianness on both ARM (typically LE)
> and PowerPC (typically BE) SoCs, indicating that the hardware block
> is generated differently. Add endianness annotations and byteswaps as
> necessary.
> 
> It's not clear that the ifdef there really is correct and shouldn't
> just be #ifdef CONFIG_ARM, but I also can't test on anything but the
> i.MX6 HummingBoard where this gets it working with a BE kernel.
> 
> Signed-off-by: Johannes Berg <johannes@sipsolutions•net>

I tested this on a ColdFire (5208) target that uses this driver.
Simple testing showed it working with no problems. The ColdFire
SoC processors use a version of the FEC hardware module, and they
always run big-endian.

Regards
Greg


> ---
>  drivers/net/ethernet/freescale/Makefile   |   3 +
>  drivers/net/ethernet/freescale/fec.h      |  40 ++++++---
>  drivers/net/ethernet/freescale/fec_main.c | 130 ++++++++++++++++--------------
>  3 files changed, 101 insertions(+), 72 deletions(-)

  parent reply	other threads:[~2016-01-25  1:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-24 15:52 [PATCH v2] net: fec: make driver endian-safe Johannes Berg
2016-01-24 16:49 ` Arnd Bergmann
2016-01-24 19:12   ` Johannes Berg
2016-01-25  0:52 ` Greg Ungerer [this message]
2016-01-25  7:53   ` Johannes Berg
2016-01-25 18:52 ` David Miller

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=56A571C1.5050905@uclinux.org \
    --to=gerg@uclinux$(echo .)org \
    --cc=B38611@freescale$(echo .)com \
    --cc=arnd@arndb$(echo .)de \
    --cc=johannes@sipsolutions$(echo .)net \
    --cc=l.stach@pengutronix$(echo .)de \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=shawnguo@kernel$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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