Skip to content

Commit a07fc0b

Browse files
YueHaibingdledford
authored andcommitted
RDMA/hns: Fix build error
If INFINIBAND_HNS_HIP08 is selected and HNS3 is m, but INFINIBAND_HNS is y, building fails: drivers/infiniband/hw/hns/hns_roce_hw_v2.o: In function `hns_roce_hw_v2_exit': hns_roce_hw_v2.c:(.exit.text+0xd): undefined reference to `hnae3_unregister_client' drivers/infiniband/hw/hns/hns_roce_hw_v2.o: In function `hns_roce_hw_v2_init': hns_roce_hw_v2.c:(.init.text+0xd): undefined reference to `hnae3_register_client' Also if INFINIBAND_HNS_HIP06 is selected and HNS_DSAF is m, but INFINIBAND_HNS is y, building fails: drivers/infiniband/hw/hns/hns_roce_hw_v1.o: In function `hns_roce_v1_reset': hns_roce_hw_v1.c:(.text+0x39fa): undefined reference to `hns_dsaf_roce_reset' hns_roce_hw_v1.c:(.text+0x3a25): undefined reference to `hns_dsaf_roce_reset' Reported-by: Hulk Robot <[email protected]> Fixes: dd74282 ("RDMA/hns: Initialize the PCI device for hip08 RoCE") Fixes: 08805fd ("RDMA/hns: Split hw v1 driver from hns roce driver") Signed-off-by: YueHaibing <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Doug Ledford <[email protected]>
1 parent b7165bd commit a07fc0b

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

drivers/infiniband/hw/hns/Kconfig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# SPDX-License-Identifier: GPL-2.0-only
22
config INFINIBAND_HNS
3-
tristate "HNS RoCE Driver"
3+
bool "HNS RoCE Driver"
44
depends on NET_VENDOR_HISILICON
55
depends on ARM64 || (COMPILE_TEST && 64BIT)
66
---help---
@@ -11,7 +11,7 @@ config INFINIBAND_HNS
1111
To compile HIP06 or HIP08 driver as module, choose M here.
1212

1313
config INFINIBAND_HNS_HIP06
14-
bool "Hisilicon Hip06 Family RoCE support"
14+
tristate "Hisilicon Hip06 Family RoCE support"
1515
depends on INFINIBAND_HNS && HNS && HNS_DSAF && HNS_ENET
1616
---help---
1717
RoCE driver support for Hisilicon RoCE engine in Hisilicon Hip06 and
@@ -21,7 +21,7 @@ config INFINIBAND_HNS_HIP06
2121
module will be called hns-roce-hw-v1
2222

2323
config INFINIBAND_HNS_HIP08
24-
bool "Hisilicon Hip08 Family RoCE support"
24+
tristate "Hisilicon Hip08 Family RoCE support"
2525
depends on INFINIBAND_HNS && PCI && HNS3
2626
---help---
2727
RoCE driver support for Hisilicon RoCE engine in Hisilicon Hip08 SoC.

drivers/infiniband/hw/hns/Makefile

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,8 @@ hns-roce-objs := hns_roce_main.o hns_roce_cmd.o hns_roce_pd.o \
99
hns_roce_ah.o hns_roce_hem.o hns_roce_mr.o hns_roce_qp.o \
1010
hns_roce_cq.o hns_roce_alloc.o hns_roce_db.o hns_roce_srq.o hns_roce_restrack.o
1111

12-
ifdef CONFIG_INFINIBAND_HNS_HIP06
1312
hns-roce-hw-v1-objs := hns_roce_hw_v1.o $(hns-roce-objs)
14-
obj-$(CONFIG_INFINIBAND_HNS) += hns-roce-hw-v1.o
15-
endif
13+
obj-$(CONFIG_INFINIBAND_HNS_HIP06) += hns-roce-hw-v1.o
1614

17-
ifdef CONFIG_INFINIBAND_HNS_HIP08
1815
hns-roce-hw-v2-objs := hns_roce_hw_v2.o hns_roce_hw_v2_dfx.o $(hns-roce-objs)
19-
obj-$(CONFIG_INFINIBAND_HNS) += hns-roce-hw-v2.o
20-
endif
16+
obj-$(CONFIG_INFINIBAND_HNS_HIP08) += hns-roce-hw-v2.o

0 commit comments

Comments
 (0)