Skip to content

Commit

Permalink
[TG3]: Add some tx timeout debug messages.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Michael Chan authored and David S. Miller committed Feb 13, 2007
1 parent 569a5df commit b040875
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion drivers/net/tg3.c
Original file line number Diff line number Diff line change
Expand Up @@ -3735,13 +3735,23 @@ static void tg3_reset_task(struct work_struct *work)
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);
}
Expand Down

0 comments on commit b040875

Please sign in to comment.