linux/drivers/infiniband/hw/hns
Junxian Huang 07f06e0e5c RDMA/hns: Fix init failure of RoCE VF and HIP08
During device init, a struct for HW stats will be allocated. As HW
stats are not supported for VF and HIP08, currently
hns_roce_alloc_hw_port_stats() returns NULL in this case. However,
ib-core considers the returned NULL pointer as memory allocation
failure and returns ENOMEM, eventually leading to the failure of VF
and HIP08 init.

In the case where the driver does not support the .alloc_hw_port_stats()
ops, ib-core will return EOPNOTSUPP and ignore this error code in the
upper layer function. So for VF and HIP08, just don't set the HW stats
ops to ib-core.

Fixes: 5a87279591 ("RDMA/hns: Support hns HW stats")
Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com>
Link: https://lore.kernel.org/r/20231017125239.164455-8-huangjunxian6@hisilicon.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
2023-10-19 09:49:40 +03:00
..
hns_roce_ah.c RDMA/hns: Add check for SL 2023-10-19 09:49:40 +03:00
hns_roce_alloc.c RDMA/hns: Remove support for HIP06 2022-01-05 15:50:56 -04:00
hns_roce_cmd.c RDMA/hns: Remove similar code that configures the hardware contexts 2022-03-04 17:36:31 -04:00
hns_roce_cmd.h RDMA/hns: Remove similar code that configures the hardware contexts 2022-03-04 17:36:31 -04:00
hns_roce_common.h RDMA/hns: Remove support for HIP06 2022-01-05 15:50:56 -04:00
hns_roce_cq.c RDMA/hns: Unified Log Printing Style 2022-09-27 10:15:25 -03:00
hns_roce_db.c RDMA/hns: Remove support for HIP06 2022-01-05 15:50:56 -04:00
hns_roce_device.h RDMA/hns: Support SRQ record doorbell 2023-10-02 11:47:08 +03:00
hns_roce_hem.c RDMA: Remove unnecessary ternary operators 2023-07-31 15:16:12 +03:00
hns_roce_hem.h RDMA/hns: Remove redundant 'phy_addr' in hns_roce_hem_list_find_mtt() 2022-09-27 10:15:25 -03:00
hns_roce_hw_v2.c RDMA/hns: The UD mode can only be configured with DCQCN 2023-10-19 09:49:40 +03:00
hns_roce_hw_v2.h RDMA/hns: Support hns HW stats 2023-08-19 14:26:34 +03:00
hns_roce_main.c RDMA/hns: Fix init failure of RoCE VF and HIP08 2023-10-19 09:49:40 +03:00
hns_roce_mr.c RDMA/hns: Fix base address table allocation 2023-05-17 16:05:00 -03:00
hns_roce_pd.c RDMA/hns: Remove support for HIP06 2022-01-05 15:50:56 -04:00
hns_roce_qp.c RDMA/hns: Fix uninitialized ucmd in hns_roce_create_qp_common() 2023-10-19 09:49:40 +03:00
hns_roce_restrack.c RDMA/hns: Support SRQ restrack ops for hns driver 2023-09-20 10:51:45 +03:00
hns_roce_srq.c RDMA/hns: Support SRQ record doorbell 2023-10-02 11:47:08 +03:00
Kconfig RDMA/hns: Remove support for HIP06 2022-01-05 15:50:56 -04:00
Makefile RDMA/hns: Remove redundant DFX file and DFX ops structure 2022-08-23 11:34:42 +03:00