On Fri, Nov 06, 2026 at 09:40:11AM +0000, Ciara Loftus wrote:
> Since the watchdog is kept armed across a PF reset, it can clear the
> `vf_reset` flag while the reset event is still queued or being handled,
> as VFGEN_RSTAT toggles while the PF resets the VF. iavf_dev_close() then
> skips re-enabling PCI bus mastering, which the VF reset cleared, so
> VIRTCHNL_OP_VERSION never reaches the PF, iavf_dev_init() fails and the
> port is left returning -EIO. Each toggle also posts a further reset
> event, causing redundant recovery cycles.
> 
> Count reset events from before `vf_reset` is set until they have been
> handled, and do not let the watchdog clear the flag while any are
> outstanding. Also make the `vf_reset` flag atomic, as it is accessed from
> multiple places: the watchdog alarm, the interrupt thread and the virtchnl
> polling path.
> 
> Fixes: a0e296420a70 ("net/iavf: keep watchdog armed for the whole reset 
> window")
> Cc: [email protected]
> 
> Suggested-by: Declan Doherty <[email protected]>
> Signed-off-by: Ciara Loftus <[email protected]>
> ---
> v4:
> * Remove overly defensive check after reset callback
> * Added a log on event post failure
> ---
>  drivers/net/intel/iavf/iavf.h        |   6 +-
>  drivers/net/intel/iavf/iavf_ethdev.c |  32 ++++----
>  drivers/net/intel/iavf/iavf_vchnl.c  | 117 +++++++++++++++++----------
>  3 files changed, 94 insertions(+), 61 deletions(-)
> 
Acked-by: Bruce Richardson <[email protected]>

Reply via email to