Module Name:    src
Committed By:   tsutsui
Date:           Fri Mar 27 12:19:17 UTC 2009

Modified Files:
        src/sys/dev/ic: rtl8169.c rtl81x9reg.h

Log Message:
Check a correct bit for ip4csum-rx.  Reported privately on PR kern/40955.


To generate a diff of this commit:
cvs rdiff -u -r1.111 -r1.112 src/sys/dev/ic/rtl8169.c
cvs rdiff -u -r1.34 -r1.35 src/sys/dev/ic/rtl81x9reg.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/ic/rtl8169.c
diff -u src/sys/dev/ic/rtl8169.c:1.111 src/sys/dev/ic/rtl8169.c:1.112
--- src/sys/dev/ic/rtl8169.c:1.111	Sat Mar 21 10:05:28 2009
+++ src/sys/dev/ic/rtl8169.c	Fri Mar 27 12:19:17 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: rtl8169.c,v 1.111 2009/03/21 10:05:28 tsutsui Exp $	*/
+/*	$NetBSD: rtl8169.c,v 1.112 2009/03/27 12:19:17 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1997, 1998-2003
@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rtl8169.c,v 1.111 2009/03/21 10:05:28 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rtl8169.c,v 1.112 2009/03/27 12:19:17 tsutsui Exp $");
 /* $FreeBSD: /repoman/r/ncvs/src/sys/dev/re/if_re.c,v 1.20 2004/04/11 20:34:08 ru Exp $ */
 
 /*
@@ -1276,7 +1276,7 @@
 		/* Check IP header checksum */
 		if ((rxstat & RE_RDESC_STAT_PROTOID) != 0 &&
 		    ((sc->sc_quirk & RTKQ_DESCV2) == 0 ||
-		     (rxvlan & RE_PROTOID_IP) != 0)) {
+		     (rxvlan & RE_RDESC_VLANCTL_IPV4) != 0)) {
 			m->m_pkthdr.csum_flags |= M_CSUM_IPv4;
 			if (rxstat & RE_RDESC_STAT_IPSUMBAD)
 				m->m_pkthdr.csum_flags |= M_CSUM_IPv4_BAD;

Index: src/sys/dev/ic/rtl81x9reg.h
diff -u src/sys/dev/ic/rtl81x9reg.h:1.34 src/sys/dev/ic/rtl81x9reg.h:1.35
--- src/sys/dev/ic/rtl81x9reg.h:1.34	Sat Mar 21 07:58:30 2009
+++ src/sys/dev/ic/rtl81x9reg.h	Fri Mar 27 12:19:17 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: rtl81x9reg.h,v 1.34 2009/03/21 07:58:30 tsutsui Exp $	*/
+/*	$NetBSD: rtl81x9reg.h,v 1.35 2009/03/27 12:19:17 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1997, 1998
@@ -524,6 +524,8 @@
 #define RE_RDESC_VLANCTL_TAG	0x00010000	/* VLAN tag available
 						   (re_vlandata valid)*/
 #define RE_RDESC_VLANCTL_DATA	0x0000FFFF	/* TAG data */
+#define RE_RDESC_VLANCTL_IPV6	0x80000000	/* DESCV2 IPV6 packet */
+#define RE_RDESC_VLANCTL_IPV4	0x40000000	/* DESCV2 IPV4 packet */
 
 #define RE_PROTOID_NONIP	0x00000000
 #define RE_PROTOID_TCPIP	0x00010000

Reply via email to