From: Felipe Balbi <balbi@ti.com>
To: Neil Zhang <zhangwm@marvell.com>
Cc: Andrzej Pietrasiewicz <andrzej.p@samsung.com>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"balbi@ti.com" <balbi@ti.com>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>
Subject: Re: [PATCH] usb: gadget: don't create new string_container if already exist
Date: Wed, 5 Nov 2014 13:08:21 -0600 [thread overview]
Message-ID: <20141105190821.GF6548@saruman> (raw)
In-Reply-To: <9034CBD80F070943B59700D7F8149ED9024ED2A5B7@SC-VEXCH4.marvell.com>
[-- Attachment #1: Type: text/plain, Size: 1651 bytes --]
On Tue, Nov 04, 2014 at 03:05:57AM -0800, Neil Zhang wrote:
>
> > -----Original Message-----
> > From: Andrzej Pietrasiewicz [mailto:andrzej.p@samsung.com]
> > Sent: 2014年10月28日 21:10
> > To: Neil Zhang; linux-usb@vger.kernel.org; linux-kernel@vger.kernel.org
> > Cc: balbi@ti.com; gregkh@linuxfoundation.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
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
prev parent reply other threads:[~2014-11-05 19:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-28 11:33 [PATCH] usb: gadget: don't create new string_container if already exist Neil Zhang
2014-10-28 13:10 ` Andrzej Pietrasiewicz
2014-11-04 11:05 ` Neil Zhang
2014-11-04 11:29 ` Andrzej Pietrasiewicz
2014-11-05 19:08 ` Felipe Balbi [this message]
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=20141105190821.GF6548@saruman \
--to=balbi@ti.com \
--cc=andrzej.p@samsung.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=zhangwm@marvell.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox