linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [2.5 patch] let USB_GADGET depend on USB
@ 2003-05-31 22:18 Adrian Bunk
  2003-05-31 23:39 ` David Brownell
  0 siblings, 1 reply; 6+ messages in thread
From: Adrian Bunk @ 2003-05-31 22:18 UTC (permalink / raw)
  To: greg, David Brownell; +Cc: linux-kernel, linux-usb-devel

USB_GADGET is still selectable even with USB disabled. It seems the 
following is intended:


--- linux-2.5.70-mm3/drivers/usb/gadget/Kconfig.old	2003-06-01 00:15:30.000000000 +0200
+++ linux-2.5.70-mm3/drivers/usb/gadget/Kconfig	2003-06-01 00:15:49.000000000 +0200
@@ -8,7 +8,7 @@
 #
 menuconfig USB_GADGET
 	tristate "Support for USB Gadgets"
-	depends on EXPERIMENTAL
+	depends on USB && EXPERIMENTAL
 	help
 	   USB is a master/slave protocol, organized with one master
 	   host (such as a PC) controlling up to 127 peripheral devices.



cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [2.5 patch] let USB_GADGET depend on USB
  2003-05-31 22:18 [2.5 patch] let USB_GADGET depend on USB Adrian Bunk
@ 2003-05-31 23:39 ` David Brownell
  2003-06-01 11:13   ` Adrian Bunk
  0 siblings, 1 reply; 6+ messages in thread
From: David Brownell @ 2003-05-31 23:39 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: greg, linux-kernel, linux-usb-devel

Adrian Bunk wrote:
> USB_GADGET is still selectable even with USB disabled. It seems the 
> following is intended:

This is wrong.

CONFIG_USB has always represented the master/host side ... while
CONFIG_USB_GADGET represents just the slave/gadget side.

The two are completely independent.  Hardware that supports
one will typically _not_ support the other.  And systems
that support the slave/gadget side will have no use at all
for the 100KB+ of "usbcore".


If you want CONFIG_USB_GADGET to depend on USB, then you're
going to need to change the meaning of CONFIG_USB so that it
becomes just an "umbrella" ... and change EVERYTHING that
currently depends on CONFIG_USB to depend on some new config
varaible representing just the host side (which also depends
on CONFIG_USB).  That sort of change seems pointless.





> --- linux-2.5.70-mm3/drivers/usb/gadget/Kconfig.old	2003-06-01 00:15:30.000000000 +0200
> +++ linux-2.5.70-mm3/drivers/usb/gadget/Kconfig	2003-06-01 00:15:49.000000000 +0200
> @@ -8,7 +8,7 @@
>  #
>  menuconfig USB_GADGET
>  	tristate "Support for USB Gadgets"
> -	depends on EXPERIMENTAL
> +	depends on USB && EXPERIMENTAL
>  	help
>  	   USB is a master/slave protocol, organized with one master
>  	   host (such as a PC) controlling up to 127 peripheral devices.
> 
> 
> 
> cu
> Adrian
> 




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [2.5 patch] let USB_GADGET depend on USB
  2003-05-31 23:39 ` David Brownell
@ 2003-06-01 11:13   ` Adrian Bunk
  2003-06-01 14:18     ` David Brownell
  0 siblings, 1 reply; 6+ messages in thread
From: Adrian Bunk @ 2003-06-01 11:13 UTC (permalink / raw)
  To: David Brownell; +Cc: greg, linux-kernel, linux-usb-devel

On Sat, May 31, 2003 at 04:39:28PM -0700, David Brownell wrote:
> Adrian Bunk wrote:
> >USB_GADGET is still selectable even with USB disabled. It seems the 
> >following is intended:
> 
> This is wrong.
> 
> CONFIG_USB has always represented the master/host side ... while
> CONFIG_USB_GADGET represents just the slave/gadget side.
> 
> The two are completely independent.  Hardware that supports
> one will typically _not_ support the other.  And systems
> that support the slave/gadget side will have no use at all
> for the 100KB+ of "usbcore".
>...

Well, CONFIG_USB_GADGET without CONFIG_USB gives me the following link 
error in 2.5.70-mm3:

<--  snip  -->

...
  LD      .tmp_vmlinux1
security/built-in.o(.text+0x246d): In function `find_usb_device':
: undefined reference to `usb_bus_list_lock'
security/built-in.o(.text+0x2481): In function `find_usb_device':
: undefined reference to `usb_bus_list_lock'
security/built-in.o(.text+0x248d): In function `find_usb_device':
: undefined reference to `usb_bus_list'
security/built-in.o(.text+0x2493): In function `find_usb_device':
: undefined reference to `usb_bus_list'
security/built-in.o(.text+0x24b3): In function `find_usb_device':
: undefined reference to `usb_bus_list'
security/built-in.o(.text+0x24ba): In function `find_usb_device':
: undefined reference to `usb_bus_list_lock'
security/built-in.o(.text+0x24c0): In function `find_usb_device':
: undefined reference to `usb_bus_list_lock'
make: *** [.tmp_vmlinux1] Error 1

<--  snip  -->


If you disagree with my patch please fix the compilation of 
CONFIG_USB_GADGET without CONFIG_USB.


cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [2.5 patch] let USB_GADGET depend on USB
  2003-06-01 11:13   ` Adrian Bunk
@ 2003-06-01 14:18     ` David Brownell
  2003-06-01 18:10       ` Greg KH
  2003-06-01 18:40       ` Adrian Bunk
  0 siblings, 2 replies; 6+ messages in thread
From: David Brownell @ 2003-06-01 14:18 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: greg, linux-kernel, linux-usb-devel

[-- Attachment #1: Type: text/plain, Size: 883 bytes --]

Adrian Bunk wrote:
> On Sat, May 31, 2003 at 04:39:28PM -0700, David Brownell wrote:
> 
>>Adrian Bunk wrote:
>>
>>>USB_GADGET is still selectable even with USB disabled. It seems the 
>>>following is intended:
>>
>>This is wrong.
>>
>>CONFIG_USB has always represented the master/host side ... while
>>CONFIG_USB_GADGET represents just the slave/gadget side.
>>
>>The two are completely independent.  Hardware that supports
>>one will typically _not_ support the other.  And systems
>>that support [only] the slave/gadget side will have no use at all
>>for the 100KB+ of "usbcore".
>>...
> 
> 
> Well, CONFIG_USB_GADGET without CONFIG_USB gives me the following link 
> error in 2.5.70-mm3:

As I had already said (in response to your email that reported
that problem), the fix is to revert the recent changeset that
links gadget code twice.  Here's a patch that undoes it.

- Dave


[-- Attachment #2: link.patch --]
[-- Type: text/plain, Size: 302 bytes --]

--- a/drivers/usb/Makefile	Sun Jun  1 07:14:50 2003
+++ b/drivers/usb/Makefile	Sun Jun  1 07:14:50 2003
@@ -59,6 +59,3 @@
 obj-$(CONFIG_USB_TIGL)		+= misc/
 obj-$(CONFIG_USB_USS720)	+= misc/
 
-obj-$(CONFIG_USB_NET2280)	+= gadget/
-obj-$(CONFIG_USB_ZERO)		+= gadget/
-obj-$(CONFIG_USB_ETH)		+= gadget/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [2.5 patch] let USB_GADGET depend on USB
  2003-06-01 14:18     ` David Brownell
@ 2003-06-01 18:10       ` Greg KH
  2003-06-01 18:40       ` Adrian Bunk
  1 sibling, 0 replies; 6+ messages in thread
From: Greg KH @ 2003-06-01 18:10 UTC (permalink / raw)
  To: David Brownell; +Cc: Adrian Bunk, linux-kernel, linux-usb-devel

On Sun, Jun 01, 2003 at 07:18:54AM -0700, David Brownell wrote:
> 
> As I had already said (in response to your email that reported
> that problem), the fix is to revert the recent changeset that
> links gadget code twice.  Here's a patch that undoes it.

Yeah, that was my fault, sorry.  I didn't see the main Makefile change
and thought that this had gotten lost in one of my merges.  I'll revert
it and send it off to Linus later on.

Sorry,

greg k-h

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [2.5 patch] let USB_GADGET depend on USB
  2003-06-01 14:18     ` David Brownell
  2003-06-01 18:10       ` Greg KH
@ 2003-06-01 18:40       ` Adrian Bunk
  1 sibling, 0 replies; 6+ messages in thread
From: Adrian Bunk @ 2003-06-01 18:40 UTC (permalink / raw)
  To: David Brownell; +Cc: greg, linux-kernel, linux-usb-devel

On Sun, Jun 01, 2003 at 07:18:54AM -0700, David Brownell wrote:
> 
> As I had already said (in response to your email that reported
> that problem), the fix is to revert the recent changeset that
> links gadget code twice.  Here's a patch that undoes it.

Ups, sorry, I confused this with a different issue.

> - Dave
> 

> --- a/drivers/usb/Makefile	Sun Jun  1 07:14:50 2003
> +++ b/drivers/usb/Makefile	Sun Jun  1 07:14:50 2003
> @@ -59,6 +59,3 @@
>  obj-$(CONFIG_USB_TIGL)		+= misc/
>  obj-$(CONFIG_USB_USS720)	+= misc/
>  
> -obj-$(CONFIG_USB_NET2280)	+= gadget/
> -obj-$(CONFIG_USB_ZERO)		+= gadget/
> -obj-$(CONFIG_USB_ETH)		+= gadget/


cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2003-06-01 18:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-31 22:18 [2.5 patch] let USB_GADGET depend on USB Adrian Bunk
2003-05-31 23:39 ` David Brownell
2003-06-01 11:13   ` Adrian Bunk
2003-06-01 14:18     ` David Brownell
2003-06-01 18:10       ` Greg KH
2003-06-01 18:40       ` Adrian Bunk

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).