|
|
@@ -5286,13 +5286,8 @@ static void e1000_watchdog_task(struct work_struct *work)
|
|
|
/* 8000ES2LAN requires a Rx packet buffer work-around
|
|
|
* on link down event; reset the controller to flush
|
|
|
* the Rx packet buffer.
|
|
|
- *
|
|
|
- * If the link is lost the controller stops DMA, but
|
|
|
- * if there is queued Tx work it cannot be done. So
|
|
|
- * reset the controller to flush the Tx packet buffers.
|
|
|
*/
|
|
|
- if ((adapter->flags & FLAG_RX_NEEDS_RESTART) ||
|
|
|
- e1000_desc_unused(tx_ring) + 1 < tx_ring->count)
|
|
|
+ if (adapter->flags & FLAG_RX_NEEDS_RESTART)
|
|
|
adapter->flags |= FLAG_RESTART_NOW;
|
|
|
else
|
|
|
pm_schedule_suspend(netdev->dev.parent,
|
|
|
@@ -5315,6 +5310,14 @@ link_up:
|
|
|
adapter->gotc_old = adapter->stats.gotc;
|
|
|
spin_unlock(&adapter->stats64_lock);
|
|
|
|
|
|
+ /* If the link is lost the controller stops DMA, but
|
|
|
+ * if there is queued Tx work it cannot be done. So
|
|
|
+ * reset the controller to flush the Tx packet buffers.
|
|
|
+ */
|
|
|
+ if (!netif_carrier_ok(netdev) &&
|
|
|
+ (e1000_desc_unused(tx_ring) + 1 < tx_ring->count))
|
|
|
+ adapter->flags |= FLAG_RESTART_NOW;
|
|
|
+
|
|
|
/* If reset is necessary, do it outside of interrupt context. */
|
|
|
if (adapter->flags & FLAG_RESTART_NOW) {
|
|
|
schedule_work(&adapter->reset_task);
|