diff options
Diffstat (limited to 'drivers/net/igb/igb_main.c')
-rw-r--r-- | drivers/net/igb/igb_main.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c index ffd731539997..2ec98091948b 100644 --- a/drivers/net/igb/igb_main.c +++ b/drivers/net/igb/igb_main.c | |||
@@ -996,6 +996,11 @@ void igb_down(struct igb_adapter *adapter) | |||
996 | igb_reset(adapter); | 996 | igb_reset(adapter); |
997 | igb_clean_all_tx_rings(adapter); | 997 | igb_clean_all_tx_rings(adapter); |
998 | igb_clean_all_rx_rings(adapter); | 998 | igb_clean_all_rx_rings(adapter); |
999 | #ifdef CONFIG_IGB_DCA | ||
1000 | |||
1001 | /* since we reset the hardware DCA settings were cleared */ | ||
1002 | igb_setup_dca(adapter); | ||
1003 | #endif | ||
999 | } | 1004 | } |
1000 | 1005 | ||
1001 | void igb_reinit_locked(struct igb_adapter *adapter) | 1006 | void igb_reinit_locked(struct igb_adapter *adapter) |
@@ -1457,9 +1462,6 @@ static int __devinit igb_probe(struct pci_dev *pdev, | |||
1457 | if (dca_add_requester(&pdev->dev) == 0) { | 1462 | if (dca_add_requester(&pdev->dev) == 0) { |
1458 | adapter->flags |= IGB_FLAG_DCA_ENABLED; | 1463 | adapter->flags |= IGB_FLAG_DCA_ENABLED; |
1459 | dev_info(&pdev->dev, "DCA enabled\n"); | 1464 | dev_info(&pdev->dev, "DCA enabled\n"); |
1460 | /* Always use CB2 mode, difference is masked | ||
1461 | * in the CB driver. */ | ||
1462 | wr32(E1000_DCA_CTRL, E1000_DCA_CTRL_DCA_MODE_CB2); | ||
1463 | igb_setup_dca(adapter); | 1465 | igb_setup_dca(adapter); |
1464 | } | 1466 | } |
1465 | #endif | 1467 | #endif |
@@ -3771,11 +3773,15 @@ static void igb_update_tx_dca(struct igb_ring *tx_ring) | |||
3771 | 3773 | ||
3772 | static void igb_setup_dca(struct igb_adapter *adapter) | 3774 | static void igb_setup_dca(struct igb_adapter *adapter) |
3773 | { | 3775 | { |
3776 | struct e1000_hw *hw = &adapter->hw; | ||
3774 | int i; | 3777 | int i; |
3775 | 3778 | ||
3776 | if (!(adapter->flags & IGB_FLAG_DCA_ENABLED)) | 3779 | if (!(adapter->flags & IGB_FLAG_DCA_ENABLED)) |
3777 | return; | 3780 | return; |
3778 | 3781 | ||
3782 | /* Always use CB2 mode, difference is masked in the CB driver. */ | ||
3783 | wr32(E1000_DCA_CTRL, E1000_DCA_CTRL_DCA_MODE_CB2); | ||
3784 | |||
3779 | for (i = 0; i < adapter->num_tx_queues; i++) { | 3785 | for (i = 0; i < adapter->num_tx_queues; i++) { |
3780 | adapter->tx_ring[i].cpu = -1; | 3786 | adapter->tx_ring[i].cpu = -1; |
3781 | igb_update_tx_dca(&adapter->tx_ring[i]); | 3787 | igb_update_tx_dca(&adapter->tx_ring[i]); |