aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/hns/hns_roce_main.c
diff options
context:
space:
mode:
authorYixian Liu <liuyixian@huawei.com>2018-10-05 17:53:24 +0800
committerJason Gunthorpe <jgg@mellanox.com>2018-10-16 00:17:08 -0600
commit68a997c5d28c581ae23594eb8a1420d834c30d24 (patch)
tree802dbfe91c2a714844365f5eff74e49de1ef6428 /drivers/infiniband/hw/hns/hns_roce_main.c
parentRDMA/bnxt_re: Avoid resource leak in case the NQ registration fails (diff)
downloadlinux-dev-68a997c5d28c581ae23594eb8a1420d834c30d24.tar.xz
linux-dev-68a997c5d28c581ae23594eb8a1420d834c30d24.zip
RDMA/hns: Add FRMR support for hip08
This patch adds fast register physical memory region (FRMR) support for hip08. Signed-off-by: Yixian Liu <liuyixian@huawei.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/hw/hns/hns_roce_main.c')
-rw-r--r--drivers/infiniband/hw/hns/hns_roce_main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/hns/hns_roce_main.c b/drivers/infiniband/hw/hns/hns_roce_main.c
index 7e693b11c823..1b3ee514f2ef 100644
--- a/drivers/infiniband/hw/hns/hns_roce_main.c
+++ b/drivers/infiniband/hw/hns/hns_roce_main.c
@@ -535,6 +535,12 @@ static int hns_roce_register_device(struct hns_roce_dev *hr_dev)
(1ULL << IB_USER_VERBS_CMD_DEALLOC_MW);
}
+ /* FRMR */
+ if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_FRMR) {
+ ib_dev->alloc_mr = hns_roce_alloc_mr;
+ ib_dev->map_mr_sg = hns_roce_map_mr_sg;
+ }
+
/* OTHERS */
ib_dev->get_port_immutable = hns_roce_port_immutable;
ib_dev->disassociate_ucontext = hns_roce_disassociate_ucontext;