Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 May 2004 21:11:36 -0700 (PDT)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 53377 for review
Message-ID:  <200405240411.i4O4Ba9p087810@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=53377

Change 53377 by rwatson@rwatson_paprika on 2004/05/23 21:11:05

	Integ netperf_socket branch to CVS HEAD:
	
	- bde makes kernel profiling work on amd64 more to his
	  satisfaction.
	- if_capenable mixups cleaned up.
	- if_sis locking nit: don't mark its callouts as MPSAFE
	  unless running debug.mpsafenet=1.

Affected files ...

.. //depot/projects/netperf_socket/sys/amd64/amd64/exception.S#3 integrate
.. //depot/projects/netperf_socket/sys/amd64/amd64/prof_machdep.c#2 integrate
.. //depot/projects/netperf_socket/sys/amd64/ia32/ia32_exception.S#2 integrate
.. //depot/projects/netperf_socket/sys/conf/files.amd64#7 integrate
.. //depot/projects/netperf_socket/sys/dev/firewire/fwdev.c#5 integrate
.. //depot/projects/netperf_socket/sys/dev/fxp/if_fxp.c#7 integrate
.. //depot/projects/netperf_socket/sys/dev/hme/if_hme.c#4 integrate
.. //depot/projects/netperf_socket/sys/dev/nge/if_nge.c#9 integrate
.. //depot/projects/netperf_socket/sys/dev/re/if_re.c#6 integrate
.. //depot/projects/netperf_socket/sys/dev/tx/if_tx.c#4 integrate
.. //depot/projects/netperf_socket/sys/dev/usb/ums.c#3 integrate
.. //depot/projects/netperf_socket/sys/i386/i386/exception.s#5 integrate
.. //depot/projects/netperf_socket/sys/net/if_vlan.c#4 integrate
.. //depot/projects/netperf_socket/sys/pci/if_dc.c#5 integrate
.. //depot/projects/netperf_socket/sys/pci/if_rl.c#8 integrate
.. //depot/projects/netperf_socket/sys/pci/if_sis.c#6 integrate
.. //depot/projects/netperf_socket/sys/pci/if_ste.c#13 integrate

Differences ...

==== //depot/projects/netperf_socket/sys/amd64/amd64/exception.S#3 (text+ko) ====

@@ -27,7 +27,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/amd64/amd64/exception.S,v 1.116 2004/04/05 21:25:51 imp Exp $
+ * $FreeBSD: src/sys/amd64/amd64/exception.S,v 1.117 2004/05/23 17:18:48 bde Exp $
  */
 
 #include <machine/asmacros.h>
@@ -163,8 +163,10 @@
 	movq	%r14,TF_R14(%rsp)
 	movq	%r15,TF_R15(%rsp)
 alltraps_with_regs_pushed:
+	FAKE_MCOUNT(TF_RIP(%rsp))
 calltrap:
 	call	trap
+	MEXITCOUNT
 	jmp	doreti			/* Handle any pending ASTs */
 
 	/*
@@ -239,6 +241,7 @@
 	movq	%r13,TF_R13(%rsp)	/* C preserved */
 	movq	%r14,TF_R14(%rsp)	/* C preserved */
 	movq	%r15,TF_R15(%rsp)	/* C preserved */
+	FAKE_MCOUNT(TF_RIP(%rsp))
 	call	syscall
 	movq	PCPU(CURPCB),%rax
 	testq	$PCB_FULLCTX,PCB_FLAGS(%rax)
@@ -253,6 +256,7 @@
 	call	ast
 	jmp	1b
 2:	/* restore preserved registers */
+	MEXITCOUNT
 	movq	TF_RDI(%rsp),%rdi	/* bonus; preserve arg 1 */
 	movq	TF_RSI(%rsp),%rsi	/* bonus: preserve arg 2 */
 	movq	TF_RDX(%rsp),%rdx	/* return value 2 */
@@ -271,6 +275,7 @@
 	sysretq
 3:	/* Requested full context restore, use doreti for that */
 	andq	$~PCB_FULLCTX,PCB_FLAGS(%rax)
+	MEXITCOUNT
 	jmp	doreti
 
 /*
@@ -286,6 +291,7 @@
 	movq	%rbx, %rsi		/* arg1 */
 	movq	%rsp, %rdx		/* trapframe pointer */
 	call	fork_exit
+	MEXITCOUNT
 	jmp	doreti			/* Handle any ASTs */
 
 	.data
@@ -301,6 +307,7 @@
 	.globl	doreti
 	.type	doreti,@function
 doreti:
+	FAKE_MCOUNT($bintr)		/* init "from" bintr -> doreti */
 	/*
 	 * Check if ASTs can be handled now.
 	 */
@@ -330,6 +337,7 @@
 	 *	registers.  The fault is handled in trap.c.
 	 */
 doreti_exit:
+	MEXITCOUNT
 	movq	TF_RDI(%rsp),%rdi
 	movq	TF_RSI(%rsp),%rsi
 	movq	TF_RDX(%rsp),%rdx

==== //depot/projects/netperf_socket/sys/amd64/amd64/prof_machdep.c#2 (text+ko) ====

@@ -25,11 +25,13 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/prof_machdep.c,v 1.19 2004/03/12 21:45:31 trhodes Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/prof_machdep.c,v 1.20 2004/05/23 18:27:14 bde Exp $");
 
 #ifdef GUPROF
+#if 0
 #include "opt_i586_guprof.h"
 #include "opt_perfmon.h"
+#endif
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -38,7 +40,9 @@
 #include <sys/sysctl.h>
 
 #include <machine/clock.h>
+#if 0
 #include <machine/perfmon.h>
+#endif
 #include <machine/profile.h>
 #undef MCOUNT
 #endif
@@ -89,7 +93,14 @@
  	# hasn't changed the stack except to call here, so the	\n\
 	# caller's raddr is above our raddr.			\n\
 	#							\n\
- 	movl	4(%esp),%edx					\n\
+	pushq	%rax						\n\
+	pushq	%rdx						\n\
+	pushq	%rcx						\n\
+	pushq	%rsi						\n\
+	pushq	%rdi						\n\
+	pushq	%r8						\n\
+	pushq	%r9						\n\
+	movq	7*8+8(%rsp),%rdi				\n\
  	jmp	.got_frompc					\n\
  								\n\
  	.p2align 4,0x90						\n\
@@ -101,24 +112,35 @@
 	je	.mcount_exit					\n\
 	#							\n\
 	# The caller's stack frame has already been built, so	\n\
-	# %ebp is the caller's frame pointer.  The caller's	\n\
+	# %rbp is the caller's frame pointer.  The caller's	\n\
 	# raddr is in the caller's frame following the caller's	\n\
 	# caller's frame pointer.				\n\
 	#							\n\
-	movl	4(%ebp),%edx					\n\
+	pushq	%rax						\n\
+	pushq	%rdx						\n\
+	pushq	%rcx						\n\
+	pushq	%rsi						\n\
+	pushq	%rdi						\n\
+	pushq	%r8						\n\
+	pushq	%r9						\n\
+	movq	8(%rbp),%rdi					\n\
 .got_frompc:							\n\
 	#							\n\
 	# Our raddr is the caller's pc.				\n\
 	#							\n\
-	movl	(%esp),%eax					\n\
+	movq	7*8(%rsp),%rsi					\n\
 								\n\
-	pushfl							\n\
-	pushl	%eax						\n\
-	pushl	%edx						\n\
+	pushfq							\n\
 	cli							\n\
 	call	" __XSTRING(CNAME(mcount)) "			\n\
-	addl	$8,%esp						\n\
-	popfl							\n\
+	popfq							\n\
+	popq	%r9						\n\
+	popq	%r8						\n\
+	popq	%rdi						\n\
+	popq	%rsi						\n\
+	popq	%rcx						\n\
+	popq	%rdx						\n\
+	popq	%rax						\n\
 .mcount_exit:							\n\
 	ret							\n\
 ");
@@ -154,17 +176,25 @@
 __cyg_profile_func_exit:					\n\
 	cmpl	$GMON_PROF_HIRES," __XSTRING(CNAME(_gmonparam)) "+GM_STATE \n\
 	jne	.mexitcount_exit				\n\
-	pushl	%edx						\n\
-	pushl	%eax						\n\
-	movl	8(%esp),%eax					\n\
-	pushfl							\n\
-	pushl	%eax						\n\
+	pushq	%rax						\n\
+	pushq	%rdx						\n\
+	pushq	%rcx						\n\
+	pushq	%rsi						\n\
+	pushq	%rdi						\n\
+	pushq	%r8						\n\
+	pushq	%r9						\n\
+	movq	7*8(%rsp),%rdi					\n\
+	pushfq							\n\
 	cli							\n\
 	call	" __XSTRING(CNAME(mexitcount)) "		\n\
-	addl	$4,%esp						\n\
-	popfl							\n\
-	popl	%eax						\n\
-	popl	%edx						\n\
+	popfq							\n\
+	popq	%r9						\n\
+	popq	%r8						\n\
+	popq	%rdi						\n\
+	popq	%rsi						\n\
+	popq	%rcx						\n\
+	popq	%rdx						\n\
+	popq	%rax						\n\
 .mexitcount_exit:						\n\
 	ret							\n\
 ");
@@ -188,7 +218,7 @@
 	u_char high, low;
 	static u_int prev_count;
 
-#if (defined(I586_CPU) || defined(I686_CPU)) && !defined(SMP)
+#ifndef SMP
 	if (cputime_clock == CPUTIME_CLOCK_TSC) {
 		count = (u_int)rdtsc();
 		delta = (int)(count - prev_count);
@@ -210,7 +240,7 @@
 		return (delta);
 	}
 #endif /* PERFMON && I586_PMC_GUPROF */
-#endif /* (I586_CPU || I686_CPU) && !SMP */
+#endif /* !SMP */
 
 	/*
 	 * Read the current value of the 8254 timer counter 0.
@@ -292,13 +322,13 @@
 {
 	if (cputime_clock == CPUTIME_CLOCK_UNINITIALIZED) {
 		cputime_clock = CPUTIME_CLOCK_I8254;
-#if (defined(I586_CPU) || defined(I686_CPU)) && !defined(SMP)
+#ifndef SMP
 		if (tsc_freq != 0)
 			cputime_clock = CPUTIME_CLOCK_TSC;
 #endif
 	}
 	gp->profrate = timer_freq << CPUTIME_CLOCK_I8254_SHIFT;
-#if (defined(I586_CPU) || defined(I686_CPU)) && !defined(SMP)
+#ifndef SMP
 	if (cputime_clock == CPUTIME_CLOCK_TSC)
 		gp->profrate = tsc_freq;
 #if defined(PERFMON) && defined(I586_PMC_GUPROF)
@@ -327,7 +357,7 @@
 		}
 	}
 #endif /* PERFMON && I586_PMC_GUPROF */
-#endif /* (I586_CPU || I686_CPU) && !SMP */
+#endif /* !SMP */
 	cputime_bias = 0;
 	cputime();
 }

==== //depot/projects/netperf_socket/sys/amd64/ia32/ia32_exception.S#2 (text+ko) ====

@@ -23,7 +23,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/amd64/ia32/ia32_exception.S,v 1.2 2003/11/13 02:38:33 peter Exp $
+ * $FreeBSD: src/sys/amd64/ia32/ia32_exception.S,v 1.3 2004/05/23 19:06:15 bde Exp $
  */
 
 #include <machine/asmacros.h>
@@ -63,5 +63,7 @@
 	movq	%r13,TF_R13(%rsp)
 	movq	%r14,TF_R14(%rsp)
 	movq	%r15,TF_R15(%rsp)
+	FAKE_MCOUNT(TF_RIP(%rsp))
 	call	ia32_syscall
+	MEXITCOUNT
 	jmp	doreti

==== //depot/projects/netperf_socket/sys/conf/files.amd64#7 (text+ko) ====

@@ -1,7 +1,7 @@
 # This file tells config what files go into building a kernel,
 # files marked standard are always included.
 #
-# $FreeBSD: src/sys/conf/files.amd64,v 1.34 2004/05/17 05:46:15 imp Exp $
+# $FreeBSD: src/sys/conf/files.amd64,v 1.35 2004/05/23 18:38:27 bde Exp $
 #
 # The long compile-with and dependency lines are required because of
 # limitations in config: backslash-newline doesn't work in strings, and
@@ -69,6 +69,7 @@
 amd64/amd64/mptable.c		optional	mptable
 amd64/amd64/mptable_pci.c	optional	mptable pci
 amd64/amd64/nexus.c		standard
+amd64/amd64/prof_machdep.c	optional	profiling-routine
 amd64/amd64/pmap.c		standard
 amd64/amd64/sigtramp.S		standard
 amd64/amd64/support.S		standard

==== //depot/projects/netperf_socket/sys/dev/firewire/fwdev.c#5 (text+ko) ====

@@ -31,7 +31,7 @@
  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  * 
- * $FreeBSD: src/sys/dev/firewire/fwdev.c,v 1.41 2004/05/22 16:14:17 dfr Exp $
+ * $FreeBSD: src/sys/dev/firewire/fwdev.c,v 1.42 2004/05/23 18:43:44 dfr Exp $
  *
  */
 
@@ -594,13 +594,21 @@
 
 		/* copy response */
 		tinfo = &sc->fc->tcode[xfer->recv.hdr.mode.hdr.tcode];
-		if (asyreq->req.len >= xfer->recv.pay_len + tinfo->hdr_len)
-			asyreq->req.len = xfer->recv.pay_len;
-		else
-			err = EINVAL;
+		if (xfer->recv.hdr.mode.hdr.tcode == FWTCODE_RRESB ||
+		    xfer->recv.hdr.mode.hdr.tcode == FWTCODE_LRES) {
+			pay_len = xfer->recv.pay_len;
+			if (asyreq->req.len >= xfer->recv.pay_len + tinfo->hdr_len) {
+				asyreq->req.len = xfer->recv.pay_len +
+					tinfo->hdr_len;
+			} else {
+				err = EINVAL;
+				pay_len = 0;
+			}
+		} else {
+			pay_len = 0;
+		}
 		bcopy(&xfer->recv.hdr, fp, tinfo->hdr_len);
-		bcopy(xfer->recv.payload, (char *)fp + tinfo->hdr_len,
-		    MAX(0, asyreq->req.len - tinfo->hdr_len));
+		bcopy(xfer->recv.payload, (char *)fp + tinfo->hdr_len, pay_len);
 out:
 		fw_xfer_free_buf(xfer);
 		break;

==== //depot/projects/netperf_socket/sys/dev/fxp/if_fxp.c#7 (text+ko) ====

@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/fxp/if_fxp.c,v 1.206 2004/05/23 16:11:48 mux Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/fxp/if_fxp.c,v 1.207 2004/05/23 21:05:07 yar Exp $");
 
 /*
  * Intel EtherExpress Pro/100B PCI Fast Ethernet driver
@@ -2496,7 +2496,8 @@
 		break;
 
 	case SIOCSIFCAP:
-		ifp->if_capenable = ifr->ifr_reqcap;
+		ifp->if_capenable &= ~IFCAP_POLLING;
+		ifp->if_capenable |= ifr->ifr_reqcap & IFCAP_POLLING;
 		break;
 
 	default:

==== //depot/projects/netperf_socket/sys/dev/hme/if_hme.c#4 (text+ko) ====

@@ -38,7 +38,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/hme/if_hme.c,v 1.21 2004/05/23 16:11:49 mux Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/hme/if_hme.c,v 1.22 2004/05/23 19:21:47 yar Exp $");
 
 /*
  * HME Ethernet module driver.
@@ -319,6 +319,7 @@
 	 */
 	ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header);
 	ifp->if_capabilities |= IFCAP_VLAN_MTU;
+	ifp->if_capenable |= IFCAP_VLAN_MTU;
 
 	callout_init(&sc->sc_tick_ch, 0);
 	return (0);

==== //depot/projects/netperf_socket/sys/dev/nge/if_nge.c#9 (text+ko) ====

@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/nge/if_nge.c,v 1.59 2004/05/23 16:11:50 mux Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/nge/if_nge.c,v 1.61 2004/05/23 21:05:07 yar Exp $");
 
 /*
  * National Semiconductor DP83820/DP83821 gigabit ethernet driver
@@ -2114,10 +2114,13 @@
 			 * 8152 (TX FIFO size minus 64 minus 18), turn off
 			 * TX checksum offloading.
 			 */
-			if (ifr->ifr_mtu >= 8152)
+			if (ifr->ifr_mtu >= 8152) {
+				ifp->if_capenable &= ~IFCAP_TXCSUM;
 				ifp->if_hwassist = 0;
-			else
+			} else {
+				ifp->if_capenable |= IFCAP_TXCSUM;
 				ifp->if_hwassist = NGE_CSUM_FEATURES;
+			}
 		}
 		break;
 	case SIOCSIFFLAGS:
@@ -2164,7 +2167,8 @@
 		}
 		break;
 	case SIOCSIFCAP:
-		ifp->if_capenable = ifr->ifr_reqcap;
+		ifp->if_capenable &= ~IFCAP_POLLING;
+		ifp->if_capenable |= ifr->ifr_reqcap & IFCAP_POLLING;
 		break;
 	default:
 		error = ether_ioctl(ifp, command, data);

==== //depot/projects/netperf_socket/sys/dev/re/if_re.c#6 (text+ko) ====

@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/re/if_re.c,v 1.21 2004/05/23 16:11:50 mux Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/re/if_re.c,v 1.22 2004/05/23 21:05:08 yar Exp $");
 
 /*
  * RealTek 8139C+/8169/8169S/8110S PCI NIC driver
@@ -2315,7 +2315,9 @@
 		error = ifmedia_ioctl(ifp, ifr, &mii->mii_media, command);
 		break;
 	case SIOCSIFCAP:
-		ifp->if_capenable = ifr->ifr_reqcap;
+		ifp->if_capenable &= ~(IFCAP_HWCSUM | IFCAP_POLLING);
+		ifp->if_capenable |=
+		    ifr->ifr_reqcap & (IFCAP_HWCSUM | IFCAP_POLLING);
 		if (ifp->if_capenable & IFCAP_TXCSUM)
 			ifp->if_hwassist = RE_CSUM_FEATURES;
 		else

==== //depot/projects/netperf_socket/sys/dev/tx/if_tx.c#4 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/tx/if_tx.c,v 1.82 2004/03/17 17:50:46 njl Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/tx/if_tx.c,v 1.83 2004/05/23 19:21:48 yar Exp $");
 
 /*
  * EtherPower II 10/100 Fast Ethernet (SMC 9432 serie)
@@ -413,6 +413,7 @@
 
 	ifp->if_hdrlen = sizeof(struct ether_vlan_header);
 	ifp->if_capabilities |= IFCAP_VLAN_MTU;
+	ifp->if_capenable |= IFCAP_VLAN_MTU;
 	callout_handle_init(&sc->stat_ch);
 
 	/* Activate our interrupt handler. */

==== //depot/projects/netperf_socket/sys/dev/usb/ums.c#3 (text+ko) ====

@@ -37,10 +37,10 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/usb/ums.c,v 1.66 2004/02/21 21:10:49 phk Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/usb/ums.c,v 1.67 2004/05/23 17:09:07 le Exp $");
 
 /*
- * HID spec: http://www.usb.org/developers/data/devclass/hid1_1.pdf
+ * HID spec: http://www.usb.org/developers/devclass_docs/HID1_11.pdf
  */
 
 #include <sys/param.h>

==== //depot/projects/netperf_socket/sys/i386/i386/exception.s#5 (text+ko) ====

@@ -27,7 +27,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/i386/i386/exception.s,v 1.109 2004/05/23 16:50:55 bde Exp $
+ * $FreeBSD: src/sys/i386/i386/exception.s,v 1.110 2004/05/23 17:25:46 bde Exp $
  */
 
 #include "opt_npx.h"
@@ -136,7 +136,6 @@
 	movl	%eax,%fs
 	FAKE_MCOUNT(TF_EIP(%esp))
 calltrap:
-	FAKE_MCOUNT(btrap)		/* init "from" btrap -> calltrap */
 	call	trap
 
 	/*
@@ -235,7 +234,7 @@
 	.globl	doreti
 	.type	doreti,@function
 doreti:
-	FAKE_MCOUNT(bintr)		/* init "from" bintr -> doreti */
+	FAKE_MCOUNT($bintr)		/* init "from" bintr -> doreti */
 doreti_next:
 	/*
 	 * Check if ASTs can be handled now.  PSL_VM must be checked first

==== //depot/projects/netperf_socket/sys/net/if_vlan.c#4 (text+ko) ====

@@ -26,7 +26,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/net/if_vlan.c,v 1.61 2004/05/21 08:43:38 ru Exp $
+ * $FreeBSD: src/sys/net/if_vlan.c,v 1.62 2004/05/23 22:32:15 yar Exp $
  */
 
 /*
@@ -338,7 +338,7 @@
 		 * knows how to find the VLAN tag to use, so we attach a
 		 * packet tag that holds it.
 		 */
-		if (p->if_capabilities & IFCAP_VLAN_HWTAGGING) {
+		if (p->if_capenable & IFCAP_VLAN_HWTAGGING) {
 			struct m_tag *mtag = m_tag_alloc(MTAG_VLAN,
 							 MTAG_VLAN_TAG,
 							 sizeof (u_int),
@@ -542,13 +542,20 @@
 	    (IFF_BROADCAST | IFF_MULTICAST | IFF_SIMPLEX | IFF_POINTOPOINT));
 	ifv->ifv_if.if_link_state = p->if_link_state;
 
+#if 0
 	/*
+	 * Not ready yet.  We need notification from the parent
+	 * when hw checksumming flags in its if_capenable change.
+	 * Flags set in if_capabilities only are useless.
+	 */
+	/*
 	 * If the parent interface can do hardware-assisted
 	 * VLAN encapsulation, then propagate its hardware-
 	 * assisted checksumming flags.
 	 */
 	if (p->if_capabilities & IFCAP_VLAN_HWTAGGING)
 		ifv->ifv_if.if_capabilities |= p->if_capabilities & IFCAP_HWCSUM;
+#endif
 
 	/*
 	 * Set up our ``Ethernet address'' to reflect the underlying

==== //depot/projects/netperf_socket/sys/pci/if_dc.c#5 (text+ko) ====

@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/pci/if_dc.c,v 1.142 2004/04/11 13:47:15 ru Exp $");
+__FBSDID("$FreeBSD: src/sys/pci/if_dc.c,v 1.143 2004/05/23 21:05:06 yar Exp $");
 
 /*
  * DEC "tulip" clone ethernet driver. Supports the DEC/Intel 21143
@@ -3708,7 +3708,8 @@
 #endif
 		break;
 	case SIOCSIFCAP:
-		ifp->if_capenable = ifr->ifr_reqcap;
+		ifp->if_capenable &= ~IFCAP_POLLING;
+		ifp->if_capenable |= ifr->ifr_reqcap & IFCAP_POLLING;
 		break;
 	default:
 		error = ether_ioctl(ifp, command, data);

==== //depot/projects/netperf_socket/sys/pci/if_rl.c#8 (text+ko) ====

@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/pci/if_rl.c,v 1.135 2004/04/11 16:23:16 ru Exp $");
+__FBSDID("$FreeBSD: src/sys/pci/if_rl.c,v 1.136 2004/05/23 21:05:07 yar Exp $");
 
 /*
  * RealTek 8129/8139 PCI NIC driver
@@ -1830,7 +1830,8 @@
 		error = ifmedia_ioctl(ifp, ifr, &mii->mii_media, command);
 		break;
 	case SIOCSIFCAP:
-		ifp->if_capenable = ifr->ifr_reqcap;
+		ifp->if_capenable &= ~IFCAP_POLLING;
+		ifp->if_capenable |= ifr->ifr_reqcap & IFCAP_POLLING;
 		break;
 	default:
 		error = ether_ioctl(ifp, command, data);

==== //depot/projects/netperf_socket/sys/pci/if_sis.c#6 (text+ko) ====

@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/pci/if_sis.c,v 1.97 2004/04/11 20:34:08 ru Exp $");
+__FBSDID("$FreeBSD: src/sys/pci/if_sis.c,v 1.99 2004/05/23 22:22:29 rwatson Exp $");
 
 /*
  * SiS 900/SiS 7016 fast ethernet PCI NIC driver. Datasheets are
@@ -1234,7 +1234,10 @@
 	}
 
 	sc->sis_unit = unit;
-	callout_init(&sc->sis_stat_ch, CALLOUT_MPSAFE);
+	if (debug_mpsafenet)
+		callout_init(&sc->sis_stat_ch, CALLOUT_MPSAFE);
+	else
+		callout_init(&sc->sis_stat_ch, 0);
 	bcopy(eaddr, (char *)&sc->arpcom.ac_enaddr, ETHER_ADDR_LEN);
 
 	/*
@@ -2340,7 +2343,8 @@
 		SIS_UNLOCK(sc);
 		break;
 	case SIOCSIFCAP:
-		ifp->if_capenable = ifr->ifr_reqcap;
+		ifp->if_capenable &= ~IFCAP_POLLING;
+		ifp->if_capenable |= ifr->ifr_reqcap & IFCAP_POLLING;
 		break;
 	default:
 		error = ether_ioctl(ifp, command, data);

==== //depot/projects/netperf_socket/sys/pci/if_ste.c#13 (text+ko) ====

@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/pci/if_ste.c,v 1.72 2004/04/11 14:42:25 ru Exp $");
+__FBSDID("$FreeBSD: src/sys/pci/if_ste.c,v 1.73 2004/05/23 21:05:07 yar Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1555,7 +1555,8 @@
 		error = ifmedia_ioctl(ifp, ifr, &mii->mii_media, command);
 		break;
 	case SIOCSIFCAP:
-		ifp->if_capenable = ifr->ifr_reqcap;
+		ifp->if_capenable &= ~IFCAP_POLLING;
+		ifp->if_capenable |= ifr->ifr_reqcap & IFCAP_POLLING;
 		break;
 	default:
 		error = ether_ioctl(ifp, command, data);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200405240411.i4O4Ba9p087810>