[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20141105190821.GF6548@saruman>
Date: Wed, 5 Nov 2014 13:08:21 -0600
From: Felipe Balbi <balbi@...com>
To: Neil Zhang <zhangwm@...vell.com>
CC: Andrzej Pietrasiewicz <andrzej.p@...sung.com>,
"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"balbi@...com" <balbi@...com>,
"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>
Subject: Re: [PATCH] usb: gadget: don't create new string_container if
already exist
On Tue, Nov 04, 2014 at 03:05:57AM -0800, Neil Zhang wrote:
>
> > -----Original Message-----
> > From: Andrzej Pietrasiewicz [mailto:andrzej.p@...sung.com]
> > Sent: 2014年10月28日 21:10
> > To: Neil Zhang; linux-usb@...r.kernel.org; linux-kernel@...r.kernel.org
> > Cc: balbi@...com; gregkh@...uxfoundation.org
> > Subject: Re: [PATCH] usb: gadget: don't create new string_container if already
> > exist
> >
> > Hi,
> >
> > W dniu 28.10.2014 o 12:33, Neil Zhang pisze:
> > > Don't create new usb_gadget_string_container if the current strings
> > > are already exist in the usb_composite_dev.
> > > Otherwise the ids_tab will overflow soon if we bind / unbind usb
> > > functions frequently like android does.
> >
> > The problem you are describing does not exist in mainline kernel, where
> > functions are always unbound as part of the whole gadget's unbind - regardless
> > of whether it is a legacy gadget or configfs-composed gadget. When the whole
> > gadget is unbound, composite_dev_cleanup() is called which zeroes cdev-
> > >next_string_id and frees all gadget strings containers.
> >
>
> Yes, you are right that the current mainline won't suffer this issue.
> But it will be needed if we want to implement similar features like android do.
once you have the features, then implement it. I don't want any unused
code here, specially since it won't be tested by anything.
> It will only remove config rather than whole gadget driver.
also, this is just wrong. You can't remove just one configuration, you
need to remove the whole thing and the host needs to see a
disconnection.
--
balbi
Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)
Powered by blists - more mailing lists