diff options
author | Leon Romanovsky <leonro@mellanox.com> | 2020-06-02 15:55:47 +0300 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2020-06-03 15:45:02 -0300 |
commit | 92cd667c0e8a67de024134be0a6f0bdb320606a8 (patch) | |
tree | 3969875d42da00b316e37da8c7b7bd80a1640d4b /drivers/infiniband | |
parent | 6512f11d386c7cf83a48e71cfd7c7c1b0003c151 (diff) | |
download | linux-92cd667c0e8a67de024134be0a6f0bdb320606a8.tar.gz |
RDMA/mlx5: Don't rely on FW to set zeros in ECE response
The FW returns zeros in case feature is not enabled, but it is better to
have the capability check and ensure that returned result is cleared.
Fixes: 3e09a427ae7a ("RDMA/mlx5: Get ECE options from FW during create QP")
Link: https://lore.kernel.org/r/20200602125548.172654-3-leon@kernel.org
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/hw/mlx5/qp.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/mlx5/qp.c b/drivers/infiniband/hw/mlx5/qp.c index 9f0b7f1908da..18135f908971 100644 --- a/drivers/infiniband/hw/mlx5/qp.c +++ b/drivers/infiniband/hw/mlx5/qp.c @@ -1906,7 +1906,8 @@ static int create_xrc_tgt_qp(struct mlx5_ib_dev *dev, struct mlx5_ib_qp *qp, base->container_mibqp = qp; base->mqp.event = mlx5_ib_qp_event; - params->resp.ece_options = MLX5_GET(create_qp_out, out, ece); + if (MLX5_CAP_GEN(mdev, ece_support)) + params->resp.ece_options = MLX5_GET(create_qp_out, out, ece); spin_lock_irqsave(&dev->reset_flow_resource_lock, flags); list_add_tail(&qp->qps_list, &dev->qp_list); @@ -2082,7 +2083,8 @@ static int create_user_qp(struct mlx5_ib_dev *dev, struct ib_pd *pd, base->container_mibqp = qp; base->mqp.event = mlx5_ib_qp_event; - params->resp.ece_options = MLX5_GET(create_qp_out, out, ece); + if (MLX5_CAP_GEN(mdev, ece_support)) + params->resp.ece_options = MLX5_GET(create_qp_out, out, ece); get_cqs(qp->type, init_attr->send_cq, init_attr->recv_cq, &send_cq, &recv_cq); |