netdev: octeon_mgmt: Fix structure layout for little-endian.
[pandora-kernel.git] / drivers / net / ethernet / octeon / octeon_mgmt.c
index a603faf..91a8a5d 100644 (file)
 union mgmt_port_ring_entry {
        u64 d64;
        struct {
-               u64    reserved_62_63:2;
+#define RING_ENTRY_CODE_DONE 0xf
+#define RING_ENTRY_CODE_MORE 0x10
+#ifdef __BIG_ENDIAN_BITFIELD
+               u64 reserved_62_63:2;
                /* Length of the buffer/packet in bytes */
-               u64    len:14;
+               u64 len:14;
                /* For TX, signals that the packet should be timestamped */
-               u64    tstamp:1;
+               u64 tstamp:1;
                /* The RX error code */
-               u64    code:7;
-#define RING_ENTRY_CODE_DONE 0xf
-#define RING_ENTRY_CODE_MORE 0x10
+               u64 code:7;
                /* Physical address of the buffer */
-               u64    addr:40;
+               u64 addr:40;
+#else
+               u64 addr:40;
+               u64 code:7;
+               u64 tstamp:1;
+               u64 len:14;
+               u64 reserved_62_63:2;
+#endif
        } s;
 };