Skip to contentSkip to conversation

net: dsa: sja1105: show more ethtool statistics counters for P/Q/R/S

PATCH Applied Vladimir Oltean 2 participants 2 messages Mar 27, 2020 – Mar 30, 2020

Subsystems (4)
lore
Share & tools
lore

Vladimir Oltean

author maintainer
#0 lore raw

PATCH 1/1 net: dsa: sja1105: show more ethtool statistics counters for P/Q/R/S

From: Vladimir Oltean <[email protected]>

It looks like the P/Q/R/S series supports some more counters, generically named "Ethernet statistics counter", which we were not printing. Add them.

---
 drivers/net/dsa/sja1105/sja1105.h         |   1 +
 drivers/net/dsa/sja1105/sja1105_ethtool.c | 133 +++++++++++++++++++++-
 drivers/net/dsa/sja1105/sja1105_spi.c     |   1 +
 3 files changed, 134 insertions(+), 1 deletion(-)
drivers/net/dsa/sja1105/sja1105.h +1 -0
index 0e5b739b2fe8..d97d4699104e 100644
@@ -60,6 +60,7 @@ struct sja1105_regs {
 	u64 mac[SJA1105_NUM_PORTS];
 	u64 mac_hl1[SJA1105_NUM_PORTS];
 	u64 mac_hl2[SJA1105_NUM_PORTS];
+	u64 ether_stats[SJA1105_NUM_PORTS];
 	u64 qlevel[SJA1105_NUM_PORTS];
 };
 
drivers/net/dsa/sja1105/sja1105_ethtool.c +132 -1

173 lines not on this page · raw message

drivers/net/dsa/sja1105/sja1105_spi.c +1 -0
index fef2c50cd3f6..04bdb72ae6b6 100644
@@ -482,6 +482,7 @@ static struct sja1105_regs sja1105pqrs_regs = {
 	.mac = {0x200, 0x202, 0x204, 0x206, 0x208},
 	.mac_hl1 = {0x400, 0x410, 0x420, 0x430, 0x440},
 	.mac_hl2 = {0x600, 0x610, 0x620, 0x630, 0x640},
+	.ether_stats = {0x1400, 0x1418, 0x1430, 0x1448, 0x1460},
 	/* UM11040.pdf, Table 114 */
 	.mii_tx_clk = {0x100013, 0x100019, 0x10001F, 0x100025, 0x10002B},
 	.mii_rx_clk = {0x100014, 0x10001A, 0x100020, 0x100026, 0x10002C},
Signature · 1 line
2.17.1