]> git.karo-electronics.de Git - linux-beck.git/commit
net: ethernet: stmmac: change dma descriptors to __le32
authorMichael Weiser <michael.weiser@gmx.de>
Mon, 14 Nov 2016 17:58:05 +0000 (18:58 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 16 Nov 2016 03:05:54 +0000 (22:05 -0500)
commitf8be0d78be6e7f199116a5e644ee20ff0ce413f7
treefa9e10e4e41ea2a86c6a165532452896997f277d
parent4780566784b3968ab9fd6cc94bab72421813f004
net: ethernet: stmmac: change dma descriptors to __le32

The stmmac driver does not take into account the processor may be big
endian when writing the DMA descriptors. This causes the ethernet
interface not to be initialised correctly when running a big-endian
kernel. Change the descriptors for DMA to use __le32 and ensure they are
suitably swapped before writing. Tested successfully on the
Cubieboard2.

Signed-off-by: Michael Weiser <michael.weiser@gmx.de>
Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Cc: Alexandre Torgue <alexandre.torgue@st.com>
Cc: netdev@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/chain_mode.c
drivers/net/ethernet/stmicro/stmmac/descs.h
drivers/net/ethernet/stmicro/stmmac/descs_com.h
drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c
drivers/net/ethernet/stmicro/stmmac/enh_desc.c
drivers/net/ethernet/stmicro/stmmac/norm_desc.c
drivers/net/ethernet/stmicro/stmmac/ring_mode.c
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c