All of lore.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Opasiak <k.opasiak-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
To: 'Michal Nazarewicz' <mina86-deATy8a+UHjQT0dZR+AlfA@public.gmane.org>
Cc: balbi-l0cyMroinI0@public.gmane.org,
	jackp-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
	pheatwol-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
	linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	benoit-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org,
	Andrzej Pietrasiewicz
	<andrzej.p-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
	gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org,
	'Manu Gautam' <mgautam-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
	Karol Lewandowski
	<k.lewandowsk-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
	Marek Szyprowski
	<m.szyprowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
Subject: RE: [PATCHv2] usb: gadget: f_fs: Add flags to descriptors block
Date: Wed, 04 Jun 2014 16:24:53 +0200	[thread overview]
Message-ID: <005901cf8000$c16ec090$444c41b0$%opasiak@samsung.com> (raw)
In-Reply-To: <xa1tob1vazxh.fsf-deATy8a+UHjQT0dZR+AlfA@public.gmane.org>

Hello Michal,

> -----Original Message-----
> From: linux-usb-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org [mailto:linux-usb-
> owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org] On Behalf Of Michal Nazarewicz
> Sent: Tuesday, February 25, 2014 6:02 PM
> To: Manu Gautam
> Cc: balbi-l0cyMroinI0@public.gmane.org; jackp-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org; pheatwol-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org;
> linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org;
> benoit-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org; Andrzej Pietrasiewicz;
> gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org; 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-deATy8a+UHjQT0dZR+AlfA@public.gmane.org>
> ---
>  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-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org




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

  parent reply	other threads:[~2014-06-04 14:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-24  9:30 [PATCH v5 1/1] usb: gadget: f_fs: Add support for SuperSpeed Mode Manu Gautam
     [not found] ` <1387877408-17567-1-git-send-email-mgautam-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2014-02-25  4:47   ` Manu Gautam
2014-02-25 14:01 ` [RFC] usb: gadget: f_fs: Add flags to descriptors block Michal Nazarewicz
     [not found]   ` <xa1tsir7b5uz.fsf-deATy8a+UHjQT0dZR+AlfA@public.gmane.org>
2014-02-25 17:02     ` [PATCHv2] " Michal Nazarewicz
2014-02-25 18:32       ` Felipe Balbi
2014-02-28 10:11       ` Manu Gautam
     [not found]       ` <xa1tob1vazxh.fsf-deATy8a+UHjQT0dZR+AlfA@public.gmane.org>
2014-06-04 14:24         ` Krzysztof Opasiak [this message]
     [not found]           ` <005901cf8000$c16ec090$444c41b0$%opasiak-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2014-06-04 19:06             ` Michal Nazarewicz
2014-06-05 11:32               ` Krzysztof Opasiak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='005901cf8000$c16ec090$444c41b0$%opasiak@samsung.com' \
    --to=k.opasiak-sze3o3uu22jbdgjk7y7tuq@public.gmane.org \
    --cc=andrzej.p-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
    --cc=balbi-l0cyMroinI0@public.gmane.org \
    --cc=benoit-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org \
    --cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
    --cc=jackp-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=k.lewandowsk-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
    --cc=linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=m.szyprowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
    --cc=mgautam-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=mina86-deATy8a+UHjQT0dZR+AlfA@public.gmane.org \
    --cc=pheatwol-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.