Skip to contentSkip to conversation

i40e: Fix autoneg disabling for non-10GBaseT links

PATCH New Mateusz Palczewski 2 participants 2 messages Mar 10, 2021 – Mar 11, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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")
---
 drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/ethernet/intel/i40e/i40e_ethtool.c +1 -2
index 45f5dc2..9c1a0f7 100644
@@ -1253,8 +1253,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;
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/1 i40e: Fix autoneg disabling for non-10GBaseT links

Quoted 5 lines · Mateusz Palczewski

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")

This is missing a space after the hash

Quoted 4 lines