netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Mitch Williams <mitch.a.williams@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 03/15] i40e: delay after VF reset
Date: Mon,  9 Feb 2015 02:43:49 -0800	[thread overview]
Message-ID: <1423478641-3138-4-git-send-email-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <1423478641-3138-1-git-send-email-jeffrey.t.kirsher@intel.com>

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

  parent reply	other threads:[~2015-02-09 10:44 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

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=1423478641-3138-4-git-send-email-jeffrey.t.kirsher@intel.com \
    --to=jeffrey.t.kirsher@intel.com \
    --cc=davem@davemloft.net \
    --cc=jogreene@redhat.com \
    --cc=mitch.a.williams@intel.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).