Commit 41b97641 authored by David Woodhouse's avatar David Woodhouse Committed by David S. Miller

8139cp: Dump contents of descriptor ring on TX timeout

We are seeing unexplained TX timeouts under heavy load. Let's try to get
a better idea of what's going on.
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7f4c6856
...@@ -157,6 +157,7 @@ enum { ...@@ -157,6 +157,7 @@ enum {
NWayAdvert = 0x66, /* MII ADVERTISE */ NWayAdvert = 0x66, /* MII ADVERTISE */
NWayLPAR = 0x68, /* MII LPA */ NWayLPAR = 0x68, /* MII LPA */
NWayExpansion = 0x6A, /* MII Expansion */ NWayExpansion = 0x6A, /* MII Expansion */
TxDmaOkLowDesc = 0x82, /* Low 16 bit address of a Tx descriptor. */
Config5 = 0xD8, /* Config5 */ Config5 = 0xD8, /* Config5 */
TxPoll = 0xD9, /* Tell chip to check Tx descriptors for work */ TxPoll = 0xD9, /* Tell chip to check Tx descriptors for work */
RxMaxSize = 0xDA, /* Max size of an Rx packet (8169 only) */ RxMaxSize = 0xDA, /* Max size of an Rx packet (8169 only) */
...@@ -1234,7 +1235,7 @@ static void cp_tx_timeout(struct net_device *dev) ...@@ -1234,7 +1235,7 @@ static void cp_tx_timeout(struct net_device *dev)
{ {
struct cp_private *cp = netdev_priv(dev); struct cp_private *cp = netdev_priv(dev);
unsigned long flags; unsigned long flags;
int rc; int rc, i;
netdev_warn(dev, "Transmit timeout, status %2x %4x %4x %4x\n", netdev_warn(dev, "Transmit timeout, status %2x %4x %4x %4x\n",
cpr8(Cmd), cpr16(CpCmd), cpr8(Cmd), cpr16(CpCmd),
...@@ -1242,6 +1243,17 @@ static void cp_tx_timeout(struct net_device *dev) ...@@ -1242,6 +1243,17 @@ static void cp_tx_timeout(struct net_device *dev)
spin_lock_irqsave(&cp->lock, flags); spin_lock_irqsave(&cp->lock, flags);
netif_dbg(cp, tx_err, cp->dev, "TX ring head %d tail %d desc %x\n",
cp->tx_head, cp->tx_tail, cpr16(TxDmaOkLowDesc));
for (i = 0; i < CP_TX_RING_SIZE; i++) {
netif_dbg(cp, tx_err, cp->dev,
"TX slot %d @%p: %08x (%08x) %08x %llx %p\n",
i, &cp->tx_ring[i], le32_to_cpu(cp->tx_ring[i].opts1),
cp->tx_opts[i], le32_to_cpu(cp->tx_ring[i].opts2),
le64_to_cpu(cp->tx_ring[i].addr),
cp->tx_skb[i]);
}
cp_stop_hw(cp); cp_stop_hw(cp);
cp_clean_rings(cp); cp_clean_rings(cp);
rc = cp_init_rings(cp); rc = cp_init_rings(cp);
......
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