| To: | netdev <netdev@xxxxxxxxxxx> |
|---|---|
| Subject: | [RESEND][PATCH net-drivers-2.6 7/16] e1000: Dump information on Tx ring (fwd) |
| From: | Malli Chilakala <mallikarjuna.chilakala@xxxxxxxxx> |
| Date: | Wed, 27 Apr 2005 11:23:12 -0700 (PDT) |
| Cc: | "jgarzik@xxxxxxxxx" <jgarzik@xxxxxxxxx> |
| Replyto: | "Malli Chilakala" <mallikarjuna.chilakala@xxxxxxxxx> |
| Sender: | netdev-bounce@xxxxxxxxxxx |
Dump information on Tx ring when 'NETDEV: Watchdog' condition is reached
Signed-off-by: Mallikarjuna R Chilakala <mallikarjuna.chilakala@xxxxxxxxx>
Signed-off-by: Ganesh Venkatesan <ganesh.venkatesan@xxxxxxxxx>
Signed-off-by: John Ronciak <john.ronciak@xxxxxxxxx>
diff -up net-drivers-2.6/drivers/net/e1000/e1000_main.c
net-drivers-2.6/drivers/net/e1000.new/e1000_main.c
--- net-drivers-2.6/drivers/net/e1000/e1000_main.c 2005-04-11
02:22:27.000000000 -0700
+++ net-drivers-2.6/drivers/net/e1000.new/e1000_main.c 2005-04-11
02:22:29.000000000 -0700
@@ -2442,10 +2442,37 @@ e1000_clean_tx_irq(struct e1000_adapter
/* detect a transmit hang in hardware, this serializes the
* check with the clearing of time_stamp and movement of i */
adapter->detect_tx_hung = FALSE;
- if(tx_ring->buffer_info[i].dma &&
- time_after(jiffies, tx_ring->buffer_info[i].time_stamp + HZ)
&&
- !(E1000_READ_REG(&adapter->hw, STATUS) & E1000_STATUS_TXOFF))
+ if (tx_ring->buffer_info[i].dma &&
+ time_after(jiffies, tx_ring->buffer_info[i].time_stamp + HZ)
+ && !(E1000_READ_REG(&adapter->hw, STATUS) &
+ E1000_STATUS_TXOFF)) {
+
+ /* detected Tx unit hang */
+ i = tx_ring->next_to_clean;
+ eop = tx_ring->buffer_info[i].next_to_watch;
+ eop_desc = E1000_TX_DESC(*tx_ring, eop);
+ DPRINTK(TX_ERR, ERR, "Detected Tx Unit Hang\n"
+ " TDH <%x>\n"
+ " TDT <%x>\n"
+ " next_to_use <%x>\n"
+ " next_to_clean <%x>\n"
+ "buffer_info[next_to_clean]\n"
+ " dma <%llx>\n"
+ " time_stamp <%lx>\n"
+ " next_to_watch <%x>\n"
+ " jiffies <%lx>\n"
+ " next_to_watch.status <%x>\n",
+ E1000_READ_REG(&adapter->hw, TDH),
+ E1000_READ_REG(&adapter->hw, TDT),
+ tx_ring->next_to_use,
+ i,
+ tx_ring->buffer_info[i].dma,
+ tx_ring->buffer_info[i].time_stamp,
+ eop,
+ jiffies,
+ eop_desc->upper.fields.status);
netif_stop_queue(netdev);
+ }
}
#ifdef NETIF_F_TSO
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [RESEND][PATCH net-drivers-2.6 6/16] e1000: Delay clean-up of last Tx packet (fwd), Malli Chilakala |
|---|---|
| Next by Date: | [RESEND][PATCH net-drivers-2.6 8/16] e1000:Fix computation of netdev stats from controller stats counters (fwd), Malli Chilakala |
| Previous by Thread: | [RESEND][PATCH net-drivers-2.6 6/16] e1000: Delay clean-up of last Tx packet (fwd), Malli Chilakala |
| Next by Thread: | [RESEND][PATCH net-drivers-2.6 8/16] e1000:Fix computation of netdev stats from controller stats counters (fwd), Malli Chilakala |
| Indexes: | [Date] [Thread] [Top] [All Lists] |