mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
RDMA/rxe: Set queue pair cur_qp_state when being queried
[ Upstream commit 775e6d3c8fda41083b16c26d05163fd69f029a62 ] Same with commite375b9c929("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:8700e3e7c4("Soft RoCE driver") Signed-off-by: Liu Jian <liujian56@huawei.com> Link: https://patch.msgid.link/20241031092019.2138467-1-liujian56@huawei.com Reviewed-by: Zhu Yanjun <yanjun.zhu@linux.dev> Signed-off-by: Leon Romanovsky <leon@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
a9b251599b
commit
e435f311c5
@@ -781,6 +781,7 @@ int rxe_qp_to_attr(struct rxe_qp *qp, struct ib_qp_attr *attr, int mask)
|
||||
* Yield the processor
|
||||
*/
|
||||
spin_lock_irqsave(&qp->state_lock, flags);
|
||||
attr->cur_qp_state = qp_state(qp);
|
||||
if (qp->attr.sq_draining) {
|
||||
spin_unlock_irqrestore(&qp->state_lock, flags);
|
||||
cond_resched();
|
||||
|
||||
Reference in New Issue
Block a user