summaryrefslogtreecommitdiff
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorKamal Heib <kamalheib1@gmail.com>2021-12-20 17:25:30 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-01-27 09:19:40 +0100
commitf88ccfb3f2d9a47fc0d210451da553baeb8fbf55 (patch)
tree969cb6994015104ecc41e75dc24ac327fff6272e /drivers/infiniband
parent38d97204a24b3791f025683106afe4c2d9e4991d (diff)
downloadlinux-f88ccfb3f2d9a47fc0d210451da553baeb8fbf55.tar.gz
linux-f88ccfb3f2d9a47fc0d210451da553baeb8fbf55.tar.bz2
linux-f88ccfb3f2d9a47fc0d210451da553baeb8fbf55.zip
RDMA/cxgb4: Set queue pair state when being queried
[ Upstream commit e375b9c92985e409c4bb95dd43d34915ea7f5e28 ] The API for ib_query_qp requires the driver to set cur_qp_state on return, add the missing set. Fixes: 67bbc05512d8 ("RDMA/cxgb4: Add query_qp support") Link: https://lore.kernel.org/r/20211220152530.60399-1-kamalheib1@gmail.com Signed-off-by: Kamal Heib <kamalheib1@gmail.com> Reviewed-by: Leon Romanovsky <leonro@nvidia.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/hw/cxgb4/qp.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/cxgb4/qp.c b/drivers/infiniband/hw/cxgb4/qp.c
index 3ac08f47a8ce..b3fbafbf6655 100644
--- a/drivers/infiniband/hw/cxgb4/qp.c
+++ b/drivers/infiniband/hw/cxgb4/qp.c
@@ -2469,6 +2469,7 @@ int c4iw_ib_query_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr,
memset(attr, 0, sizeof(*attr));
memset(init_attr, 0, sizeof(*init_attr));
attr->qp_state = to_ib_qp_state(qhp->attr.state);
+ attr->cur_qp_state = to_ib_qp_state(qhp->attr.state);
init_attr->cap.max_send_wr = qhp->attr.sq_num_entries;
init_attr->cap.max_recv_wr = qhp->attr.rq_num_entries;
init_attr->cap.max_send_sge = qhp->attr.sq_max_sges;