RDMA/cxgb4: Set queue pair state when being queried
Subsystems (2)
PATCH 1/1 RDMA/cxgb4: Set queue pair state when being queried
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")
Signed-off-by Kamal Heib <[email protected]>
--- drivers/infiniband/hw/cxgb4/qp.c | 1 + 1 file changed, 1 insertion(+)
drivers/infiniband/hw/cxgb4/qp.c +1 -0
@@ -2460,6 +2460,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;
Signature · 1 line
2.31.1
Quoted 8 lines · Kamal Heib
The API for
ib_query_qprequires the driver to setcur_qp_stateon return, add the missing set.Fixes 67bbc05512d8 ("RDMA/cxgb4: Add query_qp support")Signed-off-by Kamal Heib <[email protected]>--- drivers/infiniband/hw/cxgb4/qp.c | 1 + 1 file changed, 1 insertion(+)
I wonder if this is last error of such type.
The bnxt_re had same error 53839b51a767 ("RDMA/bnxt_re: Set queue pair state when being queried")
Thanks,
Reviewed-by Leon Romanovsky <[email protected]>
Quoted 9 lines · Kamal Heib
The API for
ib_query_qprequires the driver to setcur_qp_stateon return, add the missing set.Fixes 67bbc05512d8 ("RDMA/cxgb4: Add query_qp support")Signed-off-by Kamal Heib <[email protected]>Reviewed-by Leon Romanovsky <[email protected]>--- drivers/infiniband/hw/cxgb4/qp.c | 1 + 1 file changed, 1 insertion(+)
Applied to for-next, thanks
Jason