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 01/18] ixgbe: fix issue with SFP events with new X550 devices
Date: Tue, 15 Sep 2015 17:36:26 -0700 [thread overview]
Message-ID: <1442363803-47237-2-git-send-email-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <1442363803-47237-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.
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>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index 63b2cfe..b9267e2 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -2495,17 +2495,26 @@ static inline bool ixgbe_is_sfp(struct ixgbe_hw *hw)
static void ixgbe_check_sfp_event(struct ixgbe_adapter *adapter, u32 eicr)
{
struct ixgbe_hw *hw = &adapter->hw;
+ u32 eicr_mask = IXGBE_EICR_GPI_SDP2(hw);
- if (eicr & IXGBE_EICR_GPI_SDP2(hw)) {
+ if (!ixgbe_is_sfp(hw))
+ return;
+
+ /* Later MAC's use different SDP */
+ if (hw->mac.type >= ixgbe_mac_X540)
+ eicr_mask = IXGBE_EICR_GPI_SDP0_X540;
+
+ if (eicr & eicr_mask) {
/* Clear the interrupt */
- IXGBE_WRITE_REG(hw, IXGBE_EICR, IXGBE_EICR_GPI_SDP2(hw));
+ IXGBE_WRITE_REG(hw, IXGBE_EICR, eicr_mask);
if (!test_bit(__IXGBE_DOWN, &adapter->state)) {
adapter->flags2 |= IXGBE_FLAG2_SFP_NEEDS_RESET;
ixgbe_service_event_schedule(adapter);
}
}
- if (eicr & IXGBE_EICR_GPI_SDP1(hw)) {
+ if (adapter->hw.mac.type == ixgbe_mac_82599EB &&
+ (eicr & IXGBE_EICR_GPI_SDP1(hw))) {
/* Clear the interrupt */
IXGBE_WRITE_REG(hw, IXGBE_EICR, IXGBE_EICR_GPI_SDP1(hw));
if (!test_bit(__IXGBE_DOWN, &adapter->state)) {
--
2.4.3
next prev parent reply other threads:[~2015-09-16 0:36 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-16 0:36 [net-next 00/18][pull request] Intel Wired LAN Driver Updates 2015-09-15 Jeff Kirsher
2015-09-16 0:36 ` Jeff Kirsher [this message]
2015-09-16 0:36 ` [net-next 02/18] ixgbe: Teardown SR-IOV before unregister_netdev() Jeff Kirsher
2015-09-16 0:36 ` [net-next 03/18] ixgbe: Limit lowest interrupt rate for adaptive interrupt moderation to 12K Jeff Kirsher
2015-09-16 0:36 ` [net-next 04/18] fm10k: disable service task during suspend Jeff Kirsher
2015-09-16 0:36 ` [net-next 05/18] fm10k: only prevent removal of default VID rules Jeff Kirsher
2015-09-16 0:36 ` [net-next 06/18] fm10k: update fm10k_slot_warn to use pcie_get_minimum link Jeff Kirsher
2015-09-16 0:36 ` [net-next 07/18] fm10k: update netdev perm_addr during reinit, instead of at up Jeff Kirsher
2015-09-16 0:36 ` [net-next 08/18] fm10k: Don't assume page fragments are page size Jeff Kirsher
2015-09-16 0:36 ` [net-next 09/18] fm10k: Report MAC address on driver load Jeff Kirsher
2015-09-16 0:36 ` [net-next 10/18] fm10k: allow creation of VLAN interfaces even while down Jeff Kirsher
2015-09-16 0:36 ` [net-next 11/18] fm10k: don't store sw_vid at reset Jeff Kirsher
2015-09-16 0:36 ` [net-next 12/18] fm10k: remove is_slot_appropriate Jeff Kirsher
2015-09-16 0:36 ` [net-next 13/18] fm10k: TRIVIAL fix up ordering of __always_unused and style Jeff Kirsher
2015-09-16 0:36 ` [net-next 14/18] fm10k: send traffic on default VID to VLAN device if we have one Jeff Kirsher
2015-09-16 0:36 ` [net-next 15/18] fm10k: TRIVIAL fix typo in fm10k_netdev.c Jeff Kirsher
2015-09-16 0:36 ` [net-next 16/18] fm10k: re-enable VF after a full reset on detection of a Malicious event Jeff Kirsher
2015-09-16 0:36 ` [net-next 17/18] fm10k: Only trigger data path reset if fabric is up Jeff Kirsher
2015-09-16 0:36 ` [net-next 18/18] fm10k: fix iov_msg_mac_vlan_pf VID checks Jeff Kirsher
2015-09-17 23:50 ` [net-next 00/18][pull request] Intel Wired LAN Driver Updates 2015-09-15 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=1442363803-47237-2-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).