Skip to content

Commit fb4e923

Browse files
rmalz-canguy11
authored andcommitted
i40e: retry VFLR handling if there is ongoing VF reset
When a VFLR interrupt is received during a VF reset initiated from a different source, the VFLR may be not fully handled. This can leave the VF in an undefined state. To address this, set the I40E_VFLR_EVENT_PENDING bit again during VFLR handling if the reset is not yet complete. This ensures the driver will properly complete the VF reset in such scenarios. Fixes: 52424f9 ("i40e: Fix VF hang when reset is triggered on another VF") Signed-off-by: Robert Malz <[email protected]> Tested-by: Rafal Romanowski <[email protected]> Signed-off-by: Tony Nguyen <[email protected]>
1 parent a2c90d6 commit fb4e923

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4328,7 +4328,10 @@ int i40e_vc_process_vflr_event(struct i40e_pf *pf)
43284328
reg = rd32(hw, I40E_GLGEN_VFLRSTAT(reg_idx));
43294329
if (reg & BIT(bit_idx))
43304330
/* i40e_reset_vf will clear the bit in GLGEN_VFLRSTAT */
4331-
i40e_reset_vf(vf, true);
4331+
if (!i40e_reset_vf(vf, true)) {
4332+
/* At least one VF did not finish resetting, retry next time */
4333+
set_bit(__I40E_VFLR_EVENT_PENDING, pf->state);
4334+
}
43324335
}
43334336

43344337
return 0;

0 commit comments

Comments
 (0)