Skip to content
This repository was archived by the owner on Sep 30, 2019. It is now read-only.

Commit 1bc7fe6

Browse files
committed
Merge branch '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue
Jeff Kirsher says: ==================== 10GbE Intel Wired LAN Driver Updates 2016-04-25 This series contains updates to ixgbe and ixgbevf. Emil provides several patches, starting with the consolidation of the logic behind configuring spoof checking. Fixed an issue which was causing link issues for backplane devices because x550em_a/x devices did not have a default value for mac->ops.setup_link. Refactored the ethtool stats to bring the logic closer to how ixgbe handles stats and sets up per-queue stats for ixgbevf. Mark adds a new register to wait for previous register writes to complete before issuing a register read, which is needed when slower links are in use. Fixed the flow control setup for x550em_a, the incorrect fc_setup function was being used. Don added a workaround for empty SFP+ cage crosstalk, since on some systems the crosstalk could lead to link flap on empty SFP+ cages. Jake converts ixgbe and ixgbevf to use the BIT() macro. Alex Duyck adds support for partial GSO segmentation in the case of tunnels for ixgbe and ixgbevf. Then preps for HyperV by moving the API negotiation into mac_ops. Arnd Bergmann provides a fix for the ARM compile warnings in linux-next by converting the use of a udelay() to msleep(). ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2 parents e7157f2 + d4f90d9 commit 1bc7fe6

24 files changed

+661
-505
lines changed

drivers/net/ethernet/intel/ixgbe/ixgbe.h

Lines changed: 37 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -143,14 +143,11 @@ struct vf_data_storage {
143143
unsigned char vf_mac_addresses[ETH_ALEN];
144144
u16 vf_mc_hashes[IXGBE_MAX_VF_MC_ENTRIES];
145145
u16 num_vf_mc_hashes;
146-
u16 default_vf_vlan_id;
147-
u16 vlans_enabled;
148146
bool clear_to_send;
149147
bool pf_set_mac;
150148
u16 pf_vlan; /* When set, guest VLAN config not allowed. */
151149
u16 pf_qos;
152150
u16 tx_rate;
153-
u16 vlan_count;
154151
u8 spoofchk_enabled;
155152
bool rss_query_enabled;
156153
u8 trusted;
@@ -173,7 +170,7 @@ struct vf_macvlans {
173170
};
174171

175172
#define IXGBE_MAX_TXD_PWR 14
176-
#define IXGBE_MAX_DATA_PER_TXD (1 << IXGBE_MAX_TXD_PWR)
173+
#define IXGBE_MAX_DATA_PER_TXD (1u << IXGBE_MAX_TXD_PWR)
177174

178175
/* Tx Descriptors needed, worst case */
179176
#define TXD_USE_COUNT(S) DIV_ROUND_UP((S), IXGBE_MAX_DATA_PER_TXD)
@@ -623,44 +620,44 @@ struct ixgbe_adapter {
623620
* thus the additional *_CAPABLE flags.
624621
*/
625622
u32 flags;
626-
#define IXGBE_FLAG_MSI_ENABLED (u32)(1 << 1)
627-
#define IXGBE_FLAG_MSIX_ENABLED (u32)(1 << 3)
628-
#define IXGBE_FLAG_RX_1BUF_CAPABLE (u32)(1 << 4)
629-
#define IXGBE_FLAG_RX_PS_CAPABLE (u32)(1 << 5)
630-
#define IXGBE_FLAG_RX_PS_ENABLED (u32)(1 << 6)
631-
#define IXGBE_FLAG_DCA_ENABLED (u32)(1 << 8)
632-
#define IXGBE_FLAG_DCA_CAPABLE (u32)(1 << 9)
633-
#define IXGBE_FLAG_IMIR_ENABLED (u32)(1 << 10)
634-
#define IXGBE_FLAG_MQ_CAPABLE (u32)(1 << 11)
635-
#define IXGBE_FLAG_DCB_ENABLED (u32)(1 << 12)
636-
#define IXGBE_FLAG_VMDQ_CAPABLE (u32)(1 << 13)
637-
#define IXGBE_FLAG_VMDQ_ENABLED (u32)(1 << 14)
638-
#define IXGBE_FLAG_FAN_FAIL_CAPABLE (u32)(1 << 15)
639-
#define IXGBE_FLAG_NEED_LINK_UPDATE (u32)(1 << 16)
640-
#define IXGBE_FLAG_NEED_LINK_CONFIG (u32)(1 << 17)
641-
#define IXGBE_FLAG_FDIR_HASH_CAPABLE (u32)(1 << 18)
642-
#define IXGBE_FLAG_FDIR_PERFECT_CAPABLE (u32)(1 << 19)
643-
#define IXGBE_FLAG_FCOE_CAPABLE (u32)(1 << 20)
644-
#define IXGBE_FLAG_FCOE_ENABLED (u32)(1 << 21)
645-
#define IXGBE_FLAG_SRIOV_CAPABLE (u32)(1 << 22)
646-
#define IXGBE_FLAG_SRIOV_ENABLED (u32)(1 << 23)
623+
#define IXGBE_FLAG_MSI_ENABLED BIT(1)
624+
#define IXGBE_FLAG_MSIX_ENABLED BIT(3)
625+
#define IXGBE_FLAG_RX_1BUF_CAPABLE BIT(4)
626+
#define IXGBE_FLAG_RX_PS_CAPABLE BIT(5)
627+
#define IXGBE_FLAG_RX_PS_ENABLED BIT(6)
628+
#define IXGBE_FLAG_DCA_ENABLED BIT(8)
629+
#define IXGBE_FLAG_DCA_CAPABLE BIT(9)
630+
#define IXGBE_FLAG_IMIR_ENABLED BIT(10)
631+
#define IXGBE_FLAG_MQ_CAPABLE BIT(11)
632+
#define IXGBE_FLAG_DCB_ENABLED BIT(12)
633+
#define IXGBE_FLAG_VMDQ_CAPABLE BIT(13)
634+
#define IXGBE_FLAG_VMDQ_ENABLED BIT(14)
635+
#define IXGBE_FLAG_FAN_FAIL_CAPABLE BIT(15)
636+
#define IXGBE_FLAG_NEED_LINK_UPDATE BIT(16)
637+
#define IXGBE_FLAG_NEED_LINK_CONFIG BIT(17)
638+
#define IXGBE_FLAG_FDIR_HASH_CAPABLE BIT(18)
639+
#define IXGBE_FLAG_FDIR_PERFECT_CAPABLE BIT(19)
640+
#define IXGBE_FLAG_FCOE_CAPABLE BIT(20)
641+
#define IXGBE_FLAG_FCOE_ENABLED BIT(21)
642+
#define IXGBE_FLAG_SRIOV_CAPABLE BIT(22)
643+
#define IXGBE_FLAG_SRIOV_ENABLED BIT(23)
647644
#define IXGBE_FLAG_VXLAN_OFFLOAD_CAPABLE BIT(24)
648645
#define IXGBE_FLAG_RX_HWTSTAMP_ENABLED BIT(25)
649646
#define IXGBE_FLAG_RX_HWTSTAMP_IN_REGISTER BIT(26)
650647

651648
u32 flags2;
652-
#define IXGBE_FLAG2_RSC_CAPABLE (u32)(1 << 0)
653-
#define IXGBE_FLAG2_RSC_ENABLED (u32)(1 << 1)
654-
#define IXGBE_FLAG2_TEMP_SENSOR_CAPABLE (u32)(1 << 2)
655-
#define IXGBE_FLAG2_TEMP_SENSOR_EVENT (u32)(1 << 3)
656-
#define IXGBE_FLAG2_SEARCH_FOR_SFP (u32)(1 << 4)
657-
#define IXGBE_FLAG2_SFP_NEEDS_RESET (u32)(1 << 5)
658-
#define IXGBE_FLAG2_RESET_REQUESTED (u32)(1 << 6)
659-
#define IXGBE_FLAG2_FDIR_REQUIRES_REINIT (u32)(1 << 7)
660-
#define IXGBE_FLAG2_RSS_FIELD_IPV4_UDP (u32)(1 << 8)
661-
#define IXGBE_FLAG2_RSS_FIELD_IPV6_UDP (u32)(1 << 9)
662-
#define IXGBE_FLAG2_PTP_PPS_ENABLED (u32)(1 << 10)
663-
#define IXGBE_FLAG2_PHY_INTERRUPT (u32)(1 << 11)
649+
#define IXGBE_FLAG2_RSC_CAPABLE BIT(0)
650+
#define IXGBE_FLAG2_RSC_ENABLED BIT(1)
651+
#define IXGBE_FLAG2_TEMP_SENSOR_CAPABLE BIT(2)
652+
#define IXGBE_FLAG2_TEMP_SENSOR_EVENT BIT(3)
653+
#define IXGBE_FLAG2_SEARCH_FOR_SFP BIT(4)
654+
#define IXGBE_FLAG2_SFP_NEEDS_RESET BIT(5)
655+
#define IXGBE_FLAG2_RESET_REQUESTED BIT(6)
656+
#define IXGBE_FLAG2_FDIR_REQUIRES_REINIT BIT(7)
657+
#define IXGBE_FLAG2_RSS_FIELD_IPV4_UDP BIT(8)
658+
#define IXGBE_FLAG2_RSS_FIELD_IPV6_UDP BIT(9)
659+
#define IXGBE_FLAG2_PTP_PPS_ENABLED BIT(10)
660+
#define IXGBE_FLAG2_PHY_INTERRUPT BIT(11)
664661
#define IXGBE_FLAG2_VXLAN_REREG_NEEDED BIT(12)
665662
#define IXGBE_FLAG2_VLAN_PROMISC BIT(13)
666663

@@ -806,6 +803,8 @@ struct ixgbe_adapter {
806803

807804
#define IXGBE_RSS_KEY_SIZE 40 /* size of RSS Hash Key in bytes */
808805
u32 rss_key[IXGBE_RSS_KEY_SIZE / sizeof(u32)];
806+
807+
bool need_crosstalk_fix;
809808
};
810809

811810
static inline u8 ixgbe_max_rss_indices(struct ixgbe_adapter *adapter)
@@ -828,7 +827,7 @@ struct ixgbe_fdir_filter {
828827
struct hlist_node fdir_node;
829828
union ixgbe_atr_input filter;
830829
u16 sw_idx;
831-
u16 action;
830+
u64 action;
832831
};
833832

834833
enum ixgbe_state_t {

drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -792,7 +792,7 @@ static s32 ixgbe_reset_hw_82598(struct ixgbe_hw *hw)
792792
}
793793

794794
gheccr = IXGBE_READ_REG(hw, IXGBE_GHECCR);
795-
gheccr &= ~((1 << 21) | (1 << 18) | (1 << 9) | (1 << 6));
795+
gheccr &= ~(BIT(21) | BIT(18) | BIT(9) | BIT(6));
796796
IXGBE_WRITE_REG(hw, IXGBE_GHECCR, gheccr);
797797

798798
/*
@@ -914,10 +914,10 @@ static s32 ixgbe_set_vfta_82598(struct ixgbe_hw *hw, u32 vlan, u32 vind,
914914
bits = IXGBE_READ_REG(hw, IXGBE_VFTA(regindex));
915915
if (vlan_on)
916916
/* Turn on this VLAN id */
917-
bits |= (1 << bitindex);
917+
bits |= BIT(bitindex);
918918
else
919919
/* Turn off this VLAN id */
920-
bits &= ~(1 << bitindex);
920+
bits &= ~BIT(bitindex);
921921
IXGBE_WRITE_REG(hw, IXGBE_VFTA(regindex), bits);
922922

923923
return 0;

drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1296,17 +1296,17 @@ s32 ixgbe_init_fdir_perfect_82599(struct ixgbe_hw *hw, u32 fdirctrl)
12961296
#define IXGBE_COMPUTE_SIG_HASH_ITERATION(_n) \
12971297
do { \
12981298
u32 n = (_n); \
1299-
if (IXGBE_ATR_COMMON_HASH_KEY & (0x01 << n)) \
1299+
if (IXGBE_ATR_COMMON_HASH_KEY & BIT(n)) \
13001300
common_hash ^= lo_hash_dword >> n; \
1301-
else if (IXGBE_ATR_BUCKET_HASH_KEY & (0x01 << n)) \
1301+
else if (IXGBE_ATR_BUCKET_HASH_KEY & BIT(n)) \
13021302
bucket_hash ^= lo_hash_dword >> n; \
1303-
else if (IXGBE_ATR_SIGNATURE_HASH_KEY & (0x01 << n)) \
1303+
else if (IXGBE_ATR_SIGNATURE_HASH_KEY & BIT(n)) \
13041304
sig_hash ^= lo_hash_dword << (16 - n); \
1305-
if (IXGBE_ATR_COMMON_HASH_KEY & (0x01 << (n + 16))) \
1305+
if (IXGBE_ATR_COMMON_HASH_KEY & BIT(n + 16)) \
13061306
common_hash ^= hi_hash_dword >> n; \
1307-
else if (IXGBE_ATR_BUCKET_HASH_KEY & (0x01 << (n + 16))) \
1307+
else if (IXGBE_ATR_BUCKET_HASH_KEY & BIT(n + 16)) \
13081308
bucket_hash ^= hi_hash_dword >> n; \
1309-
else if (IXGBE_ATR_SIGNATURE_HASH_KEY & (0x01 << (n + 16))) \
1309+
else if (IXGBE_ATR_SIGNATURE_HASH_KEY & BIT(n + 16)) \
13101310
sig_hash ^= hi_hash_dword << (16 - n); \
13111311
} while (0)
13121312

@@ -1440,9 +1440,9 @@ s32 ixgbe_fdir_add_signature_filter_82599(struct ixgbe_hw *hw,
14401440
#define IXGBE_COMPUTE_BKT_HASH_ITERATION(_n) \
14411441
do { \
14421442
u32 n = (_n); \
1443-
if (IXGBE_ATR_BUCKET_HASH_KEY & (0x01 << n)) \
1443+
if (IXGBE_ATR_BUCKET_HASH_KEY & BIT(n)) \
14441444
bucket_hash ^= lo_hash_dword >> n; \
1445-
if (IXGBE_ATR_BUCKET_HASH_KEY & (0x01 << (n + 16))) \
1445+
if (IXGBE_ATR_BUCKET_HASH_KEY & BIT(n + 16)) \
14461446
bucket_hash ^= hi_hash_dword >> n; \
14471447
} while (0)
14481448

drivers/net/ethernet/intel/ixgbe/ixgbe_common.c

Lines changed: 26 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -825,8 +825,8 @@ s32 ixgbe_init_eeprom_params_generic(struct ixgbe_hw *hw)
825825
*/
826826
eeprom_size = (u16)((eec & IXGBE_EEC_SIZE) >>
827827
IXGBE_EEC_SIZE_SHIFT);
828-
eeprom->word_size = 1 << (eeprom_size +
829-
IXGBE_EEPROM_WORD_SIZE_SHIFT);
828+
eeprom->word_size = BIT(eeprom_size +
829+
IXGBE_EEPROM_WORD_SIZE_SHIFT);
830830
}
831831

832832
if (eec & IXGBE_EEC_ADDR_SIZE)
@@ -1502,7 +1502,7 @@ static void ixgbe_shift_out_eeprom_bits(struct ixgbe_hw *hw, u16 data,
15021502
* Mask is used to shift "count" bits of "data" out to the EEPROM
15031503
* one bit at a time. Determine the starting bit based on count
15041504
*/
1505-
mask = 0x01 << (count - 1);
1505+
mask = BIT(count - 1);
15061506

15071507
for (i = 0; i < count; i++) {
15081508
/*
@@ -1991,7 +1991,7 @@ static void ixgbe_set_mta(struct ixgbe_hw *hw, u8 *mc_addr)
19911991
*/
19921992
vector_reg = (vector >> 5) & 0x7F;
19931993
vector_bit = vector & 0x1F;
1994-
hw->mac.mta_shadow[vector_reg] |= (1 << vector_bit);
1994+
hw->mac.mta_shadow[vector_reg] |= BIT(vector_bit);
19951995
}
19961996

19971997
/**
@@ -2921,10 +2921,10 @@ s32 ixgbe_clear_vmdq_generic(struct ixgbe_hw *hw, u32 rar, u32 vmdq)
29212921
mpsar_hi = 0;
29222922
}
29232923
} else if (vmdq < 32) {
2924-
mpsar_lo &= ~(1 << vmdq);
2924+
mpsar_lo &= ~BIT(vmdq);
29252925
IXGBE_WRITE_REG(hw, IXGBE_MPSAR_LO(rar), mpsar_lo);
29262926
} else {
2927-
mpsar_hi &= ~(1 << (vmdq - 32));
2927+
mpsar_hi &= ~BIT(vmdq - 32);
29282928
IXGBE_WRITE_REG(hw, IXGBE_MPSAR_HI(rar), mpsar_hi);
29292929
}
29302930

@@ -2953,11 +2953,11 @@ s32 ixgbe_set_vmdq_generic(struct ixgbe_hw *hw, u32 rar, u32 vmdq)
29532953

29542954
if (vmdq < 32) {
29552955
mpsar = IXGBE_READ_REG(hw, IXGBE_MPSAR_LO(rar));
2956-
mpsar |= 1 << vmdq;
2956+
mpsar |= BIT(vmdq);
29572957
IXGBE_WRITE_REG(hw, IXGBE_MPSAR_LO(rar), mpsar);
29582958
} else {
29592959
mpsar = IXGBE_READ_REG(hw, IXGBE_MPSAR_HI(rar));
2960-
mpsar |= 1 << (vmdq - 32);
2960+
mpsar |= BIT(vmdq - 32);
29612961
IXGBE_WRITE_REG(hw, IXGBE_MPSAR_HI(rar), mpsar);
29622962
}
29632963
return 0;
@@ -2978,11 +2978,11 @@ s32 ixgbe_set_vmdq_san_mac_generic(struct ixgbe_hw *hw, u32 vmdq)
29782978
u32 rar = hw->mac.san_mac_rar_index;
29792979

29802980
if (vmdq < 32) {
2981-
IXGBE_WRITE_REG(hw, IXGBE_MPSAR_LO(rar), 1 << vmdq);
2981+
IXGBE_WRITE_REG(hw, IXGBE_MPSAR_LO(rar), BIT(vmdq));
29822982
IXGBE_WRITE_REG(hw, IXGBE_MPSAR_HI(rar), 0);
29832983
} else {
29842984
IXGBE_WRITE_REG(hw, IXGBE_MPSAR_LO(rar), 0);
2985-
IXGBE_WRITE_REG(hw, IXGBE_MPSAR_HI(rar), 1 << (vmdq - 32));
2985+
IXGBE_WRITE_REG(hw, IXGBE_MPSAR_HI(rar), BIT(vmdq - 32));
29862986
}
29872987

29882988
return 0;
@@ -3082,7 +3082,7 @@ s32 ixgbe_set_vfta_generic(struct ixgbe_hw *hw, u32 vlan, u32 vind,
30823082
* bits[4-0]: which bit in the register
30833083
*/
30843084
regidx = vlan / 32;
3085-
vfta_delta = 1 << (vlan % 32);
3085+
vfta_delta = BIT(vlan % 32);
30863086
vfta = IXGBE_READ_REG(hw, IXGBE_VFTA(regidx));
30873087

30883088
/* vfta_delta represents the difference between the current value
@@ -3113,12 +3113,12 @@ s32 ixgbe_set_vfta_generic(struct ixgbe_hw *hw, u32 vlan, u32 vind,
31133113
bits = IXGBE_READ_REG(hw, IXGBE_VLVFB(vlvf_index * 2 + vind / 32));
31143114

31153115
/* set the pool bit */
3116-
bits |= 1 << (vind % 32);
3116+
bits |= BIT(vind % 32);
31173117
if (vlan_on)
31183118
goto vlvf_update;
31193119

31203120
/* clear the pool bit */
3121-
bits ^= 1 << (vind % 32);
3121+
bits ^= BIT(vind % 32);
31223122

31233123
if (!bits &&
31243124
!IXGBE_READ_REG(hw, IXGBE_VLVFB(vlvf_index * 2 + 1 - vind / 32))) {
@@ -3310,43 +3310,25 @@ s32 ixgbe_get_wwn_prefix_generic(struct ixgbe_hw *hw, u16 *wwnn_prefix,
33103310
/**
33113311
* ixgbe_set_mac_anti_spoofing - Enable/Disable MAC anti-spoofing
33123312
* @hw: pointer to hardware structure
3313-
* @enable: enable or disable switch for anti-spoofing
3314-
* @pf: Physical Function pool - do not enable anti-spoofing for the PF
3313+
* @enable: enable or disable switch for MAC anti-spoofing
3314+
* @vf: Virtual Function pool - VF Pool to set for MAC anti-spoofing
33153315
*
33163316
**/
3317-
void ixgbe_set_mac_anti_spoofing(struct ixgbe_hw *hw, bool enable, int pf)
3317+
void ixgbe_set_mac_anti_spoofing(struct ixgbe_hw *hw, bool enable, int vf)
33183318
{
3319-
int j;
3320-
int pf_target_reg = pf >> 3;
3321-
int pf_target_shift = pf % 8;
3322-
u32 pfvfspoof = 0;
3319+
int vf_target_reg = vf >> 3;
3320+
int vf_target_shift = vf % 8;
3321+
u32 pfvfspoof;
33233322

33243323
if (hw->mac.type == ixgbe_mac_82598EB)
33253324
return;
33263325

3326+
pfvfspoof = IXGBE_READ_REG(hw, IXGBE_PFVFSPOOF(vf_target_reg));
33273327
if (enable)
3328-
pfvfspoof = IXGBE_SPOOF_MACAS_MASK;
3329-
3330-
/*
3331-
* PFVFSPOOF register array is size 8 with 8 bits assigned to
3332-
* MAC anti-spoof enables in each register array element.
3333-
*/
3334-
for (j = 0; j < pf_target_reg; j++)
3335-
IXGBE_WRITE_REG(hw, IXGBE_PFVFSPOOF(j), pfvfspoof);
3336-
3337-
/*
3338-
* The PF should be allowed to spoof so that it can support
3339-
* emulation mode NICs. Do not set the bits assigned to the PF
3340-
*/
3341-
pfvfspoof &= (1 << pf_target_shift) - 1;
3342-
IXGBE_WRITE_REG(hw, IXGBE_PFVFSPOOF(j), pfvfspoof);
3343-
3344-
/*
3345-
* Remaining pools belong to the PF so they do not need to have
3346-
* anti-spoofing enabled.
3347-
*/
3348-
for (j++; j < IXGBE_PFVFSPOOF_REG_COUNT; j++)
3349-
IXGBE_WRITE_REG(hw, IXGBE_PFVFSPOOF(j), 0);
3328+
pfvfspoof |= BIT(vf_target_shift);
3329+
else
3330+
pfvfspoof &= ~BIT(vf_target_shift);
3331+
IXGBE_WRITE_REG(hw, IXGBE_PFVFSPOOF(vf_target_reg), pfvfspoof);
33503332
}
33513333

33523334
/**
@@ -3367,9 +3349,9 @@ void ixgbe_set_vlan_anti_spoofing(struct ixgbe_hw *hw, bool enable, int vf)
33673349

33683350
pfvfspoof = IXGBE_READ_REG(hw, IXGBE_PFVFSPOOF(vf_target_reg));
33693351
if (enable)
3370-
pfvfspoof |= (1 << vf_target_shift);
3352+
pfvfspoof |= BIT(vf_target_shift);
33713353
else
3372-
pfvfspoof &= ~(1 << vf_target_shift);
3354+
pfvfspoof &= ~BIT(vf_target_shift);
33733355
IXGBE_WRITE_REG(hw, IXGBE_PFVFSPOOF(vf_target_reg), pfvfspoof);
33743356
}
33753357

drivers/net/ethernet/intel/ixgbe/ixgbe_common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ s32 prot_autoc_write_generic(struct ixgbe_hw *hw, u32 reg_val, bool locked);
106106

107107
s32 ixgbe_blink_led_start_generic(struct ixgbe_hw *hw, u32 index);
108108
s32 ixgbe_blink_led_stop_generic(struct ixgbe_hw *hw, u32 index);
109-
void ixgbe_set_mac_anti_spoofing(struct ixgbe_hw *hw, bool enable, int pf);
109+
void ixgbe_set_mac_anti_spoofing(struct ixgbe_hw *hw, bool enable, int vf);
110110
void ixgbe_set_vlan_anti_spoofing(struct ixgbe_hw *hw, bool enable, int vf);
111111
s32 ixgbe_get_device_caps_generic(struct ixgbe_hw *hw, u16 *device_caps);
112112
s32 ixgbe_set_fw_drv_ver_generic(struct ixgbe_hw *hw, u8 maj, u8 min,

drivers/net/ethernet/intel/ixgbe/ixgbe_dcb.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ void ixgbe_dcb_unpack_pfc(struct ixgbe_dcb_config *cfg, u8 *pfc_en)
186186

187187
for (*pfc_en = 0, tc = 0; tc < MAX_TRAFFIC_CLASS; tc++) {
188188
if (tc_config[tc].dcb_pfc != pfc_disabled)
189-
*pfc_en |= 1 << tc;
189+
*pfc_en |= BIT(tc);
190190
}
191191
}
192192

@@ -232,7 +232,7 @@ void ixgbe_dcb_unpack_prio(struct ixgbe_dcb_config *cfg, int direction,
232232
u8 ixgbe_dcb_get_tc_from_up(struct ixgbe_dcb_config *cfg, int direction, u8 up)
233233
{
234234
struct tc_configuration *tc_config = &cfg->tc_config[0];
235-
u8 prio_mask = 1 << up;
235+
u8 prio_mask = BIT(up);
236236
u8 tc = cfg->num_tcs.pg_tcs;
237237

238238
/* If tc is 0 then DCB is likely not enabled or supported */

drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_82598.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ s32 ixgbe_dcb_config_pfc_82598(struct ixgbe_hw *hw, u8 pfc_en)
210210

211211
/* Configure PFC Tx thresholds per TC */
212212
for (i = 0; i < MAX_TRAFFIC_CLASS; i++) {
213-
if (!(pfc_en & (1 << i))) {
213+
if (!(pfc_en & BIT(i))) {
214214
IXGBE_WRITE_REG(hw, IXGBE_FCRTL(i), 0);
215215
IXGBE_WRITE_REG(hw, IXGBE_FCRTH(i), 0);
216216
continue;

drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_82599.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ s32 ixgbe_dcb_config_pfc_82599(struct ixgbe_hw *hw, u8 pfc_en, u8 *prio_tc)
248248
int enabled = 0;
249249

250250
for (j = 0; j < MAX_USER_PRIORITY; j++) {
251-
if ((prio_tc[j] == i) && (pfc_en & (1 << j))) {
251+
if ((prio_tc[j] == i) && (pfc_en & BIT(j))) {
252252
enabled = 1;
253253
break;
254254
}

0 commit comments

Comments
 (0)