summaryrefslogtreecommitdiffstats
path: root/sys/pci/if_xl.c
diff options
context:
space:
mode:
authorsilby <silby@FreeBSD.org>2004-03-19 23:20:23 +0000
committersilby <silby@FreeBSD.org>2004-03-19 23:20:23 +0000
commite4be5cf79f568644ff6f93179c7ec0efffbcd1ac (patch)
tree5ab4cce3bf59944f5a2442eefd8ad5aafd6a5b7c /sys/pci/if_xl.c
parentef0d6eb5985e7a4f4fd2f0f42925e8328b8cf004 (diff)
downloadFreeBSD-src-e4be5cf79f568644ff6f93179c7ec0efffbcd1ac.zip
FreeBSD-src-e4be5cf79f568644ff6f93179c7ec0efffbcd1ac.tar.gz
solid reports that it is buggy *and* that it slows down transmit
speed. Buggy report: Matt Dillon & others Slowness report: I can't find the e-mail MFC After: 1 minute
Diffstat (limited to 'sys/pci/if_xl.c')
-rw-r--r--sys/pci/if_xl.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/sys/pci/if_xl.c b/sys/pci/if_xl.c
index 019f8e5..032de52 100644
--- a/sys/pci/if_xl.c
+++ b/sys/pci/if_xl.c
@@ -139,7 +139,21 @@ MODULE_DEPEND(xl, miibus, 1, 1, 1);
#include <pci/if_xlreg.h>
+/*
+ * TX Checksumming is disabled by default for two reasons:
+ * - TX Checksumming will occasionally produce corrupt packets
+ * - TX Checksumming seems to reduce performance
+ *
+ * Only 905B/C cards were reported to have this problem, it is possible
+ * that later chips _may_ be immune.
+ */
+#define XL905B_TXCSUM_BROKEN 1
+
+#ifdef XL905B_TXCSUM_BROKEN
+#define XL905B_CSUM_FEATURES 0
+#else
#define XL905B_CSUM_FEATURES (CSUM_IP | CSUM_TCP | CSUM_UDP)
+#endif
/*
* Various supported device vendors/types and their names.
@@ -1597,7 +1611,11 @@ xl_attach(dev)
if (sc->xl_type == XL_TYPE_905B) {
ifp->if_start = xl_start_90xB;
ifp->if_hwassist = XL905B_CSUM_FEATURES;
+#ifdef XL905B_TXCSUM_BROKEN
+ ifp->if_capabilities |= IFCAP_RXCSUM;
+#else
ifp->if_capabilities |= IFCAP_HWCSUM;
+#endif
} else
ifp->if_start = xl_start;
ifp->if_watchdog = xl_watchdog;
@@ -2506,6 +2524,7 @@ xl_encap(sc, c, m_head)
if (sc->xl_type == XL_TYPE_905B) {
status = XL_TXSTAT_RND_DEFEAT;
+#ifndef XL905B_TXCSUM_BROKEN
if (m_head->m_pkthdr.csum_flags) {
if (m_head->m_pkthdr.csum_flags & CSUM_IP)
status |= XL_TXSTAT_IPCKSUM;
@@ -2514,6 +2533,7 @@ xl_encap(sc, c, m_head)
if (m_head->m_pkthdr.csum_flags & CSUM_UDP)
status |= XL_TXSTAT_UDPCKSUM;
}
+#endif
c->xl_ptr->xl_status = htole32(status);
}
OpenPOWER on IntegriCloud