netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@osdl.org>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: netdev@vger.kernel.org
Subject: [PATCH 2/3] ethtool: sky2 more decode
Date: Wed, 18 Oct 2006 10:47:44 -0700	[thread overview]
Message-ID: <20061018104744.2ef54f21@freekitty> (raw)
In-Reply-To: <20061018104632.27a37d75@freekitty>

Dump even more GMAC/GPHY state

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
---
 marvell.c |   16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/marvell.c b/marvell.c
index 244bb69..e867521 100644
--- a/marvell.c
+++ b/marvell.c
@@ -113,7 +113,7 @@ static void dump_fifo(const char *name, 
 	dump_timer("LED", p + 0x20);
 }
 
-static void dump_gmac_fifo(const void *p)
+static void dump_gmac_fifo(const char *name, const void *p)
 {
 	const u32 *r = p;
 	int i;
@@ -133,6 +133,7 @@ static void dump_gmac_fifo(const void *p
 		"FIFO Read Level",
 	};
 
+	printf("\n%s\n", name);
 	for (i = 0; i < sizeof(regs)/sizeof(regs[0]); ++i)
 		printf("%-32s 0x%08X\n", regs[i], r[i]);
 
@@ -319,8 +320,6 @@ 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",
@@ -350,6 +349,14 @@ int sky2_dump_regs(struct ethtool_drvinf
 	dump_timer("TX status", regs->data + 0xec0);
 	dump_timer("ISR", regs->data + 0xed0);
 
+	printf("\nGMAC control             0x%04X\n", *(u32 *)(regs->data + 0xf00));
+	printf("GPHY control             0x%04X\n", *(u32 *)(regs->data + 0xf04));
+	printf("LINK control             0x%02hX\n", *(u16 *)(regs->data + 0xf10));
+
+	dump_gmac("GMAC 1", regs->data + 0x2800);
+	dump_gmac_fifo("Rx GMAC 1", regs->data + 0xc40);
+	dump_gmac_fifo("Tx GMAC 1", regs->data + 0xd40);
+
 	dump_queue2("Receive Queue 1", regs->data +0x400, 1);
 	dump_queue("Sync Transmit Queue 1", regs->data +0x600, 0);
 	dump_queue2("Async Transmit Queue 1", regs->data +0x680, 0);
@@ -364,7 +371,8 @@ 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);
+		dump_gmac_fifo("Rx GMAC 2", regs->data + 0xc40 + 128);
+		dump_gmac_fifo("Tx GMAC 2", regs->data + 0xd40 + 128);
 	}
 
 	return 0;
-- 
1.4.1


  reply	other threads:[~2006-10-18 17:51 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-18 17:46 [PATCH 1/3] ethtool: sky2 GMAC decode Stephen Hemminger
2006-10-18 17:47 ` Stephen Hemminger [this message]
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=20061018104744.2ef54f21@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).