diff options
author | Alexander Duyck <alexander.h.duyck@intel.com> | 2011-07-14 23:05:46 -0400 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2011-09-16 00:14:46 -0400 |
commit | 263a84e785deb3613bbdd01a071b0bde429c3804 (patch) | |
tree | fdd566d477111d8b2a19a5ac87b093ee80f9f9b4 | |
parent | 207867f583f63449a5e5588690754f1b86e3cbbf (diff) |
ixgbe: Use ring->dev instead of adapter->pdev->dev when updating DCA
This change switches us over to using the ring->dev pointer instead of
having to use the adapter->pdev->dev reference. The advantage to this is
that it is a much shorter route to get the to final needed value.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
-rw-r--r-- | drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c index 73a669d61591..0564c659fb94 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | |||
@@ -924,12 +924,12 @@ static void ixgbe_update_rx_dca(struct ixgbe_adapter *adapter, | |||
924 | switch (hw->mac.type) { | 924 | switch (hw->mac.type) { |
925 | case ixgbe_mac_82598EB: | 925 | case ixgbe_mac_82598EB: |
926 | rxctrl &= ~IXGBE_DCA_RXCTRL_CPUID_MASK; | 926 | rxctrl &= ~IXGBE_DCA_RXCTRL_CPUID_MASK; |
927 | rxctrl |= dca3_get_tag(&adapter->pdev->dev, cpu); | 927 | rxctrl |= dca3_get_tag(rx_ring->dev, cpu); |
928 | break; | 928 | break; |
929 | case ixgbe_mac_82599EB: | 929 | case ixgbe_mac_82599EB: |
930 | case ixgbe_mac_X540: | 930 | case ixgbe_mac_X540: |
931 | rxctrl &= ~IXGBE_DCA_RXCTRL_CPUID_MASK_82599; | 931 | rxctrl &= ~IXGBE_DCA_RXCTRL_CPUID_MASK_82599; |
932 | rxctrl |= (dca3_get_tag(&adapter->pdev->dev, cpu) << | 932 | rxctrl |= (dca3_get_tag(rx_ring->dev, cpu) << |
933 | IXGBE_DCA_RXCTRL_CPUID_SHIFT_82599); | 933 | IXGBE_DCA_RXCTRL_CPUID_SHIFT_82599); |
934 | break; | 934 | break; |
935 | default: | 935 | default: |
@@ -953,7 +953,7 @@ static void ixgbe_update_tx_dca(struct ixgbe_adapter *adapter, | |||
953 | case ixgbe_mac_82598EB: | 953 | case ixgbe_mac_82598EB: |
954 | txctrl = IXGBE_READ_REG(hw, IXGBE_DCA_TXCTRL(reg_idx)); | 954 | txctrl = IXGBE_READ_REG(hw, IXGBE_DCA_TXCTRL(reg_idx)); |
955 | txctrl &= ~IXGBE_DCA_TXCTRL_CPUID_MASK; | 955 | txctrl &= ~IXGBE_DCA_TXCTRL_CPUID_MASK; |
956 | txctrl |= dca3_get_tag(&adapter->pdev->dev, cpu); | 956 | txctrl |= dca3_get_tag(tx_ring->dev, cpu); |
957 | txctrl |= IXGBE_DCA_TXCTRL_DESC_DCA_EN; | 957 | txctrl |= IXGBE_DCA_TXCTRL_DESC_DCA_EN; |
958 | IXGBE_WRITE_REG(hw, IXGBE_DCA_TXCTRL(reg_idx), txctrl); | 958 | IXGBE_WRITE_REG(hw, IXGBE_DCA_TXCTRL(reg_idx), txctrl); |
959 | break; | 959 | break; |
@@ -961,7 +961,7 @@ static void ixgbe_update_tx_dca(struct ixgbe_adapter *adapter, | |||
961 | case ixgbe_mac_X540: | 961 | case ixgbe_mac_X540: |
962 | txctrl = IXGBE_READ_REG(hw, IXGBE_DCA_TXCTRL_82599(reg_idx)); | 962 | txctrl = IXGBE_READ_REG(hw, IXGBE_DCA_TXCTRL_82599(reg_idx)); |
963 | txctrl &= ~IXGBE_DCA_TXCTRL_CPUID_MASK_82599; | 963 | txctrl &= ~IXGBE_DCA_TXCTRL_CPUID_MASK_82599; |
964 | txctrl |= (dca3_get_tag(&adapter->pdev->dev, cpu) << | 964 | txctrl |= (dca3_get_tag(tx_ring->dev, cpu) << |
965 | IXGBE_DCA_TXCTRL_CPUID_SHIFT_82599); | 965 | IXGBE_DCA_TXCTRL_CPUID_SHIFT_82599); |
966 | txctrl |= IXGBE_DCA_TXCTRL_DESC_DCA_EN; | 966 | txctrl |= IXGBE_DCA_TXCTRL_DESC_DCA_EN; |
967 | IXGBE_WRITE_REG(hw, IXGBE_DCA_TXCTRL_82599(reg_idx), txctrl); | 967 | IXGBE_WRITE_REG(hw, IXGBE_DCA_TXCTRL_82599(reg_idx), txctrl); |