Commit 20175c57 authored by Michael Chan's avatar Michael Chan Committed by David S. Miller

bnx2: Dump some state during tx timeout.

To help debug the problem.
Signed-off-by: default avatarMichael Chan <mchan@broadcom.com>
Signed-off-by: default avatarBenjamin Li <benli@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 51bf6bb4
...@@ -6278,11 +6278,34 @@ bnx2_reset_task(struct work_struct *work) ...@@ -6278,11 +6278,34 @@ bnx2_reset_task(struct work_struct *work)
rtnl_unlock(); rtnl_unlock();
} }
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 static void
bnx2_tx_timeout(struct net_device *dev) bnx2_tx_timeout(struct net_device *dev)
{ {
struct bnx2 *bp = netdev_priv(dev); struct bnx2 *bp = netdev_priv(dev);
bnx2_dump_state(bp);
/* This allows the netif to be shutdown gracefully before resetting */ /* This allows the netif to be shutdown gracefully before resetting */
schedule_work(&bp->reset_task); schedule_work(&bp->reset_task);
} }
......
...@@ -6345,6 +6345,8 @@ struct l2_fhdr { ...@@ -6345,6 +6345,8 @@ struct l2_fhdr {
#define BNX2_MCP_ROM 0x00150000 #define BNX2_MCP_ROM 0x00150000
#define BNX2_MCP_SCRATCH 0x00160000 #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 BNX2_MCP_SCRATCH
#define BNX2_SHM_HDR_SIGNATURE_SIG_MASK 0xffff0000 #define BNX2_SHM_HDR_SIGNATURE_SIG_MASK 0xffff0000
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment