Hi,

> -----Original Message-----
> From: Michal Nazarewicz [mailto:m...@google.com] On Behalf Of Michal
> Nazarewicz
> Sent: Wednesday, June 04, 2014 9:06 PM
> To: Krzysztof Opasiak; 'Manu Gautam'
> Cc: ba...@ti.com; ja...@codeaurora.org; pheat...@codeaurora.org;
> linux-usb@vger.kernel.org; linux-arm-...@vger.kernel.org;
> ben...@android.com; Andrzej Pietrasiewicz;
> gre...@linuxfoundation.org; 'Manu Gautam'; Karol Lewandowski; Marek
> Szyprowski
> Subject: Re: [PATCHv2] usb: gadget: f_fs: Add flags to descriptors
> block
> 
> >> -struct usb_functionfs_descs_head {
> >> -  __le32 magic;
> >> -  __le32 length;
> >> -  __le32 fs_count;
> >> -  __le32 hs_count;
> >> -} __attribute__((packed));
> 
> On Wed, Jun 04 2014, Krzysztof Opasiak <k.opas...@samsung.com>
> wrote:
> > 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.
> 
> https://lkml.org/lkml/2014/5/21/522

Thank you for this link, I have missed that patch.

> I don't care either way to be honest.  I guess if there's non-
> negligible
> number of usb_functionfs_descs_head structure users out there, I
> can
> prepare a CL adding the structure back.

The number of FFS users which I know is limited to 3 maybe 4, so it's not too 
much. I can port all of them to new API but I'm not sure if we would like to do 
this?

> 
> > 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?
> 
> That structure would not have many fields though, since what
> exactly the
> header contains depends on the flags.  Whether fs_count, hs_count
> and
> ss_count fields are present depends on which bits in the flags are
> set.
> So the usb_functionfs_descs_head2 structure could only contain:
> 
>       struct usb_functionfs_descs_head2 {
>               __le32 magic;
>               __le32 length;
>               __le32 flags;
>       };
> 
> I'm not sure if that would be particularly helpful.

I think that this structure is much more user friendly than copy-paste of those 
3 fields in each ffs program.

-- 
BR's
Krzysztof Opasiak
Samsung R&D Institute Poland
Samsung Electronics
k.opas...@samsung.com







--
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