patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Wenzhuo Lu <wenzhuo.lu@intel.com>
To: dev@dpdk.org
Cc: stable@dpdk.org, Qi Zhang <qi.z.zhang@intel.com>
Subject: [dpdk-stable] [PATCH v6 09/25] net/i40e: fix VF reset flow
Date: Wed, 21 Dec 2016 14:34:14 +0800	[thread overview]
Message-ID: <1482302070-128496-10-git-send-email-wenzhuo.lu@intel.com> (raw)
In-Reply-To: <1482302070-128496-1-git-send-email-wenzhuo.lu@intel.com>

Add missing step during VF reset: PF should
set I40E_VFGEN_RSTAT to ACTIVE at end of the
VF reset operation or VF driver may not able
to detect that reset is already completed.
This patch also remove the unnecessary enum
for vfr state.

Fixes: 4861cde46116 ("i40e: new poll mode driver")

CC: stable@dpdk.org
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/i40e/i40e_pf.c | 6 ++++--
 drivers/net/i40e/i40e_pf.h | 5 -----
 2 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/drivers/net/i40e/i40e_pf.c b/drivers/net/i40e/i40e_pf.c
index 8b8a14f..2bc3355 100644
--- a/drivers/net/i40e/i40e_pf.c
+++ b/drivers/net/i40e/i40e_pf.c
@@ -139,7 +139,7 @@
 	abs_vf_id = vf_id + hw->func_caps.vf_base_id;
 
 	/* Notify VF that we are in VFR progress */
-	I40E_WRITE_REG(hw, I40E_VFGEN_RSTAT1(vf_id), I40E_PF_VFR_INPROGRESS);
+	I40E_WRITE_REG(hw, I40E_VFGEN_RSTAT1(vf_id), I40E_VFR_INPROGRESS);
 
 	/*
 	 * If require a SW VF reset, a VFLR interrupt will be generated,
@@ -220,7 +220,7 @@
 	}
 
 	/* Reset done, Set COMPLETE flag and clear reset bit */
-	I40E_WRITE_REG(hw, I40E_VFGEN_RSTAT1(vf_id), I40E_PF_VFR_COMPLETED);
+	I40E_WRITE_REG(hw, I40E_VFGEN_RSTAT1(vf_id), I40E_VFR_COMPLETED);
 	val = I40E_READ_REG(hw, I40E_VPGEN_VFRTRIG(vf_id));
 	val &= ~I40E_VPGEN_VFRTRIG_VFSWR_MASK;
 	I40E_WRITE_REG(hw, I40E_VPGEN_VFRTRIG(vf_id), val);
@@ -248,6 +248,8 @@
 		return -EFAULT;
 	}
 
+	I40E_WRITE_REG(hw, I40E_VFGEN_RSTAT1(vf_id), I40E_VFR_VFACTIVE);
+
 	return ret;
 }
 
diff --git a/drivers/net/i40e/i40e_pf.h b/drivers/net/i40e/i40e_pf.h
index 59bf2ee..ada398b 100644
--- a/drivers/net/i40e/i40e_pf.h
+++ b/drivers/net/i40e/i40e_pf.h
@@ -48,11 +48,6 @@
 
 #define I40E_DPDK_OFFSET  0x100
 
-enum i40e_pf_vfr_state {
-	I40E_PF_VFR_INPROGRESS = 0,
-	I40E_PF_VFR_COMPLETED = 1,
-};
-
 /* DPDK pf driver specific command to VF */
 enum i40e_virtchnl_ops_dpdk {
 	/*
-- 
1.9.3

  parent reply	other threads:[~2016-12-21  6:34 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1480637533-37425-1-git-send-email-wenzhuo.lu@intel.com>
     [not found] ` <1481081535-37448-1-git-send-email-wenzhuo.lu@intel.com>
2016-12-07  3:31   ` [dpdk-stable] [PATCH v2 11/32] " Wenzhuo Lu
2016-12-07  3:31   ` [dpdk-stable] [PATCH v2 14/32] net/i40e: fix VF MAC address assignment Wenzhuo Lu
     [not found] ` <1482302070-128496-1-git-send-email-wenzhuo.lu@intel.com>
2016-12-21  6:34   ` Wenzhuo Lu [this message]
2016-12-21  6:34   ` [dpdk-stable] [PATCH v6 12/25] " Wenzhuo Lu
     [not found] ` <1483426488-117332-1-git-send-email-wenzhuo.lu@intel.com>
2017-01-03  6:54   ` [dpdk-stable] [PATCH v7 09/27] net/i40e: fix VF reset flow Wenzhuo Lu
2017-01-03  6:54   ` [dpdk-stable] [PATCH v7 12/27] net/i40e: fix VF MAC address assignment Wenzhuo Lu
2017-01-03  6:54   ` [dpdk-stable] [PATCH v7 26/27] net/i40e: fix segmentation fault in close Wenzhuo Lu
2017-01-06  1:29     ` [dpdk-stable] [dpdk-dev] " Wu, Jingjing
2017-01-06 12:00       ` Iremonger, Bernard
2017-01-09  9:44         ` Wu, Jingjing
2017-01-09  9:50           ` Iremonger, Bernard
     [not found] ` <1484032580-60134-1-git-send-email-wenzhuo.lu@intel.com>
2017-01-10  7:16   ` [dpdk-stable] [PATCH v8 09/25] net/i40e: fix VF reset flow Wenzhuo Lu
2017-01-10  7:16   ` [dpdk-stable] [PATCH v8 12/25] net/i40e: fix VF MAC address assignment Wenzhuo Lu
     [not found] ` <1484290401-1404-1-git-send-email-wenzhuo.lu@intel.com>
2017-01-13  6:53   ` [dpdk-stable] [PATCH v9 09/26] net/i40e: fix VF reset flow Wenzhuo Lu
2017-01-13  6:53   ` [dpdk-stable] [PATCH v9 12/26] net/i40e: fix VF MAC address assignment Wenzhuo Lu
     [not found] ` <1484545911-40432-1-git-send-email-wenzhuo.lu@intel.com>
2017-01-16  5:51   ` [dpdk-stable] [PATCH v10 09/26] net/i40e: fix VF reset flow Wenzhuo Lu
2017-01-16  5:51   ` [dpdk-stable] [PATCH v10 12/26] net/i40e: fix VF MAC address assignment Wenzhuo Lu
     [not found] ` <1484620116-70813-1-git-send-email-wenzhuo.lu@intel.com>
2017-01-17  2:28   ` [dpdk-stable] [PATCH v11 09/26] net/i40e: fix VF reset flow Wenzhuo Lu
2017-01-17  2:28   ` [dpdk-stable] [PATCH v11 12/26] net/i40e: fix VF MAC address assignment Wenzhuo Lu
     [not found] ` <1484642728-73411-1-git-send-email-wenzhuo.lu@intel.com>
2017-01-17  8:45   ` [dpdk-stable] [PATCH v12 09/26] net/i40e: fix VF reset flow Wenzhuo Lu
2017-01-17  8:45   ` [dpdk-stable] [PATCH v12 12/26] net/i40e: fix VF MAC address assignment Wenzhuo Lu

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=1482302070-128496-10-git-send-email-wenzhuo.lu@intel.com \
    --to=wenzhuo.lu@intel.com \
    --cc=dev@dpdk.org \
    --cc=qi.z.zhang@intel.com \
    --cc=stable@dpdk.org \
    /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).