Skip to content

Commit 958c696

Browse files
Jack Morgensteindavem330
authored andcommitted
net/mlx4_core: Save the qpn from the input modifier in RST2INIT wrapper
Function mlx4_RST2INIT_QP_wrapper saved the qp number passed in the qp context, rather than the one passed in the input modifier. However, the qp number in the qp context is not defined as a required parameter by the FW. Therefore, drivers may choose to not specify the qp number in the qp context for the reset-to-init transition. Thus, we must save the qp number passed in the command input modifier -- which is always present. (This saved qp number is used as the input modifier for command 2RST_QP when a slave's qp's are destroyed). Fixes: c82e9aa ("mlx4_core: resource tracking for HCA resources used by guests") Signed-off-by: Jack Morgenstein <[email protected]> Signed-off-by: Tariq Toukan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 18041b5 commit 958c696

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/mellanox/mlx4/resource_tracker.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2958,7 +2958,7 @@ int mlx4_RST2INIT_QP_wrapper(struct mlx4_dev *dev, int slave,
29582958
u32 srqn = qp_get_srqn(qpc) & 0xffffff;
29592959
int use_srq = (qp_get_srqn(qpc) >> 24) & 1;
29602960
struct res_srq *srq;
2961-
int local_qpn = be32_to_cpu(qpc->local_qpn) & 0xffffff;
2961+
int local_qpn = vhcr->in_modifier & 0xffffff;
29622962

29632963
err = adjust_qp_sched_queue(dev, slave, qpc, inbox);
29642964
if (err)

0 commit comments

Comments
 (0)