Skip to contentSkip to conversation

enetc: auto select PHYLIB and MDIO_DEVRES

PATCH Superseded Tong Zhang 3 participants 5 messages Feb 11, 2021 – Feb 12, 2021

Subsystems (3)
lore
Share & tools
lore

Tong Zhang

author
#0 lore raw

PATCH 1/1 enetc: auto select PHYLIB and MDIO_DEVRES

FSL_ENETC_MDIO use symbols from PHYLIB and MDIO_DEVRES, however they are not auto selected.

ERROR: modpost: "__mdiobus_register" [drivers/net/ethernet/freescale/enetc/fsl-enetc-mdio.ko] undefined!
ERROR: modpost: "mdiobus_unregister" [drivers/net/ethernet/freescale/enetc/fsl-enetc-mdio.ko] undefined!
ERROR: modpost: "devm_mdiobus_alloc_size" [drivers/net/ethernet/freescale/enetc/fsl-enetc-mdio.ko] undefined!

auto select MDIO_DEVRES and PHYLIB when FSL_ENETC_MDIO is selected.

---
 drivers/net/ethernet/freescale/enetc/Kconfig | 2 ++
 1 file changed, 2 insertions(+)
drivers/net/ethernet/freescale/enetc/Kconfig +2 -0
index d99ea0f4e4a6..2ec3f8065e6d 100644
@@ -28,6 +28,8 @@ config FSL_ENETC_VF
 config FSL_ENETC_MDIO
 	tristate "ENETC MDIO driver"
 	depends on PCI
+	select MDIO_DEVRES
+	select PHYLIB
 	help
 	  This driver supports NXP ENETC Central MDIO controller as a PCIe
 	  physical function (PF) device.
Signature · 1 line
2.25.1
#1 lore raw
Quoted 8 lines · Tong Zhang

FSL_ENETC_MDIO use symbols from PHYLIB and MDIO_DEVRES, however they are not auto selected.

ERROR: modpost: "__mdiobus_register" [drivers/net/ethernet/freescale/enetc/fsl-enetc-mdio.ko] undefined!
ERROR: modpost: "mdiobus_unregister" [drivers/net/ethernet/freescale/enetc/fsl-enetc-mdio.ko] undefined!
ERROR: modpost: "devm_mdiobus_alloc_size" [drivers/net/ethernet/freescale/enetc/fsl-enetc-mdio.ko] undefined!

auto select MDIO_DEVRES and PHYLIB when FSL_ENETC_MDIO is selected.

depends on MDIO_DEVRES && MDIO_BUS

would be more appropriate because the symbols you reference are part of the MDIO bus layer, which happens to associated with PHYLIB depending on the configuration but as far as build goes you can separate the two.

Signature · 1 line
Florian
author
#2 lore raw

PATCH v2 1/1 enetc: auto select PHYLIB and MDIO_DEVRES

FSL_ENETC_MDIO use symbols from PHYLIB (MDIO_BUS) and MDIO_DEVRES, however there are no dependency specified in Kconfig

ERROR: modpost: "__mdiobus_register" [drivers/net/ethernet/freescale/enetc/fsl-enetc-mdio.ko] undefined!
ERROR: modpost: "mdiobus_unregister" [drivers/net/ethernet/freescale/enetc/fsl-enetc-mdio.ko] undefined!
ERROR: modpost: "devm_mdiobus_alloc_size" [drivers/net/ethernet/freescale/enetc/fsl-enetc-mdio.ko] undefined!

add depends on MDIO_DEVRES && MDIO_BUS

---
v2:change to depends on MDIO_DEVRES&& MDIO_BUS as suggested by Florian Fainelli <[email protected]>>

 drivers/net/ethernet/freescale/enetc/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/freescale/enetc/Kconfig +1 -1
index d99ea0f4e4a6..ab92382c399a 100644
@@ -27,7 +27,7 @@ config FSL_ENETC_VF
 
 config FSL_ENETC_MDIO
 	tristate "ENETC MDIO driver"
-	depends on PCI
+	depends on PCI && MDIO_DEVRES && MDIO_BUS
 	help
 	  This driver supports NXP ENETC Central MDIO controller as a PCIe
 	  physical function (PF) device.
Signature · 1 line
2.25.1
#3 lore raw
This patch was applied to netdev/net.git (refs/heads/master):

Hello:

This patch was applied to netdev/net.git (refs/heads/master):

Quoted 8 lines · On Thu, 11 Feb 2021 12:54:11 -0500 you wrote:

FSL_ENETC_MDIO use symbols from PHYLIB (MDIO_BUS) and MDIO_DEVRES, however there are no dependency specified in Kconfig

ERROR: modpost: "__mdiobus_register" [drivers/net/ethernet/freescale/enetc/fsl-enetc-mdio.ko] undefined!
ERROR: modpost: "mdiobus_unregister" [drivers/net/ethernet/freescale/enetc/fsl-enetc-mdio.ko] undefined!
ERROR: modpost: "devm_mdiobus_alloc_size" [drivers/net/ethernet/freescale/enetc/fsl-enetc-mdio.ko] undefined!

[...]

Here is the summary with links:
- [v2] enetc: auto select PHYLIB and MDIO_DEVRES

    https://git.kernel.org/netdev/net/c/e185ea30df1f

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html

author
#4 lore raw
In reply to Florian Fainelli

Thanks for the comments!
I have sent a revised patch.
- Tong

Quoted 18 lines · Florian Fainelli
Quoted 8 lines · Tong Zhang

FSL_ENETC_MDIO use symbols from PHYLIB and MDIO_DEVRES, however they are not auto selected.

ERROR: modpost: "__mdiobus_register" [drivers/net/ethernet/freescale/enetc/fsl-enetc-mdio.ko] undefined!
ERROR: modpost: "mdiobus_unregister" [drivers/net/ethernet/freescale/enetc/fsl-enetc-mdio.ko] undefined!
ERROR: modpost: "devm_mdiobus_alloc_size" [drivers/net/ethernet/freescale/enetc/fsl-enetc-mdio.ko] undefined!

auto select MDIO_DEVRES and PHYLIB when FSL_ENETC_MDIO is selected.

depends on MDIO_DEVRES && MDIO_BUS

would be more appropriate because the symbols you reference are part of the MDIO bus layer, which happens to associated with PHYLIB depending on the configuration but as far as build goes you can separate the two. --
Florian