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

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.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent e329a8b9
...@@ -17,29 +17,16 @@ static void i40e_resume_aq(struct i40e_hw *hw); ...@@ -17,29 +17,16 @@ static void i40e_resume_aq(struct i40e_hw *hw);
static void i40e_adminq_init_regs(struct i40e_hw *hw) static void i40e_adminq_init_regs(struct i40e_hw *hw)
{ {
/* set head and tail registers in our local struct */ /* set head and tail registers in our local struct */
if (i40e_is_vf(hw)) { hw->aq.asq.tail = I40E_PF_ATQT;
hw->aq.asq.tail = I40E_VF_ATQT1; hw->aq.asq.head = I40E_PF_ATQH;
hw->aq.asq.head = I40E_VF_ATQH1; hw->aq.asq.len = I40E_PF_ATQLEN;
hw->aq.asq.len = I40E_VF_ATQLEN1; hw->aq.asq.bal = I40E_PF_ATQBAL;
hw->aq.asq.bal = I40E_VF_ATQBAL1; hw->aq.asq.bah = I40E_PF_ATQBAH;
hw->aq.asq.bah = I40E_VF_ATQBAH1; hw->aq.arq.tail = I40E_PF_ARQT;
hw->aq.arq.tail = I40E_VF_ARQT1; hw->aq.arq.head = I40E_PF_ARQH;
hw->aq.arq.head = I40E_VF_ARQH1; hw->aq.arq.len = I40E_PF_ARQLEN;
hw->aq.arq.len = I40E_VF_ARQLEN1; hw->aq.arq.bal = I40E_PF_ARQBAL;
hw->aq.arq.bal = I40E_VF_ARQBAL1; hw->aq.arq.bah = I40E_PF_ARQBAH;
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;
hw->aq.asq.bal = I40E_PF_ATQBAL;
hw->aq.asq.bah = I40E_PF_ATQBAH;
hw->aq.arq.tail = I40E_PF_ARQT;
hw->aq.arq.head = I40E_PF_ARQH;
hw->aq.arq.len = I40E_PF_ARQLEN;
hw->aq.arq.bal = I40E_PF_ARQBAL;
hw->aq.arq.bah = I40E_PF_ARQBAH;
}
} }
/** /**
......
...@@ -64,9 +64,7 @@ typedef void (*I40E_ADMINQ_CALLBACK)(struct i40e_hw *, struct i40e_aq_desc *); ...@@ -64,9 +64,7 @@ typedef void (*I40E_ADMINQ_CALLBACK)(struct i40e_hw *, struct i40e_aq_desc *);
enum i40e_mac_type { enum i40e_mac_type {
I40E_MAC_UNKNOWN = 0, I40E_MAC_UNKNOWN = 0,
I40E_MAC_XL710, I40E_MAC_XL710,
I40E_MAC_VF,
I40E_MAC_X722, I40E_MAC_X722,
I40E_MAC_X722_VF,
I40E_MAC_GENERIC, I40E_MAC_GENERIC,
}; };
...@@ -588,12 +586,6 @@ struct i40e_hw { ...@@ -588,12 +586,6 @@ struct i40e_hw {
char err_str[16]; 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 * i40e_is_aq_api_ver_ge
* @hw: pointer to i40e_hw structure * @hw: pointer to i40e_hw structure
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment