From mboxrd@z Thu Jan 1 00:00:00 1970 From: Krzysztof Opasiak Subject: RE: [PATCHv2] usb: gadget: f_fs: Add flags to descriptors block Date: Thu, 05 Jun 2014 13:32:35 +0200 Message-ID: <008201cf80b1$d9efc590$8dcf50b0$%opasiak@samsung.com> References: <1387877408-17567-1-git-send-email-mgautam@codeaurora.org> <005901cf8000$c16ec090$444c41b0$%opasiak@samsung.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Return-path: Received: from mailout2.w1.samsung.com ([210.118.77.12]:12836 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751541AbaFELcc convert rfc822-to-8bit (ORCPT ); Thu, 5 Jun 2014 07:32:32 -0400 In-reply-to: Content-language: en-us Sender: linux-arm-msm-owner@vger.kernel.org List-Id: linux-arm-msm@vger.kernel.org To: 'Michal Nazarewicz' , Krzysztof Opasiak Cc: balbi@ti.com, jackp@codeaurora.org, pheatwol@codeaurora.org, linux-usb@vger.kernel.org, linux-arm-msm@vger.kernel.org, benoit@android.com, Andrzej Pietrasiewicz , gregkh@linuxfoundation.org, 'Manu Gautam' , Karol Lewandowski , Marek Szyprowski Hi, > -----Original Message----- > From: Michal Nazarewicz [mailto:mpn@google.com] On Behalf Of Michal > Nazarewicz > Sent: Wednesday, June 04, 2014 9:06 PM > To: Krzysztof Opasiak; 'Manu Gautam' > Cc: balbi@ti.com; jackp@codeaurora.org; pheatwol@codeaurora.org; > linux-usb@vger.kernel.org; linux-arm-msm@vger.kernel.org; > benoit@android.com; Andrzej Pietrasiewicz; > gregkh@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 > 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@samsung.com