diff mbox series

enetc: auto select PHYLIB and MDIO_DEVRES

Message ID 20210211160930.1231035-1-ztong0001@gmail.com
State New
Headers show
Series enetc: auto select PHYLIB and MDIO_DEVRES | expand

Commit Message

Tong Zhang Feb. 11, 2021, 4:09 p.m. UTC
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.

Signed-off-by: Tong Zhang <ztong0001@gmail.com>
---
 drivers/net/ethernet/freescale/enetc/Kconfig | 2 ++
 1 file changed, 2 insertions(+)

Comments

Florian Fainelli Feb. 11, 2021, 5:38 p.m. UTC | #1
On 2/11/21 8:09 AM, Tong Zhang wrote:
> 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.
diff mbox series

Patch

diff --git a/drivers/net/ethernet/freescale/enetc/Kconfig b/drivers/net/ethernet/freescale/enetc/Kconfig
index d99ea0f4e4a6..2ec3f8065e6d 100644
--- a/drivers/net/ethernet/freescale/enetc/Kconfig
+++ b/drivers/net/ethernet/freescale/enetc/Kconfig
@@ -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.