From: Stephen Hemminger <shemminger@osdl.org>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: netdev@vger.kernel.org
Subject: [PATCH 1/3] ethtool: sky2 GMAC decode
Date: Wed, 18 Oct 2006 10:46:32 -0700 [thread overview]
Message-ID: <20061018104632.27a37d75@freekitty> (raw)
Add decoding of GMAC bits.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
---
marvell.c | 28 ++++++++++++++++++++++++++++
1 files changed, 28 insertions(+), 0 deletions(-)
diff --git a/marvell.c b/marvell.c
index 16147a9..244bb69 100644
--- a/marvell.c
+++ b/marvell.c
@@ -113,6 +113,31 @@ static void dump_fifo(const char *name,
dump_timer("LED", p + 0x20);
}
+static void dump_gmac_fifo(const void *p)
+{
+ const u32 *r = p;
+ int i;
+ static const char *regs[] = {
+ "End Address",
+ "Almost Full Thresh",
+ "Control/Test",
+ "FIFO Flush Mask",
+ "FIFO Flush Threshold",
+ "Truncation Threshold",
+ "Upper Pause Threshold",
+ "Lower Pause Threshold",
+ "VLAN Tag",
+ "FIFO Write Pointer",
+ "FIFO Write Level",
+ "FIFO Read Pointer",
+ "FIFO Read Level",
+ };
+
+ for (i = 0; i < sizeof(regs)/sizeof(regs[0]); ++i)
+ printf("%-32s 0x%08X\n", regs[i], r[i]);
+
+}
+
static void dump_mac(const u8 *r)
{
printf("\nMAC Addresses\n");
@@ -143,6 +168,7 @@ static void dump_gma(const char *name, c
static void dump_gmac(const char *name, const u8 *data)
{
printf("\n%s\n", name);
+
printf("Status 0x%04X\n", *(u16 *) data);
printf("Control 0x%04X\n", *(u16 *) (data + 4));
printf("Transmit 0x%04X\n", *(u16 *) (data + 8));
@@ -294,6 +320,7 @@ int sky2_dump_regs(struct ethtool_drvinf
dump_mac(regs->data);
dump_gmac("GMAC 1", regs->data + 0x2800);
+ dump_gmac_fifo(regs->data + 0xc40);
printf("\nStatus BMU:\n-----------\n");
printf("Control 0x%08X\n",
@@ -337,6 +364,7 @@ int sky2_dump_regs(struct ethtool_drvinf
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);
+ dump_gmac_fifo(regs->data + 0xc40 + 128);
}
return 0;
--
1.4.1
next reply other threads:[~2006-10-18 18:09 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-18 17:46 Stephen Hemminger [this message]
2006-10-18 17:47 ` [PATCH 2/3] ethtool: sky2 more decode Stephen Hemminger
2006-10-18 17:50 ` [PATCH 3/3] ethtool: dump_registers post mortem Stephen Hemminger
2006-10-19 21:53 ` [PATCH] ethtool: more sky2 decode Stephen Hemminger
2006-10-21 18:15 ` [PATCH 3/3] ethtool: dump_registers post mortem Jeff Garzik
2006-10-23 17:51 ` [PATCH 1/3] ethtool: marvell register dump Stephen Hemminger
2006-10-23 17:57 ` [PATCH 2/3] ethtool: flie option to " Stephen Hemminger
2006-10-24 9:50 ` Ingo Oeser
2006-10-23 20:06 ` Stephen Hemminger
2007-02-09 21:29 ` Jeff Garzik
2006-10-23 17:58 ` [PATCH 3/3] ethtool: allow force hex in " Stephen Hemminger
2006-11-07 9:34 ` [PATCH 1/3] ethtool: marvell " Jeff Garzik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20061018104632.27a37d75@freekitty \
--to=shemminger@osdl.org \
--cc=jgarzik@pobox.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.