2007-10-14 03:30:28

by Ingo Molnar

[permalink] [raw]
Subject: [bug] usb build failure, latest -git


FYI, the attached config fails to build on most recent -git with:

In file included from drivers/usb/host/ohci-hcd.c:1038:
drivers/usb/host/ohci-ssb.c:120: error: 'ohci_bus_suspend' undeclared here (not in a function)
drivers/usb/host/ohci-ssb.c:121: error: 'ohci_bus_resume' undeclared here (not in a function)
make[3]: *** [drivers/usb/host/ohci-hcd.o] Error 1

found via randconfig testing.

Ingo


Attachments:
(No filename) (406.00 B)
config (40.40 kB)
Download all attachments

2007-10-14 03:36:18

by Al Viro

[permalink] [raw]
Subject: Re: [bug] usb build failure, latest -git

On Sun, Oct 14, 2007 at 05:29:48AM +0200, Ingo Molnar wrote:
>
> FYI, the attached config fails to build on most recent -git with:
>
> In file included from drivers/usb/host/ohci-hcd.c:1038:
> drivers/usb/host/ohci-ssb.c:120: error: 'ohci_bus_suspend' undeclared here (not in a function)
> drivers/usb/host/ohci-ssb.c:121: error: 'ohci_bus_resume' undeclared here (not in a function)
> make[3]: *** [drivers/usb/host/ohci-hcd.o] Error 1

Subject: [PATCH] ohci-ssb with !CONFIG_PM

2007-10-14 03:44:18

by Gabriel C

[permalink] [raw]
Subject: Re: [bug] usb build failure, latest -git

Ingo Molnar wrote:
> FYI, the attached config fails to build on most recent -git with:
>
> In file included from drivers/usb/host/ohci-hcd.c:1038:
> drivers/usb/host/ohci-ssb.c:120: error: 'ohci_bus_suspend' undeclared here (not in a function)
> drivers/usb/host/ohci-ssb.c:121: error: 'ohci_bus_resume' undeclared here (not in a function)
> make[3]: *** [drivers/usb/host/ohci-hcd.o] Error 1

Patch posted by Al Viro should fix that I think.
http://lkml.org/lkml/2007/10/13/221

Regards,

Gabriel

2007-10-14 04:05:07

by Ingo Molnar

[permalink] [raw]
Subject: Re: [bug] usb build failure, latest -git


* Al Viro <[email protected]> wrote:

> On Sun, Oct 14, 2007 at 05:29:48AM +0200, Ingo Molnar wrote:
> >
> > FYI, the attached config fails to build on most recent -git with:
> >
> > In file included from drivers/usb/host/ohci-hcd.c:1038:
> > drivers/usb/host/ohci-ssb.c:120: error: 'ohci_bus_suspend' undeclared here (not in a function)
> > drivers/usb/host/ohci-ssb.c:121: error: 'ohci_bus_resume' undeclared here (not in a function)
> > make[3]: *** [drivers/usb/host/ohci-hcd.o] Error 1
>
> Subject: [PATCH] ohci-ssb with !CONFIG_PM

thanks :-)

Ingo

2007-10-14 09:33:44

by Michael Büsch

[permalink] [raw]
Subject: Re: [bug] usb build failure, latest -git

On Sunday 14 October 2007 05:29:48 Ingo Molnar wrote:
>
> FYI, the attached config fails to build on most recent -git with:
>
> In file included from drivers/usb/host/ohci-hcd.c:1038:
> drivers/usb/host/ohci-ssb.c:120: error: 'ohci_bus_suspend' undeclared here (not in a function)
> drivers/usb/host/ohci-ssb.c:121: error: 'ohci_bus_resume' undeclared here (not in a function)
> make[3]: *** [drivers/usb/host/ohci-hcd.o] Error 1
>
> found via randconfig testing.
>
> Ingo
>

A patch is already submitted, thanks.

--
Greetings Michael.

2007-10-15 10:54:29

by Ingo Molnar

[permalink] [raw]
Subject: Re: [bug] usb build failure, latest -git


* Al Viro <[email protected]> wrote:

> On Sun, Oct 14, 2007 at 05:29:48AM +0200, Ingo Molnar wrote:
> >
> > FYI, the attached config fails to build on most recent -git with:
> >
> > In file included from drivers/usb/host/ohci-hcd.c:1038:
> > drivers/usb/host/ohci-ssb.c:120: error: 'ohci_bus_suspend' undeclared here (not in a function)
> > drivers/usb/host/ohci-ssb.c:121: error: 'ohci_bus_resume' undeclared here (not in a function)
> > make[3]: *** [drivers/usb/host/ohci-hcd.o] Error 1
>
> Subject: [PATCH] ohci-ssb with !CONFIG_PM

there's a new build failure with latest -git:

drivers/built-in.o: In function `ssb_ohci_probe':
ohci-hcd.c:(.text+0xbff39): undefined reference to `ssb_device_enable'
ohci-hcd.c:(.text+0xbff6f): undefined reference to `ssb_admatch_base'
ohci-hcd.c:(.text+0xbff8b): undefined reference to `ssb_admatch_size'
ohci-hcd.c:(.text+0xbffe5): undefined reference to `ssb_device_disable'
[...]

config attached.

Ingo


Attachments:
(No filename) (967.00 B)
config (40.40 kB)
Download all attachments

2007-10-15 12:59:56

by Michael Büsch

[permalink] [raw]
Subject: Re: [bug] usb build failure, latest -git

On Monday 15 October 2007 12:53:44 Ingo Molnar wrote:
>
> * Al Viro <[email protected]> wrote:
>
> > On Sun, Oct 14, 2007 at 05:29:48AM +0200, Ingo Molnar wrote:
> > >
> > > FYI, the attached config fails to build on most recent -git with:
> > >
> > > In file included from drivers/usb/host/ohci-hcd.c:1038:
> > > drivers/usb/host/ohci-ssb.c:120: error: 'ohci_bus_suspend' undeclared here (not in a function)
> > > drivers/usb/host/ohci-ssb.c:121: error: 'ohci_bus_resume' undeclared here (not in a function)
> > > make[3]: *** [drivers/usb/host/ohci-hcd.o] Error 1
> >
> > Subject: [PATCH] ohci-ssb with !CONFIG_PM
>
> there's a new build failure with latest -git:
>
> drivers/built-in.o: In function `ssb_ohci_probe':
> ohci-hcd.c:(.text+0xbff39): undefined reference to `ssb_device_enable'
> ohci-hcd.c:(.text+0xbff6f): undefined reference to `ssb_admatch_base'
> ohci-hcd.c:(.text+0xbff8b): undefined reference to `ssb_admatch_size'
> ohci-hcd.c:(.text+0xbffe5): undefined reference to `ssb_device_disable'
> [...]
>
> config attached.
>
> Ingo
>

I'm not sure why this happens. SSB is Y and ohci-hcd is also Y.
So why doesn't it find the syms?

--
Greetings Michael.

2007-10-15 13:51:19

by Ingo Molnar

[permalink] [raw]
Subject: [build bug] drivers/ssb build failure, latest -git


* Michael Buesch <[email protected]> wrote:

> > there's a new build failure with latest -git:
> >
> > drivers/built-in.o: In function `ssb_ohci_probe':
> > ohci-hcd.c:(.text+0xbff39): undefined reference to `ssb_device_enable'
> > ohci-hcd.c:(.text+0xbff6f): undefined reference to `ssb_admatch_base'
> > ohci-hcd.c:(.text+0xbff8b): undefined reference to `ssb_admatch_size'
> > ohci-hcd.c:(.text+0xbffe5): undefined reference to `ssb_device_disable'
> > [...]
> >
> > config attached.
> >
> > Ingo
> >
>
> I'm not sure why this happens. SSB is Y and ohci-hcd is also Y. So why
> doesn't it find the syms?

hm, it builds fine now. Weird - i'll double-check i got the right
config.

have triggered a new SSB build failure meanwhile:

drivers/built-in.o: In function `ssb_pcmcia_switch_coreidx':
: undefined reference to `pcmcia_access_configuration_register'
drivers/built-in.o: In function `ssb_pcmcia_switch_coreidx':
: undefined reference to `pcmcia_access_configuration_register'
drivers/built-in.o: In function `ssb_pcmcia_switch_coreidx':
: undefined reference to `pcmcia_access_configuration_register'
drivers/built-in.o: In function `ssb_pcmcia_switch_coreidx':
: undefined reference to `pcmcia_access_configuration_register'
drivers/built-in.o: In function `ssb_pcmcia_switch_coreidx':
: undefined reference to `pcmcia_access_configuration_register'
drivers/built-in.o:: more undefined references to `pcmcia_access_configuration_register' follow

config attached.

Ingo


Attachments:
(No filename) (1.46 kB)
config (50.88 kB)
Download all attachments

2007-10-15 13:56:52

by Ingo Molnar

[permalink] [raw]
Subject: [patch] ssb: fix build failure


* Ingo Molnar <[email protected]> wrote:

> have triggered a new SSB build failure meanwhile:
>
> drivers/built-in.o: In function `ssb_pcmcia_switch_coreidx':
> : undefined reference to `pcmcia_access_configuration_register'

the patch below fixes it for me. PCI seems to have a similar bug as
well.

Ingo

----------------->
Subject: ssb: fix build failure
From: Ingo Molnar <[email protected]>

fix build failure if PCMCIA=m but SSB=y:

drivers/built-in.o: In function `ssb_pcmcia_switch_coreidx':
: undefined reference to `pcmcia_access_configuration_register'

(fix symmetric bug for PCI too.)

Signed-off-by: Ingo Molnar <[email protected]>
---
drivers/ssb/Kconfig | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Index: linux/drivers/ssb/Kconfig
===================================================================
--- linux.orig/drivers/ssb/Kconfig
+++ linux/drivers/ssb/Kconfig
@@ -22,7 +22,7 @@ config SSB

config SSB_PCIHOST_POSSIBLE
bool
- depends on SSB && PCI
+ depends on SSB && (PCI = SSB)
default y

config SSB_PCIHOST
@@ -37,7 +37,7 @@ config SSB_PCIHOST

config SSB_PCMCIAHOST_POSSIBLE
bool
- depends on SSB && PCMCIA && EXPERIMENTAL
+ depends on SSB && (PCMCIA = SSB) && EXPERIMENTAL
default y

config SSB_PCMCIAHOST

2007-10-15 17:39:21

by Ingo Molnar

[permalink] [raw]
Subject: Re: [build bug] drivers/ssb build failure, latest -git


* Ingo Molnar <[email protected]> wrote:

> > > there's a new build failure with latest -git:
> > >
> > > drivers/built-in.o: In function `ssb_ohci_probe':
> > > ohci-hcd.c:(.text+0xbff39): undefined reference to `ssb_device_enable'
> > > ohci-hcd.c:(.text+0xbff6f): undefined reference to `ssb_admatch_base'
> > > ohci-hcd.c:(.text+0xbff8b): undefined reference to `ssb_admatch_size'
> > > ohci-hcd.c:(.text+0xbffe5): undefined reference to `ssb_device_disable'
> > > [...]
> > >
> > > config attached.

> > I'm not sure why this happens. SSB is Y and ohci-hcd is also Y. So
> > why doesn't it find the syms?
>
> hm, it builds fine now. Weird - i'll double-check i got the right
> config.

find attached another config that reproduces the build failure above.

i think the reason is this:

CONFIG_SSB=m
CONFIG_USB_OHCI_HCD=y
CONFIG_USB_OHCI_HCD_SSB=y

Ingo

2007-10-15 17:43:47

by Ingo Molnar

[permalink] [raw]
Subject: [patch] usb: fix ssb_ohci_probe() build bug


* Ingo Molnar <[email protected]> wrote:

> find attached another config that reproduces the build failure above.
>
> i think the reason is this:
>
> CONFIG_SSB=m
> CONFIG_USB_OHCI_HCD=y
> CONFIG_USB_OHCI_HCD_SSB=y

the patch below fixes this for me.

Ingo

----------------------->
Subject: usb: fix ssb_ohci_probe() build bug
From: Ingo Molnar <[email protected]>

fix ssb_ohci_probe() build bug:

drivers/built-in.o: In function `ssb_ohci_probe':
ohci-hcd.c:(.text+0xbff39): undefined reference to `ssb_device_enable'
ohci-hcd.c:(.text+0xbff6f): undefined reference to `ssb_admatch_base'
ohci-hcd.c:(.text+0xbff8b): undefined reference to `ssb_admatch_size'
ohci-hcd.c:(.text+0xbffe5): undefined reference to `ssb_device_disable'
[...]

the reason was that this Kconfig combination was allowed:

CONFIG_SSB=m
CONFIG_USB_OHCI_HCD=y
CONFIG_USB_OHCI_HCD_SSB=y

the fix is to require a modular USB_OHCI_HCD build when SSB is modular.

Signed-off-by: Ingo Molnar <[email protected]>
---
drivers/usb/host/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux/drivers/usb/host/Kconfig
===================================================================
--- linux.orig/drivers/usb/host/Kconfig
+++ linux/drivers/usb/host/Kconfig
@@ -156,7 +156,7 @@ config USB_OHCI_HCD_PCI

config USB_OHCI_HCD_SSB
bool "OHCI support for Broadcom SSB OHCI core"
- depends on USB_OHCI_HCD && SSB && EXPERIMENTAL
+ depends on USB_OHCI_HCD && (SSB = y || SSB = CONFIG_USB_OHCI_HCD) && EXPERIMENTAL
default n
---help---
Support for the Sonics Silicon Backplane (SSB) attached

2007-10-15 18:10:09

by Michael Büsch

[permalink] [raw]
Subject: Re: [patch] usb: fix ssb_ohci_probe() build bug

On Monday 15 October 2007 19:43:21 Ingo Molnar wrote:
>
> * Ingo Molnar <[email protected]> wrote:
>
> > find attached another config that reproduces the build failure above.
> >
> > i think the reason is this:
> >
> > CONFIG_SSB=m
> > CONFIG_USB_OHCI_HCD=y
> > CONFIG_USB_OHCI_HCD_SSB=y
>
> the patch below fixes this for me.
>
> Ingo
>
> ----------------------->
> Subject: usb: fix ssb_ohci_probe() build bug
> From: Ingo Molnar <[email protected]>
>
> fix ssb_ohci_probe() build bug:
>
> drivers/built-in.o: In function `ssb_ohci_probe':
> ohci-hcd.c:(.text+0xbff39): undefined reference to `ssb_device_enable'
> ohci-hcd.c:(.text+0xbff6f): undefined reference to `ssb_admatch_base'
> ohci-hcd.c:(.text+0xbff8b): undefined reference to `ssb_admatch_size'
> ohci-hcd.c:(.text+0xbffe5): undefined reference to `ssb_device_disable'
> [...]
>
> the reason was that this Kconfig combination was allowed:
>
> CONFIG_SSB=m
> CONFIG_USB_OHCI_HCD=y
> CONFIG_USB_OHCI_HCD_SSB=y
>
> the fix is to require a modular USB_OHCI_HCD build when SSB is modular.
>
> Signed-off-by: Ingo Molnar <[email protected]>

Acked-by: Michael Buesch <[email protected]>

Somebody of the USB folks apply this, please.

> ---
> drivers/usb/host/Kconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Index: linux/drivers/usb/host/Kconfig
> ===================================================================
> --- linux.orig/drivers/usb/host/Kconfig
> +++ linux/drivers/usb/host/Kconfig
> @@ -156,7 +156,7 @@ config USB_OHCI_HCD_PCI
>
> config USB_OHCI_HCD_SSB
> bool "OHCI support for Broadcom SSB OHCI core"
> - depends on USB_OHCI_HCD && SSB && EXPERIMENTAL
> + depends on USB_OHCI_HCD && (SSB = y || SSB = CONFIG_USB_OHCI_HCD) && EXPERIMENTAL
> default n
> ---help---
> Support for the Sonics Silicon Backplane (SSB) attached
>
>



--
Greetings Michael.

2007-10-24 19:46:44

by Ingo Molnar

[permalink] [raw]
Subject: Re: [patch] usb: fix ssb_ohci_probe() build bug


* Michael Buesch <[email protected]> wrote:

> > CONFIG_SSB=m
> > CONFIG_USB_OHCI_HCD=y
> > CONFIG_USB_OHCI_HCD_SSB=y
> >
> > the fix is to require a modular USB_OHCI_HCD build when SSB is modular.
> >
> > Signed-off-by: Ingo Molnar <[email protected]>
>
> Acked-by: Michael Buesch <[email protected]>
>
> Somebody of the USB folks apply this, please.

FYI, this build fix is still not in v2.6.24-rc1.

Ingo

2007-10-24 20:26:54

by Greg KH

[permalink] [raw]
Subject: Re: [patch] usb: fix ssb_ohci_probe() build bug

On Wed, Oct 24, 2007 at 09:46:19PM +0200, Ingo Molnar wrote:
>
> * Michael Buesch <[email protected]> wrote:
>
> > > CONFIG_SSB=m
> > > CONFIG_USB_OHCI_HCD=y
> > > CONFIG_USB_OHCI_HCD_SSB=y
> > >
> > > the fix is to require a modular USB_OHCI_HCD build when SSB is modular.
> > >
> > > Signed-off-by: Ingo Molnar <[email protected]>
> >
> > Acked-by: Michael Buesch <[email protected]>
> >
> > Somebody of the USB folks apply this, please.
>
> FYI, this build fix is still not in v2.6.24-rc1.

Sorry, it's in my tree of patches to go to Linus in a few days.

thanks,

greg k-h