diff options
author | Kamal Heib <kamalh@mellanox.com> | 2017-01-18 15:25:09 +0200 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2017-02-14 11:40:56 -0500 |
commit | 7c16f47779498650e9f11a395f8d63accedf35a3 (patch) | |
tree | 21c02cf59c555caad681d41d69e1f4bcbda51caf /drivers/infiniband/hw/mlx5/qp.c | |
parent | 1ffd3a26f890222e49c4f4782763e2063026b611 (diff) | |
download | talos-obmc-linux-7c16f47779498650e9f11a395f8d63accedf35a3.tar.gz talos-obmc-linux-7c16f47779498650e9f11a395f8d63accedf35a3.zip |
IB/mlx5: Expose Q counters groups only if they are supported by FW
This patch modify the Q counters implementation, so each one of the
three Q counters groups will be exposed by the driver only if they are
supported by the firmware.
Signed-off-by: Kamal Heib <kamalh@mellanox.com>
Reviewed-by: Mark Bloch <markb@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/mlx5/qp.c')
-rw-r--r-- | drivers/infiniband/hw/mlx5/qp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/mlx5/qp.c b/drivers/infiniband/hw/mlx5/qp.c index e22d9572ae8f..5c7d655655bb 100644 --- a/drivers/infiniband/hw/mlx5/qp.c +++ b/drivers/infiniband/hw/mlx5/qp.c @@ -2784,7 +2784,7 @@ static int __mlx5_ib_modify_qp(struct ib_qp *ibqp, qp->port) - 1; mibport = &dev->port[port_num]; context->qp_counter_set_usr_page |= - cpu_to_be32((u32)(mibport->q_cnt_id) << 24); + cpu_to_be32((u32)(mibport->q_cnts.set_id) << 24); } if (!ibqp->uobject && cur_state == IB_QPS_RESET && new_state == IB_QPS_INIT) @@ -2812,7 +2812,7 @@ static int __mlx5_ib_modify_qp(struct ib_qp *ibqp, raw_qp_param.operation = op; if (cur_state == IB_QPS_RESET && new_state == IB_QPS_INIT) { - raw_qp_param.rq_q_ctr_id = mibport->q_cnt_id; + raw_qp_param.rq_q_ctr_id = mibport->q_cnts.set_id; raw_qp_param.set_mask |= MLX5_RAW_QP_MOD_SET_RQ_Q_CTR_ID; } |