From 3f91ec0fa1ceab413fa2e74b4ffd37ab505cc66c Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Mon, 11 Oct 2010 11:41:46 +1000 Subject: [PATCH] net: Fix emaclite driver to support little-endian microblaze Support New emaclite AXI IP. Signed-off-by: Michal Simek Signed-off-by: Ben Warren --- drivers/net/xilinx_emaclite.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/xilinx_emaclite.c b/drivers/net/xilinx_emaclite.c index 0820daa2bb..74a201259b 100644 --- a/drivers/net/xilinx_emaclite.c +++ b/drivers/net/xilinx_emaclite.c @@ -322,7 +322,7 @@ int eth_rx (void) #endif } /* Get the length of the frame that arrived */ - switch(((in_be32 (baseaddress + XEL_RXBUFF_OFFSET + 0xC)) & + switch(((ntohl(in_be32 (baseaddress + XEL_RXBUFF_OFFSET + 0xC))) & 0xFFFF0000 ) >> 16) { case 0x806: length = 42 + 20; /* FIXME size of ARP */ @@ -330,7 +330,7 @@ int eth_rx (void) break; case 0x800: length = 14 + 14 + - (((in_be32 (baseaddress + XEL_RXBUFF_OFFSET + 0x10)) & + (((ntohl(in_be32 (baseaddress + XEL_RXBUFF_OFFSET + 0x10))) & 0xFFFF0000) >> 16); /* FIXME size of IP packet */ debug ("IP Packet\n"); break; -- 2.39.5