]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/hns: Fix build error again
authorArnd Bergmann <arnd@arndb.de>
Mon, 7 Oct 2019 21:18:08 +0000 (23:18 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Tue, 29 Oct 2019 19:16:54 +0000 (16:16 -0300)
commit0a1f2466c9bab7399edab1e0349d02f7f1fa1386
tree00977128372a33fa40847b56e3eab312d7a37b8f
parenteec87bcb579eb331cccc221ce74f58504a8923eb
RDMA/hns: Fix build error again

This is not the first attempt to fix building random configurations,
unfortunately the attempt in commit 237c276cb6bc ("RDMA/hns: Fix build
error") caused a new problem when CONFIG_INFINIBAND_HNS_HIP06=m and
CONFIG_INFINIBAND_HNS_HIP08=y:

drivers/infiniband/hw/hns/hns_roce_main.o:(.rodata+0xe60): undefined reference to `__this_module'

Revert commits 237c276cb6bc ("RDMA/hns: Fix build error") and
369aba0dee9b ("RDMA/hns: remove obsolete Kconfig comment") to get back to
the previous state, then fix the issues described there differently, by
adding more specific dependencies: INFINIBAND_HNS can now only be built-in
if at least one of HNS or HNS3 are built-in, and the individual back-ends
are only available if that code is reachable from the main driver.

Fixes: 237c276cb6bc ("RDMA/hns: Fix build error")
Fixes: 369aba0dee9b ("RDMA/hns: remove obsolete Kconfig comment")
Fixes: a15845be310d ("RDMA/hns: Initialize the PCI device for hip08 RoCE")
Fixes: 2724b2daefa7 ("RDMA/hns: Split hw v1 driver from hns roce driver")
Link: https://lore.kernel.org/r/20191007211826.3361202-1-arnd@arndb.de
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/hns/Kconfig
drivers/infiniband/hw/hns/Makefile