Hello Michal, > -----Original Message----- > From: linux-usb-owner@xxxxxxxxxxxxxxx [mailto:linux-usb- > owner@xxxxxxxxxxxxxxx] On Behalf Of Michal Nazarewicz > Sent: Tuesday, February 25, 2014 6:02 PM > To: Manu Gautam > Cc: balbi@xxxxxx; jackp@xxxxxxxxxxxxxx; pheatwol@xxxxxxxxxxxxxx; > linux-usb@xxxxxxxxxxxxxxx; linux-arm-msm@xxxxxxxxxxxxxxx; > benoit@xxxxxxxxxxx; Andrzej Pietrasiewicz; > gregkh@xxxxxxxxxxxxxxxxxxx; Manu Gautam > Subject: [PATCHv2] usb: gadget: f_fs: Add flags to descriptors > block > > This reworks the way SuperSpeed descriptors are added and instead > of > having a magick after full and high speed descriptors, it reworks > the > whole descriptors block to include a flags field which lists which > descriptors are present and makes future extensions possible. > > Signed-off-by: Michal Nazarewicz <mina86@xxxxxxxxxx> > --- > drivers/usb/gadget/f_fs.c | 136 +++++++++++++++--------- > ------------ > drivers/usb/gadget/u_fs.h | 12 ++-- > include/uapi/linux/usb/functionfs.h | 49 ++++++++----- > 3 files changed, 94 insertions(+), 103 deletions(-) > > All right, with some fidling with my fan and limiting CPU frequency > to > the mininimum, I've managed to compile this patch and fixed all the > typos. > > Manu, if you could include it in your series, adjust your user > space > client and test it, it would be wonderful. :] > (...) snip > diff --git a/include/uapi/linux/usb/functionfs.h > b/include/uapi/linux/usb/functionfs.h > index 0f8f7be..ee6fcbc 100644 > --- a/include/uapi/linux/usb/functionfs.h > +++ b/include/uapi/linux/usb/functionfs.h > @@ -10,7 +10,14 @@ > > enum { > FUNCTIONFS_DESCRIPTORS_MAGIC = 1, > - FUNCTIONFS_STRINGS_MAGIC = 2 > + FUNCTIONFS_STRINGS_MAGIC = 2, > + FUNCTIONFS_DESCRIPTORS_MAGIC_V2 = 3, > +}; > + > +enum functionfs_flags { > + FUNCTIONFS_HAS_FS_DESC = 1, > + FUNCTIONFS_HAS_HS_DESC = 2, > + FUNCTIONFS_HAS_SS_DESC = 4, > }; > > #define FUNCTIONFS_SS_DESC_MAGIC 0x0055DE5C > @@ -30,33 +37,39 @@ struct usb_endpoint_descriptor_no_audio { > > > /* > - * All numbers must be in little endian order. > - */ > - > -struct usb_functionfs_descs_head { > - __le32 magic; > - __le32 length; > - __le32 fs_count; > - __le32 hs_count; > -} __attribute__((packed)); > - > -/* I have tried to compile FFS examples with v3.15-rc8 but I have faced an issue that they are unable to build due to missing definition of this structure. The same is with adb, sdb and all userspace apps which use legacy API. What is the reason of removing it? Was your intentions? Maybe would be a good idea to leave this structure untouched as legacy userspace API? There is also no structure definition for new API, maybe suitable structure should be defined (struct usb_functionfs_descs_head2 for example) to make userspace life easier? -- BR's Krzysztof Opasiak Samsung R&D Institute Poland Samsung Electronics k.opasiak@xxxxxxxxxxx -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html