diff options
Diffstat (limited to 'drivers/net/ixgbe/ixgbe_main.c')
-rw-r--r-- | drivers/net/ixgbe/ixgbe_main.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index 00bc525c6560..a4265bc1cebb 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c | |||
@@ -1409,9 +1409,11 @@ void ixgbe_down(struct ixgbe_adapter *adapter) | |||
1409 | IXGBE_WRITE_FLUSH(&adapter->hw); | 1409 | IXGBE_WRITE_FLUSH(&adapter->hw); |
1410 | msleep(10); | 1410 | msleep(10); |
1411 | 1411 | ||
1412 | napi_disable(&adapter->napi); | ||
1413 | atomic_set(&adapter->irq_sem, 0); | ||
1414 | |||
1412 | ixgbe_irq_disable(adapter); | 1415 | ixgbe_irq_disable(adapter); |
1413 | 1416 | ||
1414 | napi_disable(&adapter->napi); | ||
1415 | del_timer_sync(&adapter->watchdog_timer); | 1417 | del_timer_sync(&adapter->watchdog_timer); |
1416 | 1418 | ||
1417 | netif_carrier_off(netdev); | 1419 | netif_carrier_off(netdev); |
@@ -1470,19 +1472,16 @@ static int ixgbe_clean(struct napi_struct *napi, int budget) | |||
1470 | struct net_device *netdev = adapter->netdev; | 1472 | struct net_device *netdev = adapter->netdev; |
1471 | int tx_cleaned = 0, work_done = 0; | 1473 | int tx_cleaned = 0, work_done = 0; |
1472 | 1474 | ||
1473 | /* Keep link state information with original netdev */ | ||
1474 | if (!netif_carrier_ok(adapter->netdev)) | ||
1475 | goto quit_polling; | ||
1476 | |||
1477 | /* In non-MSIX case, there is no multi-Tx/Rx queue */ | 1475 | /* In non-MSIX case, there is no multi-Tx/Rx queue */ |
1478 | tx_cleaned = ixgbe_clean_tx_irq(adapter, adapter->tx_ring); | 1476 | tx_cleaned = ixgbe_clean_tx_irq(adapter, adapter->tx_ring); |
1479 | ixgbe_clean_rx_irq(adapter, &adapter->rx_ring[0], &work_done, | 1477 | ixgbe_clean_rx_irq(adapter, &adapter->rx_ring[0], &work_done, |
1480 | budget); | 1478 | budget); |
1481 | 1479 | ||
1482 | /* If no Tx and not enough Rx work done, exit the polling mode */ | 1480 | if (tx_cleaned) |
1483 | if ((!tx_cleaned && (work_done < budget)) || | 1481 | work_done = budget; |
1484 | !netif_running(adapter->netdev)) { | 1482 | |
1485 | quit_polling: | 1483 | /* If budget not fully consumed, exit the polling mode */ |
1484 | if (work_done < budget) { | ||
1486 | netif_rx_complete(netdev, napi); | 1485 | netif_rx_complete(netdev, napi); |
1487 | ixgbe_irq_enable(adapter); | 1486 | ixgbe_irq_enable(adapter); |
1488 | } | 1487 | } |