Skip to contentSkip to conversation

net: phy: Fix MDIO_THUNDER dependencies

PATCH Applied Florian Fainelli 3 participants 3 messages Jun 13, 2017

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

PATCH 1/1 net: phy: Fix MDIO_THUNDER dependencies

After commit 90eff9096c01 ("net: phy: Allow splitting MDIO bus/device support from PHYs") we could create a configuration where MDIO_DEVICE=y and PHYLIB=m which leads to the following undefined references:

drivers/built-in.o: In function `thunder_mdiobus_pci_remove':

Quoted 4 lines
Quoted 4 lines

mdio-thunder.c:(.text+0x2a212f): undefined reference to mdiobus_unregister' mdio-thunder.c:(.text+0x2a2138): undefined reference to mdiobus_free'

drivers/built-in.o: In function `thunder_mdiobus_pci_probe':
mdio-thunder.c:(.text+0x2a22e7): undefined reference to
`devm_mdiobus_alloc_size'
mdio-thunder.c:(.text+0x2a236f): undefined reference to
`of_mdiobus_register'

Fixes 90eff9096c01 ("net: phy: Allow splitting MDIO bus/device support from PHYs")
---
 drivers/net/phy/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/net/phy/Kconfig +1 -0
index c360dd6ead22..3ab6c58d4be6 100644
@@ -127,6 +127,7 @@ config MDIO_THUNDER
 	tristate "ThunderX SOCs MDIO buses"
 	depends on 64BIT
 	depends on PCI
+	depends on !(MDIO_DEVICE=y && PHYLIB=m)
 	select MDIO_CAVIUM
 	help
 	  This driver supports the MDIO interfaces found on Cavium
Signature · 1 line
2.9.3
Tested-by on v1 1/1
#1 lore raw
Quoted 11 lines · Florian Fainelli

After commit 90eff9096c01 ("net: phy: Allow splitting MDIO bus/device support from PHYs") we could create a configuration where MDIO_DEVICE=y and PHYLIB=m which leads to the following undefined references:

drivers/built-in.o: In function `thunder_mdiobus_pci_remove':

Quoted 4 lines
Quoted 4 lines

mdio-thunder.c:(.text+0x2a212f): undefined reference to mdiobus_unregister' mdio-thunder.c:(.text+0x2a2138): undefined reference to mdiobus_free'

drivers/built-in.o: In function `thunder_mdiobus_pci_probe':

Quoted 8 lines
   mdio-thunder.c:(.text+0x2a22e7): undefined reference to

`devm_mdiobus_alloc_size'
mdio-thunder.c:(.text+0x2a236f): undefined reference to
`of_mdiobus_register'

Fixes 90eff9096c01 ("net: phy: Allow splitting MDIO bus/device support from PHYs")

Thanks.

Quoted 17 lines
---
 drivers/net/phy/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/net/phy/Kconfig +1 -0
index c360dd6ead22..3ab6c58d4be6 100644
@@ -127,6 +127,7 @@ config MDIO_THUNDER
 	tristate "ThunderX SOCs MDIO buses"
 	depends on 64BIT
 	depends on PCI
+	depends on !(MDIO_DEVICE=y && PHYLIB=m)
 	select MDIO_CAVIUM
 	help
 	  This driver supports the MDIO interfaces found on Cavium
Signature · 1 line
~Randy
maintainer Applied
#2 lore raw
In reply to Florian Fainelli

From: Florian Fainelli <[email protected]>
Date: Mon, 12 Jun 2017 17:18:51 -0700

Quoted 11 lines

After commit 90eff9096c01 ("net: phy: Allow splitting MDIO bus/device support from PHYs") we could create a configuration where MDIO_DEVICE=y and PHYLIB=m which leads to the following undefined references:

drivers/built-in.o: In function `thunder_mdiobus_pci_remove':

Quoted 4 lines
Quoted 4 lines

mdio-thunder.c:(.text+0x2a212f): undefined reference to mdiobus_unregister' mdio-thunder.c:(.text+0x2a2138): undefined reference to mdiobus_free'

drivers/built-in.o: In function `thunder_mdiobus_pci_probe':

Quoted 8 lines
   mdio-thunder.c:(.text+0x2a22e7): undefined reference to

`devm_mdiobus_alloc_size'
mdio-thunder.c:(.text+0x2a236f): undefined reference to
`of_mdiobus_register'

Fixes 90eff9096c01 ("net: phy: Allow splitting MDIO bus/device support from PHYs")

Applied.