mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00

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 <arnd@kernel.org>
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202505220734.x6TF6oHR-lkp@intel.com/
Fixes: 4701073c3d
("net: enetc: add initial netc-lib driver to support NTMP")
Suggested-by: Arnd Bergmann <arnd@kernel.org>
Signed-off-by: Wei Fang <wei.fang@nxp.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
127 lines
4 KiB
Text
127 lines
4 KiB
Text
# SPDX-License-Identifier: GPL-2.0
|
|
config FSL_ENETC_CORE
|
|
tristate
|
|
select NXP_NETC_LIB if NXP_NTMP
|
|
help
|
|
This module supports common functionality between the PF and VF
|
|
drivers for the NXP ENETC controller.
|
|
|
|
If compiled as module (M), the module name is fsl-enetc-core.
|
|
|
|
config NXP_ENETC_PF_COMMON
|
|
tristate
|
|
help
|
|
This module supports common functionality between drivers of
|
|
different versions of NXP ENETC PF controllers.
|
|
|
|
If compiled as module (M), the module name is nxp-enetc-pf-common.
|
|
|
|
config NXP_NETC_LIB
|
|
tristate
|
|
help
|
|
This module provides common functionalities for both ENETC and NETC
|
|
Switch, such as NETC Table Management Protocol (NTMP) 2.0, common tc
|
|
flower and debugfs interfaces and so on.
|
|
|
|
config NXP_NTMP
|
|
bool
|
|
|
|
config FSL_ENETC
|
|
tristate "ENETC PF driver"
|
|
depends on PCI_MSI
|
|
select FSL_ENETC_CORE
|
|
select FSL_ENETC_IERB
|
|
select FSL_ENETC_MDIO
|
|
select NXP_ENETC_PF_COMMON
|
|
select PHYLINK
|
|
select PCS_LYNX
|
|
select DIMLIB
|
|
help
|
|
This driver supports NXP ENETC gigabit ethernet controller PCIe
|
|
physical function (PF) devices, managing ENETC Ports at a privileged
|
|
level.
|
|
|
|
If compiled as module (M), the module name is fsl-enetc.
|
|
|
|
config NXP_ENETC4
|
|
tristate "ENETC4 PF driver"
|
|
depends on PCI_MSI
|
|
select FSL_ENETC_CORE
|
|
select FSL_ENETC_MDIO
|
|
select NXP_ENETC_PF_COMMON
|
|
select NXP_NTMP
|
|
select PHYLINK
|
|
select DIMLIB
|
|
help
|
|
This driver supports NXP ENETC devices with major revision 4. ENETC is
|
|
as the NIC functionality in NETC, it supports virtualization/isolation
|
|
based on PCIe Single Root IO Virtualization (SR-IOV) and a full range
|
|
of TSN standards and NIC offload capabilities.
|
|
|
|
If compiled as module (M), the module name is nxp-enetc4.
|
|
|
|
config FSL_ENETC_VF
|
|
tristate "ENETC VF driver"
|
|
depends on PCI_MSI
|
|
select FSL_ENETC_CORE
|
|
select FSL_ENETC_MDIO
|
|
select PHYLINK
|
|
select DIMLIB
|
|
help
|
|
This driver supports NXP ENETC gigabit ethernet controller PCIe
|
|
virtual function (VF) devices enabled by the ENETC PF driver.
|
|
|
|
If compiled as module (M), the module name is fsl-enetc-vf.
|
|
|
|
config FSL_ENETC_IERB
|
|
tristate "ENETC IERB driver"
|
|
help
|
|
This driver configures the Integrated Endpoint Register Block on NXP
|
|
LS1028A.
|
|
|
|
If compiled as module (M), the module name is fsl-enetc-ierb.
|
|
|
|
config FSL_ENETC_MDIO
|
|
tristate "ENETC MDIO driver"
|
|
depends on PCI && PHYLIB
|
|
help
|
|
This driver supports NXP ENETC Central MDIO controller as a PCIe
|
|
physical function (PF) device.
|
|
|
|
If compiled as module (M), the module name is fsl-enetc-mdio.
|
|
|
|
config FSL_ENETC_PTP_CLOCK
|
|
tristate "ENETC PTP clock driver"
|
|
depends on PTP_1588_CLOCK_QORIQ && (FSL_ENETC || FSL_ENETC_VF)
|
|
default y
|
|
help
|
|
This driver adds support for using the ENETC 1588 timer
|
|
as a PTP clock. This clock is only useful if your PTP
|
|
programs are getting hardware time stamps on the PTP Ethernet
|
|
packets using the SO_TIMESTAMPING API.
|
|
|
|
If compiled as module (M), the module name is fsl-enetc-ptp.
|
|
|
|
config FSL_ENETC_QOS
|
|
bool "ENETC hardware Time-sensitive Network support"
|
|
depends on (FSL_ENETC || FSL_ENETC_VF) && (NET_SCH_TAPRIO || NET_SCH_CBS)
|
|
help
|
|
There are Time-Sensitive Network(TSN) capabilities(802.1Qbv/802.1Qci
|
|
/802.1Qbu etc.) supported by ENETC. These TSN capabilities can be set
|
|
enable/disable from user space via Qos commands(tc). In the kernel
|
|
side, it can be loaded by Qos driver. Currently, it is only support
|
|
taprio(802.1Qbv) and Credit Based Shaper(802.1Qbu).
|
|
|
|
config NXP_NETC_BLK_CTRL
|
|
tristate "NETC blocks control driver"
|
|
help
|
|
This driver configures Integrated Endpoint Register Block (IERB) and
|
|
Privileged Register Block (PRB) of NETC. For i.MX platforms, it also
|
|
includes the configuration of NETCMIX block.
|
|
The IERB contains registers that are used for pre-boot initialization,
|
|
debug, and non-customer configuration. The PRB controls global reset
|
|
and global error handling for NETC. The NETCMIX block is mainly used
|
|
to set MII protocol and PCS protocol of the links, it also contains
|
|
settings for some other functions.
|
|
|
|
If compiled as module (M), the module name is nxp-netc-blk-ctrl.
|