From: Felipe Balbi <balbi@ti.com>
To: "Nicholas A. Bellinger" <nab@linux-iscsi.org>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
Greg KH <gregkh@linuxfoundation.org>,
Randy Dunlap <rdunlap@xenotime.net>,
Stephen Rothwell <sfr@canb.auug.org.au>,
linux-next@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
linux-usb@vger.kernel.org, target-devel@vger.kernel.org,
Felipe Balbi <balbi@ti.com>
Subject: Re: linux-next: Tree for Apr 20 (usb & target)
Date: Fri, 4 May 2012 12:41:43 +0300 [thread overview]
Message-ID: <20120504094141.GC1156@arwen.pp.htv.fi> (raw)
In-Reply-To: <1336102463.22393.121.camel@haakon2.linux-iscsi.org>
[-- Attachment #1: Type: text/plain, Size: 2952 bytes --]
Hi,
On Thu, May 03, 2012 at 08:34:23PM -0700, Nicholas A. Bellinger wrote:
> On Sun, 2012-04-22 at 21:01 +0200, Sebastian Andrzej Siewior wrote:
> > * Greg KH | 2012-04-21 08:34:02 [-0700]:
> >
> > >> > CONFIG_MODULES is not enabled.
> > >> > CONFIG_TCM_USB_GADGET=y
> > >> > CONFIG_USB_GADGET=y
> > >>
> > >> Sebastian + Greg-KH (Cc'ed), any ideas why this is the case here..?
> > >
> > >I have no idea, sorry.
> >
> > The short version:
> > in order to fix this either move the usb-target-gadget to
> > drivers/usb/gadget/Kconfig and make sure only one gadget can be compiled
> > at a time or add some kind of depends.
> >
> > The longer version:
> > This is a short comming of the gadget framework. We are able to build
> > multiple UDCs at a time and we can build multiple gadgets _as_ modules.
> > Since we can not bind & configure via an interface the whole thing works
> > right now via "modprobe $gadget. There is some infrastructure to accept
> > multiple UDCs/gadget but the *whole* thing is not complete.
> > In non-modules mode you can only select one gadget at a time. With the
> > target gadget living outside of usb/gadget selection it is possible to
> > select both at the same time which causes the duplicate symbols here.
> > A "quick" fix is not to define all the functions static and put
> > maybe_unsued on each function to avoid warnings. This is only duct tape
> > on top and I would prefer that nobody is sending such a patch. The
> > result is hardly usefull by a user.
> > A real fix would to get rid of the "#includes foo.c" and use a helper
> > module/library instead.
> > I tried this once and notice that the whole thing relies on
> > static/global variables which are initialized once on modprobe. So
> > with the second module loaded (read as rmmod $mod1 && modprobe $mod2)
> > the gadget framework explodes. Once I noticed that, the patches got out
> > of Felipe's tree before anyone noticed something. That means we should
> > first get rid of the global variables and then maybe try again :)
> >
>
> Hey Sebastian & USB folks,
>
> So I'm catching up on for-next-merge stuff after being away last week,
> and ended up following your advice to just move tcm_usb_gadget code into
> drivers/usb/gadget/ in to address the legacy requirements above..
>
> After the recommended change, the in-kernel config using a single gadget
> driver (the target) are able to build. Thanks for the detailed
> explanation btw.. ;)
>
> I've made the same change for tcm_usb_gadget in lio-core, and updated
> for-next-merge with the following merge patch:
>
> http://git.kernel.org/?p=linux/kernel/git/nab/target-pending.git;a=commit;h=0c41520201bc0933d65b8644173802778f426234
>
> Please let me know if you have any other changes that should go into
> sunday's linux-next build.
It looks ok to me. You can add my Acked-by: Felipe Balbi <balbi@ti.com>
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2012-05-04 9:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-20 5:51 linux-next: Tree for Apr 20 Stephen Rothwell
2012-04-20 21:49 ` linux-next: Tree for Apr 20 (usb & target) Randy Dunlap
2012-04-21 9:07 ` Nicholas A. Bellinger
2012-04-21 15:34 ` Greg KH
2012-04-22 19:01 ` Sebastian Andrzej Siewior
2012-05-04 3:34 ` Nicholas A. Bellinger
2012-05-04 9:41 ` Felipe Balbi [this message]
2012-05-04 16:56 ` Nicholas A. Bellinger
2012-05-04 22:15 ` Greg KH
2012-04-23 8:56 ` Felipe Balbi
2012-04-20 22:00 ` linux-next: Tree for Apr 20 (kvm) Randy Dunlap
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=20120504094141.GC1156@arwen.pp.htv.fi \
--to=balbi@ti.com \
--cc=bigeasy@linutronix.de \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=nab@linux-iscsi.org \
--cc=rdunlap@xenotime.net \
--cc=sfr@canb.auug.org.au \
--cc=target-devel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).