mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04:00
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 <[email protected]> Tested-by: Phil Schmitt <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
This commit is contained in:
1 parent
207867f583
commit
263a84e785
1 file changed
+4
-4
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user