]> git.itanic.dy.fi Git - linux-stable/commit
i40e: Fix VF hang when reset is triggered on another VF
authorSylwester Dziedziuch <sylwesterx.dziedziuch@intel.com>
Mon, 24 Oct 2022 10:05:25 +0000 (03:05 -0700)
committerJakub Kicinski <kuba@kernel.org>
Tue, 25 Oct 2022 23:18:31 +0000 (16:18 -0700)
commit52424f974bc53c26ba3f00300a00e9de9afcd972
tree997ba16e666974204486361db5c146a2764a84c9
parent54b5af5a438076082d482cab105b1bd484ab5074
i40e: Fix VF hang when reset is triggered on another VF

When a reset was triggered on one VF with i40e_reset_vf
global PF state __I40E_VF_DISABLE was set on a PF until
the reset finished. If immediately after triggering reset
on one VF there is a request to reset on another
it will cause a hang on VF side because VF will be notified
of incoming reset but the reset will never happen because
of this global state, we will get such error message:

[  +4.890195] iavf 0000:86:02.1: Never saw reset

and VF will hang waiting for the reset to be triggered.

Fix this by introducing new VF state I40E_VF_STATE_RESETTING
that will be set on a VF if it is currently resetting instead of
the global __I40E_VF_DISABLE PF state.

Fixes: 3ba9bcb4b68f ("i40e: add locking around VF reset")
Signed-off-by: Sylwester Dziedziuch <sylwesterx.dziedziuch@intel.com>
Signed-off-by: Mateusz Palczewski <mateusz.palczewski@intel.com>
Tested-by: Konrad Jankowski <konrad0.jankowski@intel.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Link: https://lore.kernel.org/r/20221024100526.1874914-2-jacob.e.keller@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h