aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMateusz Palczewski <[email protected]>2021-03-10 11:12:54 +0000
committerTony Nguyen <[email protected]>2021-06-24 10:23:57 -0700
commit9262793e59f0423437166a879a73d056b1fe6f9a (patch)
tree86fbb5c479cdfb592d4fa65fd8f0d70bc4aa2546
parent9c04cfcd4aad232e36306cdc5c74cd9fc9148a7e (diff)
i40e: Fix autoneg disabling for non-10GBaseT links
Disabling autonegotiation was allowed only for 10GBaseT PHY. The condition was changed to check if link media type is BaseT. Fixes: 3ce12ee9d8f9 ("i40e: Fix order of checks when enabling/disabling autoneg in ethtool") Reviewed-by: Aleksandr Loktionov <[email protected]> Reviewed-by: Karen Sornek <[email protected]> Signed-off-by: Dawid Lukwinski <[email protected]> Signed-off-by: Mateusz Palczewski <[email protected]> Tested-by: Tony Brelinski <[email protected]> Signed-off-by: Tony Nguyen <[email protected]>
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_ethtool.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
index ccd5b9486ea9..3e822bad4851 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
@@ -1262,8 +1262,7 @@ static int i40e_set_link_ksettings(struct net_device *netdev,
if (ethtool_link_ksettings_test_link_mode(&safe_ks,
supported,
Autoneg) &&
- hw->phy.link_info.phy_type !=
- I40E_PHY_TYPE_10GBASE_T) {
+ hw->phy.media_type != I40E_MEDIA_TYPE_BASET) {
netdev_info(netdev, "Autoneg cannot be disabled on this phy\n");
err = -EINVAL;
goto done;