Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-7]: src/sys/dev/ic Pull up following revision(s) (requested by uw...
details: https://anonhg.NetBSD.org/src/rev/0c95bdf4c8d9
branches: netbsd-7
changeset: 798710:0c95bdf4c8d9
user: martin <martin%NetBSD.org@localhost>
date: Sun Dec 14 16:44:04 2014 +0000
description:
Pull up following revision(s) (requested by uwe in ticket #324):
sys/dev/ic/rtl8169.c: revision 1.142
RealTek 8139C+ incorrectly identifies UDP checksum 0xffff as bad.
Force software recalculation of UDP checksum if bad checksum is
reported by the hardware.
diffstat:
sys/dev/ic/rtl8169.c | 20 +++++++++++++++-----
1 files changed, 15 insertions(+), 5 deletions(-)
diffs (41 lines):
diff -r f2e1b45cc78b -r 0c95bdf4c8d9 sys/dev/ic/rtl8169.c
--- a/sys/dev/ic/rtl8169.c Sun Dec 14 16:41:30 2014 +0000
+++ b/sys/dev/ic/rtl8169.c Sun Dec 14 16:44:04 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rtl8169.c,v 1.140 2014/08/10 16:44:35 tls Exp $ */
+/* $NetBSD: rtl8169.c,v 1.140.2.1 2014/12/14 16:44:04 martin Exp $ */
/*
* Copyright (c) 1997, 1998-2003
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rtl8169.c,v 1.140 2014/08/10 16:44:35 tls Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rtl8169.c,v 1.140.2.1 2014/12/14 16:44:04 martin Exp $");
/* $FreeBSD: /repoman/r/ncvs/src/sys/dev/re/if_re.c,v 1.20 2004/04/11 20:34:08 ru Exp $ */
/*
@@ -1303,9 +1303,19 @@
M_CSUM_TCP_UDP_BAD;
} else if (RE_UDPPKT(rxstat)) {
m->m_pkthdr.csum_flags |= M_CSUM_UDPv4;
- if (rxstat & RE_RDESC_STAT_UDPSUMBAD)
- m->m_pkthdr.csum_flags |=
- M_CSUM_TCP_UDP_BAD;
+ if (rxstat & RE_RDESC_STAT_UDPSUMBAD) {
+ /*
+ * XXX: 8139C+ thinks UDP csum
+ * 0xFFFF is bad, force software
+ * calculation.
+ */
+ if (sc->sc_quirk & RTKQ_8139CPLUS)
+ m->m_pkthdr.csum_flags
+ &= ~M_CSUM_UDPv4;
+ else
+ m->m_pkthdr.csum_flags
+ |= M_CSUM_TCP_UDP_BAD;
+ }
}
}
} else {
Home |
Main Index |
Thread Index |
Old Index