All of lore.kernel.org
 help / color / mirror / Atom feed
* [net-next 00/15][pull request] Intel Wired LAN Driver Updates 2015-02-09
@ 2015-02-09 10:43 Jeff Kirsher
  2015-02-09 10:43 ` [net-next 01/15] i40e: i40e_fcoe.c: Remove unused function Jeff Kirsher
                   ` (15 more replies)
  0 siblings, 16 replies; 20+ messages in thread
From: Jeff Kirsher @ 2015-02-09 10:43 UTC (permalink / raw)
  To: davem; +Cc: Jeff Kirsher, netdev, nhorman, sassmann, jogreene

This series contains updates to i40e and i40evf only.

Rickard Strandqvist removes an unused function for i40e.

John Linville reorders a piece of code so that y_budget does not get used
by the FCoE code before it gets initialized.

Mitch adds a delay after VF reset with a minimum of 10ms to allow the
hardware internal FIFOs to flush.  Bumps up the ARQ descriptors, since
we can easily overrun the PF's admin receive queue.  Added locking around
the VF reset code, since during VF deallocation, we cannot depend on
simply masking the interrupt since this does not lock out the service task,
which can still call the reset routine.  Fix a potential multi-minute
delay on driver unload, VF disable or system shutdown.  When the module
is being unloaded, waiting for the PF to politely handle all of our admin
queue requests might take forever with a lot of VFs enabled, so just
stop everything and request a VF reset.  Also stops the watchdog during
shutdown to prevent a log full of admin queue errors and the occasional
hang when the system is shut down.

Anjali forces Tx descriptor writebacks on ITR by kicking off the SWINT
interrupt since we noticed that there are non-cache-aligned Tx
descriptors waiting in the ring while interrupts are disabled under NAPI.
Enables loopback for the FCoE VSI, so that VSIs can directly talk to each
other without going out on the wire.

Matthew fixes an LED blink issue by making sure to clear the GPIO blink
field, instead of OR'ing against zero if the field is already '1'.

Greg cleans up a function header comment.

Vasu helps biosdevname user tool to differentiate dev_port for PCoE netdev
and PF netdev, by setting different dev_port value for FCoE netdev.

Carolyn adds a call to u64_stats_init to the receive setup in order to
avoid lockdep errors with seqcount on newer kernels.

The following are changes since commit dd83829ed9da6262487252851ca0aa67600d7d56:
  Driver: Vmxnet3: Change the hex constant to its decimal equivalent
and are available in the git repository at:
  git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next master

Anjali Singhai Jain (2):
  i40evf: Force Tx writeback on ITR
  i40e: Enable Loopback for the FCOE vsi as well

Carolyn Wyborny (1):
  i40e/i40evf: Add call to u64_stats_init to init

Greg Rose (1):
  i40e: Fix function header

John W Linville (1):
  i40e: avoid use of uninitialized v_budget in i40e_init_msix

Matt Jared (1):
  i40e: fix led blink toggle to enable steady state

Mitch Williams (7):
  i40e: delay after VF reset
  i40e: Use even more ARQ descriptors
  i40e: add locking around VF reset
  i40evf: reset on module unload
  i40evf: ignore bogus messages from FW
  i40evf: stop the watchdog for shutdown
  i40e: stop the service task at shutdown

Rickard Strandqvist (1):
  i40e: i40e_fcoe.c: Remove unused function

Vasu Dev (1):
  i40e: use dev_port for fcoe netdev

 drivers/net/ethernet/intel/i40e/i40e.h             |  5 +--
 drivers/net/ethernet/intel/i40e/i40e_common.c      |  6 ++--
 drivers/net/ethernet/intel/i40e/i40e_fcoe.c        | 16 ++++-----
 drivers/net/ethernet/intel/i40e/i40e_main.c        | 14 ++++----
 drivers/net/ethernet/intel/i40e/i40e_txrx.c        |  6 ++--
 drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 25 +++++++-------
 drivers/net/ethernet/intel/i40evf/i40e_txrx.c      | 40 ++++++++++++++++++++--
 drivers/net/ethernet/intel/i40evf/i40e_txrx.h      |  1 +
 drivers/net/ethernet/intel/i40evf/i40evf_main.c    | 23 +++++++++----
 9 files changed, 95 insertions(+), 41 deletions(-)

-- 
1.9.3

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [net-next 01/15] i40e: i40e_fcoe.c: Remove unused function
  2015-02-09 10:43 [net-next 00/15][pull request] Intel Wired LAN Driver Updates 2015-02-09 Jeff Kirsher
@ 2015-02-09 10:43 ` Jeff Kirsher
  2015-02-09 10:43 ` [net-next 02/15] i40e: avoid use of uninitialized v_budget in i40e_init_msix Jeff Kirsher
                   ` (14 subsequent siblings)
  15 siblings, 0 replies; 20+ messages in thread
From: Jeff Kirsher @ 2015-02-09 10:43 UTC (permalink / raw)
  To: davem
  Cc: Rickard Strandqvist, netdev, nhorman, sassmann, jogreene, Jeff Kirsher

From: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>

Remove the function i40e_rx_is_fip() that is not used anywhere.

This was partially found by using a static code analysis program
called cppcheck.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Tested-by: Jim Young <james.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_fcoe.c | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_fcoe.c b/drivers/net/ethernet/intel/i40e/i40e_fcoe.c
index 2cd841b..dc8cbdd 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_fcoe.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_fcoe.c
@@ -39,15 +39,6 @@
 #include "i40e_fcoe.h"
 
 /**
- * i40e_rx_is_fip - returns true if the rx packet type is FIP
- * @ptype: the packet type field from rx descriptor write-back
- **/
-static inline bool i40e_rx_is_fip(u16 ptype)
-{
-	return ptype == I40E_RX_PTYPE_L2_FIP_PAY2;
-}
-
-/**
  * i40e_rx_is_fcoe - returns true if the rx packet type is FCoE
  * @ptype: the packet type field from rx descriptor write-back
  **/
-- 
1.9.3

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [net-next 02/15] i40e: avoid use of uninitialized v_budget in i40e_init_msix
  2015-02-09 10:43 [net-next 00/15][pull request] Intel Wired LAN Driver Updates 2015-02-09 Jeff Kirsher
  2015-02-09 10:43 ` [net-next 01/15] i40e: i40e_fcoe.c: Remove unused function Jeff Kirsher
@ 2015-02-09 10:43 ` Jeff Kirsher
  2015-02-09 10:43 ` [net-next 03/15] i40e: delay after VF reset Jeff Kirsher
                   ` (13 subsequent siblings)
  15 siblings, 0 replies; 20+ messages in thread
From: Jeff Kirsher @ 2015-02-09 10:43 UTC (permalink / raw)
  To: davem; +Cc: John W Linville, netdev, nhorman, sassmann, jogreene, Jeff Kirsher

From: John W Linville <linville@tuxdriver.com>

This I40E_FCOE block increments v_budget before it has been initialized,
then v_budget gets overwritten a few lines later.  This patch just
reorders the code hunks in what I believe was the intended sequence.

Coverity: CID 1260099

Signed-off-by: John W Linville <linville@tuxdriver.com>
Tested-by: Jim Young <james.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_main.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index e774a23..9efb69a 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -6933,17 +6933,17 @@ static int i40e_init_msix(struct i40e_pf *pf)
 	if (pf->flags & I40E_FLAG_FD_SB_ENABLED)
 		other_vecs++;
 
+	/* Scale down if necessary, and the rings will share vectors */
+	pf->num_lan_msix = min_t(int, pf->num_lan_msix,
+			(hw->func_caps.num_msix_vectors - other_vecs));
+	v_budget = pf->num_lan_msix + other_vecs;
+
 #ifdef I40E_FCOE
 	if (pf->flags & I40E_FLAG_FCOE_ENABLED) {
 		pf->num_fcoe_msix = pf->num_fcoe_qps;
 		v_budget += pf->num_fcoe_msix;
 	}
-
 #endif
-	/* Scale down if necessary, and the rings will share vectors */
-	pf->num_lan_msix = min_t(int, pf->num_lan_msix,
-			(hw->func_caps.num_msix_vectors - other_vecs));
-	v_budget = pf->num_lan_msix + other_vecs;
 
 	pf->msix_entries = kcalloc(v_budget, sizeof(struct msix_entry),
 				   GFP_KERNEL);
-- 
1.9.3

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [net-next 03/15] i40e: delay after VF reset
  2015-02-09 10:43 [net-next 00/15][pull request] Intel Wired LAN Driver Updates 2015-02-09 Jeff Kirsher
  2015-02-09 10:43 ` [net-next 01/15] i40e: i40e_fcoe.c: Remove unused function Jeff Kirsher
  2015-02-09 10:43 ` [net-next 02/15] i40e: avoid use of uninitialized v_budget in i40e_init_msix Jeff Kirsher
@ 2015-02-09 10:43 ` Jeff Kirsher
  2015-02-09 10:43 ` [net-next 04/15] i40e: Use even more ARQ descriptors Jeff Kirsher
                   ` (12 subsequent siblings)
  15 siblings, 0 replies; 20+ messages in thread
From: Jeff Kirsher @ 2015-02-09 10:43 UTC (permalink / raw)
  To: davem; +Cc: Mitch Williams, netdev, nhorman, sassmann, jogreene, Jeff Kirsher

From: Mitch Williams <mitch.a.williams@intel.com>

Delay a minimum of 10ms after VF reset, to allow the hardware's internal
FIFOs to flush.

Change-ID: I8a02ddb28c9f0d7303a1eb21d0b2443e5b4c1cda
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Tested-by: Jim Young <james.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
index 044019b..4e4232a 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
@@ -668,13 +668,13 @@ void i40e_reset_vf(struct i40e_vf *vf, bool flr)
 	/* poll VPGEN_VFRSTAT reg to make sure
 	 * that reset is complete
 	 */
-	for (i = 0; i < 100; i++) {
-		/* vf reset requires driver to first reset the
-		 * vf and then poll the status register to make sure
-		 * that the requested op was completed
-		 * successfully
+	for (i = 0; i < 10; i++) {
+		/* VF reset requires driver to first reset the VF and then
+		 * poll the status register to make sure that the reset
+		 * completed successfully. Due to internal HW FIFO flushes,
+		 * we must wait 10ms before the register will be valid.
 		 */
-		usleep_range(10, 20);
+		usleep_range(10000, 20000);
 		reg = rd32(hw, I40E_VPGEN_VFRSTAT(vf->vf_id));
 		if (reg & I40E_VPGEN_VFRSTAT_VFRD_MASK) {
 			rsd = true;
-- 
1.9.3

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [net-next 04/15] i40e: Use even more ARQ descriptors
  2015-02-09 10:43 [net-next 00/15][pull request] Intel Wired LAN Driver Updates 2015-02-09 Jeff Kirsher
                   ` (2 preceding siblings ...)
  2015-02-09 10:43 ` [net-next 03/15] i40e: delay after VF reset Jeff Kirsher
@ 2015-02-09 10:43 ` Jeff Kirsher
  2015-02-09 10:43 ` [net-next 05/15] i40e: add locking around VF reset Jeff Kirsher
                   ` (11 subsequent siblings)
  15 siblings, 0 replies; 20+ messages in thread
From: Jeff Kirsher @ 2015-02-09 10:43 UTC (permalink / raw)
  To: davem; +Cc: Mitch Williams, netdev, nhorman, sassmann, jogreene, Jeff Kirsher

From: Mitch Williams <mitch.a.williams@intel.com>

When enabling 64 VFs and loading the VF driver in the host kernel, we
can easily overrun the PF's admin receive queue. Double the size of this
queue, and increase the work limit to allow the PF to handle more
requests in a single pass through the service task.

Change-ID: I0efbbdc61954bffad422a2f33c4b948a59370bf5
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Tested-by: Jim Young <james.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e.h b/drivers/net/ethernet/intel/i40e/i40e.h
index fadf8fa..b35413d 100644
--- a/drivers/net/ethernet/intel/i40e/i40e.h
+++ b/drivers/net/ethernet/intel/i40e/i40e.h
@@ -87,8 +87,8 @@
 #define I40E_MINIMUM_FCOE             1 /* minimum number of QPs for FCoE */
 #endif /* I40E_FCOE */
 #define I40E_MAX_AQ_BUF_SIZE          4096
-#define I40E_AQ_LEN                   128
-#define I40E_AQ_WORK_LIMIT            16
+#define I40E_AQ_LEN                   256
+#define I40E_AQ_WORK_LIMIT            32
 #define I40E_MAX_USER_PRIORITY        8
 #define I40E_DEFAULT_MSG_ENABLE       4
 #define I40E_QUEUE_WAIT_RETRY_LIMIT   10
-- 
1.9.3

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [net-next 05/15] i40e: add locking around VF reset
  2015-02-09 10:43 [net-next 00/15][pull request] Intel Wired LAN Driver Updates 2015-02-09 Jeff Kirsher
                   ` (3 preceding siblings ...)
  2015-02-09 10:43 ` [net-next 04/15] i40e: Use even more ARQ descriptors Jeff Kirsher
@ 2015-02-09 10:43 ` Jeff Kirsher
  2015-02-09 10:43 ` [net-next 06/15] i40evf: reset on module unload Jeff Kirsher
                   ` (10 subsequent siblings)
  15 siblings, 0 replies; 20+ messages in thread
From: Jeff Kirsher @ 2015-02-09 10:43 UTC (permalink / raw)
  To: davem; +Cc: Mitch Williams, netdev, nhorman, sassmann, jogreene, Jeff Kirsher

From: Mitch Williams <mitch.a.williams@intel.com>

During VF deallocation, we need to lock out the VF reset code. However,
we cannot depend on simply masking the interrupt, as this does not lock
out the service task, which can still call the reset routine. Instead,
leave the interrupt enabled, but add locking around the VF disable and
reset routines.

For the disable code, we wait to get the lock, as the reset code will
take a finite amount of time to run. For the reset code, we just return
if we fail to get the lock. Since we know that the VFs are being
disabled, we don't need to handle the reset.
This fixes a panic when disabling SR-IOV.

Change-ID: Iea0a6cdef35c331f48c6d5b2f8e6f0e86322e7d8
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Tested-by: Jim Young <james.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e.h             |  1 +
 drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 13 +++++++------
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e.h b/drivers/net/ethernet/intel/i40e/i40e.h
index b35413d..2b65cdc 100644
--- a/drivers/net/ethernet/intel/i40e/i40e.h
+++ b/drivers/net/ethernet/intel/i40e/i40e.h
@@ -148,6 +148,7 @@ enum i40e_state_t {
 	__I40E_FD_FLUSH_REQUESTED,
 	__I40E_RESET_FAILED,
 	__I40E_PORT_TX_SUSPENDED,
+	__I40E_VF_DISABLE,
 };
 
 enum i40e_interrupt_policy {
diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
index 4e4232a..40f042a 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
@@ -647,6 +647,9 @@ void i40e_reset_vf(struct i40e_vf *vf, bool flr)
 	int i;
 	u32 reg;
 
+	if (test_and_set_bit(__I40E_VF_DISABLE, &pf->state))
+		return;
+
 	/* warn the VF */
 	clear_bit(I40E_VF_STAT_ACTIVE, &vf->vf_states);
 
@@ -706,6 +709,7 @@ complete_reset:
 	/* tell the VF the reset is done */
 	wr32(hw, I40E_VFGEN_RSTAT1(vf->vf_id), I40E_VFR_VFACTIVE);
 	i40e_flush(hw);
+	clear_bit(__I40E_VF_DISABLE, &pf->state);
 }
 
 /**
@@ -790,6 +794,8 @@ void i40e_free_vfs(struct i40e_pf *pf)
 
 	if (!pf->vf)
 		return;
+	while (test_and_set_bit(__I40E_VF_DISABLE, &pf->state))
+		usleep_range(1000, 2000);
 
 	/* Disable IOV before freeing resources. This lets any VF drivers
 	 * running in the host get themselves cleaned up before we yank
@@ -800,9 +806,6 @@ void i40e_free_vfs(struct i40e_pf *pf)
 
 	msleep(20); /* let any messages in transit get finished up */
 
-	/* Disable interrupt 0 so we don't try to handle the VFLR. */
-	i40e_irq_dynamic_disable_icr0(pf);
-
 	/* free up vf resources */
 	tmp = pf->num_alloc_vfs;
 	pf->num_alloc_vfs = 0;
@@ -834,9 +837,7 @@ void i40e_free_vfs(struct i40e_pf *pf)
 		dev_warn(&pf->pdev->dev,
 			 "unable to disable SR-IOV because VFs are assigned.\n");
 	}
-
-	/* Re-enable interrupt 0. */
-	i40e_irq_dynamic_enable_icr0(pf);
+	clear_bit(__I40E_VF_DISABLE, &pf->state);
 }
 
 #ifdef CONFIG_PCI_IOV
-- 
1.9.3

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [net-next 06/15] i40evf: reset on module unload
  2015-02-09 10:43 [net-next 00/15][pull request] Intel Wired LAN Driver Updates 2015-02-09 Jeff Kirsher
                   ` (4 preceding siblings ...)
  2015-02-09 10:43 ` [net-next 05/15] i40e: add locking around VF reset Jeff Kirsher
@ 2015-02-09 10:43 ` Jeff Kirsher
  2015-02-09 10:43 ` [net-next 07/15] i40evf: ignore bogus messages from FW Jeff Kirsher
                   ` (9 subsequent siblings)
  15 siblings, 0 replies; 20+ messages in thread
From: Jeff Kirsher @ 2015-02-09 10:43 UTC (permalink / raw)
  To: davem; +Cc: Mitch Williams, netdev, nhorman, sassmann, jogreene, Jeff Kirsher

From: Mitch Williams <mitch.a.williams@intel.com>

When the module is being unloaded, don't wait for the PF to politely
handle all of our admin queue requests, as that might take forever with
a lot of VFs enabled. Instead, just stop everything and request a VF
reset.

When the original shutdown code was written, VF resets were unreliable,
so we avoided them. But with production hardware and firmware, and the
1.x PF driver, this is no longer the case.

This fixes a potential multi-minute delay on driver unload, VF disable,
or system shutdown.

Change-ID: Ib43d6d860ef6b9b8f26e8dce0615a0302608c7d9
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Tested-by: Jim Young <james.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/i40evf/i40evf_main.c | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
index f946aac..cd71c47 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
@@ -2423,7 +2423,6 @@ static void i40evf_remove(struct pci_dev *pdev)
 	struct i40evf_adapter *adapter = netdev_priv(netdev);
 	struct i40evf_mac_filter *f, *ftmp;
 	struct i40e_hw *hw = &adapter->hw;
-	int count = 50;
 
 	cancel_delayed_work_sync(&adapter->init_task);
 	cancel_work_sync(&adapter->reset_task);
@@ -2432,12 +2431,18 @@ static void i40evf_remove(struct pci_dev *pdev)
 		unregister_netdev(netdev);
 		adapter->netdev_registered = false;
 	}
-	while (count-- && adapter->aq_required)
-		msleep(50);
 
-	if (count < 0)
-		dev_err(&pdev->dev, "Timed out waiting for PF driver.\n");
+	/* Shut down all the garbage mashers on the detention level */
 	adapter->state = __I40EVF_REMOVE;
+	adapter->aq_required = 0;
+	adapter->aq_pending = 0;
+	i40evf_request_reset(adapter);
+	msleep(20);
+	/* If the FW isn't responding, kick it once, but only once. */
+	if (!i40evf_asq_done(hw)) {
+		i40evf_request_reset(adapter);
+		msleep(20);
+	}
 
 	if (adapter->msix_entries) {
 		i40evf_misc_irq_disable(adapter);
-- 
1.9.3

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [net-next 07/15] i40evf: ignore bogus messages from FW
  2015-02-09 10:43 [net-next 00/15][pull request] Intel Wired LAN Driver Updates 2015-02-09 Jeff Kirsher
                   ` (5 preceding siblings ...)
  2015-02-09 10:43 ` [net-next 06/15] i40evf: reset on module unload Jeff Kirsher
@ 2015-02-09 10:43 ` Jeff Kirsher
  2015-02-09 10:43 ` [net-next 08/15] i40evf: stop the watchdog for shutdown Jeff Kirsher
                   ` (8 subsequent siblings)
  15 siblings, 0 replies; 20+ messages in thread
From: Jeff Kirsher @ 2015-02-09 10:43 UTC (permalink / raw)
  To: davem; +Cc: Mitch Williams, netdev, nhorman, sassmann, jogreene, Jeff Kirsher

From: Mitch Williams <mitch.a.williams@intel.com>

Occasionally on shutdown, the FW will hand us a bunch of messages filled
with zeros, which can cause us to spin trying to handle them. Just
ignore these and get on with shutting down.

Change-ID: I347e9648f7153ad5a7b7e0847b87f7aad5f3e0da
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Tested-by: Jim Young <james.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/i40evf/i40evf_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
index cd71c47..38126f5 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
@@ -1631,7 +1631,7 @@ static void i40evf_adminq_task(struct work_struct *work)
 	v_msg = (struct i40e_virtchnl_msg *)&event.desc;
 	do {
 		ret = i40evf_clean_arq_element(hw, &event, &pending);
-		if (ret)
+		if (ret || !v_msg->v_opcode)
 			break; /* No event to process or error cleaning ARQ */
 
 		i40evf_virtchnl_completion(adapter, v_msg->v_opcode,
-- 
1.9.3

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [net-next 08/15] i40evf: stop the watchdog for shutdown
  2015-02-09 10:43 [net-next 00/15][pull request] Intel Wired LAN Driver Updates 2015-02-09 Jeff Kirsher
                   ` (6 preceding siblings ...)
  2015-02-09 10:43 ` [net-next 07/15] i40evf: ignore bogus messages from FW Jeff Kirsher
@ 2015-02-09 10:43 ` Jeff Kirsher
  2015-02-09 10:43 ` [net-next 09/15] i40e: stop the service task at shutdown Jeff Kirsher
                   ` (7 subsequent siblings)
  15 siblings, 0 replies; 20+ messages in thread
From: Jeff Kirsher @ 2015-02-09 10:43 UTC (permalink / raw)
  To: davem; +Cc: Mitch Williams, netdev, nhorman, sassmann, jogreene, Jeff Kirsher

From: Mitch Williams <mitch.a.williams@intel.com>

Stop the watchdog during shutdown. Failing to do this causes a log full
of admin queue errors and the occasional hang when the system is shut
down.

Change-ID: Ib2fd11213cca2fa589eb68577e86b1000c23c250
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Tested-by: Jim Young <james.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/i40evf/i40evf_main.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
index 38126f5..8d8c201 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
@@ -2213,12 +2213,18 @@ err:
 static void i40evf_shutdown(struct pci_dev *pdev)
 {
 	struct net_device *netdev = pci_get_drvdata(pdev);
+	struct i40evf_adapter *adapter = netdev_priv(netdev);
 
 	netif_device_detach(netdev);
 
 	if (netif_running(netdev))
 		i40evf_close(netdev);
 
+	/* Prevent the watchdog from running. */
+	adapter->state = __I40EVF_REMOVE;
+	adapter->aq_required = 0;
+	adapter->aq_pending = 0;
+
 #ifdef CONFIG_PM
 	pci_save_state(pdev);
 
-- 
1.9.3

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [net-next 09/15] i40e: stop the service task at shutdown
  2015-02-09 10:43 [net-next 00/15][pull request] Intel Wired LAN Driver Updates 2015-02-09 Jeff Kirsher
                   ` (7 preceding siblings ...)
  2015-02-09 10:43 ` [net-next 08/15] i40evf: stop the watchdog for shutdown Jeff Kirsher
@ 2015-02-09 10:43 ` Jeff Kirsher
  2015-02-09 10:43 ` [net-next 10/15] i40evf: Force Tx writeback on ITR Jeff Kirsher
                   ` (6 subsequent siblings)
  15 siblings, 0 replies; 20+ messages in thread
From: Jeff Kirsher @ 2015-02-09 10:43 UTC (permalink / raw)
  To: davem; +Cc: Mitch Williams, netdev, nhorman, sassmann, jogreene, Jeff Kirsher

From: Mitch Williams <mitch.a.williams@intel.com>

Stop the service task in the shutdown handler, preventing it from
accessing the admin queue after it had been closed. This fixes a panic
that could occur when the system was shut down with a lot of VFs
enabled.

Change-ID: I286735e3842de472385bbf7ad68d30331e508add
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Tested-by: Jim Young <james.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_main.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 9efb69a..1923a0b 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -9736,6 +9736,8 @@ static int i40e_suspend(struct pci_dev *pdev, pm_message_t state)
 
 	set_bit(__I40E_SUSPENDED, &pf->state);
 	set_bit(__I40E_DOWN, &pf->state);
+	del_timer_sync(&pf->service_timer);
+	cancel_work_sync(&pf->service_task);
 	rtnl_lock();
 	i40e_prep_for_reset(pf);
 	rtnl_unlock();
-- 
1.9.3

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [net-next 10/15] i40evf: Force Tx writeback on ITR
  2015-02-09 10:43 [net-next 00/15][pull request] Intel Wired LAN Driver Updates 2015-02-09 Jeff Kirsher
                   ` (8 preceding siblings ...)
  2015-02-09 10:43 ` [net-next 09/15] i40e: stop the service task at shutdown Jeff Kirsher
@ 2015-02-09 10:43 ` Jeff Kirsher
  2015-02-09 10:43 ` [net-next 11/15] i40e: fix led blink toggle to enable steady state Jeff Kirsher
                   ` (5 subsequent siblings)
  15 siblings, 0 replies; 20+ messages in thread
From: Jeff Kirsher @ 2015-02-09 10:43 UTC (permalink / raw)
  To: davem
  Cc: Anjali Singhai Jain, netdev, nhorman, sassmann, jogreene, Jeff Kirsher

From: Anjali Singhai Jain <anjali.singhai@intel.com>

This patch forces Tx descriptor writebacks on ITR by kicking
off the SWINT interrupt when we notice that there are non-cache-aligned
Tx descriptors waiting in the ring while interrupts are disabled
under NAPI.

Change-ID: dd6d9675629bf266c7515ad7a201394618c35444
Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_txrx.c   |  4 +--
 drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 38 +++++++++++++++++++++++++--
 drivers/net/ethernet/intel/i40evf/i40e_txrx.h |  1 +
 3 files changed, 39 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
index 420d662..5aa6ef1 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
@@ -836,8 +836,8 @@ static void i40e_force_wb(struct i40e_vsi *vsi, struct i40e_q_vector *q_vector)
 {
 	u32 val = I40E_PFINT_DYN_CTLN_INTENA_MASK |
 		  I40E_PFINT_DYN_CTLN_SWINT_TRIG_MASK |
-		  I40E_PFINT_DYN_CTLN_SW_ITR_INDX_ENA_MASK
-		  /* allow 00 to be written to the index */;
+		  I40E_PFINT_DYN_CTLN_SW_ITR_INDX_ENA_MASK;
+		  /* allow 00 to be written to the index */
 
 	wr32(&vsi->back->hw,
 	     I40E_PFINT_DYN_CTLN(q_vector->v_idx + vsi->base_vector - 1),
diff --git a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
index 82c3798..4bf15da 100644
--- a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
+++ b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
@@ -192,6 +192,8 @@ static inline u32 i40e_get_head(struct i40e_ring *tx_ring)
 	return le32_to_cpu(*(volatile __le32 *)head);
 }
 
+#define WB_STRIDE 0x3
+
 /**
  * i40e_clean_tx_irq - Reclaim resources after transmit completes
  * @tx_ring:  tx ring to clean
@@ -293,6 +295,14 @@ static bool i40e_clean_tx_irq(struct i40e_ring *tx_ring, int budget)
 	tx_ring->q_vector->tx.total_bytes += total_bytes;
 	tx_ring->q_vector->tx.total_packets += total_packets;
 
+	if (budget &&
+	    !((i & WB_STRIDE) == WB_STRIDE) &&
+	    !test_bit(__I40E_DOWN, &tx_ring->vsi->state) &&
+	    (I40E_DESC_UNUSED(tx_ring) != tx_ring->count))
+		tx_ring->arm_wb = true;
+	else
+		tx_ring->arm_wb = false;
+
 	if (check_for_tx_hang(tx_ring) && i40e_check_tx_hang(tx_ring)) {
 		/* schedule immediate reset if we believe we hung */
 		dev_info(tx_ring->dev, "Detected Tx Unit Hang\n"
@@ -344,6 +354,24 @@ static bool i40e_clean_tx_irq(struct i40e_ring *tx_ring, int budget)
 }
 
 /**
+ * i40e_force_wb -Arm hardware to do a wb on noncache aligned descriptors
+ * @vsi: the VSI we care about
+ * @q_vector: the vector  on which to force writeback
+ *
+ **/
+static void i40e_force_wb(struct i40e_vsi *vsi, struct i40e_q_vector *q_vector)
+{
+	u32 val = I40E_VFINT_DYN_CTLN_INTENA_MASK |
+		  I40E_VFINT_DYN_CTLN_SWINT_TRIG_MASK |
+		  I40E_VFINT_DYN_CTLN_SW_ITR_INDX_ENA_MASK;
+		  /* allow 00 to be written to the index */
+
+	wr32(&vsi->back->hw,
+	     I40E_VFINT_DYN_CTLN1(q_vector->v_idx + vsi->base_vector - 1),
+	     val);
+}
+
+/**
  * i40e_set_new_dynamic_itr - Find new ITR level
  * @rc: structure containing ring performance data
  *
@@ -1065,6 +1093,7 @@ int i40evf_napi_poll(struct napi_struct *napi, int budget)
 	struct i40e_vsi *vsi = q_vector->vsi;
 	struct i40e_ring *ring;
 	bool clean_complete = true;
+	bool arm_wb = false;
 	int budget_per_ring;
 
 	if (test_bit(__I40E_DOWN, &vsi->state)) {
@@ -1075,8 +1104,10 @@ int i40evf_napi_poll(struct napi_struct *napi, int budget)
 	/* Since the actual Tx work is minimal, we can give the Tx a larger
 	 * budget and be more aggressive about cleaning up the Tx descriptors.
 	 */
-	i40e_for_each_ring(ring, q_vector->tx)
+	i40e_for_each_ring(ring, q_vector->tx) {
 		clean_complete &= i40e_clean_tx_irq(ring, vsi->work_limit);
+		arm_wb |= ring->arm_wb;
+	}
 
 	/* We attempt to distribute budget to each Rx queue fairly, but don't
 	 * allow the budget to go below 1 because that would exit polling early.
@@ -1087,8 +1118,11 @@ int i40evf_napi_poll(struct napi_struct *napi, int budget)
 		clean_complete &= i40e_clean_rx_irq(ring, budget_per_ring);
 
 	/* If work not completed, return budget and polling will return */
-	if (!clean_complete)
+	if (!clean_complete) {
+		if (arm_wb)
+			i40e_force_wb(vsi, q_vector);
 		return budget;
+	}
 
 	/* Work is done so exit the polling mode and re-enable the interrupt */
 	napi_complete(napi);
diff --git a/drivers/net/ethernet/intel/i40evf/i40e_txrx.h b/drivers/net/ethernet/intel/i40evf/i40e_txrx.h
index c7f2962..4e15903 100644
--- a/drivers/net/ethernet/intel/i40evf/i40e_txrx.h
+++ b/drivers/net/ethernet/intel/i40evf/i40e_txrx.h
@@ -238,6 +238,7 @@ struct i40e_ring {
 	u8 atr_count;
 
 	bool ring_active;		/* is ring online or not */
+	bool arm_wb;		/* do something to arm write back */
 
 	/* stats structs */
 	struct i40e_queue_stats	stats;
-- 
1.9.3

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [net-next 11/15] i40e: fix led blink toggle to enable steady state
  2015-02-09 10:43 [net-next 00/15][pull request] Intel Wired LAN Driver Updates 2015-02-09 Jeff Kirsher
                   ` (9 preceding siblings ...)
  2015-02-09 10:43 ` [net-next 10/15] i40evf: Force Tx writeback on ITR Jeff Kirsher
@ 2015-02-09 10:43 ` Jeff Kirsher
  2015-02-09 10:43 ` [net-next 12/15] i40e: Fix function header Jeff Kirsher
                   ` (4 subsequent siblings)
  15 siblings, 0 replies; 20+ messages in thread
From: Jeff Kirsher @ 2015-02-09 10:43 UTC (permalink / raw)
  To: davem; +Cc: Matt Jared, netdev, nhorman, sassmann, jogreene, Jeff Kirsher

From: Matt Jared <matthew.a.jared@intel.com>

Make sure to clear the GPIO blink field, instead of OR'ing against zero
if the field is already '1'.

Change-ID: Ie52a52abd48f6f52b20778a6b8b0c542dfc9245c
Signed-off-by: Matt Jared <matthew.a.jared@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_common.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_common.c b/drivers/net/ethernet/intel/i40e/i40e_common.c
index 5669bfa..11a9ffe 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_common.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_common.c
@@ -1142,8 +1142,10 @@ void i40e_led_set(struct i40e_hw *hw, u32 mode, bool blink)
 		if (mode == I40E_LINK_ACTIVITY)
 			blink = false;
 
-		gpio_val |= (blink ? 1 : 0) <<
-			    I40E_GLGEN_GPIO_CTL_LED_BLINK_SHIFT;
+		if (blink)
+			gpio_val |= (1 << I40E_GLGEN_GPIO_CTL_LED_BLINK_SHIFT);
+		else
+			gpio_val &= ~(1 << I40E_GLGEN_GPIO_CTL_LED_BLINK_SHIFT);
 
 		wr32(hw, I40E_GLGEN_GPIO_CTL(i), gpio_val);
 		break;
-- 
1.9.3

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [net-next 12/15] i40e: Fix function header
  2015-02-09 10:43 [net-next 00/15][pull request] Intel Wired LAN Driver Updates 2015-02-09 Jeff Kirsher
                   ` (10 preceding siblings ...)
  2015-02-09 10:43 ` [net-next 11/15] i40e: fix led blink toggle to enable steady state Jeff Kirsher
@ 2015-02-09 10:43 ` Jeff Kirsher
  2015-02-09 10:43 ` [net-next 13/15] i40e: use dev_port for fcoe netdev Jeff Kirsher
                   ` (3 subsequent siblings)
  15 siblings, 0 replies; 20+ messages in thread
From: Jeff Kirsher @ 2015-02-09 10:43 UTC (permalink / raw)
  To: davem; +Cc: Greg Rose, netdev, nhorman, sassmann, jogreene, Jeff Kirsher

From: Greg Rose <gregory.v.rose@intel.com>

s/enable/disable

Change-ID: Ic0572a6c59d03e05a0a35d2e2e9d532e0512638d
Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 1923a0b..cbe281b 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -2940,7 +2940,7 @@ void i40e_irq_dynamic_enable(struct i40e_vsi *vsi, int vector)
 /**
  * i40e_irq_dynamic_disable - Disable default interrupt generation settings
  * @vsi: pointer to a vsi
- * @vector: enable a particular Hw Interrupt vector
+ * @vector: disable a particular Hw Interrupt vector
  **/
 void i40e_irq_dynamic_disable(struct i40e_vsi *vsi, int vector)
 {
-- 
1.9.3

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [net-next 13/15] i40e: use dev_port for fcoe netdev
  2015-02-09 10:43 [net-next 00/15][pull request] Intel Wired LAN Driver Updates 2015-02-09 Jeff Kirsher
                   ` (11 preceding siblings ...)
  2015-02-09 10:43 ` [net-next 12/15] i40e: Fix function header Jeff Kirsher
@ 2015-02-09 10:43 ` Jeff Kirsher
  2015-02-09 10:44 ` [net-next 14/15] i40e: Enable Loopback for the FCOE vsi as well Jeff Kirsher
                   ` (2 subsequent siblings)
  15 siblings, 0 replies; 20+ messages in thread
From: Jeff Kirsher @ 2015-02-09 10:43 UTC (permalink / raw)
  To: davem; +Cc: Vasu Dev, netdev, nhorman, sassmann, jogreene, Jeff Kirsher

From: Vasu Dev <vasu.dev@intel.com>

Set different dev_port value 1 for FCoE netdev than the default zero
dev_port value for PF netdev, this helps biosdevname user tool to
differentiate them correctly while both attached to the same PCI
function.

Change-ID: I8fb90e4ef52a1242f7580e49a3f0918735aee8ef
Signed-off-by: Vasu Dev <vasu.dev@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_fcoe.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_fcoe.c b/drivers/net/ethernet/intel/i40e/i40e_fcoe.c
index dc8cbdd..401f7ed 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_fcoe.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_fcoe.c
@@ -1502,6 +1502,12 @@ void i40e_fcoe_config_netdev(struct net_device *netdev, struct i40e_vsi *vsi)
 	strlcpy(netdev->name, "fcoe%d", IFNAMSIZ-1);
 	netdev->mtu = FCOE_MTU;
 	SET_NETDEV_DEV(netdev, &pf->pdev->dev);
+	/* set different dev_port value 1 for FCoE netdev than the default
+	 * zero dev_port value for PF netdev, this helps biosdevname user
+	 * tool to differentiate them correctly while both attached to the
+	 * same PCI function.
+	 */
+	netdev->dev_port = 1;
 	i40e_add_filter(vsi, hw->mac.san_addr, 0, false, false);
 	i40e_add_filter(vsi, (u8[6]) FC_FCOE_FLOGI_MAC, 0, false, false);
 	i40e_add_filter(vsi, FIP_ALL_FCOE_MACS, 0, false, false);
-- 
1.9.3

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [net-next 14/15] i40e: Enable Loopback for the FCOE vsi as well
  2015-02-09 10:43 [net-next 00/15][pull request] Intel Wired LAN Driver Updates 2015-02-09 Jeff Kirsher
                   ` (12 preceding siblings ...)
  2015-02-09 10:43 ` [net-next 13/15] i40e: use dev_port for fcoe netdev Jeff Kirsher
@ 2015-02-09 10:44 ` Jeff Kirsher
  2015-02-09 10:44 ` [net-next 15/15] i40e/i40evf: Add call to u64_stats_init to init Jeff Kirsher
  2015-02-09 22:18 ` [net-next 00/15][pull request] Intel Wired LAN Driver Updates 2015-02-09 David Miller
  15 siblings, 0 replies; 20+ messages in thread
From: Jeff Kirsher @ 2015-02-09 10:44 UTC (permalink / raw)
  To: davem
  Cc: Anjali Singhai Jain, netdev, nhorman, sassmann, jogreene, Jeff Kirsher

From: Anjali Singhai Jain <anjali.singhai@intel.com>

For all VSIs on a VEB, Loopback mode should be either on or off.
Our configuration requires them to be ON so that VSIs can directly
talk to each other without going out on the wire.

Change-ID: I77b8310bc846329972b13b185949ab1431a46c30
Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_fcoe.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_fcoe.c b/drivers/net/ethernet/intel/i40e/i40e_fcoe.c
index 401f7ed..27c206e 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_fcoe.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_fcoe.c
@@ -395,6 +395,7 @@ int i40e_fcoe_vsi_init(struct i40e_vsi *vsi, struct i40e_vsi_context *ctxt)
 					    I40E_AQ_VSI_PROP_INGRESS_UP_VALID |
 					    I40E_AQ_VSI_PROP_EGRESS_UP_VALID));
 
+	info->switch_id = cpu_to_le16(I40E_AQ_VSI_SW_ID_FLAG_ALLOW_LB);
 	enabled_tc = i40e_get_fcoe_tc_map(pf);
 	i40e_vsi_setup_queue_map(vsi, ctxt, enabled_tc, true);
 
-- 
1.9.3

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [net-next 15/15] i40e/i40evf: Add call to u64_stats_init to init
  2015-02-09 10:43 [net-next 00/15][pull request] Intel Wired LAN Driver Updates 2015-02-09 Jeff Kirsher
                   ` (13 preceding siblings ...)
  2015-02-09 10:44 ` [net-next 14/15] i40e: Enable Loopback for the FCOE vsi as well Jeff Kirsher
@ 2015-02-09 10:44 ` Jeff Kirsher
  2015-02-09 12:09   ` Sergei Shtylyov
  2015-02-09 22:18 ` [net-next 00/15][pull request] Intel Wired LAN Driver Updates 2015-02-09 David Miller
  15 siblings, 1 reply; 20+ messages in thread
From: Jeff Kirsher @ 2015-02-09 10:44 UTC (permalink / raw)
  To: davem; +Cc: Carolyn Wyborny, netdev, nhorman, sassmann, jogreene, Jeff Kirsher

From: Carolyn Wyborny <carolyn.wyborny@intel.com>

This patch adds a call to u64_stats_init to Rx setup.
This done in order to avoid lockdep errors with seqcount on newer kernels.

Change-ID: Ia8ba8f0bcbd1c0e926f97d70aeee4ce4fd055e93
Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_txrx.c   | 2 ++
 drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
index 5aa6ef1..f4d6d90 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
@@ -1098,6 +1098,8 @@ int i40e_setup_rx_descriptors(struct i40e_ring *rx_ring)
 	if (!rx_ring->rx_bi)
 		goto err;
 
+		u64_stats_init(rx_ring->syncp);
+
 	/* Round up to nearest 4K */
 	rx_ring->size = ring_is_16byte_desc_enabled(rx_ring)
 		? rx_ring->count * sizeof(union i40e_16byte_rx_desc)
diff --git a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
index 4bf15da..459499a 100644
--- a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
+++ b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
@@ -596,6 +596,8 @@ int i40evf_setup_rx_descriptors(struct i40e_ring *rx_ring)
 	if (!rx_ring->rx_bi)
 		goto err;
 
+		u64_stats_init(rx_ring->syncp);
+
 	/* Round up to nearest 4K */
 	rx_ring->size = ring_is_16byte_desc_enabled(rx_ring)
 		? rx_ring->count * sizeof(union i40e_16byte_rx_desc)
-- 
1.9.3

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* Re: [net-next 15/15] i40e/i40evf: Add call to u64_stats_init to init
  2015-02-09 10:44 ` [net-next 15/15] i40e/i40evf: Add call to u64_stats_init to init Jeff Kirsher
@ 2015-02-09 12:09   ` Sergei Shtylyov
  2015-02-09 16:45     ` Wyborny, Carolyn
  0 siblings, 1 reply; 20+ messages in thread
From: Sergei Shtylyov @ 2015-02-09 12:09 UTC (permalink / raw)
  To: Jeff Kirsher, davem; +Cc: Carolyn Wyborny, netdev, nhorman, sassmann, jogreene

Hello.

On 2/9/2015 1:44 PM, Jeff Kirsher wrote:

> From: Carolyn Wyborny <carolyn.wyborny@intel.com>

> This patch adds a call to u64_stats_init to Rx setup.
> This done in order to avoid lockdep errors with seqcount on newer kernels.

> Change-ID: Ia8ba8f0bcbd1c0e926f97d70aeee4ce4fd055e93
> Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> ---
>   drivers/net/ethernet/intel/i40e/i40e_txrx.c   | 2 ++
>   drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 2 ++
>   2 files changed, 4 insertions(+)

> diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
> index 5aa6ef1..f4d6d90 100644
> --- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c
> +++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
> @@ -1098,6 +1098,8 @@ int i40e_setup_rx_descriptors(struct i40e_ring *rx_ring)
>   	if (!rx_ring->rx_bi)
>   		goto err;
>
> +		u64_stats_init(rx_ring->syncp);

    This is over-indented.

> +
>   	/* Round up to nearest 4K */
>   	rx_ring->size = ring_is_16byte_desc_enabled(rx_ring)
>   		? rx_ring->count * sizeof(union i40e_16byte_rx_desc)
> diff --git a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
> index 4bf15da..459499a 100644
> --- a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
> +++ b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
> @@ -596,6 +596,8 @@ int i40evf_setup_rx_descriptors(struct i40e_ring *rx_ring)
>   	if (!rx_ring->rx_bi)
>   		goto err;
>
> +		u64_stats_init(rx_ring->syncp);

    Likewise.

> +
>   	/* Round up to nearest 4K */
>   	rx_ring->size = ring_is_16byte_desc_enabled(rx_ring)
>   		? rx_ring->count * sizeof(union i40e_16byte_rx_desc)

WBR, Sergei

^ permalink raw reply	[flat|nested] 20+ messages in thread

* RE: [net-next 15/15] i40e/i40evf: Add call to u64_stats_init to init
  2015-02-09 12:09   ` Sergei Shtylyov
@ 2015-02-09 16:45     ` Wyborny, Carolyn
  0 siblings, 0 replies; 20+ messages in thread
From: Wyborny, Carolyn @ 2015-02-09 16:45 UTC (permalink / raw)
  To: Sergei Shtylyov, Kirsher, Jeffrey T, davem
  Cc: netdev, nhorman, sassmann, jogreene

> -----Original Message-----
> From: Sergei Shtylyov [mailto:sergei.shtylyov@cogentembedded.com]
> Sent: Monday, February 09, 2015 4:09 AM
> To: Kirsher, Jeffrey T; davem@davemloft.net
> Cc: Wyborny, Carolyn; netdev@vger.kernel.org; nhorman@redhat.com;
> sassmann@redhat.com; jogreene@redhat.com
> Subject: Re: [net-next 15/15] i40e/i40evf: Add call to u64_stats_init to init
> 
> Hello.
> 
[..]
> > +		u64_stats_init(rx_ring->syncp);
> 
>     This is over-indented.
> 
> > +
> >   	/* Round up to nearest 4K */
> >   	rx_ring->size = ring_is_16byte_desc_enabled(rx_ring)
> >   		? rx_ring->count * sizeof(union i40e_16byte_rx_desc) diff --git
> > a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
> > b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
> > index 4bf15da..459499a 100644
> > --- a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
> > +++ b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
> > @@ -596,6 +596,8 @@ int i40evf_setup_rx_descriptors(struct i40e_ring
> *rx_ring)
> >   	if (!rx_ring->rx_bi)
> >   		goto err;
> >
> > +		u64_stats_init(rx_ring->syncp);
> 
>     Likewise.
> 
> > +
> >   	/* Round up to nearest 4K */
> >   	rx_ring->size = ring_is_16byte_desc_enabled(rx_ring)
> >   		? rx_ring->count * sizeof(union i40e_16byte_rx_desc)
> 
> WBR, Sergei
Thanks, I have already submitted a patch to correct this, but need to track down the same change in the vf code.  

Jeff, do you know how close it is to submission?  

Carolyn

Carolyn Wyborny 
Linux Development 
Networking Division 
Intel Corporation 

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [net-next 00/15][pull request] Intel Wired LAN Driver Updates 2015-02-09
  2015-02-09 10:43 [net-next 00/15][pull request] Intel Wired LAN Driver Updates 2015-02-09 Jeff Kirsher
                   ` (14 preceding siblings ...)
  2015-02-09 10:44 ` [net-next 15/15] i40e/i40evf: Add call to u64_stats_init to init Jeff Kirsher
@ 2015-02-09 22:18 ` David Miller
  2015-02-10  0:25   ` Jeff Kirsher
  15 siblings, 1 reply; 20+ messages in thread
From: David Miller @ 2015-02-09 22:18 UTC (permalink / raw)
  To: jeffrey.t.kirsher; +Cc: netdev, nhorman, sassmann, jogreene

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Mon,  9 Feb 2015 02:43:46 -0800

> This series contains updates to i40e and i40evf only.

Pulled, please send me a fixup patch for the over indented lines in patch #15.

Thanks.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [net-next 00/15][pull request] Intel Wired LAN Driver Updates 2015-02-09
  2015-02-09 22:18 ` [net-next 00/15][pull request] Intel Wired LAN Driver Updates 2015-02-09 David Miller
@ 2015-02-10  0:25   ` Jeff Kirsher
  0 siblings, 0 replies; 20+ messages in thread
From: Jeff Kirsher @ 2015-02-10  0:25 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, nhorman, sassmann, jogreene

[-- Attachment #1: Type: text/plain, Size: 323 bytes --]

On Mon, 2015-02-09 at 14:18 -0800, David Miller wrote:
> From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Date: Mon,  9 Feb 2015 02:43:46 -0800
> 
> > This series contains updates to i40e and i40evf only.
> 
> Pulled, please send me a fixup patch for the over indented lines in
> patch #15.

Working on it now.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2015-02-10  0:26 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-09 10:43 [net-next 00/15][pull request] Intel Wired LAN Driver Updates 2015-02-09 Jeff Kirsher
2015-02-09 10:43 ` [net-next 01/15] i40e: i40e_fcoe.c: Remove unused function Jeff Kirsher
2015-02-09 10:43 ` [net-next 02/15] i40e: avoid use of uninitialized v_budget in i40e_init_msix Jeff Kirsher
2015-02-09 10:43 ` [net-next 03/15] i40e: delay after VF reset Jeff Kirsher
2015-02-09 10:43 ` [net-next 04/15] i40e: Use even more ARQ descriptors Jeff Kirsher
2015-02-09 10:43 ` [net-next 05/15] i40e: add locking around VF reset Jeff Kirsher
2015-02-09 10:43 ` [net-next 06/15] i40evf: reset on module unload Jeff Kirsher
2015-02-09 10:43 ` [net-next 07/15] i40evf: ignore bogus messages from FW Jeff Kirsher
2015-02-09 10:43 ` [net-next 08/15] i40evf: stop the watchdog for shutdown Jeff Kirsher
2015-02-09 10:43 ` [net-next 09/15] i40e: stop the service task at shutdown Jeff Kirsher
2015-02-09 10:43 ` [net-next 10/15] i40evf: Force Tx writeback on ITR Jeff Kirsher
2015-02-09 10:43 ` [net-next 11/15] i40e: fix led blink toggle to enable steady state Jeff Kirsher
2015-02-09 10:43 ` [net-next 12/15] i40e: Fix function header Jeff Kirsher
2015-02-09 10:43 ` [net-next 13/15] i40e: use dev_port for fcoe netdev Jeff Kirsher
2015-02-09 10:44 ` [net-next 14/15] i40e: Enable Loopback for the FCOE vsi as well Jeff Kirsher
2015-02-09 10:44 ` [net-next 15/15] i40e/i40evf: Add call to u64_stats_init to init Jeff Kirsher
2015-02-09 12:09   ` Sergei Shtylyov
2015-02-09 16:45     ` Wyborny, Carolyn
2015-02-09 22:18 ` [net-next 00/15][pull request] Intel Wired LAN Driver Updates 2015-02-09 David Miller
2015-02-10  0:25   ` Jeff Kirsher

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.