On 01/29/2014 01:01 PM, David Laight wrote:
> From: Robert Baldyga 
>> This patch adds two example applications showing usage of Asynchronous I/O 
>> API
>> of FunctionFS. First one (aio_simple) is simple example of bidirectional data
>> transfer. Second one (aio_multibuff) shows multi-buffer data transfer, which
>> may to be used in high performance applications.
> ...
>> +static const struct {
>> +    struct usb_functionfs_descs_head header;
>> +    struct {
>> +            struct usb_interface_descriptor intf;
>> +            struct usb_endpoint_descriptor_no_audio bulk_sink;
>> +            struct usb_endpoint_descriptor_no_audio bulk_source;
>> +    } __attribute__ ((__packed__)) fs_descs, hs_descs;
> 
> Does this actually need to be marked 'packed' ?

Yes, it need to be 'packed', because functionfs calculates offset of
each structure basing on sizeof(). Structures describing interfaces and
endpoints are also marked 'packed'.

Best regards
Robert Baldyga
Samsung R&D Institute Poland
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to