aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/hns/hns_roce_main.c
diff options
context:
space:
mode:
authorYixian Liu <liuyixian@huawei.com>2018-03-09 18:36:29 +0800
committerDoug Ledford <dledford@redhat.com>2018-03-13 16:40:15 -0400
commite088a685eae94a0607b8f7b99949a0e14d748813 (patch)
tree4947e1f377660efd04ca1873861d52acdf5fedfc /drivers/infiniband/hw/hns/hns_roce_main.c
parentRDMA/bnxt_re: Remove an unused variable (diff)
downloadlinux-dev-e088a685eae94a0607b8f7b99949a0e14d748813.tar.xz
linux-dev-e088a685eae94a0607b8f7b99949a0e14d748813.zip
RDMA/hns: Support rq record doorbell for the user space
This patch adds interfaces and definitions to support the rq record doorbell for the user space. Signed-off-by: Yixian Liu <liuyixian@huawei.com> Signed-off-by: Lijun Ou <oulijun@huawei.com> Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com> Signed-off-by: Shaobo Xu <xushaobo2@huawei.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/hns/hns_roce_main.c')
-rw-r--r--drivers/infiniband/hw/hns/hns_roce_main.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/hns/hns_roce_main.c b/drivers/infiniband/hw/hns/hns_roce_main.c
index 8255bb9021b0..d6c9c578dba1 100644
--- a/drivers/infiniband/hw/hns/hns_roce_main.c
+++ b/drivers/infiniband/hw/hns/hns_roce_main.c
@@ -351,6 +351,11 @@ static struct ib_ucontext *hns_roce_alloc_ucontext(struct ib_device *ib_dev,
if (ret)
goto error_fail_uar_alloc;
+ if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_RECORD_DB) {
+ INIT_LIST_HEAD(&context->page_list);
+ mutex_init(&context->page_mutex);
+ }
+
ret = ib_copy_to_udata(udata, &resp, sizeof(resp));
if (ret)
goto error_fail_copy_to_udata;