net/mlx5e: ethtool, Remove unsupported SFP EEPROM high pages query
[ Upstream commitace329f4ab
] Querying EEPROM high pages data for SFP module is currently not supported by our driver and yet queried, resulting in invalid FW queries. Set the EEPROM ethtool data length to 256 for SFP module will limit the reading for page 0 only and prevent invalid FW queries. Fixes:bb64143eee
("net/mlx5e: Add ethtool support for dump module EEPROM") Signed-off-by: Erez Alfasi <ereza@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
7962b912d2
commit
50dd67961c
@ -1365,7 +1365,7 @@ static int mlx5e_get_module_info(struct net_device *netdev,
|
|||||||
break;
|
break;
|
||||||
case MLX5_MODULE_ID_SFP:
|
case MLX5_MODULE_ID_SFP:
|
||||||
modinfo->type = ETH_MODULE_SFF_8472;
|
modinfo->type = ETH_MODULE_SFF_8472;
|
||||||
modinfo->eeprom_len = ETH_MODULE_SFF_8472_LEN;
|
modinfo->eeprom_len = MLX5_EEPROM_PAGE_LENGTH;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
netdev_err(priv->netdev, "%s: cable type not recognized:0x%x\n",
|
netdev_err(priv->netdev, "%s: cable type not recognized:0x%x\n",
|
||||||
|
@ -368,10 +368,6 @@ int mlx5_query_module_eeprom(struct mlx5_core_dev *dev,
|
|||||||
size -= offset + size - MLX5_EEPROM_PAGE_LENGTH;
|
size -= offset + size - MLX5_EEPROM_PAGE_LENGTH;
|
||||||
|
|
||||||
i2c_addr = MLX5_I2C_ADDR_LOW;
|
i2c_addr = MLX5_I2C_ADDR_LOW;
|
||||||
if (offset >= MLX5_EEPROM_PAGE_LENGTH) {
|
|
||||||
i2c_addr = MLX5_I2C_ADDR_HIGH;
|
|
||||||
offset -= MLX5_EEPROM_PAGE_LENGTH;
|
|
||||||
}
|
|
||||||
|
|
||||||
MLX5_SET(mcia_reg, in, l, 0);
|
MLX5_SET(mcia_reg, in, l, 0);
|
||||||
MLX5_SET(mcia_reg, in, module, module_num);
|
MLX5_SET(mcia_reg, in, module, module_num);
|
||||||
|
Reference in New Issue
Block a user