Commit d8c6bee0 authored by Ivan Vecera's avatar Ivan Vecera Committed by Jakub Kicinski
Browse files

i40e: Remove VF MAC types



The i40e_hw.mac.type cannot to be equal to I40E_MAC_VF or
I40E_MAC_X722_VF so remove helper i40e_is_vf(), simplify
i40e_adminq_init_regs() and remove enums for these VF MAC types.

Signed-off-by: default avatarIvan Vecera <ivecera@redhat.com>
Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel)
Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
Link: https://lore.kernel.org/r/20231113231047.548659-14-anthony.l.nguyen@intel.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent e329a8b9
Loading
Loading
Loading
Loading
+10 −23
Original line number Diff line number Diff line
@@ -17,18 +17,6 @@ static void i40e_resume_aq(struct i40e_hw *hw);
static void i40e_adminq_init_regs(struct i40e_hw *hw)
{
	/* set head and tail registers in our local struct */
	if (i40e_is_vf(hw)) {
		hw->aq.asq.tail = I40E_VF_ATQT1;
		hw->aq.asq.head = I40E_VF_ATQH1;
		hw->aq.asq.len  = I40E_VF_ATQLEN1;
		hw->aq.asq.bal  = I40E_VF_ATQBAL1;
		hw->aq.asq.bah  = I40E_VF_ATQBAH1;
		hw->aq.arq.tail = I40E_VF_ARQT1;
		hw->aq.arq.head = I40E_VF_ARQH1;
		hw->aq.arq.len  = I40E_VF_ARQLEN1;
		hw->aq.arq.bal  = I40E_VF_ARQBAL1;
		hw->aq.arq.bah  = I40E_VF_ARQBAH1;
	} else {
	hw->aq.asq.tail = I40E_PF_ATQT;
	hw->aq.asq.head = I40E_PF_ATQH;
	hw->aq.asq.len  = I40E_PF_ATQLEN;
@@ -40,7 +28,6 @@ static void i40e_adminq_init_regs(struct i40e_hw *hw)
	hw->aq.arq.bal  = I40E_PF_ARQBAL;
	hw->aq.arq.bah  = I40E_PF_ARQBAH;
}
}

/**
 *  i40e_alloc_adminq_asq_ring - Allocate Admin Queue send rings
+0 −8
Original line number Diff line number Diff line
@@ -64,9 +64,7 @@ typedef void (*I40E_ADMINQ_CALLBACK)(struct i40e_hw *, struct i40e_aq_desc *);
enum i40e_mac_type {
	I40E_MAC_UNKNOWN = 0,
	I40E_MAC_XL710,
	I40E_MAC_VF,
	I40E_MAC_X722,
	I40E_MAC_X722_VF,
	I40E_MAC_GENERIC,
};

@@ -588,12 +586,6 @@ struct i40e_hw {
	char err_str[16];
};

static inline bool i40e_is_vf(struct i40e_hw *hw)
{
	return (hw->mac.type == I40E_MAC_VF ||
		hw->mac.type == I40E_MAC_X722_VF);
}

/**
 * i40e_is_aq_api_ver_ge
 * @hw: pointer to i40e_hw structure