提交 9262793e 编写于 作者: M Mateusz Palczewski 提交者: Tony Nguyen

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: 3ce12ee9 ("i40e: Fix order of checks when enabling/disabling autoneg in ethtool")
Reviewed-by: NAleksandr Loktionov <aleksandr.loktionov@intel.com>
Reviewed-by: NKaren Sornek <karen.sornek@intel.com>
Signed-off-by: NDawid Lukwinski <dawid.lukwinski@intel.com>
Signed-off-by: NMateusz Palczewski <mateusz.palczewski@intel.com>
Tested-by: NTony Brelinski <tonyx.brelinski@intel.com>
Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
上级 9c04cfcd
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册