diff options
author | Alexander Duyck <alexander.h.duyck@intel.com> | 2009-04-27 18:35:14 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-04-28 04:53:12 -0400 |
commit | 2844f7975837d47fe7f20aa96c1df3bcecf91935 (patch) | |
tree | 3828707084e8bbbf2ba1c5d47ff3f779f82ed64b /drivers/net/igb/igb_main.c | |
parent | 3935358ebcb8320965478c0e8ee070e1d65851c8 (diff) |
igb: make rxcsum configuration seperate from multiqueue
The igb driver was being incorrectly setup to only allow disabling receive
checksum if multiqueue was disabled. This change corrects that so that
RXCSUM is configured regardless of queue configuration.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/igb/igb_main.c')
-rw-r--r-- | drivers/net/igb/igb_main.c | 30 |
1 files changed, 11 insertions, 19 deletions
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c index ab846ec65204..4ecf4dfce9bd 100644 --- a/drivers/net/igb/igb_main.c +++ b/drivers/net/igb/igb_main.c | |||
@@ -2236,29 +2236,21 @@ static void igb_configure_rx(struct igb_adapter *adapter) | |||
2236 | mrqc |= (E1000_MRQC_RSS_FIELD_IPV6_UDP_EX | | 2236 | mrqc |= (E1000_MRQC_RSS_FIELD_IPV6_UDP_EX | |
2237 | E1000_MRQC_RSS_FIELD_IPV6_TCP_EX); | 2237 | E1000_MRQC_RSS_FIELD_IPV6_TCP_EX); |
2238 | 2238 | ||
2239 | |||
2240 | wr32(E1000_MRQC, mrqc); | 2239 | wr32(E1000_MRQC, mrqc); |
2241 | 2240 | } else if (adapter->vfs_allocated_count) { | |
2242 | /* Multiqueue and raw packet checksumming are mutually | ||
2243 | * exclusive. Note that this not the same as TCP/IP | ||
2244 | * checksumming, which works fine. */ | ||
2245 | rxcsum = rd32(E1000_RXCSUM); | ||
2246 | rxcsum |= E1000_RXCSUM_PCSD; | ||
2247 | wr32(E1000_RXCSUM, rxcsum); | ||
2248 | } else { | ||
2249 | /* Enable multi-queue for sr-iov */ | 2241 | /* Enable multi-queue for sr-iov */ |
2250 | if (adapter->vfs_allocated_count) | 2242 | wr32(E1000_MRQC, E1000_MRQC_ENABLE_VMDQ); |
2251 | wr32(E1000_MRQC, E1000_MRQC_ENABLE_VMDQ); | ||
2252 | /* Enable Receive Checksum Offload for TCP and UDP */ | ||
2253 | rxcsum = rd32(E1000_RXCSUM); | ||
2254 | if (adapter->rx_csum) | ||
2255 | rxcsum |= E1000_RXCSUM_TUOFL | E1000_RXCSUM_IPPCSE; | ||
2256 | else | ||
2257 | rxcsum &= ~(E1000_RXCSUM_TUOFL | E1000_RXCSUM_IPPCSE); | ||
2258 | |||
2259 | wr32(E1000_RXCSUM, rxcsum); | ||
2260 | } | 2243 | } |
2261 | 2244 | ||
2245 | /* Enable Receive Checksum Offload for TCP and UDP */ | ||
2246 | rxcsum = rd32(E1000_RXCSUM); | ||
2247 | /* Disable raw packet checksumming */ | ||
2248 | rxcsum |= E1000_RXCSUM_PCSD; | ||
2249 | /* Don't need to set TUOFL or IPOFL, they default to 1 */ | ||
2250 | if (!adapter->rx_csum) | ||
2251 | rxcsum &= ~(E1000_RXCSUM_TUOFL | E1000_RXCSUM_IPOFL); | ||
2252 | wr32(E1000_RXCSUM, rxcsum); | ||
2253 | |||
2262 | /* Set the default pool for the PF's first queue */ | 2254 | /* Set the default pool for the PF's first queue */ |
2263 | igb_configure_vt_default_pool(adapter); | 2255 | igb_configure_vt_default_pool(adapter); |
2264 | 2256 | ||