diff options
author | Xi Wang <wangxi11@huawei.com> | 2021-06-01 12:57:07 +0300 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2021-06-16 21:26:22 +0300 |
commit | 61b460d10094f5d8e243276f72ece12fc8324dcf (patch) | |
tree | e6b64cb7610fd010693488f65765115b18ca43a9 /drivers/infiniband/hw/hns/hns_roce_qp.c | |
parent | 7ce6095e3bff8e20ce018b050960b527e298f7df (diff) | |
download | linux-61b460d10094f5d8e243276f72ece12fc8324dcf.tar.xz |
RDMA/hns: Support getting max QP number from firmware
All functions of HIP09's ROCEE share on-chip resources for all QPs, the
driver needs configure the resource index and number for each function
during the init stage.
Link: https://lore.kernel.org/r/1622541427-42193-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@nvidia.com>
Diffstat (limited to 'drivers/infiniband/hw/hns/hns_roce_qp.c')
-rw-r--r-- | drivers/infiniband/hw/hns/hns_roce_qp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/hns/hns_roce_qp.c b/drivers/infiniband/hw/hns/hns_roce_qp.c index 3a018a308a60..47688e7910fe 100644 --- a/drivers/infiniband/hw/hns/hns_roce_qp.c +++ b/drivers/infiniband/hw/hns/hns_roce_qp.c @@ -379,7 +379,7 @@ void hns_roce_qp_remove(struct hns_roce_dev *hr_dev, struct hns_roce_qp *hr_qp) list_del(&hr_qp->rq_node); xa_lock_irqsave(xa, flags); - __xa_erase(xa, hr_qp->qpn & (hr_dev->caps.num_qps - 1)); + __xa_erase(xa, hr_qp->qpn); xa_unlock_irqrestore(xa, flags); } |