aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmil Tantilov <emil.s.tantilov@intel.com>2014-05-15 03:16:53 -0400
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2014-06-04 02:56:16 -0400
commitd9cd46cd391a132a43cbde7bdac12c16284b618f (patch)
treedd4646d953149f2f271b4db31c670e88bcd8525f
parent92ff71b8fe9cd9c673615fc6f3870af7376d7c84 (diff)
ixgbe: fix detection of SFP+ capable interfaces
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 interfaces 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. v2: remove the 82599 specific check since we have 82598 devices that are SFP capable. 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>
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c7
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_main.c2
2 files changed, 2 insertions, 7 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
index cc70de259829..23e4e6a4b4b1 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,
161 bool autoneg = false; 161 bool autoneg = false;
162 bool link_up; 162 bool link_up;
163 163
164 /* SFP type is needed for get_link_capabilities */
165 if (hw->phy.media_type & (ixgbe_media_type_fiber |
166 ixgbe_media_type_fiber_qsfp)) {
167 if (hw->phy.sfp_type == ixgbe_sfp_type_not_present)
168 hw->phy.ops.identify_sfp(hw);
169 }
170
171 hw->mac.ops.get_link_capabilities(hw, &supported_link, &autoneg); 164 hw->mac.ops.get_link_capabilities(hw, &supported_link, &autoneg);
172 165
173 /* set the supported link speeds */ 166 /* 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 ea11e2c8ee8c..e22278a5cbfa 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -4656,6 +4656,8 @@ static inline bool ixgbe_is_sfp(struct ixgbe_hw *hw)
4656 case ixgbe_phy_qsfp_active_unknown: 4656 case ixgbe_phy_qsfp_active_unknown:
4657 case ixgbe_phy_qsfp_intel: 4657 case ixgbe_phy_qsfp_intel:
4658 case ixgbe_phy_qsfp_unknown: 4658 case ixgbe_phy_qsfp_unknown:
4659 /* ixgbe_phy_none is set when no SFP module is present */
4660 case ixgbe_phy_none:
4659 return true; 4661 return true;
4660 case ixgbe_phy_nl: 4662 case ixgbe_phy_nl:
4661 if (hw->mac.type == ixgbe_mac_82598EB) 4663 if (hw->mac.type == ixgbe_mac_82598EB)