]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: Kconfig: convert imply usage to weak dependency
authorSaeed Mahameed <saeedm@mellanox.com>
Thu, 16 Apr 2020 22:04:02 +0000 (15:04 -0700)
committerSaeed Mahameed <saeedm@mellanox.com>
Mon, 20 Apr 2020 21:30:22 +0000 (14:30 -0700)
commit4ed1a378a9a9cd0e60b72d5a48bec6e6d58d1078
tree07c8a7f5f03d4d16f25bb64b10e93108f79e9f0c
parentc04efb8f93d2076d08726190f0cb3d9636b70746
net/mlx5: Kconfig: convert imply usage to weak dependency

MLX5_CORE uses the 'imply' keyword to depend on VXLAN, PTP_1588_CLOCK,
MLXFW and PCI_HYPERV_INTERFACE.

This was useful to force vxlan, ptp, etc.. to be reachable to mlx5
regardless of their config states.

Due to the changes in the cited commit below, the semantics of 'imply'
was changed to not force any restriction on the implied config.

As a result of this change, the compilation of MLX5_CORE=y and VXLAN=m
would result in undefined references, as VXLAN now would stay as 'm'.

To fix this we change MLX5_CORE to have a weak dependency on
these modules/configs and make sure they are reachable, by adding:
depend on symbol || !symbol.

For example: VXLAN=m MLX5_CORE=y, this will force MLX5_CORE to m

Fixes: 429b08eebbef ("kconfig: allow symbols implied by y to become m")
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Cc: Masahiro Yamada <masahiroy@kernel.org>
Cc: Nicolas Pitre <nico@fluxnic.net>
Cc: Arnd Bergmann <arnd@arndb.de>
Reported-by: Randy Dunlap <rdunlap@infradead.org>
drivers/net/ethernet/mellanox/mlx5/core/Kconfig