Skip to contentSkip to conversation

Ethtool: Add Altera Triple Speed Ethernet Support

PATCH New Vince Bridgers 2 participants 3 messages May 8, 2014 – May 27, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Ethtool: Add Altera Triple Speed Ethernet Support

This patch adds Altera Triple Speed Ethernet support to dump registers from Ethtool.

If you find this patch acceptable, please consider this for inclusion.

Thank you,

Vince

Vince Bridgers (1):
Ethtool: Add Altera Triple Speed Ethernet Support

 Makefile.am |    2 +-
 ethtool.c   |    1 +
 internal.h  |    4 +++
 tse.c       |  106 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 112 insertions(+), 1 deletion(-)
 create mode 100644 tse.c
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/1 Ethtool: Add Altera Triple Speed Ethernet Support

This patch adds Altera Triple Speed Ethernet support for dumping formatted register output from Ethtool.

---
 Makefile.am |    2 +-
 ethtool.c   |    1 +
 internal.h  |    4 +++
 tse.c       |  106 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 112 insertions(+), 1 deletion(-)
 create mode 100644 tse.c
Makefile.am +1 -1
index fd3b17f..4698d16 100644
@@ -13,7 +13,7 @@ ethtool_SOURCES += \
 		  fec_8xx.c ibm_emac.c ixgb.c ixgbe.c natsemi.c	\
 		  pcnet32.c realtek.c tg3.c marvell.c vioc.c	\
 		  smsc911x.c at76c50x-usb.c sfc.c stmmac.c	\
-		  sfpid.c sfpdiag.c ixgbevf.c
+		  sfpid.c sfpdiag.c ixgbevf.c tse.c
 endif
 
 TESTS = test-cmdline test-features
ethtool.c +1 -0
index 8e968a8..19b8b0c 100644
@@ -910,6 +910,7 @@ static const struct {
 	{ "st_mac100", st_mac100_dump_regs },
 	{ "st_gmac", st_gmac_dump_regs },
 	{ "et131x", et131x_dump_regs },
+	{ "altera_tse", altera_tse_dump_regs },
 #endif
 };
 
internal.h +4 -0
index 86a64f2..a9dfae0 100644
@@ -243,6 +243,10 @@ int st_gmac_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs);
 /* Et131x ethernet controller */
 int et131x_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs);
 
+/* Altera TSE 10/100/1000 ethernet controller */
+int altera_tse_dump_regs(struct ethtool_drvinfo *info,
+			 struct ethtool_regs *regs);
+
 /* Rx flow classification */
 int rxclass_parse_ruleopts(struct cmd_context *ctx,
 			   struct ethtool_rx_flow_spec *fsp);
tse.c new file +106 -0

106 lines not on this page · raw message

Signature · 1 line
1.7.9.5
#2 lore raw
Quoted 2 lines · Vince Bridgers

This patch adds Altera Triple Speed Ethernet support for dumping formatted register output from Ethtool.

Sorry for the slow response

[...]

Quoted 2 lines
tse.c new file +0 -0

[...]

Quoted 8 lines
tse.c new file +8 -0
+int altera_tse_dump_regs(struct ethtool_drvinfo *info,
+			 struct ethtool_regs *regs)
+{
+	int i;
+	u32 *tsereg = (unsigned int *)regs->data;
+	u32 version = regs->version;
+
+	/*

tse.c line 42

Quoted 10 lines
tse.c new file +10 -0
+	 * Version 1: Initial TSE driver release. No feature information
+	 *	      available, 32-bits of version is equal to 1.
+	 *
+	 * Version 2: Lower 16-bits of version is 2, upper 16 bits are:
+	 *	Bit 16 - SGMDA or MSGDMA Registers
+	 *	Bit 17 - PCS Present
+	 *	Bit 18 - Supplementary MAC Address Filter Registers Present
+	 *	Bit 19 - Multicast Hash Filter Present
+	 *	Bit 20 - IEEE 1588 Feature Present
+	 */

[...]

You need to check that you recognise the version and bail out if not. Otherwise, this is likely to do something silly when the driver supports a new hardware revision.

Ben.

Signature · 2 lines
Ben Hutchings
A free society is one where it is safe to be unpopular. - Adlai Stevenson