net/mlx5e: Fix SFF 8472 eeprom length
authorEran Ben Elisha <eranbe@mellanox.com>
Thu, 5 Dec 2019 08:30:22 +0000 (10:30 +0200)
committerSaeed Mahameed <saeedm@mellanox.com>
Thu, 5 Dec 2019 21:02:11 +0000 (13:02 -0800)
SFF 8472 eeprom length is 512 bytes. Fix module info return value to
support 512 bytes read.

Fixes: ace329f4ab3b ("net/mlx5e: ethtool, Remove unsupported SFP EEPROM high pages query")
Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com>
Reviewed-by: Aya Levin <ayal@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c

index 95601269fa2eff5a8dcc2f68c754c11573dee745..d5d80be1a6c799c8ceceeaaa7e482e5fa2cc7137 100644 (file)
@@ -1643,7 +1643,7 @@ static int mlx5e_get_module_info(struct net_device *netdev,
                break;
        case MLX5_MODULE_ID_SFP:
                modinfo->type       = ETH_MODULE_SFF_8472;
-               modinfo->eeprom_len = MLX5_EEPROM_PAGE_LENGTH;
+               modinfo->eeprom_len = ETH_MODULE_SFF_8472_LEN;
                break;
        default:
                netdev_err(priv->netdev, "%s: cable type not recognized:0x%x\n",