Thread: [Linux1394-cvslog] rev 538 - trunk
Brought to you by:
aeb,
bencollins
From: SVN U. <ben...@li...> - 2002-08-03 06:27:12
|
Author: bencollins Date: 2002-08-03 11:20:10 -0400 (Sat, 03 Aug 2002) New Revision: 538 Modified: trunk/amdtp.c Log: Must include asm/byteorder.h if you are going to use the __BIG_ENDIAN_BITFIELD define. Also, added big-endian bitfield struct for iso_packet. Modified: trunk/amdtp.c ============================================================================== --- trunk/amdtp.c (original) +++ trunk/amdtp.c 2002-08-03 11:20:10.000000000 -0400 @@ -121,17 +121,40 @@ dma_addr_t payload_bus; }; -#ifdef __BIG_ENDIAN_BITFIELD +#include <asm/byteorder.h> -#error Big endian bitfields not tested +#if defined __BIG_ENDIAN_BITFIELD -#else +struct iso_packet { + /* First quadlet */ + unsigned int dbs : 8; + unsigned int eoh0 : 2; + unsigned int sid : 6; + + unsigned int dbc : 8; + unsigned int fn : 2; + unsigned int qpc : 3; + unsigned int sph : 1; + unsigned int reserved : 2; + + /* Second quadlet */ + unsigned int fdf : 8; + unsigned int eoh1 : 2; + unsigned int fmt : 6; + + unsigned int syt : 16; + + quadlet_t data[0]; +}; + +#elif defined __LITTLE_ENDIAN_BITFIELD struct iso_packet { /* First quadlet */ unsigned int sid : 6; unsigned int eoh0 : 2; unsigned int dbs : 8; + unsigned int reserved : 2; unsigned int sph : 1; unsigned int qpc : 3; @@ -142,11 +165,16 @@ unsigned int fmt : 6; unsigned int eoh1 : 2; unsigned int fdf : 8; + unsigned int syt : 16; quadlet_t data[0]; }; +#else + +#error Unknown bitfield type + #endif struct fraction { |