]> git.sur5r.net Git - u-boot/commitdiff
net: Fix emaclite driver to support little-endian microblaze
authorMichal Simek <monstr@monstr.eu>
Mon, 11 Oct 2010 01:41:46 +0000 (11:41 +1000)
committerBen Warren <biggerbadderben@gmail.com>
Tue, 12 Oct 2010 06:00:29 +0000 (23:00 -0700)
Support New emaclite AXI IP.

Signed-off-by: Michal Simek <monstr@monstr.eu>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
drivers/net/xilinx_emaclite.c

index 0820daa2bb8284d0ac7a304813262d79801f5687..74a201259be59a514a305b9847743618d2a1a6f0 100644 (file)
@@ -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;