aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/infiniband/hw/mlx4/qp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c
index 2d00b4ee80c0..d10bd888e7c3 100644
--- a/drivers/infiniband/hw/mlx4/qp.c
+++ b/drivers/infiniband/hw/mlx4/qp.c
@@ -1560,7 +1560,10 @@ int mlx4_ib_query_qp(struct ib_qp *ibqp, struct ib_qp_attr *qp_attr, int qp_attr
1560 } 1560 }
1561 1561
1562 qp_attr->pkey_index = context.pri_path.pkey_index & 0x7f; 1562 qp_attr->pkey_index = context.pri_path.pkey_index & 0x7f;
1563 qp_attr->port_num = context.pri_path.sched_queue & 0x40 ? 2 : 1; 1563 if (qp_attr->qp_state == IB_QPS_INIT)
1564 qp_attr->port_num = qp->port;
1565 else
1566 qp_attr->port_num = context.pri_path.sched_queue & 0x40 ? 2 : 1;
1564 1567
1565 /* qp_attr->en_sqd_async_notify is only applicable in modify qp */ 1568 /* qp_attr->en_sqd_async_notify is only applicable in modify qp */
1566 qp_attr->sq_draining = mlx4_state == MLX4_QP_STATE_SQ_DRAINING; 1569 qp_attr->sq_draining = mlx4_state == MLX4_QP_STATE_SQ_DRAINING;