i40e: Fix check for PF state (vf disable)
Subsystems (2)
PATCH 1/1 i40e: Fix check for PF state (vf disable)
When PF state bit for __I40e_VF_DISABLE is set, it doesn't mean necessary that the VF called in i40e_reset_vf is disabled. It is rather impossible to call a reset on a disabled VF, so return false and repeat the request after a while.
Reviewed-on: https://git-amr-1.devtools.intel.com/gerrit/301695
--- drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c +2 -0
@@ -1423,6 +1423,8 @@ bool i40e_reset_vf(struct i40e_vf *vf, bool flr)/* If the VFs have been disabled, this means something else is * resetting the VF, so we shouldn't continue. +* This is a global state of a PF, so it is possible that +* a different VF is in reset. */ if (test_and_set_bit (__I40E_VF_DISABLE, pf->state))return false;
Signature · 7 lines
2.17.1 --------------------------------------------------------------------- Intel Technology Poland sp. z o.o. ul. Sowackiego 173 | 80-298 Gdask | Sd Rejonowy Gdask Pnoc | VII Wydzia Gospodarczy Krajowego Rejestru Sdowego - KRS 101882 | NIP 957-07-52-316 | Kapita zakadowy 200.000 PLN. Ta wiadomo wraz z zacznikami jest przeznaczona dla okrelonego adresata i moe zawiera informacje poufne. W razie przypadkowego otrzymania tej wiadomoci, prosimy o powiadomienie nadawcy oraz trwae jej usunicie; jakiekolwiek przegldanie lub rozpowszechnianie jest zabronione. This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). If you are not the intended recipient, please contact the sender and delete all copies; any review or distribution by others is strictly prohibited.
Nguyen
PATCH 1/1 i40e: Fix check for PF state (vf disable)
Quoted 5 lines · Mateusz Palczewski
When PF state bit for
__I40e_VF_DISABLEis set, it doesn't mean necessary that the VF called ini40e_reset_vfis disabled. It is rather impossible to call a reset on a disabled VF, so return false and repeat the request after a while.
False is already being returned. This patch is only adding a comment.
Quoted 2 lines
Fixes 8d38e0c("i40e: Fix removing driver while bare-metal VFs passtraffic")
The fixes tags should have 12 chars.
Quoted 3 lines
Signed-off-by Mateusz Palczewski <[email protected]>Signed-off-by Slawomir Laba <[email protected]>Reviewed-on: https://git-amr-1.devtools.intel.com/gerrit/301695
This Reviewed-on shouldn't be here.
Quoted 21 lines
Reviewed-by Aleksandr Loktionov <[email protected]>Tested-by Aleksandr Loktionov <[email protected]>--- drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 2 ++ 1 file changed, 2 insertions(+)drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c +2
-0@@ -1423,6 +1423,8 @@ bool i40e_reset_vf(struct i40e_vf *vf, bool flr)/* If the VFs have been disabled, this means something else is * resetting the VF, so we shouldn't continue. +* This is a global state of a PF, so it is possible that +* a different VF is in reset. */ if (test_and_set_bit (__I40E_VF_DISABLE, pf->state))return false;