mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-25 17:55:10 +07:00
3d1cbe839a
The new NET_DEVLINK infrastructure can be a loadable module, but the drivers using it might be built-in, which causes link errors like: drivers/net/built-in.o: In function `mlx4_load_one': :(.text+0x2fbfda): undefined reference to `devlink_port_register' :(.text+0x2fc084): undefined reference to `devlink_port_unregister' drivers/net/built-in.o: In function `mlxsw_sx_port_remove': :(.text+0x33a03a): undefined reference to `devlink_port_type_clear' :(.text+0x33a04e): undefined reference to `devlink_port_unregister' There are multiple ways to avoid this: a) add 'depends on NET_DEVLINK || !NET_DEVLINK' dependencies for each user b) use 'select NET_DEVLINK' from each driver that uses it and hide the symbol in Kconfig. c) make NET_DEVLINK a 'bool' option so we don't have to list it as a dependency, and rely on the APIs to be stubbed out when it is disabled d) use IS_REACHABLE() rather than IS_ENABLED() to check for NET_DEVLINK in include/net/devlink.h This implements a variation of approach a) by adding an intermediate symbol that drivers can depend on, and changes the three drivers using it. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Fixes:09d4d087cd
("mlx4: Implement devlink interface") Fixes:c4745500e9
("mlxsw: Implement devlink interface") Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
53 lines
1.5 KiB
Plaintext
53 lines
1.5 KiB
Plaintext
#
|
|
# Mellanox switch drivers configuration
|
|
#
|
|
|
|
config MLXSW_CORE
|
|
tristate "Mellanox Technologies Switch ASICs support"
|
|
depends on MAY_USE_DEVLINK
|
|
---help---
|
|
This driver supports Mellanox Technologies Switch ASICs family.
|
|
|
|
To compile this driver as a module, choose M here: the
|
|
module will be called mlxsw_core.
|
|
|
|
config MLXSW_CORE_HWMON
|
|
bool "HWMON support for Mellanox Technologies Switch ASICs"
|
|
depends on MLXSW_CORE && HWMON
|
|
depends on !(MLXSW_CORE=y && HWMON=m)
|
|
default y
|
|
---help---
|
|
Say Y here if you want to expose HWMON interface on mlxsw devices.
|
|
|
|
config MLXSW_PCI
|
|
tristate "PCI bus implementation for Mellanox Technologies Switch ASICs"
|
|
depends on PCI && HAS_DMA && HAS_IOMEM && MLXSW_CORE
|
|
default m
|
|
---help---
|
|
This is PCI bus implementation for Mellanox Technologies Switch ASICs.
|
|
|
|
To compile this driver as a module, choose M here: the
|
|
module will be called mlxsw_pci.
|
|
|
|
config MLXSW_SWITCHX2
|
|
tristate "Mellanox Technologies SwitchX-2 support"
|
|
depends on MLXSW_CORE && NET_SWITCHDEV
|
|
default m
|
|
---help---
|
|
This driver supports Mellanox Technologies SwitchX-2 Ethernet
|
|
Switch ASICs.
|
|
|
|
To compile this driver as a module, choose M here: the
|
|
module will be called mlxsw_switchx2.
|
|
|
|
config MLXSW_SPECTRUM
|
|
tristate "Mellanox Technologies Spectrum support"
|
|
depends on MLXSW_CORE && NET_SWITCHDEV && VLAN_8021Q
|
|
default m
|
|
---help---
|
|
This driver supports Mellanox Technologies Spectrum Ethernet
|
|
Switch ASICs.
|
|
|
|
To compile this driver as a module, choose M here: the
|
|
module will be called mlxsw_spectrum.
|