diff options
Diffstat (limited to 'drivers/net/ixgbe/ixgbe_main.c')
-rw-r--r-- | drivers/net/ixgbe/ixgbe_main.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index b6ae9f674ba5..acef3c65cd2c 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c | |||
@@ -2064,6 +2064,8 @@ static int ixgbe_up_complete(struct ixgbe_adapter *adapter) | |||
2064 | else | 2064 | else |
2065 | ixgbe_configure_msi_and_legacy(adapter); | 2065 | ixgbe_configure_msi_and_legacy(adapter); |
2066 | 2066 | ||
2067 | ixgbe_napi_add_all(adapter); | ||
2068 | |||
2067 | clear_bit(__IXGBE_DOWN, &adapter->state); | 2069 | clear_bit(__IXGBE_DOWN, &adapter->state); |
2068 | ixgbe_napi_enable_all(adapter); | 2070 | ixgbe_napi_enable_all(adapter); |
2069 | 2071 | ||
@@ -3176,8 +3178,13 @@ static int ixgbe_close(struct net_device *netdev) | |||
3176 | void ixgbe_napi_add_all(struct ixgbe_adapter *adapter) | 3178 | void ixgbe_napi_add_all(struct ixgbe_adapter *adapter) |
3177 | { | 3179 | { |
3178 | int q_idx, q_vectors; | 3180 | int q_idx, q_vectors; |
3181 | struct net_device *netdev = adapter->netdev; | ||
3179 | int (*poll)(struct napi_struct *, int); | 3182 | int (*poll)(struct napi_struct *, int); |
3180 | 3183 | ||
3184 | /* check if we already have our netdev->napi_list populated */ | ||
3185 | if (&netdev->napi_list != netdev->napi_list.next) | ||
3186 | return; | ||
3187 | |||
3181 | if (adapter->flags & IXGBE_FLAG_MSIX_ENABLED) { | 3188 | if (adapter->flags & IXGBE_FLAG_MSIX_ENABLED) { |
3182 | poll = &ixgbe_clean_rxonly; | 3189 | poll = &ixgbe_clean_rxonly; |
3183 | /* Only enable as many vectors as we have rx queues. */ | 3190 | /* Only enable as many vectors as we have rx queues. */ |
@@ -3271,6 +3278,7 @@ static int ixgbe_suspend(struct pci_dev *pdev, pm_message_t state) | |||
3271 | } | 3278 | } |
3272 | ixgbe_reset_interrupt_capability(adapter); | 3279 | ixgbe_reset_interrupt_capability(adapter); |
3273 | ixgbe_napi_del_all(adapter); | 3280 | ixgbe_napi_del_all(adapter); |
3281 | INIT_LIST_HEAD(&netdev->napi_list); | ||
3274 | kfree(adapter->tx_ring); | 3282 | kfree(adapter->tx_ring); |
3275 | kfree(adapter->rx_ring); | 3283 | kfree(adapter->rx_ring); |
3276 | 3284 | ||
@@ -4212,8 +4220,6 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev, | |||
4212 | netif_carrier_off(netdev); | 4220 | netif_carrier_off(netdev); |
4213 | netif_tx_stop_all_queues(netdev); | 4221 | netif_tx_stop_all_queues(netdev); |
4214 | 4222 | ||
4215 | ixgbe_napi_add_all(adapter); | ||
4216 | |||
4217 | strcpy(netdev->name, "eth%d"); | 4223 | strcpy(netdev->name, "eth%d"); |
4218 | err = register_netdev(netdev); | 4224 | err = register_netdev(netdev); |
4219 | if (err) | 4225 | if (err) |
@@ -4299,7 +4305,6 @@ static void __devexit ixgbe_remove(struct pci_dev *pdev) | |||
4299 | pci_release_regions(pdev); | 4305 | pci_release_regions(pdev); |
4300 | 4306 | ||
4301 | DPRINTK(PROBE, INFO, "complete\n"); | 4307 | DPRINTK(PROBE, INFO, "complete\n"); |
4302 | ixgbe_napi_del_all(adapter); | ||
4303 | kfree(adapter->tx_ring); | 4308 | kfree(adapter->tx_ring); |
4304 | kfree(adapter->rx_ring); | 4309 | kfree(adapter->rx_ring); |
4305 | 4310 | ||