aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Bowling <kbowling@FreeBSD.org>2023-07-29 01:14:29 +0000
committerKevin Bowling <kbowling@FreeBSD.org>2023-08-04 01:22:59 +0000
commita24e9d851227bd7e403befa77392e963859451bb (patch)
tree2a78e0f653862de5bba1bb81e837a93354b76fea
parentb71d11ba9476cd1c4e001f465a519a94caeef4fa (diff)
downloadsrc-a24e9d851227bd7e403befa77392e963859451bb.tar.gz
src-a24e9d851227bd7e403befa77392e963859451bb.zip
e1000: HWCSUM excemption fixes
Also disable IPV6 checksum offload. Spell hw->mac.type < e1000_82543 as e1000_82542. Confusingly, chips like 82540 and 82541 come later and do not have these issues. There is no functional change here, as the enum was defined in such a way it worked correctly. But this reads literally. (cherry picked from commit 38588749af45d738e6f548f15beb415c46ba8658)
-rw-r--r--sys/dev/e1000/if_em.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c
index 6ceab6be2b8a..ad1780e03fc5 100644
--- a/sys/dev/e1000/if_em.c
+++ b/sys/dev/e1000/if_em.c
@@ -951,9 +951,10 @@ em_if_attach_pre(if_ctx_t ctx)
CSUM_IP6_TCP | CSUM_IP6_UDP;
/* "PCI/PCI-X SDM 4.0" page 33 (b) - FDX requirement on these chips */
- if (hw->mac.type < e1000_82543 || hw->mac.type == e1000_82547 ||
+ if (hw->mac.type == e1000_82542 || hw->mac.type == e1000_82547 ||
hw->mac.type == e1000_82547_rev_2)
- scctx->isc_capenable &= ~(IFCAP_HWCSUM|IFCAP_VLAN_HWCSUM);
+ scctx->isc_capenable &= ~(IFCAP_HWCSUM | IFCAP_VLAN_HWCSUM |
+ IFCAP_HWCSUM_IPV6);
/* 82541ER doesn't do HW tagging */
if (hw->device_id == E1000_DEV_ID_82541ER || hw->device_id == E1000_DEV_ID_82541ER_LOM)
scctx->isc_capenable &= ~IFCAP_VLAN_HWTAGGING;