IXP425: help on HSS channelized service

Krzysztof Halasa khc at pm.waw.pl
Thu Nov 26 14:03:26 EST 2009


Russell King - ARM Linux <linux at arm.linux.org.uk> writes:

>> struct desc {
>>         u32 next;               /* pointer to next buffer, unused */
>> 
>> #ifdef __ARMEB__
>>         u16 buf_len;            /* buffer length */
>>         u16 pkt_len;            /* packet length */
>>         u32 data;               /* pointer to data buffer in RAM */
>>         u8 status;
>>         u8 error_count;
>>         u16 __reserved;
>> #else
>>         u16 pkt_len;            /* packet length */
>>         u16 buf_len;            /* buffer length */
>>         u32 data;               /* pointer to data buffer in RAM */
>>         u16 __reserved;
>>         u8 error_count;
>>         u8 status;
>> #endif
>>         u32 __reserved1[4];
>
> If these structures are sensitive to the byte-endian, they should be
> defined using [bl]e(32|16|8) so that sparse can check that you're
> using appropriate cpu_to_xxx() and xxx_to_cpu() endian conversions on
> them.

The values are in CPU order. I'll run sparse on this stuff, haven't done
that in a (too) long time.

It used to work in both LE and BE modes, though.
-- 
Krzysztof Halasa



More information about the linux-arm-kernel mailing list