diff mbox

[net-next,S5,07/15] i40e: do a proper reset when disabling a VF

Message ID 1430161042-28494-8-git-send-email-catherine.sullivan@intel.com
State Accepted
Delegated to: Jeff Kirsher
Headers show

Commit Message

Catherine Sullivan April 27, 2015, 6:57 p.m. UTC
From: Mitch Williams <mitch.a.williams@intel.com>

The VF disable code was just whanging on the reset bit without properly
cleaning up the VF, which would leave the VF in an indeterminate state
from which it could not recover. Fix this by notifying the VF and then
by calling the normal VF reset routine.

Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Change-ID: I862b9dfa919368773cbdc212b805b520db2f7430
---
 drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

Comments

James Young June 18, 2015, 12:09 a.m. UTC | #1
> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces@lists.osuosl.org] On
> Behalf Of Catherine Sullivan
> Sent: Monday, April 27, 2015 11:57 AM
> To: intel-wired-lan@lists.osuosl.org
> Subject: [Intel-wired-lan] [net-next S5 07/15] i40e: do a proper reset when
> disabling a VF
> 
> From: Mitch Williams <mitch.a.williams@intel.com>
> 
> The VF disable code was just whanging on the reset bit without properly
> cleaning up the VF, which would leave the VF in an indeterminate state from
> which it could not recover. Fix this by notifying the VF and then by calling the
> normal VF reset routine.
> 
> Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
> Change-ID: I862b9dfa919368773cbdc212b805b520db2f7430
> ---
>  drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 9 ++-------
>  1 file changed, 2 insertions(+), 7 deletions(-)
>
Tested-by: Jim Young <james.m.young@intel.com>
diff mbox

Patch

diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
index 5c7af7d..008ab29 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
@@ -160,13 +160,8 @@  void i40e_vc_notify_vf_reset(struct i40e_vf *vf)
  **/
 static inline void i40e_vc_disable_vf(struct i40e_pf *pf, struct i40e_vf *vf)
 {
-	struct i40e_hw *hw = &pf->hw;
-	u32 reg;
-
-	reg = rd32(hw, I40E_VPGEN_VFRTRIG(vf->vf_id));
-	reg |= I40E_VPGEN_VFRTRIG_VFSWR_MASK;
-	wr32(hw, I40E_VPGEN_VFRTRIG(vf->vf_id), reg);
-	i40e_flush(hw);
+	i40e_vc_notify_vf_reset(vf);
+	i40e_reset_vf(vf, false);
 }
 
 /**