[S12,11/14] ice: Reset all VFs with VFLR during SR-IOV init flow
diff mbox series

Message ID 20190208205101.12078-12-anirudh.venkataramanan@intel.com
State Accepted
Delegated to: Jeff Kirsher
Headers show
Series
  • Bug fixes and minor feature updates for ice
Related show

Commit Message

Anirudh Venkataramanan Feb. 8, 2019, 8:50 p.m. UTC
From: Akeem G Abodunrin <akeem.g.abodunrin@intel.com>

During SR-IOV initialization, we allocate and setup VFs with reset, and
since we were going to inform Firmware about our intention to do VFLR by
disabling LAN TX Queue, then we really have to complete VF reset flow with
VFLR using appropriate registers - Otherwise, reset status bit for VF in
the Guest OS might returns DEADBEEF.
This resolves issue to properly initialize VFs in the Guest OS via PCI
passthrough.

Signed-off-by: Akeem G Abodunrin <akeem.g.abodunrin@intel.com>
Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>
---
 drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Bowers, AndrewX Feb. 28, 2019, 7:34 p.m. UTC | #1
> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces@osuosl.org] On
> Behalf Of Anirudh Venkataramanan
> Sent: Friday, February 8, 2019 12:51 PM
> To: intel-wired-lan@lists.osuosl.org
> Subject: [Intel-wired-lan] [PATCH S12 11/14] ice: Reset all VFs with VFLR
> during SR-IOV init flow
> 
> From: Akeem G Abodunrin <akeem.g.abodunrin@intel.com>
> 
> During SR-IOV initialization, we allocate and setup VFs with reset, and since
> we were going to inform Firmware about our intention to do VFLR by
> disabling LAN TX Queue, then we really have to complete VF reset flow with
> VFLR using appropriate registers - Otherwise, reset status bit for VF in the
> Guest OS might returns DEADBEEF.
> This resolves issue to properly initialize VFs in the Guest OS via PCI
> passthrough.
> 
> Signed-off-by: Akeem G Abodunrin <akeem.g.abodunrin@intel.com>
> Signed-off-by: Anirudh Venkataramanan
> <anirudh.venkataramanan@intel.com>
> ---
>  drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Tested-by: Andrew Bowers <andrewx.bowers@intel.com>

Patch
diff mbox series

diff --git a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c
index 99c8cddb2162..a93db0a7ac1c 100644
--- a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c
+++ b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c
@@ -1029,7 +1029,7 @@  static int ice_alloc_vfs(struct ice_pf *pf, u16 num_alloc_vfs)
 	pf->num_alloc_vfs = num_alloc_vfs;
 
 	/* VF resources get allocated during reset */
-	if (!ice_reset_all_vfs(pf, false))
+	if (!ice_reset_all_vfs(pf, true))
 		goto err_unroll_sriov;
 
 	goto err_unroll_intr;