summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShay Drory <shayd@nvidia.com>2023-01-09 15:27:40 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-02-15 17:22:24 +0100
commitfac1fb80088ab9f6cae5a0480236d1d03fcfe002 (patch)
tree3c57f4246a1403bd3af237c3d01fb2cc728cbd8d
parent703c3efa4b0b50a9c6a3726026c0f528857db812 (diff)
downloadlinux-fac1fb80088ab9f6cae5a0480236d1d03fcfe002.tar.gz
linux-fac1fb80088ab9f6cae5a0480236d1d03fcfe002.tar.bz2
linux-fac1fb80088ab9f6cae5a0480236d1d03fcfe002.zip
net/mlx5: fw_tracer, Clear load bit when freeing string DBs buffers
[ Upstream commit db561fed6b8fa3878e74d5df6512a4a38152b63e ] Whenever the driver is reading the string DBs into buffers, the driver is setting the load bit, but the driver never clears this bit. As a result, in case load bit is on and the driver query the device for new string DBs, the driver won't read again the string DBs. Fix it by clearing the load bit when query the device for new string DBs. Fixes: 2d69356752ff ("net/mlx5: Add support for fw live patch event") Signed-off-by: Shay Drory <shayd@nvidia.com> Reviewed-by: Moshe Shemesh <moshe@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.c1
1 files changed, 1 insertions, 0 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 f800e1ca5ba6..76232abfc786 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c
@@ -64,6 +64,7 @@ static int mlx5_query_mtrc_caps(struct mlx5_fw_tracer *tracer)
MLX5_GET(mtrc_cap, out, num_string_trace);
tracer->str_db.num_string_db = MLX5_GET(mtrc_cap, out, num_string_db);
tracer->owner = !!MLX5_GET(mtrc_cap, out, trace_owner);
+ tracer->str_db.loaded = false;
for (i = 0; i < tracer->str_db.num_string_db; i++) {
mtrc_cap_sp = MLX5_ADDR_OF(mtrc_cap, out, string_db_param[i]);