Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c70bfc1b authored by Liu, Changcheng's avatar Liu, Changcheng Committed by Greg Kroah-Hartman
Browse files

RDMA/i40iw: Set queue pair state when being queried



[ Upstream commit 2e67e775845373905d2c2aecb9062c2c4352a535 ]

The API for ib_query_qp requires the driver to set qp_state and
cur_qp_state on return, add the missing sets.

Fixes: d3749841 ("i40iw: add files for iwarp interface")
Signed-off-by: default avatarChangcheng Liu <changcheng.liu@aliyun.com>
Acked-by: default avatarShiraz Saleem <shiraz.saleem@intel.com>
Reviewed-by: default avatarJason Gunthorpe <jgg@mellanox.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 5bab3a0a
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -812,6 +812,8 @@ static int i40iw_query_qp(struct ib_qp *ibqp,
	struct i40iw_qp *iwqp = to_iwqp(ibqp);
	struct i40iw_sc_qp *qp = &iwqp->sc_qp;

	attr->qp_state = iwqp->ibqp_state;
	attr->cur_qp_state = attr->qp_state;
	attr->qp_access_flags = 0;
	attr->cap.max_send_wr = qp->qp_uk.sq_size;
	attr->cap.max_recv_wr = qp->qp_uk.rq_size;