From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Emil Tantilov <emil.s.tantilov@intel.com>,
netdev@vger.kernel.org, gospo@redhat.com, sassmann@redhat.com,
Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next 01/11] ixgbe: fix detection of SFP+ capable interfaces
Date: Wed, 14 May 2014 01:54:13 -0700 [thread overview]
Message-ID: <1400057663-4578-2-git-send-email-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <1400057663-4578-1-git-send-email-jeffrey.t.kirsher@intel.com>
From: Emil Tantilov <emil.s.tantilov@intel.com>
In cases where the driver is loaded while there are no SFP+ modules in
the cage the interface was not being detected as SFP capable. To account
for this the driver called identify_sfp in ixgbe_get_settings to make
sure the data is correct. However when there is no SFP+ module in the cage
the driver waits for the I2C reads to time out which can take more than a
second and will cause issues with tools (like net-snmp) that may poll
for that information.
This patch resolves the issue by identifying 82599 based NIC with no PHY
type set as SFP capable which allows the driver to detect the SFP module
when the interface is brought up. As result of this we can also remove the
identify_sfp call from ixgbe_get_settings.
Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 7 -------
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 4 ++++
2 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
index 31d7268..1e701d3 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
@@ -161,13 +161,6 @@ static int ixgbe_get_settings(struct net_device *netdev,
bool autoneg = false;
bool link_up;
- /* SFP type is needed for get_link_capabilities */
- if (hw->phy.media_type & (ixgbe_media_type_fiber |
- ixgbe_media_type_fiber_qsfp)) {
- if (hw->phy.sfp_type == ixgbe_sfp_type_not_present)
- hw->phy.ops.identify_sfp(hw);
- }
-
hw->mac.ops.get_link_capabilities(hw, &supported_link, &autoneg);
/* set the supported link speeds */
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index 8089ea9..e44c42a 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -4660,6 +4660,10 @@ static inline bool ixgbe_is_sfp(struct ixgbe_hw *hw)
case ixgbe_phy_nl:
if (hw->mac.type == ixgbe_mac_82598EB)
return true;
+ /* ixgbe_phy_none is set when no SFP module is present */
+ case ixgbe_phy_none:
+ if (hw->mac.type == ixgbe_mac_82599EB)
+ return true;
default:
return false;
}
--
1.9.0
next prev parent reply other threads:[~2014-05-14 8:54 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-14 8:54 [net-next 00/11][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
2014-05-14 8:54 ` Jeff Kirsher [this message]
2014-05-14 12:26 ` [net-next 01/11] ixgbe: fix detection of SFP+ capable interfaces Sergei Shtylyov
2014-05-14 16:59 ` Tantilov, Emil S
2014-05-14 18:16 ` Sergei Shtylyov
2014-05-14 18:22 ` Tantilov, Emil S
2014-05-14 19:00 ` David Miller
2014-05-14 8:54 ` [net-next 02/11] ixgbe: clean up checkpatch warnings about CODE_INDENT and LEADING_SPACE Jeff Kirsher
2014-05-14 16:25 ` Joe Perches
2014-05-14 20:48 ` Keller, Jacob E
2014-05-14 8:54 ` [net-next 03/11] ixgbe: fix function-like macro, remove semicolon Jeff Kirsher
2014-05-14 8:54 ` [net-next 04/11] ixgbe: fix checkpatch style of blank line after declaration Jeff Kirsher
2014-05-14 8:54 ` [net-next 05/11] ixgbe: fix several concatenated strings to single line Jeff Kirsher
2014-05-14 8:54 ` [net-next 06/11] ixgbe: add braces around else block Jeff Kirsher
2014-05-14 8:54 ` [net-next 07/11] ixgbe: don't check NULL for debugfs_remove_recursive Jeff Kirsher
2014-05-14 8:54 ` [net-next 08/11] ixgbe: add space between operands to & Jeff Kirsher
2014-05-14 8:54 ` [net-next 09/11] ixgbe: add /* fallthrough */ comment to case statements Jeff Kirsher
2014-05-14 8:54 ` [net-next 10/11] igb/ixgbe: remove return statements for void functions Jeff Kirsher
2014-05-14 8:54 ` [net-next 11/11] i40e,igb,ixgbe: remove usless return statements Jeff Kirsher
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=1400057663-4578-2-git-send-email-jeffrey.t.kirsher@intel.com \
--to=jeffrey.t.kirsher@intel.com \
--cc=davem@davemloft.net \
--cc=emil.s.tantilov@intel.com \
--cc=gospo@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=sassmann@redhat.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).