Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 171531
b: refs/heads/master
c: dbabb06
h: refs/heads/master
i:
  171529: a5dac3b
  171527: 5fa694d
v: v3
  • Loading branch information
Alexander Duyck authored and David S. Miller committed Nov 14, 2009
1 parent 47177a7 commit 9bae5ea
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 971d1d3a7e9f03af870909fddfc3b2fc08e4f5b1
refs/heads/master: dbabb065802a46d64b8869ba97674bfa90b55d83
23 changes: 12 additions & 11 deletions trunk/drivers/net/igb/igb_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2943,7 +2943,6 @@ static void igb_watchdog_task(struct work_struct *work)
watchdog_task);
struct e1000_hw *hw = &adapter->hw;
struct net_device *netdev = adapter->netdev;
struct igb_ring *tx_ring = adapter->tx_ring;
u32 link;
int i;

Expand Down Expand Up @@ -3013,22 +3012,24 @@ static void igb_watchdog_task(struct work_struct *work)
igb_update_stats(adapter);
igb_update_adaptive(hw);

if (!netif_carrier_ok(netdev)) {
if (igb_desc_unused(tx_ring) + 1 < tx_ring->count) {
for (i = 0; i < adapter->num_tx_queues; i++) {
struct igb_ring *tx_ring = &adapter->tx_ring[i];
if (!netif_carrier_ok(netdev)) {
/* We've lost link, so the controller stops DMA,
* but we've got queued Tx work that's never going
* to get done, so reset controller to flush Tx.
* (Do the reset outside of interrupt context). */
adapter->tx_timeout_count++;
schedule_work(&adapter->reset_task);
/* return immediately since reset is imminent */
return;
if (igb_desc_unused(tx_ring) + 1 < tx_ring->count) {
adapter->tx_timeout_count++;
schedule_work(&adapter->reset_task);
/* return immediately since reset is imminent */
return;
}
}
}

/* Force detection of hung controller every watchdog period */
for (i = 0; i < adapter->num_tx_queues; i++)
adapter->tx_ring[i].detect_tx_hung = true;
/* Force detection of hung controller every watchdog period */
tx_ring->detect_tx_hung = true;
}

/* Cause software interrupt to ensure rx ring is cleaned */
if (adapter->msix_entries) {
Expand Down

0 comments on commit 9bae5ea

Please sign in to comment.