Skip to content

Commit d8c6bee

Browse files
Ivan Vecerakuba-moo
authored andcommitted
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: Ivan Vecera <[email protected]> Tested-by: Pucha Himasekhar Reddy <[email protected]> (A Contingent worker at Intel) Signed-off-by: Tony Nguyen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent e329a8b commit d8c6bee

File tree

2 files changed

+10
-31
lines changed

2 files changed

+10
-31
lines changed

drivers/net/ethernet/intel/i40e/i40e_adminq.c

Lines changed: 10 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -17,29 +17,16 @@ static void i40e_resume_aq(struct i40e_hw *hw);
1717
static void i40e_adminq_init_regs(struct i40e_hw *hw)
1818
{
1919
/* set head and tail registers in our local struct */
20-
if (i40e_is_vf(hw)) {
21-
hw->aq.asq.tail = I40E_VF_ATQT1;
22-
hw->aq.asq.head = I40E_VF_ATQH1;
23-
hw->aq.asq.len = I40E_VF_ATQLEN1;
24-
hw->aq.asq.bal = I40E_VF_ATQBAL1;
25-
hw->aq.asq.bah = I40E_VF_ATQBAH1;
26-
hw->aq.arq.tail = I40E_VF_ARQT1;
27-
hw->aq.arq.head = I40E_VF_ARQH1;
28-
hw->aq.arq.len = I40E_VF_ARQLEN1;
29-
hw->aq.arq.bal = I40E_VF_ARQBAL1;
30-
hw->aq.arq.bah = I40E_VF_ARQBAH1;
31-
} else {
32-
hw->aq.asq.tail = I40E_PF_ATQT;
33-
hw->aq.asq.head = I40E_PF_ATQH;
34-
hw->aq.asq.len = I40E_PF_ATQLEN;
35-
hw->aq.asq.bal = I40E_PF_ATQBAL;
36-
hw->aq.asq.bah = I40E_PF_ATQBAH;
37-
hw->aq.arq.tail = I40E_PF_ARQT;
38-
hw->aq.arq.head = I40E_PF_ARQH;
39-
hw->aq.arq.len = I40E_PF_ARQLEN;
40-
hw->aq.arq.bal = I40E_PF_ARQBAL;
41-
hw->aq.arq.bah = I40E_PF_ARQBAH;
42-
}
20+
hw->aq.asq.tail = I40E_PF_ATQT;
21+
hw->aq.asq.head = I40E_PF_ATQH;
22+
hw->aq.asq.len = I40E_PF_ATQLEN;
23+
hw->aq.asq.bal = I40E_PF_ATQBAL;
24+
hw->aq.asq.bah = I40E_PF_ATQBAH;
25+
hw->aq.arq.tail = I40E_PF_ARQT;
26+
hw->aq.arq.head = I40E_PF_ARQH;
27+
hw->aq.arq.len = I40E_PF_ARQLEN;
28+
hw->aq.arq.bal = I40E_PF_ARQBAL;
29+
hw->aq.arq.bah = I40E_PF_ARQBAH;
4330
}
4431

4532
/**

drivers/net/ethernet/intel/i40e/i40e_type.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,7 @@ typedef void (*I40E_ADMINQ_CALLBACK)(struct i40e_hw *, struct i40e_aq_desc *);
6464
enum i40e_mac_type {
6565
I40E_MAC_UNKNOWN = 0,
6666
I40E_MAC_XL710,
67-
I40E_MAC_VF,
6867
I40E_MAC_X722,
69-
I40E_MAC_X722_VF,
7068
I40E_MAC_GENERIC,
7169
};
7270

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

591-
static inline bool i40e_is_vf(struct i40e_hw *hw)
592-
{
593-
return (hw->mac.type == I40E_MAC_VF ||
594-
hw->mac.type == I40E_MAC_X722_VF);
595-
}
596-
597589
/**
598590
* i40e_is_aq_api_ver_ge
599591
* @hw: pointer to i40e_hw structure

0 commit comments

Comments
 (0)