diff options
author | Yixian Liu <liuyixian@huawei.com> | 2018-03-09 18:36:29 +0800 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2018-03-13 16:40:15 -0400 |
commit | e088a685eae94a0607b8f7b99949a0e14d748813 (patch) | |
tree | 4947e1f377660efd04ca1873861d52acdf5fedfc /drivers/infiniband/hw/hns/hns_roce_main.c | |
parent | 036ef0a1a867511ff1b4ecb3e5b185267216dab0 (diff) | |
download | linux-e088a685eae94a0607b8f7b99949a0e14d748813.tar.gz linux-e088a685eae94a0607b8f7b99949a0e14d748813.tar.bz2 linux-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.c | 5 |
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; |