提交 b0408751 编写于 作者: M Michael Chan 提交者: David S. Miller

[TG3]: Add some tx timeout debug messages.

Print the most useful information during tx timeout to help debug.
Signed-off-by: NMichael Chan <mchan@broadcom.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 569a5df8
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册