Skip to content

Commit 775e6d3

Browse files
liujian56rleon
authored andcommitted
RDMA/rxe: Set queue pair cur_qp_state when being queried
Same with commit e375b9c ("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: 8700e3e ("Soft RoCE driver") Signed-off-by: Liu Jian <[email protected]> Link: https://patch.msgid.link/[email protected] Reviewed-by: Zhu Yanjun <[email protected]> Signed-off-by: Leon Romanovsky <[email protected]>
1 parent 1103579 commit 775e6d3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/infiniband/sw/rxe/rxe_qp.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -775,6 +775,7 @@ int rxe_qp_to_attr(struct rxe_qp *qp, struct ib_qp_attr *attr, int mask)
775775
* Yield the processor
776776
*/
777777
spin_lock_irqsave(&qp->state_lock, flags);
778+
attr->cur_qp_state = qp_state(qp);
778779
if (qp->attr.sq_draining) {
779780
spin_unlock_irqrestore(&qp->state_lock, flags);
780781
cond_resched();

0 commit comments

Comments
 (0)