All of lore.kernel.org
 help / color / mirror / Atom feed
* [net-next 00/17][pull request] Intel Wired LAN Driver Updates 2020-05-28
@ 2020-05-29  4:39 Jeff Kirsher
  2020-05-29  4:39 ` [net-next 01/17] i40e: Use scnprintf() for avoiding potential buffer overflow Jeff Kirsher
                   ` (17 more replies)
  0 siblings, 18 replies; 19+ messages in thread
From: Jeff Kirsher @ 2020-05-29  4:39 UTC (permalink / raw)
  To: davem; +Cc: Jeff Kirsher, netdev, nhorman, sassmann

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(-)

-- 
2.26.2


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [net-next 01/17] i40e: Use scnprintf() for avoiding potential buffer overflow
  2020-05-29  4:39 [net-next 00/17][pull request] Intel Wired LAN Driver Updates 2020-05-28 Jeff Kirsher
@ 2020-05-29  4:39 ` Jeff Kirsher
  2020-05-29  4:39 ` [net-next 02/17] i40e: trivial fixup of comments in i40e_xsk.c Jeff Kirsher
                   ` (16 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: Jeff Kirsher @ 2020-05-29  4:39 UTC (permalink / raw)
  To: davem
  Cc: Takashi Iwai, netdev, nhorman, sassmann, Andrew Bowers, Jeff Kirsher

From: Takashi Iwai <tiwai@suse.de>

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().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_main.c | 24 ++++++++++-----------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index ea7395b391e5..5d807c8004f8 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -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);
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [net-next 02/17] i40e: trivial fixup of comments in i40e_xsk.c
  2020-05-29  4:39 [net-next 00/17][pull request] Intel Wired LAN Driver Updates 2020-05-28 Jeff Kirsher
  2020-05-29  4:39 ` [net-next 01/17] i40e: Use scnprintf() for avoiding potential buffer overflow Jeff Kirsher
@ 2020-05-29  4:39 ` Jeff Kirsher
  2020-05-29  4:39 ` [net-next 03/17] ixgbe: fix signed-integer-overflow warning Jeff Kirsher
                   ` (15 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: Jeff Kirsher @ 2020-05-29  4:39 UTC (permalink / raw)
  To: davem
  Cc: Jesper Dangaard Brouer, netdev, nhorman, sassmann,
	Björn Töpel, Andrew Bowers, Jeff Kirsher

From: Jesper Dangaard Brouer <brouer@redhat.com>

The comment above i40e_run_xdp_zc() was clearly copy-pasted from
function i40e_xsk_umem_setup, which is just above.

Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Acked-by: Björn Töpel <bjorn.topel@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_xsk.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_xsk.c b/drivers/net/ethernet/intel/i40e/i40e_xsk.c
index f3953744c505..7276580cbe64 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_xsk.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_xsk.c
@@ -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
  *
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [net-next 03/17] ixgbe: fix signed-integer-overflow warning
  2020-05-29  4:39 [net-next 00/17][pull request] Intel Wired LAN Driver Updates 2020-05-28 Jeff Kirsher
  2020-05-29  4:39 ` [net-next 01/17] i40e: Use scnprintf() for avoiding potential buffer overflow Jeff Kirsher
  2020-05-29  4:39 ` [net-next 02/17] i40e: trivial fixup of comments in i40e_xsk.c Jeff Kirsher
@ 2020-05-29  4:39 ` Jeff Kirsher
  2020-05-29  4:39 ` [net-next 04/17] ixgbe: Remove conversion to bool in ixgbe_device_supports_autoneg_fc() Jeff Kirsher
                   ` (14 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: Jeff Kirsher @ 2020-05-29  4:39 UTC (permalink / raw)
  To: davem
  Cc: Xie XiuQi, netdev, nhorman, sassmann, Hulk Robot, Andrew Bowers,
	Jeff Kirsher

From: Xie XiuQi <xiexiuqi@huawei.com>

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

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Xie XiuQi <xiexiuqi@huawei.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/ixgbe/ixgbe_common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c
index 0bd1294ba517..39c5e6fdb72c 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c
@@ -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);
 
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [net-next 04/17] ixgbe: Remove conversion to bool in ixgbe_device_supports_autoneg_fc()
  2020-05-29  4:39 [net-next 00/17][pull request] Intel Wired LAN Driver Updates 2020-05-28 Jeff Kirsher
                   ` (2 preceding siblings ...)
  2020-05-29  4:39 ` [net-next 03/17] ixgbe: fix signed-integer-overflow warning Jeff Kirsher
@ 2020-05-29  4:39 ` Jeff Kirsher
  2020-05-29  4:39 ` [net-next 05/17] ixgbe: Use true, false for bool variable in __ixgbe_enable_sriov() Jeff Kirsher
                   ` (13 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: Jeff Kirsher @ 2020-05-29  4:39 UTC (permalink / raw)
  To: davem; +Cc: Jason Yan, netdev, nhorman, sassmann, Andrew Bowers, Jeff Kirsher

From: Jason Yan <yanaijie@huawei.com>

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

Signed-off-by: Jason Yan <yanaijie@huawei.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/ixgbe/ixgbe_common.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c
index 39c5e6fdb72c..17357a12cbdc 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c
@@ -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;
 		}
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [net-next 05/17] ixgbe: Use true, false for bool variable in __ixgbe_enable_sriov()
  2020-05-29  4:39 [net-next 00/17][pull request] Intel Wired LAN Driver Updates 2020-05-28 Jeff Kirsher
                   ` (3 preceding siblings ...)
  2020-05-29  4:39 ` [net-next 04/17] ixgbe: Remove conversion to bool in ixgbe_device_supports_autoneg_fc() Jeff Kirsher
@ 2020-05-29  4:39 ` Jeff Kirsher
  2020-05-29  4:39 ` [net-next 06/17] ixgbe: Remove unused inline function ixgbe_irq_disable_queues Jeff Kirsher
                   ` (12 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: Jeff Kirsher @ 2020-05-29  4:39 UTC (permalink / raw)
  To: davem; +Cc: Jason Yan, netdev, nhorman, sassmann, Andrew Bowers, Jeff Kirsher

From: Jason Yan <yanaijie@huawei.com>

Fix the following coccicheck warning:

drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c:105:2-38: WARNING:
Assignment of 0/1 to bool variable

Signed-off-by: Jason Yan <yanaijie@huawei.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
index 537dfff585e0..d05a5690e66b 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
@@ -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;
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [net-next 06/17] ixgbe: Remove unused inline function ixgbe_irq_disable_queues
  2020-05-29  4:39 [net-next 00/17][pull request] Intel Wired LAN Driver Updates 2020-05-28 Jeff Kirsher
                   ` (4 preceding siblings ...)
  2020-05-29  4:39 ` [net-next 05/17] ixgbe: Use true, false for bool variable in __ixgbe_enable_sriov() Jeff Kirsher
@ 2020-05-29  4:39 ` Jeff Kirsher
  2020-05-29  4:39 ` [net-next 07/17] igb: make igb_set_fc_watermarks() return void Jeff Kirsher
                   ` (11 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: Jeff Kirsher @ 2020-05-29  4:39 UTC (permalink / raw)
  To: davem; +Cc: YueHaibing, netdev, nhorman, sassmann, Andrew Bowers, Jeff Kirsher

From: YueHaibing <yuehaibing@huawei.com>

commit b5f69ccf6765 ("ixgbe: avoid bringing rings up/down as macvlans are added/removed")
left behind this, remove it.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 29 -------------------
 1 file changed, 29 deletions(-)

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index 45fc7ce1a543..a59c166f794f 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -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
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [net-next 07/17] igb: make igb_set_fc_watermarks() return void
  2020-05-29  4:39 [net-next 00/17][pull request] Intel Wired LAN Driver Updates 2020-05-28 Jeff Kirsher
                   ` (5 preceding siblings ...)
  2020-05-29  4:39 ` [net-next 06/17] ixgbe: Remove unused inline function ixgbe_irq_disable_queues Jeff Kirsher
@ 2020-05-29  4:39 ` Jeff Kirsher
  2020-05-29  4:39 ` [net-next 08/17] igc: Remove unused flags Jeff Kirsher
                   ` (10 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: Jeff Kirsher @ 2020-05-29  4:39 UTC (permalink / raw)
  To: davem; +Cc: Jason Yan, netdev, nhorman, sassmann, Aaron Brown, Jeff Kirsher

From: Jason Yan <yanaijie@huawei.com>

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

Signed-off-by: Jason Yan <yanaijie@huawei.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/igb/e1000_mac.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ethernet/intel/igb/e1000_mac.c b/drivers/net/ethernet/intel/igb/e1000_mac.c
index 79ee0a747260..3254737c07a3 100644
--- a/drivers/net/ethernet/intel/igb/e1000_mac.c
+++ b/drivers/net/ethernet/intel/igb/e1000_mac.c
@@ -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;
 }
 
 /**
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [net-next 08/17] igc: Remove unused flags
  2020-05-29  4:39 [net-next 00/17][pull request] Intel Wired LAN Driver Updates 2020-05-28 Jeff Kirsher
                   ` (6 preceding siblings ...)
  2020-05-29  4:39 ` [net-next 07/17] igb: make igb_set_fc_watermarks() return void Jeff Kirsher
@ 2020-05-29  4:39 ` Jeff Kirsher
  2020-05-29  4:39 ` [net-next 09/17] igc: Reject NFC rules with multiple matches Jeff Kirsher
                   ` (9 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: Jeff Kirsher @ 2020-05-29  4:39 UTC (permalink / raw)
  To: davem; +Cc: Sasha Neftin, netdev, nhorman, sassmann, Aaron Brown, Jeff Kirsher

From: Sasha Neftin <sasha.neftin@intel.com>

Transmit underrun, late and excess collision flags not in use.
This patch comes to clean up these flags.

Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/igc/igc_defines.h | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/net/ethernet/intel/igc/igc_defines.h b/drivers/net/ethernet/intel/igc/igc_defines.h
index 3d8d40d6fa3f..186deb1d9375 100644
--- a/drivers/net/ethernet/intel/igc/igc_defines.h
+++ b/drivers/net/ethernet/intel/igc/igc_defines.h
@@ -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 */
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [net-next 09/17] igc: Reject NFC rules with multiple matches
  2020-05-29  4:39 [net-next 00/17][pull request] Intel Wired LAN Driver Updates 2020-05-28 Jeff Kirsher
                   ` (7 preceding siblings ...)
  2020-05-29  4:39 ` [net-next 08/17] igc: Remove unused flags Jeff Kirsher
@ 2020-05-29  4:39 ` Jeff Kirsher
  2020-05-29  4:39 ` [net-next 10/17] igc: Fix IGC_MAX_RXNFC_RULES Jeff Kirsher
                   ` (8 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: Jeff Kirsher @ 2020-05-29  4:39 UTC (permalink / raw)
  To: davem; +Cc: Andre Guedes, netdev, nhorman, sassmann, Aaron Brown, Jeff Kirsher

From: Andre Guedes <andre.guedes@intel.com>

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.

Signed-off-by: Andre Guedes <andre.guedes@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/igc/igc_ethtool.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ethernet/intel/igc/igc_ethtool.c b/drivers/net/ethernet/intel/igc/igc_ethtool.c
index 946e775e34ae..a938ec8db681 100644
--- a/drivers/net/ethernet/intel/igc/igc_ethtool.c
+++ b/drivers/net/ethernet/intel/igc/igc_ethtool.c
@@ -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;
 	}
 
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [net-next 10/17] igc: Fix IGC_MAX_RXNFC_RULES
  2020-05-29  4:39 [net-next 00/17][pull request] Intel Wired LAN Driver Updates 2020-05-28 Jeff Kirsher
                   ` (8 preceding siblings ...)
  2020-05-29  4:39 ` [net-next 09/17] igc: Reject NFC rules with multiple matches Jeff Kirsher
@ 2020-05-29  4:39 ` Jeff Kirsher
  2020-05-29  4:39 ` [net-next 11/17] e1000e: Relax condition to trigger reset for ME workaround Jeff Kirsher
                   ` (7 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: Jeff Kirsher @ 2020-05-29  4:39 UTC (permalink / raw)
  To: davem
  Cc: Andre Guedes, netdev, nhorman, sassmann, Sasha Neftin,
	Aaron Brown, Jeff Kirsher

From: Andre Guedes <andre.guedes@intel.com>

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.

Signed-off-by: Andre Guedes <andre.guedes@intel.com>
Acked-by: Sasha Neftin <sasha.neftin@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/igc/igc.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/igc/igc.h b/drivers/net/ethernet/intel/igc/igc.h
index 14f9edaaaf83..5dbc5a156626 100644
--- a/drivers/net/ethernet/intel/igc/igc.h
+++ b/drivers/net/ethernet/intel/igc/igc.h
@@ -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)
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [net-next 11/17] e1000e: Relax condition to trigger reset for ME workaround
  2020-05-29  4:39 [net-next 00/17][pull request] Intel Wired LAN Driver Updates 2020-05-28 Jeff Kirsher
                   ` (9 preceding siblings ...)
  2020-05-29  4:39 ` [net-next 10/17] igc: Fix IGC_MAX_RXNFC_RULES Jeff Kirsher
@ 2020-05-29  4:39 ` Jeff Kirsher
  2020-05-29  4:39 ` [net-next 12/17] i40e: Make i40e_shutdown_adminq() return void Jeff Kirsher
                   ` (6 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: Jeff Kirsher @ 2020-05-29  4:39 UTC (permalink / raw)
  To: davem
  Cc: Punit Agrawal, netdev, nhorman, sassmann, stable,
	Alexander Duyck, Aaron Brown, Jeff Kirsher

From: Punit Agrawal <punit1.agrawal@toshiba.co.jp>

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.

CC: stable <stable@vger.kernel.org>
Signed-off-by: Punit Agrawal <punit1.agrawal@toshiba.co.jp>
Reviewed-by: Alexander Duyck <alexander.h.duyck@linux.intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/e1000e/e1000.h  |  1 -
 drivers/net/ethernet/intel/e1000e/netdev.c | 12 +++++-------
 2 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/drivers/net/ethernet/intel/e1000e/e1000.h b/drivers/net/ethernet/intel/e1000e/e1000.h
index 37a2314d3e6b..944abd5eae11 100644
--- a/drivers/net/ethernet/intel/e1000e/e1000.h
+++ b/drivers/net/ethernet/intel/e1000e/e1000.h
@@ -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))
diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index 32f23a15ff64..444532292588 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -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);
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [net-next 12/17] i40e: Make i40e_shutdown_adminq() return void
  2020-05-29  4:39 [net-next 00/17][pull request] Intel Wired LAN Driver Updates 2020-05-28 Jeff Kirsher
                   ` (10 preceding siblings ...)
  2020-05-29  4:39 ` [net-next 11/17] e1000e: Relax condition to trigger reset for ME workaround Jeff Kirsher
@ 2020-05-29  4:39 ` Jeff Kirsher
  2020-05-29  4:40 ` [net-next 13/17] igc: Remove symbol error counter Jeff Kirsher
                   ` (5 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: Jeff Kirsher @ 2020-05-29  4:39 UTC (permalink / raw)
  To: davem; +Cc: Jason Yan, netdev, nhorman, sassmann, Andrew Bowers, Jeff Kirsher

From: Jason Yan <yanaijie@huawei.com>

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

Signed-off-by: Jason Yan <yanaijie@huawei.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 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(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_adminq.c b/drivers/net/ethernet/intel/i40e/i40e_adminq.c
index 37514a75f928..6a089848c857 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_adminq.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_adminq.c
@@ -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;
 }
 
 /**
diff --git a/drivers/net/ethernet/intel/i40e/i40e_prototype.h b/drivers/net/ethernet/intel/i40e/i40e_prototype.h
index bbb478f09093..5c1378641b3b 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_prototype.h
+++ b/drivers/net/ethernet/intel/i40e/i40e_prototype.h
@@ -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,
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [net-next 13/17] igc: Remove symbol error counter
  2020-05-29  4:39 [net-next 00/17][pull request] Intel Wired LAN Driver Updates 2020-05-28 Jeff Kirsher
                   ` (11 preceding siblings ...)
  2020-05-29  4:39 ` [net-next 12/17] i40e: Make i40e_shutdown_adminq() return void Jeff Kirsher
@ 2020-05-29  4:40 ` Jeff Kirsher
  2020-05-29  4:40 ` [net-next 14/17] igc: Add Receive Error Counter Jeff Kirsher
                   ` (4 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: Jeff Kirsher @ 2020-05-29  4:40 UTC (permalink / raw)
  To: davem; +Cc: Sasha Neftin, netdev, nhorman, sassmann, Aaron Brown, Jeff Kirsher

From: Sasha Neftin <sasha.neftin@intel.com>

Accordance to the i225 datasheet symbol error counter does not
applicable to the i225 device.
This patch comes to clean up this counter.

Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 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(-)

diff --git a/drivers/net/ethernet/intel/igc/igc_mac.c b/drivers/net/ethernet/intel/igc/igc_mac.c
index 89445ab02a98..9de70a24cb9e 100644
--- a/drivers/net/ethernet/intel/igc/igc_mac.c
+++ b/drivers/net/ethernet/intel/igc/igc_mac.c
@@ -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);
diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c
index 97d26991c87e..662f06a647e6 100644
--- a/drivers/net/ethernet/intel/igc/igc_main.c
+++ b/drivers/net/ethernet/intel/igc/igc_main.c
@@ -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);
diff --git a/drivers/net/ethernet/intel/igc/igc_regs.h b/drivers/net/ethernet/intel/igc/igc_regs.h
index 7f999cfc9b39..a3e4ec922948 100644
--- a/drivers/net/ethernet/intel/igc/igc_regs.h
+++ b/drivers/net/ethernet/intel/igc/igc_regs.h
@@ -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 */
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [net-next 14/17] igc: Add Receive Error Counter
  2020-05-29  4:39 [net-next 00/17][pull request] Intel Wired LAN Driver Updates 2020-05-28 Jeff Kirsher
                   ` (12 preceding siblings ...)
  2020-05-29  4:40 ` [net-next 13/17] igc: Remove symbol error counter Jeff Kirsher
@ 2020-05-29  4:40 ` Jeff Kirsher
  2020-05-29  4:40 ` [net-next 15/17] igc: Remove Sequence " Jeff Kirsher
                   ` (3 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: Jeff Kirsher @ 2020-05-29  4:40 UTC (permalink / raw)
  To: davem; +Cc: Sasha Neftin, netdev, nhorman, sassmann, Aaron Brown, Jeff Kirsher

From: Sasha Neftin <sasha.neftin@intel.com>

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.

Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 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(+)

diff --git a/drivers/net/ethernet/intel/igc/igc_mac.c b/drivers/net/ethernet/intel/igc/igc_mac.c
index 9de70a24cb9e..a5a087e1ac02 100644
--- a/drivers/net/ethernet/intel/igc/igc_mac.c
+++ b/drivers/net/ethernet/intel/igc/igc_mac.c
@@ -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);
diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c
index 662f06a647e6..e0c45ffa12c4 100644
--- a/drivers/net/ethernet/intel/igc/igc_main.c
+++ b/drivers/net/ethernet/intel/igc/igc_main.c
@@ -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);
 
diff --git a/drivers/net/ethernet/intel/igc/igc_regs.h b/drivers/net/ethernet/intel/igc/igc_regs.h
index a3e4ec922948..7ac3b611708c 100644
--- a/drivers/net/ethernet/intel/igc/igc_regs.h
+++ b/drivers/net/ethernet/intel/igc/igc_regs.h
@@ -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 */
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [net-next 15/17] igc: Remove Sequence Error Counter
  2020-05-29  4:39 [net-next 00/17][pull request] Intel Wired LAN Driver Updates 2020-05-28 Jeff Kirsher
                   ` (13 preceding siblings ...)
  2020-05-29  4:40 ` [net-next 14/17] igc: Add Receive Error Counter Jeff Kirsher
@ 2020-05-29  4:40 ` Jeff Kirsher
  2020-05-29  4:40 ` [net-next 16/17] igc: Fix wrong register name Jeff Kirsher
                   ` (2 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: Jeff Kirsher @ 2020-05-29  4:40 UTC (permalink / raw)
  To: davem; +Cc: Sasha Neftin, netdev, nhorman, sassmann, Aaron Brown, Jeff Kirsher

From: Sasha Neftin <sasha.neftin@intel.com>

Accordance to the i225 datasheet sequence error counter does not
applicable to the i225 device.
This patch comes to clean up this counter.

Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 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(-)

diff --git a/drivers/net/ethernet/intel/igc/igc_mac.c b/drivers/net/ethernet/intel/igc/igc_mac.c
index a5a087e1ac02..fb496617e8e1 100644
--- a/drivers/net/ethernet/intel/igc/igc_mac.c
+++ b/drivers/net/ethernet/intel/igc/igc_mac.c
@@ -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);
diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c
index e0c45ffa12c4..43fcabb5c023 100644
--- a/drivers/net/ethernet/intel/igc/igc_main.c
+++ b/drivers/net/ethernet/intel/igc/igc_main.c
@@ -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;
diff --git a/drivers/net/ethernet/intel/igc/igc_regs.h b/drivers/net/ethernet/intel/igc/igc_regs.h
index 7ac3b611708c..2b7a877dadac 100644
--- a/drivers/net/ethernet/intel/igc/igc_regs.h
+++ b/drivers/net/ethernet/intel/igc/igc_regs.h
@@ -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 */
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [net-next 16/17] igc: Fix wrong register name
  2020-05-29  4:39 [net-next 00/17][pull request] Intel Wired LAN Driver Updates 2020-05-28 Jeff Kirsher
                   ` (14 preceding siblings ...)
  2020-05-29  4:40 ` [net-next 15/17] igc: Remove Sequence " Jeff Kirsher
@ 2020-05-29  4:40 ` Jeff Kirsher
  2020-05-29  4:40 ` [net-next 17/17] e1000: Fix typo in the comment Jeff Kirsher
  2020-05-29 19:17 ` [net-next 00/17][pull request] Intel Wired LAN Driver Updates 2020-05-28 David Miller
  17 siblings, 0 replies; 19+ messages in thread
From: Jeff Kirsher @ 2020-05-29  4:40 UTC (permalink / raw)
  To: davem; +Cc: Sasha Neftin, netdev, nhorman, sassmann, Aaron Brown, Jeff Kirsher

From: Sasha Neftin <sasha.neftin@intel.com>

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.

Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 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(-)

diff --git a/drivers/net/ethernet/intel/igc/igc_mac.c b/drivers/net/ethernet/intel/igc/igc_mac.c
index fb496617e8e1..410aeb01de5c 100644
--- a/drivers/net/ethernet/intel/igc/igc_mac.c
+++ b/drivers/net/ethernet/intel/igc/igc_mac.c
@@ -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);
 
diff --git a/drivers/net/ethernet/intel/igc/igc_regs.h b/drivers/net/ethernet/intel/igc/igc_regs.h
index 2b7a877dadac..232e82dec62e 100644
--- a/drivers/net/ethernet/intel/igc/igc_regs.h
+++ b/drivers/net/ethernet/intel/igc/igc_regs.h
@@ -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 */
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [net-next 17/17] e1000: Fix typo in the comment
  2020-05-29  4:39 [net-next 00/17][pull request] Intel Wired LAN Driver Updates 2020-05-28 Jeff Kirsher
                   ` (15 preceding siblings ...)
  2020-05-29  4:40 ` [net-next 16/17] igc: Fix wrong register name Jeff Kirsher
@ 2020-05-29  4:40 ` Jeff Kirsher
  2020-05-29 19:17 ` [net-next 00/17][pull request] Intel Wired LAN Driver Updates 2020-05-28 David Miller
  17 siblings, 0 replies; 19+ messages in thread
From: Jeff Kirsher @ 2020-05-29  4:40 UTC (permalink / raw)
  To: davem; +Cc: Hari, netdev, nhorman, sassmann, Aaron Brown, Jeff Kirsher

From: Hari <harichandrakanthan@gmail.com>

Continuous Double "the" in a comment. Changed it to single "the"

Signed-off-by: Hari <harichandrakanthan@gmail.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/e1000/e1000_hw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/e1000/e1000_hw.c b/drivers/net/ethernet/intel/e1000/e1000_hw.c
index 48428d6a00be..623e516a9630 100644
--- a/drivers/net/ethernet/intel/e1000/e1000_hw.c
+++ b/drivers/net/ethernet/intel/e1000/e1000_hw.c
@@ -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)
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* Re: [net-next 00/17][pull request] Intel Wired LAN Driver Updates 2020-05-28
  2020-05-29  4:39 [net-next 00/17][pull request] Intel Wired LAN Driver Updates 2020-05-28 Jeff Kirsher
                   ` (16 preceding siblings ...)
  2020-05-29  4:40 ` [net-next 17/17] e1000: Fix typo in the comment Jeff Kirsher
@ 2020-05-29 19:17 ` David Miller
  17 siblings, 0 replies; 19+ messages in thread
From: David Miller @ 2020-05-29 19:17 UTC (permalink / raw)
  To: jeffrey.t.kirsher; +Cc: netdev, nhorman, sassmann

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Thu, 28 May 2020 21:39:47 -0700

> This series contains updates to e1000, e1000e, igc, igb, ixgbe and i40e.

Pulled, thanks Jeff.

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2020-05-29 19:18 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-29  4:39 [net-next 00/17][pull request] Intel Wired LAN Driver Updates 2020-05-28 Jeff Kirsher
2020-05-29  4:39 ` [net-next 01/17] i40e: Use scnprintf() for avoiding potential buffer overflow Jeff Kirsher
2020-05-29  4:39 ` [net-next 02/17] i40e: trivial fixup of comments in i40e_xsk.c Jeff Kirsher
2020-05-29  4:39 ` [net-next 03/17] ixgbe: fix signed-integer-overflow warning Jeff Kirsher
2020-05-29  4:39 ` [net-next 04/17] ixgbe: Remove conversion to bool in ixgbe_device_supports_autoneg_fc() Jeff Kirsher
2020-05-29  4:39 ` [net-next 05/17] ixgbe: Use true, false for bool variable in __ixgbe_enable_sriov() Jeff Kirsher
2020-05-29  4:39 ` [net-next 06/17] ixgbe: Remove unused inline function ixgbe_irq_disable_queues Jeff Kirsher
2020-05-29  4:39 ` [net-next 07/17] igb: make igb_set_fc_watermarks() return void Jeff Kirsher
2020-05-29  4:39 ` [net-next 08/17] igc: Remove unused flags Jeff Kirsher
2020-05-29  4:39 ` [net-next 09/17] igc: Reject NFC rules with multiple matches Jeff Kirsher
2020-05-29  4:39 ` [net-next 10/17] igc: Fix IGC_MAX_RXNFC_RULES Jeff Kirsher
2020-05-29  4:39 ` [net-next 11/17] e1000e: Relax condition to trigger reset for ME workaround Jeff Kirsher
2020-05-29  4:39 ` [net-next 12/17] i40e: Make i40e_shutdown_adminq() return void Jeff Kirsher
2020-05-29  4:40 ` [net-next 13/17] igc: Remove symbol error counter Jeff Kirsher
2020-05-29  4:40 ` [net-next 14/17] igc: Add Receive Error Counter Jeff Kirsher
2020-05-29  4:40 ` [net-next 15/17] igc: Remove Sequence " Jeff Kirsher
2020-05-29  4:40 ` [net-next 16/17] igc: Fix wrong register name Jeff Kirsher
2020-05-29  4:40 ` [net-next 17/17] e1000: Fix typo in the comment Jeff Kirsher
2020-05-29 19:17 ` [net-next 00/17][pull request] Intel Wired LAN Driver Updates 2020-05-28 David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.