Commit fb4e9239 authored by Robert Malz's avatar Robert Malz Committed by Tony Nguyen
Browse files

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: 52424f97 ("i40e: Fix VF hang when reset is triggered on another VF")
Signed-off-by: default avatarRobert Malz <robert.malz@canonical.com>
Tested-by: default avatarRafal Romanowski <rafal.romanowski@intel.com>
Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
parent a2c90d63
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -4328,7 +4328,10 @@ int i40e_vc_process_vflr_event(struct i40e_pf *pf)
		reg = rd32(hw, I40E_GLGEN_VFLRSTAT(reg_idx));
		if (reg & BIT(bit_idx))
			/* i40e_reset_vf will clear the bit in GLGEN_VFLRSTAT */
			i40e_reset_vf(vf, true);
			if (!i40e_reset_vf(vf, true)) {
				/* At least one VF did not finish resetting, retry next time */
				set_bit(__I40E_VFLR_EVENT_PENDING, pf->state);
			}
	}

	return 0;