Netdev List
 help / color / mirror / Atom feed
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Jacob Keller <jacob.e.keller@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 v2 08/17] i40e: only enable PTP interrupt cause if PTP is enabled
Date: Fri, 16 Jan 2015 05:28:57 -0800	[thread overview]
Message-ID: <1421414946-22179-9-git-send-email-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <1421414946-22179-1-git-send-email-jeffrey.t.kirsher@intel.com>

From: Jacob Keller <jacob.e.keller@intel.com>

We should not blindly enable the PTP interrupt flags for all PFs. We
should only enable the PTP interrupt in PFs which have enabled
PTP.

Change-ID: I051a17cae4c199a2f3cf7852266e27eda6630525
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_main.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index c3a353d..0cc0266 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -2819,8 +2819,9 @@ static void i40e_vsi_configure_msix(struct i40e_vsi *vsi)
  * i40e_enable_misc_int_causes - enable the non-queue interrupts
  * @hw: ptr to the hardware info
  **/
-static void i40e_enable_misc_int_causes(struct i40e_hw *hw)
+static void i40e_enable_misc_int_causes(struct i40e_pf *pf)
 {
+	struct i40e_hw *hw = &pf->hw;
 	u32 val;
 
 	/* clear things first */
@@ -2832,11 +2833,13 @@ static void i40e_enable_misc_int_causes(struct i40e_hw *hw)
 	      I40E_PFINT_ICR0_ENA_GRST_MASK          |
 	      I40E_PFINT_ICR0_ENA_PCI_EXCEPTION_MASK |
 	      I40E_PFINT_ICR0_ENA_GPIO_MASK          |
-	      I40E_PFINT_ICR0_ENA_TIMESYNC_MASK      |
 	      I40E_PFINT_ICR0_ENA_HMC_ERR_MASK       |
 	      I40E_PFINT_ICR0_ENA_VFLR_MASK          |
 	      I40E_PFINT_ICR0_ENA_ADMINQ_MASK;
 
+	if (pf->flags & I40E_FLAG_PTP)
+		val |= I40E_PFINT_ICR0_ENA_TIMESYNC_MASK;
+
 	wr32(hw, I40E_PFINT_ICR0_ENA, val);
 
 	/* SW_ITR_IDX = 0, but don't change INTENA */
@@ -2866,7 +2869,7 @@ static void i40e_configure_msi_and_legacy(struct i40e_vsi *vsi)
 	q_vector->tx.latency_range = I40E_LOW_LATENCY;
 	wr32(hw, I40E_PFINT_ITR0(I40E_TX_ITR), q_vector->tx.itr);
 
-	i40e_enable_misc_int_causes(hw);
+	i40e_enable_misc_int_causes(pf);
 
 	/* FIRSTQ_INDX = 0, FIRSTQ_TYPE = 0 (rx) */
 	wr32(hw, I40E_PFINT_LNKLST0, 0);
@@ -7137,7 +7140,7 @@ static int i40e_setup_misc_vector(struct i40e_pf *pf)
 		}
 	}
 
-	i40e_enable_misc_int_causes(hw);
+	i40e_enable_misc_int_causes(pf);
 
 	/* associate no queues to the misc vector */
 	wr32(hw, I40E_PFINT_LNKLST0, I40E_QUEUE_END_OF_LIST);
-- 
1.9.3

  parent reply	other threads:[~2015-01-16 13:29 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-16 13:28 [net-next v2 00/17][pull request] Intel Wired LAN Driver Updates 2015-01-16 Jeff Kirsher
2015-01-16 13:28 ` [net-next v2 01/17] i40e/i40evf: AdminQ updates ww36 Jeff Kirsher
2015-01-16 13:28 ` [net-next v2 02/17] i40e/i40evf: Increase ASQ timeout Jeff Kirsher
2015-01-16 13:28 ` [net-next v2 03/17] i40e: fix proc/int descriptions Jeff Kirsher
2015-01-16 13:28 ` [net-next v2 04/17] i40e: don't give up on DCB error after reset Jeff Kirsher
2015-01-16 13:28 ` [net-next v2 05/17] i40e: Add define for interrupt name string len Jeff Kirsher
2015-01-16 13:28 ` [net-next v2 06/17] i40e: Dump Stats string removed from debugfs help command Jeff Kirsher
2015-01-16 13:28 ` [net-next v2 07/17] i40e/i40evf: Bump i40e/i40evf versions Jeff Kirsher
2015-01-16 13:28 ` Jeff Kirsher [this message]
2015-01-16 13:28 ` [net-next v2 09/17] i40e: check I40E_FLAG_PTP before handling Tx or Rx timestamps Jeff Kirsher
2015-01-16 13:28 ` [net-next v2 10/17] i40e: Issue "Stop LLDP" command for firmware older than v4.3 Jeff Kirsher
2015-01-16 13:29 ` [net-next v2 11/17] i40e: add more struct size checks Jeff Kirsher
2015-01-16 13:29 ` [net-next v2 12/17] i40e: AQ API updates Jeff Kirsher
2015-01-16 13:29 ` [net-next v2 13/17] i40e: AQ API updates for new commands Jeff Kirsher
2015-01-16 13:29 ` [net-next v2 14/17] i40e: use same check for Rx hang as for Rx timestamps Jeff Kirsher
2015-01-16 13:29 ` [net-next v2 15/17] i40e: when Rx timestamps disabled set specific mode Jeff Kirsher
2015-01-16 13:29 ` [net-next v2 16/17] i40e: Support for NPAR iSCSI partition with DCB Jeff Kirsher
2015-01-16 13:29 ` [net-next v2 17/17] i40e/i40evf: Bump i40e and i40evf versions Jeff Kirsher
2015-01-18  1:34 ` [net-next v2 00/17][pull request] Intel Wired LAN Driver Updates 2015-01-16 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=1421414946-22179-9-git-send-email-jeffrey.t.kirsher@intel.com \
    --to=jeffrey.t.kirsher@intel.com \
    --cc=davem@davemloft.net \
    --cc=jacob.e.keller@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