]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
i40e: Don't notify client of VF reset during VF creation
[mirror_ubuntu-artful-kernel.git] / drivers / net / ethernet / intel / i40e / i40e_virtchnl_pf.c
index 0fa050a0cc8e6dd6fbf1ec9a79d3d14c8e0ab27a..5ea659c7bab718de4daa5bf26ad0be865a8d7ef8 100644 (file)
@@ -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);