aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/igb/igb_main.c
diff options
context:
space:
mode:
authorAlexander Duyck <alexander.h.duyck@intel.com>2009-05-21 09:06:56 -0400
committerDavid S. Miller <davem@davemloft.net>2009-05-21 20:19:09 -0400
commit7e0e99ef43b1fab8caf0348e31704c7d15060ce0 (patch)
treee9a09b5c73ab7d527f68d8dac43d081baa4f58aa /drivers/net/igb/igb_main.c
parent0d63cbb535a9525445513389370d35b522a700f1 (diff)
igb: do not re-register DCA requester on device reset
The current driver is re-registering the DCA requester after every reset. Instead of doing this we should only be updating the on board DCA registers and not unregistering/re-registering our requester. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/igb/igb_main.c')
-rw-r--r--drivers/net/igb/igb_main.c12
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
1001void igb_reinit_locked(struct igb_adapter *adapter) 1006void 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
3772static void igb_setup_dca(struct igb_adapter *adapter) 3774static 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]);