From: "Michael Chan" <mchan@broadcom.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org
Subject: [PATCH 2/5] bnx2: Dump some state during tx timeout.
Date: Thu, 3 Dec 2009 11:46:32 -0800 [thread overview]
Message-ID: <1259869595-6450-2-git-send-email-mchan@broadcom.com> (raw)
In-Reply-To: <1259869595-6450-1-git-send-email-mchan@broadcom.com>
To help debug the problem.
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Benjamin Li <benli@broadcom.com>
---
drivers/net/bnx2.c | 23 +++++++++++++++++++++++
drivers/net/bnx2.h | 2 ++
2 files changed, 25 insertions(+), 0 deletions(-)
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index 03eb51f..665253a 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -6279,10 +6279,33 @@ bnx2_reset_task(struct work_struct *work)
}
static void
+bnx2_dump_state(struct bnx2 *bp)
+{
+ struct net_device *dev = bp->dev;
+
+ printk(KERN_ERR PFX "%s DEBUG: intr_sem[%x]\n", dev->name,
+ atomic_read(&bp->intr_sem));
+ printk(KERN_ERR PFX "%s DEBUG: EMAC_TX_STATUS[%08x] "
+ "RPM_MGMT_PKT_CTRL[%08x]\n", dev->name,
+ REG_RD(bp, BNX2_EMAC_TX_STATUS),
+ REG_RD(bp, BNX2_RPM_MGMT_PKT_CTRL));
+ printk(KERN_ERR PFX "%s DEBUG: MCP_STATE_P0[%08x] MCP_STATE_P1[%08x]\n",
+ dev->name, bnx2_reg_rd_ind(bp, BNX2_MCP_STATE_P0),
+ bnx2_reg_rd_ind(bp, BNX2_MCP_STATE_P1));
+ printk(KERN_ERR PFX "%s DEBUG: HC_STATS_INTERRUPT_STATUS[%08x]\n",
+ dev->name, REG_RD(bp, BNX2_HC_STATS_INTERRUPT_STATUS));
+ if (bp->flags & BNX2_FLAG_USING_MSIX)
+ printk(KERN_ERR PFX "%s DEBUG: PBA[%08x]\n", dev->name,
+ REG_RD(bp, BNX2_PCI_GRC_WINDOW3_BASE));
+}
+
+static void
bnx2_tx_timeout(struct net_device *dev)
{
struct bnx2 *bp = netdev_priv(dev);
+ bnx2_dump_state(bp);
+
/* This allows the netif to be shutdown gracefully before resetting */
schedule_work(&bp->reset_task);
}
diff --git a/drivers/net/bnx2.h b/drivers/net/bnx2.h
index 4908b9f..939dc44 100644
--- a/drivers/net/bnx2.h
+++ b/drivers/net/bnx2.h
@@ -6345,6 +6345,8 @@ struct l2_fhdr {
#define BNX2_MCP_ROM 0x00150000
#define BNX2_MCP_SCRATCH 0x00160000
+#define BNX2_MCP_STATE_P1 0x0016f9c8
+#define BNX2_MCP_STATE_P0 0x0016fdc8
#define BNX2_SHM_HDR_SIGNATURE BNX2_MCP_SCRATCH
#define BNX2_SHM_HDR_SIGNATURE_SIG_MASK 0xffff0000
--
1.6.4.GIT
next prev parent reply other threads:[~2009-12-03 19:39 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-03 19:46 [PATCH 1/5] bnx2: Protect tx timeout reset with rtnl_lock() Michael Chan
2009-12-03 19:46 ` Michael Chan [this message]
2009-12-03 21:07 ` [PATCH 2/5] bnx2: Dump some state during tx timeout David Miller
2009-12-03 19:46 ` [PATCH 3/5] bnx2: Print warning when unable to allocate the full SKB/page ring Michael Chan
2009-12-03 21:08 ` David Miller
2009-12-03 21:49 ` Michael Chan
2009-12-03 22:05 ` David Miller
2009-12-03 19:46 ` [PATCH 4/5] bnx2: Read firmware version from VPD Michael Chan
2009-12-03 20:17 ` Ben Hutchings
2009-12-03 21:43 ` Michael Chan
2009-12-03 21:08 ` David Miller
2009-12-03 19:46 ` [PATCH 5/5] bnx2: Update version to 2.0.3 Michael Chan
2009-12-03 21:08 ` David Miller
2009-12-03 21:07 ` [PATCH 1/5] bnx2: Protect tx timeout reset with rtnl_lock() David Miller
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=1259869595-6450-2-git-send-email-mchan@broadcom.com \
--to=mchan@broadcom.com \
--cc=davem@davemloft.net \
--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).