ixgbevf: remove Tx hang detection
authorLior Levy <lior.levy@intel.com>
Wed, 2 Mar 2011 06:42:37 +0000 (06:42 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 11 Mar 2011 09:38:57 +0000 (01:38 -0800)
Removed Tx hang detection mechanism from ixgbevf.
This mechanism has no affect and can cause false alarm messages in some
cases. Especially when VF Tx rate limit is turned on.

The same mechanism was removed recently from igbvf.

Signed-off-by: Lior Levy <lior.levy@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ixgbevf/ixgbevf.h
drivers/net/ixgbevf/ixgbevf_main.c

index a63efcb2cf1b320f5c669c647e100449b4ccf2ce..b703f60be3b7d857a8793503cbba58efa0cc7196 100644 (file)
@@ -207,7 +207,6 @@ struct ixgbevf_adapter {
        u64 hw_tso_ctxt;
        u64 hw_tso6_ctxt;
        u32 tx_timeout_count;
-       bool detect_tx_hung;
 
        /* RX */
        struct ixgbevf_ring *rx_ring;   /* One per active queue */
index 82768812552de98a464cfa8eb4ef5a0b41ac72bb..c1fb2c1b540e4e9539c469332f0b7387b36a012b 100644 (file)
@@ -162,40 +162,6 @@ static void ixgbevf_unmap_and_free_tx_resource(struct ixgbevf_adapter *adapter,
        /* tx_buffer_info must be completely set up in the transmit path */
 }
 
-static inline bool ixgbevf_check_tx_hang(struct ixgbevf_adapter *adapter,
-                                        struct ixgbevf_ring *tx_ring,
-                                        unsigned int eop)
-{
-       struct ixgbe_hw *hw = &adapter->hw;
-       u32 head, tail;
-
-       /* Detect a transmit hang in hardware, this serializes the
-        * check with the clearing of time_stamp and movement of eop */
-       head = readl(hw->hw_addr + tx_ring->head);
-       tail = readl(hw->hw_addr + tx_ring->tail);
-       adapter->detect_tx_hung = false;
-       if ((head != tail) &&
-           tx_ring->tx_buffer_info[eop].time_stamp &&
-           time_after(jiffies, tx_ring->tx_buffer_info[eop].time_stamp + HZ)) {
-               /* detected Tx unit hang */
-               printk(KERN_ERR "Detected Tx Unit Hang\n"
-                      "  Tx Queue             <%d>\n"
-                      "  TDH, TDT             <%x>, <%x>\n"
-                      "  next_to_use          <%x>\n"
-                      "  next_to_clean        <%x>\n"
-                      "tx_buffer_info[next_to_clean]\n"
-                      "  time_stamp           <%lx>\n"
-                      "  jiffies              <%lx>\n",
-                      tx_ring->queue_index,
-                      head, tail,
-                      tx_ring->next_to_use, eop,
-                      tx_ring->tx_buffer_info[eop].time_stamp, jiffies);
-               return true;
-       }
-
-       return false;
-}
-
 #define IXGBE_MAX_TXD_PWR      14
 #define IXGBE_MAX_DATA_PER_TXD (1 << IXGBE_MAX_TXD_PWR)
 
@@ -291,16 +257,6 @@ static bool ixgbevf_clean_tx_irq(struct ixgbevf_adapter *adapter,
 #endif
        }
 
-       if (adapter->detect_tx_hung) {
-               if (ixgbevf_check_tx_hang(adapter, tx_ring, i)) {
-                       /* schedule immediate reset if we believe we hung */
-                       printk(KERN_INFO
-                              "tx hang %d detected, resetting adapter\n",
-                              adapter->tx_timeout_count + 1);
-                       ixgbevf_tx_timeout(adapter->netdev);
-               }
-       }
-
        /* re-arm the interrupt */
        if ((count >= tx_ring->work_limit) &&
            (!test_bit(__IXGBEVF_DOWN, &adapter->state))) {
@@ -2412,9 +2368,6 @@ static void ixgbevf_watchdog_task(struct work_struct *work)
                               10 : 1);
                        netif_carrier_on(netdev);
                        netif_tx_wake_all_queues(netdev);
-               } else {
-                       /* Force detection of hung controller */
-                       adapter->detect_tx_hung = true;
                }
        } else {
                adapter->link_up = false;
@@ -2429,9 +2382,6 @@ static void ixgbevf_watchdog_task(struct work_struct *work)
        ixgbevf_update_stats(adapter);
 
 pf_has_reset:
-       /* Force detection of hung controller every watchdog period */
-       adapter->detect_tx_hung = true;
-
        /* Reset the timer */
        if (!test_bit(__IXGBEVF_DOWN, &adapter->state))
                mod_timer(&adapter->watchdog_timer,