aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/igb
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/igb')
-rw-r--r--drivers/net/igb/e1000_defines.h2
-rw-r--r--drivers/net/igb/igb_main.c30
2 files changed, 12 insertions, 20 deletions
diff --git a/drivers/net/igb/e1000_defines.h b/drivers/net/igb/e1000_defines.h
index ad2d319d0f8b..65acbbaca2d5 100644
--- a/drivers/net/igb/e1000_defines.h
+++ b/drivers/net/igb/e1000_defines.h
@@ -289,8 +289,8 @@
289#define E1000_SCTL_DISABLE_SERDES_LOOPBACK 0x0400 289#define E1000_SCTL_DISABLE_SERDES_LOOPBACK 0x0400
290 290
291/* Receive Checksum Control */ 291/* Receive Checksum Control */
292#define E1000_RXCSUM_IPOFL 0x00000100 /* IPv4 checksum offload */
292#define E1000_RXCSUM_TUOFL 0x00000200 /* TCP / UDP checksum offload */ 293#define E1000_RXCSUM_TUOFL 0x00000200 /* TCP / UDP checksum offload */
293#define E1000_RXCSUM_IPPCSE 0x00001000 /* IP payload checksum enable */
294#define E1000_RXCSUM_PCSD 0x00002000 /* packet checksum disabled */ 294#define E1000_RXCSUM_PCSD 0x00002000 /* packet checksum disabled */
295 295
296/* Header split receive */ 296/* Header split receive */
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