Commit 6d095fa8 authored by Alexander Duyck's avatar Alexander Duyck Committed by Jeff Kirsher

igb: move TX hang check flag into ring->flags

This change moves the Tx hang check into the ring flags.
Signed-off-by: default avatarAlexander Duyck <alexander.h.duyck@intel.com>
Tested-by: default avatarAaron Brown  <aaron.f.brown@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 5faf030c
...@@ -231,7 +231,6 @@ struct igb_ring { ...@@ -231,7 +231,6 @@ struct igb_ring {
struct igb_tx_queue_stats tx_stats; struct igb_tx_queue_stats tx_stats;
struct u64_stats_sync tx_syncp; struct u64_stats_sync tx_syncp;
struct u64_stats_sync tx_syncp2; struct u64_stats_sync tx_syncp2;
bool detect_tx_hung;
}; };
/* RX */ /* RX */
struct { struct {
......
...@@ -3754,7 +3754,7 @@ static void igb_watchdog_task(struct work_struct *work) ...@@ -3754,7 +3754,7 @@ static void igb_watchdog_task(struct work_struct *work)
} }
/* Force detection of hung controller every watchdog period */ /* 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 */ /* Cause software interrupt to ensure rx ring is cleaned */
...@@ -5721,14 +5721,14 @@ static bool igb_clean_tx_irq(struct igb_q_vector *q_vector) ...@@ -5721,14 +5721,14 @@ static bool igb_clean_tx_irq(struct igb_q_vector *q_vector)
q_vector->tx.total_bytes += total_bytes; q_vector->tx.total_bytes += total_bytes;
q_vector->tx.total_packets += total_packets; 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; struct e1000_hw *hw = &adapter->hw;
eop_desc = tx_buffer->next_to_watch; eop_desc = tx_buffer->next_to_watch;
/* Detect a transmit hang in hardware, this serializes the /* Detect a transmit hang in hardware, this serializes the
* check with the clearing of time_stamp and movement of i */ * 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 && if (eop_desc &&
time_after(jiffies, tx_buffer->time_stamp + time_after(jiffies, tx_buffer->time_stamp +
(adapter->tx_timeout_factor * HZ)) && (adapter->tx_timeout_factor * HZ)) &&
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment