]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
igb: move TX hang check flag into ring->flags
authorAlexander Duyck <alexander.h.duyck@intel.com>
Fri, 26 Aug 2011 07:46:19 +0000 (07:46 +0000)
committerJoe Jin <joe.jin@oracle.com>
Thu, 17 May 2012 12:53:40 +0000 (20:53 +0800)
This change moves the Tx hang check into the ring flags.

(cherry picked from commit 6d095fa8cb1bb87fe8bf956cdf6211e784b4c9e4)
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
drivers/net/igb/igb.h
drivers/net/igb/igb_main.c

index 11d17f14aeeb305669d6d0e8b843dc83416cbfad..4e665a9b47636b7b961888377aa16b31fcfd1510 100644 (file)
@@ -231,7 +231,6 @@ struct igb_ring {
                        struct igb_tx_queue_stats tx_stats;
                        struct u64_stats_sync tx_syncp;
                        struct u64_stats_sync tx_syncp2;
-                       bool detect_tx_hung;
                };
                /* RX */
                struct {
index d5655bfb6f9e8a5ca19ad5454417344b1f5da17e..ee7b49b29571cd55b76be9676355d46a03dbdf64 100644 (file)
@@ -3755,7 +3755,7 @@ static void igb_watchdog_task(struct work_struct *work)
                }
 
                /* Force detection of hung controller every watchdog period */
-               tx_ring->detect_tx_hung = true;
+               set_bit(IGB_RING_FLAG_TX_DETECT_HANG, &tx_ring->flags);
        }
 
        /* Cause software interrupt to ensure rx ring is cleaned */
@@ -5722,14 +5722,14 @@ static bool igb_clean_tx_irq(struct igb_q_vector *q_vector)
        q_vector->tx.total_bytes += total_bytes;
        q_vector->tx.total_packets += total_packets;
 
-       if (tx_ring->detect_tx_hung) {
+       if (test_bit(IGB_RING_FLAG_TX_DETECT_HANG, &tx_ring->flags)) {
                struct e1000_hw *hw = &adapter->hw;
 
                eop_desc = tx_buffer->next_to_watch;
 
                /* Detect a transmit hang in hardware, this serializes the
                 * check with the clearing of time_stamp and movement of i */
-               tx_ring->detect_tx_hung = false;
+               clear_bit(IGB_RING_FLAG_TX_DETECT_HANG, &tx_ring->flags);
                if (eop_desc &&
                    time_after(jiffies, tx_buffer->time_stamp +
                               (adapter->tx_timeout_factor * HZ)) &&