aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEddie Wai <waie@broadcom.com>2010-05-17 20:32:56 -0400
committerDavid S. Miller <davem@davemloft.net>2010-05-17 20:32:56 -0400
commitb98eba52784fbd4a96241c5395c2c8d99fdb9433 (patch)
tree219ee5004554753984442b98043a45b03c831632
parenta7fc948f4d11d80ac2bd08335dc1e0fb77ddf468 (diff)
bnx2: Fix register printouts during NETEV_WATCHDOG.
Dump the correct MCP registers and add EMAC_RX_STATUS register during NETDEV_WATCHDOG for debugging. Signed-off-by: Eddie Wai <waie@broadcom.com> Signed-off-by: Benjamin Li <benli@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/bnx2.c15
-rw-r--r--drivers/net/bnx2.h2
2 files changed, 14 insertions, 3 deletions
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index 667f4196dc29..c281218f6d5e 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -6301,14 +6301,23 @@ static void
6301bnx2_dump_state(struct bnx2 *bp) 6301bnx2_dump_state(struct bnx2 *bp)
6302{ 6302{
6303 struct net_device *dev = bp->dev; 6303 struct net_device *dev = bp->dev;
6304 u32 mcp_p0, mcp_p1;
6304 6305
6305 netdev_err(dev, "DEBUG: intr_sem[%x]\n", atomic_read(&bp->intr_sem)); 6306 netdev_err(dev, "DEBUG: intr_sem[%x]\n", atomic_read(&bp->intr_sem));
6306 netdev_err(dev, "DEBUG: EMAC_TX_STATUS[%08x] RPM_MGMT_PKT_CTRL[%08x]\n", 6307 netdev_err(dev, "DEBUG: EMAC_TX_STATUS[%08x] EMAC_RX_STATUS[%08x]\n",
6307 REG_RD(bp, BNX2_EMAC_TX_STATUS), 6308 REG_RD(bp, BNX2_EMAC_TX_STATUS),
6309 REG_RD(bp, BNX2_EMAC_RX_STATUS));
6310 netdev_err(dev, "DEBUG: RPM_MGMT_PKT_CTRL[%08x]\n",
6308 REG_RD(bp, BNX2_RPM_MGMT_PKT_CTRL)); 6311 REG_RD(bp, BNX2_RPM_MGMT_PKT_CTRL));
6312 if (CHIP_NUM(bp) == CHIP_NUM_5709) {
6313 mcp_p0 = BNX2_MCP_STATE_P0;
6314 mcp_p1 = BNX2_MCP_STATE_P1;
6315 } else {
6316 mcp_p0 = BNX2_MCP_STATE_P0_5708;
6317 mcp_p1 = BNX2_MCP_STATE_P1_5708;
6318 }
6309 netdev_err(dev, "DEBUG: MCP_STATE_P0[%08x] MCP_STATE_P1[%08x]\n", 6319 netdev_err(dev, "DEBUG: MCP_STATE_P0[%08x] MCP_STATE_P1[%08x]\n",
6310 bnx2_reg_rd_ind(bp, BNX2_MCP_STATE_P0), 6320 bnx2_reg_rd_ind(bp, mcp_p0), bnx2_reg_rd_ind(bp, mcp_p1));
6311 bnx2_reg_rd_ind(bp, BNX2_MCP_STATE_P1));
6312 netdev_err(dev, "DEBUG: HC_STATS_INTERRUPT_STATUS[%08x]\n", 6321 netdev_err(dev, "DEBUG: HC_STATS_INTERRUPT_STATUS[%08x]\n",
6313 REG_RD(bp, BNX2_HC_STATS_INTERRUPT_STATUS)); 6322 REG_RD(bp, BNX2_HC_STATS_INTERRUPT_STATUS));
6314 if (bp->flags & BNX2_FLAG_USING_MSIX) 6323 if (bp->flags & BNX2_FLAG_USING_MSIX)
diff --git a/drivers/net/bnx2.h b/drivers/net/bnx2.h
index dd35bd0b7e05..ddaa3fc99876 100644
--- a/drivers/net/bnx2.h
+++ b/drivers/net/bnx2.h
@@ -6347,6 +6347,8 @@ struct l2_fhdr {
6347#define BNX2_MCP_SCRATCH 0x00160000 6347#define BNX2_MCP_SCRATCH 0x00160000
6348#define BNX2_MCP_STATE_P1 0x0016f9c8 6348#define BNX2_MCP_STATE_P1 0x0016f9c8
6349#define BNX2_MCP_STATE_P0 0x0016fdc8 6349#define BNX2_MCP_STATE_P0 0x0016fdc8
6350#define BNX2_MCP_STATE_P1_5708 0x001699c8
6351#define BNX2_MCP_STATE_P0_5708 0x00169dc8
6350 6352
6351#define BNX2_SHM_HDR_SIGNATURE BNX2_MCP_SCRATCH 6353#define BNX2_SHM_HDR_SIGNATURE BNX2_MCP_SCRATCH
6352#define BNX2_SHM_HDR_SIGNATURE_SIG_MASK 0xffff0000 6354#define BNX2_SHM_HDR_SIGNATURE_SIG_MASK 0xffff0000