Commit 2eb1e425 authored by Shay Agroskin's avatar Shay Agroskin Committed by Saeed Mahameed

net/mlx5e: Fix wrong error code return on FEC query failure

Advertised and configured FEC query failure resulted in printing
wrong error code.

Fixes: 6cfa9460 ("net/mlx5e: Ethtool driver callback for query/set FEC policy")
Signed-off-by: default avatarShay Agroskin <shayag@mellanox.com>
Reported-by: default avatarOr Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
parent e8c8b53c
......@@ -844,9 +844,12 @@ int mlx5e_ethtool_get_link_ksettings(struct mlx5e_priv *priv,
ethtool_link_ksettings_add_link_mode(link_ksettings, supported,
Autoneg);
if (get_fec_supported_advertised(mdev, link_ksettings))
err = get_fec_supported_advertised(mdev, link_ksettings);
if (err) {
netdev_dbg(priv->netdev, "%s: FEC caps query failed: %d\n",
__func__, err);
err = 0; /* don't fail caps query because of FEC error */
}
if (!an_disable_admin)
ethtool_link_ksettings_add_link_mode(link_ksettings,
......
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