Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 150049
b: refs/heads/master
c: bc59fcd
h: refs/heads/master
i:
  150047: f5d90ed
v: v3
  • Loading branch information
Nelson, Shannon authored and David S. Miller committed Apr 28, 2009
1 parent 76ff42d commit b437f5e
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 835462fc5d69adc948e8afb2073264888aaa0e2f
refs/heads/master: bc59fcda671ee15362986a902bbd90e218fe84c4
22 changes: 22 additions & 0 deletions trunk/drivers/net/ixgbe/ixgbe_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -4110,6 +4110,9 @@ static void ixgbe_watchdog_task(struct work_struct *work)
struct ixgbe_hw *hw = &adapter->hw;
u32 link_speed = adapter->link_speed;
bool link_up = adapter->link_up;
int i;
struct ixgbe_ring *tx_ring;
int some_tx_pending = 0;

adapter->flags |= IXGBE_FLAG_IN_WATCHDOG_TASK;

Expand Down Expand Up @@ -4167,6 +4170,25 @@ static void ixgbe_watchdog_task(struct work_struct *work)
}
}

if (!netif_carrier_ok(netdev)) {
for (i = 0; i < adapter->num_tx_queues; i++) {
tx_ring = &adapter->tx_ring[i];
if (tx_ring->next_to_use != tx_ring->next_to_clean) {
some_tx_pending = 1;
break;
}
}

if (some_tx_pending) {
/* 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).
*/
schedule_work(&adapter->reset_task);
}
}

ixgbe_update_stats(adapter);
adapter->flags &= ~IXGBE_FLAG_IN_WATCHDOG_TASK;
}
Expand Down

0 comments on commit b437f5e

Please sign in to comment.