diff options
author | Selvin Xavier <selvin.xavier@broadcom.com> | 2023-06-13 21:12:22 +0300 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2023-06-21 20:13:17 +0300 |
commit | 0ac20faf5d837b59fb4c041ea320932ed47fd67f (patch) | |
tree | 8b12469954ba74d0743c0bb5146514144490ac12 /drivers/infiniband/hw/bnxt_re/qplib_sp.c | |
parent | 3fe9882fbb50eeb724504df5979e9140f8842f76 (diff) | |
download | linux-0ac20faf5d837b59fb4c041ea320932ed47fd67f.tar.xz |
RDMA/bnxt_re: Reorg the bar mapping
Reorganize the code for allocation and mapping of Doorbell
pages. Implements new HW command to get the BAR length used by L2
driver. These changes are used by the future patch which maps the WC
Doorbell pages.
Also, introduced a new lock dpi_tbl_lock for synchronize the DB page
allocation from users.
Link: https://lore.kernel.org/r/1686679943-17117-7-git-send-email-selvin.xavier@broadcom.com
Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/infiniband/hw/bnxt_re/qplib_sp.c')
-rw-r--r-- | drivers/infiniband/hw/bnxt_re/qplib_sp.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/bnxt_re/qplib_sp.c b/drivers/infiniband/hw/bnxt_re/qplib_sp.c index 910d17ddcf13..d5ad0861c537 100644 --- a/drivers/infiniband/hw/bnxt_re/qplib_sp.c +++ b/drivers/infiniband/hw/bnxt_re/qplib_sp.c @@ -170,6 +170,9 @@ int bnxt_qplib_get_dev_attr(struct bnxt_qplib_rcfw *rcfw, attr->tqm_alloc_reqs[i * 4 + 3] = *(++tqm_alloc); } + if (rcfw->res->cctx->hwrm_intf_ver >= HWRM_VERSION_DEV_ATTR_MAX_DPI) + attr->max_dpi = le32_to_cpu(sb->max_dpi); + attr->is_atomic = bnxt_qplib_is_atomic_cap(rcfw); bail: bnxt_qplib_rcfw_free_sbuf(rcfw, sbuf); |