RE: [PATCHv2] usb: gadget: f_fs: Add flags to descriptors block

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

> -----Original Message-----
> From: Michal Nazarewicz [mailto:mpn@xxxxxxxxxx] On Behalf Of Michal
> Nazarewicz
> Sent: Wednesday, June 04, 2014 9:06 PM
> To: Krzysztof Opasiak; 'Manu Gautam'
> Cc: balbi@xxxxxx; jackp@xxxxxxxxxxxxxx; pheatwol@xxxxxxxxxxxxxx;
> linux-usb@xxxxxxxxxxxxxxx; linux-arm-msm@xxxxxxxxxxxxxxx;
> benoit@xxxxxxxxxxx; Andrzej Pietrasiewicz;
> gregkh@xxxxxxxxxxxxxxxxxxx; '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.opasiak@xxxxxxxxxxx>
> 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.opasiak@xxxxxxxxxxx







--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux