diff options
Diffstat (limited to 'drivers/net/ixgbe')
-rw-r--r-- | drivers/net/ixgbe/ixgbe_main.c | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index 3d5f7f575ae3..e52798c4816b 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c | |||
@@ -411,6 +411,9 @@ static void ixgbe_setup_dca(struct ixgbe_adapter *adapter) | |||
411 | if (!(adapter->flags & IXGBE_FLAG_DCA_ENABLED)) | 411 | if (!(adapter->flags & IXGBE_FLAG_DCA_ENABLED)) |
412 | return; | 412 | return; |
413 | 413 | ||
414 | /* always use CB2 mode, difference is masked in the CB driver */ | ||
415 | IXGBE_WRITE_REG(&adapter->hw, IXGBE_DCA_CTRL, 2); | ||
416 | |||
414 | for (i = 0; i < adapter->num_tx_queues; i++) { | 417 | for (i = 0; i < adapter->num_tx_queues; i++) { |
415 | adapter->tx_ring[i].cpu = -1; | 418 | adapter->tx_ring[i].cpu = -1; |
416 | ixgbe_update_tx_dca(adapter, &adapter->tx_ring[i]); | 419 | ixgbe_update_tx_dca(adapter, &adapter->tx_ring[i]); |
@@ -432,9 +435,6 @@ static int __ixgbe_notify_dca(struct device *dev, void *data) | |||
432 | /* if we're already enabled, don't do it again */ | 435 | /* if we're already enabled, don't do it again */ |
433 | if (adapter->flags & IXGBE_FLAG_DCA_ENABLED) | 436 | if (adapter->flags & IXGBE_FLAG_DCA_ENABLED) |
434 | break; | 437 | break; |
435 | /* Always use CB2 mode, difference is masked | ||
436 | * in the CB driver. */ | ||
437 | IXGBE_WRITE_REG(&adapter->hw, IXGBE_DCA_CTRL, 2); | ||
438 | if (dca_add_requester(dev) == 0) { | 438 | if (dca_add_requester(dev) == 0) { |
439 | adapter->flags |= IXGBE_FLAG_DCA_ENABLED; | 439 | adapter->flags |= IXGBE_FLAG_DCA_ENABLED; |
440 | ixgbe_setup_dca(adapter); | 440 | ixgbe_setup_dca(adapter); |
@@ -2767,13 +2767,6 @@ void ixgbe_down(struct ixgbe_adapter *adapter) | |||
2767 | 2767 | ||
2768 | netif_carrier_off(netdev); | 2768 | netif_carrier_off(netdev); |
2769 | 2769 | ||
2770 | #ifdef CONFIG_IXGBE_DCA | ||
2771 | if (adapter->flags & IXGBE_FLAG_DCA_ENABLED) { | ||
2772 | adapter->flags &= ~IXGBE_FLAG_DCA_ENABLED; | ||
2773 | dca_remove_requester(&adapter->pdev->dev); | ||
2774 | } | ||
2775 | |||
2776 | #endif | ||
2777 | if (!pci_channel_offline(adapter->pdev)) | 2770 | if (!pci_channel_offline(adapter->pdev)) |
2778 | ixgbe_reset(adapter); | 2771 | ixgbe_reset(adapter); |
2779 | ixgbe_clean_all_tx_rings(adapter); | 2772 | ixgbe_clean_all_tx_rings(adapter); |
@@ -2781,13 +2774,7 @@ void ixgbe_down(struct ixgbe_adapter *adapter) | |||
2781 | 2774 | ||
2782 | #ifdef CONFIG_IXGBE_DCA | 2775 | #ifdef CONFIG_IXGBE_DCA |
2783 | /* since we reset the hardware DCA settings were cleared */ | 2776 | /* since we reset the hardware DCA settings were cleared */ |
2784 | if (dca_add_requester(&adapter->pdev->dev) == 0) { | 2777 | ixgbe_setup_dca(adapter); |
2785 | adapter->flags |= IXGBE_FLAG_DCA_ENABLED; | ||
2786 | /* always use CB2 mode, difference is masked | ||
2787 | * in the CB driver */ | ||
2788 | IXGBE_WRITE_REG(hw, IXGBE_DCA_CTRL, 2); | ||
2789 | ixgbe_setup_dca(adapter); | ||
2790 | } | ||
2791 | #endif | 2778 | #endif |
2792 | } | 2779 | } |
2793 | 2780 | ||
@@ -5354,9 +5341,6 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev, | |||
5354 | #ifdef CONFIG_IXGBE_DCA | 5341 | #ifdef CONFIG_IXGBE_DCA |
5355 | if (dca_add_requester(&pdev->dev) == 0) { | 5342 | if (dca_add_requester(&pdev->dev) == 0) { |
5356 | adapter->flags |= IXGBE_FLAG_DCA_ENABLED; | 5343 | adapter->flags |= IXGBE_FLAG_DCA_ENABLED; |
5357 | /* always use CB2 mode, difference is masked | ||
5358 | * in the CB driver */ | ||
5359 | IXGBE_WRITE_REG(hw, IXGBE_DCA_CTRL, 2); | ||
5360 | ixgbe_setup_dca(adapter); | 5344 | ixgbe_setup_dca(adapter); |
5361 | } | 5345 | } |
5362 | #endif | 5346 | #endif |