Intel Wired LAN Driver Updates 2020-05-28
Subsystems (4)
This series contains updates to e1000, e1000e, igc, igb, ixgbe and i40e.
Takashi Iwai, from SUSE, replaces some uses of snprintf() with scnprintf() since the succeeding calls may go beyond the given buffer limit in i40e.
Jesper Dangaard Brouer fixes up code comments in i40e_xsk.c
Xie XiuQi, from Huawei, fixes a signed-integer-overflow warning ixgbe driver.
Jason Yan, from Huawei, converts '==' expression to bool to resolve warnings, also fixed a warning for assigning 0/1 to a bool variable in the ixgbe driver. Converts functions that always return 0 to void in the igb and i40e drivers.
YueHaibing, from Hauwei, cleans up dead code in ixgbe driver.
Sasha cleans up more dead code which is not used in the igc driver. Added receive error counter to reflect the total number of non-filtered packets received with errors. Fixed a register define name to properly reflect the register address being used.
Andre updates the igc driver to reject NFC rules that have multiple matches, which is not supported in i225 devices. Updates the total number of NFC rules supported and added a code comment to explain what is supported.
Punit Agrawal, from Toshiba, relaxes the condition to trigger a reset for ME, which was leading to inconsistency between the state of the hardware as expected by the driver in e1000e.
Hari, from the Linux community, cleaned up a code comment in the e1000 driver.
The following are changes since commit 394f9ebf92c899b42207d4e71465869656981ba1:
Merge branch 'hns3-next'
and are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue 10GbE
Andre Guedes (2):
igc: Reject NFC rules with multiple matches
igc: Fix IGC_MAX_RXNFC_RULES
Hari (1):
e1000: Fix typo in the comment
Jason Yan (4):
ixgbe: Remove conversion to bool in ixgbe_device_supports_autoneg_fc()
ixgbe: Use true, false for bool variable in __ixgbe_enable_sriov()
igb: make igb_set_fc_watermarks() return void
i40e: Make i40e_shutdown_adminq() return void
Jesper Dangaard Brouer (1):
i40e: trivial fixup of comments in i40e_xsk.c
Punit Agrawal (1):
e1000e: Relax condition to trigger reset for ME workaround
Sasha Neftin (5):
igc: Remove unused flags
igc: Remove symbol error counter
igc: Add Receive Error Counter
igc: Remove Sequence Error Counter
igc: Fix wrong register name
Takashi Iwai (1):
i40e: Use scnprintf() for avoiding potential buffer overflow
Xie XiuQi (1):
ixgbe: fix signed-integer-overflow warning
YueHaibing (1):
ixgbe: Remove unused inline function ixgbe_irq_disable_queues
drivers/net/ethernet/intel/e1000/e1000_hw.c | 2 +- drivers/net/ethernet/intel/e1000e/e1000.h | 1 - drivers/net/ethernet/intel/e1000e/netdev.c | 12 ++++---- drivers/net/ethernet/intel/i40e/i40e_adminq.c | 6 +--- drivers/net/ethernet/intel/i40e/i40e_main.c | 24 +++++++-------- .../net/ethernet/intel/i40e/i40e_prototype.h | 2 +- drivers/net/ethernet/intel/i40e/i40e_xsk.c | 4 +-- drivers/net/ethernet/intel/igb/e1000_mac.c | 9 ++---- drivers/net/ethernet/intel/igc/igc.h | 5 +++- drivers/net/ethernet/intel/igc/igc_defines.h | 4 --- drivers/net/ethernet/intel/igc/igc_ethtool.c | 9 +++--- drivers/net/ethernet/intel/igc/igc_mac.c | 5 ++-- drivers/net/ethernet/intel/igc/igc_main.c | 3 +- drivers/net/ethernet/intel/igc/igc_regs.h | 5 ++-- .../net/ethernet/intel/ixgbe/ixgbe_common.c | 5 ++-- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 29 ------------------- .../net/ethernet/intel/ixgbe/ixgbe_sriov.c | 2 +- 17 files changed, 40 insertions(+), 87 deletions(-)
Signature · 1 line
2.26.2
PATCH 1/17 i40e: Use scnprintf() for avoiding potential buffer overflow
From: Takashi Iwai <[email protected]>
Since snprintf() returns the would-be-output size instead of the actual output size, the succeeding calls may go beyond the given buffer limit. Fix it by replacing with scnprintf().
--- drivers/net/ethernet/intel/i40e/i40e_main.c | 24 ++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-)
drivers/net/ethernet/intel/i40e/i40e_main.c +12 -12
@@ -14486,29 +14486,29 @@ static void i40e_print_features(struct i40e_pf *pf) i =snprintf (buf,INFO_STRING_LEN ,"Features: PF-id[%d]" , hw->pf_id);#ifdef CONFIG_PCI_IOV - i +=snprintf (&buf[i],REMAIN (i)," VFs: %d" , pf->num_req_vfs); + i +=scnprintf (&buf[i],REMAIN (i)," VFs: %d" , pf->num_req_vfs);#endif - i +=snprintf (&buf[i],REMAIN (i)," VSIs: %d QP: %d" , + i +=scnprintf (&buf[i],REMAIN (i)," VSIs: %d QP: %d" , pf->hw.func_caps.num_vsis, pf->vsi[pf->lan_vsi]->num_queue_pairs);if (pf->flags &I40E_FLAG_RSS_ENABLED ) - i +=snprintf (&buf[i],REMAIN (i)," RSS" ); + i +=scnprintf (&buf[i],REMAIN (i)," RSS" );if (pf->flags &I40E_FLAG_FD_ATR_ENABLED ) - i +=snprintf (&buf[i],REMAIN (i)," FD_ATR" ); + i +=scnprintf (&buf[i],REMAIN (i)," FD_ATR" );if (pf->flags &I40E_FLAG_FD_SB_ENABLED ) { - i +=snprintf (&buf[i],REMAIN (i)," FD_SB" ); - i +=snprintf (&buf[i],REMAIN (i)," NTUPLE" ); + i +=scnprintf (&buf[i],REMAIN (i)," FD_SB" ); + i +=scnprintf (&buf[i],REMAIN (i)," NTUPLE" ); }if (pf->flags &I40E_FLAG_DCB_CAPABLE ) - i +=snprintf (&buf[i],REMAIN (i)," DCB" ); - i +=snprintf (&buf[i],REMAIN (i)," VxLAN" ); - i +=snprintf (&buf[i],REMAIN (i)," Geneve" ); + i +=scnprintf (&buf[i],REMAIN (i)," DCB" ); + i +=scnprintf (&buf[i],REMAIN (i)," VxLAN" ); + i +=scnprintf (&buf[i],REMAIN (i)," Geneve" );if (pf->flags &I40E_FLAG_PTP ) - i +=snprintf (&buf[i],REMAIN (i)," PTP" ); + i +=scnprintf (&buf[i],REMAIN (i)," PTP" );if (pf->flags &I40E_FLAG_VEB_MODE_ENABLED ) - i +=snprintf (&buf[i],REMAIN (i)," VEB" ); + i +=scnprintf (&buf[i],REMAIN (i)," VEB" );else - i +=snprintf (&buf[i],REMAIN (i)," VEPA" ); + i +=scnprintf (&buf[i],REMAIN (i)," VEPA" );dev_info (&pf->pdev->dev,"%s\n" , buf);kfree (buf);
Signature · 1 line
2.26.2
PATCH 2/17 i40e: trivial fixup of comments in i40e_xsk.c
In reply to Jeff KirsherFrom: Jesper Dangaard Brouer <[email protected]>
The comment above i40e_run_xdp_zc() was clearly copy-pasted from function i40e_xsk_umem_setup, which is just above.
--- drivers/net/ethernet/intel/i40e/i40e_xsk.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/net/ethernet/intel/i40e/i40e_xsk.c +1 -3
@@ -139,8 +139,6 @@ int i40e_xsk_umem_setup(struct i40e_vsi *vsi, struct xdp_umem *umem,* @rx_ring: Rx ring * @xdp: xdp_buff used as input to the XDP program * -* This function enables or disables a UMEM to a certain ring. -* * Returns any of I40E_XDP_{PASS, CONSUMED, TX, REDIR} **/ static int i40e_run_xdp_zc (struct i40e_ring *rx_ring,struct xdp_buff *xdp)
@@ -224,7 +222,7 @@ bool i40e_alloc_rx_buffers_zc(struct i40e_ring *rx_ring, u16 count) }/** -* i40e_construct_skb_zc - Create skbufff from zero-copy Rx buffer +* i40e_construct_skb_zc - Create skbuff from zero-copy Rx buffer * @rx_ring: Rx ring * @xdp: xdp_buff *
Signature · 1 line
2.26.2
PATCH 3/17 ixgbe: fix signed-integer-overflow warning
In reply to Jeff KirsherFrom: Xie XiuQi <[email protected]>
ubsan report this warning, fix it by adding a unsigned suffix.
UBSAN: signed-integer-overflow in drivers/net/ethernet/intel/ixgbe/ixgbe_common.c:2246:26 65535 * 65537 cannot be represented in type 'int' CPU: 21 PID: 7 Comm: kworker/u256:0 Not tainted 5.7.0-rc3-debug+ #39 Hardware name: Huawei TaiShan 2280 V2/BC82AMDC, BIOS 2280-V2 03/27/2020 Workqueue: ixgbe ixgbe_service_task [ixgbe] Call trace: dump_backtrace+0x0/0x3f0 show_stack+0x28/0x38 dump_stack+0x154/0x1e4 ubsan_epilogue+0x18/0x60 handle_overflow+0xf8/0x148 __ubsan_handle_mul_overflow+0x34/0x48 ixgbe_fc_enable_generic+0x4d0/0x590 [ixgbe] ixgbe_service_task+0xc20/0x1f78 [ixgbe] process_one_work+0x8f0/0xf18 worker_thread+0x430/0x6d0 kthread+0x218/0x238 ret_from_fork+0x10/0x18
--- drivers/net/ethernet/intel/ixgbe/ixgbe_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/intel/ixgbe/ixgbe_common.c +1 -1
@@ -2243,7 +2243,7 @@ s32 ixgbe_fc_enable_generic(struct ixgbe_hw *hw) }/* Configure pause time (2 TCs per register) */ - reg = hw->fc.pause_time *0x00010001 ; + reg = hw->fc.pause_time *0x00010001U ;for (i =0 ; i < (MAX_TRAFFIC_CLASS /2 ); i++)IXGBE_WRITE_REG (hw,IXGBE_FCTTV (i), reg);
Signature · 1 line
2.26.2
PATCH 4/17 ixgbe: Remove conversion to bool in ixgbe_device_supports_autoneg_fc()
In reply to Jeff KirsherFrom: Jason Yan <[email protected]>
No need to convert '==' expression to bool. This fixes the following coccicheck warning:
drivers/net/ethernet/intel/ixgbe/ixgbe_common.c:68:11-16: WARNING:
conversion to bool not needed here
--- drivers/net/ethernet/intel/ixgbe/ixgbe_common.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/ethernet/intel/ixgbe/ixgbe_common.c +1 -2
@@ -64,8 +64,7 @@ bool ixgbe_device_supports_autoneg_fc(struct ixgbe_hw *hw) hw->mac.ops.check_link (hw, &speed, &link_up, false);/* if link is down, assume supported */ if (link_up) - supported = speed ==IXGBE_LINK_SPEED_1GB_FULL ? - true : false; + supported = speed ==IXGBE_LINK_SPEED_1GB_FULL ;else supported = true; }
Signature · 1 line
2.26.2
PATCH 5/17 ixgbe: Use true, false for bool variable in __ixgbe_enable_sriov()
In reply to Jeff KirsherFrom: Jason Yan <[email protected]>
Fix the following coccicheck warning:
drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c:105:2-38: WARNING:
Assignment of 0/1 to bool variable
--- drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c +1 -1
@@ -102,7 +102,7 @@ static int __ixgbe_enable_sriov(struct ixgbe_adapter *adapter,* indirection table and RSS hash key with PF therefore * we want to disable the querying by default. */ - adapter->vfinfo[i].rss_query_enabled =0 ; + adapter->vfinfo[i].rss_query_enabled = false;/* Untrust all VFs */ adapter->vfinfo[i].trusted = false;
Signature · 1 line
2.26.2
PATCH 6/17 ixgbe: Remove unused inline function ixgbe_irq_disable_queues
In reply to Jeff KirsherFrom: YueHaibing <[email protected]>
commit b5f69ccf6765 ("ixgbe: avoid bringing rings up/down as macvlans are added/removed") left behind this, remove it.
--- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 29 ------------------- 1 file changed, 29 deletions(-)
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +0 -29
@@ -2973,35 +2973,6 @@ static inline void ixgbe_irq_enable_queues(struct ixgbe_adapter *adapter,/* skip the flush */ } -static inline void ixgbe_irq_disable_queues (struct ixgbe_adapter *adapter, -u64 qmask) -{ -u32 mask; -struct ixgbe_hw *hw = &adapter->hw; - -switch (hw->mac.type) { -case ixgbe_mac_82598EB: - mask = (IXGBE_EIMS_RTX_QUEUE & qmask); -IXGBE_WRITE_REG (hw,IXGBE_EIMC , mask); -break ; -case ixgbe_mac_82599EB: -case ixgbe_mac_X540: -case ixgbe_mac_X550: -case ixgbe_mac_X550EM_x: -case ixgbe_mac_x550em_a: - mask = (qmask &0xFFFFFFFF ); -if (mask) -IXGBE_WRITE_REG (hw,IXGBE_EIMC_EX (0 ), mask); - mask = (qmask >>32 ); -if (mask) -IXGBE_WRITE_REG (hw,IXGBE_EIMC_EX (1 ), mask); -break ; -default : -break ; - } -/* skip the flush */ -} -/** * ixgbe_irq_enable - Enable default interrupt generation settings * @adapter: board private structure
Signature · 1 line
2.26.2
PATCH 7/17 igb: make igb_set_fc_watermarks() return void
In reply to Jeff KirsherFrom: Jason Yan <[email protected]>
This function always return 0 now, we can make it return void to simplify the code. This fixes the following coccicheck warning:
drivers/net/ethernet/intel/igb/e1000_mac.c:728:5-12: Unneeded variable:
"ret_val". Return "0" on line 751
--- drivers/net/ethernet/intel/igb/e1000_mac.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)
drivers/net/ethernet/intel/igb/e1000_mac.c +3 -6
@@ -12,7 +12,7 @@#include "igb.h" static s32 igb_set_default_fc (struct e1000_hw *hw); -static s32 igb_set_fc_watermarks (struct e1000_hw *hw); +static void igb_set_fc_watermarks (struct e1000_hw *hw);/** * igb_get_bus_info_pcie - Get PCIe bus information
@@ -687,7 +687,7 @@ s32 igb_setup_link(struct e1000_hw *hw)wr32 (E1000_FCTTV , hw->fc.pause_time); - ret_val =igb_set_fc_watermarks (hw); +igb_set_fc_watermarks (hw); out:
@@ -723,9 +723,8 @@ void igb_config_collision_dist(struct e1000_hw *hw)* flow control XON frame transmission is enabled, then set XON frame * tansmission as well. **/ -static s32 igb_set_fc_watermarks (struct e1000_hw *hw) +static void igb_set_fc_watermarks (struct e1000_hw *hw) { -s32 ret_val =0 ;u32 fcrtl =0 , fcrth =0 ;/* Set the flow control receive threshold registers. Normally,
@@ -747,8 +746,6 @@ static s32 igb_set_fc_watermarks(struct e1000_hw *hw) }wr32 (E1000_FCRTL , fcrtl);wr32 (E1000_FCRTH , fcrth); - -return ret_val; }/**
Signature · 1 line
2.26.2
PATCH 8/17 igc: Remove unused flags
In reply to Jeff KirsherFrom: Sasha Neftin <[email protected]>
Transmit underrun, late and excess collision flags not in use. This patch comes to clean up these flags.
--- drivers/net/ethernet/intel/igc/igc_defines.h | 4 ---- 1 file changed, 4 deletions(-)
drivers/net/ethernet/intel/igc/igc_defines.h +0 -4
@@ -269,13 +269,9 @@#define IGC_TXD_CMD_DEXT 0x20000000/* Desc extension (0 = legacy) */ #define IGC_TXD_CMD_VLE 0x40000000/* Add VLAN tag */ #define IGC_TXD_STAT_DD 0x00000001/* Descriptor Done */ -#define IGC_TXD_STAT_EC 0x00000002/* Excess Collisions */ -#define IGC_TXD_STAT_LC 0x00000004/* Late Collisions */ -#define IGC_TXD_STAT_TU 0x00000008/* Transmit underrun */ #define IGC_TXD_CMD_TCP 0x01000000/* TCP packet */ #define IGC_TXD_CMD_IP 0x02000000/* IP packet */ #define IGC_TXD_CMD_TSE 0x04000000/* TCP Seg enable */ -#define IGC_TXD_STAT_TC 0x00000004/* Tx Underrun */ #define IGC_TXD_EXTCMD_TSTAMP 0x00000010/* IEEE1588 Timestamp packet */ /* IPSec Encrypt Enable */
Signature · 1 line
2.26.2
PATCH 9/17 igc: Reject NFC rules with multiple matches
In reply to Jeff KirsherFrom: Andre Guedes <[email protected]>
The way Rx queue assignment based on mac address, Ethertype and VLAN priority filtering operates in I225 doesn't allow us to properly support NFC rules with multiple matches.
Consider the following example which assigns to queue 2 frames matching the address MACADDR *and* Ethertype ETYPE.
$ ethtool -N eth0 flow-type ether dst <MACADDR> proto <ETYPE> queue 2
When such rule is applied, we have 2 unwanted behaviors:
1) Any frame matching MACADDR will be assigned to queue 2. It doesn't matter the ETYPE value.
2) Any accepted frame that has Ethertype equals to ETYPE, no matter the mac address, will be assigned to queue 2 as well.
In current code, multiple-match filters are accepted by the driver, even though it doesn't support them properly. This patch adds a check for multiple-match rules in igc_ethtool_is_nfc_rule_valid() so they are rejected.
--- drivers/net/ethernet/intel/igc/igc_ethtool.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
drivers/net/ethernet/intel/igc/igc_ethtool.c +4 -5
@@ -1222,8 +1222,8 @@ static void igc_ethtool_init_nfc_rule(struct igc_nfc_rule *rule,* @adapter: Pointer to adapter * @rule: Rule under evaluation * -* Rules with both destination and source MAC addresses are considered invalid -* since the driver doesn't support them. +* The driver doesn't support rules with multiple matches so if more than +* one bit in filter flags is set, @rule is considered invalid. * * Also, if there is already another rule with the same filter in a different * location, @rule is considered invalid.
@@ -1244,9 +1244,8 @@ static int igc_ethtool_check_nfc_rule(struct igc_adapter *adapter,return -EINVAL ; } -if (flags &IGC_FILTER_FLAG_DST_MAC_ADDR && - flags &IGC_FILTER_FLAG_SRC_MAC_ADDR ) { -netdev_dbg (dev,"Filters with both dst and src are not supported\n" ); +if (flags & (flags -1 )) { +netdev_dbg (dev,"Rule with multiple matches not supported\n" );return -EOPNOTSUPP ; }
Signature · 1 line
2.26.2
PATCH 10/17 igc: Fix IGC_MAX_RXNFC_RULES
In reply to Jeff KirsherFrom: Andre Guedes <[email protected]>
IGC supports a total of 32 rules. 16 MAC address based, 8 VLAN priority based, and 8 Ethertype based. This patch fixes IGC_MAX_RXNFC_RULES accordingly.
--- drivers/net/ethernet/intel/igc/igc.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/net/ethernet/intel/igc/igc.h +4 -1
@@ -457,7 +457,10 @@ struct igc_nfc_rule {u16 action; }; -#define IGC_MAX_RXNFC_RULES 16 +/* IGC supports a total of 32 NFC rules: 16 MAC address based,, 8 VLAN priority +* based, and 8 ethertype based. +*/ +#define IGC_MAX_RXNFC_RULES 32/* igc_desc_unused - calculate if we have unused descriptors */ static inline u16 igc_desc_unused (const struct igc_ring *ring)
Signature · 1 line
2.26.2
PATCH 11/17 e1000e: Relax condition to trigger reset for ME workaround
In reply to Jeff KirsherFrom: Punit Agrawal <[email protected]>
It's an error if the value of the RX/TX tail descriptor does not match what was written. The error condition is true regardless the duration of the interference from ME. But the driver only performs the reset if E1000_ICH_FWSM_PCIM2PCI_COUNT (2000) iterations of 50us delay have transpired. The extra condition can lead to inconsistency between the state of hardware as expected by the driver.
Fix this by dropping the check for number of delay iterations.
While at it, also make __ew32_prepare() static as it's not used anywhere else.
--- drivers/net/ethernet/intel/e1000e/e1000.h | 1 - drivers/net/ethernet/intel/e1000e/netdev.c | 12 +++++------- 2 files changed, 5 insertions(+), 8 deletions(-)
drivers/net/ethernet/intel/e1000e/e1000.h +0 -1
@@ -576,7 +576,6 @@ static inline u32 __er32(struct e1000_hw *hw, unsigned long reg)#define er32 (reg) __er32(hw, E1000_##reg) -s32 __ew32_prepare (struct e1000_hw *hw);void __ew32 (struct e1000_hw *hw,unsigned long reg,u32 val);#define ew32 (reg, val) __ew32(hw, E1000_##reg, (val))
drivers/net/ethernet/intel/e1000e/netdev.c +5 -7
@@ -158,14 +158,12 @@ static bool e1000e_check_me(u16 device_id)* has bit 24 set while ME is accessing MAC CSR registers, wait if it is set * and try again a number of times. **/ -s32 __ew32_prepare (struct e1000_hw *hw) +static void __ew32_prepare (struct e1000_hw *hw) {s32 i =E1000_ICH_FWSM_PCIM2PCI_COUNT ;while ((er32 (FWSM ) &E1000_ICH_FWSM_PCIM2PCI ) && --i)udelay (50 ); - -return i; }void __ew32 (struct e1000_hw *hw,unsigned long reg,u32 val)
@@ -646,11 +644,11 @@ static void e1000e_update_rdt_wa(struct e1000_ring *rx_ring, unsigned int i) {struct e1000_adapter *adapter = rx_ring->adapter;struct e1000_hw *hw = &adapter->hw; -s32 ret_val =__ew32_prepare (hw); +__ew32_prepare (hw);writel (i, rx_ring->tail); -if (unlikely (!ret_val && (i !=readl (rx_ring->tail)))) { +if (unlikely (i !=readl (rx_ring->tail))) {u32 rctl =er32 (RCTL );ew32 (RCTL , rctl & ~E1000_RCTL_EN );
@@ -663,11 +661,11 @@ static void e1000e_update_tdt_wa(struct e1000_ring *tx_ring, unsigned int i) {struct e1000_adapter *adapter = tx_ring->adapter;struct e1000_hw *hw = &adapter->hw; -s32 ret_val =__ew32_prepare (hw); +__ew32_prepare (hw);writel (i, tx_ring->tail); -if (unlikely (!ret_val && (i !=readl (tx_ring->tail)))) { +if (unlikely (i !=readl (tx_ring->tail))) {u32 tctl =er32 (TCTL );ew32 (TCTL , tctl & ~E1000_TCTL_EN );
Signature · 1 line
2.26.2
PATCH 12/17 i40e: Make i40e_shutdown_adminq() return void
In reply to Jeff KirsherFrom: Jason Yan <[email protected]>
Fix the following coccicheck warning:
drivers/net/ethernet/intel/i40e/i40e_adminq.c:699:13-21: Unneeded
variable: "ret_code". Return "0" on line 710
--- drivers/net/ethernet/intel/i40e/i40e_adminq.c | 6 +----- drivers/net/ethernet/intel/i40e/i40e_prototype.h | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-)
drivers/net/ethernet/intel/i40e/i40e_adminq.c +1 -5
@@ -694,10 +694,8 @@ i40e_status i40e_init_adminq(struct i40e_hw *hw)* i40e_shutdown_adminq - shutdown routine for the Admin Queue * @hw: pointer to the hardware structure **/ -i40e_status i40e_shutdown_adminq (struct i40e_hw *hw) +void i40e_shutdown_adminq (struct i40e_hw *hw) { -i40e_status ret_code =0 ; -if (i40e_check_asq_alive (hw))i40e_aq_queue_shutdown (hw, true);
@@ -706,8 +704,6 @@ i40e_status i40e_shutdown_adminq(struct i40e_hw *hw)if (hw->nvm_buff.va)i40e_free_virt_mem (hw, &hw->nvm_buff); - -return ret_code; }/**
drivers/net/ethernet/intel/i40e/i40e_prototype.h +1 -1
@@ -17,7 +17,7 @@/* adminq functions */ i40e_status i40e_init_adminq (struct i40e_hw *hw); -i40e_status i40e_shutdown_adminq (struct i40e_hw *hw); +void i40e_shutdown_adminq (struct i40e_hw *hw);void i40e_adminq_init_ring_data (struct i40e_hw *hw); i40e_status i40e_clean_arq_element(struct i40e_hw *hw, struct i40e_arq_event_info *e,
Signature · 1 line
2.26.2
PATCH 13/17 igc: Remove symbol error counter
In reply to Jeff KirsherFrom: Sasha Neftin <[email protected]>
Accordance to the i225 datasheet symbol error counter does not applicable to the i225 device.
This patch comes to clean up this counter.
--- drivers/net/ethernet/intel/igc/igc_mac.c | 1 - drivers/net/ethernet/intel/igc/igc_main.c | 1 - drivers/net/ethernet/intel/igc/igc_regs.h | 1 - 3 files changed, 3 deletions(-)
drivers/net/ethernet/intel/igc/igc_mac.c +0 -1
@@ -235,7 +235,6 @@ s32 igc_force_mac_fc(struct igc_hw *hw)void igc_clear_hw_cntrs_base (struct igc_hw *hw) {rd32 (IGC_CRCERRS ); -rd32 (IGC_SYMERRS );rd32 (IGC_MPC );rd32 (IGC_SCC );rd32 (IGC_ECOL );
drivers/net/ethernet/intel/igc/igc_main.c +0 -1
@@ -3701,7 +3701,6 @@ void igc_update_stats(struct igc_adapter *adapter) adapter->stats.prc511 +=rd32 (IGC_PRC511 ); adapter->stats.prc1023 +=rd32 (IGC_PRC1023 ); adapter->stats.prc1522 +=rd32 (IGC_PRC1522 ); - adapter->stats.symerrs +=rd32 (IGC_SYMERRS ); adapter->stats.sec +=rd32 (IGC_SEC ); mpc =rd32 (IGC_MPC );
drivers/net/ethernet/intel/igc/igc_regs.h +0 -1
@@ -127,7 +127,6 @@/* Statistics Register Descriptions */ #define IGC_CRCERRS 0x04000/* CRC Error Count - R/clr */ #define IGC_ALGNERRC 0x04004/* Alignment Error Count - R/clr */ -#define IGC_SYMERRS 0x04008/* Symbol Error Count - R/clr */ #define IGC_RXERRC 0x0400C/* Receive Error Count - R/clr */ #define IGC_MPC 0x04010/* Missed Packet Count - R/clr */ #define IGC_SCC 0x04014/* Single Collision Count - R/clr */
Signature · 1 line
2.26.2
PATCH 14/17 igc: Add Receive Error Counter
In reply to Jeff KirsherFrom: Sasha Neftin <[email protected]>
Receive error counter reflect total number of non-filtered packets received with errors. This includes: CRC error, symbol error, Rx data error and carrier extend error.
--- drivers/net/ethernet/intel/igc/igc_mac.c | 1 + drivers/net/ethernet/intel/igc/igc_main.c | 1 + drivers/net/ethernet/intel/igc/igc_regs.h | 1 + 3 files changed, 3 insertions(+)
drivers/net/ethernet/intel/igc/igc_mac.c +1 -0
@@ -241,6 +241,7 @@ void igc_clear_hw_cntrs_base(struct igc_hw *hw)rd32 (IGC_MCC );rd32 (IGC_LATECOL );rd32 (IGC_COLC ); +rd32 (IGC_RERC );rd32 (IGC_DC );rd32 (IGC_SEC );rd32 (IGC_RLEC );
drivers/net/ethernet/intel/igc/igc_main.c +1 -0
@@ -3740,6 +3740,7 @@ void igc_update_stats(struct igc_adapter *adapter) adapter->stats.tpt +=rd32 (IGC_TPT ); adapter->stats.colc +=rd32 (IGC_COLC ); + adapter->stats.colc +=rd32 (IGC_RERC ); adapter->stats.algnerrc +=rd32 (IGC_ALGNERRC );
drivers/net/ethernet/intel/igc/igc_regs.h +1 -0
@@ -134,6 +134,7 @@#define IGC_MCC 0x0401C/* Multiple Collision Count - R/clr */ #define IGC_LATECOL 0x04020/* Late Collision Count - R/clr */ #define IGC_COLC 0x04028/* Collision Count - R/clr */ +#define IGC_RERC 0x0402C/* Receive Error Count - R/clr */ #define IGC_DC 0x04030/* Defer Count - R/clr */ #define IGC_TNCRS 0x04034/* Tx-No CRS - R/clr */ #define IGC_SEC 0x04038/* Sequence Error Count - R/clr */
Signature · 1 line
2.26.2
PATCH 15/17 igc: Remove Sequence Error Counter
In reply to Jeff KirsherFrom: Sasha Neftin <[email protected]>
Accordance to the i225 datasheet sequence error counter does not applicable to the i225 device.
This patch comes to clean up this counter.
--- drivers/net/ethernet/intel/igc/igc_mac.c | 1 - drivers/net/ethernet/intel/igc/igc_main.c | 1 - drivers/net/ethernet/intel/igc/igc_regs.h | 1 - 3 files changed, 3 deletions(-)
drivers/net/ethernet/intel/igc/igc_mac.c +0 -1
@@ -243,7 +243,6 @@ void igc_clear_hw_cntrs_base(struct igc_hw *hw)rd32 (IGC_COLC );rd32 (IGC_RERC );rd32 (IGC_DC ); -rd32 (IGC_SEC );rd32 (IGC_RLEC );rd32 (IGC_XONRXC );rd32 (IGC_XONTXC );
drivers/net/ethernet/intel/igc/igc_main.c +0 -1
@@ -3701,7 +3701,6 @@ void igc_update_stats(struct igc_adapter *adapter) adapter->stats.prc511 +=rd32 (IGC_PRC511 ); adapter->stats.prc1023 +=rd32 (IGC_PRC1023 ); adapter->stats.prc1522 +=rd32 (IGC_PRC1522 ); - adapter->stats.sec +=rd32 (IGC_SEC ); mpc =rd32 (IGC_MPC ); adapter->stats.mpc += mpc;
drivers/net/ethernet/intel/igc/igc_regs.h +0 -1
@@ -137,7 +137,6 @@#define IGC_RERC 0x0402C/* Receive Error Count - R/clr */ #define IGC_DC 0x04030/* Defer Count - R/clr */ #define IGC_TNCRS 0x04034/* Tx-No CRS - R/clr */ -#define IGC_SEC 0x04038/* Sequence Error Count - R/clr */ #define IGC_CEXTERR 0x0403C/* Carrier Extension Error Count - R/clr */ #define IGC_RLEC 0x04040/* Receive Length Error Count - R/clr */ #define IGC_XONRXC 0x04048/* XON Rx Count - R/clr */
Signature · 1 line
2.26.2
PATCH 16/17 igc: Fix wrong register name
In reply to Jeff KirsherFrom: Sasha Neftin <[email protected]>
Accordance to the i225 datasheet this register address used by Host Transmit Discarded Packet by MAC counter and not by not applicable Carrier Extension Error counter. This patch comes to fix this wrong definition.
--- drivers/net/ethernet/intel/igc/igc_mac.c | 2 +- drivers/net/ethernet/intel/igc/igc_regs.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/intel/igc/igc_mac.c +1 -1
@@ -287,7 +287,7 @@ void igc_clear_hw_cntrs_base(struct igc_hw *hw)rd32 (IGC_ALGNERRC );rd32 (IGC_RXERRC );rd32 (IGC_TNCRS ); -rd32 (IGC_CEXTERR ); +rd32 (IGC_HTDPMC );rd32 (IGC_TSCTC );rd32 (IGC_TSCTFC );
drivers/net/ethernet/intel/igc/igc_regs.h +1 -1
@@ -137,7 +137,7 @@#define IGC_RERC 0x0402C/* Receive Error Count - R/clr */ #define IGC_DC 0x04030/* Defer Count - R/clr */ #define IGC_TNCRS 0x04034/* Tx-No CRS - R/clr */ -#define IGC_CEXTERR 0x0403C/* Carrier Extension Error Count - R/clr */ +#define IGC_HTDPMC 0x0403C/* Host Transmit Discarded by MAC - R/clr */ #define IGC_RLEC 0x04040/* Receive Length Error Count - R/clr */ #define IGC_XONRXC 0x04048/* XON Rx Count - R/clr */ #define IGC_XONTXC 0x0404C/* XON Tx Count - R/clr */
Signature · 1 line
2.26.2
PATCH 17/17 e1000: Fix typo in the comment
In reply to Jeff KirsherFrom: Hari <[email protected]>
Continuous Double "the" in a comment. Changed it to single "the"
--- drivers/net/ethernet/intel/e1000/e1000_hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/intel/e1000/e1000_hw.c +1 -1
@@ -3960,7 +3960,7 @@ static s32 e1000_do_read_eeprom(struct e1000_hw *hw, u16 offset, u16 words,* @hw: Struct containing variables accessed by shared code * * Reads the first 64 16 bit words of the EEPROM and sums the values read. -* If the the sum of the 64 16 bit words is 0xBABA, the EEPROM's checksum is +* If the sum of the 64 16 bit words is 0xBABA, the EEPROM's checksum is * valid. */ s32 e1000_validate_eeprom_checksum (struct e1000_hw *hw)
Signature · 1 line
2.26.2
David Miller
maintainerFrom: Jeff Kirsher <[email protected]>
Date: Thu, 28 May 2020 21:39:47 -0700
Quoted 1 line
This series contains updates to e1000, e1000e, igc, igb, ixgbe and i40e.
Pulled, thanks Jeff.