]> git.baikalelectronics.ru Git - kernel.git/commit
net: fec: make driver endian-safe
authorJohannes Berg <johannes@sipsolutions.net>
Sun, 24 Jan 2016 15:52:37 +0000 (16:52 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 25 Jan 2016 18:51:52 +0000 (10:51 -0800)
commitac1dea250ef2ba0a0f17213daef87cda34c26761
tree70805bf4305eacbf0afeb40b0e45220edf051bc5
parent8dc8f0169fef3e2656465d95025892d243eab1b8
net: fec: make driver endian-safe

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>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/Makefile
drivers/net/ethernet/freescale/fec.h
drivers/net/ethernet/freescale/fec_main.c