Commit 46bdf777 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Jason Gunthorpe

RDMA: Fix dependencies for rdma_user_mmap_io

The mlx4 driver produces a link error when it is configured
as built-in while CONFIG_INFINIBAND_USER_ACCESS is set to =m:

drivers/infiniband/hw/mlx4/main.o: In function `mlx4_ib_mmap':
main.c:(.text+0x1af4): undefined reference to `rdma_user_mmap_io'

The same function is called from mlx5, which already has a
dependency to ensure we can call it, and from hns, which
appears to suffer from the same problem.

This adds the same dependency that mlx5 uses to the other two.

Fixes: 6745d356 ("RDMA/hns: Use rdma_user_mmap_io")
Fixes: c282da41 ("RDMA/mlx4: Use rdma_user_mmap_io")
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent c6ce5807
config INFINIBAND_HNS config INFINIBAND_HNS
tristate "HNS RoCE Driver" tristate "HNS RoCE Driver"
depends on NET_VENDOR_HISILICON depends on NET_VENDOR_HISILICON
depends on INFINIBAND_USER_ACCESS || !INFINIBAND_USER_ACCESS
depends on ARM64 || (COMPILE_TEST && 64BIT) depends on ARM64 || (COMPILE_TEST && 64BIT)
---help--- ---help---
This is a RoCE/RDMA driver for the Hisilicon RoCE engine. The engine This is a RoCE/RDMA driver for the Hisilicon RoCE engine. The engine
......
config MLX4_INFINIBAND config MLX4_INFINIBAND
tristate "Mellanox ConnectX HCA support" tristate "Mellanox ConnectX HCA support"
depends on NETDEVICES && ETHERNET && PCI && INET depends on NETDEVICES && ETHERNET && PCI && INET
depends on INFINIBAND_USER_ACCESS || !INFINIBAND_USER_ACCESS
depends on MAY_USE_DEVLINK depends on MAY_USE_DEVLINK
select NET_VENDOR_MELLANOX select NET_VENDOR_MELLANOX
select MLX4_CORE select MLX4_CORE
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment