aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMichael Chan <mchan@broadcom.com>2009-12-03 04:46:32 -0500
committerDavid S. Miller <davem@davemloft.net>2009-12-03 16:18:11 -0500
commit20175c57f23cde2049c509eb00a2f9d373478107 (patch)
treefb70e0bd2c5d7ac0ef657cbb0cee6acf0f6f064d /drivers
parent51bf6bb424c14bfd3590a0de03fbd07fc800435e (diff)
bnx2: Dump some state during tx timeout.
To help debug the problem. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: Benjamin Li <benli@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/bnx2.c23
-rw-r--r--drivers/net/bnx2.h2
2 files changed, 25 insertions, 0 deletions
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index 03eb51f1c694..665253a3e73a 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -6279,10 +6279,33 @@ bnx2_reset_task(struct work_struct *work)
6279} 6279}
6280 6280
6281static void 6281static void
6282bnx2_dump_state(struct bnx2 *bp)
6283{
6284 struct net_device *dev = bp->dev;
6285
6286 printk(KERN_ERR PFX "%s DEBUG: intr_sem[%x]\n", dev->name,
6287 atomic_read(&bp->intr_sem));
6288 printk(KERN_ERR PFX "%s DEBUG: EMAC_TX_STATUS[%08x] "
6289 "RPM_MGMT_PKT_CTRL[%08x]\n", dev->name,
6290 REG_RD(bp, BNX2_EMAC_TX_STATUS),
6291 REG_RD(bp, BNX2_RPM_MGMT_PKT_CTRL));
6292 printk(KERN_ERR PFX "%s DEBUG: MCP_STATE_P0[%08x] MCP_STATE_P1[%08x]\n",
6293 dev->name, bnx2_reg_rd_ind(bp, BNX2_MCP_STATE_P0),
6294 bnx2_reg_rd_ind(bp, BNX2_MCP_STATE_P1));
6295 printk(KERN_ERR PFX "%s DEBUG: HC_STATS_INTERRUPT_STATUS[%08x]\n",
6296 dev->name, REG_RD(bp, BNX2_HC_STATS_INTERRUPT_STATUS));
6297 if (bp->flags & BNX2_FLAG_USING_MSIX)
6298 printk(KERN_ERR PFX "%s DEBUG: PBA[%08x]\n", dev->name,
6299 REG_RD(bp, BNX2_PCI_GRC_WINDOW3_BASE));
6300}
6301
6302static void
6282bnx2_tx_timeout(struct net_device *dev) 6303bnx2_tx_timeout(struct net_device *dev)
6283{ 6304{
6284 struct bnx2 *bp = netdev_priv(dev); 6305 struct bnx2 *bp = netdev_priv(dev);
6285 6306
6307 bnx2_dump_state(bp);
6308
6286 /* This allows the netif to be shutdown gracefully before resetting */ 6309 /* This allows the netif to be shutdown gracefully before resetting */
6287 schedule_work(&bp->reset_task); 6310 schedule_work(&bp->reset_task);
6288} 6311}
diff --git a/drivers/net/bnx2.h b/drivers/net/bnx2.h
index 4908b9f74260..939dc44d50a0 100644
--- a/drivers/net/bnx2.h
+++ b/drivers/net/bnx2.h
@@ -6345,6 +6345,8 @@ struct l2_fhdr {
6345 6345
6346#define BNX2_MCP_ROM 0x00150000 6346#define BNX2_MCP_ROM 0x00150000
6347#define BNX2_MCP_SCRATCH 0x00160000 6347#define BNX2_MCP_SCRATCH 0x00160000
6348#define BNX2_MCP_STATE_P1 0x0016f9c8
6349#define BNX2_MCP_STATE_P0 0x0016fdc8
6348 6350
6349#define BNX2_SHM_HDR_SIGNATURE BNX2_MCP_SCRATCH 6351#define BNX2_SHM_HDR_SIGNATURE BNX2_MCP_SCRATCH
6350#define BNX2_SHM_HDR_SIGNATURE_SIG_MASK 0xffff0000 6352#define BNX2_SHM_HDR_SIGNATURE_SIG_MASK 0xffff0000