Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3ac19c90 authored by David Daney's avatar David Daney Committed by David S. Miller
Browse files

netdev: octeon_mgmt: Fix structure layout for little-endian.



The C ABI reverses the bitfield fill order when compiled as
little-endian.

Signed-off-by: default avatarDavid Daney <david.daney@cavium.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 906996d6
Loading
Loading
Loading
Loading
+15 −7
Original line number Diff line number Diff line
@@ -46,6 +46,9 @@
union mgmt_port_ring_entry {
	u64 d64;
	struct {
#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;
@@ -53,10 +56,15 @@ union mgmt_port_ring_entry {
		u64 tstamp:1;
		/* The RX error code */
		u64 code:7;
#define RING_ENTRY_CODE_DONE 0xf
#define RING_ENTRY_CODE_MORE 0x10
		/* Physical address of the buffer */
		u64 addr:40;
#else
		u64 addr:40;
		u64 code:7;
		u64 tstamp:1;
		u64 len:14;
		u64 reserved_62_63:2;
#endif
	} s;
};