From: Valentine Fatiev <valentinef@nvidia.com>
Subject: [PATCH] BACKPORT: include/linux/mlx5/port.h

Change-Id: Icc1f275d7484cb434072a75bdbef47871908b97b
---
 include/linux/mlx5/port.h | 5 +++++
 1 file changed, 5 insertions(+)

--- a/include/linux/mlx5/port.h
+++ b/include/linux/mlx5/port.h
@@ -33,6 +33,7 @@
 #ifndef __MLX5_PORT_H__
 #define __MLX5_PORT_H__
 
+#include "../../../compat/config.h"
 #include <linux/mlx5/driver.h>
 
 enum mlx5_beacon_duration {
@@ -45,7 +46,9 @@ enum mlx5_module_id {
 	MLX5_MODULE_ID_QSFP             = 0xC,
 	MLX5_MODULE_ID_QSFP_PLUS        = 0xD,
 	MLX5_MODULE_ID_QSFP28           = 0x11,
+#ifdef HAVE_GET_MODULE_EEPROM_BY_PAGE
 	MLX5_MODULE_ID_DSFP		= 0x1B,
+#endif
 };
 
 enum mlx5_an_status {
@@ -225,8 +228,10 @@ void mlx5_query_port_fcs(struct mlx5_cor
 int mlx5_query_module_num(struct mlx5_core_dev *dev, int *module_num);
 int mlx5_query_module_eeprom(struct mlx5_core_dev *dev,
 			     u16 offset, u16 size, u8 *data);
+#ifdef HAVE_GET_MODULE_EEPROM_BY_PAGE
 int mlx5_query_module_eeprom_by_page(struct mlx5_core_dev *dev,
 				     struct mlx5_module_eeprom_query_params *params, u8 *data);
+#endif
 
 int mlx5_query_port_dcbx_param(struct mlx5_core_dev *mdev, u32 *out);
 int mlx5_set_port_dcbx_param(struct mlx5_core_dev *mdev, u32 *in);
