1 Sep 2011 04:02
[PATCH] ethtool: Uncook tg3 regdump output
Matt Carlson <mcarlson <at> broadcom.com>
2011-09-01 02:02:37 GMT
2011-09-01 02:02:37 GMT
tg3 devices have changed a lot since the bcm5700 days. Register blocks
have been added, removed and redefined. The existing tg3 register dump
code has not kept up.
This patch changes the tg3_dump_regs() function to be more simplistic.
Rather than attempting to locate where meaningful data is, it will
instead print the registers as 32-bit values, omitting all registers
that have a value of zero. By performing the output this way, we hope
to future-proof the interface.
Signed-off-by: Matt Carlson <mcarlson <at> broadcom.com>
---
tg3.c | 30 +++++++-----------------------
1 files changed, 7 insertions(+), 23 deletions(-)
diff --git a/tg3.c b/tg3.c
index 1ce07a8..4868504 100644
--- a/tg3.c
+++ b/tg3.c
<at> <at> -26,32 +26,16 <at> <at> tg3_dump_eeprom(struct ethtool_drvinfo *info, struct ethtool_eeprom *ee)
int
tg3_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs)
{
- int i, j;
- int reg_boundaries[] = { 0x015c, 0x0200, 0x0400, 0x0400, 0x08f0, 0x0c00,
- 0x0ce0, 0x1000, 0x1004, 0x1400, 0x1480, 0x1800,
- 0x1848, 0x1c00, 0x1c04, 0x2000, 0x225c, 0x2400,
- 0x24c4, 0x2800, 0x2804, 0x2c00, 0x2c20, 0x3000,
- 0x3014, 0x3400, 0x3408, 0x3800, 0x3808, 0x3c00,
- 0x3d00, 0x4000, 0x4010, 0x4400, 0x4458, 0x4800,
(Continue reading)
RSS Feed