Skip to content

Commit 82cbd06

Browse files
Wei Fangdavem330
authored andcommitted
net: enetc: fix the netc-lib driver build dependency
The kernel robot reported the following errors when the netc-lib driver was compiled as a loadable module and the enetc-core driver was built-in. ld.lld: error: undefined symbol: ntmp_init_cbdr referenced by enetc_cbdr.c:88 (drivers/net/ethernet/freescale/enetc/enetc_cbdr.c:88) ld.lld: error: undefined symbol: ntmp_free_cbdr referenced by enetc_cbdr.c:96 (drivers/net/ethernet/freescale/enetc/enetc_cbdr.c:96) Simply changing "tristate" to "bool" can fix this issue, but considering that the netc-lib driver needs to support being compiled as a loadable module and LS1028 does not need the netc-lib driver. Therefore, we add a boolean symbol 'NXP_NTMP' to enable 'NXP_NETC_LIB' as needed. And when adding NETC switch driver support in the future, there is no need to modify the dependency, just select "NXP_NTMP" and "NXP_NETC_LIB" at the same time. Reported-by: Arnd Bergmann <[email protected]> Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Fixes: 4701073 ("net: enetc: add initial netc-lib driver to support NTMP") Suggested-by: Arnd Bergmann <[email protected]> Signed-off-by: Wei Fang <[email protected]> Reviewed-by: Vladimir Oltean <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 87f7ce2 commit 82cbd06

File tree

1 file changed

+5
-1
lines changed
  • drivers/net/ethernet/freescale/enetc

1 file changed

+5
-1
lines changed

drivers/net/ethernet/freescale/enetc/Kconfig

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# SPDX-License-Identifier: GPL-2.0
22
config FSL_ENETC_CORE
33
tristate
4+
select NXP_NETC_LIB if NXP_NTMP
45
help
56
This module supports common functionality between the PF and VF
67
drivers for the NXP ENETC controller.
@@ -22,6 +23,9 @@ config NXP_NETC_LIB
2223
Switch, such as NETC Table Management Protocol (NTMP) 2.0, common tc
2324
flower and debugfs interfaces and so on.
2425

26+
config NXP_NTMP
27+
bool
28+
2529
config FSL_ENETC
2630
tristate "ENETC PF driver"
2731
depends on PCI_MSI
@@ -45,7 +49,7 @@ config NXP_ENETC4
4549
select FSL_ENETC_CORE
4650
select FSL_ENETC_MDIO
4751
select NXP_ENETC_PF_COMMON
48-
select NXP_NETC_LIB
52+
select NXP_NTMP
4953
select PHYLINK
5054
select DIMLIB
5155
help

0 commit comments

Comments
 (0)