]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mlxsw: add psample dependency for spectrum
authorArnd Bergmann <arnd@arndb.de>
Mon, 6 Feb 2017 16:26:30 +0000 (17:26 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 7 Feb 2017 16:44:12 +0000 (11:44 -0500)
When PSAMPLE is a loadable module, spectrum must not be built-in:

drivers/net/built-in.o: In function `mlxsw_sp_rx_listener_sample_func':
spectrum.c:(.text+0xe357e): undefined reference to `psample_sample_packet'

This adds a Kconfig dependency to enforce usable configurations.

Fixes: 98d0f7b9acda ("mlxsw: spectrum: Add packet sample offloading support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Yotam Gigi <yotamg@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/Kconfig

index 76a7574c3c7ddbc02c7918076a231968a9b8edc7..ef23eaedc2ff44c61e9dc9dadee0ba3e515fbefe 100644 (file)
@@ -73,6 +73,7 @@ config MLXSW_SWITCHX2
 config MLXSW_SPECTRUM
        tristate "Mellanox Technologies Spectrum support"
        depends on MLXSW_CORE && MLXSW_PCI && NET_SWITCHDEV && VLAN_8021Q
+       depends on PSAMPLE || PSAMPLE=n
        select PARMAN
        default m
        ---help---