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

Change-Id: I2c999637681fee9cfbab15dabff97b008acf57d7
---
 .../ethernet/mellanox/mlx5/core/mlx5_core.h   | 35 +++++--------------
 1 file changed, 9 insertions(+), 26 deletions(-)

--- a/drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h
@@ -99,30 +99,6 @@ do {								\
 			     __func__, __LINE__, current->pid,	\
 			     ##__VA_ARGS__)
 
-static inline void mlx5_printk(struct mlx5_core_dev *dev, int level, const char *format, ...)
-{
-	struct device *device = dev->device;
-	struct va_format vaf;
-	va_list args;
-
-	if (WARN_ONCE(level < LOGLEVEL_EMERG || level > LOGLEVEL_DEBUG,
-		      "Level %d is out of range, set to default level\n", level))
-		level = LOGLEVEL_DEFAULT;
-
-	va_start(args, format);
-	vaf.fmt = format;
-	vaf.va = &args;
-
-	dev_printk_emit(level, device, "%s %s: %pV", dev_driver_string(device), dev_name(device),
-			&vaf);
-	va_end(args);
-}
-
-#define mlx5_log(__dev, level, format, ...)			\
-	mlx5_printk(__dev, level, "%s:%d:(pid %d): " format,	\
-		    __func__, __LINE__, current->pid,		\
-		    ##__VA_ARGS__)
-
 static inline struct device *mlx5_core_dma_dev(struct mlx5_core_dev *dev)
 {
 	return &dev->pdev->dev;
@@ -342,8 +318,11 @@ void mlx5_dm_cleanup(struct mlx5_core_de
 			    MLX5_CAP_MCAM_FEATURE((mdev), mtpps_fs) &&	\
 			    MLX5_CAP_MCAM_FEATURE((mdev), mtpps_enh_out_per_adj))
 
-int mlx5_firmware_flash(struct mlx5_core_dev *dev, const struct firmware *fw,
-			struct netlink_ext_ack *extack);
+int mlx5_firmware_flash(struct mlx5_core_dev *dev, const struct firmware *fw
+#ifdef HAVE_NETLINK_EXT_ACK
+			, struct netlink_ext_ack *extack
+#endif
+			);
 int mlx5_fw_version_query(struct mlx5_core_dev *dev,
 			  u32 *running_ver, u32 *stored_ver);
 
@@ -462,6 +441,10 @@ void mlx5_uninit_one(struct mlx5_core_de
 void mlx5_pcie_print_link_status(struct mlx5_core_dev *dev);
 void mlx5_unload_one(struct mlx5_core_dev *dev);
 int mlx5_load_one(struct mlx5_core_dev *dev, bool recovery);
+#ifdef HAVE_DEVL_TRAP_GROUPS_REGISTER //forward port
+void mlx5_unload_one_devl_locked(struct mlx5_core_dev *dev);
+int mlx5_load_one_devl_locked(struct mlx5_core_dev *dev, bool recovery);
+#endif
 
 int mlx5_vport_get_other_func_cap(struct mlx5_core_dev *dev, u16 function_id, void *out);
 
