diff mbox series

enetc: auto select PHYLIB and MDIO_DEVRES

Message ID 20210211160930.1231035-1-ztong0001@gmail.com (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series enetc: auto select PHYLIB and MDIO_DEVRES | expand

Checks

Context Check Description
netdev/cover_letter success Link
netdev/fixes_present success Link
netdev/patch_count success Link
netdev/tree_selection success Guessed tree name to be net-next
netdev/subject_prefix warning Target tree name not specified in the subject
netdev/cc_maintainers success CCed 4 of 4 maintainers
netdev/source_inline success Was 0 now: 0
netdev/verify_signedoff success Link
netdev/module_param success Was 0 now: 0
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/verify_fixes success Link
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/header_inline success Link
netdev/stable success Stable not CCed

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.
Tong Zhang Feb. 11, 2021, 5:54 p.m. UTC | #2
Thanks for the comments!
I have sent a revised patch.
- Tong

On Thu, Feb 11, 2021 at 12:38 PM Florian Fainelli <f.fainelli@gmail.com> wrote:
>
> 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.
> --
> Florian
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.