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

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 <>
Reported-by: default avatarOr Gerlitz <>
Signed-off-by: default avatarSaeed Mahameed <>
parent e8c8b53c
...@@ -844,9 +844,12 @@ int mlx5e_ethtool_get_link_ksettings(struct mlx5e_priv *priv, ...@@ -844,9 +844,12 @@ int mlx5e_ethtool_get_link_ksettings(struct mlx5e_priv *priv,
ethtool_link_ksettings_add_link_mode(link_ksettings, supported, ethtool_link_ksettings_add_link_mode(link_ksettings, supported,
Autoneg); 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", netdev_dbg(priv->netdev, "%s: FEC caps query failed: %d\n",
__func__, err); __func__, err);
err = 0; /* don't fail caps query because of FEC error */
if (!an_disable_admin) if (!an_disable_admin)
ethtool_link_ksettings_add_link_mode(link_ksettings, ethtool_link_ksettings_add_link_mode(link_ksettings,
Supports Markdown
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