aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShay Agroskin <shayag@mellanox.com>2018-12-09 05:00:13 -0500
committerSaeed Mahameed <saeedm@mellanox.com>2019-01-18 19:15:30 -0500
commit2eb1e42551a8128d9182480dfaea52fa861e26e8 (patch)
tree4279be889290b590c7a5c1451b658a75e6b455ba
parente8c8b53ccaff568fef4c13a6ccaf08bf241aa01a (diff)
net/mlx5e: Fix wrong error code return on FEC query failure
Advertised and configured FEC query failure resulted in printing wrong error code. Fixes: 6cfa94605091 ("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>
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
index c9df08133718..3bbccead2f63 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
@@ -844,9 +844,12 @@ int mlx5e_ethtool_get_link_ksettings(struct mlx5e_priv *priv,
844 ethtool_link_ksettings_add_link_mode(link_ksettings, supported, 844 ethtool_link_ksettings_add_link_mode(link_ksettings, supported,
845 Autoneg); 845 Autoneg);
846 846
847 if (get_fec_supported_advertised(mdev, link_ksettings)) 847 err = get_fec_supported_advertised(mdev, link_ksettings);
848 if (err) {
848 netdev_dbg(priv->netdev, "%s: FEC caps query failed: %d\n", 849 netdev_dbg(priv->netdev, "%s: FEC caps query failed: %d\n",
849 __func__, err); 850 __func__, err);
851 err = 0; /* don't fail caps query because of FEC error */
852 }
850 853
851 if (!an_disable_admin) 854 if (!an_disable_admin)
852 ethtool_link_ksettings_add_link_mode(link_ksettings, 855 ethtool_link_ksettings_add_link_mode(link_ksettings,