aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorJeff Kirsher <jeffrey.t.kirsher@intel.com>2006-01-12 19:50:57 -0500
committerJeff Garzik <jgarzik@pobox.com>2006-01-17 07:44:50 -0500
commit392137fa9b966cf03f020f9a9a2619099b996266 (patch)
tree4afd28f3f674919ec8b799740ebf39aae620e32d /drivers/net
parent997f5cbdded3d8282dc56b741d332e51014ea64b (diff)
[PATCH] e1000: Fix TX timeout logic
Fixed the TX timeout logic to use "end of packet" rather than "next to clean". Updated message log. Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: John Ronciak <john.ronciak@intel.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/e1000/e1000_main.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 41f44a3ded9a..d2e77ee103bb 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -3403,15 +3403,13 @@ e1000_clean_tx_irq(struct e1000_adapter *adapter,
3403 /* Detect a transmit hang in hardware, this serializes the 3403 /* Detect a transmit hang in hardware, this serializes the
3404 * check with the clearing of time_stamp and movement of i */ 3404 * check with the clearing of time_stamp and movement of i */
3405 adapter->detect_tx_hung = FALSE; 3405 adapter->detect_tx_hung = FALSE;
3406 if (tx_ring->buffer_info[i].dma && 3406 if (tx_ring->buffer_info[eop].dma &&
3407 time_after(jiffies, tx_ring->buffer_info[i].time_stamp + HZ) 3407 time_after(jiffies, tx_ring->buffer_info[eop].time_stamp +
3408 adapter->tx_timeout_factor * HZ)
3408 && !(E1000_READ_REG(&adapter->hw, STATUS) & 3409 && !(E1000_READ_REG(&adapter->hw, STATUS) &
3409 E1000_STATUS_TXOFF)) { 3410 E1000_STATUS_TXOFF)) {
3410 3411
3411 /* detected Tx unit hang */ 3412 /* detected Tx unit hang */
3412 i = tx_ring->next_to_clean;
3413 eop = tx_ring->buffer_info[i].next_to_watch;
3414 eop_desc = E1000_TX_DESC(*tx_ring, eop);
3415 DPRINTK(DRV, ERR, "Detected Tx Unit Hang\n" 3413 DPRINTK(DRV, ERR, "Detected Tx Unit Hang\n"
3416 " Tx Queue <%lu>\n" 3414 " Tx Queue <%lu>\n"
3417 " TDH <%x>\n" 3415 " TDH <%x>\n"
@@ -3419,7 +3417,6 @@ e1000_clean_tx_irq(struct e1000_adapter *adapter,
3419 " next_to_use <%x>\n" 3417 " next_to_use <%x>\n"
3420 " next_to_clean <%x>\n" 3418 " next_to_clean <%x>\n"
3421 "buffer_info[next_to_clean]\n" 3419 "buffer_info[next_to_clean]\n"
3422 " dma <%llx>\n"
3423 " time_stamp <%lx>\n" 3420 " time_stamp <%lx>\n"
3424 " next_to_watch <%x>\n" 3421 " next_to_watch <%x>\n"
3425 " jiffies <%lx>\n" 3422 " jiffies <%lx>\n"
@@ -3429,9 +3426,8 @@ e1000_clean_tx_irq(struct e1000_adapter *adapter,
3429 readl(adapter->hw.hw_addr + tx_ring->tdh), 3426 readl(adapter->hw.hw_addr + tx_ring->tdh),
3430 readl(adapter->hw.hw_addr + tx_ring->tdt), 3427 readl(adapter->hw.hw_addr + tx_ring->tdt),
3431 tx_ring->next_to_use, 3428 tx_ring->next_to_use,
3432 i, 3429 tx_ring->next_to_clean,
3433 (unsigned long long)tx_ring->buffer_info[i].dma, 3430 tx_ring->buffer_info[eop].time_stamp,
3434 tx_ring->buffer_info[i].time_stamp,
3435 eop, 3431 eop,
3436 jiffies, 3432 jiffies,
3437 eop_desc->upper.fields.status); 3433 eop_desc->upper.fields.status);