From: Tony Nguyen <anthony.l.nguyen@intel.com>
To: davem@davemloft.net, kuba@kernel.org
Cc: Mateusz Palczewski <mateusz.palczewski@intel.com>,
netdev@vger.kernel.org, anthony.l.nguyen@intel.com,
sassmann@redhat.com,
Aleksandr Loktionov <aleksandr.loktionov@intel.com>,
Karen Sornek <karen.sornek@intel.com>,
Dawid Lukwinski <dawid.lukwinski@intel.com>,
Tony Brelinski <tonyx.brelinski@intel.com>
Subject: [PATCH net 2/4] i40e: Fix autoneg disabling for non-10GBaseT links
Date: Thu, 24 Jun 2021 11:14:32 -0700 [thread overview]
Message-ID: <20210624181434.751511-3-anthony.l.nguyen@intel.com> (raw)
In-Reply-To: <20210624181434.751511-1-anthony.l.nguyen@intel.com>
From: Mateusz Palczewski <mateusz.palczewski@intel.com>
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 <aleksandr.loktionov@intel.com>
Reviewed-by: Karen Sornek <karen.sornek@intel.com>
Signed-off-by: Dawid Lukwinski <dawid.lukwinski@intel.com>
Signed-off-by: Mateusz Palczewski <mateusz.palczewski@intel.com>
Tested-by: Tony Brelinski <tonyx.brelinski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 3 +--
1 file changed, 1 insertion(+), 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;
--
2.26.2
next prev parent reply other threads:[~2021-06-24 18:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-24 18:14 [PATCH net 0/4][pull request] Intel Wired LAN Driver Updates 2021-06-24 Tony Nguyen
2021-06-24 18:14 ` [PATCH net 1/4] i40e: Fix error handling in i40e_vsi_open Tony Nguyen
2021-06-24 18:14 ` Tony Nguyen [this message]
2021-06-24 18:14 ` [PATCH net 3/4] i40e: fix PTP on 5Gb links Tony Nguyen
2021-06-24 18:14 ` [PATCH net 4/4] i40e: Fix missing rtnl locking when setting up pf switch Tony Nguyen
2021-06-24 20:00 ` [PATCH net 0/4][pull request] Intel Wired LAN Driver Updates 2021-06-24 patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210624181434.751511-3-anthony.l.nguyen@intel.com \
--to=anthony.l.nguyen@intel.com \
--cc=aleksandr.loktionov@intel.com \
--cc=davem@davemloft.net \
--cc=dawid.lukwinski@intel.com \
--cc=karen.sornek@intel.com \
--cc=kuba@kernel.org \
--cc=mateusz.palczewski@intel.com \
--cc=netdev@vger.kernel.org \
--cc=sassmann@redhat.com \
--cc=tonyx.brelinski@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).