All of lore.kernel.org
 help / color / mirror / Atom feed
* [net-next v2 0/8][pull request] 1GbE Intel Wired LAN Driver Updates 2020-07-27
@ 2020-07-27 17:13 Tony Nguyen
  2020-07-27 17:13 ` [net-next v2 1/8] igc: Remove unneeded variable Tony Nguyen
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Tony Nguyen @ 2020-07-27 17:13 UTC (permalink / raw)
  To: davem; +Cc: Tony Nguyen, netdev, nhorman, sassmann, jeffrey.t.kirsher

This series contains updates to igc driver only.

Sasha cleans up double definitions, unneeded and non applicable
registers, and removes unused fields in structs. Ensures the Receive
Descriptor Minimum Threshold Count is cleared and fixes a static checker
error.

v2: Remove fields from hw_stats in patches that removed their uses.
Reworded patch descriptions for patches 1, 2, and 4.

The following are changes since commit a57066b1a01977a646145f4ce8dfb4538b08368a:
  Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
and are available in the git repository at:
  git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue 1GbE

Sasha Neftin (8):
  igc: Remove unneeded variable
  igc: Add Receive Descriptor Minimum Threshold Count to clear HW
    counters
  igc: Remove unneeded ICTXQMTC register
  igc: Fix registers definition
  igc: Remove ledctl_ fields from the mac_info structure
  igc: Clean up the mac_info structure
  igc: Clean up the hw_stats structure
  igc: Fix static checker warning

 drivers/net/ethernet/intel/igc/igc_hw.h   | 20 --------------------
 drivers/net/ethernet/intel/igc/igc_mac.c  | 12 ++----------
 drivers/net/ethernet/intel/igc/igc_main.c |  8 --------
 drivers/net/ethernet/intel/igc/igc_regs.h | 14 --------------
 4 files changed, 2 insertions(+), 52 deletions(-)

-- 
2.26.2


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

* [net-next v2 1/8] igc: Remove unneeded variable
  2020-07-27 17:13 [net-next v2 0/8][pull request] 1GbE Intel Wired LAN Driver Updates 2020-07-27 Tony Nguyen
@ 2020-07-27 17:13 ` Tony Nguyen
  2020-07-27 17:13 ` [net-next v2 2/8] igc: Add Receive Descriptor Minimum Threshold Count to clear HW counters Tony Nguyen
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Tony Nguyen @ 2020-07-27 17:13 UTC (permalink / raw)
  To: davem
  Cc: Sasha Neftin, netdev, nhorman, sassmann, jeffrey.t.kirsher,
	anthony.l.nguyen, Aaron Brown

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

Though we are populating and tracking ictxqec, the value is not being used
for anything so remove it altogether and save the register read.

Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
 drivers/net/ethernet/intel/igc/igc_hw.h   | 1 -
 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 | 2 --
 4 files changed, 5 deletions(-)

diff --git a/drivers/net/ethernet/intel/igc/igc_hw.h b/drivers/net/ethernet/intel/igc/igc_hw.h
index 2ab7d9fab6af..68e83d8529ea 100644
--- a/drivers/net/ethernet/intel/igc/igc_hw.h
+++ b/drivers/net/ethernet/intel/igc/igc_hw.h
@@ -280,7 +280,6 @@ struct igc_hw_stats {
 	u64 icrxatc;
 	u64 ictxptc;
 	u64 ictxatc;
-	u64 ictxqec;
 	u64 ictxqmtc;
 	u64 icrxdmtc;
 	u64 icrxoc;
diff --git a/drivers/net/ethernet/intel/igc/igc_mac.c b/drivers/net/ethernet/intel/igc/igc_mac.c
index b47e7b0a6398..2d9ca3e1bdde 100644
--- a/drivers/net/ethernet/intel/igc/igc_mac.c
+++ b/drivers/net/ethernet/intel/igc/igc_mac.c
@@ -301,7 +301,6 @@ void igc_clear_hw_cntrs_base(struct igc_hw *hw)
 	rd32(IGC_ICRXATC);
 	rd32(IGC_ICTXPTC);
 	rd32(IGC_ICTXATC);
-	rd32(IGC_ICTXQEC);
 	rd32(IGC_ICTXQMTC);
 	rd32(IGC_ICRXDMTC);
 
diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c
index 8d5869dcf798..e620d7a78d05 100644
--- a/drivers/net/ethernet/intel/igc/igc_main.c
+++ b/drivers/net/ethernet/intel/igc/igc_main.c
@@ -3735,7 +3735,6 @@ void igc_update_stats(struct igc_adapter *adapter)
 	adapter->stats.icrxatc += rd32(IGC_ICRXATC);
 	adapter->stats.ictxptc += rd32(IGC_ICTXPTC);
 	adapter->stats.ictxatc += rd32(IGC_ICTXATC);
-	adapter->stats.ictxqec += rd32(IGC_ICTXQEC);
 	adapter->stats.ictxqmtc += rd32(IGC_ICTXQMTC);
 	adapter->stats.icrxdmtc += rd32(IGC_ICRXDMTC);
 
diff --git a/drivers/net/ethernet/intel/igc/igc_regs.h b/drivers/net/ethernet/intel/igc/igc_regs.h
index 1c46cec5a799..d6ed1b1ebcbc 100644
--- a/drivers/net/ethernet/intel/igc/igc_regs.h
+++ b/drivers/net/ethernet/intel/igc/igc_regs.h
@@ -63,7 +63,6 @@
 #define IGC_ICRXATC		0x04108  /* Rx Absolute Timer Expire Count */
 #define IGC_ICTXPTC		0x0410C  /* Tx Packet Timer Expire Count */
 #define IGC_ICTXATC		0x04110  /* Tx Absolute Timer Expire Count */
-#define IGC_ICTXQEC		0x04118  /* Tx Queue Empty Count */
 #define IGC_ICTXQMTC		0x0411C  /* Tx Queue Min Threshold Count */
 #define IGC_ICRXDMTC		0x04120  /* Rx Descriptor Min Threshold Count */
 #define IGC_ICRXOC		0x04124  /* Receiver Overrun Count */
@@ -184,7 +183,6 @@
 #define IGC_IAC		0x04100  /* Interrupt Assertion Count */
 #define IGC_ICTXPTC	0x0410C  /* Interrupt Cause Tx Pkt Timer Expire Count */
 #define IGC_ICTXATC	0x04110  /* Interrupt Cause Tx Abs Timer Expire Count */
-#define IGC_ICTXQEC	0x04118  /* Interrupt Cause Tx Queue Empty Count */
 #define IGC_ICTXQMTC	0x0411C  /* Interrupt Cause Tx Queue Min Thresh Count */
 #define IGC_RPTHC	0x04104  /* Rx Packets To Host */
 #define IGC_TLPIC	0x04148  /* EEE Tx LPI Count */
-- 
2.26.2


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

* [net-next v2 2/8] igc: Add Receive Descriptor Minimum Threshold Count to clear HW counters
  2020-07-27 17:13 [net-next v2 0/8][pull request] 1GbE Intel Wired LAN Driver Updates 2020-07-27 Tony Nguyen
  2020-07-27 17:13 ` [net-next v2 1/8] igc: Remove unneeded variable Tony Nguyen
@ 2020-07-27 17:13 ` Tony Nguyen
  2020-07-27 17:13 ` [net-next v2 3/8] igc: Remove unneeded ICTXQMTC register Tony Nguyen
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Tony Nguyen @ 2020-07-27 17:13 UTC (permalink / raw)
  To: davem
  Cc: Sasha Neftin, netdev, nhorman, sassmann, jeffrey.t.kirsher,
	anthony.l.nguyen, Aaron Brown

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

The statistics of this register are being tracked, however, the register
was inadvertently missed when implementing igc_clear_hw_cntrs_base().
The register is clear on read, so add it to the function so that the
register is cleared when requested so the tracked count is accurate.

Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
 drivers/net/ethernet/intel/igc/igc_mac.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/intel/igc/igc_mac.c b/drivers/net/ethernet/intel/igc/igc_mac.c
index 2d9ca3e1bdde..3a618e69514e 100644
--- a/drivers/net/ethernet/intel/igc/igc_mac.c
+++ b/drivers/net/ethernet/intel/igc/igc_mac.c
@@ -308,6 +308,7 @@ void igc_clear_hw_cntrs_base(struct igc_hw *hw)
 	rd32(IGC_TLPIC);
 	rd32(IGC_RLPIC);
 	rd32(IGC_HGPTC);
+	rd32(IGC_RXDMTC);
 	rd32(IGC_HGORCL);
 	rd32(IGC_HGORCH);
 	rd32(IGC_HGOTCL);
-- 
2.26.2


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

* [net-next v2 3/8] igc: Remove unneeded ICTXQMTC register
  2020-07-27 17:13 [net-next v2 0/8][pull request] 1GbE Intel Wired LAN Driver Updates 2020-07-27 Tony Nguyen
  2020-07-27 17:13 ` [net-next v2 1/8] igc: Remove unneeded variable Tony Nguyen
  2020-07-27 17:13 ` [net-next v2 2/8] igc: Add Receive Descriptor Minimum Threshold Count to clear HW counters Tony Nguyen
@ 2020-07-27 17:13 ` Tony Nguyen
  2020-07-27 17:13 ` [net-next v2 4/8] igc: Fix registers definition Tony Nguyen
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Tony Nguyen @ 2020-07-27 17:13 UTC (permalink / raw)
  To: davem
  Cc: Sasha Neftin, netdev, nhorman, sassmann, jeffrey.t.kirsher,
	anthony.l.nguyen, Aaron Brown

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

Tx Queue Min Threshold Count register no applicable for the i225 device.
This patch comes to clean up it.

Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
 drivers/net/ethernet/intel/igc/igc_hw.h   | 1 -
 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 | 2 --
 4 files changed, 5 deletions(-)

diff --git a/drivers/net/ethernet/intel/igc/igc_hw.h b/drivers/net/ethernet/intel/igc/igc_hw.h
index 68e83d8529ea..f11fa0a4baff 100644
--- a/drivers/net/ethernet/intel/igc/igc_hw.h
+++ b/drivers/net/ethernet/intel/igc/igc_hw.h
@@ -280,7 +280,6 @@ struct igc_hw_stats {
 	u64 icrxatc;
 	u64 ictxptc;
 	u64 ictxatc;
-	u64 ictxqmtc;
 	u64 icrxdmtc;
 	u64 icrxoc;
 	u64 cbtmpc;
diff --git a/drivers/net/ethernet/intel/igc/igc_mac.c b/drivers/net/ethernet/intel/igc/igc_mac.c
index 3a618e69514e..f85c8bcd7f70 100644
--- a/drivers/net/ethernet/intel/igc/igc_mac.c
+++ b/drivers/net/ethernet/intel/igc/igc_mac.c
@@ -301,7 +301,6 @@ void igc_clear_hw_cntrs_base(struct igc_hw *hw)
 	rd32(IGC_ICRXATC);
 	rd32(IGC_ICTXPTC);
 	rd32(IGC_ICTXATC);
-	rd32(IGC_ICTXQMTC);
 	rd32(IGC_ICRXDMTC);
 
 	rd32(IGC_RPTHC);
diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c
index e620d7a78d05..6f86783836c5 100644
--- a/drivers/net/ethernet/intel/igc/igc_main.c
+++ b/drivers/net/ethernet/intel/igc/igc_main.c
@@ -3735,7 +3735,6 @@ void igc_update_stats(struct igc_adapter *adapter)
 	adapter->stats.icrxatc += rd32(IGC_ICRXATC);
 	adapter->stats.ictxptc += rd32(IGC_ICTXPTC);
 	adapter->stats.ictxatc += rd32(IGC_ICTXATC);
-	adapter->stats.ictxqmtc += rd32(IGC_ICTXQMTC);
 	adapter->stats.icrxdmtc += rd32(IGC_ICRXDMTC);
 
 	/* Fill out the OS statistics structure */
diff --git a/drivers/net/ethernet/intel/igc/igc_regs.h b/drivers/net/ethernet/intel/igc/igc_regs.h
index d6ed1b1ebcbc..23554d39ad18 100644
--- a/drivers/net/ethernet/intel/igc/igc_regs.h
+++ b/drivers/net/ethernet/intel/igc/igc_regs.h
@@ -63,7 +63,6 @@
 #define IGC_ICRXATC		0x04108  /* Rx Absolute Timer Expire Count */
 #define IGC_ICTXPTC		0x0410C  /* Tx Packet Timer Expire Count */
 #define IGC_ICTXATC		0x04110  /* Tx Absolute Timer Expire Count */
-#define IGC_ICTXQMTC		0x0411C  /* Tx Queue Min Threshold Count */
 #define IGC_ICRXDMTC		0x04120  /* Rx Descriptor Min Threshold Count */
 #define IGC_ICRXOC		0x04124  /* Receiver Overrun Count */
 
@@ -183,7 +182,6 @@
 #define IGC_IAC		0x04100  /* Interrupt Assertion Count */
 #define IGC_ICTXPTC	0x0410C  /* Interrupt Cause Tx Pkt Timer Expire Count */
 #define IGC_ICTXATC	0x04110  /* Interrupt Cause Tx Abs Timer Expire Count */
-#define IGC_ICTXQMTC	0x0411C  /* Interrupt Cause Tx Queue Min Thresh Count */
 #define IGC_RPTHC	0x04104  /* Rx Packets To Host */
 #define IGC_TLPIC	0x04148  /* EEE Tx LPI Count */
 #define IGC_RLPIC	0x0414C  /* EEE Rx LPI Count */
-- 
2.26.2


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

* [net-next v2 4/8] igc: Fix registers definition
  2020-07-27 17:13 [net-next v2 0/8][pull request] 1GbE Intel Wired LAN Driver Updates 2020-07-27 Tony Nguyen
                   ` (2 preceding siblings ...)
  2020-07-27 17:13 ` [net-next v2 3/8] igc: Remove unneeded ICTXQMTC register Tony Nguyen
@ 2020-07-27 17:13 ` Tony Nguyen
  2020-07-27 17:13 ` [net-next v2 5/8] igc: Remove ledctl_ fields from the mac_info structure Tony Nguyen
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Tony Nguyen @ 2020-07-27 17:13 UTC (permalink / raw)
  To: davem
  Cc: Sasha Neftin, netdev, nhorman, sassmann, jeffrey.t.kirsher,
	anthony.l.nguyen, Aaron Brown

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

IGC_ICTXPTC and IGC_ICTXATC are already defined elsewhere, remove this
double definition. Also, remove unneeded registers as they are not
applicable to i225 devices.

Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
 drivers/net/ethernet/intel/igc/igc_hw.h   | 4 ----
 drivers/net/ethernet/intel/igc/igc_mac.c  | 4 ----
 drivers/net/ethernet/intel/igc/igc_main.c | 4 ----
 drivers/net/ethernet/intel/igc/igc_regs.h | 8 --------
 4 files changed, 20 deletions(-)

diff --git a/drivers/net/ethernet/intel/igc/igc_hw.h b/drivers/net/ethernet/intel/igc/igc_hw.h
index f11fa0a4baff..ac3de58e6e26 100644
--- a/drivers/net/ethernet/intel/igc/igc_hw.h
+++ b/drivers/net/ethernet/intel/igc/igc_hw.h
@@ -276,12 +276,8 @@ struct igc_hw_stats {
 	u64 tsctc;
 	u64 tsctfc;
 	u64 iac;
-	u64 icrxptc;
-	u64 icrxatc;
 	u64 ictxptc;
 	u64 ictxatc;
-	u64 icrxdmtc;
-	u64 icrxoc;
 	u64 cbtmpc;
 	u64 htdpmc;
 	u64 cbrdpc;
diff --git a/drivers/net/ethernet/intel/igc/igc_mac.c b/drivers/net/ethernet/intel/igc/igc_mac.c
index f85c8bcd7f70..02bbb8ac4f68 100644
--- a/drivers/net/ethernet/intel/igc/igc_mac.c
+++ b/drivers/net/ethernet/intel/igc/igc_mac.c
@@ -295,13 +295,9 @@ void igc_clear_hw_cntrs_base(struct igc_hw *hw)
 	rd32(IGC_MGTPTC);
 
 	rd32(IGC_IAC);
-	rd32(IGC_ICRXOC);
 
-	rd32(IGC_ICRXPTC);
-	rd32(IGC_ICRXATC);
 	rd32(IGC_ICTXPTC);
 	rd32(IGC_ICTXATC);
-	rd32(IGC_ICRXDMTC);
 
 	rd32(IGC_RPTHC);
 	rd32(IGC_TLPIC);
diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c
index 6f86783836c5..d91fa4c06f2e 100644
--- a/drivers/net/ethernet/intel/igc/igc_main.c
+++ b/drivers/net/ethernet/intel/igc/igc_main.c
@@ -3730,12 +3730,8 @@ void igc_update_stats(struct igc_adapter *adapter)
 	adapter->stats.tsctc += rd32(IGC_TSCTC);
 
 	adapter->stats.iac += rd32(IGC_IAC);
-	adapter->stats.icrxoc += rd32(IGC_ICRXOC);
-	adapter->stats.icrxptc += rd32(IGC_ICRXPTC);
-	adapter->stats.icrxatc += rd32(IGC_ICRXATC);
 	adapter->stats.ictxptc += rd32(IGC_ICTXPTC);
 	adapter->stats.ictxatc += rd32(IGC_ICTXATC);
-	adapter->stats.icrxdmtc += rd32(IGC_ICRXDMTC);
 
 	/* Fill out the OS statistics structure */
 	net_stats->multicast = adapter->stats.mprc;
diff --git a/drivers/net/ethernet/intel/igc/igc_regs.h b/drivers/net/ethernet/intel/igc/igc_regs.h
index 23554d39ad18..5ff3316717c7 100644
--- a/drivers/net/ethernet/intel/igc/igc_regs.h
+++ b/drivers/net/ethernet/intel/igc/igc_regs.h
@@ -58,14 +58,6 @@
 #define IGC_IVAR_MISC		0x01740  /* IVAR for "other" causes - RW */
 #define IGC_GPIE		0x01514  /* General Purpose Intr Enable - RW */
 
-/* Interrupt Cause */
-#define IGC_ICRXPTC		0x04104  /* Rx Packet Timer Expire Count */
-#define IGC_ICRXATC		0x04108  /* Rx Absolute Timer Expire Count */
-#define IGC_ICTXPTC		0x0410C  /* Tx Packet Timer Expire Count */
-#define IGC_ICTXATC		0x04110  /* Tx Absolute Timer Expire Count */
-#define IGC_ICRXDMTC		0x04120  /* Rx Descriptor Min Threshold Count */
-#define IGC_ICRXOC		0x04124  /* Receiver Overrun Count */
-
 /* MSI-X Table Register Descriptions */
 #define IGC_PBACL		0x05B68  /* MSIx PBA Clear - R/W 1 to clear */
 
-- 
2.26.2


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

* [net-next v2 5/8] igc: Remove ledctl_ fields from the mac_info structure
  2020-07-27 17:13 [net-next v2 0/8][pull request] 1GbE Intel Wired LAN Driver Updates 2020-07-27 Tony Nguyen
                   ` (3 preceding siblings ...)
  2020-07-27 17:13 ` [net-next v2 4/8] igc: Fix registers definition Tony Nguyen
@ 2020-07-27 17:13 ` Tony Nguyen
  2020-07-27 17:13 ` [net-next v2 6/8] igc: Clean up " Tony Nguyen
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Tony Nguyen @ 2020-07-27 17:13 UTC (permalink / raw)
  To: davem
  Cc: Sasha Neftin, netdev, nhorman, sassmann, jeffrey.t.kirsher,
	anthony.l.nguyen, Aaron Brown

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

LED control currently not implemented.

Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
 drivers/net/ethernet/intel/igc/igc_hw.h | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/net/ethernet/intel/igc/igc_hw.h b/drivers/net/ethernet/intel/igc/igc_hw.h
index ac3de58e6e26..694c209657b1 100644
--- a/drivers/net/ethernet/intel/igc/igc_hw.h
+++ b/drivers/net/ethernet/intel/igc/igc_hw.h
@@ -83,9 +83,6 @@ struct igc_mac_info {
 	enum igc_mac_type type;
 
 	u32 collision_delta;
-	u32 ledctl_default;
-	u32 ledctl_mode1;
-	u32 ledctl_mode2;
 	u32 mc_filter_type;
 	u32 tx_packet_delta;
 	u32 txcw;
-- 
2.26.2


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

* [net-next v2 6/8] igc: Clean up the mac_info structure
  2020-07-27 17:13 [net-next v2 0/8][pull request] 1GbE Intel Wired LAN Driver Updates 2020-07-27 Tony Nguyen
                   ` (4 preceding siblings ...)
  2020-07-27 17:13 ` [net-next v2 5/8] igc: Remove ledctl_ fields from the mac_info structure Tony Nguyen
@ 2020-07-27 17:13 ` Tony Nguyen
  2020-07-27 17:13 ` [net-next v2 7/8] igc: Clean up the hw_stats structure Tony Nguyen
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Tony Nguyen @ 2020-07-27 17:13 UTC (permalink / raw)
  To: davem
  Cc: Sasha Neftin, netdev, nhorman, sassmann, jeffrey.t.kirsher,
	anthony.l.nguyen, Aaron Brown

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

collision_delta, tx_packet_delta, txcw, adaptive_ifs and
has_fwsm fields not in use.
This patch come to clean up the driver code.

Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
 drivers/net/ethernet/intel/igc/igc_hw.h | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/net/ethernet/intel/igc/igc_hw.h b/drivers/net/ethernet/intel/igc/igc_hw.h
index 694c209657b1..4b3d0b0f917b 100644
--- a/drivers/net/ethernet/intel/igc/igc_hw.h
+++ b/drivers/net/ethernet/intel/igc/igc_hw.h
@@ -82,10 +82,7 @@ struct igc_mac_info {
 
 	enum igc_mac_type type;
 
-	u32 collision_delta;
 	u32 mc_filter_type;
-	u32 tx_packet_delta;
-	u32 txcw;
 
 	u16 mta_reg_count;
 	u16 uta_reg_count;
@@ -95,8 +92,6 @@ struct igc_mac_info {
 
 	u8 forced_speed_duplex;
 
-	bool adaptive_ifs;
-	bool has_fwsm;
 	bool asf_firmware_present;
 	bool arc_subsystem_valid;
 
-- 
2.26.2


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

* [net-next v2 7/8] igc: Clean up the hw_stats structure
  2020-07-27 17:13 [net-next v2 0/8][pull request] 1GbE Intel Wired LAN Driver Updates 2020-07-27 Tony Nguyen
                   ` (5 preceding siblings ...)
  2020-07-27 17:13 ` [net-next v2 6/8] igc: Clean up " Tony Nguyen
@ 2020-07-27 17:13 ` Tony Nguyen
  2020-07-27 17:13 ` [net-next v2 8/8] igc: Fix static checker warning Tony Nguyen
  2020-07-27 20:12 ` [net-next v2 0/8][pull request] 1GbE Intel Wired LAN Driver Updates 2020-07-27 David Miller
  8 siblings, 0 replies; 10+ messages in thread
From: Tony Nguyen @ 2020-07-27 17:13 UTC (permalink / raw)
  To: davem
  Cc: Sasha Neftin, netdev, nhorman, sassmann, jeffrey.t.kirsher,
	anthony.l.nguyen, Aaron Brown

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

Remove ictxptc, ictxatc, cbtmpc, cbrdpc, cbrmpc and htcbdpc fields from
the hw_stats structure. Accordance to the i225 device
specification these fields not in use.
This patch come to clean up the driver code.

Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
 drivers/net/ethernet/intel/igc/igc_hw.h   | 6 ------
 drivers/net/ethernet/intel/igc/igc_mac.c  | 3 ---
 drivers/net/ethernet/intel/igc/igc_main.c | 2 --
 drivers/net/ethernet/intel/igc/igc_regs.h | 2 --
 4 files changed, 13 deletions(-)

diff --git a/drivers/net/ethernet/intel/igc/igc_hw.h b/drivers/net/ethernet/intel/igc/igc_hw.h
index 4b3d0b0f917b..b9fe51b91c47 100644
--- a/drivers/net/ethernet/intel/igc/igc_hw.h
+++ b/drivers/net/ethernet/intel/igc/igc_hw.h
@@ -268,15 +268,9 @@ struct igc_hw_stats {
 	u64 tsctc;
 	u64 tsctfc;
 	u64 iac;
-	u64 ictxptc;
-	u64 ictxatc;
-	u64 cbtmpc;
 	u64 htdpmc;
-	u64 cbrdpc;
-	u64 cbrmpc;
 	u64 rpthc;
 	u64 hgptc;
-	u64 htcbdpc;
 	u64 hgorc;
 	u64 hgotc;
 	u64 lenerrs;
diff --git a/drivers/net/ethernet/intel/igc/igc_mac.c b/drivers/net/ethernet/intel/igc/igc_mac.c
index 02bbb8ac4f68..674b8ad21fea 100644
--- a/drivers/net/ethernet/intel/igc/igc_mac.c
+++ b/drivers/net/ethernet/intel/igc/igc_mac.c
@@ -296,9 +296,6 @@ void igc_clear_hw_cntrs_base(struct igc_hw *hw)
 
 	rd32(IGC_IAC);
 
-	rd32(IGC_ICTXPTC);
-	rd32(IGC_ICTXATC);
-
 	rd32(IGC_RPTHC);
 	rd32(IGC_TLPIC);
 	rd32(IGC_RLPIC);
diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c
index d91fa4c06f2e..7a6f2a0d413f 100644
--- a/drivers/net/ethernet/intel/igc/igc_main.c
+++ b/drivers/net/ethernet/intel/igc/igc_main.c
@@ -3730,8 +3730,6 @@ void igc_update_stats(struct igc_adapter *adapter)
 	adapter->stats.tsctc += rd32(IGC_TSCTC);
 
 	adapter->stats.iac += rd32(IGC_IAC);
-	adapter->stats.ictxptc += rd32(IGC_ICTXPTC);
-	adapter->stats.ictxatc += rd32(IGC_ICTXATC);
 
 	/* Fill out the OS statistics structure */
 	net_stats->multicast = adapter->stats.mprc;
diff --git a/drivers/net/ethernet/intel/igc/igc_regs.h b/drivers/net/ethernet/intel/igc/igc_regs.h
index 5ff3316717c7..b52dd9d737e8 100644
--- a/drivers/net/ethernet/intel/igc/igc_regs.h
+++ b/drivers/net/ethernet/intel/igc/igc_regs.h
@@ -172,8 +172,6 @@
 #define IGC_BPTC	0x040F4  /* Broadcast Packets Tx Count - R/clr */
 #define IGC_TSCTC	0x040F8  /* TCP Segmentation Context Tx - R/clr */
 #define IGC_IAC		0x04100  /* Interrupt Assertion Count */
-#define IGC_ICTXPTC	0x0410C  /* Interrupt Cause Tx Pkt Timer Expire Count */
-#define IGC_ICTXATC	0x04110  /* Interrupt Cause Tx Abs Timer Expire Count */
 #define IGC_RPTHC	0x04104  /* Rx Packets To Host */
 #define IGC_TLPIC	0x04148  /* EEE Tx LPI Count */
 #define IGC_RLPIC	0x0414C  /* EEE Rx LPI Count */
-- 
2.26.2


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

* [net-next v2 8/8] igc: Fix static checker warning
  2020-07-27 17:13 [net-next v2 0/8][pull request] 1GbE Intel Wired LAN Driver Updates 2020-07-27 Tony Nguyen
                   ` (6 preceding siblings ...)
  2020-07-27 17:13 ` [net-next v2 7/8] igc: Clean up the hw_stats structure Tony Nguyen
@ 2020-07-27 17:13 ` Tony Nguyen
  2020-07-27 20:12 ` [net-next v2 0/8][pull request] 1GbE Intel Wired LAN Driver Updates 2020-07-27 David Miller
  8 siblings, 0 replies; 10+ messages in thread
From: Tony Nguyen @ 2020-07-27 17:13 UTC (permalink / raw)
  To: davem
  Cc: Sasha Neftin, netdev, nhorman, sassmann, jeffrey.t.kirsher,
	anthony.l.nguyen, Dan Carpenter, Aaron Brown

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

drivers/net/ethernet/intel/igc/igc_mac.c:424 igc_check_for_copper_link()
error: uninitialized symbol 'link'.
This patch come to fix this warning and initialize the 'link' symbol.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Fixes: 707abf069548 ("igc: Add initial LTR support")
Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
 drivers/net/ethernet/intel/igc/igc_mac.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/igc/igc_mac.c b/drivers/net/ethernet/intel/igc/igc_mac.c
index 674b8ad21fea..09cd0ec7ee87 100644
--- a/drivers/net/ethernet/intel/igc/igc_mac.c
+++ b/drivers/net/ethernet/intel/igc/igc_mac.c
@@ -355,8 +355,8 @@ void igc_rar_set(struct igc_hw *hw, u8 *addr, u32 index)
 s32 igc_check_for_copper_link(struct igc_hw *hw)
 {
 	struct igc_mac_info *mac = &hw->mac;
+	bool link = false;
 	s32 ret_val;
-	bool link;
 
 	/* We only want to go out to the PHY registers to see if Auto-Neg
 	 * has completed and/or if our link status has changed.  The
-- 
2.26.2


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

* Re: [net-next v2 0/8][pull request] 1GbE Intel Wired LAN Driver Updates 2020-07-27
  2020-07-27 17:13 [net-next v2 0/8][pull request] 1GbE Intel Wired LAN Driver Updates 2020-07-27 Tony Nguyen
                   ` (7 preceding siblings ...)
  2020-07-27 17:13 ` [net-next v2 8/8] igc: Fix static checker warning Tony Nguyen
@ 2020-07-27 20:12 ` David Miller
  8 siblings, 0 replies; 10+ messages in thread
From: David Miller @ 2020-07-27 20:12 UTC (permalink / raw)
  To: anthony.l.nguyen; +Cc: netdev, nhorman, sassmann, jeffrey.t.kirsher

From: Tony Nguyen <anthony.l.nguyen@intel.com>
Date: Mon, 27 Jul 2020 10:13:30 -0700

> This series contains updates to igc driver only.
> 
> Sasha cleans up double definitions, unneeded and non applicable
> registers, and removes unused fields in structs. Ensures the Receive
> Descriptor Minimum Threshold Count is cleared and fixes a static checker
> error.
> 
> v2: Remove fields from hw_stats in patches that removed their uses.
> Reworded patch descriptions for patches 1, 2, and 4.
> 
> The following are changes since commit a57066b1a01977a646145f4ce8dfb4538b08368a:
>   Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
> and are available in the git repository at:
>   git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue 1GbE

Pulled, thank you.

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

end of thread, other threads:[~2020-07-27 20:12 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-27 17:13 [net-next v2 0/8][pull request] 1GbE Intel Wired LAN Driver Updates 2020-07-27 Tony Nguyen
2020-07-27 17:13 ` [net-next v2 1/8] igc: Remove unneeded variable Tony Nguyen
2020-07-27 17:13 ` [net-next v2 2/8] igc: Add Receive Descriptor Minimum Threshold Count to clear HW counters Tony Nguyen
2020-07-27 17:13 ` [net-next v2 3/8] igc: Remove unneeded ICTXQMTC register Tony Nguyen
2020-07-27 17:13 ` [net-next v2 4/8] igc: Fix registers definition Tony Nguyen
2020-07-27 17:13 ` [net-next v2 5/8] igc: Remove ledctl_ fields from the mac_info structure Tony Nguyen
2020-07-27 17:13 ` [net-next v2 6/8] igc: Clean up " Tony Nguyen
2020-07-27 17:13 ` [net-next v2 7/8] igc: Clean up the hw_stats structure Tony Nguyen
2020-07-27 17:13 ` [net-next v2 8/8] igc: Fix static checker warning Tony Nguyen
2020-07-27 20:12 ` [net-next v2 0/8][pull request] 1GbE Intel Wired LAN Driver Updates 2020-07-27 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.