diff options
author | Don Skidmore <donald.c.skidmore@intel.com> | 2013-09-20 21:57:33 -0400 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2013-10-24 10:10:43 -0400 |
commit | 1bb9c6390e0f6df355576b48514b393a2579c3b9 (patch) | |
tree | 6e834edff47a516c52401fa35e5cfcbc89f917ec /drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | |
parent | 2e0103810c6fed6a736c4a3af87b0f5c6bd8cd5b (diff) |
ixgbevf: Adds function to set PSRTYPE register
This patch creates a new function to set PSRTYPE. This function helps lay
the ground work for eventual multi queue support.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c')
-rw-r--r-- | drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c index ce27d62f9c8e..c0f9aad2cda3 100644 --- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c +++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | |||
@@ -1082,6 +1082,21 @@ static void ixgbevf_configure_srrctl(struct ixgbevf_adapter *adapter, int index) | |||
1082 | IXGBE_WRITE_REG(hw, IXGBE_VFSRRCTL(index), srrctl); | 1082 | IXGBE_WRITE_REG(hw, IXGBE_VFSRRCTL(index), srrctl); |
1083 | } | 1083 | } |
1084 | 1084 | ||
1085 | static void ixgbevf_setup_psrtype(struct ixgbevf_adapter *adapter) | ||
1086 | { | ||
1087 | struct ixgbe_hw *hw = &adapter->hw; | ||
1088 | |||
1089 | /* PSRTYPE must be initialized in 82599 */ | ||
1090 | u32 psrtype = IXGBE_PSRTYPE_TCPHDR | IXGBE_PSRTYPE_UDPHDR | | ||
1091 | IXGBE_PSRTYPE_IPV4HDR | IXGBE_PSRTYPE_IPV6HDR | | ||
1092 | IXGBE_PSRTYPE_L2HDR; | ||
1093 | |||
1094 | if (adapter->num_rx_queues > 1) | ||
1095 | psrtype |= 1 << 29; | ||
1096 | |||
1097 | IXGBE_WRITE_REG(hw, IXGBE_VFPSRTYPE, psrtype); | ||
1098 | } | ||
1099 | |||
1085 | static void ixgbevf_set_rx_buffer_len(struct ixgbevf_adapter *adapter) | 1100 | static void ixgbevf_set_rx_buffer_len(struct ixgbevf_adapter *adapter) |
1086 | { | 1101 | { |
1087 | struct ixgbe_hw *hw = &adapter->hw; | 1102 | struct ixgbe_hw *hw = &adapter->hw; |
@@ -1129,8 +1144,7 @@ static void ixgbevf_configure_rx(struct ixgbevf_adapter *adapter) | |||
1129 | int i, j; | 1144 | int i, j; |
1130 | u32 rdlen; | 1145 | u32 rdlen; |
1131 | 1146 | ||
1132 | /* PSRTYPE must be initialized in 82599 */ | 1147 | ixgbevf_setup_psrtype(adapter); |
1133 | IXGBE_WRITE_REG(hw, IXGBE_VFPSRTYPE, 0); | ||
1134 | 1148 | ||
1135 | /* set_rx_buffer_len must be called before ring initialization */ | 1149 | /* set_rx_buffer_len must be called before ring initialization */ |
1136 | ixgbevf_set_rx_buffer_len(adapter); | 1150 | ixgbevf_set_rx_buffer_len(adapter); |