Skip to content

Commit 06679a4

Browse files
arndbNipaLocal
authored and
NipaLocal
committed
net: enetc: fix NTMP build dependency
When the new library driver is in a loadable module, but the enetc core driver is built-in, the kernel fails to link: aarch64-linux-ld: drivers/net/ethernet/freescale/enetc/enetc_cbdr.o: in function `enetc4_teardown_cbdr': enetc_cbdr.c:(.text+0x70): undefined reference to `ntmp_free_cbdr' aarch64-linux-ld: drivers/net/ethernet/freescale/enetc/enetc_cbdr.o: in function `enetc4_get_rss_table': enetc_cbdr.c:(.text+0x98): undefined reference to `ntmp_rsst_query_entry' aarch64-linux-ld: drivers/net/ethernet/freescale/enetc/enetc_cbdr.o: in function `enetc4_set_rss_table': enetc_cbdr.c:(.text+0xb8): undefined reference to `ntmp_rsst_update_entry' aarch64-linux-ld: drivers/net/ethernet/freescale/enetc/enetc_cbdr.o: in function `enetc4_setup_cbdr': enetc_cbdr.c:(.text+0x438): undefined reference to `ntmp_init_cbdr' Move the ntmp code into the core module itself to avoid this link error. Fixes: 4701073 ("net: enetc: add initial netc-lib driver to support NTMP") Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: NipaLocal <nipa@local>
1 parent 9f5f6e7 commit 06679a4

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

drivers/net/ethernet/freescale/enetc/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ config NXP_ENETC_PF_COMMON
1616
If compiled as module (M), the module name is nxp-enetc-pf-common.
1717

1818
config NXP_NETC_LIB
19-
tristate
19+
bool
2020
help
2121
This module provides common functionalities for both ENETC and NETC
2222
Switch, such as NETC Table Management Protocol (NTMP) 2.0, common tc

drivers/net/ethernet/freescale/enetc/Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ fsl-enetc-core-y := enetc.o enetc_cbdr.o enetc_ethtool.o
66
obj-$(CONFIG_NXP_ENETC_PF_COMMON) += nxp-enetc-pf-common.o
77
nxp-enetc-pf-common-y := enetc_pf_common.o
88

9-
obj-$(CONFIG_NXP_NETC_LIB) += nxp-netc-lib.o
10-
nxp-netc-lib-y := ntmp.o
9+
fsl-enetc-core-$(CONFIG_NXP_NETC_LIB) += ntmp.o
1110

1211
obj-$(CONFIG_FSL_ENETC) += fsl-enetc.o
1312
fsl-enetc-y := enetc_pf.o

0 commit comments

Comments
 (0)