diff options
Diffstat (limited to 'drivers/net/ixgbevf')
-rw-r--r-- | drivers/net/ixgbevf/ixgbevf.h | 1 | ||||
-rw-r--r-- | drivers/net/ixgbevf/ixgbevf_main.c | 50 |
2 files changed, 0 insertions, 51 deletions
diff --git a/drivers/net/ixgbevf/ixgbevf.h b/drivers/net/ixgbevf/ixgbevf.h index a63efcb2cf1b..b703f60be3b7 100644 --- a/drivers/net/ixgbevf/ixgbevf.h +++ b/drivers/net/ixgbevf/ixgbevf.h | |||
@@ -207,7 +207,6 @@ struct ixgbevf_adapter { | |||
207 | u64 hw_tso_ctxt; | 207 | u64 hw_tso_ctxt; |
208 | u64 hw_tso6_ctxt; | 208 | u64 hw_tso6_ctxt; |
209 | u32 tx_timeout_count; | 209 | u32 tx_timeout_count; |
210 | bool detect_tx_hung; | ||
211 | 210 | ||
212 | /* RX */ | 211 | /* RX */ |
213 | struct ixgbevf_ring *rx_ring; /* One per active queue */ | 212 | struct ixgbevf_ring *rx_ring; /* One per active queue */ |
diff --git a/drivers/net/ixgbevf/ixgbevf_main.c b/drivers/net/ixgbevf/ixgbevf_main.c index 82768812552d..c1fb2c1b540e 100644 --- a/drivers/net/ixgbevf/ixgbevf_main.c +++ b/drivers/net/ixgbevf/ixgbevf_main.c | |||
@@ -162,40 +162,6 @@ static void ixgbevf_unmap_and_free_tx_resource(struct ixgbevf_adapter *adapter, | |||
162 | /* tx_buffer_info must be completely set up in the transmit path */ | 162 | /* tx_buffer_info must be completely set up in the transmit path */ |
163 | } | 163 | } |
164 | 164 | ||
165 | static inline bool ixgbevf_check_tx_hang(struct ixgbevf_adapter *adapter, | ||
166 | struct ixgbevf_ring *tx_ring, | ||
167 | unsigned int eop) | ||
168 | { | ||
169 | struct ixgbe_hw *hw = &adapter->hw; | ||
170 | u32 head, tail; | ||
171 | |||
172 | /* Detect a transmit hang in hardware, this serializes the | ||
173 | * check with the clearing of time_stamp and movement of eop */ | ||
174 | head = readl(hw->hw_addr + tx_ring->head); | ||
175 | tail = readl(hw->hw_addr + tx_ring->tail); | ||
176 | adapter->detect_tx_hung = false; | ||
177 | if ((head != tail) && | ||
178 | tx_ring->tx_buffer_info[eop].time_stamp && | ||
179 | time_after(jiffies, tx_ring->tx_buffer_info[eop].time_stamp + HZ)) { | ||
180 | /* detected Tx unit hang */ | ||
181 | printk(KERN_ERR "Detected Tx Unit Hang\n" | ||
182 | " Tx Queue <%d>\n" | ||
183 | " TDH, TDT <%x>, <%x>\n" | ||
184 | " next_to_use <%x>\n" | ||
185 | " next_to_clean <%x>\n" | ||
186 | "tx_buffer_info[next_to_clean]\n" | ||
187 | " time_stamp <%lx>\n" | ||
188 | " jiffies <%lx>\n", | ||
189 | tx_ring->queue_index, | ||
190 | head, tail, | ||
191 | tx_ring->next_to_use, eop, | ||
192 | tx_ring->tx_buffer_info[eop].time_stamp, jiffies); | ||
193 | return true; | ||
194 | } | ||
195 | |||
196 | return false; | ||
197 | } | ||
198 | |||
199 | #define IXGBE_MAX_TXD_PWR 14 | 165 | #define IXGBE_MAX_TXD_PWR 14 |
200 | #define IXGBE_MAX_DATA_PER_TXD (1 << IXGBE_MAX_TXD_PWR) | 166 | #define IXGBE_MAX_DATA_PER_TXD (1 << IXGBE_MAX_TXD_PWR) |
201 | 167 | ||
@@ -291,16 +257,6 @@ static bool ixgbevf_clean_tx_irq(struct ixgbevf_adapter *adapter, | |||
291 | #endif | 257 | #endif |
292 | } | 258 | } |
293 | 259 | ||
294 | if (adapter->detect_tx_hung) { | ||
295 | if (ixgbevf_check_tx_hang(adapter, tx_ring, i)) { | ||
296 | /* schedule immediate reset if we believe we hung */ | ||
297 | printk(KERN_INFO | ||
298 | "tx hang %d detected, resetting adapter\n", | ||
299 | adapter->tx_timeout_count + 1); | ||
300 | ixgbevf_tx_timeout(adapter->netdev); | ||
301 | } | ||
302 | } | ||
303 | |||
304 | /* re-arm the interrupt */ | 260 | /* re-arm the interrupt */ |
305 | if ((count >= tx_ring->work_limit) && | 261 | if ((count >= tx_ring->work_limit) && |
306 | (!test_bit(__IXGBEVF_DOWN, &adapter->state))) { | 262 | (!test_bit(__IXGBEVF_DOWN, &adapter->state))) { |
@@ -2412,9 +2368,6 @@ static void ixgbevf_watchdog_task(struct work_struct *work) | |||
2412 | 10 : 1); | 2368 | 10 : 1); |
2413 | netif_carrier_on(netdev); | 2369 | netif_carrier_on(netdev); |
2414 | netif_tx_wake_all_queues(netdev); | 2370 | netif_tx_wake_all_queues(netdev); |
2415 | } else { | ||
2416 | /* Force detection of hung controller */ | ||
2417 | adapter->detect_tx_hung = true; | ||
2418 | } | 2371 | } |
2419 | } else { | 2372 | } else { |
2420 | adapter->link_up = false; | 2373 | adapter->link_up = false; |
@@ -2429,9 +2382,6 @@ static void ixgbevf_watchdog_task(struct work_struct *work) | |||
2429 | ixgbevf_update_stats(adapter); | 2382 | ixgbevf_update_stats(adapter); |
2430 | 2383 | ||
2431 | pf_has_reset: | 2384 | pf_has_reset: |
2432 | /* Force detection of hung controller every watchdog period */ | ||
2433 | adapter->detect_tx_hung = true; | ||
2434 | |||
2435 | /* Reset the timer */ | 2385 | /* Reset the timer */ |
2436 | if (!test_bit(__IXGBEVF_DOWN, &adapter->state)) | 2386 | if (!test_bit(__IXGBEVF_DOWN, &adapter->state)) |
2437 | mod_timer(&adapter->watchdog_timer, | 2387 | mod_timer(&adapter->watchdog_timer, |