aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/igb/igb_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet/intel/igb/igb_main.c')
-rw-r--r--drivers/net/ethernet/intel/igb/igb_main.c24
1 files changed, 8 insertions, 16 deletions
diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index 5ec31598ee47..8683ca4748c8 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -1111,9 +1111,12 @@ msi_only:
1111 adapter->flags |= IGB_FLAG_HAS_MSI; 1111 adapter->flags |= IGB_FLAG_HAS_MSI;
1112out: 1112out:
1113 /* Notify the stack of the (possibly) reduced queue counts. */ 1113 /* Notify the stack of the (possibly) reduced queue counts. */
1114 rtnl_lock();
1114 netif_set_real_num_tx_queues(adapter->netdev, adapter->num_tx_queues); 1115 netif_set_real_num_tx_queues(adapter->netdev, adapter->num_tx_queues);
1115 return netif_set_real_num_rx_queues(adapter->netdev, 1116 err = netif_set_real_num_rx_queues(adapter->netdev,
1116 adapter->num_rx_queues); 1117 adapter->num_rx_queues);
1118 rtnl_unlock();
1119 return err;
1117} 1120}
1118 1121
1119/** 1122/**
@@ -2771,8 +2774,6 @@ void igb_configure_tx_ring(struct igb_adapter *adapter,
2771 2774
2772 txdctl |= E1000_TXDCTL_QUEUE_ENABLE; 2775 txdctl |= E1000_TXDCTL_QUEUE_ENABLE;
2773 wr32(E1000_TXDCTL(reg_idx), txdctl); 2776 wr32(E1000_TXDCTL(reg_idx), txdctl);
2774
2775 netdev_tx_reset_queue(txring_txq(ring));
2776} 2777}
2777 2778
2778/** 2779/**
@@ -3282,6 +3283,8 @@ static void igb_clean_tx_ring(struct igb_ring *tx_ring)
3282 igb_unmap_and_free_tx_resource(tx_ring, buffer_info); 3283 igb_unmap_and_free_tx_resource(tx_ring, buffer_info);
3283 } 3284 }
3284 3285
3286 netdev_tx_reset_queue(txring_txq(tx_ring));
3287
3285 size = sizeof(struct igb_tx_buffer) * tx_ring->count; 3288 size = sizeof(struct igb_tx_buffer) * tx_ring->count;
3286 memset(tx_ring->tx_buffer_info, 0, size); 3289 memset(tx_ring->tx_buffer_info, 0, size);
3287 3290
@@ -6796,18 +6799,7 @@ static int igb_resume(struct device *dev)
6796 pci_enable_wake(pdev, PCI_D3hot, 0); 6799 pci_enable_wake(pdev, PCI_D3hot, 0);
6797 pci_enable_wake(pdev, PCI_D3cold, 0); 6800 pci_enable_wake(pdev, PCI_D3cold, 0);
6798 6801
6799 if (!rtnl_is_locked()) { 6802 if (igb_init_interrupt_scheme(adapter)) {
6800 /*
6801 * shut up ASSERT_RTNL() warning in
6802 * netif_set_real_num_tx/rx_queues.
6803 */
6804 rtnl_lock();
6805 err = igb_init_interrupt_scheme(adapter);
6806 rtnl_unlock();
6807 } else {
6808 err = igb_init_interrupt_scheme(adapter);
6809 }
6810 if (err) {
6811 dev_err(&pdev->dev, "Unable to allocate memory for queues\n"); 6803 dev_err(&pdev->dev, "Unable to allocate memory for queues\n");
6812 return -ENOMEM; 6804 return -ENOMEM;
6813 } 6805 }