summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/altera/altera_tse_ethtool.c
diff options
context:
space:
mode:
authorVince Bridgers <vbridgers2013@gmail.com>2014-03-20 20:43:15 -0500
committerDavid S. Miller <davem@davemloft.net>2014-03-24 12:45:00 -0400
commit8adfc3ae45fa854205608a04e5c71cd1c833579f (patch)
tree720ae4b9b6dd9fa134dd663b6fc84b7258e18438 /drivers/net/ethernet/altera/altera_tse_ethtool.c
parent70abc7987741ba57ff24457a3ccefc8be267e32e (diff)
Altera TSE: Set version number by driver's get regs
Set the version number returned by the driver's get regs routine invoked by ethtool so formatting can be dependent on the version number returned, and any interesting formatted output can check the version number for specific types of register data returned. Signed-off-by: Vince Bridgers <vbridgers2013@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/altera/altera_tse_ethtool.c')
-rw-r--r--drivers/net/ethernet/altera/altera_tse_ethtool.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/ethernet/altera/altera_tse_ethtool.c b/drivers/net/ethernet/altera/altera_tse_ethtool.c
index 63ac5f4960e..319ca74f5e7 100644
--- a/drivers/net/ethernet/altera/altera_tse_ethtool.c
+++ b/drivers/net/ethernet/altera/altera_tse_ethtool.c
@@ -181,6 +181,14 @@ static void tse_get_regs(struct net_device *dev, struct ethtool_regs *regs,
u32 *tse_mac_regs = (u32 *)priv->mac_dev;
u32 *buf = regbuf;
+ /* Set version to a known value, so ethtool knows
+ * how to do any special formatting of this data.
+ * This version number will need to change if and
+ * when this register table is changed.
+ */
+
+ regs->version = 1;
+
for (i = 0; i < TSE_NUM_REGS; i++)
buf[i] = ioread32(&tse_mac_regs[i]);
}