From: Valentine Fatiev <valentinef@nvidia.com>
Subject: [PATCH] BACKPORT:
 drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.h

Change-Id: If083e704464399126e323f409c46742e74f449ba
---
 .../ethernet/mellanox/mlx5/core/diag/fw_tracer.h    | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

--- a/drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.h
@@ -109,7 +109,11 @@ struct mlx5_fw_tracer {
 	struct work_struct handle_traces_work;
 	struct hlist_head hash[MESSAGE_HASH_SIZE];
 	struct list_head ready_strings_list;
-	struct work_struct update_db_work;
+#ifdef HAVE_CANCEL_WORK_EXPORTED
+	struct work_struct  update_db_work;
+#else
+	struct delayed_work update_db_work;
+#endif
 	struct mutex state_lock; /* Synchronize update work with reload flows */
 	unsigned long state;
 };
@@ -197,9 +201,10 @@ struct mlx5_fw_tracer *mlx5_fw_tracer_cr
 int mlx5_fw_tracer_init(struct mlx5_fw_tracer *tracer);
 void mlx5_fw_tracer_cleanup(struct mlx5_fw_tracer *tracer);
 void mlx5_fw_tracer_destroy(struct mlx5_fw_tracer *tracer);
+int mlx5_fw_tracer_reload(struct mlx5_fw_tracer *tracer);
+#ifdef HAVE_DEVLINK_HEALTH_REPORT_SUPPORT
 int mlx5_fw_tracer_trigger_core_dump_general(struct mlx5_core_dev *dev);
 int mlx5_fw_tracer_get_saved_traces_objects(struct mlx5_fw_tracer *tracer,
-					    struct devlink_fmsg *fmsg);
-int mlx5_fw_tracer_reload(struct mlx5_fw_tracer *tracer);
-
+			    		    struct devlink_fmsg *fmsg);
+#endif /* HAVE_DEVLINK_HEALTH_REPORT_SUPPORT */
 #endif
