From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Don Skidmore <donald.c.skidmore@intel.com>,
netdev@vger.kernel.org, nhorman@redhat.com, sassmann@redhat.com,
jogreene@redhat.com, Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next 10/18] ixgbe: fix issue with sfp events with new X550 devices
Date: Tue, 9 Jun 2015 18:10:21 -0700 [thread overview]
Message-ID: <1433898629-76729-11-git-send-email-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <1433898629-76729-1-git-send-email-jeffrey.t.kirsher@intel.com>
From: Don Skidmore <donald.c.skidmore@intel.com>
Add checks for systems that don't have SFP's to avoid incorrectly
acting on interrupts that are falsely interpreted as SFP events.
We do this by updating the ixgbe_is_sfp to be aware of the
new X550 devices. This also includes a modified check generating
the EICR mask to be more forward-looking.
Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Tested-by: Krishneil Singh <krishneil.k.singh@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 47 ++++++++++++---------------
1 file changed, 21 insertions(+), 26 deletions(-)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index 1c3477a..4b681c4 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -2444,6 +2444,27 @@ static void ixgbe_check_overtemp_event(struct ixgbe_adapter *adapter, u32 eicr)
e_crit(drv, "%s\n", ixgbe_overheat_msg);
}
+static inline bool ixgbe_is_sfp(struct ixgbe_hw *hw)
+{
+ switch (hw->mac.type) {
+ case ixgbe_mac_82598EB:
+ if (hw->phy.type == ixgbe_phy_nl)
+ return true;
+ return false;
+ case ixgbe_mac_82599EB:
+ case ixgbe_mac_X550EM_x:
+ switch (hw->mac.ops.get_media_type(hw)) {
+ case ixgbe_media_type_fiber:
+ case ixgbe_media_type_fiber_qsfp:
+ return true;
+ default:
+ return false;
+ }
+ default:
+ return false;
+ }
+}
+
static void ixgbe_check_sfp_event(struct ixgbe_adapter *adapter, u32 eicr)
{
struct ixgbe_hw *hw = &adapter->hw;
@@ -4714,32 +4735,6 @@ static void ixgbe_configure(struct ixgbe_adapter *adapter)
ixgbe_configure_dfwd(adapter);
}
-static inline bool ixgbe_is_sfp(struct ixgbe_hw *hw)
-{
- switch (hw->phy.type) {
- case ixgbe_phy_sfp_avago:
- case ixgbe_phy_sfp_ftl:
- case ixgbe_phy_sfp_intel:
- case ixgbe_phy_sfp_unknown:
- case ixgbe_phy_sfp_passive_tyco:
- case ixgbe_phy_sfp_passive_unknown:
- case ixgbe_phy_sfp_active_unknown:
- case ixgbe_phy_sfp_ftl_active:
- case ixgbe_phy_qsfp_passive_unknown:
- case ixgbe_phy_qsfp_active_unknown:
- case ixgbe_phy_qsfp_intel:
- case ixgbe_phy_qsfp_unknown:
- /* ixgbe_phy_none is set when no SFP module is present */
- case ixgbe_phy_none:
- return true;
- case ixgbe_phy_nl:
- if (hw->mac.type == ixgbe_mac_82598EB)
- return true;
- default:
- return false;
- }
-}
-
/**
* ixgbe_sfp_link_config - set up SFP+ link
* @adapter: pointer to private adapter struct
--
2.4.2
next prev parent reply other threads:[~2015-06-10 1:10 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-10 1:10 [net-next 00/18][pull request] Intel Wired LAN Driver Updates 2015-06-09 Jeff Kirsher
2015-06-10 1:10 ` [net-next 01/18] ixgbe: add array of MAC type dependent values Jeff Kirsher
2015-06-10 1:10 ` [net-next 02/18] ixgbe: add support for WoL and autoneg FC for some X550 devices Jeff Kirsher
2015-06-10 1:10 ` [net-next 03/18] ixgbe: add define for X557 PHY ID Jeff Kirsher
2015-06-10 1:10 ` [net-next 04/18] ixgbe: Add a PHY power state method Jeff Kirsher
2015-06-10 1:10 ` [net-next 05/18] ixgbe: Restore ESDP settings after MAC reset Jeff Kirsher
2015-06-10 1:10 ` [net-next 06/18] ixgbe: add X550 support for external PHY and forced 1G/10G support Jeff Kirsher
2015-06-10 1:10 ` [net-next 07/18] ixgbe: Add reset for X550 device Jeff Kirsher
2015-06-10 1:10 ` [net-next 08/18] ixgbe: Add const string for overheat message Jeff Kirsher
2015-06-10 1:10 ` [net-next 09/18] ixgbe: add support for interrupts from X550 external PHY Jeff Kirsher
2015-06-10 1:10 ` Jeff Kirsher [this message]
2015-06-10 1:10 ` [net-next 11/18] ixgbe: fix bug in not clearing counters for X550 devices Jeff Kirsher
2015-06-10 1:10 ` [net-next 12/18] ixgbe: fix X550 devices init flow Jeff Kirsher
2015-06-10 1:10 ` [net-next 13/18] ixgbe: fix X550 PHY function pointers Jeff Kirsher
2015-06-10 1:10 ` [net-next 14/18] ixgbe: Add support for another X550 device Jeff Kirsher
2015-06-10 1:10 ` [net-next 15/18] ixgbe: add link check for X550 copper Jeff Kirsher
2015-06-10 1:10 ` [net-next 16/18] ixgbe: Set lan_id before using I2C Jeff Kirsher
2015-06-10 1:10 ` [net-next 17/18] ixgbe: fix X550 default set_phy_power method Jeff Kirsher
2015-06-10 1:10 ` [net-next 18/18] ixgbe: Remember to write ixfi changes after modifying Jeff Kirsher
2015-06-11 5:14 ` [net-next 00/18][pull request] Intel Wired LAN Driver Updates 2015-06-09 David Miller
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=1433898629-76729-11-git-send-email-jeffrey.t.kirsher@intel.com \
--to=jeffrey.t.kirsher@intel.com \
--cc=davem@davemloft.net \
--cc=donald.c.skidmore@intel.com \
--cc=jogreene@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=nhorman@redhat.com \
--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).