bnx2: Dump some config space registers during TX timeout.
authorMichael Chan <mchan@broadcom.com>
Sat, 3 Jul 2010 20:42:17 +0000 (20:42 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sun, 4 Jul 2010 18:44:00 +0000 (11:44 -0700)
These config register values will be useful when the memory registers
are returning 0xffffffff which has been reported.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bnx2.c

index 1450c75bc19d5ffff4fcb2cf8fc2ef059dd1a55b..bf5302026d789a06edee03fee7059d6b34c56fa5 100644 (file)
@@ -6313,9 +6313,14 @@ static void
 bnx2_dump_state(struct bnx2 *bp)
 {
        struct net_device *dev = bp->dev;
-       u32 mcp_p0, mcp_p1;
-
-       netdev_err(dev, "DEBUG: intr_sem[%x]\n", atomic_read(&bp->intr_sem));
+       u32 mcp_p0, mcp_p1, val1, val2;
+
+       pci_read_config_dword(bp->pdev, PCI_COMMAND, &val1);
+       netdev_err(dev, "DEBUG: intr_sem[%x] PCI_CMD[%08x]\n",
+                  atomic_read(&bp->intr_sem), val1);
+       pci_read_config_dword(bp->pdev, bp->pm_cap + PCI_PM_CTRL, &val1);
+       pci_read_config_dword(bp->pdev, BNX2_PCICFG_MISC_CONFIG, &val2);
+       netdev_err(dev, "DEBUG: PCI_PM[%08x] PCI_MISC_CFG[%08x]\n", val1, val2);
        netdev_err(dev, "DEBUG: EMAC_TX_STATUS[%08x] EMAC_RX_STATUS[%08x]\n",
                   REG_RD(bp, BNX2_EMAC_TX_STATUS),
                   REG_RD(bp, BNX2_EMAC_RX_STATUS));