Commit 826437d3 authored by Alexander Duyck's avatar Alexander Duyck Committed by David S. Miller

ixgbe: remove redundant configuration of vmolr, rename generic variable

The vmolr is configured already in ixgbe_set_rx_mode for the PF so there is
no need to set it again in ixgbe_configure_rx.

Instead of using the variable name reg, it is easier to just rename it to
gcr_ext to reflect the register contents that the variable holds.
Signed-off-by: default avatarAlexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 13958070
...@@ -2709,7 +2709,7 @@ static void ixgbe_configure_rx(struct ixgbe_adapter *adapter) ...@@ -2709,7 +2709,7 @@ static void ixgbe_configure_rx(struct ixgbe_adapter *adapter)
int max_frame = netdev->mtu + ETH_HLEN + ETH_FCS_LEN; int max_frame = netdev->mtu + ETH_HLEN + ETH_FCS_LEN;
int i; int i;
u32 rxctrl; u32 rxctrl;
u32 hlreg0; u32 hlreg0, gcr_ext;
u32 rdrxctl; u32 rdrxctl;
int rx_buf_len; int rx_buf_len;
...@@ -2813,24 +2813,21 @@ static void ixgbe_configure_rx(struct ixgbe_adapter *adapter) ...@@ -2813,24 +2813,21 @@ static void ixgbe_configure_rx(struct ixgbe_adapter *adapter)
IXGBE_WRITE_REG(hw, IXGBE_VFRE(reg_offset), (1 << vf_shift)); IXGBE_WRITE_REG(hw, IXGBE_VFRE(reg_offset), (1 << vf_shift));
IXGBE_WRITE_REG(hw, IXGBE_VFTE(reg_offset), (1 << vf_shift)); IXGBE_WRITE_REG(hw, IXGBE_VFTE(reg_offset), (1 << vf_shift));
IXGBE_WRITE_REG(hw, IXGBE_PFDTXGSWC, IXGBE_PFDTXGSWC_VT_LBEN); IXGBE_WRITE_REG(hw, IXGBE_PFDTXGSWC, IXGBE_PFDTXGSWC_VT_LBEN);
ixgbe_set_vmolr(hw, adapter->num_vfs, true);
} }
/* Program MRQC for the distribution of queues */ /* Program MRQC for the distribution of queues */
ixgbe_setup_mrqc(adapter); ixgbe_setup_mrqc(adapter);
if (adapter->num_vfs) { if (adapter->num_vfs) {
u32 reg;
/* Map PF MAC address in RAR Entry 0 to first pool /* Map PF MAC address in RAR Entry 0 to first pool
* following VFs */ * following VFs */
hw->mac.ops.set_vmdq(hw, 0, adapter->num_vfs); hw->mac.ops.set_vmdq(hw, 0, adapter->num_vfs);
/* Set up VF register offsets for selected VT Mode, i.e. /* Set up VF register offsets for selected VT Mode, i.e.
* 64 VFs for SR-IOV */ * 64 VFs for SR-IOV */
reg = IXGBE_READ_REG(hw, IXGBE_GCR_EXT); gcr_ext = IXGBE_READ_REG(hw, IXGBE_GCR_EXT);
reg |= IXGBE_GCR_EXT_SRIOV; gcr_ext |= IXGBE_GCR_EXT_SRIOV;
IXGBE_WRITE_REG(hw, IXGBE_GCR_EXT, reg); IXGBE_WRITE_REG(hw, IXGBE_GCR_EXT, gcr_ext);
} }
if (hw->mac.type == ixgbe_mac_82599EB) { if (hw->mac.type == ixgbe_mac_82599EB) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment