net/mlx5e: Add ethtool support for dump module EEPROM
Add query MCIA, PMLP registers infrastructure and commands. Add ethtool support for get_module_info() and get_module_eeprom() callbacks. Signed-off-by: Gal Pressman <galp@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
da54d24ec3
commit
bb64143eee
@@ -40,6 +40,19 @@ enum mlx5_beacon_duration {
|
||||
MLX5_BEACON_DURATION_INF = 0xffff,
|
||||
};
|
||||
|
||||
enum mlx5_module_id {
|
||||
MLX5_MODULE_ID_SFP = 0x3,
|
||||
MLX5_MODULE_ID_QSFP = 0xC,
|
||||
MLX5_MODULE_ID_QSFP_PLUS = 0xD,
|
||||
MLX5_MODULE_ID_QSFP28 = 0x11,
|
||||
};
|
||||
|
||||
#define MLX5_EEPROM_MAX_BYTES 32
|
||||
#define MLX5_EEPROM_IDENTIFIER_BYTE_MASK 0x000000ff
|
||||
#define MLX5_I2C_ADDR_LOW 0x50
|
||||
#define MLX5_I2C_ADDR_HIGH 0x51
|
||||
#define MLX5_EEPROM_PAGE_LENGTH 256
|
||||
|
||||
int mlx5_set_port_caps(struct mlx5_core_dev *dev, u8 port_num, u32 caps);
|
||||
int mlx5_query_port_ptys(struct mlx5_core_dev *dev, u32 *ptys,
|
||||
int ptys_size, int proto_mask, u8 local_port);
|
||||
@@ -93,5 +106,7 @@ int mlx5_query_port_wol(struct mlx5_core_dev *mdev, u8 *wol_mode);
|
||||
int mlx5_set_port_fcs(struct mlx5_core_dev *mdev, u8 enable);
|
||||
void mlx5_query_port_fcs(struct mlx5_core_dev *mdev, bool *supported,
|
||||
bool *enabled);
|
||||
int mlx5_query_module_eeprom(struct mlx5_core_dev *dev,
|
||||
u16 offset, u16 size, u8 *data);
|
||||
|
||||
#endif /* __MLX5_PORT_H__ */
|
||||
|
Reference in New Issue
Block a user