summaryrefslogtreecommitdiff
path: root/drivers/infiniband/hw/mana/qp.c
diff options
context:
space:
mode:
authorLong Li <longli@microsoft.com>2023-12-15 18:04:14 -0800
committerLeon Romanovsky <leon@kernel.org>2023-12-20 10:25:40 +0200
commit2c20e20b22d9fc64072e3445ae3ca244cbd523a2 (patch)
treedb8fdcf452c759183bfe9f9d7c5d4e3d17de7dea /drivers/infiniband/hw/mana/qp.c
parenta7f0636d223ca9d074eb5b4ae71425e082c5c1e1 (diff)
RDMA/mana_ib: query device capabilities
With RDMA device registered, use it to query on hardware capabilities and cache this information for future query requests to the driver. Signed-off-by: Long Li <longli@microsoft.com> Link: https://lore.kernel.org/r/1702692255-23640-3-git-send-email-longli@linuxonhyperv.com Signed-off-by: Leon Romanovsky <leon@kernel.org>
Diffstat (limited to 'drivers/infiniband/hw/mana/qp.c')
-rw-r--r--drivers/infiniband/hw/mana/qp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/mana/qp.c b/drivers/infiniband/hw/mana/qp.c
index ae45d28eef5e..4667b18ec1dd 100644
--- a/drivers/infiniband/hw/mana/qp.c
+++ b/drivers/infiniband/hw/mana/qp.c
@@ -130,7 +130,7 @@ static int mana_ib_create_qp_rss(struct ib_qp *ibqp, struct ib_pd *pd,
return ret;
}
- if (attr->cap.max_recv_wr > MAX_SEND_BUFFERS_PER_QUEUE) {
+ if (attr->cap.max_recv_wr > mdev->adapter_caps.max_qp_wr) {
ibdev_dbg(&mdev->ib_dev,
"Requested max_recv_wr %d exceeding limit\n",
attr->cap.max_recv_wr);
@@ -296,7 +296,7 @@ static int mana_ib_create_qp_raw(struct ib_qp *ibqp, struct ib_pd *ibpd,
if (port < 1 || port > mc->num_ports)
return -EINVAL;
- if (attr->cap.max_send_wr > MAX_SEND_BUFFERS_PER_QUEUE) {
+ if (attr->cap.max_send_wr > mdev->adapter_caps.max_qp_wr) {
ibdev_dbg(&mdev->ib_dev,
"Requested max_send_wr %d exceeding limit\n",
attr->cap.max_send_wr);