Skip to content

Commit 8679f07

Browse files
bcreeley13anguy11
authored andcommitted
ice: Fix VFR issues for AVF drivers that expect ATQLEN cleared
Some AVF drivers expect the VF_MBX_ATQLEN register to be cleared for any type of VFR/VFLR. Fix this by clearing the VF_MBX_ATQLEN register at the same time as VF_MBX_ARQLEN. Fixes: 82ba012 ("ice: clear VF ARQLEN register on reset") Signed-off-by: Brett Creeley <brett.creeley@intel.com> Tested-by: Konrad Jankowski <konrad0.jankowski@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
1 parent f045769 commit 8679f07

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

drivers/net/ethernet/intel/ice/ice_hw_autogen.h

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
#define PF_FW_ATQLEN_ATQOVFL_M BIT(29)
3232
#define PF_FW_ATQLEN_ATQCRIT_M BIT(30)
3333
#define VF_MBX_ARQLEN(_VF) (0x0022BC00 + ((_VF) * 4))
34+
#define VF_MBX_ATQLEN(_VF) (0x0022A800 + ((_VF) * 4))
3435
#define PF_FW_ATQLEN_ATQENABLE_M BIT(31)
3536
#define PF_FW_ATQT 0x00080400
3637
#define PF_MBX_ARQBAH 0x0022E400

drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c

+7-5
Original file line numberDiff line numberDiff line change
@@ -713,13 +713,15 @@ static void ice_trigger_vf_reset(struct ice_vf *vf, bool is_vflr, bool is_pfr)
713713
*/
714714
clear_bit(ICE_VF_STATE_INIT, vf->vf_states);
715715

716-
/* VF_MBX_ARQLEN is cleared by PFR, so the driver needs to clear it
717-
* in the case of VFR. If this is done for PFR, it can mess up VF
718-
* resets because the VF driver may already have started cleanup
719-
* by the time we get here.
716+
/* VF_MBX_ARQLEN and VF_MBX_ATQLEN are cleared by PFR, so the driver
717+
* needs to clear them in the case of VFR/VFLR. If this is done for
718+
* PFR, it can mess up VF resets because the VF driver may already
719+
* have started cleanup by the time we get here.
720720
*/
721-
if (!is_pfr)
721+
if (!is_pfr) {
722722
wr32(hw, VF_MBX_ARQLEN(vf->vf_id), 0);
723+
wr32(hw, VF_MBX_ATQLEN(vf->vf_id), 0);
724+
}
723725

724726
/* In the case of a VFLR, the HW has already reset the VF and we
725727
* just need to clean up, so don't hit the VFRTRIG register.

0 commit comments

Comments
 (0)