diff options
author | Michael Chan <mchan@broadcom.com> | 2007-02-13 12:18:30 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2007-02-13 12:18:30 -0800 |
commit | b0408751128edc126eb37798d51891d8d0a41dc6 (patch) | |
tree | 2d26a34291cdc8a2facedff360b813886d4da6f9 /drivers/net/tg3.c | |
parent | 569a5df8597deeaa39867be73c7305fd82522f57 (diff) | |
download | linux-3.10-b0408751128edc126eb37798d51891d8d0a41dc6.tar.gz linux-3.10-b0408751128edc126eb37798d51891d8d0a41dc6.tar.bz2 linux-3.10-b0408751128edc126eb37798d51891d8d0a41dc6.zip |
[TG3]: Add some tx timeout debug messages.
Print the most useful information during tx timeout to help debug.
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/tg3.c')
-rw-r--r-- | drivers/net/tg3.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index a1aeba2442f..159570b12c3 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c @@ -3735,13 +3735,23 @@ out: tg3_full_unlock(tp); } +static void tg3_dump_short_state(struct tg3 *tp) +{ + printk(KERN_ERR PFX "DEBUG: MAC_TX_STATUS[%08x] MAC_RX_STATUS[%08x]\n", + tr32(MAC_TX_STATUS), tr32(MAC_RX_STATUS)); + printk(KERN_ERR PFX "DEBUG: RDMAC_STATUS[%08x] WDMAC_STATUS[%08x]\n", + tr32(RDMAC_STATUS), tr32(WDMAC_STATUS)); +} + static void tg3_tx_timeout(struct net_device *dev) { struct tg3 *tp = netdev_priv(dev); - if (netif_msg_tx_err(tp)) + if (netif_msg_tx_err(tp)) { printk(KERN_ERR PFX "%s: transmit timed out, resetting\n", dev->name); + tg3_dump_short_state(tp); + } schedule_work(&tp->reset_task); } |