diff options
| author | Moshe Shemesh <moshe@nvidia.com> | 2023-11-30 11:30:34 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-01-08 11:29:43 +0100 |
| commit | d07ef3a870647e5e00887e58e0c3458a7cdd9c2b (patch) | |
| tree | a1966f8d33affb94f18a85a34ef187dc7286a1d9 | |
| parent | a46bb28fdbdf0430cc86bf0703002ee95b3bd6a6 (diff) | |
| download | linux-d07ef3a870647e5e00887e58e0c3458a7cdd9c2b.tar.gz linux-d07ef3a870647e5e00887e58e0c3458a7cdd9c2b.tar.bz2 linux-d07ef3a870647e5e00887e58e0c3458a7cdd9c2b.zip | |
net/mlx5: Fix fw tracer first block check
[ Upstream commit 4261edf11cb7c9224af713a102e5616329306932 ]
While handling new traces, to verify it is not the first block being
written, last_timestamp is checked. But instead of checking it is non
zero it is verified to be zero. Fix to verify last_timestamp is not
zero.
Fixes: c71ad41ccb0c ("net/mlx5: FW tracer, events handling")
Signed-off-by: Moshe Shemesh <moshe@nvidia.com>
Reviewed-by: Feras Daoud <ferasda@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
| -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 8bd5b9ab5e15..53775f3cdaf4 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c @@ -688,7 +688,7 @@ static void mlx5_fw_tracer_handle_traces(struct work_struct *work) while (block_timestamp > tracer->last_timestamp) { /* Check block override if it's not the first block */ - if (!tracer->last_timestamp) { + if (tracer->last_timestamp) { u64 *ts_event; /* To avoid block override be the HW in case of buffer * wraparound, the time stamp of the previous block |
