linux-stable/drivers/net/ethernet/mellanox
Vladyslav Tarasiuk db825feefc net/mlx4: Fix EEPROM dump support
Fix SFP and QSFP* EEPROM queries by setting i2c_address, offset and page
number correctly. For SFP set the following params:
- I2C address for offsets 0-255 is 0x50. For 256-511 - 0x51.
- Page number is zero.
- Offset is 0-255.

At the same time, QSFP* parameters are different:
- I2C address is always 0x50.
- Page number is not limited to zero.
- Offset is 0-255 for page zero and 128-255 for others.

To set parameters accordingly to cable used, implement function to query
module ID and implement respective helper functions to set parameters
correctly.

Fixes: 135dd9594f ("net/mlx4_en: ethtool, Remove unsupported SFP EEPROM high pages query")
Signed-off-by: Vladyslav Tarasiuk <vladyslavt@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-05-10 14:34:39 -07:00
..
mlx4 net/mlx4: Fix EEPROM dump support 2021-05-10 14:34:39 -07:00
mlx5/core RDMA merge window pull request 2021-05-01 09:15:05 -07:00
mlxfw net/mlxfw: Use kzalloc for allocating only one thing 2021-01-05 16:01:02 -08:00
mlxsw Networking fixes for 5.13-rc1, including fixes from bpf, can 2021-05-08 08:31:46 -07:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile