aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
diff options
context:
space:
mode:
authorAvinash Dayanand <avinash.dayanand@intel.com>2016-07-27 12:02:37 -0700
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2016-08-18 11:43:12 -0700
commit6a23449a2356d7d41addb0c89f512dfef455beb2 (patch)
tree28129c94ac73c8917836dd60c65ae17c9f749a2f /drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
parenti40e: Force register writes to mitigate sync issues with iwarp VF driver (diff)
downloadlinux-dev-6a23449a2356d7d41addb0c89f512dfef455beb2.tar.xz
linux-dev-6a23449a2356d7d41addb0c89f512dfef455beb2.zip
i40e: Don't notify client of VF reset during VF creation
VF goes through reset path during VF creation which happens to also have notification of VF reset to client. Adding conditional check to avoid wrongly notifying VF reset during VF creation. Also changing the call order of VF enable, calling it after VF creation rather than before. Change-ID: I96eabd99deae746a2f0fc465194c886f196178ce Signed-off-by: Avinash Dayanand <avinash.dayanand@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to '')
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
index 0fa050a0cc8e..5ea659c7bab7 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
@@ -991,7 +991,9 @@ complete_reset:
i40e_enable_vf_mappings(vf);
set_bit(I40E_VF_STAT_ACTIVE, &vf->vf_states);
clear_bit(I40E_VF_STAT_DISABLED, &vf->vf_states);
- i40e_notify_client_of_vf_reset(pf, abs_vf_id);
+ /* Do not notify the client during VF init */
+ if (vf->pf->num_alloc_vfs)
+ i40e_notify_client_of_vf_reset(pf, abs_vf_id);
vf->num_vlan = 0;
}
/* tell the VF the reset is done */
@@ -1090,7 +1092,6 @@ int i40e_alloc_vfs(struct i40e_pf *pf, u16 num_alloc_vfs)
goto err_iov;
}
}
- i40e_notify_client_of_vf_enable(pf, num_alloc_vfs);
/* allocate memory */
vfs = kcalloc(num_alloc_vfs, sizeof(struct i40e_vf), GFP_KERNEL);
if (!vfs) {
@@ -1114,6 +1115,8 @@ int i40e_alloc_vfs(struct i40e_pf *pf, u16 num_alloc_vfs)
}
pf->num_alloc_vfs = num_alloc_vfs;
+ i40e_notify_client_of_vf_enable(pf, num_alloc_vfs);
+
err_alloc:
if (ret)
i40e_free_vfs(pf);