diff options
author | Aya Levin <ayal@mellanox.com> | 2019-12-09 14:08:18 +0200 |
---|---|---|
committer | Saeed Mahameed <saeedm@mellanox.com> | 2020-02-18 19:01:19 -0800 |
commit | 5ee090ed0da649b1febae2b7c285ac77d1e55a0c (patch) | |
tree | 2c763a5731f12b2646e5a28ce54d7427a0767f46 /drivers/net/ethernet/mellanox/mlx5/core/en_main.c | |
parent | net/mlx5: Fix sleep while atomic in mlx5_eswitch_get_vepa (diff) | |
download | linux-dev-5ee090ed0da649b1febae2b7c285ac77d1e55a0c.tar.xz linux-dev-5ee090ed0da649b1febae2b7c285ac77d1e55a0c.zip |
net/mlx5e: Reset RQ doorbell counter before moving RQ state from RST to RDY
Initialize RQ doorbell counters to zero prior to moving an RQ from RST
to RDY state. Per HW spec, when RQ is back to RDY state, the descriptor
ID on the completion is reset. The doorbell record must comply.
Fixes: 8276ea1353a4 ("net/mlx5e: Report and recover from CQE with error on RQ")
Signed-off-by: Aya Levin <ayal@mellanox.com>
Reported-by: Tariq Toukan <tariqt@mellanox.com>
Reviewed-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/en_main.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c index 454d3459bd8b..966983674663 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c @@ -712,6 +712,9 @@ int mlx5e_modify_rq_state(struct mlx5e_rq *rq, int curr_state, int next_state) if (!in) return -ENOMEM; + if (curr_state == MLX5_RQC_STATE_RST && next_state == MLX5_RQC_STATE_RDY) + mlx5e_rqwq_reset(rq); + rqc = MLX5_ADDR_OF(modify_rq_in, in, ctx); MLX5_SET(modify_rq_in, in, rq_state, curr_state); |