aboutsummaryrefslogtreecommitdiff
path: root/sys/pci
diff options
context:
space:
mode:
authorPyun YongHyeon <yongari@FreeBSD.org>2008-03-31 04:03:14 +0000
committerPyun YongHyeon <yongari@FreeBSD.org>2008-03-31 04:03:14 +0000
commita4148af5f076e5da80c67276e4253cf9d566a0c3 (patch)
tree4334bd2b69e160956c1861614d964d3ee270fead /sys/pci
parent5ab512bb8e53bec6eb12a69f38e4681fd7cec309 (diff)
downloadsrc-a4148af5f076e5da80c67276e4253cf9d566a0c3.tar.gz
src-a4148af5f076e5da80c67276e4253cf9d566a0c3.zip
Padding more bytes than necessary one broke another variants of
PCIe RealTek chips. Only pad IP packets if the payload is less than 28 bytes. Obtained from: NetBSD PR: kern/122221
Notes
Notes: svn path=/head/; revision=177771
Diffstat (limited to 'sys/pci')
-rw-r--r--sys/pci/if_rlreg.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/pci/if_rlreg.h b/sys/pci/if_rlreg.h
index 7e866891d14a..5038666551c0 100644
--- a/sys/pci/if_rlreg.h
+++ b/sys/pci/if_rlreg.h
@@ -497,6 +497,12 @@
#define RL_ETHER_ALIGN 2
+/*
+ * re(4) hardware ip4csum-tx could be mangled with 28 bytes or less IP packets.
+ */
+#define RL_IP4CSUMTX_MINLEN 28
+#define RL_IP4CSUMTX_PADLEN (ETHER_HDR_LEN + RL_IP4CSUMTX_MINLEN)
+
struct rl_chain_data {
uint16_t cur_rx;
uint8_t *rl_rx_buf;