Skip to contentSkip to conversation

arm allmodconfig

DISCUSSION Andrew Morton 3 participants 11 messages Aug 8, 2007 – Aug 9, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

drivers/net/wireless/bcm43xx-mac80211/bcm43xx_main.c: In function `bcm4drivers/ne /wireless/rt61pci.c:2031: warning: comparison is always false due to limited range of data type drivers/net/wireless/bcm43xx-mac80211/bcm43xx_main.c:4038: error: implicit declaration of function ssb_pcihost_register' drivers/net/wireless/bcm43xx-mac80211/bcm43xx_main.c:4055: error: implicit declaration of function ssb_pcihost_unregister' drivers/net/wireless/rt61pci.c:2034: warning: comparison is always false due to limited range of data type drivers/net/wireless/rt61pci.c:2047: warning: comparison is always false due to limited range of data type drivers/net/wireless/rt61pci.c:2050: warning: comparison is always false due to limited range of data type

#1 lore raw

<snip>

Quoted 3 lines

drivers/net/wireless/rt61pci.c:2034: warning: comparison is always false due to limited range of data type drivers/net/wireless/rt61pci.c:2047: warning: comparison is always false due to limited range of data type drivers/net/wireless/rt61pci.c:2050: warning: comparison is always false due to limited range of data type

Thanks, will fix these asap.

Ivo

#2 lore raw
In reply to Andrew Morton
Quoted 2 lines · On Wednesday 08 August 2007 23:57:05 Andrew Morton wrote:

drivers/net/wireless/bcm43xx-mac80211/bcm43xx_main.c:4038: error: implicit declaration of function ssb_pcihost_register' drivers/net/wireless/bcm43xx-mac80211/bcm43xx_main.c:4055: error: implicit declaration of function ssb_pcihost_unregister'

I have no idea how this is possible.

bcm43xx_main.c:

#ifdef CONFIG_BCM43XX_MAC80211_PCI
	err = ssb_pcihost_register(&bcm43xx_pci_driver);
	if (err)
		goto err_dfs_exit;

#endif

bcm43xx Kconfig:

config BCM43XX_MAC80211_PCI

	bool "BCM43xx PCI device support"
	depends on BCM43XX_MAC80211 && PCI
	select SSB_PCIHOST
	select SSB_DRIVER_PCICORE

ssb Kconfig:

config SSB_PCIHOST

	bool "Support for SSB on PCI-bus host"
	depends on SSB && PCI

ssb function declaration:

#ifdef CONFIG_SSB_PCIHOST
/* PCI-host wrapper driver */
extern int ssb_pcihost_register(struct pci_driver *driver); static inline void ssb_pcihost_unregister(struct pci_driver *driver)

{
	pci_unregister_driver(driver);
}

#endif /* CONFIG_SSB_PCIHOST */

So what is going on? CONFIG_BCM43XX_MAC80211_PCI must be enabled. Otherwise the func call would be ifdef'ed out. So but if it is enabled, it would SELECT SSB_PCIHOST. Which would enable the declaration and definition of ssb_pcihost_register(). What am I missing?

Signature · 1 line
Greetings Michael.
#3 lore raw
Quoted 5 lines · On Thu, 9 Aug 2007 00:13:06 +0200 Michael Buesch <[email protected]> wrote:
Quoted 2 lines · On Wednesday 08 August 2007 23:57:05 Andrew Morton wrote:

drivers/net/wireless/bcm43xx-mac80211/bcm43xx_main.c:4038: error: implicit declaration of function ssb_pcihost_register' drivers/net/wireless/bcm43xx-mac80211/bcm43xx_main.c:4055: error: implicit declaration of function ssb_pcihost_unregister'

I have no idea how this is possible.

tee hee

Quoted 2 lines

select SSB_PCIHOST
select SSB_DRIVER_PCICORE

You used select. Anything is possible with select.

You can do the below without an arm toolchain:

setenv arch ARM
make mrproper
make allmodconfig
akpm:/usr/src/25> grep BCM .config
CONFIG_BT_HCIBCM203X=m
CONFIG_BCM43XX=m
CONFIG_BCM43XX_DEBUG=y
CONFIG_BCM43XX_DMA=y
CONFIG_BCM43XX_PIO=y
CONFIG_BCM43XX_DMA_AND_PIO_MODE=y
# CONFIG_BCM43XX_DMA_MODE is not set
# CONFIG_BCM43XX_PIO_MODE is not set
CONFIG_BCM43XX_MAC80211=m
CONFIG_BCM43XX_MAC80211_PCI=y
CONFIG_BCM43XX_MAC80211_PCMCIA=y
CONFIG_BCM43XX_MAC80211_DEBUG=y
CONFIG_BCM43XX_MAC80211_DMA=y
CONFIG_BCM43XX_MAC80211_PIO=y
CONFIG_BCM43XX_MAC80211_DMA_AND_PIO_MODE=y
# CONFIG_BCM43XX_MAC80211_DMA_MODE is not set
# CONFIG_BCM43XX_MAC80211_PIO_MODE is not set
CONFIG_DVB_BCM3510=m
akpm:/usr/src/25> grep SSB .config
akpm:/usr/src/25>

Quoted 5 lines

So what is going on? CONFIG_BCM43XX_MAC80211_PCI must be enabled. Otherwise the func call would be ifdef'ed out. So but if it is enabled, it would SELECT SSB_PCIHOST. Which would enable the declaration and definition of ssb_pcihost_register(). What am I missing?

Just stop using select. It's busted.

#4 lore raw

m68k allmodconfig:

drivers/ssb/main.c: In function 'ssb_ssb_read16':
drivers/ssb/main.c:489: error: implicit declaration of function 'readw' drivers/ssb/main.c: In function 'ssb_ssb_read32':
drivers/ssb/main.c:497: error: implicit declaration of function 'readl' drivers/ssb/main.c: In function 'ssb_ssb_write16':
drivers/ssb/main.c:505: error: implicit declaration of function 'writew' drivers/ssb/main.c: In function 'ssb_ssb_write32':
drivers/ssb/main.c:513: error: implicit declaration of function 'writel'

Probably a dependency on HAS_IOMEM will fix that uup.

#5 lore raw
Quoted 1 line · On Wed, 8 Aug 2007 15:32:08 -0700 Andrew Morton <[email protected]>…

Probably a dependency on HAS_IOMEM will fix that uup.

So to get around this I deleted the CONFIG_SSB=m from .config and ran oldconfig. Whoop, it magically reappeared! Irritating. Investigates.

omg.

Symbol: SSB [=m]
x Prompt: Sonics Silicon Backplane support

  x   Defined at drivers/ssb/Kconfig:3
  x   Depends on: EXPERIMENTAL && HAS_IOMEM
  x   Location:

x -> Device Drivers
x -> Sonics Silicon Backplane
x Selected by: B44 && NETDEVICES && NET_ETHERNET && HAS_IOMEM || BCM43XX_MAC80211 && NETDEVICES && !S390 && MAC80211 && WLAN_80211 && EXPERIMENTAL

you'll never be able to get that to work. If by some miracle you do, you will not be able to maintain it. select is just that bad, and that expression!!!

We've been struggling with SSB Kconfig for weeks and it's nowhere near right yet.

Please, do consider switching the whole lot to `depends on'.

#6 lore raw
In reply to Andrew Morton
Quoted 43 lines · On Thursday 09 August 2007 00:26:06 Andrew Morton wrote:
Quoted 5 lines · On Thu, 9 Aug 2007 00:13:06 +0200 Michael Buesch <[email protected]> wrote:
Quoted 2 lines · On Wednesday 08 August 2007 23:57:05 Andrew Morton wrote:

drivers/net/wireless/bcm43xx-mac80211/bcm43xx_main.c:4038: error: implicit declaration of function ssb_pcihost_register' drivers/net/wireless/bcm43xx-mac80211/bcm43xx_main.c:4055: error: implicit declaration of function ssb_pcihost_unregister'

I have no idea how this is possible.

tee hee

Quoted 2 lines

select SSB_PCIHOST
select SSB_DRIVER_PCICORE

You used select. Anything is possible with select.

You can do the below without an arm toolchain:

setenv arch ARM
make mrproper
make allmodconfig
akpm:/usr/src/25> grep BCM .config
CONFIG_BT_HCIBCM203X=m
CONFIG_BCM43XX=m
CONFIG_BCM43XX_DEBUG=y
CONFIG_BCM43XX_DMA=y
CONFIG_BCM43XX_PIO=y
CONFIG_BCM43XX_DMA_AND_PIO_MODE=y
# CONFIG_BCM43XX_DMA_MODE is not set
# CONFIG_BCM43XX_PIO_MODE is not set
CONFIG_BCM43XX_MAC80211=m
CONFIG_BCM43XX_MAC80211_PCI=y
CONFIG_BCM43XX_MAC80211_PCMCIA=y
CONFIG_BCM43XX_MAC80211_DEBUG=y
CONFIG_BCM43XX_MAC80211_DMA=y
CONFIG_BCM43XX_MAC80211_PIO=y
CONFIG_BCM43XX_MAC80211_DMA_AND_PIO_MODE=y
# CONFIG_BCM43XX_MAC80211_DMA_MODE is not set
# CONFIG_BCM43XX_MAC80211_PIO_MODE is not set
CONFIG_DVB_BCM3510=m
akpm:/usr/src/25> grep SSB .config
akpm:/usr/src/25>

Quoted 7 lines
Quoted 5 lines

So what is going on? CONFIG_BCM43XX_MAC80211_PCI must be enabled. Otherwise the func call would be ifdef'ed out. So but if it is enabled, it would SELECT SSB_PCIHOST. Which would enable the declaration and definition of ssb_pcihost_register(). What am I missing?

Just stop using select. It's busted.

Ok, I have no problem with that. BUT my users and other people in the kernel community do certainly have. Nobody will find the bcm43xx option anymore, if we depend on SSB.
I mean, people do even seriously complain about the filenames of the firmware and so on.
So adding a dep on SSB would generate about 3 to 4 bugreports each day, I'd say from experience.

So, once you suggested that menuconfig should be changed to show options "greyed out" when deps are not met. Are there any patches available? Any starting point?

Signature · 1 line
Greetings Michael.
#7 lore raw
Quoted 9 lines · On Thu, 9 Aug 2007 00:38:05 +0200 Michael Buesch <[email protected]> wrote:
Quoted 1 line

Just stop using select. It's busted.

Ok, I have no problem with that. BUT my users and other people in the kernel community do certainly have. Nobody will find the bcm43xx option anymore, if we depend on SSB.
I mean, people do even seriously complain about the filenames of the firmware and so on.
So adding a dep on SSB would generate about 3 to 4 bugreports each day, I'd say from experience.

yup, I understand the problem and I cannot suggest any acceptable solution, apart from...

Quoted 3 lines

So, once you suggested that menuconfig should be changed to show options "greyed out" when deps are not met. Are there any patches available? Any starting point?

No, nothing at all, sorry.

I'm getting a _lot_ of build breakage out of SSB right now.

I wonder if we could do something lame like adding some text to the BCM_whatever Kconfig files, right there on the top-level menu entry which says "go look at CONFIG_SSB". Make it really obvious.

#8 lore raw
Quoted 11 lines · On Thursday 09 August 2007 00:52:31 Andrew Morton wrote:
Quoted 7 lines

Ok, I have no problem with that. BUT my users and other people in the kernel community do certainly have. Nobody will find the bcm43xx option anymore, if we depend on SSB.
I mean, people do even seriously complain about the filenames of the firmware and so on.
So adding a dep on SSB would generate about 3 to 4 bugreports each day, I'd say from experience.

yup, I understand the problem and I cannot suggest any acceptable solution, apart from...

Quoted 7 lines
Quoted 3 lines

So, once you suggested that menuconfig should be changed to show options "greyed out" when deps are not met. Are there any patches available? Any starting point?

No, nothing at all, sorry.

I'm getting a _lot_ of build breakage out of SSB right now.

Ok, I will do some patch that converts all this to dependencies and I will later look for a solution to the other problem created by this.

Signature · 1 line
Greetings Michael.
#9 lore raw
In reply to Andrew Morton
Quoted 7 lines · Andrew Morton

yup, I understand the problem and I cannot suggest any acceptable solution, apart from...

Quoted 3 lines

So, once you suggested that menuconfig should be changed to show options "greyed out" when deps are not met. Are there any patches available? Any starting point?

Quoted 9 lines

No, nothing at all, sorry.

I'm getting a _lot_ of build breakage out of SSB right now.

I wonder if we could do something lame like adding some text to the BCM_whatever Kconfig files, right there on the top-level menu entry which says "go look at CONFIG_SSB". Make it really obvious.

I did some patch that adds a hacky config option which whole purpuse is to describe what's going on.
It's a bad hack, but for now it's probably better than nothing. How does this look like?

drivers/net/Kconfig +24 -5
Index: wireless-dev/drivers/net/Kconfig
===================================================================
@@ -1452,10 +1452,31 @@ config APRICOT
 	  <file:Documentation/networking/net-modules.txt>.  The module will be
 	  called apricot.
 
+config B44_DEP_HACK
+	bool
+	depends on SSB && SSB_PCIHOST && SSB_DRIVER_PCICORE
+	default y
+
+config B44_ADVICE_HACK
+	bool "B44 for PCI not available. Read the help text of this option!"
+	depends on !B44_DEP_HACK
+	---help---
+	  The Broadcom 440x/47xx driver for PCI devices can not be enabled,
+	  because the required dependencies are not selected.
+
+	  In order to be able to select the Broadcom 440x/47xx PCI driver, you
+	  need to enable the following options first:
+
+	  CONFIG_SSB found in menu:
+	  Device Drivers/Sonics Silicon Backplane/Sonics Silicon Backplane support
+	  CONFIG_SSB_PCIHOST found in menu:
+	  Device Drivers/Sonics Silicon Backplane/Support for SSB on PCI-bus host
+	  CONFIG_SSB_DRIVER_PCICORE found in menu:
+	  Device Drivers/Sonics Silicon Backplane/SSB PCI core driver
+
 config B44
 	tristate "Broadcom 440x/47xx ethernet support"
-	depends on HAS_IOMEM
-	select SSB
+	depends on SSB
 	select MII
 	help
 	  If you have a network (Ethernet) controller of this type, say Y
@@ -1473,9 +1494,7 @@ config B44
 
 config B44_PCI
 	bool "Broadcom 440x PCI device support"
-	depends on B44 && NET_PCI
-	select SSB_PCIHOST
-	select SSB_DRIVER_PCICORE
+	depends on B44 && SSB_PCIHOST && SSB_DRIVER_PCICORE && NET_PCI
 	default y
 	help
 	  Support for Broadcom 440x PCI devices.
drivers/net/wireless/bcm43xx-mac80211/Kconfig +25 -8
Index: wireless-dev/drivers/net/wireless/bcm43xx-mac80211/Kconfig
===================================================================
@@ -1,8 +1,29 @@
+config BCM43XX_DEP_HACK
+	bool
+	depends on SSB && SSB_PCIHOST && SSB_DRIVER_PCICORE
+	default y
+
+config BCM43XX_ADVICE_HACK
+	bool "BCM43xx PCI (mac80211) not available. Read the help text of this option!"
+	depends on !BCM43XX_DEP_HACK
+	---help---
+	  The BCM43xx driver for BCM43xx PCI devices can not be enabled,
+	  because the required dependencies are not selected.
+
+	  In order to be able to select the BCM43xx-mac80211 driver, you
+	  need to enable the following options first:
+
+	  CONFIG_SSB found in menu:
+	  Device Drivers/Sonics Silicon Backplane/Sonics Silicon Backplane support
+	  CONFIG_SSB_PCIHOST found in menu:
+	  Device Drivers/Sonics Silicon Backplane/Support for SSB on PCI-bus host
+	  CONFIG_SSB_DRIVER_PCICORE found in menu:
+	  Device Drivers/Sonics Silicon Backplane/SSB PCI core driver
+
 config BCM43XX_MAC80211
 	tristate "Broadcom BCM43xx wireless support (mac80211 stack)"
-	depends on MAC80211 && WLAN_80211 && EXPERIMENTAL
+	depends on SSB && MAC80211 && WLAN_80211 && EXPERIMENTAL
 	select FW_LOADER
-	select SSB
 	select HW_RANDOM
 	---help---
 	  This is an experimental driver for the Broadcom 43xx wireless chip,
@@ -10,9 +31,7 @@ config BCM43XX_MAC80211
 
 config BCM43XX_MAC80211_PCI
 	bool "BCM43xx PCI device support"
-	depends on BCM43XX_MAC80211 && PCI
-	select SSB_PCIHOST
-	select SSB_DRIVER_PCICORE
+	depends on BCM43XX_MAC80211 && SSB_PCIHOST && SSB_DRIVER_PCICORE
 	default y
 	---help---
 	  Broadcom 43xx PCI device support.
@@ -24,8 +43,7 @@ config BCM43XX_MAC80211_PCI
 
 config BCM43XX_MAC80211_PCMCIA
 	bool "BCM43xx PCMCIA device support"
-	depends on BCM43XX_MAC80211 && PCMCIA
-	select SSB_PCMCIAHOST
+	depends on BCM43XX_MAC80211 && SSB_PCMCIAHOST
 	---help---
 	  Broadcom 43xx PCMCIA device support.
 
@@ -45,7 +63,6 @@ config BCM43XX_MAC80211_PCMCIA
 config BCM43XX_MAC80211_DEBUG
 	bool "Broadcom BCM43xx debugging (RECOMMENDED)"
 	depends on BCM43XX_MAC80211
-	select SSB_DEBUG if !SSB_SILENT
 	default y
 	---help---
 	  Broadcom 43xx debugging messages.
#10 lore raw
Quoted 4 lines · On Thu, 9 Aug 2007 02:04:22 +0200 Michael Buesch <[email protected]> wrote:

I did some patch that adds a hacky config option which whole purpuse is to describe what's going on.
It's a bad hack, but for now it's probably better than nothing. How does this look like?

More reasonable than I expected. It's good that the text starts with "b44". People will go there and read it.

A sad thing to do, though. Awful :(