Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 150361
b: refs/heads/master
c: 7e0e99e
h: refs/heads/master
i:
  150359: b5d7140
v: v3
  • Loading branch information
Alexander Duyck authored and David S. Miller committed May 22, 2009
1 parent 0ccfbed commit a7f0321
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0d63cbb535a9525445513389370d35b522a700f1
refs/heads/master: 7e0e99ef43b1fab8caf0348e31704c7d15060ce0
12 changes: 9 additions & 3 deletions trunk/drivers/net/igb/igb_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -996,6 +996,11 @@ void igb_down(struct igb_adapter *adapter)
igb_reset(adapter);
igb_clean_all_tx_rings(adapter);
igb_clean_all_rx_rings(adapter);
#ifdef CONFIG_IGB_DCA

/* since we reset the hardware DCA settings were cleared */
igb_setup_dca(adapter);
#endif
}

void igb_reinit_locked(struct igb_adapter *adapter)
Expand Down Expand Up @@ -1457,9 +1462,6 @@ static int __devinit igb_probe(struct pci_dev *pdev,
if (dca_add_requester(&pdev->dev) == 0) {
adapter->flags |= IGB_FLAG_DCA_ENABLED;
dev_info(&pdev->dev, "DCA enabled\n");
/* Always use CB2 mode, difference is masked
* in the CB driver. */
wr32(E1000_DCA_CTRL, E1000_DCA_CTRL_DCA_MODE_CB2);
igb_setup_dca(adapter);
}
#endif
Expand Down Expand Up @@ -3771,11 +3773,15 @@ static void igb_update_tx_dca(struct igb_ring *tx_ring)

static void igb_setup_dca(struct igb_adapter *adapter)
{
struct e1000_hw *hw = &adapter->hw;
int i;

if (!(adapter->flags & IGB_FLAG_DCA_ENABLED))
return;

/* Always use CB2 mode, difference is masked in the CB driver. */
wr32(E1000_DCA_CTRL, E1000_DCA_CTRL_DCA_MODE_CB2);

for (i = 0; i < adapter->num_tx_queues; i++) {
adapter->tx_ring[i].cpu = -1;
igb_update_tx_dca(&adapter->tx_ring[i]);
Expand Down

0 comments on commit a7f0321

Please sign in to comment.