Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.kernel > #56792 > unrolled thread

[PATCH] Consolidate gadget config

Started byriku.voipio@linaro.org
First post2017-01-27 15:20 +0100
Last post2017-01-27 22:20 +0100
Articles 4 — 3 participants

Back to article view | Back to linux.debian.kernel


Contents

  [PATCH] Consolidate gadget config riku.voipio@linaro.org - 2017-01-27 15:20 +0100
    Re: [PATCH] Consolidate gadget config Ben Hutchings <ben@decadent.org.uk> - 2017-01-27 20:20 +0100
      Re: [PATCH] Consolidate gadget config Riku Voipio <riku.voipio@linaro.org> - 2017-01-27 21:50 +0100
        Re: [PATCH] Consolidate gadget config Ben Hutchings <ben@decadent.org.uk> - 2017-01-27 22:20 +0100

#56792 — [PATCH] Consolidate gadget config

Fromriku.voipio@linaro.org
Date2017-01-27 15:20 +0100
Subject[PATCH] Consolidate gadget config
Message-ID<t4fxD-5cg-15@gated-at.bofh.it>
From: Riku Voipio <riku.voipio@linaro.org>

If CONFIG_USB_GADGET is selected, enable all configfs functions as
modules and most popular legacy modules (ethernet and serial).
g_nokia left as armhf specific (Nokia N900 tradition)

---
 debian/config/armhf/config |  3 ---
 debian/config/config       | 31 +++++++++++++++++++++++++++++++
 2 files changed, 31 insertions(+), 3 deletions(-)

diff --git a/debian/config/armhf/config b/debian/config/armhf/config
index 5fe1fd751..9092a250e 100644
--- a/debian/config/armhf/config
+++ b/debian/config/armhf/config
@@ -1114,9 +1114,6 @@ CONFIG_USB_GADGET=m
 ##
 ## file: drivers/usb/gadget/legacy/Kconfig
 ##
-CONFIG_USB_ETH=m
-CONFIG_USB_ETH_RNDIS=y
-CONFIG_USB_GADGETFS=m
 CONFIG_USB_G_NOKIA=m
 
 ##
diff --git a/debian/config/config b/debian/config/config
index c744073f9..d6ec09462 100644
--- a/debian/config/config
+++ b/debian/config/config
@@ -4609,6 +4609,37 @@ CONFIG_USB_DYNAMIC_MINORS=y
 # CONFIG_USB_GADGET_DEBUG_FILES is not set
 # CONFIG_USB_GADGET_DEBUG_FS is not set
 CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2
+CONFIG_USB_CONFIGFS=m
+CONFIG_USB_CONFIGFS_SERIAL=y
+CONFIG_USB_CONFIGFS_ACM=y
+CONFIG_USB_CONFIGFS_OBEX=y
+CONFIG_USB_CONFIGFS_NCM=y
+CONFIG_USB_CONFIGFS_ECM=y
+CONFIG_USB_CONFIGFS_ECM_SUBSET=y
+CONFIG_USB_CONFIGFS_RNDIS=y
+CONFIG_USB_CONFIGFS_EEM=y
+CONFIG_USB_CONFIGFS_PHONET=y
+CONFIG_USB_CONFIGFS_MASS_STORAGE=y
+CONFIG_USB_CONFIGFS_F_LB_SS=y
+CONFIG_USB_CONFIGFS_F_FS=y
+CONFIG_USB_CONFIGFS_F_UAC1=y
+CONFIG_USB_CONFIGFS_F_UAC2=y
+CONFIG_USB_CONFIGFS_F_MIDI=y
+CONFIG_USB_CONFIGFS_F_HID=y
+CONFIG_USB_CONFIGFS_F_UVC=y
+CONFIG_USB_CONFIGFS_F_PRINTER=y
+
+##
+## file: drivers/usb/gadget/legacy/Kconfig
+##
+CONFIG_USB_ETH=m
+CONFIG_USB_ETH_RNDIS=y
+CONFIG_USB_GADGETFS=m
+CONFIG_USB_FUNCTIONFS=m
+CONFIG_USB_FUNCTIONFS_ETH=y
+CONFIG_USB_FUNCTIONFS_RNDIS=y
+CONFIG_USB_FUNCTIONFS_GENERIC=y
+CONFIG_USB_G_SERIAL=m
 
 ##
 ## file: drivers/usb/gadget/udc/Kconfig
-- 
2.11.0

[toc] | [next] | [standalone]


#56796

FromBen Hutchings <ben@decadent.org.uk>
Date2017-01-27 20:20 +0100
Message-ID<t4kdY-88u-15@gated-at.bofh.it>
In reply to#56792

[Multipart message — attachments visible in raw view] — view raw

On Fri, 2017-01-27 at 16:02 +0200, riku.voipio@linaro.org wrote:
> From: Riku Voipio <riku.voipio@linaro.org>
> 
> If CONFIG_USB_GADGET is selected, enable all configfs functions as
> modules and most popular legacy modules (ethernet and serial).
> g_nokia left as armhf specific (Nokia N900 tradition)
[...]
> --- a/debian/config/armhf/config
> +++ b/debian/config/armhf/config
> @@ -1114,9 +1114,6 @@ CONFIG_USB_GADGET=m
>  ##
>  ## file: drivers/usb/gadget/legacy/Kconfig
>  ##
> -CONFIG_USB_ETH=m
> -CONFIG_USB_ETH_RNDIS=y
> -CONFIG_USB_GADGETFS=m
>  CONFIG_USB_G_NOKIA=m
>  
>  ##
> diff --git a/debian/config/config b/debian/config/config
> index c744073f9..d6ec09462 100644
> --- a/debian/config/config
> +++ b/debian/config/config
[...]
> +##
> +## file: drivers/usb/gadget/legacy/Kconfig
> +##
> +CONFIG_USB_ETH=m
> +CONFIG_USB_ETH_RNDIS=y
> +CONFIG_USB_GADGETFS=m
> +CONFIG_USB_FUNCTIONFS=m
> +CONFIG_USB_FUNCTIONFS_ETH=y
> +CONFIG_USB_FUNCTIONFS_RNDIS=y
> +CONFIG_USB_FUNCTIONFS_GENERIC=y
> +CONFIG_USB_G_SERIAL=m

Sorry to mess you around, but I wonder now if it really makes sense to
enable more of the legacy interface.  If I understood correctly, the
configfs interface provides all the same functionality and more, and
userspace should be moving to use that.

Perhaps we should:
1. Enable the configfs interface in the top-level config
2. Leave armhf with limited legacy configuration interface support for
stretch (in case there are users that depend on it)
3. Disable the legacy interface post-stretch.

What do you think of that?

Ben.

-- 
Ben Hutchings
Design a system any fool can use, and only a fool will want to use it.

[toc] | [prev] | [next] | [standalone]


#56797

FromRiku Voipio <riku.voipio@linaro.org>
Date2017-01-27 21:50 +0100
Message-ID<t4lD3-ro-3@gated-at.bofh.it>
In reply to#56796
On 27 January 2017 at 21:09, Ben Hutchings <ben@decadent.org.uk> wrote:
> On Fri, 2017-01-27 at 16:02 +0200, riku.voipio@linaro.org wrote:
>> From: Riku Voipio <riku.voipio@linaro.org>
>>
>> If CONFIG_USB_GADGET is selected, enable all configfs functions as
>> modules and most popular legacy modules (ethernet and serial).
>> g_nokia left as armhf specific (Nokia N900 tradition)
> [...]
>> --- a/debian/config/armhf/config
>> +++ b/debian/config/armhf/config
>> @@ -1114,9 +1114,6 @@ CONFIG_USB_GADGET=m
>>  ##
>>  ## file: drivers/usb/gadget/legacy/Kconfig
>>  ##
>> -CONFIG_USB_ETH=m
>> -CONFIG_USB_ETH_RNDIS=y
>> -CONFIG_USB_GADGETFS=m
>>  CONFIG_USB_G_NOKIA=m
>>
>>  ##
>> diff --git a/debian/config/config b/debian/config/config
>> index c744073f9..d6ec09462 100644
>> --- a/debian/config/config
>> +++ b/debian/config/config
> [...]
>> +##
>> +## file: drivers/usb/gadget/legacy/Kconfig
>> +##
>> +CONFIG_USB_ETH=m
>> +CONFIG_USB_ETH_RNDIS=y
>> +CONFIG_USB_GADGETFS=m
>> +CONFIG_USB_FUNCTIONFS=m
>> +CONFIG_USB_FUNCTIONFS_ETH=y
>> +CONFIG_USB_FUNCTIONFS_RNDIS=y
>> +CONFIG_USB_FUNCTIONFS_GENERIC=y
>> +CONFIG_USB_G_SERIAL=m
>
> Sorry to mess you around, but I wonder now if it really makes sense to
> enable more of the legacy interface.  If I understood correctly, the
> configfs interface provides all the same functionality and more, and
> userspace should be moving to use that.
>
> Perhaps we should:
> 1. Enable the configfs interface in the top-level config
> 2. Leave armhf with limited legacy configuration interface support for
> stretch (in case there are users that depend on it)
> 3. Disable the legacy interface post-stretch.

I thought about it, but frankly using g_ether and g_serial is so convenient.
it's a matter of "modprobe  g_ether && dhclient -i usb0". Using the modern
configfs way is quite a bit of more steps:

http://events.linuxfoundation.org/sites/events/files/slides/USB%20Gadget%20Configfs%20API_0.pdf

We would at least need libusbg and gadget-tool
(https://github.com/kopasiak/gt) included in
debian before deprecating.

Riku

[toc] | [prev] | [next] | [standalone]


#56798

FromBen Hutchings <ben@decadent.org.uk>
Date2017-01-27 22:20 +0100
Message-ID<t4m66-Rh-3@gated-at.bofh.it>
In reply to#56797

[Multipart message — attachments visible in raw view] — view raw

On Fri, 2017-01-27 at 22:30 +0200, Riku Voipio wrote:
> On 27 January 2017 at 21:09, Ben Hutchings <ben@decadent.org.uk> wrote:
> > On Fri, 2017-01-27 at 16:02 +0200, riku.voipio@linaro.org wrote:
> > > From: Riku Voipio <riku.voipio@linaro.org>
> > > 
> > > If CONFIG_USB_GADGET is selected, enable all configfs functions as
> > > modules and most popular legacy modules (ethernet and serial).
> > > g_nokia left as armhf specific (Nokia N900 tradition)
> > 
> > [...]
> > > --- a/debian/config/armhf/config
> > > +++ b/debian/config/armhf/config
> > > @@ -1114,9 +1114,6 @@ CONFIG_USB_GADGET=m
> > >  ##
> > >  ## file: drivers/usb/gadget/legacy/Kconfig
> > >  ##
> > > -CONFIG_USB_ETH=m
> > > -CONFIG_USB_ETH_RNDIS=y
> > > -CONFIG_USB_GADGETFS=m
> > >  CONFIG_USB_G_NOKIA=m
> > > 
> > >  ##
> > > diff --git a/debian/config/config b/debian/config/config
> > > index c744073f9..d6ec09462 100644
> > > --- a/debian/config/config
> > > +++ b/debian/config/config
> > 
> > [...]
> > > +##
> > > +## file: drivers/usb/gadget/legacy/Kconfig
> > > +##
> > > +CONFIG_USB_ETH=m
> > > +CONFIG_USB_ETH_RNDIS=y
> > > +CONFIG_USB_GADGETFS=m
> > > +CONFIG_USB_FUNCTIONFS=m
> > > +CONFIG_USB_FUNCTIONFS_ETH=y
> > > +CONFIG_USB_FUNCTIONFS_RNDIS=y
> > > +CONFIG_USB_FUNCTIONFS_GENERIC=y
> > > +CONFIG_USB_G_SERIAL=m
> > 
> > Sorry to mess you around, but I wonder now if it really makes sense to
> > enable more of the legacy interface.  If I understood correctly, the
> > configfs interface provides all the same functionality and more, and
> > userspace should be moving to use that.
> > 
> > Perhaps we should:
> > 1. Enable the configfs interface in the top-level config
> > 2. Leave armhf with limited legacy configuration interface support for
> > stretch (in case there are users that depend on it)
> > 3. Disable the legacy interface post-stretch.
> 
> I thought about it, but frankly using g_ether and g_serial is so convenient.
> it's a matter of "modprobe  g_ether && dhclient -i usb0".
> Using the modern configfs way is quite a bit of more steps:
> 
> http://events.linuxfoundation.org/sites/events/files/slides/USB%20Gadget%20Configfs%20API_0.pdf

I know, that's the same document I found.

> We would at least need libusbg and gadget-tool
> (https://github.com/kopasiak/gt) included in
> debian before deprecating.

It's rather sad that they haven't been packaged yet.  Can you open an
ITP or RFP for them?

I've applied your proposed changes but I would like to remove the
legacy interfaces once gadget-tool is packaged.

Ben.

-- 
Ben Hutchings
Design a system any fool can use, and only a fool will want to use it.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.kernel


csiph-web