diff options
author | Yixian Liu <liuyixian@huawei.com> | 2018-08-02 10:38:05 +0800 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2018-08-02 20:03:25 -0600 |
commit | 0425e3e6e0c7f92f2c2a396d902871b7a81da0eb (patch) | |
tree | 594792579c94790180b2afec208bc46c6d7a86ee /drivers/infiniband/hw/hns/hns_roce_db.c | |
parent | 75da96067ade4e7854379ec2f7834f3497652b1a (diff) | |
download | linux-0425e3e6e0c7f92f2c2a396d902871b7a81da0eb.tar.gz |
RDMA/hns: Support flush cqe for hip08 in kernel space
According to IB protocol, there are some cases that work requests must
return the flush error completion status through the completion queue. Due
to hardware limitation, the driver needs to assist the flush process.
This patch adds the support of flush cqe for hip08 in the cases that
needed, such as poll cqe, post send, post recv and aeqe handle.
The patch also considered the compatibility between kernel and user space.
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_db.c')
-rw-r--r-- | drivers/infiniband/hw/hns/hns_roce_db.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/hns/hns_roce_db.c b/drivers/infiniband/hw/hns/hns_roce_db.c index ebee2782a573..e2f93c1ce86a 100644 --- a/drivers/infiniband/hw/hns/hns_roce_db.c +++ b/drivers/infiniband/hw/hns/hns_roce_db.c @@ -41,6 +41,8 @@ int hns_roce_db_map_user(struct hns_roce_ucontext *context, unsigned long virt, found: db->dma = sg_dma_address(page->umem->sg_head.sgl) + (virt & ~PAGE_MASK); + page->umem->sg_head.sgl->offset = virt & ~PAGE_MASK; + db->virt_addr = sg_virt(page->umem->sg_head.sgl); db->u.user_page = page; refcount_inc(&page->refcount); |