diff options
author | Xi Wang <wangxi11@huawei.com> | 2020-01-09 20:20:12 +0800 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2020-01-10 11:17:37 -0400 |
commit | 626903e9355bdf8d401fc0ac7e7407862c642710 (patch) | |
tree | 5abc505c557112abb7f420ec8890ce06ea0b5bd0 /drivers/infiniband/hw/hns/hns_roce_cq.c | |
parent | RDMA/hns: Bugfix for posting a wqe with sge (diff) | |
download | linux-dev-626903e9355bdf8d401fc0ac7e7407862c642710.tar.xz linux-dev-626903e9355bdf8d401fc0ac7e7407862c642710.zip |
RDMA/hns: Add support for reporting wc as software mode
When hardware is in resetting stage, we may can't poll back all the
expected work completions as the hardware won't generate cqe anymore.
This patch allows the driver to compose the expected wc instead of the
hardware during resetting stage. Once the hardware finished resetting, we
can poll cq from hardware again.
Link: https://lore.kernel.org/r/1578572412-25756-1-git-send-email-liweihang@huawei.com
Signed-off-by: Xi Wang <wangxi11@huawei.com>
Signed-off-by: Weihang Li <liweihang@huawei.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/hw/hns/hns_roce_cq.c')
-rw-r--r-- | drivers/infiniband/hw/hns/hns_roce_cq.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/hns/hns_roce_cq.c b/drivers/infiniband/hw/hns/hns_roce_cq.c index af1d8823b3f0..61f53a85767b 100644 --- a/drivers/infiniband/hw/hns/hns_roce_cq.c +++ b/drivers/infiniband/hw/hns/hns_roce_cq.c @@ -370,6 +370,8 @@ int hns_roce_create_cq(struct ib_cq *ib_cq, const struct ib_cq_init_attr *attr, hr_cq->buf.size = hr_cq->cq_depth * hr_dev->caps.cq_entry_sz; hr_cq->buf.page_shift = PAGE_SHIFT + hr_dev->caps.cqe_buf_pg_sz; spin_lock_init(&hr_cq->lock); + INIT_LIST_HEAD(&hr_cq->sq_list); + INIT_LIST_HEAD(&hr_cq->rq_list); if (udata) { ret = create_user_cq(hr_dev, hr_cq, udata, &resp); |