Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9e19f93f authored by Feras Daoud's avatar Feras Daoud Committed by Greg Kroah-Hartman
Browse files

net/mlx5: Rearm the FW tracer after each tracer event



[ Upstream commit 8bf94e6414c9481bfa28269022688ab445d0081d ]

The current design does not arm the tracer if traces are available before
the tracer string database is fully loaded, leading to an unfunctional tracer.
This fix will rearm the tracer every time the FW triggers tracer event
regardless of the tracer strings database status.

Fixes: c71ad41c ("net/mlx5: FW tracer, events handling")
Signed-off-by: default avatarFeras Daoud <ferasda@nvidia.com>
Signed-off-by: default avatarRoy Novich <royno@nvidia.com>
Reviewed-by: default avatarMoshe Shemesh <moshe@nvidia.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent ab8b2c2d
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -637,6 +637,9 @@ static void mlx5_fw_tracer_handle_traces(struct work_struct *work)
	if (!tracer->owner)
		return;

	if (unlikely(!tracer->str_db.loaded))
		goto arm;

	block_count = tracer->buff.size / TRACER_BLOCK_SIZE_BYTE;
	start_offset = tracer->buff.consumer_index * TRACER_BLOCK_SIZE_BYTE;

@@ -694,6 +697,7 @@ static void mlx5_fw_tracer_handle_traces(struct work_struct *work)
						      &tmp_trace_block[TRACES_PER_BLOCK - 1]);
	}

arm:
	mlx5_fw_tracer_arm(dev);
}

@@ -935,7 +939,6 @@ void mlx5_fw_tracer_event(struct mlx5_core_dev *dev, struct mlx5_eqe *eqe)
			queue_work(tracer->work_queue, &tracer->ownership_change_work);
		break;
	case MLX5_TRACER_SUBTYPE_TRACES_AVAILABLE:
		if (likely(tracer->str_db.loaded))
		queue_work(tracer->work_queue, &tracer->handle_traces_work);
		break;
	default: