Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Apr 2009 18:23:38 GMT
From:      Marko Zec <zec@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 160627 for review
Message-ID:  <200904141823.n3EINcAL014314@repoman.freebsd.org>

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

Change 160627 by zec@zec_amdx2 on 2009/04/14 18:23:20

	IFC @ 160621

Affected files ...

.. //depot/projects/vimage-commit2/src/sys/amd64/amd64/busdma_machdep.c#4 integrate
.. //depot/projects/vimage-commit2/src/sys/amd64/amd64/machdep.c#9 integrate
.. //depot/projects/vimage-commit2/src/sys/amd64/include/cpufunc.h#5 integrate
.. //depot/projects/vimage-commit2/src/sys/arm/arm/busdma_machdep.c#5 integrate
.. //depot/projects/vimage-commit2/src/sys/boot/i386/libi386/biosdisk.c#4 integrate
.. //depot/projects/vimage-commit2/src/sys/boot/sparc64/loader/main.c#9 integrate
.. //depot/projects/vimage-commit2/src/sys/conf/files#28 integrate
.. //depot/projects/vimage-commit2/src/sys/contrib/pf/net/pf.c#13 integrate
.. //depot/projects/vimage-commit2/src/sys/dev/agp/agp.c#7 integrate
.. //depot/projects/vimage-commit2/src/sys/dev/ath/ath_hal/ah.c#6 integrate
.. //depot/projects/vimage-commit2/src/sys/dev/ath/ath_hal/ar5210/ar5210_phy.c#2 integrate
.. //depot/projects/vimage-commit2/src/sys/dev/ath/ath_hal/ar5211/ar5211_phy.c#2 integrate
.. //depot/projects/vimage-commit2/src/sys/dev/ath/ath_hal/ar5212/ar5212_phy.c#3 integrate
.. //depot/projects/vimage-commit2/src/sys/dev/ath/ath_rate/sample/sample.c#5 integrate
.. //depot/projects/vimage-commit2/src/sys/dev/ath/if_ath.c#12 integrate
.. //depot/projects/vimage-commit2/src/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c#19 integrate
.. //depot/projects/vimage-commit2/src/sys/dev/e1000/if_em.c#6 integrate
.. //depot/projects/vimage-commit2/src/sys/dev/e1000/if_em.h#3 integrate
.. //depot/projects/vimage-commit2/src/sys/dev/e1000/if_igb.c#7 integrate
.. //depot/projects/vimage-commit2/src/sys/dev/fxp/if_fxp.c#9 integrate
.. //depot/projects/vimage-commit2/src/sys/dev/joy/joy.c#3 integrate
.. //depot/projects/vimage-commit2/src/sys/dev/pccard/pccarddevs#9 integrate
.. //depot/projects/vimage-commit2/src/sys/dev/powermac_nvram/powermac_nvram.c#5 integrate
.. //depot/projects/vimage-commit2/src/sys/dev/tdfx/tdfx_pci.c#3 integrate
.. //depot/projects/vimage-commit2/src/sys/dev/twa/tw_osl_freebsd.c#5 integrate
.. //depot/projects/vimage-commit2/src/sys/dev/twe/twe_freebsd.c#3 integrate
.. //depot/projects/vimage-commit2/src/sys/i386/i386/busdma_machdep.c#5 integrate
.. //depot/projects/vimage-commit2/src/sys/i386/i386/machdep.c#10 integrate
.. //depot/projects/vimage-commit2/src/sys/i386/include/cpufunc.h#7 integrate
.. //depot/projects/vimage-commit2/src/sys/ia64/ia64/busdma_machdep.c#4 integrate
.. //depot/projects/vimage-commit2/src/sys/kern/kern_tc.c#3 integrate
.. //depot/projects/vimage-commit2/src/sys/kern/kern_umtx.c#4 integrate
.. //depot/projects/vimage-commit2/src/sys/kern/uipc_syscalls.c#3 integrate
.. //depot/projects/vimage-commit2/src/sys/kern/vfs_cache.c#15 integrate
.. //depot/projects/vimage-commit2/src/sys/kern/vfs_vnops.c#13 integrate
.. //depot/projects/vimage-commit2/src/sys/modules/Makefile#18 integrate
.. //depot/projects/vimage-commit2/src/sys/modules/nfssvc/Makefile#1 branch
.. //depot/projects/vimage-commit2/src/sys/net/if.c#42 integrate
.. //depot/projects/vimage-commit2/src/sys/net/if_bridge.c#16 integrate
.. //depot/projects/vimage-commit2/src/sys/net/if_var.h#15 integrate
.. //depot/projects/vimage-commit2/src/sys/net80211/ieee80211_node.c#8 integrate
.. //depot/projects/vimage-commit2/src/sys/net80211/ieee80211_tdma.c#3 integrate
.. //depot/projects/vimage-commit2/src/sys/netinet/icmp6.h#3 integrate
.. //depot/projects/vimage-commit2/src/sys/netinet/icmp_var.h#3 integrate
.. //depot/projects/vimage-commit2/src/sys/netinet/igmp.c#23 integrate
.. //depot/projects/vimage-commit2/src/sys/netinet/igmp_var.h#3 integrate
.. //depot/projects/vimage-commit2/src/sys/netinet/in_gif.c#13 integrate
.. //depot/projects/vimage-commit2/src/sys/netinet/ip_carp.c#13 integrate
.. //depot/projects/vimage-commit2/src/sys/netinet/ip_carp.h#2 integrate
.. //depot/projects/vimage-commit2/src/sys/netinet/ip_divert.c#23 integrate
.. //depot/projects/vimage-commit2/src/sys/netinet/ip_fastfwd.c#13 integrate
.. //depot/projects/vimage-commit2/src/sys/netinet/ip_icmp.c#16 integrate
.. //depot/projects/vimage-commit2/src/sys/netinet/ip_input.c#33 integrate
.. //depot/projects/vimage-commit2/src/sys/netinet/ip_ipsec.c#10 integrate
.. //depot/projects/vimage-commit2/src/sys/netinet/ip_mroute.c#12 integrate
.. //depot/projects/vimage-commit2/src/sys/netinet/ip_mroute.h#3 integrate
.. //depot/projects/vimage-commit2/src/sys/netinet/ip_options.c#12 integrate
.. //depot/projects/vimage-commit2/src/sys/netinet/ip_output.c#23 integrate
.. //depot/projects/vimage-commit2/src/sys/netinet/ip_var.h#15 integrate
.. //depot/projects/vimage-commit2/src/sys/netinet/libalias/alias.c#4 integrate
.. //depot/projects/vimage-commit2/src/sys/netinet/libalias/alias_nbt.c#4 integrate
.. //depot/projects/vimage-commit2/src/sys/netinet/pim_var.h#2 integrate
.. //depot/projects/vimage-commit2/src/sys/netinet/raw_ip.c#25 integrate
.. //depot/projects/vimage-commit2/src/sys/netinet/sctp_indata.c#12 integrate
.. //depot/projects/vimage-commit2/src/sys/netinet/tcp_hostcache.c#18 integrate
.. //depot/projects/vimage-commit2/src/sys/netinet/tcp_input.c#34 integrate
.. //depot/projects/vimage-commit2/src/sys/netinet/tcp_output.c#21 integrate
.. //depot/projects/vimage-commit2/src/sys/netinet/tcp_reass.c#17 integrate
.. //depot/projects/vimage-commit2/src/sys/netinet/tcp_sack.c#20 integrate
.. //depot/projects/vimage-commit2/src/sys/netinet/tcp_subr.c#45 integrate
.. //depot/projects/vimage-commit2/src/sys/netinet/tcp_syncache.c#32 integrate
.. //depot/projects/vimage-commit2/src/sys/netinet/tcp_timer.c#14 integrate
.. //depot/projects/vimage-commit2/src/sys/netinet/tcp_timewait.c#22 integrate
.. //depot/projects/vimage-commit2/src/sys/netinet/tcp_usrreq.c#18 integrate
.. //depot/projects/vimage-commit2/src/sys/netinet/tcp_var.h#10 integrate
.. //depot/projects/vimage-commit2/src/sys/netinet/udp_usrreq.c#32 integrate
.. //depot/projects/vimage-commit2/src/sys/netinet/udp_var.h#5 integrate
.. //depot/projects/vimage-commit2/src/sys/netinet6/icmp6.c#24 integrate
.. //depot/projects/vimage-commit2/src/sys/netinet6/mld6.c#14 integrate
.. //depot/projects/vimage-commit2/src/sys/netinet6/nd6.c#24 integrate
.. //depot/projects/vimage-commit2/src/sys/netinet6/nd6_nbr.c#22 integrate
.. //depot/projects/vimage-commit2/src/sys/netinet6/nd6_rtr.c#22 integrate
.. //depot/projects/vimage-commit2/src/sys/netinet6/raw_ip6.c#24 integrate
.. //depot/projects/vimage-commit2/src/sys/netinet6/udp6_usrreq.c#19 integrate
.. //depot/projects/vimage-commit2/src/sys/nfsclient/nfs_socket.c#6 integrate
.. //depot/projects/vimage-commit2/src/sys/nfsserver/nfs.h#5 integrate
.. //depot/projects/vimage-commit2/src/sys/nfsserver/nfs_srvkrpc.c#4 integrate
.. //depot/projects/vimage-commit2/src/sys/nfsserver/nfs_srvsubs.c#8 integrate
.. //depot/projects/vimage-commit2/src/sys/nfsserver/nfs_syscalls.c#8 integrate
.. //depot/projects/vimage-commit2/src/sys/pc98/pc98/machdep.c#5 integrate
.. //depot/projects/vimage-commit2/src/sys/powerpc/aim/machdep.c#7 integrate
.. //depot/projects/vimage-commit2/src/sys/powerpc/aim/trap_subr.S#5 integrate
.. //depot/projects/vimage-commit2/src/sys/powerpc/include/hid.h#3 integrate
.. //depot/projects/vimage-commit2/src/sys/powerpc/include/spr.h#6 integrate
.. //depot/projects/vimage-commit2/src/sys/sys/param.h#32 integrate
.. //depot/projects/vimage-commit2/src/sys/vm/vm_reserv.c#2 integrate
.. //depot/projects/vimage-commit2/src/sys/vm/vm_unix.c#4 integrate

Differences ...

==== //depot/projects/vimage-commit2/src/sys/amd64/amd64/busdma_machdep.c#4 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/busdma_machdep.c,v 1.88 2009/02/09 18:03:31 cognet Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/busdma_machdep.c,v 1.89 2009/04/13 19:20:32 kib Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -606,7 +606,10 @@
 		vendaddr = (vm_offset_t)buf + buflen;
 
 		while (vaddr < vendaddr) {
-			paddr = pmap_kextract(vaddr);
+			if (pmap)
+				paddr = pmap_extract(pmap, vaddr);
+			else
+				paddr = pmap_kextract(vaddr);
 			if (run_filter(dmat, paddr) != 0)
 				map->pagesneeded++;
 			vaddr += (PAGE_SIZE - ((vm_offset_t)vaddr & PAGE_MASK));

==== //depot/projects/vimage-commit2/src/sys/amd64/amd64/machdep.c#9 (text+ko) ====

@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.698 2009/04/01 13:09:26 kib Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.699 2009/04/11 14:01:01 ed Exp $");
 
 #include "opt_atalk.h"
 #include "opt_atpic.h"
@@ -2178,45 +2178,24 @@
 #ifdef KDB
 
 /*
- * Provide inb() and outb() as functions.  They are normally only
- * available as macros calling inlined functions, thus cannot be
- * called from the debugger.
- *
- * The actual code is stolen from <machine/cpufunc.h>, and de-inlined.
+ * Provide inb() and outb() as functions.  They are normally only available as
+ * inline functions, thus cannot be called from the debugger.
  */
 
-#undef inb
-#undef outb
-
 /* silence compiler warnings */
-u_char inb(u_int);
-void outb(u_int, u_char);
+u_char inb_(u_short);
+void outb_(u_short, u_char);
 
 u_char
-inb(u_int port)
+inb_(u_short port)
 {
-	u_char	data;
-	/*
-	 * We use %%dx and not %1 here because i/o is done at %dx and not at
-	 * %edx, while gcc generates inferior code (movw instead of movl)
-	 * if we tell it to load (u_short) port.
-	 */
-	__asm __volatile("inb %%dx,%0" : "=a" (data) : "d" (port));
-	return (data);
+	return inb(port);
 }
 
 void
-outb(u_int port, u_char data)
+outb_(u_short port, u_char data)
 {
-	u_char	al;
-	/*
-	 * Use an unnecessary assignment to help gcc's register allocator.
-	 * This make a large difference for gcc-1.40 and a tiny difference
-	 * for gcc-2.6.0.  For gcc-1.40, al had to be ``asm("ax")'' for
-	 * best results.  gcc-2.6.0 can't handle this.
-	 */
-	al = data;
-	__asm __volatile("outb %0,%%dx" : : "a" (al), "d" (port));
+	outb(port, data);
 }
 
 #endif /* KDB */

==== //depot/projects/vimage-commit2/src/sys/amd64/include/cpufunc.h#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/amd64/include/cpufunc.h,v 1.152 2009/04/07 19:31:36 ed Exp $
+ * $FreeBSD: src/sys/amd64/include/cpufunc.h,v 1.153 2009/04/11 14:01:01 ed Exp $
  */
 
 /*
@@ -164,79 +164,21 @@
 	__asm __volatile("hlt");
 }
 
-#if !defined(__GNUCLIKE_BUILTIN_CONSTANT_P) || __GNUCLIKE_ASM < 3
-
-#define	inb(port)		inbv(port)
-#define	outb(port, data)	outbv(port, data)
-
-#else /* __GNUCLIKE_BUILTIN_CONSTANT_P && __GNUCLIKE_ASM >= 3 */
-
-/*
- * The following complications are to get around gcc not having a
- * constraint letter for the range 0..255.  We still put "d" in the
- * constraint because "i" isn't a valid constraint when the port
- * isn't constant.  This only matters for -O0 because otherwise
- * the non-working version gets optimized away.
- * 
- * Use an expression-statement instead of a conditional expression
- * because gcc-2.6.0 would promote the operands of the conditional
- * and produce poor code for "if ((inb(var) & const1) == const2)".
- *
- * The unnecessary test `(port) < 0x10000' is to generate a warning if
- * the `port' has type u_short or smaller.  Such types are pessimal.
- * This actually only works for signed types.  The range check is
- * careful to avoid generating warnings.
- */
-#define	inb(port) __extension__ ({					\
-	u_char	_data;							\
-	if (__builtin_constant_p(port) && ((port) & 0xffff) < 0x100	\
-	    && (port) < 0x10000)					\
-		_data = inbc(port);					\
-	else								\
-		_data = inbv(port);					\
-	_data; })
-
-#define	outb(port, data) (						\
-	__builtin_constant_p(port) && ((port) & 0xffff) < 0x100		\
-	&& (port) < 0x10000						\
-	? outbc(port, data) : outbv(port, data))
-
 static __inline u_char
-inbc(u_int port)
+inb(u_int port)
 {
 	u_char	data;
 
-	__asm __volatile("inb %1,%0" : "=a" (data) : "id" ((u_short)(port)));
+	__asm volatile("inb %w1, %0" : "=a" (data) : "Nd" (port));
 	return (data);
 }
 
-static __inline void
-outbc(u_int port, u_char data)
-{
-	__asm __volatile("outb %0,%1" : : "a" (data), "id" ((u_short)(port)));
-}
-
-#endif /* __GNUCLIKE_BUILTIN_CONSTANT_P  && __GNUCLIKE_ASM >= 3*/
-
-static __inline u_char
-inbv(u_int port)
-{
-	u_char	data;
-	/*
-	 * We use %%dx and not %1 here because i/o is done at %dx and not at
-	 * %edx, while gcc generates inferior code (movw instead of movl)
-	 * if we tell it to load (u_short) port.
-	 */
-	__asm __volatile("inb %%dx,%0" : "=a" (data) : "d" (port));
-	return (data);
-}
-
 static __inline u_int
 inl(u_int port)
 {
 	u_int	data;
 
-	__asm __volatile("inl %%dx,%0" : "=a" (data) : "d" (port));
+	__asm volatile("inl %w1, %0" : "=a" (data) : "Nd" (port));
 	return (data);
 }
 
@@ -278,33 +220,20 @@
 {
 	u_short	data;
 
-	__asm __volatile("inw %%dx,%0" : "=a" (data) : "d" (port));
+	__asm volatile("inw %w1, %0" : "=a" (data) : "Nd" (port));
 	return (data);
 }
 
 static __inline void
-outbv(u_int port, u_char data)
+outb(u_int port, u_char data)
 {
-	u_char	al;
-	/*
-	 * Use an unnecessary assignment to help gcc's register allocator.
-	 * This make a large difference for gcc-1.40 and a tiny difference
-	 * for gcc-2.6.0.  For gcc-1.40, al had to be ``asm("ax")'' for
-	 * best results.  gcc-2.6.0 can't handle this.
-	 */
-	al = data;
-	__asm __volatile("outb %0,%%dx" : : "a" (al), "d" (port));
+	__asm volatile("outb %0, %w1" : : "a" (data), "Nd" (port));
 }
 
 static __inline void
 outl(u_int port, u_int data)
 {
-	/*
-	 * outl() and outw() aren't used much so we haven't looked at
-	 * possible micro-optimizations such as the unnecessary
-	 * assignment for them.
-	 */
-	__asm __volatile("outl %0,%%dx" : : "a" (data), "d" (port));
+	__asm volatile("outl %0, %w1" : : "a" (data), "Nd" (port));
 }
 
 static __inline void
@@ -334,7 +263,7 @@
 static __inline void
 outw(u_int port, u_short data)
 {
-	__asm __volatile("outw %0,%%dx" : : "a" (data), "d" (port));
+	__asm volatile("outw %0, %w1" : : "a" (data), "Nd" (port));
 }
 
 static __inline void

==== //depot/projects/vimage-commit2/src/sys/arm/arm/busdma_machdep.c#5 (text+ko) ====

@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/arm/busdma_machdep.c,v 1.44 2009/02/09 18:03:31 cognet Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/arm/busdma_machdep.c,v 1.45 2009/04/13 19:20:32 kib Exp $");
 
 /*
  * ARM bus dma support routines
@@ -669,8 +669,8 @@
 }
 
 static int
-_bus_dmamap_count_pages(bus_dma_tag_t dmat, bus_dmamap_t map, void *buf,
-			bus_size_t buflen, int flags)
+_bus_dmamap_count_pages(bus_dma_tag_t dmat, bus_dmamap_t map, pmap_t pmap,
+    void *buf, bus_size_t buflen, int flags)
 {
 	vm_offset_t vaddr;
 	vm_offset_t vendaddr;
@@ -689,7 +689,10 @@
 		vendaddr = (vm_offset_t)buf + buflen;
 
 		while (vaddr < vendaddr) {
-			paddr = pmap_kextract(vaddr);
+			if (pmap != NULL)
+				paddr = pmap_extract(pmap, vaddr);
+			else
+				paddr = pmap_kextract(vaddr);
 			if (((dmat->flags & BUS_DMA_COULD_BOUNCE) != 0) &&
 			    run_filter(dmat, paddr) != 0)
 				map->pagesneeded++;
@@ -745,7 +748,8 @@
 	bmask = ~(dmat->boundary - 1);
 
 	if ((dmat->flags & BUS_DMA_COULD_BOUNCE) != 0) {
-		error = _bus_dmamap_count_pages(dmat, map, buf, buflen, flags);
+		error = _bus_dmamap_count_pages(dmat, map, pmap, buf, buflen,
+		    flags);
 		if (error)
 			return (error);
 	}

==== //depot/projects/vimage-commit2/src/sys/boot/i386/libi386/biosdisk.c#4 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/boot/i386/libi386/biosdisk.c,v 1.58 2009/03/12 20:41:52 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/boot/i386/libi386/biosdisk.c,v 1.59 2009/04/14 14:19:18 jhb Exp $");
 
 /*
  * BIOS disk device handling.
@@ -83,7 +83,7 @@
     int			od_cyl;			/* BIOS geometry */
     int			od_hds;
     int			od_sec;
-    int			od_boff;		/* block offset from beginning of BIOS disk */
+    daddr_t			od_boff;		/* block offset from beginning of BIOS disk */
     int			od_flags;
 #define BD_MODEINT13		0x0000
 #define BD_MODEEDD1		0x0001

==== //depot/projects/vimage-commit2/src/sys/boot/sparc64/loader/main.c#9 (text+ko) ====

@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/boot/sparc64/loader/main.c,v 1.40 2009/02/10 21:48:42 marius Exp $");
+__FBSDID("$FreeBSD: src/sys/boot/sparc64/loader/main.c,v 1.41 2009/04/13 19:43:37 marius Exp $");
 
 /*
  * FreeBSD/sparc64 kernel loader - machine dependent part
@@ -472,7 +472,7 @@
 	reg = rdpr(pstate);
 	wrpr(pstate, reg & ~PSTATE_IE, 0);
 	stxa(AA_DMMU_TAR, ASI_DMMU,
-	     TLB_TAR_VA(vpn) | TLB_TAR_CTX(TLB_CTX_KERNEL));
+	    TLB_TAR_VA(vpn) | TLB_TAR_CTX(TLB_CTX_KERNEL));
 	stxa(0, ASI_DTLB_DATA_IN_REG, data);
 	membar(Sync);
 	wrpr(pstate, reg, 0);
@@ -497,7 +497,7 @@
 				continue;
 
 			stxa(AA_IMMU_TAR, ASI_IMMU,
-			     TLB_TAR_VA(vpn) | TLB_TAR_CTX(TLB_CTX_KERNEL));
+			    TLB_TAR_VA(vpn) | TLB_TAR_CTX(TLB_CTX_KERNEL));
 			stxa(TLB_DAR_SLOT(i), ASI_ITLB_DATA_ACCESS_REG, data);
 			flush(PROMBASE);
 			break;
@@ -509,7 +509,7 @@
 	}
 
 	stxa(AA_IMMU_TAR, ASI_IMMU,
-	     TLB_TAR_VA(vpn) | TLB_TAR_CTX(TLB_CTX_KERNEL));
+	    TLB_TAR_VA(vpn) | TLB_TAR_CTX(TLB_CTX_KERNEL));
 	stxa(0, ASI_ITLB_DATA_IN_REG, data);
 	flush(PROMBASE);
 	wrpr(pstate, reg, 0);

==== //depot/projects/vimage-commit2/src/sys/conf/files#28 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/files,v 1.1389 2009/04/10 00:34:55 jfv Exp $
+# $FreeBSD: src/sys/conf/files,v 1.1390 2009/04/12 19:04:27 rmacklem Exp $
 #
 # The long compile-with and dependency lines are required because of
 # limitations in config: backslash-newline doesn't work in strings, and
@@ -2469,6 +2469,7 @@
 nfsserver/nfs_srvcache.c	optional nfsserver
 nfsserver/nfs_srvsubs.c		optional nfsserver
 nfsserver/nfs_syscalls.c	optional nfsserver
+nfs/nfs_nfssvc.c		optional nfsserver
 nlm/nlm_advlock.c		optional nfslockd nfsclient
 nlm/nlm_prot_clnt.c		optional nfslockd
 nlm/nlm_prot_impl.c		optional nfslockd

==== //depot/projects/vimage-commit2/src/sys/contrib/pf/net/pf.c#13 (text+ko) ====

@@ -41,7 +41,7 @@
 #include "opt_inet6.h"
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/contrib/pf/net/pf.c,v 1.60 2008/12/15 06:10:57 qingli Exp $");
+__FBSDID("$FreeBSD: src/sys/contrib/pf/net/pf.c,v 1.64 2009/04/12 13:22:33 rwatson Exp $");
 #endif
 
 #ifdef __FreeBSD__
@@ -6153,7 +6153,7 @@
 	if (r->rt == PF_FASTROUTE) {
 		in_rtalloc(ro, 0);
 		if (ro->ro_rt == 0) {
-			V_ipstat.ips_noroute++;
+			IPSTAT_INC(ips_noroute);
 			goto bad;
 		}
 
@@ -6284,16 +6284,16 @@
 		if ((ifp->if_capabilities & IFCAP_CSUM_IPv4) &&
 		    ifp->if_bridge == NULL) {
 			m0->m_pkthdr.csum_flags |= M_IPV4_CSUM_OUT;
-			V_ipstat.ips_outhwcsum++;
+			IPSTAT_INC(ips_outhwcsum);
 		} else {
 			ip->ip_sum = 0;
 			ip->ip_sum = in_cksum(m0, ip->ip_hl << 2);
 		}
 		/* Update relevant hardware checksum stats for TCP/UDP */
 		if (m0->m_pkthdr.csum_flags & M_TCPV4_CSUM_OUT)
-			V_tcpstat.tcps_outhwcsum++;
+			TCPSTAT_INC(tcpstat.tcps_outhwcsum);
 		else if (m0->m_pkthdr.csum_flags & M_UDPV4_CSUM_OUT)
-			V_udpstat.udps_outhwcsum++;
+			UDPSTAT_INC(udps_outhwcsum);
 		error = (*ifp->if_output)(ifp, m0, sintosa(dst), NULL);
 		goto done;
 	}
@@ -6303,7 +6303,7 @@
 	 * Must be able to put at least 8 bytes per fragment.
 	 */
 	if (ip->ip_off & htons(IP_DF)) {
-		V_ipstat.ips_cantfrag++;
+		IPSTAT_INC(ips_cantfrag);
 		if (r->rt != PF_DUPTO) {
 #ifdef __FreeBSD__
 			/* icmp_error() expects host byte ordering */
@@ -6360,7 +6360,7 @@
 	}
 
 	if (error == 0)
-		V_ipstat.ips_fragmented++;
+		IPSTAT_INC(ips_fragmented);
 
 done:
 	if (r->rt != PF_DUPTO)
@@ -6635,26 +6635,26 @@
 		case IPPROTO_TCP:
 		    {
 			INIT_VNET_INET(curvnet);
-			V_tcpstat.tcps_rcvbadsum++;
+			TCPSTAT_INC(tcps_rcvbadsum);
 			break;
 		    }
 		case IPPROTO_UDP:
 		    {
 			INIT_VNET_INET(curvnet);
-			V_udpstat.udps_badsum++;
+			UDPSTAT_INC(udps_badsum);
 			break;
 		    }
 		case IPPROTO_ICMP:
 		    {
 			INIT_VNET_INET(curvnet);
-			V_icmpstat.icps_checksum++;
+			ICMPSTAT_INC(icps_checksum);
 			break;
 		    }
 #ifdef INET6
 		case IPPROTO_ICMPV6:
 		    {
 			INIT_VNET_INET6(curvnet);
-			V_icmp6stat.icp6s_checksum++;
+			ICMP6STAT_INC(icp6s_checksum);
 			break;
 		    }
 #endif /* INET6 */
@@ -6741,17 +6741,17 @@
 		m->m_pkthdr.csum_flags |= flag_bad;
 		switch (p) {
 		case IPPROTO_TCP:
-			V_tcpstat.tcps_rcvbadsum++;
+			TCPSTAT_INC(tcps_rcvbadsum);
 			break;
 		case IPPROTO_UDP:
-			V_udpstat.udps_badsum++;
+			UDPSTAT_INC(udps_badsum);
 			break;
 		case IPPROTO_ICMP:
-			V_icmpstat.icps_checksum++;
+			ICMPSTAT_INC(icps_checksum);
 			break;
 #ifdef INET6
 		case IPPROTO_ICMPV6:
-			V_icmp6stat.icp6s_checksum++;
+			ICMP6STAT_INC(icp6s_checksum);
 			break;
 #endif /* INET6 */
 		}

==== //depot/projects/vimage-commit2/src/sys/dev/agp/agp.c#7 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/agp/agp.c,v 1.64 2009/03/20 18:30:20 rnoland Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/agp/agp.c,v 1.65 2009/04/14 13:11:34 ed Exp $");
 
 #include "opt_agp.h"
 #include "opt_bus.h"
@@ -81,7 +81,6 @@
 };
 
 static devclass_t agp_devclass;
-#define KDEV2DEV(kdev)	devclass_get_device(agp_devclass, dev2unit(kdev))
 
 /* Helper functions for implementing chipset mini drivers. */
 
@@ -254,11 +253,8 @@
 	sc->as_nextid = 1;
 
 	sc->as_devnode = make_dev(&agp_cdevsw,
-				  device_get_unit(dev),
-				  UID_ROOT,
-				  GID_WHEEL,
-				  0600,
-				  "agpgart");
+	    0, UID_ROOT, GID_WHEEL, 0600, "agpgart");
+	sc->as_devnode->si_drv1 = dev;
 
 	return 0;
 }
@@ -802,7 +798,7 @@
 static int
 agp_open(struct cdev *kdev, int oflags, int devtype, struct thread *td)
 {
-	device_t dev = KDEV2DEV(kdev);
+	device_t dev = kdev->si_drv1;
 	struct agp_softc *sc = device_get_softc(dev);
 
 	if (!sc->as_isopen) {
@@ -816,7 +812,7 @@
 static int
 agp_close(struct cdev *kdev, int fflag, int devtype, struct thread *td)
 {
-	device_t dev = KDEV2DEV(kdev);
+	device_t dev = kdev->si_drv1;
 	struct agp_softc *sc = device_get_softc(dev);
 	struct agp_memory *mem;
 
@@ -839,7 +835,7 @@
 static int
 agp_ioctl(struct cdev *kdev, u_long cmd, caddr_t data, int fflag, struct thread *td)
 {
-	device_t dev = KDEV2DEV(kdev);
+	device_t dev = kdev->si_drv1;
 
 	switch (cmd) {
 	case AGPIOC_INFO:
@@ -874,7 +870,7 @@
 static int
 agp_mmap(struct cdev *kdev, vm_offset_t offset, vm_paddr_t *paddr, int prot)
 {
-	device_t dev = KDEV2DEV(kdev);
+	device_t dev = kdev->si_drv1;
 	struct agp_softc *sc = device_get_softc(dev);
 
 	if (offset > AGP_GET_APERTURE(dev))

==== //depot/projects/vimage-commit2/src/sys/dev/ath/ath_hal/ah.c#6 (text+ko) ====

@@ -14,7 +14,7 @@
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  *
- * $FreeBSD: src/sys/dev/ath/ath_hal/ah.c,v 1.8 2009/03/12 00:09:29 sam Exp $
+ * $FreeBSD: src/sys/dev/ath/ath_hal/ah.c,v 1.9 2009/04/13 21:01:08 sam Exp $
  */
 #include "opt_ah.h"
 
@@ -287,8 +287,7 @@
 				+ (numSymbols * OFDM_QUARTER_SYMBOL_TIME);
 		break;
 	case IEEE80211_T_TURBO:
-		/* we still save OFDM rates in kbps - so double them */
-		bitsPerSymbol = ((kbps << 1) * TURBO_SYMBOL_TIME) / 1000;
+		bitsPerSymbol	= (kbps * TURBO_SYMBOL_TIME) / 1000;
 		HALASSERT(bitsPerSymbol != 0);
 
 		numBits		= TURBO_PLCP_BITS + (frameLen << 3);

==== //depot/projects/vimage-commit2/src/sys/dev/ath/ath_hal/ar5210/ar5210_phy.c#2 (text+ko) ====

@@ -14,7 +14,7 @@
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  *
- * $Id: ar5210_phy.c,v 1.3 2008/11/10 01:19:37 sam Exp $
+ * $FreeBSD: src/sys/dev/ath/ath_hal/ar5210/ar5210_phy.c,v 1.2 2009/04/13 21:01:08 sam Exp $
  */
 #include "opt_ah.h"
 
@@ -50,14 +50,14 @@
 	{
 /*                                                 short            ctrl  */
 /*                valid                rateCode Preamble  dot11Rate Rate */
-/*   6 Mb */ {  AH_TRUE, TURBO,   6000,    0x0b,    0x00, (0x80|12),   0 },
-/*   9 Mb */ {  AH_TRUE, TURBO,   9000,    0x0f,    0x00,        18,   0 },
-/*  12 Mb */ {  AH_TRUE, TURBO,  12000,    0x0a,    0x00, (0x80|24),   2 },
-/*  18 Mb */ {  AH_TRUE, TURBO,  18000,    0x0e,    0x00,        36,   2 },
-/*  24 Mb */ {  AH_TRUE, TURBO,  24000,    0x09,    0x00, (0x80|48),   4 },
-/*  36 Mb */ {  AH_TRUE, TURBO,  36000,    0x0d,    0x00,        72,   4 },
-/*  48 Mb */ {  AH_TRUE, TURBO,  48000,    0x08,    0x00,        96,   4 },
-/*  54 Mb */ {  AH_TRUE, TURBO,  54000,    0x0c,    0x00,       108,   4 }
+/*   6 Mb */ {  AH_TRUE, TURBO,  12000,    0x0b,    0x00, (0x80|12),   0 },
+/*   9 Mb */ {  AH_TRUE, TURBO,  18000,    0x0f,    0x00,        18,   0 },
+/*  12 Mb */ {  AH_TRUE, TURBO,  24000,    0x0a,    0x00, (0x80|24),   2 },
+/*  18 Mb */ {  AH_TRUE, TURBO,  36000,    0x0e,    0x00,        36,   2 },
+/*  24 Mb */ {  AH_TRUE, TURBO,  48000,    0x09,    0x00, (0x80|48),   4 },
+/*  36 Mb */ {  AH_TRUE, TURBO,  72000,    0x0d,    0x00,        72,   4 },
+/*  48 Mb */ {  AH_TRUE, TURBO,  96000,    0x08,    0x00,        96,   4 },
+/*  54 Mb */ {  AH_TRUE, TURBO, 108000,    0x0c,    0x00,       108,   4 }
 	},
 };
 

==== //depot/projects/vimage-commit2/src/sys/dev/ath/ath_hal/ar5211/ar5211_phy.c#2 (text+ko) ====

@@ -14,7 +14,7 @@
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  *
- * $Id: ar5211_phy.c,v 1.3 2008/11/10 01:19:37 sam Exp $
+ * $FreeBSD: src/sys/dev/ath/ath_hal/ar5211/ar5211_phy.c,v 1.2 2009/04/13 21:01:08 sam Exp $
  */
 #include "opt_ah.h"
 
@@ -51,14 +51,14 @@
 	{
 /*                                                 short            ctrl  */
 /*                valid                rateCode Preamble  dot11Rate Rate */
-/*   6 Mb */ {  AH_TRUE, TURBO,   6000,    0x0b,    0x00, (0x80|12),   0 },
-/*   9 Mb */ {  AH_TRUE, TURBO,   9000,    0x0f,    0x00,        18,   0 },
-/*  12 Mb */ {  AH_TRUE, TURBO,  12000,    0x0a,    0x00, (0x80|24),   2 },
-/*  18 Mb */ {  AH_TRUE, TURBO,  18000,    0x0e,    0x00,        36,   2 },
-/*  24 Mb */ {  AH_TRUE, TURBO,  24000,    0x09,    0x00, (0x80|48),   4 },
-/*  36 Mb */ {  AH_TRUE, TURBO,  36000,    0x0d,    0x00,        72,   4 },
-/*  48 Mb */ {  AH_TRUE, TURBO,  48000,    0x08,    0x00,        96,   4 },
-/*  54 Mb */ {  AH_TRUE, TURBO,  54000,    0x0c,    0x00,       108,   4 }
+/*   6 Mb */ {  AH_TRUE, TURBO,  12000,    0x0b,    0x00, (0x80|12),   0 },
+/*   9 Mb */ {  AH_TRUE, TURBO,  18000,    0x0f,    0x00,        18,   0 },
+/*  12 Mb */ {  AH_TRUE, TURBO,  24000,    0x0a,    0x00, (0x80|24),   2 },
+/*  18 Mb */ {  AH_TRUE, TURBO,  36000,    0x0e,    0x00,        36,   2 },
+/*  24 Mb */ {  AH_TRUE, TURBO,  48000,    0x09,    0x00, (0x80|48),   4 },
+/*  36 Mb */ {  AH_TRUE, TURBO,  72000,    0x0d,    0x00,        72,   4 },
+/*  48 Mb */ {  AH_TRUE, TURBO,  96000,    0x08,    0x00,        96,   4 },
+/*  54 Mb */ {  AH_TRUE, TURBO, 108000,    0x0c,    0x00,       108,   4 }
 	},
 };
 

==== //depot/projects/vimage-commit2/src/sys/dev/ath/ath_hal/ar5212/ar5212_phy.c#3 (text+ko) ====

@@ -14,7 +14,7 @@
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  *
- * $FreeBSD: src/sys/dev/ath/ath_hal/ar5212/ar5212_phy.c,v 1.2 2009/02/19 04:24:22 sam Exp $
+ * $FreeBSD: src/sys/dev/ath/ath_hal/ar5212/ar5212_phy.c,v 1.3 2009/04/13 21:01:08 sam Exp $
  */
 #include "opt_ah.h"
 
@@ -87,13 +87,13 @@
 	{
 /*                                                 short            ctrl  */
 /*                valid                rateCode Preamble  dot11Rate Rate */
-/*   6 Mb */ {  AH_TRUE, TURBO,   6000,    0x0b,    0x00, (0x80|12),   0 },
-/*  12 Mb */ {  AH_TRUE, TURBO,  12000,    0x0a,    0x00, (0x80|24),   2 },
-/*  18 Mb */ {  AH_TRUE, TURBO,  18000,    0x0e,    0x00,        36,   2 },
-/*  24 Mb */ {  AH_TRUE, TURBO,  24000,    0x09,    0x00, (0x80|48),   3 },
-/*  36 Mb */ {  AH_TRUE, TURBO,  36000,    0x0d,    0x00,        72,   3 },
-/*  48 Mb */ {  AH_TRUE, TURBO,  48000,    0x08,    0x00,        96,   3 },
-/*  54 Mb */ {  AH_TRUE, TURBO,  54000,    0x0c,    0x00,       108,   3 }
+/*   6 Mb */ {  AH_TRUE, TURBO,  12000,    0x0b,    0x00, (0x80|12),   0 },
+/*  12 Mb */ {  AH_TRUE, TURBO,  24000,    0x0a,    0x00, (0x80|24),   1 },
+/*  18 Mb */ {  AH_TRUE, TURBO,  36000,    0x0e,    0x00,        36,   1 },
+/*  24 Mb */ {  AH_TRUE, TURBO,  48000,    0x09,    0x00, (0x80|48),   2 },
+/*  36 Mb */ {  AH_TRUE, TURBO,  72000,    0x0d,    0x00,        72,   2 },
+/*  48 Mb */ {  AH_TRUE, TURBO,  96000,    0x08,    0x00,        96,   2 },
+/*  54 Mb */ {  AH_TRUE, TURBO, 108000,    0x0c,    0x00,       108,   2 }
 	},
 };
 
@@ -103,14 +103,14 @@
 	{
 /*                                                 short            ctrl  */
 /*                valid                rateCode Preamble  dot11Rate Rate */
-/*   6 Mb */ {  AH_TRUE, TURBO,   6000,    0x0b,    0x00, (0x80|12),   0 },
-/*   9 Mb */ {  AH_TRUE, TURBO,   9000,    0x0f,    0x00,        18,   0 },
-/*  12 Mb */ {  AH_TRUE, TURBO,  12000,    0x0a,    0x00, (0x80|24),   2 },
-/*  18 Mb */ {  AH_TRUE, TURBO,  18000,    0x0e,    0x00,        36,   2 },
-/*  24 Mb */ {  AH_TRUE, TURBO,  24000,    0x09,    0x00, (0x80|48),   4 },
-/*  36 Mb */ {  AH_TRUE, TURBO,  36000,    0x0d,    0x00,        72,   4 },
-/*  48 Mb */ {  AH_TRUE, TURBO,  48000,    0x08,    0x00,        96,   4 },
-/*  54 Mb */ {  AH_TRUE, TURBO,  54000,    0x0c,    0x00,       108,   4 }
+/*   6 Mb */ {  AH_TRUE, TURBO,  12000,    0x0b,    0x00, (0x80|12),   0 },
+/*   9 Mb */ {  AH_TRUE, TURBO,  18000,    0x0f,    0x00,        18,   0 },
+/*  12 Mb */ {  AH_TRUE, TURBO,  24000,    0x0a,    0x00, (0x80|24),   2 },
+/*  18 Mb */ {  AH_TRUE, TURBO,  36000,    0x0e,    0x00,        36,   2 },
+/*  24 Mb */ {  AH_TRUE, TURBO,  48000,    0x09,    0x00, (0x80|48),   4 },
+/*  36 Mb */ {  AH_TRUE, TURBO,  72000,    0x0d,    0x00,        72,   4 },
+/*  48 Mb */ {  AH_TRUE, TURBO,  96000,    0x08,    0x00,        96,   4 },
+/*  54 Mb */ {  AH_TRUE, TURBO, 108000,    0x0c,    0x00,       108,   4 }
 	},
 };
 

==== //depot/projects/vimage-commit2/src/sys/dev/ath/ath_rate/sample/sample.c#5 (text+ko) ====

@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ath/ath_rate/sample/sample.c,v 1.29 2009/01/07 23:30:26 sam Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ath/ath_rate/sample/sample.c,v 1.30 2009/04/13 20:54:08 sam Exp $");
 
 /*
  * John Bicket's SampleRate control algorithm.
@@ -766,6 +766,15 @@
 				sn->static_rix = sc->sc_rixmap[tp->ucastrate];
 				break;
 			}
+#ifdef IEEE80211_DEBUG
+			if (sn->static_rix == -1) {
+				IEEE80211_NOTE(ni->ni_vap,
+				    IEEE80211_MSG_RATECTL, ni,
+				    "%s: ucastrate %u not found, nrates %u",
+				    __func__, tp->ucastrate,
+				    ni->ni_rates.rs_nrates);
+			}
+#endif
 	}
 
 	/*

==== //depot/projects/vimage-commit2/src/sys/dev/ath/if_ath.c#12 (text+ko) ====

@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.245 2009/03/30 21:53:27 sam Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.248 2009/04/13 20:58:47 sam Exp $");
 
 /*
  * Driver for the Atheros Wireless LAN controller.
@@ -4773,8 +4773,8 @@
 	m0->m_nextpkt = NULL;
 
 	if (IFF_DUMPPKTS(sc, ATH_DEBUG_XMIT))
-		ieee80211_dump_pkt(ic, mtod(m0, caddr_t), m0->m_len,
-			sc->sc_hwmap[rix].ieeerate, -1);
+		ieee80211_dump_pkt(ic, mtod(m0, const uint8_t *), m0->m_len,
+		    sc->sc_hwmap[rix].ieeerate, -1);
 
 	if (bpf_peers_present(ifp->if_bpf)) {
 		u_int64_t tsf = ath_hal_gettsf64(ah);
@@ -5118,8 +5118,8 @@
 			ath_printtxbuf(sc, bf, txq->axq_qnum, ix,
 				ath_hal_txprocdesc(ah, bf->bf_desc,
 				    &bf->bf_status.ds_txstat) == HAL_OK);
-			ieee80211_dump_pkt(ic, mtod(bf->bf_m, caddr_t),
-				bf->bf_m->m_len, 0, -1);
+			ieee80211_dump_pkt(ic, mtod(bf->bf_m, const uint8_t *),
+			    bf->bf_m->m_len, 0, -1);
 		}
 #endif /* ATH_DEBUG */
 		bus_dmamap_unload(sc->sc_dmat, bf->bf_dmamap);
@@ -5187,8 +5187,9 @@
 			ath_printtxbuf(sc, bf, sc->sc_bhalq, 0,
 				ath_hal_txprocdesc(ah, bf->bf_desc,
 				    &bf->bf_status.ds_txstat) == HAL_OK);
-			ieee80211_dump_pkt(ifp->if_l2com, mtod(bf->bf_m, caddr_t),
-				bf->bf_m->m_len, 0, -1);
+			ieee80211_dump_pkt(ifp->if_l2com,
+			    mtod(bf->bf_m, const uint8_t *), bf->bf_m->m_len,
+			    0, -1);
 		}
 	}
 #endif /* ATH_DEBUG */
@@ -6783,7 +6784,7 @@
 
 	if (IFF_DUMPPKTS(sc, ATH_DEBUG_XMIT))
 		ieee80211_dump_pkt(ic, mtod(m0, caddr_t), m0->m_len,
-			sc->sc_hwmap[rix].ieeerate, -1);
+		    sc->sc_hwmap[rix].ieeerate, -1);
 	
 	if (bpf_peers_present(ifp->if_bpf)) {
 		u_int64_t tsf = ath_hal_gettsf64(ah);
@@ -6987,7 +6988,6 @@
 {
 	/* copy from vap state (XXX check all vaps have same value?) */
 	sc->sc_tdmaslotlen = tdma->tdma_slotlen;
-	sc->sc_tdmabintcnt = tdma->tdma_bintval;
 
 	sc->sc_tdmabintval = roundup((sc->sc_tdmaslotlen+sc->sc_tdmaguard) *
 		tdma->tdma_slotcnt, 1024);
@@ -7121,6 +7121,8 @@
 		const struct ieee80211_tdma_state *ts = vap->iv_tdma;
 
 		ath_tdma_bintvalsetup(sc, ts);
+		if (changed & TDMA_UPDATE_SLOTLEN)
+			ath_wme_update(ic);
 
 		DPRINTF(sc, ATH_DEBUG_TDMA,
 		    "%s: adopt slot %u slotcnt %u slotlen %u us "
@@ -7128,7 +7130,6 @@
 		    ts->tdma_slot, ts->tdma_slotcnt, ts->tdma_slotlen,
 		    sc->sc_tdmabintval);
 
-		ath_beaconq_config(sc);
 		/* XXX right? */
 		ath_hal_intrset(ah, sc->sc_imask);
 		/* NB: beacon timers programmed below */

==== //depot/projects/vimage-commit2/src/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c#19 (text+ko) ====

@@ -28,7 +28,7 @@
 ***************************************************************************/
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c,v 1.29 2008/12/17 12:52:34 bz Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c,v 1.30 2009/04/11 22:07:19 rwatson Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -3829,7 +3829,7 @@
 #endif
 
 	toep->tp_state = tp->t_state;
-	V_tcpstat.tcps_connects++;
+	TCPSTAT_INC(tcps_connects);
 				
 }
 

==== //depot/projects/vimage-commit2/src/sys/dev/e1000/if_em.c#6 (text+ko) ====

@@ -30,7 +30,7 @@
   POSSIBILITY OF SUCH DAMAGE.
 
 ******************************************************************************/
-/*$FreeBSD: src/sys/dev/e1000/if_em.c,v 1.5 2009/04/10 00:05:46 jfv Exp $*/
+/*$FreeBSD: src/sys/dev/e1000/if_em.c,v 1.6 2009/04/14 03:36:59 kmacy Exp $*/
 
 #ifdef HAVE_KERNEL_OPTION_HEADERS
 #include "opt_device_polling.h"
@@ -39,6 +39,7 @@
 
 #include <sys/param.h>
 #include <sys/systm.h>
+#include <sys/buf_ring.h>
 #include <sys/bus.h>
 #include <sys/endian.h>
 #include <sys/kernel.h>
@@ -897,6 +898,9 @@
 	bus_generic_detach(dev);
 	if_free(ifp);
 
+#ifdef IFNET_BUF_RING
+	drbr_free(adapter->br, M_DEVBUF);
+#endif
 	em_free_transmit_structures(adapter);
 	em_free_receive_structures(adapter);
 
@@ -991,6 +995,69 @@
  *  the packet is requeued.
  **********************************************************************/
 
+#ifdef IFNET_BUF_RING
+static int
+em_transmit_locked(struct ifnet *ifp, struct mbuf *m)
+{
+	struct adapter	*adapter = ifp->if_softc;
+	int error;
+
+	EM_TX_LOCK_ASSERT(adapter);
+	if (((ifp->if_drv_flags & (IFF_DRV_RUNNING|IFF_DRV_OACTIVE)) !=
+	    IFF_DRV_RUNNING)
+	    || (!adapter->link_active)) {
+		error = drbr_enqueue(ifp, adapter->br, m);
+		return (error);
+	}
+	
+	if (ADAPTER_RING_EMPTY(adapter) &&
+	    (adapter->num_tx_desc_avail > EM_TX_OP_THRESHOLD)) {
+		if (em_xmit(adapter, &m)) {
+			if (m && (error = drbr_enqueue(ifp, adapter->br, m)) != 0) {
+				return (error);
+			}
+		} else{
+			/* Send a copy of the frame to the BPF listener */
+			ETHER_BPF_MTAP(ifp, m);
+		}
+	} else if ((error = drbr_enqueue(ifp, adapter->br, m)) != 0)
+		return (error);
+	
+	if (!ADAPTER_RING_EMPTY(adapter))
+		em_start_locked(ifp);
+
+	return (0);
+}
+	
+static int
+em_transmit(struct ifnet *ifp, struct mbuf *m)
+{
+	
+	struct adapter *adapter = ifp->if_softc;
+	int error = 0;
+
+	if(EM_TX_TRYLOCK(adapter)) {
+		if (ifp->if_drv_flags & IFF_DRV_RUNNING)
+			error = em_transmit_locked(ifp, m);
+		EM_TX_UNLOCK(adapter);
+	} else 
+		error = drbr_enqueue(ifp, adapter->br, m);
+

>>> TRUNCATED FOR MAIL (1000 lines) <<<



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