mirror of https://gitee.com/openkylin/linux.git
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>
This commit is contained in:
parent
207867f583
commit
263a84e785
|
@ -924,12 +924,12 @@ static void ixgbe_update_rx_dca(struct ixgbe_adapter *adapter,
|
|||
switch (hw->mac.type) {
|
||||
case ixgbe_mac_82598EB:
|
||||
rxctrl &= ~IXGBE_DCA_RXCTRL_CPUID_MASK;
|
||||
rxctrl |= dca3_get_tag(&adapter->pdev->dev, cpu);
|
||||
rxctrl |= dca3_get_tag(rx_ring->dev, cpu);
|
||||
break;
|
||||
case ixgbe_mac_82599EB:
|
||||
case ixgbe_mac_X540:
|
||||
rxctrl &= ~IXGBE_DCA_RXCTRL_CPUID_MASK_82599;
|
||||
rxctrl |= (dca3_get_tag(&adapter->pdev->dev, cpu) <<
|
||||
rxctrl |= (dca3_get_tag(rx_ring->dev, cpu) <<
|
||||
IXGBE_DCA_RXCTRL_CPUID_SHIFT_82599);
|
||||
break;
|
||||
default:
|
||||
|
@ -953,7 +953,7 @@ static void ixgbe_update_tx_dca(struct ixgbe_adapter *adapter,
|
|||
case ixgbe_mac_82598EB:
|
||||
txctrl = IXGBE_READ_REG(hw, IXGBE_DCA_TXCTRL(reg_idx));
|
||||
txctrl &= ~IXGBE_DCA_TXCTRL_CPUID_MASK;
|
||||
txctrl |= dca3_get_tag(&adapter->pdev->dev, cpu);
|
||||
txctrl |= dca3_get_tag(tx_ring->dev, cpu);
|
||||
txctrl |= IXGBE_DCA_TXCTRL_DESC_DCA_EN;
|
||||
IXGBE_WRITE_REG(hw, IXGBE_DCA_TXCTRL(reg_idx), txctrl);
|
||||
break;
|
||||
|
@ -961,7 +961,7 @@ static void ixgbe_update_tx_dca(struct ixgbe_adapter *adapter,
|
|||
case ixgbe_mac_X540:
|
||||
txctrl = IXGBE_READ_REG(hw, IXGBE_DCA_TXCTRL_82599(reg_idx));
|
||||
txctrl &= ~IXGBE_DCA_TXCTRL_CPUID_MASK_82599;
|
||||
txctrl |= (dca3_get_tag(&adapter->pdev->dev, cpu) <<
|
||||
txctrl |= (dca3_get_tag(tx_ring->dev, cpu) <<
|
||||
IXGBE_DCA_TXCTRL_CPUID_SHIFT_82599);
|
||||
txctrl |= IXGBE_DCA_TXCTRL_DESC_DCA_EN;
|
||||
IXGBE_WRITE_REG(hw, IXGBE_DCA_TXCTRL_82599(reg_idx), txctrl);
|
||||
|
|
Loading…
Reference in New Issue