diff options
author | Shay Drory <shayd@nvidia.com> | 2023-01-25 17:39:36 +0200 |
---|---|---|
committer | Saeed Mahameed <saeedm@nvidia.com> | 2023-02-07 19:01:06 -0800 |
commit | 184e1e4474dbcfebc4dbd1fa823a329978f25506 (patch) | |
tree | 21bc77a863336d3c06caa078e88d1747994f7a2a | |
parent | db561fed6b8fa3878e74d5df6512a4a38152b63e (diff) | |
download | linux-stable-184e1e4474dbcfebc4dbd1fa823a329978f25506.tar.gz linux-stable-184e1e4474dbcfebc4dbd1fa823a329978f25506.tar.bz2 linux-stable-184e1e4474dbcfebc4dbd1fa823a329978f25506.zip |
net/mlx5: fw_tracer, Zero consumer index when reloading the tracer
When tracer is reloaded, the device will log the traces at the
beginning of the log buffer. Also, driver is reading the log buffer in
chunks in accordance to the consumer index.
Hence, zero consumer index when reloading the tracer.
Fixes: 4383cfcc65e7 ("net/mlx5: Add devlink reload")
Signed-off-by: Shay Drory <shayd@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c b/drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c index d82e98a0cdfa..5b05b884b5fb 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c @@ -757,6 +757,7 @@ static int mlx5_fw_tracer_set_mtrc_conf(struct mlx5_fw_tracer *tracer) if (err) mlx5_core_warn(dev, "FWTracer: Failed to set tracer configurations %d\n", err); + tracer->buff.consumer_index = 0; return err; } @@ -821,7 +822,6 @@ static void mlx5_fw_tracer_ownership_change(struct work_struct *work) mlx5_core_dbg(tracer->dev, "FWTracer: ownership changed, current=(%d)\n", tracer->owner); if (tracer->owner) { tracer->owner = false; - tracer->buff.consumer_index = 0; return; } |