sh_eth: fix 16-bit descriptor field access endianness too
authorSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Sat, 19 Dec 2015 22:48:04 +0000 (01:48 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 22 Dec 2015 20:23:47 +0000 (15:23 -0500)
commit5cbf20c747987346f8352b156e3f05d3b84ac4ac
tree13d4e7befd43d0e77edafd24c9f7e55790e46a5b
parentce8c839b74e3017996fad4e1b7ba2e2625ede82f
sh_eth: fix 16-bit descriptor field access endianness too

Commit 1299653affa4 ("sh_eth: fix descriptor access endianness") only
addressed the 32-bit buffer address field byte-swapping  but the driver
still accesses 16-bit frame/buffer length descriptor fields without the
necessary byte-swapping -- which should affect the big-endian kernels.
In order to be able to use {cpu|edmac}_to_{edmac|cpu}(), we need to declare
the RX/TX descriptor word 1 as a 32-bit field and use shifts/masking to
access the 16-bit subfields (which gets rid of the ugly #ifdef'ery too)...

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/renesas/sh_eth.c
drivers/net/ethernet/renesas/sh_eth.h