[U-Boot] [PATCH] net: Fix emaclite driver to support little-endian microblaze
Sergei Shtylyov
sshtylyov at mvista.com
Thu Oct 14 21:26:21 CEST 2010
Hello.
On 10/11/10 05:41, Michal Simek wrote:
> Support New emaclite AXI IP.
> Signed-off-by: Michal Simek<monstr at monstr.eu>
> CC: Ben Warren<biggerbadderben at gmail.com>
[...]
> diff --git a/drivers/net/xilinx_emaclite.c b/drivers/net/xilinx_emaclite.c
> index 455ce0c..76af939 100644
> --- a/drivers/net/xilinx_emaclite.c
> +++ b/drivers/net/xilinx_emaclite.c
> @@ -309,7 +309,7 @@ static int emaclite_recv(struct eth_device *dev)
> #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))) &
This wouldn't pass checkpatch.pl -- spaces before ( not allowed.
> 0xFFFF0000 )>> 16) {
> case 0x806:
> length = 42 + 20; /* FIXME size of ARP */
> @@ -317,7 +317,7 @@ static int emaclite_recv(struct eth_device *dev)
> break;
> case 0x800:
> length = 14 + 14 +
> - (((in_be32 (baseaddress + XEL_RXBUFF_OFFSET + 0x10)) &
> + (((ntohl(in_be32 (baseaddress + XEL_RXBUFF_OFFSET + 0x10))) &
Same here.
WBR, Sergei
More information about the U-Boot
mailing list