diff mbox series

[net-next] net: pcs: pcs-xpcs: hide xpcs Kconfig option from the user

Message ID 20220624101758.565822-1-ioana.ciornei@nxp.com (mailing list archive)
State Not Applicable
Delegated to: Netdev Maintainers
Headers show
Series [net-next] net: pcs: pcs-xpcs: hide xpcs Kconfig option from the user | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix success Link
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers warning 1 maintainers not CCed: linux@armlinux.org.uk
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Ioana Ciornei June 24, 2022, 10:17 a.m. UTC
Hide the xpcs Kconfig option from the user so that we do not end up in
a scenario where the xpcs is enabled as a module but phylink is not
enabled at all.

ERROR: modpost: "phylink_mii_c22_pcs_encode_advertisement" [drivers/net/pcs/pcs_xpcs.ko] undefined!
ERROR: modpost: "phylink_mii_c22_pcs_decode_state" [drivers/net/pcs/pcs_xpcs.ko] undefined!

All the user drivers (stmmac and sja1105) of the xpcs module already
select both PCS_XPCS and PHYLINK, so the dependency is resolved at that
level.

Reported-by: Randy Dunlap <rdunlap@infradead.org>
Fixes: b47aec885bcd ("net: pcs: xpcs: add CL37 1000BASE-X AN support")
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
---
 drivers/net/pcs/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jakub Kicinski June 27, 2022, 4:12 p.m. UTC | #1
On Fri, 24 Jun 2022 13:17:58 +0300 Ioana Ciornei wrote:
> Hide the xpcs Kconfig option from the user so that we do not end up in
> a scenario where the xpcs is enabled as a module but phylink is not
> enabled at all.
> 
> ERROR: modpost: "phylink_mii_c22_pcs_encode_advertisement" [drivers/net/pcs/pcs_xpcs.ko] undefined!
> ERROR: modpost: "phylink_mii_c22_pcs_decode_state" [drivers/net/pcs/pcs_xpcs.ko] undefined!
> 
> All the user drivers (stmmac and sja1105) of the xpcs module already
> select both PCS_XPCS and PHYLINK, so the dependency is resolved at that
> level.
> 
> Reported-by: Randy Dunlap <rdunlap@infradead.org>
> Fixes: b47aec885bcd ("net: pcs: xpcs: add CL37 1000BASE-X AN support")
> Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>

Oh, somehow I missed this patch on Friday, I applied my own
commit ebeae54d3a77 ("net: pcs: xpcs: depends on PHYLINK in Kconfig")
diff mbox series

Patch

diff --git a/drivers/net/pcs/Kconfig b/drivers/net/pcs/Kconfig
index 22ba7b0b476d..9eb32220efea 100644
--- a/drivers/net/pcs/Kconfig
+++ b/drivers/net/pcs/Kconfig
@@ -6,7 +6,7 @@ 
 menu "PCS device drivers"
 
 config PCS_XPCS
-	tristate "Synopsys DesignWare XPCS controller"
+	tristate
 	depends on MDIO_DEVICE && MDIO_BUS
 	help
 	  This module provides helper functions for Synopsys DesignWare XPCS