ethtool: add sky2 register dump
Subsystems (3)
PATCH 1/1 ethtool: add sky2 register dump
Add support for sky2 register dump, put it in a common file for both skge and sky2.
--- Makefile.am | 2 ethtool-util.h | 2 ethtool.c | 1 marvell.c | 327 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ skge.c | 189 -------------------------------- 5 files changed, 331 insertions(+), 190 deletions(-)
Makefile.am +1 -1
@@ -7,7 +7,7 @@ sbin_PROGRAMS = ethtool ethtool_SOURCES = ethtool.c ethtool-copy.h ethtool-util.h \ amd8111e.c de2104x.c e100.c e1000.c \ fec_8xx.c ibm_emac.c ixgb.c natsemi.c \ - pcnet32.c realtek.c tg3.c skge.c + pcnet32.c realtek.c tg3.c marvell.c dist-hook: cp $(top_srcdir)/ethtool.spec $(distdir)
ethtool-util.h +2 -0
@@ -51,4 +51,6 @@ int tg3_dump_regs(struct ethtool_drvinfo/* SysKonnect Gigabit (Genesis and Yukon) */ int skge_dump_regs (struct ethtool_drvinfo *info,struct ethtool_regs *regs); +/* Marvell SysKonnect Gigabit (Yukon2) */ +int sky2_dump_regs (struct ethtool_drvinfo *info,struct ethtool_regs *regs);#endif
ethtool.c +1 -0
@@ -957,6 +957,7 @@ static struct { { "ibm_emac", ibm_emac_dump_regs }, { "tg3", tg3_dump_regs }, { "skge", skge_dump_regs }, + { "sky2", sky2_dump_regs }, };static int dump_regs (struct ethtool_drvinfo *info,struct ethtool_regs *regs)
marvell.c new file +327 -0
327 lines not on this page · raw message
skge.c deleted +0 -189
189 lines not on this page · raw message
Signature · 1 line
1.4.1
Quoted 4 lines · Stephen Hemminger
Add support for sky2 register dump, put it in a common file for both skge and sky2.
Signed-off-by Stephen Hemminger <[email protected]>
You should know this by now: separate out logical changes into multiple patches.
When renaming a file AND making changes to it, your changes are completely obscured by the rename.
First patch should do the rename, but not change existing code. Second patch should include any code updates you wish to make.
ACK changes, NAK in present form.
PATCH 1/4 ethtool: move skge.c to marvell.c
The code will be common for skge and sky2
--- Makefile.am | 2 - marvell.c | 189 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ skge.c | 189 ----------------------------------------------------------- 3 files changed, 190 insertions(+), 190 deletions(-)
Makefile.am +1 -1
@@ -7,7 +7,7 @@ sbin_PROGRAMS = ethtool ethtool_SOURCES = ethtool.c ethtool-copy.h ethtool-util.h \ amd8111e.c de2104x.c e100.c e1000.c \ fec_8xx.c ibm_emac.c ixgb.c natsemi.c \ - pcnet32.c realtek.c tg3.c skge.c + pcnet32.c realtek.c tg3.c marvell.c dist-hook: cp $(top_srcdir)/ethtool.spec $(distdir)
marvell.c new file +189 -0
189 lines not on this page · raw message
skge.c deleted +0 -189
189 lines not on this page · raw message
Signature · 1 line
1.4.1
PATCH 2/4 ethtool: sky2 support
In reply to Jeff GarzikAdd full support for sky2 chip
--- ethtool-util.h | 3 + ethtool.c | 1 marvell.c | 204 +++++++++++++++++++++++++++++++++++++++++++++++++------- 3 files changed, 183 insertions(+), 25 deletions(-)
ethtool-util.h +3 -0
@@ -51,4 +51,7 @@ int tg3_dump_regs(struct ethtool_drvinfo/* SysKonnect Gigabit (Genesis and Yukon) */ int skge_dump_regs (struct ethtool_drvinfo *info,struct ethtool_regs *regs); +/* SysKonnect Gigabit (Yukon2) */ +int sky2_dump_regs (struct ethtool_drvinfo *info,struct ethtool_regs *regs); +#endif
ethtool.c +1 -0
@@ -957,6 +957,7 @@ static struct { { "ibm_emac", ibm_emac_dump_regs }, { "tg3", tg3_dump_regs }, { "skge", skge_dump_regs }, + { "sky2", sky2_dump_regs }, };static int dump_regs (struct ethtool_drvinfo *info,struct ethtool_regs *regs)
marvell.c +179 -25
238 lines not on this page · raw message
Signature · 1 line
1.4.1
PATCH 4/4 ethtool: spelling fix
In reply to Jeff GarzikFix my bogus spelling.
--- marvell.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
marvell.c +2 -2
@@ -68,9 +68,9 @@ static void dump_queue(const char *name,printf ("Status 0x%08X\n" , d->status);printf ("Timestamp 0x%08X\n" , d->timestamp);if (rx) { -printf ("Csum1 Offset %4d Positon %d\n" , +printf ("Csum1 Offset %4d Position %d\n" , d->csum1, d->csum1_start); -printf ("Csum2 Offset %4d Positon %d\n" , +printf ("Csum2 Offset %4d Position %d\n" , d->csum2, d->csum2_start); }else printf("Csum Start 0x%04X Pos %4d Write %d\n",
Signature · 1 line
1.4.1
PATCH 3/4 ethtool: don't show sync queue's on skge/sky2
In reply to Jeff GarzikRemove printout of synchronous transmit queue info because it is unused by the driver.
--- marvell.c | 22 +++++++++++----------- 1 files changed, 11 insertions(+), 11 deletions(-)
marvell.c +11 -11
@@ -174,12 +174,12 @@ int skge_dump_regs(struct ethtool_drvinfprintf ("\nBus Management Unit\n" );printf ("-------------------\n" );printf ("CSR Receive Queue 1 0x%08X\n" , r[24 ]); -printf ("CSR Sync Queue 1 0x%08X\n" , r[26 ]); +// printf("CSR Sync Queue 1 0x%08X\n", r[26]); printf ("CSR Async Queue 1 0x%08X\n" , r[27 ]);if (dual) {printf ("CSR Receive Queue 2 0x%08X\n" , r[25 ]);printf ("CSR Async Queue 2 0x%08X\n" , r[29 ]); -printf ("CSR Sync Queue 2 0x%08X\n" , r[28 ]); +// printf("CSR Sync Queue 2 0x%08X\n", r[28]); }dump_mac (regs->data);
@@ -190,11 +190,11 @@ int skge_dump_regs(struct ethtool_drvinfdump_timer ("Blink Source" , regs->data +0x170 );dump_queue ("Receive Queue 1" , regs->data +0x400 ,1 ); -dump_queue ("Sync Transmit Queue 1" , regs->data +0x600 ,0 ); +// dump_queue("Sync Transmit Queue 1", regs->data +0x600, 0); dump_queue ("Async Transmit Queue 1" , regs->data +0x680 ,0 );dump_ram ("Receive RAMbuffer 1" , regs->data+0x800 ); -dump_ram ("Sync Transmit RAMbuffer 1" , regs->data+0xa00 ); +// dump_ram("Sync Transmit RAMbuffer 1", regs->data+0xa00); dump_ram ("Async Transmit RAMbuffer 1" , regs->data+0xa80 );dump_fifo ("Receive MAC FIFO 1" , regs->data+0xc00 );
@@ -204,10 +204,10 @@ int skge_dump_regs(struct ethtool_drvinfdump_queue ("Receive Queue 2" , regs->data +0x480 ,1 );dump_queue ("Async Transmit Queue 2" , regs->data +0x780 ,0 ); -dump_queue ("Sync Transmit Queue 2" , regs->data +0x700 ,0 ); +// dump_queue("Sync Transmit Queue 2", regs->data +0x700, 0); dump_ram ("Receive RAMbuffer 2" , regs->data+0x880 ); -dump_ram ("Sync Transmit RAMbuffer 2" , regs->data+0xb00 ); +// dump_ram("Sync Transmit RAMbuffer 2", regs->data+0xb00); dump_ram ("Async Transmit RAMbuffer 21" , regs->data+0xb80 );dump_fifo ("Receive MAC FIFO 2" , regs->data+0xc80 );
@@ -282,14 +282,14 @@ int sky2_dump_regs(struct ethtool_drvinfprintf ("\nBus Management Unit\n" );printf ("-------------------\n" );printf ("CSR Receive Queue 1 0x%08X\n" , r[24 ]); -printf ("CSR Sync Queue 1 0x%08X\n" , r[26 ]); +// printf("CSR Sync Queue 1 0x%08X\n", r[26]); printf ("CSR Async Queue 1 0x%08X\n" , r[27 ]); dual = (regs->data[0x11e ] &2 ) !=0 ;if (dual) {printf ("CSR Receive Queue 2 0x%08X\n" , r[25 ]);printf ("CSR Async Queue 2 0x%08X\n" , r[29 ]); -printf ("CSR Sync Queue 2 0x%08X\n" , r[28 ]); +// printf("CSR Sync Queue 2 0x%08X\n", r[28]); }dump_mac (regs->data);
@@ -324,17 +324,17 @@ int sky2_dump_regs(struct ethtool_drvinfdump_timer ("ISR" , regs->data +0xed0 );dump_queue2 ("Receive Queue 1" , regs->data +0x400 ,1 ); -dump_queue ("Sync Transmit Queue 1" , regs->data +0x600 ,0 ); +// dump_queue("Sync Transmit Queue 1", regs->data +0x600, 0); dump_queue2 ("Async Transmit Queue 1" , regs->data +0x680 ,0 );dump_ram ("Receive RAMbuffer 1" , regs->data+0x800 ); -dump_ram ("Sync Transmit RAMbuffer 1" , regs->data+0xa00 ); +// dump_ram("Sync Transmit RAMbuffer 1", regs->data+0xa00); dump_ram ("Async Transmit RAMbuffer 1" , regs->data+0xa80 );if (dual) {dump_ram ("Receive RAMbuffer 2" , regs->data+0x880 ); -dump_ram ("Sync Transmit RAMbuffer 2" , regs->data+0xb00 ); +// dump_ram("Sync Transmit RAMbuffer 2", regs->data+0xb00); dump_ram ("Async Transmit RAMbuffer 21" , regs->data+0xb80 );dump_gmac ("GMAC 2" , regs->data +0x3800 ); }
Signature · 1 line
1.4.1
Re: [PATCH 1/4] ethtool: move skge.c to marvell.c
In reply to Stephen Hemmingerapplied 1-2, 4
Jeff Garzik
NAKRe: [PATCH 3/4] ethtool: don't show sync queue's on skge/sky2
In reply to Stephen HemmingerQuoted 4 lines · Stephen Hemminger
Remove printout of synchronous transmit queue info because it is unused by the driver.
Signed-off-by Stephen Hemminger <[email protected]>
NAK, it doesn't matter whether a feature is used by the driver or not.
Re: [PATCH 3/4] ethtool: don't show sync queue's on skge/sky2
Quoted 7 lines · On Wed, 27 Sep 2006 19:03:33 -0400 Jeff Garzik <[email protected]> wrote:
Quoted 4 lines · Stephen Hemminger
Remove printout of synchronous transmit queue info because it is unused by the driver.
Signed-off-by Stephen Hemminger <[email protected]>NAK, it doesn't matter whether a feature is used by the driver or not.
Okay, but it's just noise.
Signature · 1 line
Stephen Hemminger <[email protected]>
Re: [PATCH 3/4] ethtool: don't show sync queue's on skge/sky2
Quoted 11 lines · Stephen Hemminger
Quoted 6 lines · On Wed, 27 Sep 2006 19:03:33 -0400 Jeff Garzik <[email protected]> wrote:
Quoted 4 lines · Stephen Hemminger
Remove printout of synchronous transmit queue info because it is unused by the driver.
Signed-off-by Stephen Hemminger <[email protected]>NAK, it doesn't matter whether a feature is used by the driver or not.
Okay, but it's just noise.
It's noise until you notice those registers being used, when you thought they were unused... :) Happens all the time in minor chipset variations, for example.
ethtool register dumps should dump __all known__ registers, used or not.
Jeff