Commit 9c26a1d0 authored by Krzysztof Olędzki's avatar Krzysztof Olędzki Committed by Jakub Kicinski

net/mlx4: Add support for EEPROM high pages query for QSFP/QSFP+/QSFP28

Enable reading additional EEPROM information from high pages such as
thresholds and alarms on QSFP/QSFP+/QSFP28 modules.

"This is similar to commit a708fb7b ("net/mlx5e: ethtool, Add
support for EEPROM high pages query") but given all the required logic
already exists in mlx4_qsfp_eeprom_params_set() only s/_LEN/MAX_LEN/ is
needed.
Tested-by: default avatarDan Merillat <git@dan.merillat.org>
Signed-off-by: default avatarKrzysztof Piotr Oledzki <ole@ans.pl>
Reviewed-by: default avatarIdo Schimmel <idosch@nvidia.com>
Link: https://patch.msgid.link/b17c5336-6dc3-41f2-afa6-f9e79231f224@ans.plSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 990c3049
...@@ -2036,20 +2036,20 @@ static int mlx4_en_get_module_info(struct net_device *dev, ...@@ -2036,20 +2036,20 @@ static int mlx4_en_get_module_info(struct net_device *dev,
switch (data[0] /* identifier */) { switch (data[0] /* identifier */) {
case MLX4_MODULE_ID_QSFP: case MLX4_MODULE_ID_QSFP:
modinfo->type = ETH_MODULE_SFF_8436; modinfo->type = ETH_MODULE_SFF_8436;
modinfo->eeprom_len = ETH_MODULE_SFF_8436_LEN; modinfo->eeprom_len = ETH_MODULE_SFF_8436_MAX_LEN;
break; break;
case MLX4_MODULE_ID_QSFP_PLUS: case MLX4_MODULE_ID_QSFP_PLUS:
if (data[1] >= 0x3) { /* revision id */ if (data[1] >= 0x3) { /* revision id */
modinfo->type = ETH_MODULE_SFF_8636; modinfo->type = ETH_MODULE_SFF_8636;
modinfo->eeprom_len = ETH_MODULE_SFF_8636_LEN; modinfo->eeprom_len = ETH_MODULE_SFF_8636_MAX_LEN;
} else { } else {
modinfo->type = ETH_MODULE_SFF_8436; modinfo->type = ETH_MODULE_SFF_8436;
modinfo->eeprom_len = ETH_MODULE_SFF_8436_LEN; modinfo->eeprom_len = ETH_MODULE_SFF_8436_MAX_LEN;
} }
break; break;
case MLX4_MODULE_ID_QSFP28: case MLX4_MODULE_ID_QSFP28:
modinfo->type = ETH_MODULE_SFF_8636; modinfo->type = ETH_MODULE_SFF_8636;
modinfo->eeprom_len = ETH_MODULE_SFF_8636_LEN; modinfo->eeprom_len = ETH_MODULE_SFF_8636_MAX_LEN;
break; break;
case MLX4_MODULE_ID_SFP: case MLX4_MODULE_ID_SFP:
modinfo->type = ETH_MODULE_SFF_8472; modinfo->type = ETH_MODULE_SFF_8472;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment