Skip to content

Commit a2c90d6

Browse files
rmalz-canguy11
authored andcommitted
i40e: return false from i40e_reset_vf if reset is in progress
The function i40e_vc_reset_vf attempts, up to 20 times, to handle a VF reset request, using the return value of i40e_reset_vf as an indicator of whether the reset was successfully triggered. Currently, i40e_reset_vf always returns true, which causes new reset requests to be ignored if a different VF reset is already in progress. This patch updates the return value of i40e_reset_vf to reflect when another VF reset is in progress, allowing the caller to properly use the retry mechanism. 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 fdd9ebc commit a2c90d6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1546,8 +1546,8 @@ static void i40e_cleanup_reset_vf(struct i40e_vf *vf)
15461546
* @vf: pointer to the VF structure
15471547
* @flr: VFLR was issued or not
15481548
*
1549-
* Returns true if the VF is in reset, resets successfully, or resets
1550-
* are disabled and false otherwise.
1549+
* Return: True if reset was performed successfully or if resets are disabled.
1550+
* False if reset is already in progress.
15511551
**/
15521552
bool i40e_reset_vf(struct i40e_vf *vf, bool flr)
15531553
{
@@ -1566,7 +1566,7 @@ bool i40e_reset_vf(struct i40e_vf *vf, bool flr)
15661566

15671567
/* If VF is being reset already we don't need to continue. */
15681568
if (test_and_set_bit(I40E_VF_STATE_RESETTING, &vf->vf_states))
1569-
return true;
1569+
return false;
15701570

15711571
i40e_trigger_vf_reset(vf, flr);
15721572

0 commit comments

Comments
 (0)