[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <56A571C1.5050905@uclinux.org>
Date: Mon, 25 Jan 2016 10:52:17 +1000
From: Greg Ungerer <gerg@...inux.org>
To: Johannes Berg <johannes@...solutions.net>, netdev@...r.kernel.org
Cc: Lucas Stach <l.stach@...gutronix.de>,
Fugang Duan <B38611@...escale.com>,
Arnd Bergmann <arnd@...db.de>, Shawn Guo <shawnguo@...nel.org>
Subject: Re: [PATCH v2] net: fec: make driver endian-safe
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@...solutions.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(-)
Powered by blists - more mailing lists