diff options
author | Alexander Duyck <alexander.h.duyck@intel.com> | 2010-08-19 17:34:27 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-08-20 03:40:48 +0400 |
commit | 179b4096e25c190fc987832e0037b40507cc7ca0 (patch) | |
tree | e9bfe0f3cdc31b1e4d575b3457cdbd6126fd4de6 /drivers/net/ixgbe | |
parent | 67ebd79141e2dd503b0bc4898d06d07f07fc2635 (diff) | |
download | linux-179b4096e25c190fc987832e0037b40507cc7ca0.tar.xz |
ixgbe: combine two modifications of TXDCTL into one
In ixgbe_up_complete we were doing a read-modify-write of TXDCTL followed
by another one just a few lines further down. Instead of performing two
separate read-modify-writes it would make more sense to combine the two
into one.
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/ixgbe')
-rw-r--r-- | drivers/net/ixgbe/ixgbe_main.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index fffb1ce4f6ea..5d90f699fa78 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c @@ -3411,6 +3411,12 @@ static int ixgbe_up_complete(struct ixgbe_adapter *adapter) IXGBE_WRITE_REG(hw, IXGBE_MHADD, mhadd); } + if (hw->mac.type == ixgbe_mac_82599EB) { + /* DMATXCTL.EN must be set after all Tx queue config is done */ + dmatxctl = IXGBE_READ_REG(hw, IXGBE_DMATXCTL); + dmatxctl |= IXGBE_DMATXCTL_TE; + IXGBE_WRITE_REG(hw, IXGBE_DMATXCTL, dmatxctl); + } for (i = 0; i < adapter->num_tx_queues; i++) { j = adapter->tx_ring[i]->reg_idx; txdctl = IXGBE_READ_REG(hw, IXGBE_TXDCTL(j)); @@ -3421,18 +3427,6 @@ static int ixgbe_up_complete(struct ixgbe_adapter *adapter) /* enable WTHRESH=8 descriptors, to encourage burst writeback */ txdctl |= (8 << 16); } - IXGBE_WRITE_REG(hw, IXGBE_TXDCTL(j), txdctl); - } - - if (hw->mac.type == ixgbe_mac_82599EB) { - /* DMATXCTL.EN must be set after all Tx queue config is done */ - dmatxctl = IXGBE_READ_REG(hw, IXGBE_DMATXCTL); - dmatxctl |= IXGBE_DMATXCTL_TE; - IXGBE_WRITE_REG(hw, IXGBE_DMATXCTL, dmatxctl); - } - for (i = 0; i < adapter->num_tx_queues; i++) { - j = adapter->tx_ring[i]->reg_idx; - txdctl = IXGBE_READ_REG(hw, IXGBE_TXDCTL(j)); txdctl |= IXGBE_TXDCTL_ENABLE; IXGBE_WRITE_REG(hw, IXGBE_TXDCTL(j), txdctl); if (hw->mac.type == ixgbe_mac_82599EB) { |