aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/igbvf/netdev.c
diff options
context:
space:
mode:
authorLior Levy <lior.levy@intel.com>2011-02-10 22:38:04 -0500
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2011-02-24 05:38:38 -0500
commit6799746ad63b3df7ddf47797bb06467db35c6f94 (patch)
tree08c9375fc0f5f99b673606021297a796a433feca /drivers/net/igbvf/netdev.c
parent65d676c8c13c39301ebf813c7af00a13f05b2035 (diff)
igbvf: remove Tx hang detection
Removed Tx hang detection mechanism from igbvf. This mechanism has no affect and can cause false alarm message in some cases. Signed-off-by: Lior Levy <lior.levy@intel.com> Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/igbvf/netdev.c')
-rw-r--r--drivers/net/igbvf/netdev.c60
1 files changed, 0 insertions, 60 deletions
diff --git a/drivers/net/igbvf/netdev.c b/drivers/net/igbvf/netdev.c
index 6352c8158e6d..42fdf5977be9 100644
--- a/drivers/net/igbvf/netdev.c
+++ b/drivers/net/igbvf/netdev.c
@@ -396,35 +396,6 @@ static void igbvf_put_txbuf(struct igbvf_adapter *adapter,
396 buffer_info->time_stamp = 0; 396 buffer_info->time_stamp = 0;
397} 397}
398 398
399static void igbvf_print_tx_hang(struct igbvf_adapter *adapter)
400{
401 struct igbvf_ring *tx_ring = adapter->tx_ring;
402 unsigned int i = tx_ring->next_to_clean;
403 unsigned int eop = tx_ring->buffer_info[i].next_to_watch;
404 union e1000_adv_tx_desc *eop_desc = IGBVF_TX_DESC_ADV(*tx_ring, eop);
405
406 /* detected Tx unit hang */
407 dev_err(&adapter->pdev->dev,
408 "Detected Tx Unit Hang:\n"
409 " TDH <%x>\n"
410 " TDT <%x>\n"
411 " next_to_use <%x>\n"
412 " next_to_clean <%x>\n"
413 "buffer_info[next_to_clean]:\n"
414 " time_stamp <%lx>\n"
415 " next_to_watch <%x>\n"
416 " jiffies <%lx>\n"
417 " next_to_watch.status <%x>\n",
418 readl(adapter->hw.hw_addr + tx_ring->head),
419 readl(adapter->hw.hw_addr + tx_ring->tail),
420 tx_ring->next_to_use,
421 tx_ring->next_to_clean,
422 tx_ring->buffer_info[eop].time_stamp,
423 eop,
424 jiffies,
425 eop_desc->wb.status);
426}
427
428/** 399/**
429 * igbvf_setup_tx_resources - allocate Tx resources (Descriptors) 400 * igbvf_setup_tx_resources - allocate Tx resources (Descriptors)
430 * @adapter: board private structure 401 * @adapter: board private structure
@@ -771,7 +742,6 @@ static void igbvf_set_itr(struct igbvf_adapter *adapter)
771static bool igbvf_clean_tx_irq(struct igbvf_ring *tx_ring) 742static bool igbvf_clean_tx_irq(struct igbvf_ring *tx_ring)
772{ 743{
773 struct igbvf_adapter *adapter = tx_ring->adapter; 744 struct igbvf_adapter *adapter = tx_ring->adapter;
774 struct e1000_hw *hw = &adapter->hw;
775 struct net_device *netdev = adapter->netdev; 745 struct net_device *netdev = adapter->netdev;
776 struct igbvf_buffer *buffer_info; 746 struct igbvf_buffer *buffer_info;
777 struct sk_buff *skb; 747 struct sk_buff *skb;
@@ -832,22 +802,6 @@ static bool igbvf_clean_tx_irq(struct igbvf_ring *tx_ring)
832 } 802 }
833 } 803 }
834 804
835 if (adapter->detect_tx_hung) {
836 /* Detect a transmit hang in hardware, this serializes the
837 * check with the clearing of time_stamp and movement of i */
838 adapter->detect_tx_hung = false;
839 if (tx_ring->buffer_info[i].time_stamp &&
840 time_after(jiffies, tx_ring->buffer_info[i].time_stamp +
841 (adapter->tx_timeout_factor * HZ)) &&
842 !(er32(STATUS) & E1000_STATUS_TXOFF)) {
843
844 tx_desc = IGBVF_TX_DESC_ADV(*tx_ring, i);
845 /* detected Tx unit hang */
846 igbvf_print_tx_hang(adapter);
847
848 netif_stop_queue(netdev);
849 }
850 }
851 adapter->net_stats.tx_bytes += total_bytes; 805 adapter->net_stats.tx_bytes += total_bytes;
852 adapter->net_stats.tx_packets += total_packets; 806 adapter->net_stats.tx_packets += total_packets;
853 return count < tx_ring->count; 807 return count < tx_ring->count;
@@ -1863,17 +1817,6 @@ static void igbvf_watchdog_task(struct work_struct *work)
1863 &adapter->link_duplex); 1817 &adapter->link_duplex);
1864 igbvf_print_link_info(adapter); 1818 igbvf_print_link_info(adapter);
1865 1819
1866 /* adjust timeout factor according to speed/duplex */
1867 adapter->tx_timeout_factor = 1;
1868 switch (adapter->link_speed) {
1869 case SPEED_10:
1870 adapter->tx_timeout_factor = 16;
1871 break;
1872 case SPEED_100:
1873 /* maybe add some timeout factor ? */
1874 break;
1875 }
1876
1877 netif_carrier_on(netdev); 1820 netif_carrier_on(netdev);
1878 netif_wake_queue(netdev); 1821 netif_wake_queue(netdev);
1879 } 1822 }
@@ -1907,9 +1850,6 @@ static void igbvf_watchdog_task(struct work_struct *work)
1907 /* Cause software interrupt to ensure Rx ring is cleaned */ 1850 /* Cause software interrupt to ensure Rx ring is cleaned */
1908 ew32(EICS, adapter->rx_ring->eims_value); 1851 ew32(EICS, adapter->rx_ring->eims_value);
1909 1852
1910 /* Force detection of hung controller every watchdog period */
1911 adapter->detect_tx_hung = 1;
1912
1913 /* Reset the timer */ 1853 /* Reset the timer */
1914 if (!test_bit(__IGBVF_DOWN, &adapter->state)) 1854 if (!test_bit(__IGBVF_DOWN, &adapter->state))
1915 mod_timer(&adapter->watchdog_timer, 1855 mod_timer(&adapter->watchdog_timer,