Commit 8adfc3ae authored by Vince Bridgers's avatar Vince Bridgers Committed by David S. Miller

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: default avatarVince Bridgers <vbridgers2013@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 70abc798
...@@ -181,6 +181,14 @@ static void tse_get_regs(struct net_device *dev, struct ethtool_regs *regs, ...@@ -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 *tse_mac_regs = (u32 *)priv->mac_dev;
u32 *buf = regbuf; 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++) for (i = 0; i < TSE_NUM_REGS; i++)
buf[i] = ioread32(&tse_mac_regs[i]); buf[i] = ioread32(&tse_mac_regs[i]);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment