[patch] ssb: fix build failure

Previous thread: [PATCH] Update Jens Axboe's email in Documentation/* by Rob Landley on Saturday, October 13, 2007 - 9:55 pm. (2 messages)

Next thread: none
To: <gregkh@...>
Cc: David Brownell <dbrownell@...>, John W. Linville <linville@...>, Michael Buesch <mb@...>, <linux-kernel@...>
Date: Saturday, October 13, 2007 - 11:29 pm

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

To: Ingo Molnar <mingo@...>
Cc: <gregkh@...>, David Brownell <dbrownell@...>, John W. Linville <linville@...>, <linux-kernel@...>
Date: Sunday, October 14, 2007 - 5:32 am

A patch is already submitted, thanks.

--
Greetings Michael.
-

To: Ingo Molnar <mingo@...>
Cc: <gregkh@...>, David Brownell <dbrownell@...>, John W. Linville <linville@...>, Michael Buesch <mb@...>, <linux-kernel@...>
Date: Saturday, October 13, 2007 - 11:40 pm

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

Regards,

Gabriel
-

To: Ingo Molnar <mingo@...>
Cc: <gregkh@...>, David Brownell <dbrownell@...>, John W. Linville <linville@...>, Michael Buesch <mb@...>, <linux-kernel@...>
Date: Saturday, October 13, 2007 - 11:35 pm

Subject: [PATCH] ohci-ssb with !CONFIG_PM
-

To: Al Viro <viro@...>
Cc: <gregkh@...>, David Brownell <dbrownell@...>, John W. Linville <linville@...>, Michael Buesch <mb@...>, <linux-kernel@...>
Date: Monday, October 15, 2007 - 6:53 am

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

To: Ingo Molnar <mingo@...>
Cc: Al Viro <viro@...>, <gregkh@...>, David Brownell <dbrownell@...>, John W. Linville <linville@...>, <linux-kernel@...>
Date: Monday, October 15, 2007 - 8:58 am

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

To: Michael Buesch <mb@...>
Cc: Al Viro <viro@...>, <gregkh@...>, David Brownell <dbrownell@...>, John W. Linville <linville@...>, <linux-kernel@...>
Date: Monday, October 15, 2007 - 9:50 am

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:: more undefined references to `pcmcia_access_configuration_register' follow

config attached.

Ingo

To: Michael Buesch <mb@...>
Cc: Al Viro <viro@...>, <gregkh@...>, David Brownell <dbrownell@...>, John W. Linville <linville@...>, <linux-kernel@...>
Date: Monday, October 15, 2007 - 1:38 pm

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
-

To: Michael Buesch <mb@...>
Cc: Al Viro <viro@...>, <gregkh@...>, David Brownell <dbrownell@...>, John W. Linville <linville@...>, <linux-kernel@...>
Date: Monday, October 15, 2007 - 1:43 pm

the patch below fixes this for me.

Ingo

----------------------->
Subject: usb: fix ssb_ohci_probe() build bug
From: Ingo Molnar <mingo@elte.hu>

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 <mingo@elte.hu>
---
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
-

To: Ingo Molnar <mingo@...>
Cc: Al Viro <viro@...>, <gregkh@...>, David Brownell <dbrownell@...>, John W. Linville <linville@...>, <linux-kernel@...>
Date: Monday, October 15, 2007 - 2:08 pm

Acked-by: Michael Buesch <mb@bu3sch.de>

--
Greetings Michael.
-

To: Michael Buesch <mb@...>
Cc: Al Viro <viro@...>, <gregkh@...>, David Brownell <dbrownell@...>, John W. Linville <linville@...>, <linux-kernel@...>, Linus Torvalds <torvalds@...>
Date: Wednesday, October 24, 2007 - 3:46 pm

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

Ingo
-

To: Ingo Molnar <mingo@...>
Cc: Michael Buesch <mb@...>, Al Viro <viro@...>, David Brownell <dbrownell@...>, John W. Linville <linville@...>, <linux-kernel@...>, Linus Torvalds <torvalds@...>
Date: Wednesday, October 24, 2007 - 4:21 pm

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

thanks,

greg k-h
-

To: Michael Buesch <mb@...>
Cc: Al Viro <viro@...>, <gregkh@...>, David Brownell <dbrownell@...>, John W. Linville <linville@...>, <linux-kernel@...>
Date: Monday, October 15, 2007 - 9:56 am

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 <mingo@elte.hu>

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

(fix symmetric bug for PCI too.)

Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
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
-

To: Al Viro <viro@...>
Cc: <gregkh@...>, David Brownell <dbrownell@...>, John W. Linville <linville@...>, Michael Buesch <mb@...>, <linux-kernel@...>
Date: Sunday, October 14, 2007 - 12:04 am

thanks :-)

Ingo
-

Previous thread: [PATCH] Update Jens Axboe's email in Documentation/* by Rob Landley on Saturday, October 13, 2007 - 9:55 pm. (2 messages)

Next thread: none