Commit 96a420d2 authored by Vincent Pelletier's avatar Vincent Pelletier Committed by Felipe Balbi

usb: gadget: f_fs: Document eventfd effect on descriptor format.

When FUNCTIONFS_EVENTFD flag is set, __ffs_data_got_descs reads a 32bits,
little-endian value right after the fixed structure header, and passes it
to eventfd_ctx_fdget. Document this.

Also, rephrase a comment to be affirmative about the role of string
descriptor at index 0. Ref: USB 2.0 spec paragraph "9.6.7 String", and
also checked to still be current in USB 3.0 spec paragraph "9.6.9 String".
Signed-off-by: default avatarVincent Pelletier <plr.vincent@gmail.com>
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
parent 7e4da3fc
...@@ -2091,8 +2091,8 @@ static int __ffs_data_do_entity(enum ffs_entity_type type, ...@@ -2091,8 +2091,8 @@ static int __ffs_data_do_entity(enum ffs_entity_type type,
case FFS_STRING: case FFS_STRING:
/* /*
* Strings are indexed from 1 (0 is magic ;) reserved * Strings are indexed from 1 (0 is reserved
* for languages list or some such) * for languages list)
*/ */
if (*valuep > helper->ffs->strings_count) if (*valuep > helper->ffs->strings_count)
helper->ffs->strings_count = *valuep; helper->ffs->strings_count = *valuep;
......
...@@ -93,6 +93,7 @@ struct usb_ext_prop_desc { ...@@ -93,6 +93,7 @@ struct usb_ext_prop_desc {
* | 0 | magic | LE32 | FUNCTIONFS_DESCRIPTORS_MAGIC_V2 | * | 0 | magic | LE32 | FUNCTIONFS_DESCRIPTORS_MAGIC_V2 |
* | 4 | length | LE32 | length of the whole data chunk | * | 4 | length | LE32 | length of the whole data chunk |
* | 8 | flags | LE32 | combination of functionfs_flags | * | 8 | flags | LE32 | combination of functionfs_flags |
* | | eventfd | LE32 | eventfd file descriptor |
* | | fs_count | LE32 | number of full-speed descriptors | * | | fs_count | LE32 | number of full-speed descriptors |
* | | hs_count | LE32 | number of high-speed descriptors | * | | hs_count | LE32 | number of high-speed descriptors |
* | | ss_count | LE32 | number of super-speed descriptors | * | | ss_count | LE32 | number of super-speed descriptors |
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment