net/mlx5e: Fix wrong error code return on FEC query failure
Advertised and configured FEC query failure resulted in printing
wrong error code.
Fixes: 6cfa946050
("net/mlx5e: Ethtool driver callback for query/set FEC policy")
Signed-off-by: Shay Agroskin <shayag@mellanox.com>
Reported-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
This commit is contained in:
parent
e8c8b53cca
commit
2eb1e42551
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue