aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAuke Kok <auke-jan.h.kok@intel.com>2006-05-23 13:35:04 -0400
committerAuke Kok <juke-jan.h.kok@intel.com>2006-05-23 13:35:04 -0400
commit9b8118df486ffec2f42d43dadaceebd0561dd564 (patch)
treec50db295920c2e71b9a3de58029315336b2a2103 /drivers
parentec9c3f5d3b8c4dd7340800f02eed87bdf0233e3b (diff)
ixgb: add tx timeout counter
This adds a TX timeout counter to the ethtool stats, a tx timeout debug message, and sets the timer to 5 seconds. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: John Ronciak <john.ronciak@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ixgb/ixgb.h1
-rw-r--r--drivers/net/ixgb/ixgb_ethtool.c1
-rw-r--r--drivers/net/ixgb/ixgb_main.c29
3 files changed, 27 insertions, 4 deletions
diff --git a/drivers/net/ixgb/ixgb.h b/drivers/net/ixgb/ixgb.h
index a687f1210cb0..b9c37fdc8418 100644
--- a/drivers/net/ixgb/ixgb.h
+++ b/drivers/net/ixgb/ixgb.h
@@ -180,6 +180,7 @@ struct ixgb_adapter {
180 uint64_t hw_csum_tx_good; 180 uint64_t hw_csum_tx_good;
181 uint64_t hw_csum_tx_error; 181 uint64_t hw_csum_tx_error;
182 uint32_t tx_int_delay; 182 uint32_t tx_int_delay;
183 uint32_t tx_timeout_count;
183 boolean_t tx_int_delay_enable; 184 boolean_t tx_int_delay_enable;
184 boolean_t detect_tx_hung; 185 boolean_t detect_tx_hung;
185 186
diff --git a/drivers/net/ixgb/ixgb_ethtool.c b/drivers/net/ixgb/ixgb_ethtool.c
index 560b4b6c79d0..6d8192f4314c 100644
--- a/drivers/net/ixgb/ixgb_ethtool.c
+++ b/drivers/net/ixgb/ixgb_ethtool.c
@@ -78,6 +78,7 @@ static struct ixgb_stats ixgb_gstrings_stats[] = {
78 {"tx_heartbeat_errors", IXGB_STAT(net_stats.tx_heartbeat_errors)}, 78 {"tx_heartbeat_errors", IXGB_STAT(net_stats.tx_heartbeat_errors)},
79 {"tx_window_errors", IXGB_STAT(net_stats.tx_window_errors)}, 79 {"tx_window_errors", IXGB_STAT(net_stats.tx_window_errors)},
80 {"tx_deferred_ok", IXGB_STAT(stats.dc)}, 80 {"tx_deferred_ok", IXGB_STAT(stats.dc)},
81 {"tx_timeout_count", IXGB_STAT(tx_timeout_count) },
81 {"rx_long_length_errors", IXGB_STAT(stats.roc)}, 82 {"rx_long_length_errors", IXGB_STAT(stats.roc)},
82 {"rx_short_length_errors", IXGB_STAT(stats.ruc)}, 83 {"rx_short_length_errors", IXGB_STAT(stats.ruc)},
83#ifdef NETIF_F_TSO 84#ifdef NETIF_F_TSO
diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c
index 4115bf360d93..da0b91905ffc 100644
--- a/drivers/net/ixgb/ixgb_main.c
+++ b/drivers/net/ixgb/ixgb_main.c
@@ -428,7 +428,7 @@ ixgb_probe(struct pci_dev *pdev,
428 netdev->change_mtu = &ixgb_change_mtu; 428 netdev->change_mtu = &ixgb_change_mtu;
429 ixgb_set_ethtool_ops(netdev); 429 ixgb_set_ethtool_ops(netdev);
430 netdev->tx_timeout = &ixgb_tx_timeout; 430 netdev->tx_timeout = &ixgb_tx_timeout;
431 netdev->watchdog_timeo = HZ; 431 netdev->watchdog_timeo = 5 * HZ;
432#ifdef CONFIG_IXGB_NAPI 432#ifdef CONFIG_IXGB_NAPI
433 netdev->poll = &ixgb_clean; 433 netdev->poll = &ixgb_clean;
434 netdev->weight = 64; 434 netdev->weight = 64;
@@ -1509,6 +1509,7 @@ ixgb_tx_timeout_task(struct net_device *netdev)
1509{ 1509{
1510 struct ixgb_adapter *adapter = netdev_priv(netdev); 1510 struct ixgb_adapter *adapter = netdev_priv(netdev);
1511 1511
1512 adapter->tx_timeout_count++;
1512 ixgb_down(adapter, TRUE); 1513 ixgb_down(adapter, TRUE);
1513 ixgb_up(adapter); 1514 ixgb_up(adapter);
1514} 1515}
@@ -1838,11 +1839,31 @@ ixgb_clean_tx_irq(struct ixgb_adapter *adapter)
1838 /* detect a transmit hang in hardware, this serializes the 1839 /* detect a transmit hang in hardware, this serializes the
1839 * check with the clearing of time_stamp and movement of i */ 1840 * check with the clearing of time_stamp and movement of i */
1840 adapter->detect_tx_hung = FALSE; 1841 adapter->detect_tx_hung = FALSE;
1841 if(tx_ring->buffer_info[i].dma && 1842 if (tx_ring->buffer_info[eop].dma &&
1842 time_after(jiffies, tx_ring->buffer_info[i].time_stamp + HZ) 1843 time_after(jiffies, tx_ring->buffer_info[eop].time_stamp + HZ)
1843 && !(IXGB_READ_REG(&adapter->hw, STATUS) & 1844 && !(IXGB_READ_REG(&adapter->hw, STATUS) &
1844 IXGB_STATUS_TXOFF)) 1845 IXGB_STATUS_TXOFF)) {
1846 /* detected Tx unit hang */
1847 DPRINTK(DRV, ERR, "Detected Tx Unit Hang\n"
1848 " TDH <%x>\n"
1849 " TDT <%x>\n"
1850 " next_to_use <%x>\n"
1851 " next_to_clean <%x>\n"
1852 "buffer_info[next_to_clean]\n"
1853 " time_stamp <%lx>\n"
1854 " next_to_watch <%x>\n"
1855 " jiffies <%lx>\n"
1856 " next_to_watch.status <%x>\n",
1857 IXGB_READ_REG(&adapter->hw, TDH),
1858 IXGB_READ_REG(&adapter->hw, TDT),
1859 tx_ring->next_to_use,
1860 tx_ring->next_to_clean,
1861 tx_ring->buffer_info[eop].time_stamp,
1862 eop,
1863 jiffies,
1864 eop_desc->status);
1845 netif_stop_queue(netdev); 1865 netif_stop_queue(netdev);
1866 }
1846 } 1867 }
1847 1868
1848 return cleaned; 1869 return cleaned;