Skip to content

Commit 06914ac

Browse files
mawilli1Jeff Kirsher
authored andcommitted
ice: Always notify FW of VF reset
The call to ice_dis_vsi_txq() acts as the notification to the firmware that the VF is being reset. Because of this, we need to make this call every time we reset, regardless of whatever else we do to stop the Tx queues. Without this change, VF resets would fail to complete on interfaces that were up and running. Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
1 parent 473ca57 commit 06914ac

File tree

1 file changed

+16
-9
lines changed

1 file changed

+16
-9
lines changed

drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1074,9 +1074,16 @@ bool ice_reset_all_vfs(struct ice_pf *pf, bool is_vflr)
10741074
for (v = 0; v < pf->num_alloc_vfs; v++)
10751075
ice_trigger_vf_reset(&pf->vf[v], is_vflr);
10761076

1077-
for (v = 0; v < pf->num_alloc_vfs; v++)
1078-
if (test_bit(ICE_VF_STATE_QS_ENA, pf->vf[v].vf_states))
1079-
ice_dis_vf_qs(&pf->vf[v]);
1077+
for (v = 0; v < pf->num_alloc_vfs; v++) {
1078+
struct ice_vsi *vsi;
1079+
1080+
vf = &pf->vf[v];
1081+
vsi = pf->vsi[vf->lan_vsi_idx];
1082+
if (test_bit(ICE_VF_STATE_QS_ENA, vf->vf_states))
1083+
ice_dis_vf_qs(vf);
1084+
ice_dis_vsi_txq(vsi->port_info, vsi->idx, 0, 0, NULL, NULL,
1085+
NULL, ICE_VF_RESET, vf->vf_id, NULL);
1086+
}
10801087

10811088
/* HW requires some time to make sure it can flush the FIFO for a VF
10821089
* when it resets it. Poll the VPGEN_VFRSTAT register for each VF in
@@ -1171,12 +1178,12 @@ static bool ice_reset_vf(struct ice_vf *vf, bool is_vflr)
11711178

11721179
if (test_bit(ICE_VF_STATE_QS_ENA, vf->vf_states))
11731180
ice_dis_vf_qs(vf);
1174-
else
1175-
/* Call Disable LAN Tx queue AQ call even when queues are not
1176-
* enabled. This is needed for successful completion of VFR
1177-
*/
1178-
ice_dis_vsi_txq(vsi->port_info, vsi->idx, 0, 0, NULL, NULL,
1179-
NULL, ICE_VF_RESET, vf->vf_id, NULL);
1181+
1182+
/* Call Disable LAN Tx queue AQ whether or not queues are
1183+
* enabled. This is needed for successful completion of VFR.
1184+
*/
1185+
ice_dis_vsi_txq(vsi->port_info, vsi->idx, 0, 0, NULL, NULL,
1186+
NULL, ICE_VF_RESET, vf->vf_id, NULL);
11801187

11811188
hw = &pf->hw;
11821189
/* poll VPGEN_VFRSTAT reg to make sure

0 commit comments

Comments
 (0)