From: Randy Dunlap <[email protected]>

Fix build errors when INFINIBAND_USER_ACCESS=m and MLX5_INFINIBAND=y.
The build error occurs when the mlx5 driver code attempts to use
USER_ACCESS interfaces, which are built as a loadable module.

Fixes these build errors:

drivers/infiniband/hw/mlx5/main.o: In function `populate_specs_root':
../drivers/infiniband/hw/mlx5/main.c:4982: undefined reference to 
`uverbs_default_get_objects'
../drivers/infiniband/hw/mlx5/main.c:4994: undefined reference to 
`uverbs_alloc_spec_tree'
drivers/infiniband/hw/mlx5/main.o: In function `depopulate_specs_root':
../drivers/infiniband/hw/mlx5/main.c:5001: undefined reference to 
`uverbs_free_spec_tree'

Reported-by: kbuild test robot <[email protected]>
Signed-off-by: Randy Dunlap <[email protected]>
Cc: Matan Barak <[email protected]>
Cc: Jason Gunthorpe <[email protected]>
Cc: Leon Romanovsky <[email protected]>
Cc: Doug Ledford <[email protected]>
Cc: [email protected]
Cc: [email protected] # reported against 4.16
---
 drivers/infiniband/hw/mlx5/Kconfig |    1 +
 1 file changed, 1 insertion(+)

--- lnx-417-rc1.orig/drivers/infiniband/hw/mlx5/Kconfig
+++ lnx-417-rc1/drivers/infiniband/hw/mlx5/Kconfig
@@ -1,6 +1,7 @@
 config MLX5_INFINIBAND
        tristate "Mellanox Connect-IB HCA support"
        depends on NETDEVICES && ETHERNET && PCI && MLX5_CORE
+       select INFINIBAND_USER_ACCESS
        ---help---
          This driver provides low-level InfiniBand support for
          Mellanox Connect-IB PCI Express host channel adapters (HCAs).


Reply via email to