[U-Boot] [PATCH] net: Fix emaclite driver to support little-endian microblaze

Ben Warren biggerbadderben at gmail.com
Tue Oct 12 08:34:10 CEST 2010


  Hi Michal,

On 10/10/2010 6:41 PM, Michal Simek wrote:
> Support New emaclite AXI IP.
>
> Signed-off-by: Michal Simek<monstr at monstr.eu>
> CC: Ben Warren<biggerbadderben at gmail.com>
> ---
>   drivers/net/xilinx_emaclite.c |    4 ++--
>   1 files changed, 2 insertions(+), 2 deletions(-)
>
> 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)))&
>   			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)))&
>   			0xFFFF0000)>>  16); /* FIXME size of IP packet */
>   			debug ("IP Packet\n");
>   			break;
Applied to net repo.

thanks,
Ben


More information about the U-Boot mailing list