i40e: Fix for failed to init adminq while VF reset
Subsystems (2)
Sornek
PATCH 1/1 i40e: Fix for failed to init adminq while VF reset
From: Karen Sornek <[email protected]>
Fix for failed to init adminq: -53 while VF is resetting via MAC address changing procedure.
Added sync module to avoid reading deadbeef value in reinit adminq during software reset.
Without this patch it is possible to trigger VF reset procedure during reinit adminq. This resulted in an incorrect reading of value from the AQP registers and generated the -53 error.
--- .../net/ethernet/intel/i40e/i40e_register.h | 3 ++ .../ethernet/intel/i40e/i40e_virtchnl_pf.c | 44 ++++++++++++++++++- .../ethernet/intel/i40e/i40e_virtchnl_pf.h | 1 + 3 files changed, 46 insertions(+), 2 deletions(-)
drivers/net/ethernet/intel/i40e/i40e_register.h +3 -0
@@ -413,6 +413,9 @@#define I40E_VFINT_DYN_CTLN (_INTVF) (0x00024800 + ((_INTVF) * 4))/* _i=0...511 */ /* Reset: VFR */ #define I40E_VFINT_DYN_CTLN_CLEARPBA_SHIFT 1#define I40E_VFINT_DYN_CTLN_CLEARPBA_MASK I40E_MASK(0x1, I40E_VFINT_DYN_CTLN_CLEARPBA_SHIFT) +#define I40E_VFINT_ICR0_ADMINQ_SHIFT 30 +#define I40E_VFINT_ICR0_ADMINQ_MASK I40E_MASK(0x1, I40E_VFINT_ICR0_ADMINQ_SHIFT) +#define I40E_VFINT_ICR0_ENA (_VF) (0x0002C000 + ((_VF) * 4))/* _i=0...127 */ /* Reset: CORER */ #define I40E_VPINT_AEQCTL (_VF) (0x0002B800 + ((_VF) * 4))/* _i=0...127 */ /* Reset: CORER */ #define I40E_VPINT_AEQCTL_MSIX_INDX_SHIFT 0#define I40E_VPINT_AEQCTL_ITR_INDX_SHIFT 11
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c +42 -2
64 lines not on this page · raw message
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h +1 -0
@@ -19,6 +19,7 @@#define I40E_MAX_VF_PROMISC_FLAGS 3#define I40E_VF_STATE_WAIT_COUNT 20 +#define I40E_VFR_WAIT_COUNT 100#define I40E_VF_RESET_TIME_MIN 30000000/* time in nsec */ /* Various queue ctrls */
Signature · 1 line
2.27.0
Nguyen
PATCH 1/1 i40e: Fix for failed to init adminq while VF reset
Quoted 10 lines · Karen
From: Karen Sornek <[email protected]>
Fix for failed to init adminq: -53 while VF is resetting via MAC address changing procedure.
Added sync module to avoid reading deadbeef value in reinit adminq during software reset.
Without this patch it is possible to trigger VF reset procedure during reinit adminq. This resulted in an incorrect reading of value from the AQP registers and generated the -53 error.
If this is for net, it needs a Fixes:
Quoted 2 lines
Signed-off-by Grzegorz Szczurek <[email protected]>Signed-off-by Karen Sornek <[email protected]>