From owner-svn-src-user@FreeBSD.ORG  Sun Feb  1 01:04:33 2009
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4693D1065773;
	Sun,  1 Feb 2009 01:04:33 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 30EEC8FC14;
	Sun,  1 Feb 2009 01:04:33 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n1114XF6038811;
	Sun, 1 Feb 2009 01:04:33 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n1114V07038779;
	Sun, 1 Feb 2009 01:04:31 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <200902010104.n1114V07038779@svn.freebsd.org>
From: Andrew Thompson <thompsa@FreeBSD.org>
Date: Sun, 1 Feb 2009 01:04:31 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r187971 - in user/thompsa/usb: . bin/dd contrib/opie
	contrib/wpa_supplicant etc etc/rc.d gnu/usr.bin/grep include
	lib/libc/db/man libexec/ftpd sbin/fsck sbin/fsck_ffs
	sbin/ifconfig sbin...
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 01 Feb 2009 01:04:33 -0000

Author: thompsa
Date: Sun Feb  1 01:04:31 2009
New Revision: 187971
URL: http://svn.freebsd.org/changeset/base/187971

Log:
  MFH r187836-187970

Added:
  user/thompsa/usb/usr.sbin/bluetooth/btpand/
     - copied from r187970, head/usr.sbin/bluetooth/btpand/
Deleted:
  user/thompsa/usb/share/man/man8/adding_user.8
Modified:
  user/thompsa/usb/   (props changed)
  user/thompsa/usb/bin/dd/dd.1
  user/thompsa/usb/contrib/opie/opiekey.1
  user/thompsa/usb/contrib/wpa_supplicant/   (props changed)
  user/thompsa/usb/etc/rc.d/defaultroute
  user/thompsa/usb/etc/rc.d/ntpd
  user/thompsa/usb/etc/regdomain.xml
  user/thompsa/usb/gnu/usr.bin/grep/savedir.c
  user/thompsa/usb/include/paths.h
  user/thompsa/usb/include/stdlib.h
  user/thompsa/usb/include/string.h
  user/thompsa/usb/include/wchar.h
  user/thompsa/usb/lib/libc/db/man/dbm.3
  user/thompsa/usb/libexec/ftpd/ftpd.8
  user/thompsa/usb/sbin/fsck/fsck.8
  user/thompsa/usb/sbin/fsck/fsck.c
  user/thompsa/usb/sbin/fsck/fsutil.h
  user/thompsa/usb/sbin/fsck_ffs/fsck.h
  user/thompsa/usb/sbin/fsck_ffs/fsck_ffs.8
  user/thompsa/usb/sbin/fsck_ffs/main.c
  user/thompsa/usb/sbin/fsck_ffs/setup.c
  user/thompsa/usb/sbin/ifconfig/ifieee80211.c
  user/thompsa/usb/sbin/reboot/reboot.c
  user/thompsa/usb/share/man/man4/ng_bpf.4
  user/thompsa/usb/share/man/man5/rc.conf.5
  user/thompsa/usb/share/man/man7/Makefile
  user/thompsa/usb/share/man/man8/Makefile
  user/thompsa/usb/share/misc/committers-src.dot
  user/thompsa/usb/sys/   (props changed)
  user/thompsa/usb/sys/amd64/amd64/cpu_switch.S
  user/thompsa/usb/sys/amd64/amd64/fpu.c
  user/thompsa/usb/sys/amd64/amd64/io_apic.c
  user/thompsa/usb/sys/amd64/amd64/local_apic.c
  user/thompsa/usb/sys/amd64/amd64/mp_machdep.c
  user/thompsa/usb/sys/amd64/amd64/msi.c
  user/thompsa/usb/sys/amd64/ia32/ia32_signal.c
  user/thompsa/usb/sys/amd64/ia32/ia32_sigtramp.S
  user/thompsa/usb/sys/amd64/include/apicvar.h
  user/thompsa/usb/sys/amd64/include/cpufunc.h
  user/thompsa/usb/sys/amd64/include/fpu.h
  user/thompsa/usb/sys/amd64/include/intr_machdep.h
  user/thompsa/usb/sys/amd64/linux32/linux32_locore.s
  user/thompsa/usb/sys/amd64/linux32/linux32_sysvec.c
  user/thompsa/usb/sys/arm/arm/busdma_machdep.c
  user/thompsa/usb/sys/arm/arm/cpufunc_asm_sheeva.S   (props changed)
  user/thompsa/usb/sys/boot/i386/pxeldr/pxeboot.8
  user/thompsa/usb/sys/cam/scsi/scsi_pass.c
  user/thompsa/usb/sys/compat/ndis/winx32_wrap.S
  user/thompsa/usb/sys/contrib/pf/   (props changed)
  user/thompsa/usb/sys/dev/adb/adb_mouse.c
  user/thompsa/usb/sys/dev/mmc/mmc.c
  user/thompsa/usb/sys/dev/sdhci/sdhci.c
  user/thompsa/usb/sys/dev/sound/pci/hda/hdac.c
  user/thompsa/usb/sys/dev/usb/ehci_ixp4xx.c   (props changed)
  user/thompsa/usb/sys/dev/usb2/bluetooth/ng_ubt2.c
  user/thompsa/usb/sys/dev/usb2/bluetooth/ubtbcmfw2.c
  user/thompsa/usb/sys/fs/cd9660/cd9660_lookup.c
  user/thompsa/usb/sys/fs/cd9660/cd9660_node.c
  user/thompsa/usb/sys/fs/cd9660/cd9660_node.h
  user/thompsa/usb/sys/fs/cd9660/cd9660_vfsops.c
  user/thompsa/usb/sys/fs/cd9660/cd9660_vnops.c
  user/thompsa/usb/sys/fs/coda/coda_vfsops.c
  user/thompsa/usb/sys/fs/devfs/devfs_devs.c
  user/thompsa/usb/sys/fs/devfs/devfs_vnops.c
  user/thompsa/usb/sys/fs/hpfs/hpfs_vfsops.c
  user/thompsa/usb/sys/fs/nullfs/null_vnops.c
  user/thompsa/usb/sys/fs/nwfs/nwfs_subr.c
  user/thompsa/usb/sys/fs/nwfs/nwfs_vnops.c
  user/thompsa/usb/sys/fs/smbfs/smbfs_vnops.c
  user/thompsa/usb/sys/fs/tmpfs/tmpfs_subr.c
  user/thompsa/usb/sys/fs/udf/udf_vnops.c
  user/thompsa/usb/sys/i386/i386/io_apic.c
  user/thompsa/usb/sys/i386/i386/local_apic.c
  user/thompsa/usb/sys/i386/i386/locore.s
  user/thompsa/usb/sys/i386/i386/mp_machdep.c
  user/thompsa/usb/sys/i386/i386/msi.c
  user/thompsa/usb/sys/i386/i386/swtch.s
  user/thompsa/usb/sys/i386/include/apicvar.h
  user/thompsa/usb/sys/i386/include/cpufunc.h
  user/thompsa/usb/sys/i386/include/intr_machdep.h
  user/thompsa/usb/sys/i386/linux/linux_locore.s
  user/thompsa/usb/sys/i386/svr4/svr4_locore.s
  user/thompsa/usb/sys/i386/xen/mp_machdep.c
  user/thompsa/usb/sys/kern/kern_jail.c
  user/thompsa/usb/sys/kern/kern_mib.c
  user/thompsa/usb/sys/kern/kern_sysctl.c
  user/thompsa/usb/sys/kern/tty_info.c
  user/thompsa/usb/sys/kern/vfs_cache.c
  user/thompsa/usb/sys/mips/mips/elf64_machdep.c   (props changed)
  user/thompsa/usb/sys/modules/usb2/controller_atmegadci/   (props changed)
  user/thompsa/usb/sys/net/if_llatbl.c
  user/thompsa/usb/sys/net80211/ieee80211.c
  user/thompsa/usb/sys/net80211/ieee80211_node.c
  user/thompsa/usb/sys/net80211/ieee80211_tdma.c
  user/thompsa/usb/sys/netinet6/frag6.c
  user/thompsa/usb/sys/netinet6/in6.c
  user/thompsa/usb/sys/netinet6/in6_gif.c
  user/thompsa/usb/sys/netinet6/in6_ifattach.c
  user/thompsa/usb/sys/netinet6/ip6_forward.c
  user/thompsa/usb/sys/netinet6/ip6_input.c
  user/thompsa/usb/sys/netinet6/ip6_var.h
  user/thompsa/usb/sys/netinet6/nd6.c
  user/thompsa/usb/sys/netinet6/nd6_nbr.c
  user/thompsa/usb/sys/netinet6/nd6_rtr.c
  user/thompsa/usb/sys/netinet6/vinet6.h
  user/thompsa/usb/sys/netipsec/ipsec_output.c
  user/thompsa/usb/sys/sys/_null.h
  user/thompsa/usb/sys/sys/cdefs.h
  user/thompsa/usb/sys/sys/malloc.h
  user/thompsa/usb/sys/sys/unistd.h
  user/thompsa/usb/sys/ufs/ffs/ffs_vfsops.c
  user/thompsa/usb/tools/regression/lib/libc/stdio/test-printfloat.c
  user/thompsa/usb/tools/regression/lib/msun/Makefile
  user/thompsa/usb/tools/tools/ath/athrd/athrd.1
  user/thompsa/usb/tools/tools/ath/athrd/athrd.c
  user/thompsa/usb/tools/tools/ath/athstats/Makefile
  user/thompsa/usb/usr.bin/sockstat/sockstat.c
  user/thompsa/usb/usr.sbin/crunch/crunchgen/crunchgen.c
  user/thompsa/usb/usr.sbin/gssd/gssd.8
  user/thompsa/usb/usr.sbin/makefs/ffs/ffs_bswap.c   (props changed)
  user/thompsa/usb/usr.sbin/makefs/ffs/ffs_subr.c   (props changed)
  user/thompsa/usb/usr.sbin/makefs/ffs/ufs_bswap.h   (props changed)
  user/thompsa/usb/usr.sbin/makefs/getid.c   (props changed)
  user/thompsa/usb/usr.sbin/mtree/create.c
  user/thompsa/usb/usr.sbin/mtree/mtree.5
  user/thompsa/usb/usr.sbin/mtree/mtree.8
  user/thompsa/usb/usr.sbin/mtree/spec.c

Modified: user/thompsa/usb/bin/dd/dd.1
==============================================================================
--- user/thompsa/usb/bin/dd/dd.1	Sun Feb  1 00:51:25 2009	(r187970)
+++ user/thompsa/usb/bin/dd/dd.1	Sun Feb  1 01:04:31 2009	(r187971)
@@ -32,7 +32,7 @@
 .\"     @(#)dd.1	8.2 (Berkeley) 1/13/94
 .\" $FreeBSD$
 .\"
-.Dd August 15, 2004
+.Dd January 23, 2009
 .Dt DD 1
 .Os
 .Sh NAME

Modified: user/thompsa/usb/contrib/opie/opiekey.1
==============================================================================
--- user/thompsa/usb/contrib/opie/opiekey.1	Sun Feb  1 00:51:25 2009	(r187970)
+++ user/thompsa/usb/contrib/opie/opiekey.1	Sun Feb  1 01:04:31 2009	(r187971)
@@ -157,8 +157,7 @@ this mistake. Better checks are needed.
 .BR opieinfo (1),
 .BR opiekeys (5),
 .BR opieaccess (5),
-.BR opiegen (1)
-.BR su (1),
+.BR su (1)
 
 .SH AUTHOR
 Bellcore's S/Key was written by Phil Karn, Neil M. Haller, and John S. Walden

Modified: user/thompsa/usb/etc/rc.d/defaultroute
==============================================================================
--- user/thompsa/usb/etc/rc.d/defaultroute	Sun Feb  1 00:51:25 2009	(r187970)
+++ user/thompsa/usb/etc/rc.d/defaultroute	Sun Feb  1 01:04:31 2009	(r187971)
@@ -21,7 +21,6 @@ defaultroute_start()
 	# Return without waiting if we don't have dhcp interfaces.
 	# Once we can test that the link is actually up, we should
 	# remove this test and always wait.
-	dhcp_interfaces=`list_net_interfaces dhcp`
 	[ -z "`list_net_interfaces dhcp`" ] && return
 
 	# Wait for a default route

Modified: user/thompsa/usb/etc/rc.d/ntpd
==============================================================================
--- user/thompsa/usb/etc/rc.d/ntpd	Sun Feb  1 00:51:25 2009	(r187970)
+++ user/thompsa/usb/etc/rc.d/ntpd	Sun Feb  1 01:04:31 2009	(r187971)
@@ -23,7 +23,7 @@ ntpd_precmd()
 	rc_flags="-c ${ntpd_config} ${ntpd_flags}"
 
 	if checkyesno ntpd_sync_on_start; then
-		rc_flags="-q -g $rc_flags"
+		rc_flags="-g $rc_flags"
 	fi
 
 	if [ -z "$ntpd_chrootdir" ]; then

Modified: user/thompsa/usb/etc/regdomain.xml
==============================================================================
--- user/thompsa/usb/etc/regdomain.xml	Sun Feb  1 00:51:25 2009	(r187970)
+++ user/thompsa/usb/etc/regdomain.xml	Sun Feb  1 01:04:31 2009	(r187971)
@@ -1133,7 +1133,6 @@
 <rd id="sr9">
   <name>SR9</name>
   <sku>0x0298</sku>
-  <defcc ref="SR9"/>
   <netband mode="11g">
     <band>
       <freqband ref="S1_907_922_5"/>
@@ -1156,20 +1155,19 @@
 <rd id="xr9">
   <name>XR9</name>
   <sku>0x299</sku>
-  <defcc ref="XR9"/>
   <netband mode="11g">
     <band>
-      <freqband ref="S2_907_922_5"/>
+      <freqband ref="S1_907_922_5"/>
       <maxpower>30</maxpower>
       <flags>IEEE80211_CHAN_G</flags>
     </band>
     <band>
-      <freqband ref="S2_907_922_10"/>
+      <freqband ref="S1_907_922_10"/>
       <maxpower>30</maxpower>
       <flags>IEEE80211_CHAN_G</flags>
     </band>
     <band>
-      <freqband ref="S2_912_917"/>
+      <freqband ref="S1_912_917"/>
       <maxpower>30</maxpower>
       <flags>IEEE80211_CHAN_G</flags>
     </band>
@@ -1179,7 +1177,6 @@
 <rd id="gz901">
   <name>GZ901</name>
   <sku>0x29a</sku>
-  <defcc ref="GZ901"/>
   <netband mode="11g">
     <band>
       <freqband ref="S1_908_923_5"/>
@@ -1319,9 +1316,6 @@
 <country id="GT">
   <isocc>320</isocc> <name>Guatemala</name> <rd ref="none"/>
 </country>
-<country id="GZ901">
-  <isocc>5002</isocc> <name>ZComax GZ-901</name> <rd ref="gz901"/>
-</country>
 <country id="HN">
   <isocc>340</isocc> <name>Honduras</name> <rd ref="none"/>
 </country>
@@ -1517,12 +1511,6 @@
 <country id="TR">
   <isocc>792</isocc> <name>Turkey</name> <rd ref="etsi"/>
 </country>
-<country id="SR9">
-  <isocc>5000</isocc> <name>Ubiquiti SR9</name> <rd ref="sr9"/>
-</country>
-<country id="XR9">
-  <isocc>5001</isocc> <name>Ubiquiti XR9</name> <rd ref="xr9"/>
-</country>
 <country id="UA">
   <isocc>804</isocc> <name>Ukraine</name> <rd ref="none"/>
 </country>
@@ -1725,55 +1713,37 @@
 </freqband>
 
 <freqband id="S1_907_922_5">
-  <freqstart>2422</freqstart> <freqend>2437</freqend>
+  <freqstart>907</freqstart> <freqend>922</freqend>
   <chanwidth>5</chanwidth> <chansep>5</chansep>
   <flags>IEEE80211_CHAN_GSM</flags>
   <flags>IEEE80211_CHAN_QUARTER</flags>
 </freqband>
 <freqband id="S1_907_922_10">
-  <freqstart>2422</freqstart> <freqend>2437</freqend>
+  <freqstart>907</freqstart> <freqend>922</freqend>
   <chanwidth>10</chanwidth> <chansep>5</chansep>
   <flags>IEEE80211_CHAN_GSM</flags>
   <flags>IEEE80211_CHAN_HALF</flags>
 </freqband>
 <freqband id="S1_912_917">
-  <freqstart>2427</freqstart> <freqend>2432</freqend>
-  <chanwidth>20</chanwidth> <chansep>5</chansep>
-  <flags>IEEE80211_CHAN_GSM</flags>
-</freqband>
-
-<freqband id="S2_907_922_5">
-  <freqstart>2427</freqstart> <freqend>2442</freqend>
-  <chanwidth>5</chanwidth> <chansep>5</chansep>
-  <flags>IEEE80211_CHAN_GSM</flags>
-  <flags>IEEE80211_CHAN_QUARTER</flags>
-</freqband>
-<freqband id="S2_907_922_10">
-  <freqstart>2427</freqstart> <freqend>2442</freqend>
-  <chanwidth>10</chanwidth> <chansep>5</chansep>
-  <flags>IEEE80211_CHAN_GSM</flags>
-  <flags>IEEE80211_CHAN_HALF</flags>
-</freqband>
-<freqband id="S2_912_917">
-  <freqstart>2432</freqstart> <freqend>2437</freqend>
+  <freqstart>912</freqstart> <freqend>917</freqend>
   <chanwidth>20</chanwidth> <chansep>5</chansep>
   <flags>IEEE80211_CHAN_GSM</flags>
 </freqband>
 
 <freqband id="S1_908_923_5">
-  <freqstart>2447</freqstart> <freqend>2467</freqend>
+  <freqstart>908</freqstart> <freqend>923</freqend>
   <chanwidth>5</chanwidth> <chansep>5</chansep>
   <flags>IEEE80211_CHAN_GSM</flags>
   <flags>IEEE80211_CHAN_QUARTER</flags>
 </freqband>
 <freqband id="S1_913_918_10">
-  <freqstart>2457</freqstart> <freqend>2462</freqend>
+  <freqstart>913</freqstart> <freqend>918</freqend>
   <chanwidth>10</chanwidth> <chansep>5</chansep>
   <flags>IEEE80211_CHAN_GSM</flags>
   <flags>IEEE80211_CHAN_HALF</flags>
 </freqband>
 <freqband id="S1_913_918">
-  <freqstart>2457</freqstart> <freqend>2462</freqend>
+  <freqstart>913</freqstart> <freqend>918</freqend>
   <chanwidth>20</chanwidth> <chansep>5</chansep>
   <flags>IEEE80211_CHAN_GSM</flags>
 </freqband>

Modified: user/thompsa/usb/gnu/usr.bin/grep/savedir.c
==============================================================================
--- user/thompsa/usb/gnu/usr.bin/grep/savedir.c	Sun Feb  1 00:51:25 2009	(r187970)
+++ user/thompsa/usb/gnu/usr.bin/grep/savedir.c	Sun Feb  1 01:04:31 2009	(r187971)
@@ -17,6 +17,9 @@
 
 /* Written by David MacKenzie <djm@gnu.ai.mit.edu>. */
 
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
 #if HAVE_CONFIG_H
 # include <config.h>
 #endif
@@ -137,10 +140,10 @@ savedir (const char *dir, off_t name_siz
 	      && !isdir1 (dir, dp->d_name))
 	    {
 	      if (included_patterns
-		  && !excluded_filename (included_patterns, dp->d_name, 0))
+		  && !excluded_filename (included_patterns, path, 0))
 		continue;
 	      if (excluded_patterns
-		  && excluded_filename (excluded_patterns, dp->d_name, 0))
+		  && excluded_filename (excluded_patterns, path, 0))
 		continue;
 	    }
 

Modified: user/thompsa/usb/include/paths.h
==============================================================================
--- user/thompsa/usb/include/paths.h	Sun Feb  1 00:51:25 2009	(r187970)
+++ user/thompsa/usb/include/paths.h	Sun Feb  1 01:04:31 2009	(r187971)
@@ -42,10 +42,9 @@
 /* Default search path. */
 #define	_PATH_DEFPATH	"/usr/bin:/bin"
 /* All standard utilities path. */
-#define	_PATH_STDPATH \
-	"/usr/bin:/bin:/usr/sbin:/sbin:"
-/* Locate system binaries */
-#define _PATH_SYSPATH	"/sbin:/usr/sbin"
+#define	_PATH_STDPATH	"/usr/bin:/bin:/usr/sbin:/sbin:"
+/* Locate system binaries. */
+#define	_PATH_SYSPATH	"/sbin:/usr/sbin"
 
 #define	_PATH_AUTHCONF	"/etc/auth.conf"
 #define	_PATH_BSHELL	"/bin/sh"

Modified: user/thompsa/usb/include/stdlib.h
==============================================================================
--- user/thompsa/usb/include/stdlib.h	Sun Feb  1 00:51:25 2009	(r187970)
+++ user/thompsa/usb/include/stdlib.h	Sun Feb  1 01:04:31 2009	(r187971)
@@ -88,14 +88,14 @@ int	 atoi(const char *);
 long	 atol(const char *);
 void	*bsearch(const void *, const void *, size_t,
 	    size_t, int (*)(const void *, const void *));
-void	*calloc(size_t, size_t);
+void	*calloc(size_t, size_t) __malloc_like;
 div_t	 div(int, int) __pure2;
 void	 exit(int) __dead2;
 void	 free(void *);
 char	*getenv(const char *);
 long	 labs(long) __pure2;
 ldiv_t	 ldiv(long, long) __pure2;
-void	*malloc(size_t);
+void	*malloc(size_t) __malloc_like;
 int	 mblen(const char *, size_t);
 size_t	 mbstowcs(wchar_t * __restrict , const char * __restrict, size_t);
 int	 mbtowc(wchar_t * __restrict, const char * __restrict, size_t);

Modified: user/thompsa/usb/include/string.h
==============================================================================
--- user/thompsa/usb/include/string.h	Sun Feb  1 00:51:25 2009	(r187970)
+++ user/thompsa/usb/include/string.h	Sun Feb  1 01:04:31 2009	(r187971)
@@ -78,7 +78,7 @@ int	 strcoll(const char *, const char *)
 char	*strcpy(char * __restrict, const char * __restrict);
 size_t	 strcspn(const char *, const char *) __pure;
 #if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE
-char	*strdup(const char *);
+char	*strdup(const char *) __malloc_like;
 #endif
 char	*strerror(int);
 #if __POSIX_VISIBLE >= 200112
@@ -96,7 +96,7 @@ char	*strncat(char * __restrict, const c
 int	 strncmp(const char *, const char *, size_t) __pure;
 char	*strncpy(char * __restrict, const char * __restrict, size_t);
 #if __BSD_VISIBLE
-char	*strndup(const char *, size_t);
+char	*strndup(const char *, size_t) __malloc_like;
 char	*strnstr(const char *, const char *, size_t) __pure;
 #endif
 char	*strpbrk(const char *, const char *) __pure;

Modified: user/thompsa/usb/include/wchar.h
==============================================================================
--- user/thompsa/usb/include/wchar.h	Sun Feb  1 00:51:25 2009	(r187970)
+++ user/thompsa/usb/include/wchar.h	Sun Feb  1 01:04:31 2009	(r187971)
@@ -214,7 +214,7 @@ int	wcwidth(wchar_t);
 wchar_t	*fgetwln(struct __sFILE * __restrict, size_t * __restrict);
 size_t	mbsnrtowcs(wchar_t * __restrict, const char ** __restrict, size_t,
 	    size_t, mbstate_t * __restrict);
-wchar_t	*wcsdup(const wchar_t *);
+wchar_t	*wcsdup(const wchar_t *) __malloc_like;
 size_t	wcsnrtombs(char * __restrict, const wchar_t ** __restrict, size_t,
 	    size_t, mbstate_t * __restrict);
 size_t	wcslcat(wchar_t *, const wchar_t *, size_t);

Modified: user/thompsa/usb/lib/libc/db/man/dbm.3
==============================================================================
--- user/thompsa/usb/lib/libc/db/man/dbm.3	Sun Feb  1 00:51:25 2009	(r187970)
+++ user/thompsa/usb/lib/libc/db/man/dbm.3	Sun Feb  1 01:04:31 2009	(r187971)
@@ -15,8 +15,6 @@
 .\"
 .\" $FreeBSD$
 .\"
-.\" Note: The date here should be updated whenever a non-trivial
-.\" change is made to the manual page.
 .Dd April 16, 2006
 .Dt DBM 3
 .Os

Modified: user/thompsa/usb/libexec/ftpd/ftpd.8
==============================================================================
--- user/thompsa/usb/libexec/ftpd/ftpd.8	Sun Feb  1 00:51:25 2009	(r187970)
+++ user/thompsa/usb/libexec/ftpd/ftpd.8	Sun Feb  1 01:04:31 2009	(r187971)
@@ -205,7 +205,7 @@ for more information.
 Note that option is a virtual no-op in
 .Fx 5.0
 and above; both port
-ranges are indentical by default.
+ranges are identical by default.
 .It Fl u
 The default file creation mode mask is set to
 .Ar umask ,

Modified: user/thompsa/usb/sbin/fsck/fsck.8
==============================================================================
--- user/thompsa/usb/sbin/fsck/fsck.8	Sun Feb  1 00:51:25 2009	(r187970)
+++ user/thompsa/usb/sbin/fsck/fsck.8	Sun Feb  1 01:04:31 2009	(r187971)
@@ -29,7 +29,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd April 25, 2001
+.Dd January 25, 2009
 .Dt FSCK 8
 .Os
 .Sh NAME
@@ -37,7 +37,7 @@
 .Nd file system consistency check and interactive repair
 .Sh SYNOPSIS
 .Nm
-.Op Fl dfnpvy
+.Op Fl Cdfnpvy
 .Op Fl B | F
 .Op Fl T Ar fstype : Ns Ar fsoptions
 .Op Fl t Ar fstype
@@ -112,6 +112,11 @@ to be the partition and slice designator
 .Pp
 The options are as follows:
 .Bl -tag -width indent
+.It Fl C
+Check if the
+.Dq clean
+flag is set in the superblock and skip file system checks if file system was
+properly dismounted and marked clean.
 .It Fl d
 Debugging mode.
 Just print the commands without executing them.

Modified: user/thompsa/usb/sbin/fsck/fsck.c
==============================================================================
--- user/thompsa/usb/sbin/fsck/fsck.c	Sun Feb  1 00:51:25 2009	(r187970)
+++ user/thompsa/usb/sbin/fsck/fsck.c	Sun Feb  1 01:04:31 2009	(r187971)
@@ -103,7 +103,7 @@ main(int argc, char *argv[])
 	TAILQ_INIT(&selhead);
 	TAILQ_INIT(&opthead);
 
-	while ((i = getopt(argc, argv, "BdvpfFnyl:t:T:")) != -1)
+	while ((i = getopt(argc, argv, "BCdvpfFnyl:t:T:")) != -1)
 		switch (i) {
 		case 'B':
 			if (flags & CHECK_BACKGRD)
@@ -128,6 +128,9 @@ main(int argc, char *argv[])
 		case 'p':
 			flags |= CHECK_PREEN;
 			/*FALLTHROUGH*/
+		case 'C':
+			flags |= CHECK_CLEAN;
+			/*FALLTHROUGH*/
 		case 'n':
 		case 'y':
 			globopt[1] = i;
@@ -566,7 +569,7 @@ static void
 usage(void)
 {
 	static const char common[] =
-	    "[-dfnpvy] [-B | -F] [-T fstype:fsoptions] [-t fstype]";
+	    "[-Cdfnpvy] [-B | -F] [-T fstype:fsoptions] [-t fstype]";
 
 	(void)fprintf(stderr, "usage: %s %s [special | node] ...\n",
 	    getprogname(), common);

Modified: user/thompsa/usb/sbin/fsck/fsutil.h
==============================================================================
--- user/thompsa/usb/sbin/fsck/fsutil.h	Sun Feb  1 00:51:25 2009	(r187970)
+++ user/thompsa/usb/sbin/fsck/fsutil.h	Sun Feb  1 01:04:31 2009	(r187971)
@@ -48,6 +48,7 @@ char *estrdup(const char *);
 #define	CHECK_DEBUG	0x0004
 #define	CHECK_BACKGRD	0x0008
 #define	DO_BACKGRD	0x0010
+#define	CHECK_CLEAN	0x0020
 
 struct fstab;
 int checkfstab(int, int (*)(struct fstab *), 

Modified: user/thompsa/usb/sbin/fsck_ffs/fsck.h
==============================================================================
--- user/thompsa/usb/sbin/fsck_ffs/fsck.h	Sun Feb  1 00:51:25 2009	(r187970)
+++ user/thompsa/usb/sbin/fsck_ffs/fsck.h	Sun Feb  1 01:04:31 2009	(r187971)
@@ -271,6 +271,7 @@ int	bkgrdflag;		/* use a snapshot to run
 int	bflag;			/* location of alternate super block */
 int	debug;			/* output debugging info */
 char	damagedflag;		/* run in damaged mode */
+char	ckclean;		/* only do work if not cleanly unmounted */
 int	cvtlevel;		/* convert to newer file system format */
 int	bkgrdcheck;		/* determine if background check is possible */
 int	bkgrdsumadj;		/* whether the kernel have ability to adjust superblock summary */

Modified: user/thompsa/usb/sbin/fsck_ffs/fsck_ffs.8
==============================================================================
--- user/thompsa/usb/sbin/fsck_ffs/fsck_ffs.8	Sun Feb  1 00:51:25 2009	(r187970)
+++ user/thompsa/usb/sbin/fsck_ffs/fsck_ffs.8	Sun Feb  1 01:04:31 2009	(r187971)
@@ -29,7 +29,7 @@
 .\"	@(#)fsck.8	8.4 (Berkeley) 5/9/95
 .\" $FreeBSD$
 .\"
-.Dd January 20, 2009
+.Dd January 25, 2009
 .Dt FSCK_FFS 8
 .Os
 .Sh NAME
@@ -46,9 +46,9 @@
 .Ar ...
 .Sh DESCRIPTION
 The specified disk partitions and/or file systems are checked.
-In "preen" mode the clean flag of each file system's superblock is examined
-and only those file systems that
-are not marked clean are checked.
+In "preen" or "check clean" mode the clean flag of each file system's
+superblock is examined and only those file systems that are not marked clean
+are checked.
 File systems are marked clean when they are unmounted,
 when they have been mounted read-only, or when
 .Nm
@@ -175,6 +175,14 @@ Use the block specified immediately afte
 the super block for the file system.
 An alternate super block is usually located at block 32 for UFS1,
 and block 160 for UFS2.
+.It Fl C
+Check if file system was dismouted cleanly.
+If so, skip file system checks (like "preen").
+However, if the file system was not cleanly dismounted, do full checks,
+is if
+.Nm
+was invoked without
+.Fl C .
 .It Fl c
 Convert the file system to the specified level.
 Note that the level of a file system can only be raised.

Modified: user/thompsa/usb/sbin/fsck_ffs/main.c
==============================================================================
--- user/thompsa/usb/sbin/fsck_ffs/main.c	Sun Feb  1 00:51:25 2009	(r187970)
+++ user/thompsa/usb/sbin/fsck_ffs/main.c	Sun Feb  1 01:04:31 2009	(r187971)
@@ -82,7 +82,7 @@ main(int argc, char *argv[])
 	sync();
 	skipclean = 1;
 	damagedflag = 0;
-	while ((ch = getopt(argc, argv, "b:Bc:dDfFm:npy")) != -1) {
+	while ((ch = getopt(argc, argv, "b:Bc:CdDfFm:npy")) != -1) {
 		switch (ch) {
 		case 'b':
 			skipclean = 0;
@@ -132,6 +132,10 @@ main(int argc, char *argv[])
 
 		case 'p':
 			preen++;
+			/*FALLTHROUGH*/
+
+		case 'C':
+			ckclean++;
 			break;
 
 		case 'y':
@@ -151,7 +155,7 @@ main(int argc, char *argv[])
 
 	if (signal(SIGINT, SIG_IGN) != SIG_IGN)
 		(void)signal(SIGINT, catch);
-	if (preen)
+	if (ckclean)
 		(void)signal(SIGQUIT, catchquit);
 	signal(SIGINFO, infohandler);
 	if (bkgrdflag) {
@@ -215,7 +219,7 @@ checkfilesys(char *filesys)
 	errmsg[0] = '\0';
 
 	cdevname = filesys;
-	if (debug && preen)
+	if (debug && ckclean)
 		pwarn("starting\n");
 	/*
 	 * Make best effort to get the disk name. Check first to see
@@ -250,7 +254,7 @@ checkfilesys(char *filesys)
 			exit(7);	/* Filesystem clean, report it now */
 		exit(0);
 	}
-	if (preen && skipclean) {
+	if (ckclean && skipclean) {
 		/*
 		 * If file system is gjournaled, check it here.
 		 */
@@ -301,7 +305,7 @@ checkfilesys(char *filesys)
 					    "CANNOT RUN IN BACKGROUND\n");
 				}
 				if ((sblock.fs_flags & FS_UNCLEAN) == 0 &&
-				    skipclean && preen) {
+				    skipclean && ckclean) {
 					/*
 					 * file system is clean;
 					 * skip snapshot and report it clean

Modified: user/thompsa/usb/sbin/fsck_ffs/setup.c
==============================================================================
--- user/thompsa/usb/sbin/fsck_ffs/setup.c	Sun Feb  1 00:51:25 2009	(r187970)
+++ user/thompsa/usb/sbin/fsck_ffs/setup.c	Sun Feb  1 01:04:31 2009	(r187971)
@@ -65,7 +65,7 @@ static struct disklabel *getdisklabel(ch
 /*
  * Read in a superblock finding an alternate if necessary.
  * Return 1 if successful, 0 if unsuccessful, -1 if file system
- * is already clean (preen mode only).
+ * is already clean (ckclean and preen mode only).
  */
 int
 setup(char *dev)
@@ -201,7 +201,7 @@ setup(char *dev)
 		pwarn("USING ALTERNATE SUPERBLOCK AT %d\n", bflag);
 		bflag = 0;
 	}
-	if (skipclean && preen && sblock.fs_clean) {
+	if (skipclean && ckclean && sblock.fs_clean) {
 		pwarn("FILE SYSTEM CLEAN; SKIPPING CHECKS\n");
 		return (-1);
 	}

Modified: user/thompsa/usb/sbin/ifconfig/ifieee80211.c
==============================================================================
--- user/thompsa/usb/sbin/ifconfig/ifieee80211.c	Sun Feb  1 00:51:25 2009	(r187970)
+++ user/thompsa/usb/sbin/ifconfig/ifieee80211.c	Sun Feb  1 01:04:31 2009	(r187971)
@@ -1789,6 +1789,19 @@ chanlookup(const struct ieee80211_channe
 	return NULL;
 }
 
+static int
+chanfind(const struct ieee80211_channel chans[], int nchans, int flags)
+{
+	int i;
+
+	for (i = 0; i < nchans; i++) {
+		const struct ieee80211_channel *c = &chans[i];
+		if ((c->ic_flags & flags) == flags)
+			return 1;
+	}
+	return 0;
+}
+
 static void
 regdomain_addchans(struct ieee80211req_chaninfo *ci,
 	const netband_head *bands,
@@ -1799,53 +1812,72 @@ regdomain_addchans(struct ieee80211req_c
 	const struct netband *nb;
 	const struct freqband *b;
 	struct ieee80211_channel *c, *prev;
-	int freq, channelSep;
+	int freq, channelSep, hasHalfChans, hasQuarterChans;
 
 	channelSep = (chanFlags & IEEE80211_CHAN_2GHZ) ? 0 : 40;
+	hasHalfChans = chanfind(avail->ic_chans, avail->ic_nchans,
+	    IEEE80211_CHAN_HALF |
+	       (chanFlags & (IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_5GHZ)));
+	hasQuarterChans = chanfind(avail->ic_chans, avail->ic_nchans,
+	    IEEE80211_CHAN_QUARTER |
+	        (chanFlags & (IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_5GHZ)));
 	LIST_FOREACH(nb, bands, next) {
 		b = nb->band;
-		if (verbose)
-			printf("%s: chanFlags 0x%x b %p\n",
-			    __func__, chanFlags, b);
+		if (verbose) {
+			printf("%s:", __func__);
+			printb(" chanFlags", chanFlags, IEEE80211_CHAN_BITS);
+			printb(" bandFlags", nb->flags | b->flags,
+			    IEEE80211_CHAN_BITS);
+			putchar('\n');
+		}
 		prev = NULL;
 		for (freq = b->freqStart; freq <= b->freqEnd; freq += b->chanSep) {
 			uint32_t flags = nb->flags | b->flags;
 
 			/* check if device can operate on this frequency */
-			if (chanlookup(avail->ic_chans, avail->ic_nchans, freq, chanFlags) == NULL) {
-				if (verbose)
-					printf("%u: skip, flags 0x%x not available\n", freq, chanFlags);
-				continue;
-			}
 			/*
-			 * NB: don't enforce 1/2 and 1/4 rate channels being
-			 * specified in the device's calibration list for
-			 * 900MHz cards because most are not self-identifying.
+			 * XXX GSM frequency mapping is handled in the kernel
+			 * so we cannot find them in the calibration table;
+			 * just construct the list and the kernel will reject
+			 * if it's wrong.
 			 */
-			if ((flags & IEEE80211_CHAN_HALF) &&
-			    ((chanFlags & IEEE80211_CHAN_HALF) == 0 &&
-			     (flags & IEEE80211_CHAN_GSM) == 0)) {
+			if (chanlookup(avail->ic_chans, avail->ic_nchans, freq, chanFlags) == NULL &&
+			    (flags & IEEE80211_CHAN_GSM) == 0) {
+				if (verbose) {
+					printf("%u: skip, ", freq);
+					printb("flags", chanFlags,
+					    IEEE80211_CHAN_BITS);
+					printf(" not available\n");
+				}
+				continue;
+			}
+			if ((flags & IEEE80211_CHAN_HALF) && !hasHalfChans) {
 				if (verbose)
-					printf("%u: skip, device does not support half-rate channels\n", freq);
+					printf("%u: skip, device does not "
+					    "support half-rate channel\n",
+					    freq);
 				continue;
 			}
 			if ((flags & IEEE80211_CHAN_QUARTER) &&
-			    ((chanFlags & IEEE80211_CHAN_QUARTER) == 0 &&
-			     (flags & IEEE80211_CHAN_GSM) == 0)) {
+			    !hasQuarterChans) {
 				if (verbose)
-					printf("%u: skip, device does not support quarter-rate channels\n", freq);
+					printf("%u: skip, device does not "
+					    "support quarter-rate channel\n",
+					    freq);
 				continue;
 			}
 			if ((flags & IEEE80211_CHAN_HT20) &&
 			    (chanFlags & IEEE80211_CHAN_HT20) == 0) {
 				if (verbose)
-					printf("%u: skip, device does not support HT20 operation\n", freq);
+					printf("%u: skip, device does not "
+					    "support HT20 operation\n", freq);
 				continue;
 			}
 			if ((flags & IEEE80211_CHAN_HT40) &&
 			    (chanFlags & IEEE80211_CHAN_HT40) == 0) {
 				if (verbose)
-					printf("%u: skip, device does not support HT40 operation\n", freq);
+					printf("%u: skip, device does not "
+					    "support HT40 operation\n", freq);
 				continue;
 			}
 			if ((flags & REQ_ECM) && !reg->ecm) {
@@ -1868,7 +1900,8 @@ regdomain_addchans(struct ieee80211req_c
 			}
 			if (ci->ic_nchans == IEEE80211_CHAN_MAX) {
 				if (verbose)
-					printf("%u: skip, channel table full\n", freq);
+					printf("%u: skip, channel table full\n",
+					    freq);
 				break;
 			}
 			c = &ci->ic_chans[ci->ic_nchans++];
@@ -1880,10 +1913,12 @@ regdomain_addchans(struct ieee80211req_c
 				c->ic_maxregpower = nb->maxPowerDFS;
 			else
 				c->ic_maxregpower = nb->maxPower;
-			if (verbose)
-				printf("[%3d] add freq %u flags 0x%x power %u\n",
-				    ci->ic_nchans-1, c->ic_freq, c->ic_flags,
-				    c->ic_maxregpower);
+			if (verbose) {
+				printf("[%3d] add freq %u ",
+				    ci->ic_nchans-1, c->ic_freq);
+				printb("flags", c->ic_flags, IEEE80211_CHAN_BITS);
+				printf(" power %u\n", c->ic_maxregpower);
+			}
 			/* NB: kernel fills in other fields */
 			prev = c;
 		}
@@ -1932,26 +1967,12 @@ regdomain_makechannels(
 		if (!LIST_EMPTY(&rd->bands_11b))
 			regdomain_addchans(ci, &rd->bands_11b, reg,
 			    IEEE80211_CHAN_B, &dc->dc_chaninfo);
-		if (!LIST_EMPTY(&rd->bands_11g)) {
+		if (!LIST_EMPTY(&rd->bands_11g))
 			regdomain_addchans(ci, &rd->bands_11g, reg,
 			    IEEE80211_CHAN_G, &dc->dc_chaninfo);
-			regdomain_addchans(ci, &rd->bands_11g, reg,
-			    IEEE80211_CHAN_G | IEEE80211_CHAN_HALF,
-			    &dc->dc_chaninfo);
-			regdomain_addchans(ci, &rd->bands_11g, reg,
-			    IEEE80211_CHAN_G | IEEE80211_CHAN_QUARTER,
-			    &dc->dc_chaninfo);
-		}
-		if (!LIST_EMPTY(&rd->bands_11a)) {
+		if (!LIST_EMPTY(&rd->bands_11a))
 			regdomain_addchans(ci, &rd->bands_11a, reg,
 			    IEEE80211_CHAN_A, &dc->dc_chaninfo);
-			regdomain_addchans(ci, &rd->bands_11a, reg,
-			    IEEE80211_CHAN_A | IEEE80211_CHAN_HALF,
-			    &dc->dc_chaninfo);
-			regdomain_addchans(ci, &rd->bands_11a, reg,
-			    IEEE80211_CHAN_A | IEEE80211_CHAN_QUARTER,
-			    &dc->dc_chaninfo);
-		}
 		if (!LIST_EMPTY(&rd->bands_11na)) {
 			regdomain_addchans(ci, &rd->bands_11na, reg,
 			    IEEE80211_CHAN_A | IEEE80211_CHAN_HT20,
@@ -3098,23 +3119,16 @@ get_chaninfo(const struct ieee80211_chan
 	buf[0] = '\0';
 	if (IEEE80211_IS_CHAN_FHSS(c))
 		strlcat(buf, " FHSS", bsize);
-	if (IEEE80211_IS_CHAN_A(c)) {
-		if (IEEE80211_IS_CHAN_HALF(c))
-			strlcat(buf, " 11a/10Mhz", bsize);
-		else if (IEEE80211_IS_CHAN_QUARTER(c))
-			strlcat(buf, " 11a/5Mhz", bsize);
-		else
-			strlcat(buf, " 11a", bsize);
-	}
-	if (IEEE80211_IS_CHAN_ANYG(c)) {
-		if (IEEE80211_IS_CHAN_HALF(c))
-			strlcat(buf, " 11g/10Mhz", bsize);
-		else if (IEEE80211_IS_CHAN_QUARTER(c))
-			strlcat(buf, " 11g/5Mhz", bsize);
-		else
-			strlcat(buf, " 11g", bsize);
-	} else if (IEEE80211_IS_CHAN_B(c))
+	if (IEEE80211_IS_CHAN_A(c))
+		strlcat(buf, " 11a", bsize);
+	else if (IEEE80211_IS_CHAN_ANYG(c))
+		strlcat(buf, " 11g", bsize);
+	else if (IEEE80211_IS_CHAN_B(c))
 		strlcat(buf, " 11b", bsize);
+	if (IEEE80211_IS_CHAN_HALF(c))
+		strlcat(buf, "/10Mhz", bsize);
+	if (IEEE80211_IS_CHAN_QUARTER(c))
+		strlcat(buf, "/5Mhz", bsize);
 	if (IEEE80211_IS_CHAN_TURBO(c))
 		strlcat(buf, " Turbo", bsize);
 	if (precise) {
@@ -3142,6 +3156,30 @@ print_chaninfo(const struct ieee80211_ch
 		get_chaninfo(c, verb, buf, sizeof(buf)));
 }
 
+static int
+chanpref(const struct ieee80211_channel *c)
+{
+	if (IEEE80211_IS_CHAN_HT40(c))
+		return 40;
+	if (IEEE80211_IS_CHAN_HT20(c))
+		return 30;
+	if (IEEE80211_IS_CHAN_HALF(c))
+		return 10;
+	if (IEEE80211_IS_CHAN_QUARTER(c))
+		return 5;
+	if (IEEE80211_IS_CHAN_TURBO(c))
+		return 25;
+	if (IEEE80211_IS_CHAN_A(c))
+		return 20;
+	if (IEEE80211_IS_CHAN_G(c))
+		return 20;
+	if (IEEE80211_IS_CHAN_B(c))
+		return 15;
+	if (IEEE80211_IS_CHAN_PUREG(c))
+		return 15;
+	return 0;
+}
+
 static void
 print_channels(int s, const struct ieee80211req_chaninfo *chans,
 	int allchans, int verb)
@@ -3185,7 +3223,10 @@ print_channels(int s, const struct ieee8
 			/* suppress duplicates as above */
 			if (isset(reported, c->ic_ieee) && !verb) {
 				/* XXX we assume duplicates are adjacent */
-				achans->ic_chans[achans->ic_nchans-1] = *c;
+				struct ieee80211_channel *a =
+				    &achans->ic_chans[achans->ic_nchans-1];
+				if (chanpref(c) > chanpref(a))
+					*a = *c;
 			} else {
 				achans->ic_chans[achans->ic_nchans++] = *c;
 				setbit(reported, c->ic_ieee);
@@ -3301,10 +3342,13 @@ list_capabilities(int s)
 {
 	struct ieee80211_devcaps_req *dc;
 
-	dc = malloc(IEEE80211_DEVCAPS_SIZE(1));
+	if (verbose)
+		dc = malloc(IEEE80211_DEVCAPS_SIZE(MAXCHAN));
+	else
+		dc = malloc(IEEE80211_DEVCAPS_SIZE(1));
 	if (dc == NULL)
 		errx(1, "no space for device capabilities");
-	dc->dc_chaninfo.ic_nchans = 1;
+	dc->dc_chaninfo.ic_nchans = verbose ? MAXCHAN : 1;
 	getdevcaps(s, dc);
 	printb("drivercaps", dc->dc_drivercaps, IEEE80211_C_BITS);
 	if (dc->dc_cryptocaps != 0 || verbose) {
@@ -3316,6 +3360,10 @@ list_capabilities(int s)
 		printb("htcaps", dc->dc_htcaps, IEEE80211_HTCAP_BITS);
 	}
 	putchar('\n');
+	if (verbose) {
+		chaninfo = &dc->dc_chaninfo;	/* XXX */
+		print_channels(s, &dc->dc_chaninfo, 1/*allchans*/, verbose);
+	}
 	free(dc);
 }
 

Modified: user/thompsa/usb/sbin/reboot/reboot.c
==============================================================================
--- user/thompsa/usb/sbin/reboot/reboot.c	Sun Feb  1 00:51:25 2009	(r187970)
+++ user/thompsa/usb/sbin/reboot/reboot.c	Sun Feb  1 01:04:31 2009	(r187971)
@@ -65,7 +65,7 @@ int
 main(int argc, char *argv[])
 {
 	const struct passwd *pw;
-	int ch, howto, i, fd, lflag, nflag, qflag, pflag, sverrno;
+	int ch, howto, i, fd, lflag, nflag, qflag, sverrno;
 	u_int pageins;
 	const char *p, *user, *kernel = NULL;
 
@@ -91,7 +91,6 @@ main(int argc, char *argv[])
 			howto |= RB_NOSYNC;
 			break;
 		case 'p':
-			pflag = 1;
 			howto |= RB_POWEROFF;
 			break;
 		case 'q':

Modified: user/thompsa/usb/share/man/man4/ng_bpf.4
==============================================================================
--- user/thompsa/usb/share/man/man4/ng_bpf.4	Sun Feb  1 00:51:25 2009	(r187970)
+++ user/thompsa/usb/share/man/man4/ng_bpf.4	Sun Feb  1 01:04:31 2009	(r187971)
@@ -156,21 +156,14 @@ INHOOK="hook1"
 MATCHHOOK="hook2"
 NOTMATCHHOOK="hook3"
 
-cat > /tmp/bpf.awk << xxENDxx
-{
-  if (!init) {
-    printf "bpf_prog_len=%d bpf_prog=[", \\$1;
-    init=1;
-  } else {
-    printf " { code=%d jt=%d jf=%d k=%d }", \\$1, \\$2, \\$3, \\$4;
-  }
-}
-END {
-  print " ]"
-}
-xxENDxx
-
-BPFPROG=`tcpdump -s 8192 -ddd ${PATTERN} | awk -f /tmp/bpf.awk`
+BPFPROG=$( tcpdump -s 8192 -ddd ${PATTERN} | \\
+           ( read len ; \\
+             echo -n "bpf_prog_len=$len" ; \\
+             echo -n "bpf_prog=[" ; \\
+             while read code jt jf k ; do \\
+                 echo -n " { code=$code jt=$jt jf=$jf k=$k }" ; \\
+             done ; \\
+             echo " ]" ) )
 
 ngctl msg ${NODEPATH} setprogram { thisHook=\\"${INHOOK}\\" \\
   ifMatch=\\"${MATCHHOOK}\\" \\

Modified: user/thompsa/usb/share/man/man5/rc.conf.5
==============================================================================
--- user/thompsa/usb/share/man/man5/rc.conf.5	Sun Feb  1 00:51:25 2009	(r187970)
+++ user/thompsa/usb/share/man/man5/rc.conf.5	Sun Feb  1 01:04:31 2009	(r187971)
@@ -2065,16 +2065,12 @@ If set to
 .Xr ntpd 8
 is run with the
 .Fl g
-and
-.Fl q
-flags, which syncs the system's clock on startup.
+flag, which syncs the system's clock on startup.
 See
 .Xr ntpd 8
 for more information regarding the
 .Fl g
-and
-.Fl q
-options.
+option.
 This is a preferred alternative to using
 .Xr ntpdate 8
 or specifying the

Modified: user/thompsa/usb/share/man/man7/Makefile
==============================================================================
--- user/thompsa/usb/share/man/man7/Makefile	Sun Feb  1 00:51:25 2009	(r187970)
+++ user/thompsa/usb/share/man/man7/Makefile	Sun Feb  1 01:04:31 2009	(r187971)
@@ -2,7 +2,8 @@
 # $FreeBSD$
 
 #MISSING: eqnchar.7 ms.7 term.7
-MAN=	ascii.7 \
+MAN=	adding_user.7 \
+	ascii.7 \
 	bsd.snmpmod.mk.7 \
 	build.7 \
 	clocks.7 \

Modified: user/thompsa/usb/share/man/man8/Makefile
==============================================================================
--- user/thompsa/usb/share/man/man8/Makefile	Sun Feb  1 00:51:25 2009	(r187970)
+++ user/thompsa/usb/share/man/man8/Makefile	Sun Feb  1 01:04:31 2009	(r187971)
@@ -1,8 +1,7 @@
 #	@(#)Makefile	8.1 (Berkeley) 6/5/93
 # $FreeBSD$
 
-MAN=	adding_user.8 \
-	crash.8 \
+MAN=	crash.8 \
 	diskless.8 \
 	intro.8 \
 	MAKEDEV.8 \

Modified: user/thompsa/usb/share/misc/committers-src.dot
==============================================================================
--- user/thompsa/usb/share/misc/committers-src.dot	Sun Feb  1 00:51:25 2009	(r187970)
+++ user/thompsa/usb/share/misc/committers-src.dot	Sun Feb  1 01:04:31 2009	(r187971)
@@ -102,6 +102,7 @@ iedowse [label="Ian Dowse\niedowse@FreeB
 imp [label="Warner Losh\nimp@FreeBSD.org\n1996/09/20"]
 ivoras [label="Ivan Voras\nivoras@FreeBSD.org\n2008/06/10"]
 jake [label="Jake Burkholder\njake@FreeBSD.org\n2000/05/16"]
+jamie [label="Jamie Gritton\njamie@FreeBSD.org\n2009/01/28"]
 jayanth [label="Jayanth Vijayaraghavan\njayanth@FreeBSD.org\n2000/05/08"]
 jinmei [label="JINMEI Tatuya\njinmei@FreeBSD.org\n2007/03/17"]
 jdp [label="John Polstra\njdp@FreeBSD.org\n????/??/??"]
@@ -219,7 +220,9 @@ bms -> thompsa
 brian -> joe
 
 brooks -> bushman
+brooks -> jamie
 
+bz -> jamie
 bz -> syrinx
 
 cperciva -> flz

Modified: user/thompsa/usb/sys/amd64/amd64/cpu_switch.S
==============================================================================
--- user/thompsa/usb/sys/amd64/amd64/cpu_switch.S	Sun Feb  1 00:51:25 2009	(r187970)
+++ user/thompsa/usb/sys/amd64/amd64/cpu_switch.S	Sun Feb  1 01:04:31 2009	(r187971)
@@ -260,12 +260,12 @@ do_kthread:
 	jmp	do_tss
 
 store_seg:
-	movl	%gs,PCB_GS(%r8)
+	mov	%gs,PCB_GS(%r8)
 	testl	$PCB_GS32BIT,PCB_FLAGS(%r8)
 	jnz	2f
-1:	movl	%ds,PCB_DS(%r8)
-	movl	%es,PCB_ES(%r8)
-	movl	%fs,PCB_FS(%r8)
+1:	mov	%ds,PCB_DS(%r8)
+	mov	%es,PCB_ES(%r8)
+	mov	%fs,PCB_FS(%r8)
 	jmp	done_store_seg
 2:	movq	PCPU(GS32P),%rax
 	movq	(%rax),%rax
@@ -277,11 +277,11 @@ load_seg:
 	jnz	2f
 1:	movl	$MSR_GSBASE,%ecx
 	rdmsr
-	movl	PCB_GS(%r8),%gs
+	mov	PCB_GS(%r8),%gs
 	wrmsr
-	movl	PCB_DS(%r8),%ds
-	movl	PCB_ES(%r8),%es
-	movl	PCB_FS(%r8),%fs
+	mov	PCB_DS(%r8),%ds
+	mov	PCB_ES(%r8),%es
+	mov	PCB_FS(%r8),%fs
 	jmp	restore_fsbase
 	/* Restore userland %gs while preserving kernel gsbase */
 2:	movq	PCPU(GS32P),%rax

Modified: user/thompsa/usb/sys/amd64/amd64/fpu.c
==============================================================================
--- user/thompsa/usb/sys/amd64/amd64/fpu.c	Sun Feb  1 00:51:25 2009	(r187970)
+++ user/thompsa/usb/sys/amd64/amd64/fpu.c	Sun Feb  1 01:04:31 2009	(r187971)
@@ -391,6 +391,7 @@ fpudna()
 {
 	struct pcb *pcb;
 	register_t s;
+	u_short control;
 
 	if (PCPU_GET(fpcurthread) == curthread) {
 		printf("fpudna: fpcurthread == curthread %d times\n",
@@ -421,6 +422,10 @@ fpudna()
 		 * explicitly load sanitized registers.
 		 */
 		fxrstor(&fpu_cleanstate);
+		if (pcb->pcb_flags & PCB_32BIT) {
+			control = __INITIAL_FPUCW_I386__;
+			fldcw(&control);
+		}
 		pcb->pcb_flags |= PCB_FPUINITDONE;
 	} else
 		fxrstor(&pcb->pcb_save);

Modified: user/thompsa/usb/sys/amd64/amd64/io_apic.c
==============================================================================
--- user/thompsa/usb/sys/amd64/amd64/io_apic.c	Sun Feb  1 00:51:25 2009	(r187970)
+++ user/thompsa/usb/sys/amd64/amd64/io_apic.c	Sun Feb  1 01:04:31 2009	(r187971)
@@ -327,39 +327,56 @@ ioapic_assign_cpu(struct intsrc *isrc, u
 {
 	struct ioapic_intsrc *intpin = (struct ioapic_intsrc *)isrc;
 	struct ioapic *io = (struct ioapic *)isrc->is_pic;
+	u_int old_vector;
+	u_int old_id;
 
+	/*
+	 * keep 1st core as the destination for NMI
+	 */
+	if (intpin->io_irq == IRQ_NMI)
+		apic_id = 0;
+
+	/*
+	 * Set us up to free the old irq.
+	 */
+	old_vector = intpin->io_vector;
+	old_id = intpin->io_cpu;
+	if (old_vector && apic_id == old_id)
+		return;
+
+	/*
+	 * Allocate an APIC vector for this interrupt pin.  Once
+	 * we have a vector we program the interrupt pin.
+	 */
 	intpin->io_cpu = apic_id;
+	intpin->io_vector = apic_alloc_vector(apic_id, intpin->io_irq);
 	if (bootverbose) {
-		printf("ioapic%u: Assigning ", io->io_id);
+		printf("ioapic%u: routing intpin %u (", io->io_id,
+		    intpin->io_intpin);
 		ioapic_print_irq(intpin);
-		printf(" to local APIC %u\n", intpin->io_cpu);
+		printf(") to lapic %u vector %u\n", intpin->io_cpu,
+		    intpin->io_vector);
 	}
 	ioapic_program_intpin(intpin);
+	/*
+	 * Free the old vector after the new one is established.  This is done
+	 * to prevent races where we could miss an interrupt.
+	 */
+	if (old_vector)
+		apic_free_vector(old_id, old_vector, intpin->io_irq);
 }
 
 static void
 ioapic_enable_intr(struct intsrc *isrc)
 {
 	struct ioapic_intsrc *intpin = (struct ioapic_intsrc *)isrc;
-	struct ioapic *io = (struct ioapic *)isrc->is_pic;
 
-	if (intpin->io_vector == 0) {
-		/*
-		 * Allocate an APIC vector for this interrupt pin.  Once
-		 * we have a vector we program the interrupt pin.
-		 */
-		intpin->io_vector = apic_alloc_vector(intpin->io_irq);
-		if (bootverbose) {
-			printf("ioapic%u: routing intpin %u (", io->io_id,
-			    intpin->io_intpin);
-			ioapic_print_irq(intpin);
-			printf(") to vector %u\n", intpin->io_vector);
-		}
-		ioapic_program_intpin(intpin);
-		apic_enable_vector(intpin->io_vector);
-	}
+	if (intpin->io_vector == 0)
+		ioapic_assign_cpu(isrc, pcpu_find(0)->pc_apic_id);

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-user@FreeBSD.ORG  Sun Feb  1 02:04:25 2009
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 0C58B1065751;
	Sun,  1 Feb 2009 02:04:25 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id ED0B08FC14;
	Sun,  1 Feb 2009 02:04:24 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n1124Oqw039936;
	Sun, 1 Feb 2009 02:04:24 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n1124O9m039927;
	Sun, 1 Feb 2009 02:04:24 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <200902010204.n1124O9m039927@svn.freebsd.org>
From: Andrew Thompson <thompsa@FreeBSD.org>
Date: Sun, 1 Feb 2009 02:04:24 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r187974 - in user/thompsa/usb/sys/dev/usb2: bluetooth
	core ethernet serial storage
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 01 Feb 2009 02:04:25 -0000

Author: thompsa
Date: Sun Feb  1 02:04:24 2009
New Revision: 187974
URL: http://svn.freebsd.org/changeset/base/187974

Log:
  - Resubmit the xfer when pipe_stall is set, this removes the need for gotos.
  - Use usb2_clear_endpoint_stall() throughout.

Modified:
  user/thompsa/usb/sys/dev/usb2/bluetooth/ng_ubt2.c
  user/thompsa/usb/sys/dev/usb2/bluetooth/ubtbcmfw2.c
  user/thompsa/usb/sys/dev/usb2/core/usb2_core.h
  user/thompsa/usb/sys/dev/usb2/core/usb2_handle_request.c
  user/thompsa/usb/sys/dev/usb2/core/usb2_hub.c
  user/thompsa/usb/sys/dev/usb2/core/usb2_transfer.c
  user/thompsa/usb/sys/dev/usb2/ethernet/if_cdce2.c
  user/thompsa/usb/sys/dev/usb2/serial/u3g2.c
  user/thompsa/usb/sys/dev/usb2/storage/ustorage2_fs.c

Modified: user/thompsa/usb/sys/dev/usb2/bluetooth/ng_ubt2.c
==============================================================================
--- user/thompsa/usb/sys/dev/usb2/bluetooth/ng_ubt2.c	Sun Feb  1 01:50:09 2009	(r187973)
+++ user/thompsa/usb/sys/dev/usb2/bluetooth/ng_ubt2.c	Sun Feb  1 02:04:24 2009	(r187974)
@@ -742,8 +742,8 @@ submit_next:
 				usb2_errstr(xfer->error));
 
 			/* Try to clear stall first */
-			xfer->flags.stall_pipe = 1;
-			goto submit_next;
+			usb2_clear_endpoint_stall(xfer);
+			return;
 		}
 			/* transfer cancelled */
 		break;
@@ -838,8 +838,8 @@ submit_next:
 				usb2_errstr(xfer->error));
 
 			/* Try to clear stall first */
-			xfer->flags.stall_pipe = 1;
-			goto submit_next;
+			usb2_clear_endpoint_stall(xfer);
+			return;
 		}
 			/* transfer cancelled */
 		break;
@@ -866,7 +866,6 @@ ubt_bulk_write_callback(struct usb2_xfer
 		/* FALLTHROUGH */
 
 	case USB_ST_SETUP:
-send_next:
 		/* Get next mbuf, if any */
 		UBT_NG_LOCK(sc);
 		NG_BT_MBUFQ_DEQUEUE(&sc->sc_aclq, m);
@@ -901,8 +900,8 @@ send_next:
 			UBT_STAT_OERROR(sc);
 
 			/* try to clear stall first */
-			xfer->flags.stall_pipe = 1;
-			goto send_next;
+			usb2_clear_endpoint_stall(xfer);
+			return;
 		}
 			/* transfer cancelled */
 		break;

Modified: user/thompsa/usb/sys/dev/usb2/bluetooth/ubtbcmfw2.c
==============================================================================
--- user/thompsa/usb/sys/dev/usb2/bluetooth/ubtbcmfw2.c	Sun Feb  1 01:50:09 2009	(r187973)
+++ user/thompsa/usb/sys/dev/usb2/bluetooth/ubtbcmfw2.c	Sun Feb  1 02:04:24 2009	(r187974)
@@ -265,7 +265,6 @@ ubtbcmfw_write_callback(struct usb2_xfer
 	switch (USB_GET_STATE(xfer)) {
 	case USB_ST_SETUP:
 	case USB_ST_TRANSFERRED:
-setup_next:
 		if (usb2_fifo_get_data(f, xfer->frbuffers, 0,
 				xfer->max_data_length, &actlen, 0)) {
 			xfer->frlengths[0] = actlen;
@@ -276,8 +275,8 @@ setup_next:
 	default: /* Error */
 		if (xfer->error != USB_ERR_CANCELLED) {
 			/* try to clear stall first */
-			xfer->flags.stall_pipe = 1;
-			goto setup_next;
+			usb2_clear_endpoint_stall(xfer);
+			return;
 		}
 		break;
 	}
@@ -299,7 +298,6 @@ ubtbcmfw_read_callback(struct usb2_xfer 
 		/* FALLTHROUGH */
 
 	case USB_ST_SETUP:
-setup_next:
 		if (usb2_fifo_put_bytes_max(fifo) > 0) {
 			xfer->frlengths[0] = xfer->max_data_length;
 			usb2_start_hardware(xfer);
@@ -309,8 +307,8 @@ setup_next:
 	default: /* Error */
 		if (xfer->error != USB_ERR_CANCELLED) {
 			/* try to clear stall first */
-			xfer->flags.stall_pipe = 1;
-			goto setup_next;
+			usb2_clear_endpoint_stall(xfer);
+			return;
 		}
 		break;
 	}

Modified: user/thompsa/usb/sys/dev/usb2/core/usb2_core.h
==============================================================================
--- user/thompsa/usb/sys/dev/usb2/core/usb2_core.h	Sun Feb  1 01:50:09 2009	(r187973)
+++ user/thompsa/usb/sys/dev/usb2/core/usb2_core.h	Sun Feb  1 02:04:24 2009	(r187974)
@@ -445,9 +445,8 @@ void	usb2_set_frame_data(struct usb2_xfe
 void	usb2_set_frame_offset(struct usb2_xfer *xfer, uint32_t offset,
 	    uint32_t frindex);
 void	usb2_start_hardware(struct usb2_xfer *xfer);
-void	usb2_transfer_clear_stall(struct usb2_xfer *xfer);
 void	usb2_transfer_drain(struct usb2_xfer *xfer);
-void	usb2_transfer_set_stall(struct usb2_xfer *xfer);
+void	usb2_clear_endpoint_stall(struct usb2_xfer *xfer);
 void	usb2_transfer_start(struct usb2_xfer *xfer);
 void	usb2_transfer_stop(struct usb2_xfer *xfer);
 void	usb2_transfer_unsetup(struct usb2_xfer **pxfer, uint16_t n_setup);

Modified: user/thompsa/usb/sys/dev/usb2/core/usb2_handle_request.c
==============================================================================
--- user/thompsa/usb/sys/dev/usb2/core/usb2_handle_request.c	Sun Feb  1 01:50:09 2009	(r187973)
+++ user/thompsa/usb/sys/dev/usb2/core/usb2_handle_request.c	Sun Feb  1 02:04:24 2009	(r187974)
@@ -93,7 +93,11 @@ usb2_handle_request_callback(struct usb2
 		         * If no control transfer is active,
 		         * receive the next SETUP message:
 		         */
-			goto tr_restart;
+			xfer->frlengths[0] = sizeof(struct usb2_device_request);
+			xfer->nframes = 1;
+			xfer->flags.manual_status = 1;
+			xfer->flags.force_short_xfer = 0;
+			xfer->flags.stall_pipe = 1;	/* cancel previous transfer, if any */
 		}
 		usb2_start_hardware(xfer);
 		break;
@@ -101,19 +105,11 @@ usb2_handle_request_callback(struct usb2
 	default:
 		if (xfer->error != USB_ERR_CANCELLED) {
 			/* should not happen - try stalling */
-			goto tr_restart;
+			usb2_clear_endpoint_stall(xfer);
+			return;
 		}
 		break;
 	}
-	return;
-
-tr_restart:
-	xfer->frlengths[0] = sizeof(struct usb2_device_request);
-	xfer->nframes = 1;
-	xfer->flags.manual_status = 1;
-	xfer->flags.force_short_xfer = 0;
-	xfer->flags.stall_pipe = 1;	/* cancel previous transfer, if any */
-	usb2_start_hardware(xfer);
 }
 
 /*------------------------------------------------------------------------*

Modified: user/thompsa/usb/sys/dev/usb2/core/usb2_hub.c
==============================================================================
--- user/thompsa/usb/sys/dev/usb2/core/usb2_hub.c	Sun Feb  1 01:50:09 2009	(r187973)
+++ user/thompsa/usb/sys/dev/usb2/core/usb2_hub.c	Sun Feb  1 02:04:24 2009	(r187974)
@@ -170,14 +170,9 @@ uhub_intr_callback(struct usb2_xfer *xfe
 
 	default:			/* Error */
 		if (xfer->error != USB_ERR_CANCELLED) {
-			/*
-			 * Do a clear-stall. The "stall_pipe" flag
-			 * will get cleared before next callback by
-			 * the USB stack.
-			 */
-			xfer->flags.stall_pipe = 1;
-			xfer->frlengths[0] = xfer->max_data_length;
-			usb2_start_hardware(xfer);
+			/* Do a clear-stall. */
+			usb2_clear_endpoint_stall(xfer);
+			return;
 		}
 		break;
 	}

Modified: user/thompsa/usb/sys/dev/usb2/core/usb2_transfer.c
==============================================================================
--- user/thompsa/usb/sys/dev/usb2/core/usb2_transfer.c	Sun Feb  1 01:50:09 2009	(r187973)
+++ user/thompsa/usb/sys/dev/usb2/core/usb2_transfer.c	Sun Feb  1 02:04:24 2009	(r187974)
@@ -1909,6 +1909,11 @@ usb2_callback_wrapper(struct usb2_xfer_q
 	/* call processing routine */
 	(xfer->callback) (xfer);
 
+	if (xfer->usb2_state == USB_ST_ERROR && xfer->flags.stall_pipe) {
+		/* resubmit xfer */
+		xfer->usb2_state = USB_ST_SETUP;
+		(xfer->callback) (xfer);
+	}
 	/* pickup the USB mutex again */
 	USB_BUS_LOCK(xfer->xroot->bus);
 
@@ -2108,7 +2113,7 @@ usb2_transfer_start_cb(void *arg)
  * callback. This function is NULL safe.
  *------------------------------------------------------------------------*/
 void
-usb2_transfer_set_stall(struct usb2_xfer *xfer)
+usb2_clear_endpoint_stall(struct usb2_xfer *xfer)
 {
 	if (xfer == NULL) {
 		/* tearing down */
@@ -2125,29 +2130,6 @@ usb2_transfer_set_stall(struct usb2_xfer
 }
 
 /*------------------------------------------------------------------------*
- *	usb2_transfer_clear_stall
- *
- * This function is used to clear the stall flag outside the
- * callback. This function is NULL safe.
- *------------------------------------------------------------------------*/
-void
-usb2_transfer_clear_stall(struct usb2_xfer *xfer)
-{
-	if (xfer == NULL) {
-		/* tearing down */
-		return;
-	}
-	USB_XFER_LOCK_ASSERT(xfer, MA_OWNED);
-
-	/* avoid any races by locking the USB mutex */
-	USB_BUS_LOCK(xfer->xroot->bus);
-
-	xfer->flags.stall_pipe = 0;
-
-	USB_BUS_UNLOCK(xfer->xroot->bus);
-}
-
-/*------------------------------------------------------------------------*
  *	usb2_pipe_start
  *
  * This function is used to add an USB transfer to the pipe transfer list.

Modified: user/thompsa/usb/sys/dev/usb2/ethernet/if_cdce2.c
==============================================================================
--- user/thompsa/usb/sys/dev/usb2/ethernet/if_cdce2.c	Sun Feb  1 01:50:09 2009	(r187973)
+++ user/thompsa/usb/sys/dev/usb2/ethernet/if_cdce2.c	Sun Feb  1 02:04:24 2009	(r187974)
@@ -598,7 +598,6 @@ cdce_bulk_write_512x4_callback(struct us
 
 		/* FALLTHROUGH */
 	case USB_ST_SETUP:
-tr_setup:
 		x = 0;			/* number of frames */
 		y = 1;			/* number of fragments */
 
@@ -683,8 +682,8 @@ tr_setup:
 
 		if (xfer->error != USB_ERR_CANCELLED) {
 			/* try to clear stall first */
-			xfer->flags.stall_pipe = 1;
-			goto tr_setup;
+			usb2_clear_endpoint_stall(xfer);
+			return;
 		}
 		break;
 	}
@@ -772,8 +771,8 @@ tr_setup:
 
 		if (xfer->error != USB_ERR_CANCELLED) {
 			/* try to clear stall first */
-			xfer->flags.stall_pipe = 1;
-			goto tr_setup;
+			usb2_clear_endpoint_stall(xfer);
+			return;
 		}
 		break;
 	}
@@ -906,8 +905,8 @@ cdce_init_locked(struct cdce_softc *sc)
 	if (sc->sc_flags & CDCE_FLAG_DETACH)
 		return;
 
-	usb2_transfer_set_stall(sc->sc_xfer[CDCE_BULK_A]);
-	usb2_transfer_set_stall(sc->sc_xfer[CDCE_BULK_B]);
+	usb2_clear_endpoint_stall(sc->sc_xfer[CDCE_BULK_A]);
+	usb2_clear_endpoint_stall(sc->sc_xfer[CDCE_BULK_B]);
 
 	ifp->if_drv_flags |= IFF_DRV_RUNNING;
 	cdce_start_transfers(sc);
@@ -947,8 +946,8 @@ cdce_bulk_read_512x4_callback(struct usb
 			    (sc->sc_rx.hdr.bSig[0] != 'F') ||
 			    (sc->sc_rx.hdr.bSig[1] != 'L')) {
 				/* try to clear stall first */
-				xfer->flags.stall_pipe = 1;
-				goto tr_setup;
+				usb2_clear_endpoint_stall(xfer);
+				return;
 			}
 			rx_frags = (xfer->actlen -
 			    CDCE_512X4_FRAG_LENGTH_OFFSET) / 2;
@@ -966,7 +965,6 @@ cdce_bulk_read_512x4_callback(struct usb
 
 		/* FALLTHROUGH */
 	case USB_ST_SETUP:
-tr_setup:
 		if (xfer->flags.stall_pipe) {
 			/* we are done */
 			sc->sc_flags &= ~CDCE_FLAG_RX_DATA;
@@ -985,8 +983,8 @@ tr_setup:
 		/* verify number of fragments */
 		if (rx_frags > CDCE_512X4_FRAGS_MAX) {
 			/* try to clear stall first */
-			xfer->flags.stall_pipe = 1;
-			goto tr_setup;
+			usb2_clear_endpoint_stall(xfer);
+			return;
 		}
 		/* check if the last fragment does not complete a frame */
 		x = rx_frags - 1;
@@ -994,8 +992,8 @@ tr_setup:
 		if (!(flen & CDCE_512X4_FRAG_LAST_MASK)) {
 			DPRINTF("no last frag mask\n");
 			/* try to clear stall first */
-			xfer->flags.stall_pipe = 1;
-			goto tr_setup;
+			usb2_clear_endpoint_stall(xfer);
+			return;
 		}
 		/*
 		 * Setup a new USB transfer chain to receive all the
@@ -1025,8 +1023,8 @@ tr_setup:
 				 */
 				if (offset > (MCLBYTES - ETHER_ALIGN)) {
 					/* try to clear stall first */
-					xfer->flags.stall_pipe = 1;
-					goto tr_setup;
+					usb2_clear_endpoint_stall(xfer);
+					return;
 				} if (offset > (MHLEN - ETHER_ALIGN)) {
 					m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
 				} else {
@@ -1085,8 +1083,8 @@ tr_setup:
 			}
 			if (y == CDCE_512X4_FRAMES_MAX) {
 				/* try to clear stall first */
-				xfer->flags.stall_pipe = 1;
-				goto tr_setup;
+				usb2_clear_endpoint_stall(xfer);
+				return;
 			}
 		}
 
@@ -1103,8 +1101,8 @@ tr_setup:
 
 		if (xfer->error != USB_ERR_CANCELLED) {
 			/* try to clear stall first */
-			xfer->flags.stall_pipe = 1;
-			goto tr_setup;
+			usb2_clear_endpoint_stall(xfer);
+			return;
 		}
 		free_mq = 1;
 		break;
@@ -1192,8 +1190,8 @@ tr_setup:
 
 		if (xfer->error != USB_ERR_CANCELLED) {
 			/* try to clear stall first */
-			xfer->flags.stall_pipe = 1;
-			goto tr_setup;
+			usb2_clear_endpoint_stall(xfer);
+			return;
 		}
 		return;
 	}
@@ -1257,7 +1255,6 @@ cdce_intr_read_callback(struct usb2_xfer
 
 		/* FALLTHROUGH */
 	case USB_ST_SETUP:
-tr_setup:
 		xfer->frlengths[0] = xfer->max_data_length;
 		usb2_start_hardware(xfer);
 		break;
@@ -1265,8 +1262,8 @@ tr_setup:
 	default:			/* Error */
 		if (xfer->error != USB_ERR_CANCELLED) {
 			/* start clear stall */
-			xfer->flags.stall_pipe = 1;
-			goto tr_setup;
+			usb2_clear_endpoint_stall(xfer);
+			return;
 		}
 		break;
 	}
@@ -1283,7 +1280,6 @@ cdce_intr_write_callback(struct usb2_xfe
 
 		/* FALLTHROUGH */
 	case USB_ST_SETUP:
-tr_setup:
 #if 0
 		xfer->frlengths[0] = XXX;
 		usb2_start_hardware(xfer);
@@ -1293,8 +1289,8 @@ tr_setup:
 	default:			/* Error */
 		if (xfer->error != USB_ERR_CANCELLED) {
 			/* start clear stall */
-			xfer->flags.stall_pipe = 1;
-			goto tr_setup;
+			usb2_clear_endpoint_stall(xfer);
+			return;
 		}
 		break;
 	}

Modified: user/thompsa/usb/sys/dev/usb2/serial/u3g2.c
==============================================================================
--- user/thompsa/usb/sys/dev/usb2/serial/u3g2.c	Sun Feb  1 01:50:09 2009	(r187973)
+++ user/thompsa/usb/sys/dev/usb2/serial/u3g2.c	Sun Feb  1 02:04:24 2009	(r187974)
@@ -420,8 +420,8 @@ u3g_attach(device_t dev)
 			goto detach;
 		}
 		/* set stall by default */
-		usb2_transfer_set_stall(sc->sc_xfer[m][U3G_BULK_WR]);
-		usb2_transfer_set_stall(sc->sc_xfer[m][U3G_BULK_RD]);
+		usb2_clear_endpoint_stall(sc->sc_xfer[m][U3G_BULK_WR]);
+		usb2_clear_endpoint_stall(sc->sc_xfer[m][U3G_BULK_RD]);
 	}
 
 	sc->sc_numports = m;
@@ -508,7 +508,6 @@ u3g_write_callback(struct usb2_xfer *xfe
 	switch (USB_GET_STATE(xfer)) {
 	case USB_ST_TRANSFERRED:
 	case USB_ST_SETUP:
-tr_setup:
 		if (usb2_com_get_data(ucom, xfer->frbuffers, 0,
 		    U3G_BSIZE, &actlen)) {
 			xfer->frlengths[0] = actlen;
@@ -519,8 +518,8 @@ tr_setup:
 	default:			/* Error */
 		if (xfer->error != USB_ERR_CANCELLED) {
 			/* do a builtin clear-stall */
-			xfer->flags.stall_pipe = 1;
-			goto tr_setup;
+			usb2_clear_endpoint_stall(xfer);
+			return;
 		}
 		break;
 	}
@@ -537,7 +536,6 @@ u3g_read_callback(struct usb2_xfer *xfer
 		usb2_com_put_data(ucom, xfer->frbuffers, 0, xfer->actlen);
 
 	case USB_ST_SETUP:
-tr_setup:
 		xfer->frlengths[0] = xfer->max_data_length;
 		usb2_start_hardware(xfer);
 		break;
@@ -545,8 +543,8 @@ tr_setup:
 	default:			/* Error */
 		if (xfer->error != USB_ERR_CANCELLED) {
 			/* do a builtin clear-stall */
-			xfer->flags.stall_pipe = 1;
-			goto tr_setup;
+			usb2_clear_endpoint_stall(xfer);
+			return;
 		}
 		break;
 	}

Modified: user/thompsa/usb/sys/dev/usb2/storage/ustorage2_fs.c
==============================================================================
--- user/thompsa/usb/sys/dev/usb2/storage/ustorage2_fs.c	Sun Feb  1 01:50:09 2009	(r187973)
+++ user/thompsa/usb/sys/dev/usb2/storage/ustorage2_fs.c	Sun Feb  1 02:04:24 2009	(r187974)
@@ -560,15 +560,7 @@ ustorage_fs_t_bbb_command_callback(struc
 		break;
 
 	case USB_ST_SETUP:
-tr_setup:
-		if (sc->sc_transfer.data_error) {
-			sc->sc_transfer.data_error = 0;
-			xfer->flags.stall_pipe = 1;
-			DPRINTF("stall pipe\n");
-		} else {
-			xfer->flags.stall_pipe = 0;
-		}
-
+		sc->sc_transfer.data_error = 0;
 		xfer->frlengths[0] = sizeof(sc->sc_cbw);
 		usb2_set_frame_data(xfer, &sc->sc_cbw, 0);
 		usb2_start_hardware(xfer);
@@ -581,10 +573,10 @@ tr_setup:
 		}
 		/* If the pipe is already stalled, don't do another stall */
 		if (!xfer->pipe->is_stalled) {
-			sc->sc_transfer.data_error = 1;
+			usb2_clear_endpoint_stall(xfer);
+			return;
 		}
-		/* try again */
-		goto tr_setup;
+		break;
 	}
 	if (error) {
 		if (sc->sc_csw.bCSWStatus == 0) {
@@ -628,16 +620,10 @@ ustorage_fs_t_bbb_data_dump_callback(str
 		/* Fallthrough */
 
 	case USB_ST_SETUP:
-tr_setup:
 		if (max_bulk > sc->sc_transfer.data_rem) {
 			max_bulk = sc->sc_transfer.data_rem;
 		}
-		if (sc->sc_transfer.data_error) {
-			sc->sc_transfer.data_error = 0;
-			xfer->flags.stall_pipe = 1;
-		} else {
-			xfer->flags.stall_pipe = 0;
-		}
+		sc->sc_transfer.data_error = 0;
 		xfer->frlengths[0] = max_bulk;
 		usb2_start_hardware(xfer);
 		break;
@@ -650,10 +636,10 @@ tr_setup:
 		 * If the pipe is already stalled, don't do another stall:
 		 */
 		if (!xfer->pipe->is_stalled) {
-			sc->sc_transfer.data_error = 1;
+			usb2_clear_endpoint_stall(xfer);
+			return;
 		}
-		/* try again */
-		goto tr_setup;
+		break;
 	}
 }
 
@@ -681,17 +667,10 @@ ustorage_fs_t_bbb_data_read_callback(str
 		/* Fallthrough */
 
 	case USB_ST_SETUP:
-tr_setup:
 		if (max_bulk > sc->sc_transfer.data_rem) {
 			max_bulk = sc->sc_transfer.data_rem;
 		}
-		if (sc->sc_transfer.data_error) {
-			sc->sc_transfer.data_error = 0;
-			xfer->flags.stall_pipe = 1;
-		} else {
-			xfer->flags.stall_pipe = 0;
-		}
-
+		sc->sc_transfer.data_error = 0;
 		xfer->frlengths[0] = max_bulk;
 		usb2_set_frame_data(xfer, sc->sc_transfer.data_ptr, 0);
 		usb2_start_hardware(xfer);
@@ -703,10 +682,10 @@ tr_setup:
 		}
 		/* If the pipe is already stalled, don't do another stall */
 		if (!xfer->pipe->is_stalled) {
-			sc->sc_transfer.data_error = 1;
+			usb2_clear_endpoint_stall(xfer);
+			return;
 		}
-		/* try again */
-		goto tr_setup;
+		break;
 	}
 }
 
@@ -732,7 +711,6 @@ ustorage_fs_t_bbb_data_write_callback(st
 			break;
 		}
 	case USB_ST_SETUP:
-tr_setup:
 		if (max_bulk >= sc->sc_transfer.data_rem) {
 			max_bulk = sc->sc_transfer.data_rem;
 			if (sc->sc_transfer.data_short) {
@@ -744,13 +722,7 @@ tr_setup:
 			xfer->flags.force_short_xfer = 0;
 		}
 
-		if (sc->sc_transfer.data_error) {
-			sc->sc_transfer.data_error = 0;
-			xfer->flags.stall_pipe = 1;
-		} else {
-			xfer->flags.stall_pipe = 0;
-		}
-
+		sc->sc_transfer.data_error = 0;
 		xfer->frlengths[0] = max_bulk;
 		usb2_set_frame_data(xfer, sc->sc_transfer.data_ptr, 0);
 		usb2_start_hardware(xfer);
@@ -765,10 +737,10 @@ tr_setup:
 		 * stall
 		 */
 		if (!xfer->pipe->is_stalled) {
-			sc->sc_transfer.data_error = 1;
+			usb2_clear_endpoint_stall(xfer);
+			return;
 		}
-		/* try again */
-		goto tr_setup;
+		break;
 	}
 }
 
@@ -785,17 +757,10 @@ ustorage_fs_t_bbb_status_callback(struct
 		break;
 
 	case USB_ST_SETUP:
-tr_setup:
 		USETDW(sc->sc_csw.dCSWSignature, CSWSIGNATURE);
 		USETDW(sc->sc_csw.dCSWDataResidue, sc->sc_transfer.data_rem);
 
-		if (sc->sc_transfer.data_error) {
-			sc->sc_transfer.data_error = 0;
-			xfer->flags.stall_pipe = 1;
-		} else {
-			xfer->flags.stall_pipe = 0;
-		}
-
+		sc->sc_transfer.data_error = 0;
 		xfer->frlengths[0] = sizeof(sc->sc_csw);
 		usb2_set_frame_data(xfer, &sc->sc_csw, 0);
 		usb2_start_hardware(xfer);
@@ -807,10 +772,10 @@ tr_setup:
 		}
 		/* If the pipe is already stalled, don't do another stall */
 		if (!xfer->pipe->is_stalled) {
-			sc->sc_transfer.data_error = 1;
+			usb2_clear_endpoint_stall(xfer);
+			return;
 		}
-		/* try again */
-		goto tr_setup;
+		break;
 	}
 }
 

From owner-svn-src-user@FreeBSD.ORG  Sun Feb  1 06:39:40 2009
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E444B1065745;
	Sun,  1 Feb 2009 06:39:40 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id D228A8FC18;
	Sun,  1 Feb 2009 06:39:40 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n116dejW045550;
	Sun, 1 Feb 2009 06:39:40 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n116deJF045541;
	Sun, 1 Feb 2009 06:39:40 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <200902010639.n116deJF045541@svn.freebsd.org>
From: Andrew Thompson <thompsa@FreeBSD.org>
Date: Sun, 1 Feb 2009 06:39:40 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r187977 - user/thompsa/usb/sys/dev/usb2/ethernet
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 01 Feb 2009 06:39:41 -0000

Author: thompsa
Date: Sun Feb  1 06:39:40 2009
New Revision: 187977
URL: http://svn.freebsd.org/changeset/base/187977

Log:
  Put the ethernet drivers on a further diet, use the built in stall handling and
  remove the clearstall xfers.

Modified:
  user/thompsa/usb/sys/dev/usb2/ethernet/if_aue2.c
  user/thompsa/usb/sys/dev/usb2/ethernet/if_auereg.h
  user/thompsa/usb/sys/dev/usb2/ethernet/if_axe2.c
  user/thompsa/usb/sys/dev/usb2/ethernet/if_axereg.h
  user/thompsa/usb/sys/dev/usb2/ethernet/if_cdce2.c
  user/thompsa/usb/sys/dev/usb2/ethernet/if_cue2.c
  user/thompsa/usb/sys/dev/usb2/ethernet/if_cuereg.h
  user/thompsa/usb/sys/dev/usb2/ethernet/if_kue2.c
  user/thompsa/usb/sys/dev/usb2/ethernet/if_kuereg.h
  user/thompsa/usb/sys/dev/usb2/ethernet/if_rue2.c
  user/thompsa/usb/sys/dev/usb2/ethernet/if_ruereg.h
  user/thompsa/usb/sys/dev/usb2/ethernet/if_udav2.c
  user/thompsa/usb/sys/dev/usb2/ethernet/if_udavreg.h

Modified: user/thompsa/usb/sys/dev/usb2/ethernet/if_aue2.c
==============================================================================
--- user/thompsa/usb/sys/dev/usb2/ethernet/if_aue2.c	Sun Feb  1 06:15:46 2009	(r187976)
+++ user/thompsa/usb/sys/dev/usb2/ethernet/if_aue2.c	Sun Feb  1 06:39:40 2009	(r187977)
@@ -178,11 +178,8 @@ static miibus_readreg_t aue_miibus_readr
 static miibus_writereg_t aue_miibus_writereg;
 static miibus_statchg_t aue_miibus_statchg;
 
-static usb2_callback_t aue_intr_clear_stall_callback;
 static usb2_callback_t aue_intr_callback;
-static usb2_callback_t aue_bulk_read_clear_stall_callback;
 static usb2_callback_t aue_bulk_read_callback;
-static usb2_callback_t aue_bulk_write_clear_stall_callback;
 static usb2_callback_t aue_bulk_write_callback;
 
 static uint8_t	aue_csr_read_1(struct aue_softc *, uint16_t);
@@ -204,8 +201,7 @@ static int	aue_ifmedia_upd(struct ifnet 
 static void	aue_ifmedia_sts(struct ifnet *, struct ifmediareq *);
 
 static const struct usb2_config aue_config[AUE_N_TRANSFER] = {
-
-	[AUE_BULK_DT_WR] = {
+	[AUE_BULK_WR] = {
 		.type = UE_BULK,
 		.endpoint = UE_ADDR_ANY,
 		.direction = UE_DIR_OUT,
@@ -214,8 +210,7 @@ static const struct usb2_config aue_conf
 		.mh.callback = aue_bulk_write_callback,
 		.mh.timeout = 10000,	/* 10 seconds */
 	},
-
-	[AUE_BULK_DT_RD] = {
+	[AUE_BULK_RD] = {
 		.type = UE_BULK,
 		.endpoint = UE_ADDR_ANY,
 		.direction = UE_DIR_IN,
@@ -223,29 +218,6 @@ static const struct usb2_config aue_conf
 		.mh.flags = {.pipe_bof = 1,.short_xfer_ok = 1,},
 		.mh.callback = aue_bulk_read_callback,
 	},
-
-	[AUE_BULK_CS_WR] = {
-		.type = UE_CONTROL,
-		.endpoint = 0x00,	/* Control pipe */
-		.direction = UE_DIR_ANY,
-		.mh.bufsize = sizeof(struct usb2_device_request),
-		.mh.flags = {},
-		.mh.callback = aue_bulk_write_clear_stall_callback,
-		.mh.timeout = 1000,	/* 1 second */
-		.mh.interval = 50,	/* 50ms */
-	},
-
-	[AUE_BULK_CS_RD] = {
-		.type = UE_CONTROL,
-		.endpoint = 0x00,	/* Control pipe */
-		.direction = UE_DIR_ANY,
-		.mh.bufsize = sizeof(struct usb2_device_request),
-		.mh.flags = {},
-		.mh.callback = aue_bulk_read_clear_stall_callback,
-		.mh.timeout = 1000,	/* 1 second */
-		.mh.interval = 50,	/* 50ms */
-	},
-
 	[AUE_INTR_DT_RD] = {
 		.type = UE_INTERRUPT,
 		.endpoint = UE_ADDR_ANY,
@@ -254,17 +226,6 @@ static const struct usb2_config aue_conf
 		.mh.bufsize = 0,	/* use wMaxPacketSize */
 		.mh.callback = aue_intr_callback,
 	},
-
-	[AUE_INTR_CS_RD] = {
-		.type = UE_CONTROL,
-		.endpoint = 0x00,	/* Control pipe */
-		.direction = UE_DIR_ANY,
-		.mh.bufsize = sizeof(struct usb2_device_request),
-		.mh.flags = {},
-		.mh.callback = aue_intr_clear_stall_callback,
-		.mh.timeout = 1000,	/* 1 second */
-		.mh.interval = 50,	/* 50ms */
-	},
 };
 
 static device_method_t aue_methods[] = {
@@ -728,19 +689,6 @@ aue_detach(device_t dev)
 }
 
 static void
-aue_intr_clear_stall_callback(struct usb2_xfer *xfer)
-{
-	struct aue_softc *sc = xfer->priv_sc;
-	struct usb2_xfer *xfer_other = sc->sc_xfer[AUE_INTR_DT_RD];
-
-	if (usb2_clear_stall_callback(xfer, xfer_other)) {
-		DPRINTF("stall cleared\n");
-		sc->sc_flags &= ~AUE_FLAG_INTR_STALL;
-		usb2_transfer_start(xfer_other);
-	}
-}
-
-static void
 aue_intr_callback(struct usb2_xfer *xfer)
 {
 	struct aue_softc *sc = xfer->priv_sc;
@@ -749,7 +697,6 @@ aue_intr_callback(struct usb2_xfer *xfer
 
 	switch (USB_GET_STATE(xfer)) {
 	case USB_ST_TRANSFERRED:
-
 		if ((ifp->if_drv_flags & IFF_DRV_RUNNING) &&
 		    xfer->actlen >= sizeof(pkt)) {
 
@@ -763,34 +710,17 @@ aue_intr_callback(struct usb2_xfer *xfer
 		}
 		/* FALLTHROUGH */
 	case USB_ST_SETUP:
-		if (sc->sc_flags & AUE_FLAG_INTR_STALL) {
-			usb2_transfer_start(sc->sc_xfer[AUE_INTR_CS_RD]);
-		} else {
-			xfer->frlengths[0] = xfer->max_data_length;
-			usb2_start_hardware(xfer);
-		}
-		return;
+		xfer->frlengths[0] = xfer->max_data_length;
+		usb2_start_hardware(xfer);
+		break;
 
 	default:			/* Error */
 		if (xfer->error != USB_ERR_CANCELLED) {
 			/* start clear stall */
-			sc->sc_flags |= AUE_FLAG_INTR_STALL;
-			usb2_transfer_start(sc->sc_xfer[AUE_INTR_CS_RD]);
+			usb2_clear_endpoint_stall(xfer);
+			return;
 		}
-		return;
-	}
-}
-
-static void
-aue_bulk_read_clear_stall_callback(struct usb2_xfer *xfer)
-{
-	struct aue_softc *sc = xfer->priv_sc;
-	struct usb2_xfer *xfer_other = sc->sc_xfer[AUE_BULK_DT_RD];
-
-	if (usb2_clear_stall_callback(xfer, xfer_other)) {
-		DPRINTF("stall cleared\n");
-		sc->sc_flags &= ~AUE_FLAG_READ_STALL;
-		usb2_transfer_start(xfer_other);
+		break;
 	}
 }
 
@@ -838,39 +768,19 @@ aue_bulk_read_callback(struct usb2_xfer 
 		/* FALLTHROUGH */
 	case USB_ST_SETUP:
 tr_setup:
-
-		if (sc->sc_flags & AUE_FLAG_READ_STALL) {
-			usb2_transfer_start(sc->sc_xfer[AUE_BULK_CS_RD]);
-		} else {
-			xfer->frlengths[0] = xfer->max_data_length;
-			usb2_start_hardware(xfer);
-		}
+		xfer->frlengths[0] = xfer->max_data_length;
+		usb2_start_hardware(xfer);
 		usb2_ether_rxflush(ue);
-		return;
+		break;
 
 	default:			/* Error */
 		if (xfer->error != USB_ERR_CANCELLED) {
 			/* try to clear stall first */
-			sc->sc_flags |= AUE_FLAG_READ_STALL;
-			usb2_transfer_start(sc->sc_xfer[AUE_BULK_CS_RD]);
+			usb2_clear_endpoint_stall(xfer);
+			return;
 		}
-		DPRINTF("bulk read error, %s\n",
-		    usb2_errstr(xfer->error));
-		return;
-
-	}
-}
-
-static void
-aue_bulk_write_clear_stall_callback(struct usb2_xfer *xfer)
-{
-	struct aue_softc *sc = xfer->priv_sc;
-	struct usb2_xfer *xfer_other = sc->sc_xfer[AUE_BULK_DT_WR];
-
-	if (usb2_clear_stall_callback(xfer, xfer_other)) {
-		DPRINTF("stall cleared\n");
-		sc->sc_flags &= ~AUE_FLAG_WRITE_STALL;
-		usb2_transfer_start(xfer_other);
+		DPRINTF("bulk read error, %s\n", usb2_errstr(xfer->error));
+		break;
 	}
 }
 
@@ -889,22 +799,13 @@ aue_bulk_write_callback(struct usb2_xfer
 
 		/* FALLTHROUGH */
 	case USB_ST_SETUP:
+		if ((sc->sc_flags & AUE_FLAG_LINK) == 0)
+			break;
 
-		if (sc->sc_flags & AUE_FLAG_WRITE_STALL) {
-			usb2_transfer_start(sc->sc_xfer[AUE_BULK_CS_WR]);
-			goto done;
-		}
-		if ((sc->sc_flags & AUE_FLAG_LINK) == 0) {
-			/*
-			 * don't send anything if there is no link !
-			 */
-			goto done;
-		}
 		IFQ_DRV_DEQUEUE(&ifp->if_snd, m);
+		if (m == NULL)
+			break;
 
-		if (m == NULL) {
-			goto done;
-		}
 		if (m->m_pkthdr.len > MCLBYTES) {
 			m->m_pkthdr.len = MCLBYTES;
 		}
@@ -939,13 +840,9 @@ aue_bulk_write_callback(struct usb2_xfer
 		 * of this frame to him:
 		 */
 		BPF_MTAP(ifp, m);
-
 		m_freem(m);
-
 		usb2_start_hardware(xfer);
-
-done:
-		return;
+		break;
 
 	default:			/* Error */
 		DPRINTFN(11, "transfer error, %s\n",
@@ -953,12 +850,11 @@ done:
 
 		if (xfer->error != USB_ERR_CANCELLED) {
 			/* try to clear stall first */
-			sc->sc_flags |= AUE_FLAG_WRITE_STALL;
-			usb2_transfer_start(sc->sc_xfer[AUE_BULK_CS_WR]);
+			usb2_clear_endpoint_stall(xfer);
+			return;
 		}
 		ifp->if_oerrors++;
-		return;
-
+		break;
 	}
 }
 
@@ -988,8 +884,8 @@ aue_start(struct usb2_ether *ue)
 	 * start the USB transfers, if not already started:
 	 */
 	usb2_transfer_start(sc->sc_xfer[AUE_INTR_DT_RD]);
-	usb2_transfer_start(sc->sc_xfer[AUE_BULK_DT_RD]);
-	usb2_transfer_start(sc->sc_xfer[AUE_BULK_DT_WR]);
+	usb2_transfer_start(sc->sc_xfer[AUE_BULK_RD]);
+	usb2_transfer_start(sc->sc_xfer[AUE_BULK_WR]);
 }
 
 static void
@@ -1023,8 +919,6 @@ aue_init(struct usb2_ether *ue)
 	AUE_SETBIT(sc, AUE_CTL0, AUE_CTL0_TX_ENB);
 	AUE_SETBIT(sc, AUE_CTL2, AUE_CTL2_EP3_CLR);
 
-	sc->sc_flags |= AUE_FLAG_READ_STALL | AUE_FLAG_WRITE_STALL;
-
 	ifp->if_drv_flags |= IFF_DRV_RUNNING;
 	aue_start(ue);
 }
@@ -1100,12 +994,9 @@ aue_stop(struct usb2_ether *ue)
 	/*
 	 * stop all the transfers, if not already stopped:
 	 */
-	usb2_transfer_stop(sc->sc_xfer[AUE_BULK_DT_WR]);
-	usb2_transfer_stop(sc->sc_xfer[AUE_BULK_DT_RD]);
-	usb2_transfer_stop(sc->sc_xfer[AUE_BULK_CS_WR]);
-	usb2_transfer_stop(sc->sc_xfer[AUE_BULK_CS_RD]);
+	usb2_transfer_stop(sc->sc_xfer[AUE_BULK_WR]);
+	usb2_transfer_stop(sc->sc_xfer[AUE_BULK_RD]);
 	usb2_transfer_stop(sc->sc_xfer[AUE_INTR_DT_RD]);
-	usb2_transfer_stop(sc->sc_xfer[AUE_INTR_CS_RD]);
 
 	aue_csr_write_1(sc, AUE_CTL0, 0);
 	aue_csr_write_1(sc, AUE_CTL1, 0);

Modified: user/thompsa/usb/sys/dev/usb2/ethernet/if_auereg.h
==============================================================================
--- user/thompsa/usb/sys/dev/usb2/ethernet/if_auereg.h	Sun Feb  1 06:15:46 2009	(r187976)
+++ user/thompsa/usb/sys/dev/usb2/ethernet/if_auereg.h	Sun Feb  1 06:39:40 2009	(r187977)
@@ -61,13 +61,10 @@
  * endpoint to be index 0 and work up from there.
  */
 enum {
-	AUE_BULK_DT_WR,
-	AUE_BULK_DT_RD,
-	AUE_BULK_CS_WR,
-	AUE_BULK_CS_RD,
+	AUE_BULK_WR,
+	AUE_BULK_RD,
 	AUE_INTR_DT_RD,
-	AUE_INTR_CS_RD,
-	AUE_N_TRANSFER = 6,
+	AUE_N_TRANSFER = 3,
 };
 
 #define	AUE_INTR_PKTLEN		0x8
@@ -216,12 +213,9 @@ struct aue_softc {
 #define	AUE_FLAG_PNA		0x0002	/* has Home PNA */
 #define	AUE_FLAG_PII		0x0004	/* Pegasus II chip */
 #define	AUE_FLAG_LINK		0x0008	/* wait for link to come up */
-#define	AUE_FLAG_READ_STALL	0x0010	/* wait for clearing of stall */
-#define	AUE_FLAG_WRITE_STALL	0x0020	/* wait for clearing of stall */
-#define	AUE_FLAG_INTR_STALL	0x0040	/* wait for clearing of stall */
-#define	AUE_FLAG_DETACH		0x0080	/* card gone */
-#define	AUE_FLAG_VER_2		0x0200	/* chip is version 2 */
-#define	AUE_FLAG_DUAL_PHY	0x0400	/* chip has two transcivers */
+#define	AUE_FLAG_DETACH		0x0010	/* card gone */
+#define	AUE_FLAG_VER_2		0x0020	/* chip is version 2 */
+#define	AUE_FLAG_DUAL_PHY	0x0040	/* chip has two transcivers */
 };
 
 #define	AUE_LOCK(_sc)		mtx_lock(&(_sc)->sc_mtx)

Modified: user/thompsa/usb/sys/dev/usb2/ethernet/if_axe2.c
==============================================================================
--- user/thompsa/usb/sys/dev/usb2/ethernet/if_axe2.c	Sun Feb  1 06:15:46 2009	(r187976)
+++ user/thompsa/usb/sys/dev/usb2/ethernet/if_axe2.c	Sun Feb  1 06:39:40 2009	(r187977)
@@ -153,11 +153,8 @@ static device_attach_t axe_attach;
 static device_detach_t axe_detach;
 static device_shutdown_t axe_shutdown;
 
-static usb2_callback_t axe_intr_clear_stall_callback;
 static usb2_callback_t axe_intr_callback;
-static usb2_callback_t axe_bulk_read_clear_stall_callback;
 static usb2_callback_t axe_bulk_read_callback;
-static usb2_callback_t axe_bulk_write_clear_stall_callback;
 static usb2_callback_t axe_bulk_write_callback;
 
 static miibus_readreg_t axe_miibus_readreg;
@@ -178,8 +175,7 @@ static void	axe_ax88772_init(struct axe_
 static int	axe_get_phyno(struct axe_softc *, int);
 
 static const struct usb2_config axe_config[AXE_N_TRANSFER] = {
-
-	[AXE_BULK_DT_WR] = {
+	[AXE_BULK_WR] = {
 		.type = UE_BULK,
 		.endpoint = UE_ADDR_ANY,
 		.direction = UE_DIR_OUT,
@@ -188,42 +184,15 @@ static const struct usb2_config axe_conf
 		.mh.callback = axe_bulk_write_callback,
 		.mh.timeout = 10000,	/* 10 seconds */
 	},
-
-	[AXE_BULK_DT_RD] = {
+	[AXE_BULK_RD] = {
 		.type = UE_BULK,
 		.endpoint = UE_ADDR_ANY,
 		.direction = UE_DIR_IN,
-#if (MCLBYTES < 2048)
-#error "(MCLBYTES < 2048)"
-#endif
 		.mh.bufsize = MCLBYTES,
 		.mh.flags = {.pipe_bof = 1,.short_xfer_ok = 1,},
 		.mh.callback = axe_bulk_read_callback,
 		.mh.timeout = 0,	/* no timeout */
 	},
-
-	[AXE_BULK_CS_WR] = {
-		.type = UE_CONTROL,
-		.endpoint = 0x00,	/* Control pipe */
-		.direction = UE_DIR_ANY,
-		.mh.bufsize = sizeof(struct usb2_device_request),
-		.mh.flags = {},
-		.mh.callback = axe_bulk_write_clear_stall_callback,
-		.mh.timeout = 1000,	/* 1 second */
-		.mh.interval = 50,	/* 50ms */
-	},
-
-	[AXE_BULK_CS_RD] = {
-		.type = UE_CONTROL,
-		.endpoint = 0x00,	/* Control pipe */
-		.direction = UE_DIR_ANY,
-		.mh.bufsize = sizeof(struct usb2_device_request),
-		.mh.flags = {},
-		.mh.callback = axe_bulk_read_clear_stall_callback,
-		.mh.timeout = 1000,	/* 1 second */
-		.mh.interval = 50,	/* 50ms */
-	},
-
 	[AXE_INTR_DT_RD] = {
 		.type = UE_INTERRUPT,
 		.endpoint = UE_ADDR_ANY,
@@ -232,17 +201,6 @@ static const struct usb2_config axe_conf
 		.mh.bufsize = 0,	/* use wMaxPacketSize */
 		.mh.callback = axe_intr_callback,
 	},
-
-	[AXE_INTR_CS_RD] = {
-		.type = UE_CONTROL,
-		.endpoint = 0x00,	/* Control pipe */
-		.direction = UE_DIR_ANY,
-		.mh.bufsize = sizeof(struct usb2_device_request),
-		.mh.flags = {},
-		.mh.callback = axe_intr_clear_stall_callback,
-		.mh.timeout = 1000,	/* 1 second */
-		.mh.interval = 50,	/* 50ms */
-	},
 };
 
 static device_method_t axe_methods[] = {
@@ -736,61 +694,26 @@ axe_detach(device_t dev)
 }
 
 static void
-axe_intr_clear_stall_callback(struct usb2_xfer *xfer)
-{
-	struct axe_softc *sc = xfer->priv_sc;
-	struct usb2_xfer *xfer_other = sc->sc_xfer[AXE_INTR_DT_RD];
-
-	if (usb2_clear_stall_callback(xfer, xfer_other)) {
-		DPRINTF("stall cleared\n");
-		sc->sc_flags &= ~AXE_FLAG_INTR_STALL;
-		usb2_transfer_start(xfer_other);
-	}
-}
-
-static void
 axe_intr_callback(struct usb2_xfer *xfer)
 {
-	struct axe_softc *sc = xfer->priv_sc;
 
 	switch (USB_GET_STATE(xfer)) {
 	case USB_ST_TRANSFERRED:
 	case USB_ST_SETUP:
-		if (sc->sc_flags & AXE_FLAG_INTR_STALL) {
-			usb2_transfer_start(sc->sc_xfer[AXE_INTR_CS_RD]);
-		} else {
-			xfer->frlengths[0] = xfer->max_data_length;
-			usb2_start_hardware(xfer);
-		}
-		return;
+		xfer->frlengths[0] = xfer->max_data_length;
+		usb2_start_hardware(xfer);
+		break;
 
 	default:			/* Error */
 		if (xfer->error != USB_ERR_CANCELLED) {
 			/* start clear stall */
-			sc->sc_flags |= AXE_FLAG_INTR_STALL;
-			usb2_transfer_start(sc->sc_xfer[AXE_INTR_CS_RD]);
+			usb2_clear_endpoint_stall(xfer);
+			return;
 		}
-		return;
-	}
-}
-
-static void
-axe_bulk_read_clear_stall_callback(struct usb2_xfer *xfer)
-{
-	struct axe_softc *sc = xfer->priv_sc;
-	struct usb2_xfer *xfer_other = sc->sc_xfer[AXE_BULK_DT_RD];
-
-	if (usb2_clear_stall_callback(xfer, xfer_other)) {
-		DPRINTF("stall cleared\n");
-		sc->sc_flags &= ~AXE_FLAG_READ_STALL;
-		usb2_transfer_start(xfer_other);
+		break;
 	}
 }
 
-#if (AXE_BULK_BUF_SIZE >= 0x10000)
-#error "Please update axe_bulk_read_callback()!"
-#endif
-
 static void
 axe_bulk_read_callback(struct usb2_xfer *xfer)
 {
@@ -850,44 +773,22 @@ axe_bulk_read_callback(struct usb2_xfer 
 		/* FALLTHROUGH */
 	case USB_ST_SETUP:
 tr_setup:
-		if (sc->sc_flags & AXE_FLAG_READ_STALL) {
-			usb2_transfer_start(sc->sc_xfer[AXE_BULK_CS_RD]);
-		} else {
-			xfer->frlengths[0] = xfer->max_data_length;
-			usb2_start_hardware(xfer);
-		}
+		xfer->frlengths[0] = xfer->max_data_length;
+		usb2_start_hardware(xfer);
 		usb2_ether_rxflush(ue);
-		return;
+		break;
 
 	default:			/* Error */
 		if (xfer->error != USB_ERR_CANCELLED) {
 			/* try to clear stall first */
-			sc->sc_flags |= AXE_FLAG_READ_STALL;
-			usb2_transfer_start(sc->sc_xfer[AXE_BULK_CS_RD]);
+			usb2_clear_endpoint_stall(xfer);
+			return;
 		}
 		DPRINTF("bulk read error, %s\n", usb2_errstr(xfer->error));
-		return;
-
-	}
-}
-
-static void
-axe_bulk_write_clear_stall_callback(struct usb2_xfer *xfer)
-{
-	struct axe_softc *sc = xfer->priv_sc;
-	struct usb2_xfer *xfer_other = sc->sc_xfer[AXE_BULK_DT_WR];
-
-	if (usb2_clear_stall_callback(xfer, xfer_other)) {
-		DPRINTF("stall cleared\n");
-		sc->sc_flags &= ~AXE_FLAG_WRITE_STALL;
-		usb2_transfer_start(xfer_other);
+		break;
 	}
 }
 
-#if ((AXE_BULK_BUF_SIZE >= 0x10000) || (AXE_BULK_BUF_SIZE < (MCLBYTES+4)))
-#error "Please update axe_bulk_write_callback()!"
-#endif
-
 static void
 axe_bulk_write_callback(struct usb2_xfer *xfer)
 {
@@ -904,10 +805,6 @@ axe_bulk_write_callback(struct usb2_xfer
 		/* FALLTHROUGH */
 	case USB_ST_SETUP:
 
-		if (sc->sc_flags & AXE_FLAG_WRITE_STALL) {
-			usb2_transfer_start(sc->sc_xfer[AXE_BULK_CS_WR]);
-			goto done;
-		}
 		if ((sc->sc_flags & AXE_FLAG_LINK) == 0) {
 			/*
 			 * don't send anything if there is no link !
@@ -974,7 +871,7 @@ axe_bulk_write_callback(struct usb2_xfer
 		usb2_start_hardware(xfer);
 
 done:
-		return;
+		break;
 
 	default:			/* Error */
 		DPRINTFN(11, "transfer error, %s\n",
@@ -982,12 +879,11 @@ done:
 
 		if (xfer->error != USB_ERR_CANCELLED) {
 			/* try to clear stall first */
-			sc->sc_flags |= AXE_FLAG_WRITE_STALL;
-			usb2_transfer_start(sc->sc_xfer[AXE_BULK_CS_WR]);
+			usb2_clear_endpoint_stall(xfer);
+			return;
 		}
 		ifp->if_oerrors++;
-		return;
-
+		break;
 	}
 }
 
@@ -1017,8 +913,8 @@ axe_start(struct usb2_ether *ue)
 	 * start the USB transfers, if not already started:
 	 */
 	usb2_transfer_start(sc->sc_xfer[AXE_INTR_DT_RD]);
-	usb2_transfer_start(sc->sc_xfer[AXE_BULK_DT_RD]);
-	usb2_transfer_start(sc->sc_xfer[AXE_BULK_DT_WR]);
+	usb2_transfer_start(sc->sc_xfer[AXE_BULK_RD]);
+	usb2_transfer_start(sc->sc_xfer[AXE_BULK_WR]);
 }
 
 static void
@@ -1071,8 +967,6 @@ axe_init(struct usb2_ether *ue)
 	/* Load the multicast filter. */
 	axe_setmulti(ue);
 
-	sc->sc_flags |= AXE_FLAG_READ_STALL | AXE_FLAG_WRITE_STALL;
-
 	ifp->if_drv_flags |= IFF_DRV_RUNNING;
 	axe_start(ue);
 }
@@ -1113,12 +1007,9 @@ axe_stop(struct usb2_ether *ue)
 	/*
 	 * stop all the transfers, if not already stopped:
 	 */
-	usb2_transfer_stop(sc->sc_xfer[AXE_BULK_DT_WR]);
-	usb2_transfer_stop(sc->sc_xfer[AXE_BULK_DT_RD]);
-	usb2_transfer_stop(sc->sc_xfer[AXE_BULK_CS_WR]);
-	usb2_transfer_stop(sc->sc_xfer[AXE_BULK_CS_RD]);
+	usb2_transfer_stop(sc->sc_xfer[AXE_BULK_WR]);
+	usb2_transfer_stop(sc->sc_xfer[AXE_BULK_RD]);
 	usb2_transfer_stop(sc->sc_xfer[AXE_INTR_DT_RD]);
-	usb2_transfer_stop(sc->sc_xfer[AXE_INTR_CS_RD]);
 
 	axe_reset(sc);
 }

Modified: user/thompsa/usb/sys/dev/usb2/ethernet/if_axereg.h
==============================================================================
--- user/thompsa/usb/sys/dev/usb2/ethernet/if_axereg.h	Sun Feb  1 06:15:46 2009	(r187976)
+++ user/thompsa/usb/sys/dev/usb2/ethernet/if_axereg.h	Sun Feb  1 06:39:40 2009	(r187977)
@@ -170,13 +170,10 @@ struct axe_sframe_hdr {
 
 /* The interrupt endpoint is currently unused by the ASIX part. */
 enum {
-	AXE_BULK_DT_WR,
-	AXE_BULK_DT_RD,
-	AXE_BULK_CS_WR,
-	AXE_BULK_CS_RD,
+	AXE_BULK_WR,
+	AXE_BULK_RD,
 	AXE_INTR_DT_RD,
-	AXE_INTR_CS_RD,
-	AXE_N_TRANSFER = 6,
+	AXE_N_TRANSFER = 3,
 };
 
 struct axe_softc {
@@ -189,12 +186,9 @@ struct axe_softc {
 
 	int			sc_flags;
 #define	AXE_FLAG_LINK		0x0001
-#define	AXE_FLAG_INTR_STALL	0x0002
-#define	AXE_FLAG_READ_STALL	0x0004
-#define	AXE_FLAG_WRITE_STALL	0x0008
-#define	AXE_FLAG_DETACH		0x0010
-#define	AXE_FLAG_772		0x1000	/* AX88772 */
-#define	AXE_FLAG_178		0x2000	/* AX88178 */
+#define	AXE_FLAG_DETACH		0x0002
+#define	AXE_FLAG_772		0x0004	/* AX88772 */
+#define	AXE_FLAG_178		0x0008	/* AX88178 */
 
 	uint8_t			sc_ipgs[3];
 	uint8_t			sc_phyaddrs[2];

Modified: user/thompsa/usb/sys/dev/usb2/ethernet/if_cdce2.c
==============================================================================
--- user/thompsa/usb/sys/dev/usb2/ethernet/if_cdce2.c	Sun Feb  1 06:15:46 2009	(r187976)
+++ user/thompsa/usb/sys/dev/usb2/ethernet/if_cdce2.c	Sun Feb  1 06:39:40 2009	(r187977)
@@ -99,7 +99,6 @@ SYSCTL_INT(_hw_usb2_cdce, OID_AUTO, forc
 #endif
 
 static const struct usb2_config cdce_config[CDCE_N_TRANSFER] = {
-
 	[CDCE_BULK_A] = {
 		.type = UE_BULK,
 		.endpoint = UE_ADDR_ANY,
@@ -118,7 +117,6 @@ static const struct usb2_config cdce_con
 		.md.callback = cdce_bulk_read_callback,
 		.md.timeout = 0,	/* no timeout */
 	},
-
 	[CDCE_BULK_B] = {
 		.type = UE_BULK,
 		.endpoint = UE_ADDR_ANY,
@@ -137,7 +135,6 @@ static const struct usb2_config cdce_con
 		.md.callback = cdce_bulk_write_callback,
 		.md.timeout = 10000,	/* 10 seconds */
 	},
-
 	[CDCE_INTR] = {
 		.type = UE_INTERRUPT,
 		.endpoint = UE_ADDR_ANY,

Modified: user/thompsa/usb/sys/dev/usb2/ethernet/if_cue2.c
==============================================================================
--- user/thompsa/usb/sys/dev/usb2/ethernet/if_cue2.c	Sun Feb  1 06:15:46 2009	(r187976)
+++ user/thompsa/usb/sys/dev/usb2/ethernet/if_cue2.c	Sun Feb  1 06:39:40 2009	(r187977)
@@ -88,9 +88,7 @@ static device_attach_t cue_attach;
 static device_detach_t cue_detach;
 static device_shutdown_t cue_shutdown;
 
-static usb2_callback_t cue_bulk_read_clear_stall_callback;
 static usb2_callback_t cue_bulk_read_callback;
-static usb2_callback_t cue_bulk_write_clear_stall_callback;
 static usb2_callback_t cue_bulk_write_callback;
 
 static uint8_t	cue_csr_read_1(struct cue_softc *, uint16_t);
@@ -116,8 +114,7 @@ SYSCTL_INT(_hw_usb2_cue, OID_AUTO, debug
 #endif
 
 static const struct usb2_config cue_config[CUE_N_TRANSFER] = {
-
-	[CUE_BULK_DT_WR] = {
+	[CUE_BULK_WR] = {
 		.type = UE_BULK,
 		.endpoint = UE_ADDR_ANY,
 		.direction = UE_DIR_OUT,
@@ -126,8 +123,7 @@ static const struct usb2_config cue_conf
 		.mh.callback = cue_bulk_write_callback,
 		.mh.timeout = 10000,	/* 10 seconds */
 	},
-
-	[CUE_BULK_DT_RD] = {
+	[CUE_BULK_RD] = {
 		.type = UE_BULK,
 		.endpoint = UE_ADDR_ANY,
 		.direction = UE_DIR_IN,
@@ -135,28 +131,6 @@ static const struct usb2_config cue_conf
 		.mh.flags = {.pipe_bof = 1,.short_xfer_ok = 1,},
 		.mh.callback = cue_bulk_read_callback,
 	},
-
-	[CUE_BULK_CS_WR] = {
-		.type = UE_CONTROL,
-		.endpoint = 0x00,	/* Control pipe */
-		.direction = UE_DIR_ANY,
-		.mh.bufsize = sizeof(struct usb2_device_request),
-		.mh.flags = {},
-		.mh.callback = cue_bulk_write_clear_stall_callback,
-		.mh.timeout = 1000,	/* 1 second */
-		.mh.interval = 50,	/* 50ms */
-	},
-
-	[CUE_BULK_CS_RD] = {
-		.type = UE_CONTROL,
-		.endpoint = 0x00,	/* Control pipe */
-		.direction = UE_DIR_ANY,
-		.mh.bufsize = sizeof(struct usb2_device_request),
-		.mh.flags = {},
-		.mh.callback = cue_bulk_read_clear_stall_callback,
-		.mh.timeout = 1000,	/* 1 second */
-		.mh.interval = 50,	/* 50ms */
-	},
 };
 
 static device_method_t cue_methods[] = {
@@ -448,19 +422,6 @@ cue_detach(device_t dev)
 }
 
 static void
-cue_bulk_read_clear_stall_callback(struct usb2_xfer *xfer)
-{
-	struct cue_softc *sc = xfer->priv_sc;
-	struct usb2_xfer *xfer_other = sc->sc_xfer[CUE_BULK_DT_RD];
-
-	if (usb2_clear_stall_callback(xfer, xfer_other)) {
-		DPRINTF("stall cleared\n");
-		sc->sc_flags &= ~CUE_FLAG_READ_STALL;
-		usb2_transfer_start(xfer_other);
-	}
-}
-
-static void
 cue_bulk_read_callback(struct usb2_xfer *xfer)
 {
 	struct cue_softc *sc = xfer->priv_sc;
@@ -485,39 +446,20 @@ cue_bulk_read_callback(struct usb2_xfer 
 		/* FALLTHROUGH */
 	case USB_ST_SETUP:
 tr_setup:
-
-		if (sc->sc_flags & CUE_FLAG_READ_STALL) {
-			usb2_transfer_start(sc->sc_xfer[CUE_BULK_CS_RD]);
-		} else {
-			xfer->frlengths[0] = xfer->max_data_length;
-			usb2_start_hardware(xfer);
-		}
+		xfer->frlengths[0] = xfer->max_data_length;
+		usb2_start_hardware(xfer);
 		usb2_ether_rxflush(ue);
-		return;
+		break;
 
 	default:			/* Error */
 		if (xfer->error != USB_ERR_CANCELLED) {
 			/* try to clear stall first */
-			sc->sc_flags |= CUE_FLAG_READ_STALL;
-			usb2_transfer_start(sc->sc_xfer[CUE_BULK_CS_RD]);
+			usb2_clear_endpoint_stall(xfer);
+			return;
 		}
 		DPRINTF("bulk read error, %s\n",
 		    usb2_errstr(xfer->error));
-		return;
-
-	}
-}
-
-static void
-cue_bulk_write_clear_stall_callback(struct usb2_xfer *xfer)
-{
-	struct cue_softc *sc = xfer->priv_sc;
-	struct usb2_xfer *xfer_other = sc->sc_xfer[CUE_BULK_DT_WR];
-
-	if (usb2_clear_stall_callback(xfer, xfer_other)) {
-		DPRINTF("stall cleared\n");
-		sc->sc_flags &= ~CUE_FLAG_WRITE_STALL;
-		usb2_transfer_start(xfer_other);
+		break;
 	}
 }
 
@@ -537,15 +479,10 @@ cue_bulk_write_callback(struct usb2_xfer
 		/* FALLTHROUGH */
 	case USB_ST_SETUP:
 
-		if (sc->sc_flags & CUE_FLAG_WRITE_STALL) {
-			usb2_transfer_start(sc->sc_xfer[CUE_BULK_CS_WR]);
-			goto done;
-		}
 		IFQ_DRV_DEQUEUE(&ifp->if_snd, m);
+		if (m == NULL)
+			break;
 
-		if (m == NULL) {
-			goto done;
-		}
 		if (m->m_pkthdr.len > MCLBYTES) {
 			m->m_pkthdr.len = MCLBYTES;
 		}
@@ -566,13 +503,9 @@ cue_bulk_write_callback(struct usb2_xfer
 		 * to him.
 		 */
 		BPF_MTAP(ifp, m);
-
 		m_freem(m);
-
 		usb2_start_hardware(xfer);
-
-done:
-		return;
+		break;
 
 	default:			/* Error */
 		DPRINTFN(11, "transfer error, %s\n",
@@ -580,12 +513,11 @@ done:
 
 		if (xfer->error != USB_ERR_CANCELLED) {
 			/* try to clear stall first */
-			sc->sc_flags |= CUE_FLAG_WRITE_STALL;
-			usb2_transfer_start(sc->sc_xfer[CUE_BULK_CS_WR]);
+			usb2_clear_endpoint_stall(xfer);
+			return;
 		}
 		ifp->if_oerrors++;
-		return;
-
+		break;
 	}
 }
 
@@ -613,8 +545,8 @@ cue_start(struct usb2_ether *ue)
 	/*
 	 * start the USB transfers, if not already started:
 	 */
-	usb2_transfer_start(sc->sc_xfer[CUE_BULK_DT_RD]);
-	usb2_transfer_start(sc->sc_xfer[CUE_BULK_DT_WR]);
+	usb2_transfer_start(sc->sc_xfer[CUE_BULK_RD]);
+	usb2_transfer_start(sc->sc_xfer[CUE_BULK_WR]);
 }
 
 static void
@@ -660,8 +592,6 @@ cue_init(struct usb2_ether *ue)
 	/* Program the LED operation. */
 	cue_csr_write_1(sc, CUE_LEDCTL, CUE_LEDCTL_FOLLOW_LINK);
 
-	sc->sc_flags |= CUE_FLAG_READ_STALL | CUE_FLAG_WRITE_STALL;
-
 	ifp->if_drv_flags |= IFF_DRV_RUNNING;
 	cue_start(ue);
 }
@@ -683,10 +613,8 @@ cue_stop(struct usb2_ether *ue)
 	/*
 	 * stop all the transfers, if not already stopped:
 	 */
-	usb2_transfer_stop(sc->sc_xfer[CUE_BULK_DT_WR]);
-	usb2_transfer_stop(sc->sc_xfer[CUE_BULK_DT_RD]);
-	usb2_transfer_stop(sc->sc_xfer[CUE_BULK_CS_WR]);
-	usb2_transfer_stop(sc->sc_xfer[CUE_BULK_CS_RD]);
+	usb2_transfer_stop(sc->sc_xfer[CUE_BULK_WR]);
+	usb2_transfer_stop(sc->sc_xfer[CUE_BULK_RD]);
 
 	cue_csr_write_1(sc, CUE_ETHCTL, 0);
 	cue_reset(sc);

Modified: user/thompsa/usb/sys/dev/usb2/ethernet/if_cuereg.h
==============================================================================
--- user/thompsa/usb/sys/dev/usb2/ethernet/if_cuereg.h	Sun Feb  1 06:15:46 2009	(r187976)
+++ user/thompsa/usb/sys/dev/usb2/ethernet/if_cuereg.h	Sun Feb  1 06:39:40 2009	(r187977)
@@ -113,11 +113,9 @@
 
 /* The interrupt endpoint is currently unused by the KLSI part. */
 enum {
-	CUE_BULK_DT_WR,
-	CUE_BULK_DT_RD,
-	CUE_BULK_CS_WR,
-	CUE_BULK_CS_RD,
-	CUE_N_TRANSFER = 4,
+	CUE_BULK_WR,
+	CUE_BULK_RD,
+	CUE_N_TRANSFER = 2,
 };
 
 struct cue_softc {
@@ -128,11 +126,8 @@ struct cue_softc {
 	device_t		sc_dev;
 
 	int			sc_flags;
-#define	CUE_FLAG_READ_STALL	0x0010	/* wait for clearing of stall */
-#define	CUE_FLAG_WRITE_STALL	0x0020	/* wait for clearing of stall */
-#define	CUE_FLAG_LINK		0x0040	/* got a link */
-#define	CUE_FLAG_DETACH		0x0080	/* card gone */
-#define	CUE_FLAG_INTR_STALL	0x0100	/* wait for clearing of stall */
+#define	CUE_FLAG_LINK		0x0001	/* got a link */
+#define	CUE_FLAG_DETACH		0x0002	/* card gone */
 };
 
 #define	CUE_LOCK(_sc)		mtx_lock(&(_sc)->sc_mtx)

Modified: user/thompsa/usb/sys/dev/usb2/ethernet/if_kue2.c
==============================================================================
--- user/thompsa/usb/sys/dev/usb2/ethernet/if_kue2.c	Sun Feb  1 06:15:46 2009	(r187976)
+++ user/thompsa/usb/sys/dev/usb2/ethernet/if_kue2.c	Sun Feb  1 06:39:40 2009	(r187977)
@@ -131,9 +131,7 @@ static device_attach_t kue_attach;
 static device_detach_t kue_detach;
 static device_shutdown_t kue_shutdown;
 
-static usb2_callback_t kue_bulk_read_clear_stall_callback;
 static usb2_callback_t kue_bulk_read_callback;
-static usb2_callback_t kue_bulk_write_clear_stall_callback;
 static usb2_callback_t kue_bulk_write_callback;
 
 static int	kue_do_request(struct kue_softc *,
@@ -158,8 +156,7 @@ SYSCTL_INT(_hw_usb2_kue, OID_AUTO, debug
 #endif
 
 static const struct usb2_config kue_config[KUE_N_TRANSFER] = {
-
-	[KUE_BULK_DT_WR] = {
+	[KUE_BULK_WR] = {
 		.type = UE_BULK,
 		.endpoint = UE_ADDR_ANY,
 		.direction = UE_DIR_OUT,
@@ -168,8 +165,7 @@ static const struct usb2_config kue_conf
 		.mh.callback = kue_bulk_write_callback,
 		.mh.timeout = 10000,	/* 10 seconds */
 	},
-
-	[KUE_BULK_DT_RD] = {
+	[KUE_BULK_RD] = {
 		.type = UE_BULK,
 		.endpoint = UE_ADDR_ANY,
 		.direction = UE_DIR_IN,
@@ -178,28 +174,6 @@ static const struct usb2_config kue_conf
 		.mh.callback = kue_bulk_read_callback,
 		.mh.timeout = 0,	/* no timeout */
 	},
-
-	[KUE_BULK_CS_WR] = {
-		.type = UE_CONTROL,
-		.endpoint = 0x00,	/* Control pipe */
-		.direction = UE_DIR_ANY,
-		.mh.bufsize = sizeof(struct usb2_device_request),
-		.mh.flags = {},
-		.mh.callback = kue_bulk_write_clear_stall_callback,
-		.mh.timeout = 1000,	/* 1 second */
-		.mh.interval = 50,	/* 50ms */
-	},
-
-	[KUE_BULK_CS_RD] = {
-		.type = UE_CONTROL,
-		.endpoint = 0x00,	/* Control pipe */
-		.direction = UE_DIR_ANY,
-		.mh.bufsize = sizeof(struct usb2_device_request),
-		.mh.flags = {},
-		.mh.callback = kue_bulk_read_clear_stall_callback,
-		.mh.timeout = 1000,	/* 1 second */
-		.mh.interval = 50,	/* 50ms */
-	},
 };
 
 static device_method_t kue_methods[] = {
@@ -525,23 +499,6 @@ kue_detach(device_t dev)
 	return (0);
 }
 
-/*
- * A frame has been uploaded: pass the resulting mbuf chain up to
- * the higher level protocols.
- */
-static void
-kue_bulk_read_clear_stall_callback(struct usb2_xfer *xfer)
-{
-	struct kue_softc *sc = xfer->priv_sc;
-	struct usb2_xfer *xfer_other = sc->sc_xfer[KUE_BULK_DT_RD];
-
-	if (usb2_clear_stall_callback(xfer, xfer_other)) {
-		DPRINTF("stall cleared\n");
-		sc->sc_flags &= ~KUE_FLAG_READ_STALL;
-		usb2_transfer_start(xfer_other);
-	}
-}
-
 static void
 kue_bulk_read_callback(struct usb2_xfer *xfer)
 {
@@ -568,42 +525,24 @@ kue_bulk_read_callback(struct usb2_xfer 
 	case USB_ST_SETUP:
 tr_setup:
 
-		if (sc->sc_flags & KUE_FLAG_READ_STALL) {
-			usb2_transfer_start(sc->sc_xfer[KUE_BULK_CS_RD]);
-		} else {
-			xfer->frlengths[0] = xfer->max_data_length;
-			usb2_start_hardware(xfer);
-		}
+		xfer->frlengths[0] = xfer->max_data_length;
+		usb2_start_hardware(xfer);

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-user@FreeBSD.ORG  Sun Feb  1 06:50:37 2009
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 991D310657A9;
	Sun,  1 Feb 2009 06:50:37 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 7E6898FC13;
	Sun,  1 Feb 2009 06:50:37 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n116obps045876;
	Sun, 1 Feb 2009 06:50:37 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n116obU1045871;
	Sun, 1 Feb 2009 06:50:37 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <200902010650.n116obU1045871@svn.freebsd.org>
From: Andrew Thompson <thompsa@FreeBSD.org>
Date: Sun, 1 Feb 2009 06:50:37 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r187978 - user/thompsa/usb/sys/dev/usb2/ethernet
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 01 Feb 2009 06:50:37 -0000

Author: thompsa
Date: Sun Feb  1 06:50:37 2009
New Revision: 187978
URL: http://svn.freebsd.org/changeset/base/187978

Log:
  Rearrange things slightly to reduce gotos.

Modified:
  user/thompsa/usb/sys/dev/usb2/ethernet/if_aue2.c
  user/thompsa/usb/sys/dev/usb2/ethernet/if_axe2.c
  user/thompsa/usb/sys/dev/usb2/ethernet/if_cue2.c
  user/thompsa/usb/sys/dev/usb2/ethernet/if_kue2.c
  user/thompsa/usb/sys/dev/usb2/ethernet/if_udav2.c

Modified: user/thompsa/usb/sys/dev/usb2/ethernet/if_aue2.c
==============================================================================
--- user/thompsa/usb/sys/dev/usb2/ethernet/if_aue2.c	Sun Feb  1 06:39:40 2009	(r187977)
+++ user/thompsa/usb/sys/dev/usb2/ethernet/if_aue2.c	Sun Feb  1 06:50:37 2009	(r187978)
@@ -382,10 +382,6 @@ aue_miibus_readreg(device_t dev, int phy
 	int i, locked;
 	uint16_t val = 0;
 
-	locked = mtx_owned(&sc->sc_mtx);
-	if (!locked)
-		AUE_LOCK(sc);
-
 	/*
 	 * The Am79C901 HomePNA PHY actually contains two transceivers: a 1Mbps
 	 * HomePNA PHY and a 10Mbps full/half duplex ethernet PHY with NWAY
@@ -393,14 +389,13 @@ aue_miibus_readreg(device_t dev, int phy
 	 * actually connected to anything, so we ignore the 10Mbps one. It
 	 * happens to be configured for MII address 3, so we filter that out.
 	 */
-	if (sc->sc_flags & AUE_FLAG_DUAL_PHY) {
-		if (phy == 3)
-			goto done;
-#if 0
-		if (phy != 1)
-			goto done;
-#endif
-	}
+	if (sc->sc_flags & AUE_FLAG_DUAL_PHY && phy == 3)
+			return (0);
+
+	locked = mtx_owned(&sc->sc_mtx);
+	if (!locked)
+		AUE_LOCK(sc);
+
 	aue_csr_write_1(sc, AUE_PHY_ADDR, phy);
 	aue_csr_write_1(sc, AUE_PHY_CTL, reg | AUE_PHYCTL_READ);
 
@@ -414,7 +409,6 @@ aue_miibus_readreg(device_t dev, int phy
 
 	val = aue_csr_read_2(sc, AUE_PHY_DATA);
 
-done:
 	if (!locked)
 		AUE_UNLOCK(sc);
 	return (val);

Modified: user/thompsa/usb/sys/dev/usb2/ethernet/if_axe2.c
==============================================================================
--- user/thompsa/usb/sys/dev/usb2/ethernet/if_axe2.c	Sun Feb  1 06:39:40 2009	(r187977)
+++ user/thompsa/usb/sys/dev/usb2/ethernet/if_axe2.c	Sun Feb  1 06:50:37 2009	(r187978)
@@ -726,7 +726,7 @@ axe_bulk_read_callback(struct usb2_xfer 
 	switch (USB_GET_STATE(xfer)) {
 	case USB_ST_TRANSFERRED:
 		pos = 0;
-		while (1) {
+		for (;;) {
 			if (sc->sc_flags & (AXE_FLAG_772 | AXE_FLAG_178)) {
 				if (xfer->actlen < sizeof(hdr)) {
 					/* too little data */
@@ -736,6 +736,7 @@ axe_bulk_read_callback(struct usb2_xfer 
 
 				if ((hdr.len ^ hdr.ilen) != 0xFFFF) {
 					/* we lost sync */
+					ifp->if_ierrors++;
 					break;
 				}
 				xfer->actlen -= sizeof(hdr);
@@ -744,6 +745,7 @@ axe_bulk_read_callback(struct usb2_xfer 
 				len = le16toh(hdr.len);
 				if (len > xfer->actlen) {
 					/* invalid length */
+					ifp->if_ierrors++;
 					break;
 				}
 				adjust = (len & 1);
@@ -761,18 +763,13 @@ axe_bulk_read_callback(struct usb2_xfer 
 
 			if (xfer->actlen <= adjust) {
 				/* we are finished */
-				goto tr_setup;
+				break;
 			}
 			pos += adjust;
 			xfer->actlen -= adjust;
 		}
-
-		/* count an error */
-		ifp->if_ierrors++;
-
 		/* FALLTHROUGH */
 	case USB_ST_SETUP:
-tr_setup:
 		xfer->frlengths[0] = xfer->max_data_length;
 		usb2_start_hardware(xfer);
 		usb2_ether_rxflush(ue);
@@ -805,23 +802,17 @@ axe_bulk_write_callback(struct usb2_xfer
 		/* FALLTHROUGH */
 	case USB_ST_SETUP:
 
-		if ((sc->sc_flags & AXE_FLAG_LINK) == 0) {
-			/*
-			 * don't send anything if there is no link !
-			 */
-			goto done;
-		}
-		pos = 0;
+		if ((sc->sc_flags & AXE_FLAG_LINK) == 0)
+			return;
 
+		pos = 0;
 		while (1) {
-
 			IFQ_DRV_DEQUEUE(&ifp->if_snd, m);
-
 			if (m == NULL) {
 				if (pos > 0)
 					break;	/* send out data */
 				else
-					goto done;
+					return;
 			}
 			if (m->m_pkthdr.len > MCLBYTES) {
 				m->m_pkthdr.len = MCLBYTES;
@@ -869,8 +860,6 @@ axe_bulk_write_callback(struct usb2_xfer
 
 		xfer->frlengths[0] = pos;
 		usb2_start_hardware(xfer);
-
-done:
 		break;
 
 	default:			/* Error */

Modified: user/thompsa/usb/sys/dev/usb2/ethernet/if_cue2.c
==============================================================================
--- user/thompsa/usb/sys/dev/usb2/ethernet/if_cue2.c	Sun Feb  1 06:39:40 2009	(r187977)
+++ user/thompsa/usb/sys/dev/usb2/ethernet/if_cue2.c	Sun Feb  1 06:50:37 2009	(r187978)
@@ -435,17 +435,16 @@ cue_bulk_read_callback(struct usb2_xfer 
 
 		if (xfer->actlen <= (2 + sizeof(struct ether_header))) {
 			ifp->if_ierrors++;
-			goto tr_setup;
-		}
-		usb2_copy_out(xfer->frbuffers, 0, buf, 2);
-		xfer->actlen -= 2;
-		len = buf[0] | (buf[1] << 8);
-		len = min(xfer->actlen, len);
+		} else {
+			usb2_copy_out(xfer->frbuffers, 0, buf, 2);
+			xfer->actlen -= 2;
+			len = buf[0] | (buf[1] << 8);
+			len = min(xfer->actlen, len);
 
-		usb2_ether_rxbuf(ue, xfer, 2, len);
+			usb2_ether_rxbuf(ue, xfer, 2, len);
+		}
 		/* FALLTHROUGH */
 	case USB_ST_SETUP:
-tr_setup:
 		xfer->frlengths[0] = xfer->max_data_length;
 		usb2_start_hardware(xfer);
 		usb2_ether_rxflush(ue);
@@ -457,8 +456,7 @@ tr_setup:
 			usb2_clear_endpoint_stall(xfer);
 			return;
 		}
-		DPRINTF("bulk read error, %s\n",
-		    usb2_errstr(xfer->error));
+		DPRINTF("bulk read error, %s\n", usb2_errstr(xfer->error));
 		break;
 	}
 }

Modified: user/thompsa/usb/sys/dev/usb2/ethernet/if_kue2.c
==============================================================================
--- user/thompsa/usb/sys/dev/usb2/ethernet/if_kue2.c	Sun Feb  1 06:39:40 2009	(r187977)
+++ user/thompsa/usb/sys/dev/usb2/ethernet/if_kue2.c	Sun Feb  1 06:50:37 2009	(r187978)
@@ -513,18 +513,16 @@ kue_bulk_read_callback(struct usb2_xfer 
 
 		if (xfer->actlen <= (2 + sizeof(struct ether_header))) {
 			ifp->if_ierrors++;
-			goto tr_setup;
-		}
-		usb2_copy_out(xfer->frbuffers, 0, buf, 2);
-		xfer->actlen -= 2;
-		len = buf[0] | (buf[1] << 8);
-		len = min(xfer->actlen, len);
+		} else {
+			usb2_copy_out(xfer->frbuffers, 0, buf, 2);
+			xfer->actlen -= 2;
+			len = buf[0] | (buf[1] << 8);
+			len = min(xfer->actlen, len);
 
-		usb2_ether_rxbuf(ue, xfer, 2, len);
+			usb2_ether_rxbuf(ue, xfer, 2, len);
+		}
 		/* FALLTHROUGH */
 	case USB_ST_SETUP:
-tr_setup:
-
 		xfer->frlengths[0] = xfer->max_data_length;
 		usb2_start_hardware(xfer);
 		usb2_ether_rxflush(ue);
@@ -538,7 +536,6 @@ tr_setup:
 		}
 		DPRINTF("bulk read error, %s\n", usb2_errstr(xfer->error));
 		break;
-
 	}
 }
 

Modified: user/thompsa/usb/sys/dev/usb2/ethernet/if_udav2.c
==============================================================================
--- user/thompsa/usb/sys/dev/usb2/ethernet/if_udav2.c	Sun Feb  1 06:39:40 2009	(r187977)
+++ user/thompsa/usb/sys/dev/usb2/ethernet/if_udav2.c	Sun Feb  1 06:50:37 2009	(r187978)
@@ -557,12 +557,9 @@ udav_bulk_write_callback(struct usb2_xfe
 		/* FALLTHROUGH */
 	case USB_ST_SETUP:
 
-		if ((sc->sc_flags & UDAV_FLAG_LINK) == 0) {
-			/*
-			 * don't send anything if there is no link !
-			 */
-			goto done;
-		}
+		if ((sc->sc_flags & UDAV_FLAG_LINK) == 0)
+			break;
+
 		IFQ_DRV_DEQUEUE(&ifp->if_snd, m);
 		if (m == NULL)
 			break;
@@ -605,7 +602,6 @@ udav_bulk_write_callback(struct usb2_xfe
 		xfer->frlengths[0] = temp_len;
 		usb2_start_hardware(xfer);
 
-done:
 		break;
 
 	default:			/* Error */

From owner-svn-src-user@FreeBSD.ORG  Sun Feb  1 07:00:21 2009
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9D33E106567F;
	Sun,  1 Feb 2009 07:00:21 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 8B6FB8FC17;
	Sun,  1 Feb 2009 07:00:21 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n1170LhY046111;
	Sun, 1 Feb 2009 07:00:21 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n1170Ln6046104;
	Sun, 1 Feb 2009 07:00:21 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <200902010700.n1170Ln6046104@svn.freebsd.org>
From: Andrew Thompson <thompsa@FreeBSD.org>
Date: Sun, 1 Feb 2009 07:00:21 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r187979 - user/thompsa/usb/sys/dev/usb2/ethernet
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 01 Feb 2009 07:00:21 -0000

Author: thompsa
Date: Sun Feb  1 07:00:21 2009
New Revision: 187979
URL: http://svn.freebsd.org/changeset/base/187979

Log:
  Be consistent about xfer debug messages.

Modified:
  user/thompsa/usb/sys/dev/usb2/ethernet/if_aue2.c
  user/thompsa/usb/sys/dev/usb2/ethernet/if_axe2.c
  user/thompsa/usb/sys/dev/usb2/ethernet/if_cdce2.c
  user/thompsa/usb/sys/dev/usb2/ethernet/if_cue2.c
  user/thompsa/usb/sys/dev/usb2/ethernet/if_kue2.c
  user/thompsa/usb/sys/dev/usb2/ethernet/if_rue2.c
  user/thompsa/usb/sys/dev/usb2/ethernet/if_udav2.c

Modified: user/thompsa/usb/sys/dev/usb2/ethernet/if_aue2.c
==============================================================================
--- user/thompsa/usb/sys/dev/usb2/ethernet/if_aue2.c	Sun Feb  1 06:50:37 2009	(r187978)
+++ user/thompsa/usb/sys/dev/usb2/ethernet/if_aue2.c	Sun Feb  1 07:00:21 2009	(r187979)
@@ -709,6 +709,7 @@ aue_intr_callback(struct usb2_xfer *xfer
 		break;
 
 	default:			/* Error */
+		DPRINTF("intr transfer error, %s\n", usb2_errstr(xfer->error));
 		if (xfer->error != USB_ERR_CANCELLED) {
 			/* start clear stall */
 			usb2_clear_endpoint_stall(xfer);
@@ -768,12 +769,12 @@ tr_setup:
 		break;
 
 	default:			/* Error */
+		DPRINTF("read transfer error, %s\n", usb2_errstr(xfer->error));
 		if (xfer->error != USB_ERR_CANCELLED) {
 			/* try to clear stall first */
 			usb2_clear_endpoint_stall(xfer);
 			return;
 		}
-		DPRINTF("bulk read error, %s\n", usb2_errstr(xfer->error));
 		break;
 	}
 }
@@ -839,9 +840,7 @@ aue_bulk_write_callback(struct usb2_xfer
 		break;
 
 	default:			/* Error */
-		DPRINTFN(11, "transfer error, %s\n",
-		    usb2_errstr(xfer->error));
-
+		DPRINTF("write transfer error, %s\n", usb2_errstr(xfer->error));
 		if (xfer->error != USB_ERR_CANCELLED) {
 			/* try to clear stall first */
 			usb2_clear_endpoint_stall(xfer);

Modified: user/thompsa/usb/sys/dev/usb2/ethernet/if_axe2.c
==============================================================================
--- user/thompsa/usb/sys/dev/usb2/ethernet/if_axe2.c	Sun Feb  1 06:50:37 2009	(r187978)
+++ user/thompsa/usb/sys/dev/usb2/ethernet/if_axe2.c	Sun Feb  1 07:00:21 2009	(r187979)
@@ -705,6 +705,7 @@ axe_intr_callback(struct usb2_xfer *xfer
 		break;
 
 	default:			/* Error */
+		DPRINTF("intr transfer error, %s\n", usb2_errstr(xfer->error));
 		if (xfer->error != USB_ERR_CANCELLED) {
 			/* start clear stall */
 			usb2_clear_endpoint_stall(xfer);
@@ -776,12 +777,12 @@ axe_bulk_read_callback(struct usb2_xfer 
 		break;
 
 	default:			/* Error */
+		DPRINTF("read transfer error, %s\n", usb2_errstr(xfer->error));
 		if (xfer->error != USB_ERR_CANCELLED) {
 			/* try to clear stall first */
 			usb2_clear_endpoint_stall(xfer);
 			return;
 		}
-		DPRINTF("bulk read error, %s\n", usb2_errstr(xfer->error));
 		break;
 	}
 }
@@ -863,9 +864,7 @@ axe_bulk_write_callback(struct usb2_xfer
 		break;
 
 	default:			/* Error */
-		DPRINTFN(11, "transfer error, %s\n",
-		    usb2_errstr(xfer->error));
-
+		DPRINTF("write transfer error, %s\n", usb2_errstr(xfer->error));
 		if (xfer->error != USB_ERR_CANCELLED) {
 			/* try to clear stall first */
 			usb2_clear_endpoint_stall(xfer);

Modified: user/thompsa/usb/sys/dev/usb2/ethernet/if_cdce2.c
==============================================================================
--- user/thompsa/usb/sys/dev/usb2/ethernet/if_cdce2.c	Sun Feb  1 06:50:37 2009	(r187978)
+++ user/thompsa/usb/sys/dev/usb2/ethernet/if_cdce2.c	Sun Feb  1 07:00:21 2009	(r187979)
@@ -668,8 +668,7 @@ cdce_bulk_write_512x4_callback(struct us
 		break;
 
 	default:			/* Error */
-		DPRINTFN(11, "transfer error, %s\n",
-		    usb2_errstr(xfer->error));
+		DPRINTF("write transfer error, %s\n", usb2_errstr(xfer->error));
 
 		/* update error counter */
 		ifp->if_oerrors += sc->sc_tx_mq.ifq_len;
@@ -759,8 +758,7 @@ tr_setup:
 		break;
 
 	default:			/* Error */
-		DPRINTFN(11, "transfer error, %s\n",
-		    usb2_errstr(xfer->error));
+		DPRINTF("write transfer error, %s\n", usb2_errstr(xfer->error));
 
 		/* free all previous mbufs */
 		cdce_free_mq(&sc->sc_tx_mq);
@@ -1093,8 +1091,7 @@ cdce_bulk_read_512x4_callback(struct usb
 		break;
 
 	default:			/* Error */
-		DPRINTF("error = %s\n",
-		    usb2_errstr(xfer->error));
+		DPRINTF("read transfer error, %s\n", usb2_errstr(xfer->error));
 
 		if (xfer->error != USB_ERR_CANCELLED) {
 			/* try to clear stall first */
@@ -1179,8 +1176,7 @@ tr_setup:
 		break;
 
 	default:			/* Error */
-		DPRINTF("error = %s\n",
-		    usb2_errstr(xfer->error));
+		DPRINTF("read transfer error, %s\n", usb2_errstr(xfer->error));
 
 		/* free all mbufs */
 		cdce_free_mq(&sc->sc_rx_mq);
@@ -1257,6 +1253,7 @@ cdce_intr_read_callback(struct usb2_xfer
 		break;
 
 	default:			/* Error */
+		DPRINTF("intr transfer error, %s\n", usb2_errstr(xfer->error));
 		if (xfer->error != USB_ERR_CANCELLED) {
 			/* start clear stall */
 			usb2_clear_endpoint_stall(xfer);
@@ -1284,6 +1281,7 @@ cdce_intr_write_callback(struct usb2_xfe
 		break;
 
 	default:			/* Error */
+		DPRINTF("intr transfer error, %s\n", usb2_errstr(xfer->error));
 		if (xfer->error != USB_ERR_CANCELLED) {
 			/* start clear stall */
 			usb2_clear_endpoint_stall(xfer);

Modified: user/thompsa/usb/sys/dev/usb2/ethernet/if_cue2.c
==============================================================================
--- user/thompsa/usb/sys/dev/usb2/ethernet/if_cue2.c	Sun Feb  1 06:50:37 2009	(r187978)
+++ user/thompsa/usb/sys/dev/usb2/ethernet/if_cue2.c	Sun Feb  1 07:00:21 2009	(r187979)
@@ -451,12 +451,12 @@ cue_bulk_read_callback(struct usb2_xfer 
 		break;
 
 	default:			/* Error */
+		DPRINTF("read transfer error, %s\n", usb2_errstr(xfer->error));
 		if (xfer->error != USB_ERR_CANCELLED) {
 			/* try to clear stall first */
 			usb2_clear_endpoint_stall(xfer);
 			return;
 		}
-		DPRINTF("bulk read error, %s\n", usb2_errstr(xfer->error));
 		break;
 	}
 }
@@ -506,9 +506,7 @@ cue_bulk_write_callback(struct usb2_xfer
 		break;
 
 	default:			/* Error */
-		DPRINTFN(11, "transfer error, %s\n",
-		    usb2_errstr(xfer->error));
-
+		DPRINTF("write transfer error, %s\n", usb2_errstr(xfer->error));
 		if (xfer->error != USB_ERR_CANCELLED) {
 			/* try to clear stall first */
 			usb2_clear_endpoint_stall(xfer);

Modified: user/thompsa/usb/sys/dev/usb2/ethernet/if_kue2.c
==============================================================================
--- user/thompsa/usb/sys/dev/usb2/ethernet/if_kue2.c	Sun Feb  1 06:50:37 2009	(r187978)
+++ user/thompsa/usb/sys/dev/usb2/ethernet/if_kue2.c	Sun Feb  1 07:00:21 2009	(r187979)
@@ -529,12 +529,12 @@ kue_bulk_read_callback(struct usb2_xfer 
 		break;
 
 	default:			/* Error */
+		DPRINTF("read transfer error, %s\n", usb2_errstr(xfer->error));
 		if (xfer->error != USB_ERR_CANCELLED) {
 			/* try to clear stall first */
 			usb2_clear_endpoint_stall(xfer);
 			return;
 		}
-		DPRINTF("bulk read error, %s\n", usb2_errstr(xfer->error));
 		break;
 	}
 }
@@ -592,8 +592,7 @@ kue_bulk_write_callback(struct usb2_xfer
 		break;
 
 	default:			/* Error */
-		DPRINTFN(11, "transfer error, %s\n", usb2_errstr(xfer->error));
-
+		DPRINTF("write transfer error, %s\n", usb2_errstr(xfer->error));
 		if (xfer->error != USB_ERR_CANCELLED) {
 			/* try to clear stall first */
 			usb2_clear_endpoint_stall(xfer);

Modified: user/thompsa/usb/sys/dev/usb2/ethernet/if_rue2.c
==============================================================================
--- user/thompsa/usb/sys/dev/usb2/ethernet/if_rue2.c	Sun Feb  1 06:50:37 2009	(r187978)
+++ user/thompsa/usb/sys/dev/usb2/ethernet/if_rue2.c	Sun Feb  1 07:00:21 2009	(r187979)
@@ -633,6 +633,7 @@ rue_intr_callback(struct usb2_xfer *xfer
 		break;
 
 	default:			/* Error */
+		DPRINTF("intr transfer error, %s\n", usb2_errstr(xfer->error));
 		if (xfer->error != USB_ERR_CANCELLED) {
 			/* start clear stall */
 			usb2_clear_endpoint_stall(xfer);
@@ -678,12 +679,12 @@ tr_setup:
 		break;
 
 	default:			/* Error */
+		DPRINTF("read transfer error, %s\n", usb2_errstr(xfer->error));
 		if (xfer->error != USB_ERR_CANCELLED) {
 			/* try to clear stall first */
 			usb2_clear_endpoint_stall(xfer);
 			return;
 		}
-		DPRINTF("bulk read error, %s\n", usb2_errstr(xfer->error));
 		break;
 
 	}
@@ -747,8 +748,7 @@ done:
 		break;
 
 	default:			/* Error */
-		DPRINTFN(11, "transfer error, %s\n", usb2_errstr(xfer->error));
-
+		DPRINTF("write transfer error, %s\n", usb2_errstr(xfer->error));
 		if (xfer->error != USB_ERR_CANCELLED) {
 			/* try to clear stall first */
 			usb2_clear_endpoint_stall(xfer);

Modified: user/thompsa/usb/sys/dev/usb2/ethernet/if_udav2.c
==============================================================================
--- user/thompsa/usb/sys/dev/usb2/ethernet/if_udav2.c	Sun Feb  1 06:50:37 2009	(r187978)
+++ user/thompsa/usb/sys/dev/usb2/ethernet/if_udav2.c	Sun Feb  1 07:00:21 2009	(r187979)
@@ -605,8 +605,7 @@ udav_bulk_write_callback(struct usb2_xfe
 		break;
 
 	default:			/* Error */
-		DPRINTFN(11, "transfer error, %s\n", usb2_errstr(xfer->error));
-
+		DPRINTF("write transfer error, %s\n", usb2_errstr(xfer->error));
 		if (xfer->error != USB_ERR_CANCELLED) {
 			/* try to clear stall first */
 			usb2_clear_endpoint_stall(xfer);
@@ -657,12 +656,12 @@ tr_setup:
 		break;
 
 	default:			/* Error */
+		DPRINTF("read transfer error, %s\n", usb2_errstr(xfer->error));
 		if (xfer->error != USB_ERR_CANCELLED) {
 			/* try to clear stall first */
 			usb2_clear_endpoint_stall(xfer);
 			return;
 		}
-		DPRINTF("bulk read error, %s\n", usb2_errstr(xfer->error));
 		break;
 	}
 }
@@ -678,6 +677,7 @@ udav_intr_callback(struct usb2_xfer *xfe
 		break;
 
 	default:			/* Error */
+		DPRINTF("intr transfer error, %s\n", usb2_errstr(xfer->error));
 		if (xfer->error != USB_ERR_CANCELLED) {
 			/* start clear stall */
 			usb2_clear_endpoint_stall(xfer);

From owner-svn-src-user@FreeBSD.ORG  Sun Feb  1 07:11:33 2009
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 28756106576C;
	Sun,  1 Feb 2009 07:11:32 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 43A468FC12;
	Sun,  1 Feb 2009 07:11:32 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n117BWRu046347;
	Sun, 1 Feb 2009 07:11:32 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n117BV1i046339;
	Sun, 1 Feb 2009 07:11:31 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <200902010711.n117BV1i046339@svn.freebsd.org>
From: Andrew Thompson <thompsa@FreeBSD.org>
Date: Sun, 1 Feb 2009 07:11:31 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r187980 - user/thompsa/usb/sys/dev/usb2/ethernet
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 01 Feb 2009 07:11:33 -0000

Author: thompsa
Date: Sun Feb  1 07:11:31 2009
New Revision: 187980
URL: http://svn.freebsd.org/changeset/base/187980

Log:
  Change the names of the interrupt xfers to the same as the rest.

Modified:
  user/thompsa/usb/sys/dev/usb2/ethernet/if_aue2.c
  user/thompsa/usb/sys/dev/usb2/ethernet/if_auereg.h
  user/thompsa/usb/sys/dev/usb2/ethernet/if_axe2.c
  user/thompsa/usb/sys/dev/usb2/ethernet/if_axereg.h
  user/thompsa/usb/sys/dev/usb2/ethernet/if_rue2.c
  user/thompsa/usb/sys/dev/usb2/ethernet/if_ruereg.h
  user/thompsa/usb/sys/dev/usb2/ethernet/if_udav2.c
  user/thompsa/usb/sys/dev/usb2/ethernet/if_udavreg.h

Modified: user/thompsa/usb/sys/dev/usb2/ethernet/if_aue2.c
==============================================================================
--- user/thompsa/usb/sys/dev/usb2/ethernet/if_aue2.c	Sun Feb  1 07:00:21 2009	(r187979)
+++ user/thompsa/usb/sys/dev/usb2/ethernet/if_aue2.c	Sun Feb  1 07:11:31 2009	(r187980)
@@ -218,7 +218,7 @@ static const struct usb2_config aue_conf
 		.mh.flags = {.pipe_bof = 1,.short_xfer_ok = 1,},
 		.mh.callback = aue_bulk_read_callback,
 	},
-	[AUE_INTR_DT_RD] = {
+	[AUE_INTR_RD] = {
 		.type = UE_INTERRUPT,
 		.endpoint = UE_ADDR_ANY,
 		.direction = UE_DIR_IN,
@@ -876,7 +876,7 @@ aue_start(struct usb2_ether *ue)
 	/*
 	 * start the USB transfers, if not already started:
 	 */
-	usb2_transfer_start(sc->sc_xfer[AUE_INTR_DT_RD]);
+	usb2_transfer_start(sc->sc_xfer[AUE_INTR_RD]);
 	usb2_transfer_start(sc->sc_xfer[AUE_BULK_RD]);
 	usb2_transfer_start(sc->sc_xfer[AUE_BULK_WR]);
 }
@@ -989,7 +989,7 @@ aue_stop(struct usb2_ether *ue)
 	 */
 	usb2_transfer_stop(sc->sc_xfer[AUE_BULK_WR]);
 	usb2_transfer_stop(sc->sc_xfer[AUE_BULK_RD]);
-	usb2_transfer_stop(sc->sc_xfer[AUE_INTR_DT_RD]);
+	usb2_transfer_stop(sc->sc_xfer[AUE_INTR_RD]);
 
 	aue_csr_write_1(sc, AUE_CTL0, 0);
 	aue_csr_write_1(sc, AUE_CTL1, 0);

Modified: user/thompsa/usb/sys/dev/usb2/ethernet/if_auereg.h
==============================================================================
--- user/thompsa/usb/sys/dev/usb2/ethernet/if_auereg.h	Sun Feb  1 07:00:21 2009	(r187979)
+++ user/thompsa/usb/sys/dev/usb2/ethernet/if_auereg.h	Sun Feb  1 07:11:31 2009	(r187980)
@@ -63,7 +63,7 @@
 enum {
 	AUE_BULK_WR,
 	AUE_BULK_RD,
-	AUE_INTR_DT_RD,
+	AUE_INTR_RD,
 	AUE_N_TRANSFER = 3,
 };
 

Modified: user/thompsa/usb/sys/dev/usb2/ethernet/if_axe2.c
==============================================================================
--- user/thompsa/usb/sys/dev/usb2/ethernet/if_axe2.c	Sun Feb  1 07:00:21 2009	(r187979)
+++ user/thompsa/usb/sys/dev/usb2/ethernet/if_axe2.c	Sun Feb  1 07:11:31 2009	(r187980)
@@ -193,7 +193,7 @@ static const struct usb2_config axe_conf
 		.mh.callback = axe_bulk_read_callback,
 		.mh.timeout = 0,	/* no timeout */
 	},
-	[AXE_INTR_DT_RD] = {
+	[AXE_INTR_RD] = {
 		.type = UE_INTERRUPT,
 		.endpoint = UE_ADDR_ANY,
 		.direction = UE_DIR_IN,
@@ -900,7 +900,7 @@ axe_start(struct usb2_ether *ue)
 	/*
 	 * start the USB transfers, if not already started:
 	 */
-	usb2_transfer_start(sc->sc_xfer[AXE_INTR_DT_RD]);
+	usb2_transfer_start(sc->sc_xfer[AXE_INTR_RD]);
 	usb2_transfer_start(sc->sc_xfer[AXE_BULK_RD]);
 	usb2_transfer_start(sc->sc_xfer[AXE_BULK_WR]);
 }
@@ -997,7 +997,7 @@ axe_stop(struct usb2_ether *ue)
 	 */
 	usb2_transfer_stop(sc->sc_xfer[AXE_BULK_WR]);
 	usb2_transfer_stop(sc->sc_xfer[AXE_BULK_RD]);
-	usb2_transfer_stop(sc->sc_xfer[AXE_INTR_DT_RD]);
+	usb2_transfer_stop(sc->sc_xfer[AXE_INTR_RD]);
 
 	axe_reset(sc);
 }

Modified: user/thompsa/usb/sys/dev/usb2/ethernet/if_axereg.h
==============================================================================
--- user/thompsa/usb/sys/dev/usb2/ethernet/if_axereg.h	Sun Feb  1 07:00:21 2009	(r187979)
+++ user/thompsa/usb/sys/dev/usb2/ethernet/if_axereg.h	Sun Feb  1 07:11:31 2009	(r187980)
@@ -172,7 +172,7 @@ struct axe_sframe_hdr {
 enum {
 	AXE_BULK_WR,
 	AXE_BULK_RD,
-	AXE_INTR_DT_RD,
+	AXE_INTR_RD,
 	AXE_N_TRANSFER = 3,
 };
 

Modified: user/thompsa/usb/sys/dev/usb2/ethernet/if_rue2.c
==============================================================================
--- user/thompsa/usb/sys/dev/usb2/ethernet/if_rue2.c	Sun Feb  1 07:00:21 2009	(r187979)
+++ user/thompsa/usb/sys/dev/usb2/ethernet/if_rue2.c	Sun Feb  1 07:11:31 2009	(r187980)
@@ -152,7 +152,7 @@ static const struct usb2_config rue_conf
 		.mh.callback = rue_bulk_read_callback,
 		.mh.timeout = 0,	/* no timeout */
 	},
-	[RUE_INTR_DT_RD] = {
+	[RUE_INTR_RD] = {
 		.type = UE_INTERRUPT,
 		.endpoint = UE_ADDR_ANY,
 		.direction = UE_DIR_IN,
@@ -784,7 +784,7 @@ rue_start(struct usb2_ether *ue)
 	/*
 	 * start the USB transfers, if not already started:
 	 */
-	usb2_transfer_start(sc->sc_xfer[RUE_INTR_DT_RD]);
+	usb2_transfer_start(sc->sc_xfer[RUE_INTR_RD]);
 	usb2_transfer_start(sc->sc_xfer[RUE_BULK_RD]);
 	usb2_transfer_start(sc->sc_xfer[RUE_BULK_WR]);
 }
@@ -882,7 +882,7 @@ rue_stop(struct usb2_ether *ue)
 	 */
 	usb2_transfer_stop(sc->sc_xfer[RUE_BULK_WR]);
 	usb2_transfer_stop(sc->sc_xfer[RUE_BULK_RD]);
-	usb2_transfer_stop(sc->sc_xfer[RUE_INTR_DT_RD]);
+	usb2_transfer_stop(sc->sc_xfer[RUE_INTR_RD]);
 
 	rue_csr_write_1(sc, RUE_CR, 0x00);
 	rue_reset(sc);

Modified: user/thompsa/usb/sys/dev/usb2/ethernet/if_ruereg.h
==============================================================================
--- user/thompsa/usb/sys/dev/usb2/ethernet/if_ruereg.h	Sun Feb  1 07:00:21 2009	(r187979)
+++ user/thompsa/usb/sys/dev/usb2/ethernet/if_ruereg.h	Sun Feb  1 07:11:31 2009	(r187980)
@@ -165,7 +165,7 @@ struct rue_type {
 enum {
 	RUE_BULK_WR,
 	RUE_BULK_RD,
-	RUE_INTR_DT_RD,
+	RUE_INTR_RD,
 	RUE_N_TRANSFER = 3,
 };
 

Modified: user/thompsa/usb/sys/dev/usb2/ethernet/if_udav2.c
==============================================================================
--- user/thompsa/usb/sys/dev/usb2/ethernet/if_udav2.c	Sun Feb  1 07:00:21 2009	(r187979)
+++ user/thompsa/usb/sys/dev/usb2/ethernet/if_udav2.c	Sun Feb  1 07:11:31 2009	(r187980)
@@ -114,7 +114,7 @@ static const struct usb2_config udav_con
 		.mh.callback = udav_bulk_read_callback,
 		.mh.timeout = 0,	/* no timeout */
 	},
-	[UDAV_INTR_DT_RD] = {
+	[UDAV_INTR_RD] = {
 		.type = UE_INTERRUPT,
 		.endpoint = UE_ADDR_ANY,
 		.direction = UE_DIR_IN,
@@ -534,7 +534,7 @@ udav_start(struct usb2_ether *ue)
 	/*
 	 * start the USB transfers, if not already started:
 	 */
-	usb2_transfer_start(sc->sc_xfer[UDAV_INTR_DT_RD]);
+	usb2_transfer_start(sc->sc_xfer[UDAV_INTR_RD]);
 	usb2_transfer_start(sc->sc_xfer[UDAV_BULK_RD]);
 	usb2_transfer_start(sc->sc_xfer[UDAV_BULK_WR]);
 }
@@ -703,7 +703,7 @@ udav_stop(struct usb2_ether *ue)
 	 */
 	usb2_transfer_stop(sc->sc_xfer[UDAV_BULK_WR]);
 	usb2_transfer_stop(sc->sc_xfer[UDAV_BULK_RD]);
-	usb2_transfer_stop(sc->sc_xfer[UDAV_INTR_DT_RD]);
+	usb2_transfer_stop(sc->sc_xfer[UDAV_INTR_RD]);
 
 	udav_reset(sc);
 }

Modified: user/thompsa/usb/sys/dev/usb2/ethernet/if_udavreg.h
==============================================================================
--- user/thompsa/usb/sys/dev/usb2/ethernet/if_udavreg.h	Sun Feb  1 07:00:21 2009	(r187979)
+++ user/thompsa/usb/sys/dev/usb2/ethernet/if_udavreg.h	Sun Feb  1 07:11:31 2009	(r187980)
@@ -144,7 +144,7 @@ struct udav_rxpkt {
 enum {
 	UDAV_BULK_WR,
 	UDAV_BULK_RD,
-	UDAV_INTR_DT_RD,
+	UDAV_INTR_RD,
 	UDAV_N_TRANSFER = 3,
 };
 

From owner-svn-src-user@FreeBSD.ORG  Sun Feb  1 17:56:05 2009
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 849C6106564A;
	Sun,  1 Feb 2009 17:56:05 +0000 (UTC)
	(envelope-from piso@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 73BF48FC1A;
	Sun,  1 Feb 2009 17:56:05 +0000 (UTC)
	(envelope-from piso@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n11Hu5Ln062765;
	Sun, 1 Feb 2009 17:56:05 GMT (envelope-from piso@svn.freebsd.org)
Received: (from piso@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n11Hu5eG062764;
	Sun, 1 Feb 2009 17:56:05 GMT (envelope-from piso@svn.freebsd.org)
Message-Id: <200902011756.n11Hu5eG062764@svn.freebsd.org>
From: Paolo Pisati <piso@FreeBSD.org>
Date: Sun, 1 Feb 2009 17:56:05 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r187984 - user/piso/sys/netinet/libalias
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 01 Feb 2009 17:56:05 -0000

Author: piso
Date: Sun Feb  1 17:56:05 2009
New Revision: 187984
URL: http://svn.freebsd.org/changeset/base/187984

Log:
  Fix a crashing bug.
  
  Submitted by: Jason But

Modified:
  user/piso/sys/netinet/libalias/alias_sctp.c

Modified: user/piso/sys/netinet/libalias/alias_sctp.c
==============================================================================
--- user/piso/sys/netinet/libalias/alias_sctp.c	Sun Feb  1 16:00:49 2009	(r187983)
+++ user/piso/sys/netinet/libalias/alias_sctp.c	Sun Feb  1 17:56:05 2009	(r187984)
@@ -1163,7 +1163,7 @@ sctp_PktParser(struct libalias *la, int 
 
 		/* Is this the end of the packet ? */
 		if (bytes_left == 0)
-			return(SN_PARSE_OK);
+			return (*passoc == NULL)?(SN_PARSE_ERROR_LOOKUP):(SN_PARSE_OK);
 
 		/* Are there enough bytes in packet to at least retrieve length of next chunk ? */
 		if (bytes_left < SN_MIN_CHUNK_SIZE)

From owner-svn-src-user@FreeBSD.ORG  Sun Feb  1 18:03:55 2009
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D600A106564A;
	Sun,  1 Feb 2009 18:03:55 +0000 (UTC)
	(envelope-from piso@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id C543E8FC19;
	Sun,  1 Feb 2009 18:03:55 +0000 (UTC)
	(envelope-from piso@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n11I3tSd062941;
	Sun, 1 Feb 2009 18:03:55 GMT (envelope-from piso@svn.freebsd.org)
Received: (from piso@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n11I3tRr062940;
	Sun, 1 Feb 2009 18:03:55 GMT (envelope-from piso@svn.freebsd.org)
Message-Id: <200902011803.n11I3tRr062940@svn.freebsd.org>
From: Paolo Pisati <piso@FreeBSD.org>
Date: Sun, 1 Feb 2009 18:03:55 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r187985 - user/piso/sys/netinet/libalias
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 01 Feb 2009 18:03:56 -0000

Author: piso
Date: Sun Feb  1 18:03:55 2009
New Revision: 187985
URL: http://svn.freebsd.org/changeset/base/187985

Log:
  Put back SctpShowAliasStats.

Modified:
  user/piso/sys/netinet/libalias/alias_db.c

Modified: user/piso/sys/netinet/libalias/alias_db.c
==============================================================================
--- user/piso/sys/netinet/libalias/alias_db.c	Sun Feb  1 17:56:05 2009	(r187984)
+++ user/piso/sys/netinet/libalias/alias_db.c	Sun Feb  1 18:03:55 2009	(r187985)
@@ -411,6 +411,8 @@ static void	ShowAliasStats(struct libali
 static int	InitPacketAliasLog(struct libalias *);
 static void	UninitPacketAliasLog(struct libalias *);
 
+void SctpShowAliasStats(struct libalias *la);
+
 static		u_int
 StartPointIn(struct in_addr alias_addr,
     u_short alias_port,
@@ -510,6 +512,13 @@ ShowAliasStats(struct libalias *la)
 	}
 }
 
+void SctpShowAliasStats(struct libalias *la)
+{
+
+	ShowAliasStats(la);
+}
+
+
 /* Internal routines for finding, deleting and adding links
 
 Port Allocation:

From owner-svn-src-user@FreeBSD.ORG  Sun Feb  1 18:10:07 2009
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 580A01065673;
	Sun,  1 Feb 2009 18:10:07 +0000 (UTC)
	(envelope-from piso@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 473F58FC33;
	Sun,  1 Feb 2009 18:10:07 +0000 (UTC)
	(envelope-from piso@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n11IA79w063085;
	Sun, 1 Feb 2009 18:10:07 GMT (envelope-from piso@svn.freebsd.org)
Received: (from piso@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n11IA7Ic063083;
	Sun, 1 Feb 2009 18:10:07 GMT (envelope-from piso@svn.freebsd.org)
Message-Id: <200902011810.n11IA7Ic063083@svn.freebsd.org>
From: Paolo Pisati <piso@FreeBSD.org>
Date: Sun, 1 Feb 2009 18:10:07 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r187986 - user/piso/sys/netinet
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 01 Feb 2009 18:10:07 -0000

Author: piso
Date: Sun Feb  1 18:10:06 2009
New Revision: 187986
URL: http://svn.freebsd.org/changeset/base/187986

Log:
  Make fragments reassemblig before nat sysctl controllable and enable it per default.

Modified:
  user/piso/sys/netinet/ip_fw.h
  user/piso/sys/netinet/ip_fw_nat.c

Modified: user/piso/sys/netinet/ip_fw.h
==============================================================================
--- user/piso/sys/netinet/ip_fw.h	Sun Feb  1 18:03:55 2009	(r187985)
+++ user/piso/sys/netinet/ip_fw.h	Sun Feb  1 18:10:06 2009	(r187986)
@@ -714,6 +714,7 @@ struct vnet_ipfw {
 	u_int64_t _norule_counter;
 	struct callout _ipfw_timeout;
 	eventhandler_tag _ifaddr_event_tag;
+	int _nat_reass;
 };
 
 #ifndef VIMAGE
@@ -758,6 +759,7 @@ extern struct vnet_ipfw vnet_ipfw_0;
 #define	V_norule_counter	VNET_IPFW(norule_counter)
 #define	V_ipfw_timeout		VNET_IPFW(ipfw_timeout)
 #define	V_ifaddr_event_tag	VNET_IPFW(ifaddr_event_tag)
+#define V_nat_reass             VNET_IPFW(nat_reass)
 
 #endif /* _KERNEL */
 #endif /* _IPFW2_H */

Modified: user/piso/sys/netinet/ip_fw_nat.c
==============================================================================
--- user/piso/sys/netinet/ip_fw_nat.c	Sun Feb  1 18:03:55 2009	(r187985)
+++ user/piso/sys/netinet/ip_fw_nat.c	Sun Feb  1 18:10:06 2009	(r187986)
@@ -72,6 +72,7 @@ MALLOC_DECLARE(M_IPFW);
 #ifdef VIMAGE_GLOBALS
 extern struct ip_fw_chain layer3_chain;
 static eventhandler_tag ifaddr_event_tag;
+static int nat_reass;
 #endif
 
 extern ipfw_nat_t *ipfw_nat_ptr;
@@ -80,6 +81,10 @@ extern ipfw_nat_cfg_t *ipfw_nat_del_ptr;
 extern ipfw_nat_cfg_t *ipfw_nat_get_cfg_ptr;
 extern ipfw_nat_cfg_t *ipfw_nat_get_log_ptr;
 
+SYSCTL_DECL(_net_inet_ip_fw);
+SYSCTL_V_INT(V_NET, vnet_ipfw, _net_inet_ip_fw, OID_AUTO, nat_reass, CTLFLAG_RW,
+    nat_reass, 0, "Reassemble ip fragments before ipfw nat");
+
 static void 
 ifaddr_change(void *arg __unused, struct ifnet *ifp)
 {
@@ -261,55 +266,63 @@ ipfw_nat(struct ip_fw_args *args, struct
 	    NULL)
 		goto badnat;
 	ip = mtod(mcl, struct ip *);
-	/* 
-	 * In case of fragments, reassemble the packet 
-	 * before passing it to libalias.
-	 */
-	off = (args->eh == NULL) ? ip->ip_off : ntohs(ip->ip_off);
-	if (off & (IP_MF | IP_OFFMASK)) {
-		struct mbuf *reass;
 
+	/* Shall we reassemble ip fragments? */
+	if (!V_nat_reass) {
+		if (args->eh == NULL) {
+			ip->ip_len = htons(ip->ip_len);
+			ip->ip_off = htons(ip->ip_off);
+		}
+	} else {
+		off = (args->eh == NULL) ? ip->ip_off : ntohs(ip->ip_off);
 		/* 
-		 * Ip_reass() expects len & off in host byte order:
-		 * fix them in case we come from layer2.
+		 * In case of fragments, reassemble the packet 
+		 * before passing it to libalias.
 		 */
-		if (args->eh != NULL) {
-			ip->ip_len = ntohs(ip->ip_len);
-			ip->ip_off = ntohs(ip->ip_off);
-		}
+		if (off & (IP_MF | IP_OFFMASK)) {
+			struct mbuf *reass;
 
-		/* Reassemble packet. */
-		reass = ip_reass(mcl);
+			/* 
+			 * Ip_reass() expects len & off in host byte order:
+			 * fix them in case we come from layer2.
+			 */
+			if (args->eh != NULL) {
+				ip->ip_len = ntohs(ip->ip_len);
+				ip->ip_off = ntohs(ip->ip_off);
+			}
 
-		/*
-		 * IP header checksum fixup after reassembly and leave header
-		 * in network byte order.
-		 */
-		if (reass != NULL) {
-			int hlen;
+			/* Reassemble packet. */
+			reass = ip_reass(mcl);
+
+			/*
+			 * IP header checksum fixup after reassembly and leave header
+			 * in network byte order.
+			 */
+			if (reass != NULL) {
+				int hlen;
 			
-			ip = mtod(reass, struct ip *);
-			hlen = ip->ip_hl << 2;
+				ip = mtod(reass, struct ip *);
+				hlen = ip->ip_hl << 2;
+				ip->ip_len = htons(ip->ip_len);
+				ip->ip_off = htons(ip->ip_off);
+				ip->ip_sum = 0;
+				if (hlen == sizeof(struct ip))
+					ip->ip_sum = in_cksum_hdr(ip);
+				else
+					ip->ip_sum = in_cksum(reass, hlen);
+				if ((mcl = m_megapullup(reass, reass->m_pkthdr.len)) ==
+				    NULL)
+					goto badnat;
+				ip = mtod(mcl, struct ip *);
+			} else {
+				mcl = NULL;
+				goto badnat;
+			}
+		} else if (args->eh == NULL) {
 			ip->ip_len = htons(ip->ip_len);
 			ip->ip_off = htons(ip->ip_off);
-			ip->ip_sum = 0;
-			if (hlen == sizeof(struct ip))
-				ip->ip_sum = in_cksum_hdr(ip);
-			else
-				ip->ip_sum = in_cksum(reass, hlen);
-			if ((mcl = m_megapullup(reass, reass->m_pkthdr.len)) ==
-			    NULL)
-				goto badnat;
-			ip = mtod(mcl, struct ip *);
-		} else {
-			mcl = NULL;
-			goto badnat;
 		}
-	} else if (args->eh == NULL) {
-		ip->ip_len = htons(ip->ip_len);
-		ip->ip_off = htons(ip->ip_off);
 	}
-
 	/* 
 	 * XXX - Libalias checksum offload 'duct tape':
 	 * 
@@ -651,6 +664,7 @@ ipfw_nat_init(void)
 	IPFW_WUNLOCK(&V_layer3_chain);
 	V_ifaddr_event_tag = EVENTHANDLER_REGISTER(ifaddr_event, ifaddr_change, 
 	    NULL, EVENTHANDLER_PRI_ANY);
+	V_nat_reass = 1;
 }
 
 static void

From owner-svn-src-user@FreeBSD.ORG  Sun Feb  1 21:30:29 2009
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id CDB6E1065670;
	Sun,  1 Feb 2009 21:30:29 +0000 (UTC) (envelope-from imp@bsdimp.com)
Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85])
	by mx1.freebsd.org (Postfix) with ESMTP id 75E5C8FC14;
	Sun,  1 Feb 2009 21:30:29 +0000 (UTC) (envelope-from imp@bsdimp.com)
Received: from localhost (localhost [127.0.0.1])
	by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id n11LRdHb095111;
	Sun, 1 Feb 2009 14:27:39 -0700 (MST) (envelope-from imp@bsdimp.com)
Date: Sun, 01 Feb 2009 14:28:08 -0700 (MST)
Message-Id: <20090201.142808.886478999.imp@bsdimp.com>
To: thompsa@FreeBSD.org
From: "M. Warner Losh" <imp@bsdimp.com>
In-Reply-To: <200902010650.n116obU1045871@svn.freebsd.org>
References: <200902010650.n116obU1045871@svn.freebsd.org>
X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Cc: src-committers@FreeBSD.org, svn-src-user@FreeBSD.org
Subject: Re: svn commit: r187978 - user/thompsa/usb/sys/dev/usb2/ethernet
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 01 Feb 2009 21:30:30 -0000

In message: <200902010650.n116obU1045871@svn.freebsd.org>
            Andrew Thompson <thompsa@FreeBSD.org> writes:
: +	locked = mtx_owned(&sc->sc_mtx);
: +	if (!locked)
: +		AUE_LOCK(sc);

You do know this is racy, right?

Warner

From owner-svn-src-user@FreeBSD.ORG  Sun Feb  1 22:09:49 2009
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E47531065670
	for <svn-src-user@FreeBSD.org>; Sun,  1 Feb 2009 22:09:49 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from pele.citylink.co.nz (pele.citylink.co.nz [202.8.44.226])
	by mx1.freebsd.org (Postfix) with ESMTP id A77458FC1A
	for <svn-src-user@FreeBSD.org>; Sun,  1 Feb 2009 22:09:49 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from localhost (localhost [127.0.0.1])
	by pele.citylink.co.nz (Postfix) with ESMTP id 3EF0AFF79;
	Mon,  2 Feb 2009 10:37:53 +1300 (NZDT)
X-Virus-Scanned: Debian amavisd-new at citylink.co.nz
Received: from pele.citylink.co.nz ([127.0.0.1])
	by localhost (pele.citylink.co.nz [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id M6PtYgRfYCzj; Mon,  2 Feb 2009 10:37:49 +1300 (NZDT)
Received: from citylink.fud.org.nz (unknown [202.8.44.45])
	by pele.citylink.co.nz (Postfix) with ESMTP;
	Mon,  2 Feb 2009 10:37:49 +1300 (NZDT)
Received: by citylink.fud.org.nz (Postfix, from userid 1001)
	id 34C9F1142A; Mon,  2 Feb 2009 10:37:49 +1300 (NZDT)
Date: Sun, 1 Feb 2009 13:37:49 -0800
From: Andrew Thompson <thompsa@FreeBSD.org>
To: "M. Warner Losh" <imp@bsdimp.com>
Message-ID: <20090201213749.GJ32503@citylink.fud.org.nz>
References: <200902010650.n116obU1045871@svn.freebsd.org>
	<20090201.142808.886478999.imp@bsdimp.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20090201.142808.886478999.imp@bsdimp.com>
User-Agent: Mutt/1.5.17 (2007-11-01)
Cc: src-committers@FreeBSD.org, svn-src-user@FreeBSD.org
Subject: Re: svn commit: r187978 - user/thompsa/usb/sys/dev/usb2/ethernet
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 01 Feb 2009 22:09:50 -0000

On Sun, Feb 01, 2009 at 02:28:08PM -0700, M. Warner Losh wrote:
> In message: <200902010650.n116obU1045871@svn.freebsd.org>
>             Andrew Thompson <thompsa@FreeBSD.org> writes:
> : +	locked = mtx_owned(&sc->sc_mtx);
> : +	if (!locked)
> : +		AUE_LOCK(sc);
> 
> You do know this is racy, right?

Yea... It only get called unlocked during mii probe+attach so its fine.
I havnt actaully checked if its ok to hold a mutex during
mii_phy_probe() which would make this go away.


Andrew

From owner-svn-src-user@FreeBSD.ORG  Sun Feb  1 23:27:24 2009
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7025B106564A;
	Sun,  1 Feb 2009 23:27:24 +0000 (UTC) (envelope-from sam@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 59AC58FC1B;
	Sun,  1 Feb 2009 23:27:24 +0000 (UTC) (envelope-from sam@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n11NROYu069157;
	Sun, 1 Feb 2009 23:27:24 GMT (envelope-from sam@svn.freebsd.org)
Received: (from sam@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n11NRMdb069127;
	Sun, 1 Feb 2009 23:27:22 GMT (envelope-from sam@svn.freebsd.org)
Message-Id: <200902012327.n11NRMdb069127@svn.freebsd.org>
From: Sam Leffler <sam@FreeBSD.org>
Date: Sun, 1 Feb 2009 23:27:22 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r187992 - in user/sam/wifi: . bin/chmod bin/dd bin/kenv
	bin/ln bin/pax cddl/contrib/opensolaris/lib/libdtrace/common
	contrib/bind9 contrib/bind9/lib/dns
	contrib/bind9/lib/isc/unix contr...
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 01 Feb 2009 23:27:24 -0000

Author: sam
Date: Sun Feb  1 23:27:21 2009
New Revision: 187992
URL: http://svn.freebsd.org/changeset/base/187992

Log:
  sync with head

Added:
  user/sam/wifi/contrib/gdtoa/gdtoa_fltrnds.h
     - copied unchanged from r187991, head/contrib/gdtoa/gdtoa_fltrnds.h
  user/sam/wifi/contrib/gdtoa/test/obad/
     - copied from r187991, head/contrib/gdtoa/test/obad/
  user/sam/wifi/contrib/openbsm/libauditd/libauditd.3
     - copied unchanged from r187341, head/contrib/openbsm/libauditd/libauditd.3
  user/sam/wifi/contrib/openbsm/libbsm/au_domain.3
     - copied unchanged from r187341, head/contrib/openbsm/libbsm/au_domain.3
  user/sam/wifi/contrib/openbsm/libbsm/au_socket_type.3
     - copied unchanged from r187341, head/contrib/openbsm/libbsm/au_socket_type.3
  user/sam/wifi/contrib/openbsm/libbsm/bsm_domain.c
     - copied unchanged from r187341, head/contrib/openbsm/libbsm/bsm_domain.c
  user/sam/wifi/contrib/openbsm/libbsm/bsm_socket_type.c
     - copied unchanged from r187341, head/contrib/openbsm/libbsm/bsm_socket_type.c
  user/sam/wifi/contrib/openbsm/sys/bsm/audit_domain.h
     - copied unchanged from r187341, head/contrib/openbsm/sys/bsm/audit_domain.h
  user/sam/wifi/contrib/openbsm/sys/bsm/audit_socket_type.h
     - copied unchanged from r187341, head/contrib/openbsm/sys/bsm/audit_socket_type.h
  user/sam/wifi/lib/libarchive/test/test_write_disk_failures.c
     - copied unchanged from r187607, head/lib/libarchive/test/test_write_disk_failures.c
  user/sam/wifi/lib/libarchive/test/test_write_disk_sparse.c
     - copied unchanged from r187742, head/lib/libarchive/test/test_write_disk_sparse.c
  user/sam/wifi/lib/libc/stdio/printfcommon.h
     - copied, changed from r187341, head/lib/libc/stdio/printfcommon.h
  user/sam/wifi/sbin/ipfw/altq.c
     - copied unchanged from r187991, head/sbin/ipfw/altq.c
  user/sam/wifi/sbin/ipfw/dummynet.c
     - copied unchanged from r187991, head/sbin/ipfw/dummynet.c
  user/sam/wifi/sbin/ipfw/ipfw2.h
     - copied unchanged from r187991, head/sbin/ipfw/ipfw2.h
  user/sam/wifi/sbin/ipfw/ipv6.c
     - copied unchanged from r187991, head/sbin/ipfw/ipv6.c
  user/sam/wifi/sbin/ipfw/main.c
     - copied unchanged from r187991, head/sbin/ipfw/main.c
  user/sam/wifi/sbin/ipfw/nat.c
     - copied unchanged from r187991, head/sbin/ipfw/nat.c
  user/sam/wifi/share/man/man4/man4.powerpc/snd_ai2s.4
     - copied unchanged from r187742, head/share/man/man4/man4.powerpc/snd_ai2s.4
  user/sam/wifi/share/man/man4/man4.powerpc/snd_davbus.4
     - copied unchanged from r187742, head/share/man/man4/man4.powerpc/snd_davbus.4
  user/sam/wifi/share/man/man4/urtw.4
     - copied unchanged from r187633, head/share/man/man4/urtw.4
  user/sam/wifi/share/man/man5/portindex.5
     - copied unchanged from r187991, head/share/man/man5/portindex.5
  user/sam/wifi/share/man/man7/adding_user.7
     - copied unchanged from r187991, head/share/man/man7/adding_user.7
  user/sam/wifi/sys/dev/ofw/ofw_iicbus.c
     - copied, changed from r187341, head/sys/dev/ofw/ofw_iicbus.c
  user/sam/wifi/sys/dev/sound/macio/
     - copied from r187742, head/sys/dev/sound/macio/
  user/sam/wifi/sys/dev/syscons/teken/teken_scs.h
     - copied unchanged from r187607, head/sys/dev/syscons/teken/teken_scs.h
  user/sam/wifi/sys/dev/usb/if_urtw.c
     - copied unchanged from r187633, head/sys/dev/usb/if_urtw.c
  user/sam/wifi/sys/dev/usb/if_urtwreg.h
     - copied unchanged from r187633, head/sys/dev/usb/if_urtwreg.h
  user/sam/wifi/sys/dev/usb/if_urtwvar.h
     - copied unchanged from r187633, head/sys/dev/usb/if_urtwvar.h
  user/sam/wifi/sys/modules/sound/driver/ai2s/
     - copied from r187742, head/sys/modules/sound/driver/ai2s/
  user/sam/wifi/sys/modules/sound/driver/davbus/
     - copied from r187742, head/sys/modules/sound/driver/davbus/
  user/sam/wifi/sys/modules/urtw/
     - copied from r187633, head/sys/modules/urtw/
  user/sam/wifi/sys/powerpc/powermac/kiic.c
     - copied, changed from r187341, head/sys/powerpc/powermac/kiic.c
  user/sam/wifi/tools/regression/lib/msun/test-conj.c
     - copied unchanged from r187991, head/tools/regression/lib/msun/test-conj.c
  user/sam/wifi/tools/regression/lib/msun/test-conj.t
     - copied unchanged from r187991, head/tools/regression/lib/msun/test-conj.t
  user/sam/wifi/tools/regression/usr.bin/jot/regress.wX1.out
     - copied unchanged from r187341, head/tools/regression/usr.bin/jot/regress.wX1.out
  user/sam/wifi/tools/tools/nanobsd/gateworks/
     - copied from r187341, head/tools/tools/nanobsd/gateworks/
  user/sam/wifi/tools/tools/net80211/scripts/setup.tdma-master
     - copied unchanged from r187341, head/tools/tools/net80211/scripts/setup.tdma-master
  user/sam/wifi/tools/tools/net80211/scripts/setup.tdma-slave
     - copied unchanged from r187341, head/tools/tools/net80211/scripts/setup.tdma-slave
  user/sam/wifi/tools/tools/net80211/wlantxtime/
     - copied from r187341, head/tools/tools/net80211/wlantxtime/
  user/sam/wifi/tools/tools/sysbuild/
     - copied from r187607, head/tools/tools/sysbuild/
  user/sam/wifi/usr.bin/mail/util.c
     - copied unchanged from r187341, head/usr.bin/mail/util.c
  user/sam/wifi/usr.sbin/bluetooth/btpand/
     - copied from r187991, head/usr.sbin/bluetooth/btpand/
  user/sam/wifi/usr.sbin/i2c/
     - copied from r187742, head/usr.sbin/i2c/
Deleted:
  user/sam/wifi/share/man/man8/adding_user.8
  user/sam/wifi/sys/dev/digi/con.CX-IBM.h
  user/sam/wifi/sys/dev/digi/con.CX.h
  user/sam/wifi/sys/dev/digi/con.EPCX.h
  user/sam/wifi/sys/dev/digi/con.MBank.h
  user/sam/wifi/tools/regression/usr.bin/jot/regress.wX.out
  user/sam/wifi/usr.bin/mail/aux.c
Modified:
  user/sam/wifi/   (props changed)
  user/sam/wifi/Makefile.inc1
  user/sam/wifi/ObsoleteFiles.inc
  user/sam/wifi/UPDATING
  user/sam/wifi/bin/chmod/chmod.1
  user/sam/wifi/bin/dd/dd.1
  user/sam/wifi/bin/kenv/kenv.1
  user/sam/wifi/bin/ln/ln.1
  user/sam/wifi/bin/pax/file_subs.c
  user/sam/wifi/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c
  user/sam/wifi/contrib/bind9/   (props changed)
  user/sam/wifi/contrib/bind9/CHANGES
  user/sam/wifi/contrib/bind9/lib/dns/api
  user/sam/wifi/contrib/bind9/lib/dns/openssldsa_link.c
  user/sam/wifi/contrib/bind9/lib/dns/opensslrsa_link.c
  user/sam/wifi/contrib/bind9/lib/isc/unix/socket.c
  user/sam/wifi/contrib/bind9/version
  user/sam/wifi/contrib/csup/   (props changed)
  user/sam/wifi/contrib/file/   (props changed)
  user/sam/wifi/contrib/gdtoa/   (props changed)
  user/sam/wifi/contrib/gdtoa/README
  user/sam/wifi/contrib/gdtoa/g_Qfmt.c
  user/sam/wifi/contrib/gdtoa/g__fmt.c
  user/sam/wifi/contrib/gdtoa/g_ddfmt.c
  user/sam/wifi/contrib/gdtoa/g_dfmt.c
  user/sam/wifi/contrib/gdtoa/g_ffmt.c
  user/sam/wifi/contrib/gdtoa/g_xLfmt.c
  user/sam/wifi/contrib/gdtoa/g_xfmt.c
  user/sam/wifi/contrib/gdtoa/gdtoa.c
  user/sam/wifi/contrib/gdtoa/gdtoa.h
  user/sam/wifi/contrib/gdtoa/gdtoaimp.h
  user/sam/wifi/contrib/gdtoa/gethex.c
  user/sam/wifi/contrib/gdtoa/makefile
  user/sam/wifi/contrib/gdtoa/smisc.c
  user/sam/wifi/contrib/gdtoa/strtod.c
  user/sam/wifi/contrib/gdtoa/strtodg.c
  user/sam/wifi/contrib/gdtoa/strtof.c
  user/sam/wifi/contrib/gdtoa/strtopQ.c
  user/sam/wifi/contrib/gdtoa/strtopd.c
  user/sam/wifi/contrib/gdtoa/strtopdd.c
  user/sam/wifi/contrib/gdtoa/strtopf.c
  user/sam/wifi/contrib/gdtoa/strtopx.c
  user/sam/wifi/contrib/gdtoa/strtopxL.c
  user/sam/wifi/contrib/gdtoa/test/README
  user/sam/wifi/contrib/gdtoa/test/getround.c
  user/sam/wifi/contrib/gdtoa/test/makefile
  user/sam/wifi/contrib/gdtoa/test/xsum0.out
  user/sam/wifi/contrib/gdtoa/xsum0.out
  user/sam/wifi/contrib/ntp/ntpd/ntp_crypto.c
  user/sam/wifi/contrib/openbsm/   (props changed)
  user/sam/wifi/contrib/openbsm/INSTALL
  user/sam/wifi/contrib/openbsm/NEWS
  user/sam/wifi/contrib/openbsm/VERSION
  user/sam/wifi/contrib/openbsm/bin/auditd/auditd.8
  user/sam/wifi/contrib/openbsm/bin/auditd/auditd.c
  user/sam/wifi/contrib/openbsm/bin/auditd/auditd_darwin.c
  user/sam/wifi/contrib/openbsm/bin/auditd/auditd_fbsd.c
  user/sam/wifi/contrib/openbsm/bin/auditreduce/auditreduce.c
  user/sam/wifi/contrib/openbsm/bsm/auditd_lib.h
  user/sam/wifi/contrib/openbsm/bsm/libbsm.h
  user/sam/wifi/contrib/openbsm/configure
  user/sam/wifi/contrib/openbsm/configure.ac
  user/sam/wifi/contrib/openbsm/libauditd/Makefile.am
  user/sam/wifi/contrib/openbsm/libauditd/Makefile.in
  user/sam/wifi/contrib/openbsm/libauditd/auditd_lib.c
  user/sam/wifi/contrib/openbsm/libbsm/Makefile.am
  user/sam/wifi/contrib/openbsm/libbsm/Makefile.in
  user/sam/wifi/contrib/openbsm/libbsm/au_token.3
  user/sam/wifi/contrib/openbsm/libbsm/bsm_audit.c
  user/sam/wifi/contrib/openbsm/libbsm/bsm_errno.c
  user/sam/wifi/contrib/openbsm/libbsm/bsm_io.c
  user/sam/wifi/contrib/openbsm/libbsm/bsm_token.c
  user/sam/wifi/contrib/openbsm/libbsm/libbsm.3
  user/sam/wifi/contrib/openbsm/man/audit_user.5
  user/sam/wifi/contrib/openbsm/sys/bsm/Makefile.am
  user/sam/wifi/contrib/openbsm/sys/bsm/Makefile.in
  user/sam/wifi/contrib/openbsm/sys/bsm/audit.h
  user/sam/wifi/contrib/openbsm/sys/bsm/audit_errno.h
  user/sam/wifi/contrib/openbsm/sys/bsm/audit_record.h
  user/sam/wifi/contrib/openbsm/test/bsm/generate.c
  user/sam/wifi/contrib/openbsm/test/reference/E2BIG_record
  user/sam/wifi/contrib/openbsm/test/reference/EACCES_record
  user/sam/wifi/contrib/openbsm/test/reference/EBADF_record
  user/sam/wifi/contrib/openbsm/test/reference/EBUSY_record
  user/sam/wifi/contrib/openbsm/test/reference/ECHILD_record
  user/sam/wifi/contrib/openbsm/test/reference/EDEADLK_record
  user/sam/wifi/contrib/openbsm/test/reference/EEXIST_record
  user/sam/wifi/contrib/openbsm/test/reference/EFAULT_record
  user/sam/wifi/contrib/openbsm/test/reference/EFBIG_record
  user/sam/wifi/contrib/openbsm/test/reference/EINTR_record
  user/sam/wifi/contrib/openbsm/test/reference/EINVAL_record
  user/sam/wifi/contrib/openbsm/test/reference/EIO_record
  user/sam/wifi/contrib/openbsm/test/reference/EISDIR_record
  user/sam/wifi/contrib/openbsm/test/reference/EMFILE_record
  user/sam/wifi/contrib/openbsm/test/reference/EMLINK_record
  user/sam/wifi/contrib/openbsm/test/reference/ENFILE_record
  user/sam/wifi/contrib/openbsm/test/reference/ENODEV_record
  user/sam/wifi/contrib/openbsm/test/reference/ENOENT_record
  user/sam/wifi/contrib/openbsm/test/reference/ENOEXEC_record
  user/sam/wifi/contrib/openbsm/test/reference/ENOMEM_record
  user/sam/wifi/contrib/openbsm/test/reference/ENOSPC_record
  user/sam/wifi/contrib/openbsm/test/reference/ENOTBLK_record
  user/sam/wifi/contrib/openbsm/test/reference/ENOTDIR_record
  user/sam/wifi/contrib/openbsm/test/reference/ENOTTY_record
  user/sam/wifi/contrib/openbsm/test/reference/ENXIO_record
  user/sam/wifi/contrib/openbsm/test/reference/EPERM_record
  user/sam/wifi/contrib/openbsm/test/reference/EPIPE_record
  user/sam/wifi/contrib/openbsm/test/reference/EROFS_record
  user/sam/wifi/contrib/openbsm/test/reference/ESPIPE_record
  user/sam/wifi/contrib/openbsm/test/reference/ESRCH_record
  user/sam/wifi/contrib/openbsm/test/reference/ETXTBSY_record
  user/sam/wifi/contrib/openbsm/test/reference/EXDEV_record
  user/sam/wifi/contrib/openbsm/test/reference/arg32_record
  user/sam/wifi/contrib/openbsm/test/reference/data_record
  user/sam/wifi/contrib/openbsm/test/reference/data_token
  user/sam/wifi/contrib/openbsm/test/reference/file_record
  user/sam/wifi/contrib/openbsm/test/reference/in_addr_record
  user/sam/wifi/contrib/openbsm/test/reference/ip_record
  user/sam/wifi/contrib/openbsm/test/reference/ipc_record
  user/sam/wifi/contrib/openbsm/test/reference/iport_record
  user/sam/wifi/contrib/openbsm/test/reference/opaque_record
  user/sam/wifi/contrib/openbsm/test/reference/path_record
  user/sam/wifi/contrib/openbsm/test/reference/process32_record
  user/sam/wifi/contrib/openbsm/test/reference/process32ex_record-IPv4
  user/sam/wifi/contrib/openbsm/test/reference/process32ex_record-IPv6
  user/sam/wifi/contrib/openbsm/test/reference/process64_record
  user/sam/wifi/contrib/openbsm/test/reference/process64ex_record-IPv4
  user/sam/wifi/contrib/openbsm/test/reference/process64ex_record-IPv6
  user/sam/wifi/contrib/openbsm/test/reference/return32_record
  user/sam/wifi/contrib/openbsm/test/reference/seq_record
  user/sam/wifi/contrib/openbsm/test/reference/socketex_record
  user/sam/wifi/contrib/openbsm/test/reference/socketex_token
  user/sam/wifi/contrib/openbsm/test/reference/subject32_record
  user/sam/wifi/contrib/openbsm/test/reference/subject32ex_record
  user/sam/wifi/contrib/openbsm/test/reference/text_record
  user/sam/wifi/contrib/openbsm/test/reference/zonename_record
  user/sam/wifi/contrib/opie/opiekey.1
  user/sam/wifi/contrib/smbfs/mount_smbfs/mount_smbfs.8
  user/sam/wifi/contrib/smbfs/mount_smbfs/mount_smbfs.c
  user/sam/wifi/contrib/wpa_supplicant/   (props changed)
  user/sam/wifi/contrib/wpa_supplicant/ChangeLog
  user/sam/wifi/contrib/wpa_supplicant/Makefile
  user/sam/wifi/contrib/wpa_supplicant/base64.c
  user/sam/wifi/contrib/wpa_supplicant/ctrl_iface.c
  user/sam/wifi/contrib/wpa_supplicant/ctrl_iface_dbus.c
  user/sam/wifi/contrib/wpa_supplicant/ctrl_iface_unix.c
  user/sam/wifi/contrib/wpa_supplicant/dbus_dict_helpers.c
  user/sam/wifi/contrib/wpa_supplicant/doc/docbook/wpa_background.8
  user/sam/wifi/contrib/wpa_supplicant/doc/docbook/wpa_cli.8
  user/sam/wifi/contrib/wpa_supplicant/doc/docbook/wpa_cli.sgml
  user/sam/wifi/contrib/wpa_supplicant/doc/docbook/wpa_passphrase.8
  user/sam/wifi/contrib/wpa_supplicant/doc/docbook/wpa_supplicant.8
  user/sam/wifi/contrib/wpa_supplicant/doc/docbook/wpa_supplicant.conf.5
  user/sam/wifi/contrib/wpa_supplicant/doc/docbook/wpa_supplicant.conf.sgml
  user/sam/wifi/contrib/wpa_supplicant/doc/docbook/wpa_supplicant.sgml
  user/sam/wifi/contrib/wpa_supplicant/driver_ndis.c
  user/sam/wifi/contrib/wpa_supplicant/eap.c
  user/sam/wifi/contrib/wpa_supplicant/eap_aka.c
  user/sam/wifi/contrib/wpa_supplicant/eap_gpsk.c
  user/sam/wifi/contrib/wpa_supplicant/eap_gpsk_common.c
  user/sam/wifi/contrib/wpa_supplicant/eap_ttls.c
  user/sam/wifi/contrib/wpa_supplicant/eloop.c
  user/sam/wifi/contrib/wpa_supplicant/eloop.h
  user/sam/wifi/contrib/wpa_supplicant/eloop_none.c
  user/sam/wifi/contrib/wpa_supplicant/mlme.c
  user/sam/wifi/contrib/wpa_supplicant/os_unix.c
  user/sam/wifi/contrib/wpa_supplicant/preauth_test.c
  user/sam/wifi/contrib/wpa_supplicant/radius.c
  user/sam/wifi/contrib/wpa_supplicant/sha1.c
  user/sam/wifi/contrib/wpa_supplicant/tls_openssl.c
  user/sam/wifi/contrib/wpa_supplicant/version.h
  user/sam/wifi/contrib/wpa_supplicant/wpa.c
  user/sam/wifi/contrib/wpa_supplicant/wpa.h
  user/sam/wifi/contrib/wpa_supplicant/wpa_cli.c
  user/sam/wifi/contrib/wpa_supplicant/wpa_gui-qt4/networkconfig.cpp
  user/sam/wifi/contrib/wpa_supplicant/wpa_gui-qt4/scanresults.cpp
  user/sam/wifi/contrib/wpa_supplicant/wpa_gui-qt4/wpagui.cpp
  user/sam/wifi/contrib/wpa_supplicant/wpa_gui/networkconfig.ui.h
  user/sam/wifi/contrib/wpa_supplicant/wpa_gui/userdatarequest.ui.h
  user/sam/wifi/contrib/wpa_supplicant/wpa_gui/wpagui.ui.h
  user/sam/wifi/contrib/wpa_supplicant/wpa_i.h
  user/sam/wifi/contrib/wpa_supplicant/wpa_supplicant.c
  user/sam/wifi/etc/   (props changed)
  user/sam/wifi/etc/defaults/rc.conf
  user/sam/wifi/etc/periodic/weekly/Makefile
  user/sam/wifi/etc/rc.d/defaultroute
  user/sam/wifi/etc/rc.d/jail
  user/sam/wifi/etc/rc.shutdown
  user/sam/wifi/etc/regdomain.xml
  user/sam/wifi/games/fortune/datfiles/freebsd-tips
  user/sam/wifi/gnu/usr.bin/grep/savedir.c
  user/sam/wifi/include/paths.h
  user/sam/wifi/include/stdlib.h
  user/sam/wifi/include/string.h
  user/sam/wifi/include/wchar.h
  user/sam/wifi/lib/libarchive/archive_read_support_format_ar.c
  user/sam/wifi/lib/libarchive/archive_read_support_format_iso9660.c
  user/sam/wifi/lib/libarchive/archive_write_disk.c
  user/sam/wifi/lib/libarchive/test/Makefile
  user/sam/wifi/lib/libarchive/test/test_write_disk_secure.c
  user/sam/wifi/lib/libbsm/Makefile
  user/sam/wifi/lib/libc/db/man/dbm.3
  user/sam/wifi/lib/libc/gen/sysctl.3
  user/sam/wifi/lib/libc/locale/mbstowcs.c
  user/sam/wifi/lib/libc/locale/wcsftime.c
  user/sam/wifi/lib/libc/locale/wcstombs.c
  user/sam/wifi/lib/libc/stdio/ferror.3
  user/sam/wifi/lib/libc/stdio/fputws.c
  user/sam/wifi/lib/libc/stdio/printf.3
  user/sam/wifi/lib/libc/stdio/vfprintf.c
  user/sam/wifi/lib/libc/stdio/vfscanf.c
  user/sam/wifi/lib/libc/stdio/vfwprintf.c
  user/sam/wifi/lib/libc/stdio/vfwscanf.c
  user/sam/wifi/lib/libc/stdio/vswscanf.c
  user/sam/wifi/lib/libc/stdio/wsetup.c
  user/sam/wifi/lib/libc/string/Makefile.inc
  user/sam/wifi/lib/libc/string/ffs.3
  user/sam/wifi/lib/libc/string/strlcat.c
  user/sam/wifi/lib/libc/string/strlcpy.3
  user/sam/wifi/lib/libc/string/strlen.c
  user/sam/wifi/lib/libc/sys/timer_create.2
  user/sam/wifi/lib/libmd/mdX.3
  user/sam/wifi/lib/libpmc/libpmc.c
  user/sam/wifi/lib/libusb20/libusb20.c
  user/sam/wifi/lib/msun/src/e_rem_pio2.c
  user/sam/wifi/lib/msun/src/e_rem_pio2f.c
  user/sam/wifi/lib/msun/src/k_cosf.c
  user/sam/wifi/lib/msun/src/k_sinf.c
  user/sam/wifi/lib/msun/src/k_tanf.c
  user/sam/wifi/lib/msun/src/math.h
  user/sam/wifi/libexec/comsat/comsat.c
  user/sam/wifi/libexec/ftpd/ftpd.8
  user/sam/wifi/release/doc/en_US.ISO8859-1/relnotes/article.sgml
  user/sam/wifi/sbin/dumpfs/dumpfs.8
  user/sam/wifi/sbin/dumpfs/dumpfs.c
  user/sam/wifi/sbin/fdisk/fdisk.c
  user/sam/wifi/sbin/fsck/fsck.8
  user/sam/wifi/sbin/fsck/fsck.c
  user/sam/wifi/sbin/fsck/fsutil.h
  user/sam/wifi/sbin/fsck_ffs/fsck.h
  user/sam/wifi/sbin/fsck_ffs/fsck_ffs.8
  user/sam/wifi/sbin/fsck_ffs/fsutil.c
  user/sam/wifi/sbin/fsck_ffs/main.c
  user/sam/wifi/sbin/fsck_ffs/setup.c
  user/sam/wifi/sbin/ifconfig/   (props changed)
  user/sam/wifi/sbin/ifconfig/ifconfig.8
  user/sam/wifi/sbin/ifconfig/ifconfig.c
  user/sam/wifi/sbin/ifconfig/ifieee80211.c
  user/sam/wifi/sbin/ipfw/Makefile
  user/sam/wifi/sbin/ipfw/ipfw2.c
  user/sam/wifi/sbin/mdconfig/mdconfig.8
  user/sam/wifi/sbin/mdconfig/mdconfig.c
  user/sam/wifi/sbin/mount/mount.c
  user/sam/wifi/sbin/mount_nfs/mount_nfs.c
  user/sam/wifi/sbin/mount_ntfs/mount_ntfs.8
  user/sam/wifi/sbin/ping/ping.8
  user/sam/wifi/sbin/reboot/reboot.c
  user/sam/wifi/sbin/recoverdisk/recoverdisk.c
  user/sam/wifi/sbin/restore/interactive.c
  user/sam/wifi/sbin/route/route.c
  user/sam/wifi/share/examples/cvsup/refuse.README
  user/sam/wifi/share/man/man4/Makefile
  user/sam/wifi/share/man/man4/ath.4
  user/sam/wifi/share/man/man4/bce.4
  user/sam/wifi/share/man/man4/bge.4
  user/sam/wifi/share/man/man4/cd.4
  user/sam/wifi/share/man/man4/gem.4
  user/sam/wifi/share/man/man4/hme.4
  user/sam/wifi/share/man/man4/iic.4
  user/sam/wifi/share/man/man4/man4.powerpc/Makefile
  user/sam/wifi/share/man/man4/ng_bpf.4
  user/sam/wifi/share/man/man4/nge.4
  user/sam/wifi/share/man/man4/sdhci.4
  user/sam/wifi/share/man/man4/sk.4
  user/sam/wifi/share/man/man4/sysmouse.4
  user/sam/wifi/share/man/man5/Makefile
  user/sam/wifi/share/man/man5/rc.conf.5
  user/sam/wifi/share/man/man7/Makefile
  user/sam/wifi/share/man/man7/build.7
  user/sam/wifi/share/man/man7/ports.7
  user/sam/wifi/share/man/man7/tuning.7
  user/sam/wifi/share/man/man8/Makefile
  user/sam/wifi/share/man/man9/insmntque.9
  user/sam/wifi/share/man/man9/kthread.9
  user/sam/wifi/share/man/man9/redzone.9
  user/sam/wifi/share/misc/committers-src.dot
  user/sam/wifi/share/misc/pci_vendors
  user/sam/wifi/share/mk/bsd.own.mk
  user/sam/wifi/share/zoneinfo/   (props changed)
  user/sam/wifi/share/zoneinfo/asia
  user/sam/wifi/share/zoneinfo/backward
  user/sam/wifi/share/zoneinfo/europe
  user/sam/wifi/share/zoneinfo/leapseconds
  user/sam/wifi/share/zoneinfo/northamerica
  user/sam/wifi/share/zoneinfo/zone.tab
  user/sam/wifi/sys/   (props changed)
  user/sam/wifi/sys/amd64/amd64/cpu_switch.S
  user/sam/wifi/sys/amd64/amd64/fpu.c
  user/sam/wifi/sys/amd64/amd64/identcpu.c
  user/sam/wifi/sys/amd64/amd64/io_apic.c
  user/sam/wifi/sys/amd64/amd64/local_apic.c
  user/sam/wifi/sys/amd64/amd64/mp_machdep.c
  user/sam/wifi/sys/amd64/amd64/msi.c
  user/sam/wifi/sys/amd64/conf/GENERIC
  user/sam/wifi/sys/amd64/ia32/ia32_signal.c
  user/sam/wifi/sys/amd64/ia32/ia32_sigtramp.S
  user/sam/wifi/sys/amd64/include/apicvar.h
  user/sam/wifi/sys/amd64/include/cpufunc.h
  user/sam/wifi/sys/amd64/include/fpu.h
  user/sam/wifi/sys/amd64/include/intr_machdep.h
  user/sam/wifi/sys/amd64/linux32/linux32_locore.s
  user/sam/wifi/sys/amd64/linux32/linux32_sysvec.c
  user/sam/wifi/sys/arm/arm/busdma_machdep.c
  user/sam/wifi/sys/arm/at91/at91.c
  user/sam/wifi/sys/arm/at91/at91_mci.c
  user/sam/wifi/sys/arm/at91/at91_twi.c
  user/sam/wifi/sys/arm/at91/at91_twireg.h
  user/sam/wifi/sys/arm/at91/at91var.h
  user/sam/wifi/sys/arm/at91/uart_bus_at91usart.c
  user/sam/wifi/sys/arm/at91/uart_cpu_at91rm9200usart.c
  user/sam/wifi/sys/arm/at91/uart_dev_at91usart.c
  user/sam/wifi/sys/arm/include/vmparam.h
  user/sam/wifi/sys/arm/xscale/i8134x/i81342_mcu.c
  user/sam/wifi/sys/boot/forth/loader.conf
  user/sam/wifi/sys/boot/i386/pxeldr/pxeboot.8
  user/sam/wifi/sys/cam/cam_periph.c
  user/sam/wifi/sys/cam/cam_xpt.c
  user/sam/wifi/sys/cam/scsi/scsi_all.c
  user/sam/wifi/sys/cam/scsi/scsi_da.c
  user/sam/wifi/sys/cam/scsi/scsi_low.c
  user/sam/wifi/sys/cam/scsi/scsi_pass.c
  user/sam/wifi/sys/cam/scsi/scsi_sg.c
  user/sam/wifi/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c
  user/sam/wifi/sys/compat/linprocfs/linprocfs.c
  user/sam/wifi/sys/compat/linux/linux_stats.c
  user/sam/wifi/sys/compat/ndis/winx32_wrap.S
  user/sam/wifi/sys/compat/svr4/svr4_types.h
  user/sam/wifi/sys/conf/NOTES
  user/sam/wifi/sys/conf/files.amd64
  user/sam/wifi/sys/conf/files.i386
  user/sam/wifi/sys/conf/files.pc98
  user/sam/wifi/sys/conf/files.powerpc
  user/sam/wifi/sys/conf/kmod.mk
  user/sam/wifi/sys/conf/newvers.sh
  user/sam/wifi/sys/conf/options
  user/sam/wifi/sys/contrib/altq/altq/altq_subr.c
  user/sam/wifi/sys/dev/acpica/acpi_battery.c
  user/sam/wifi/sys/dev/adb/adb_mouse.c
  user/sam/wifi/sys/dev/agp/agp_via.c
  user/sam/wifi/sys/dev/ath/   (props changed)
  user/sam/wifi/sys/dev/ath/if_ath.c
  user/sam/wifi/sys/dev/bce/if_bce.c
  user/sam/wifi/sys/dev/hwpmc/hwpmc_core.c
  user/sam/wifi/sys/dev/hwpmc/hwpmc_intel.c
  user/sam/wifi/sys/dev/hwpmc/pmc_events.h
  user/sam/wifi/sys/dev/iicbus/iic.c
  user/sam/wifi/sys/dev/iicbus/iic.h
  user/sam/wifi/sys/dev/iicbus/iicbus.c
  user/sam/wifi/sys/dev/mmc/mmc.c
  user/sam/wifi/sys/dev/msk/if_msk.c
  user/sam/wifi/sys/dev/msk/if_mskreg.h
  user/sam/wifi/sys/dev/pci/pci.c
  user/sam/wifi/sys/dev/ppbus/if_plip.c
  user/sam/wifi/sys/dev/ppbus/immio.c
  user/sam/wifi/sys/dev/ppbus/lpbb.c
  user/sam/wifi/sys/dev/ppbus/lpt.c
  user/sam/wifi/sys/dev/ppbus/pcfclock.c
  user/sam/wifi/sys/dev/ppbus/ppb_1284.c
  user/sam/wifi/sys/dev/ppbus/ppb_base.c
  user/sam/wifi/sys/dev/ppbus/ppb_msq.c
  user/sam/wifi/sys/dev/ppbus/ppbconf.c
  user/sam/wifi/sys/dev/ppbus/ppbconf.h
  user/sam/wifi/sys/dev/ppbus/ppi.c
  user/sam/wifi/sys/dev/ppbus/pps.c
  user/sam/wifi/sys/dev/ppbus/vpo.c
  user/sam/wifi/sys/dev/ppbus/vpoio.c
  user/sam/wifi/sys/dev/ppc/ppc.c
  user/sam/wifi/sys/dev/ppc/ppc_acpi.c
  user/sam/wifi/sys/dev/ppc/ppc_isa.c
  user/sam/wifi/sys/dev/ppc/ppc_pci.c
  user/sam/wifi/sys/dev/ppc/ppc_puc.c
  user/sam/wifi/sys/dev/ppc/ppcreg.h
  user/sam/wifi/sys/dev/ppc/ppcvar.h
  user/sam/wifi/sys/dev/puc/pucdata.c
  user/sam/wifi/sys/dev/re/if_re.c
  user/sam/wifi/sys/dev/sdhci/sdhci.c
  user/sam/wifi/sys/dev/sound/pci/cmi.c
  user/sam/wifi/sys/dev/sound/pci/hda/hdac.c
  user/sam/wifi/sys/dev/speaker/spkr.c
  user/sam/wifi/sys/dev/syscons/teken/   (props changed)
  user/sam/wifi/sys/dev/syscons/teken/sequences
  user/sam/wifi/sys/dev/syscons/teken/teken.c
  user/sam/wifi/sys/dev/syscons/teken/teken.h
  user/sam/wifi/sys/dev/syscons/teken/teken_demo.c
  user/sam/wifi/sys/dev/syscons/teken/teken_subr.h
  user/sam/wifi/sys/dev/syscons/teken/teken_subr_compat.h
  user/sam/wifi/sys/dev/usb/ehci.c
  user/sam/wifi/sys/dev/usb/u3g.c
  user/sam/wifi/sys/dev/usb/uftdi.c
  user/sam/wifi/sys/dev/usb/usbdevs
  user/sam/wifi/sys/dev/usb/usbdi.c
  user/sam/wifi/sys/dev/usb2/bluetooth/ng_ubt2.c
  user/sam/wifi/sys/dev/usb2/bluetooth/ng_ubt2_var.h
  user/sam/wifi/sys/dev/usb2/bluetooth/ubtbcmfw2.c
  user/sam/wifi/sys/dev/usb2/controller/at91dci_atmelarm.c
  user/sam/wifi/sys/dev/usb2/controller/ehci2_pci.c
  user/sam/wifi/sys/dev/usb2/controller/musb2_otg_atmelarm.c
  user/sam/wifi/sys/dev/usb2/controller/ohci2_atmelarm.c
  user/sam/wifi/sys/dev/usb2/controller/ohci2_pci.c
  user/sam/wifi/sys/dev/usb2/controller/uhci2.c
  user/sam/wifi/sys/dev/usb2/controller/uhci2_pci.c
  user/sam/wifi/sys/dev/usb2/controller/usb2_controller.h
  user/sam/wifi/sys/dev/usb2/controller/uss820dci_atmelarm.c
  user/sam/wifi/sys/dev/usb2/core/usb2_compat_linux.c
  user/sam/wifi/sys/dev/usb2/core/usb2_hub.c
  user/sam/wifi/sys/dev/usb2/ethernet/if_aue2.c
  user/sam/wifi/sys/dev/usb2/ethernet/if_auereg.h
  user/sam/wifi/sys/dev/usb2/ethernet/if_axe2.c
  user/sam/wifi/sys/dev/usb2/ethernet/if_axereg.h
  user/sam/wifi/sys/dev/usb2/ethernet/if_cdce2.c
  user/sam/wifi/sys/dev/usb2/ethernet/if_cdcereg.h
  user/sam/wifi/sys/dev/usb2/ethernet/if_cue2.c
  user/sam/wifi/sys/dev/usb2/ethernet/if_cuereg.h
  user/sam/wifi/sys/dev/usb2/ethernet/if_kue2.c
  user/sam/wifi/sys/dev/usb2/ethernet/if_kuereg.h
  user/sam/wifi/sys/dev/usb2/ethernet/if_rue2.c
  user/sam/wifi/sys/dev/usb2/ethernet/if_ruereg.h
  user/sam/wifi/sys/dev/usb2/ethernet/if_udav2.c
  user/sam/wifi/sys/dev/usb2/ethernet/if_udavreg.h
  user/sam/wifi/sys/dev/usb2/image/uscanner2.c
  user/sam/wifi/sys/dev/usb2/include/usb2_devid.h
  user/sam/wifi/sys/dev/usb2/include/usb2_devtable.h
  user/sam/wifi/sys/dev/usb2/include/usb2_ioctl.h
  user/sam/wifi/sys/dev/usb2/input/uhid2.c
  user/sam/wifi/sys/dev/usb2/input/ukbd2.c
  user/sam/wifi/sys/dev/usb2/input/ums2.c
  user/sam/wifi/sys/dev/usb2/misc/udbp2.c
  user/sam/wifi/sys/dev/usb2/misc/ufm2.c
  user/sam/wifi/sys/dev/usb2/quirk/usb2_quirk.c
  user/sam/wifi/sys/dev/usb2/serial/u3g2.c
  user/sam/wifi/sys/dev/usb2/serial/uark2.c
  user/sam/wifi/sys/dev/usb2/serial/ubsa2.c
  user/sam/wifi/sys/dev/usb2/serial/ubser2.c
  user/sam/wifi/sys/dev/usb2/serial/uchcom2.c
  user/sam/wifi/sys/dev/usb2/serial/ucycom2.c
  user/sam/wifi/sys/dev/usb2/serial/ufoma2.c
  user/sam/wifi/sys/dev/usb2/serial/uftdi2.c
  user/sam/wifi/sys/dev/usb2/serial/ugensa2.c
  user/sam/wifi/sys/dev/usb2/serial/uipaq2.c
  user/sam/wifi/sys/dev/usb2/serial/ulpt2.c
  user/sam/wifi/sys/dev/usb2/serial/umct2.c
  user/sam/wifi/sys/dev/usb2/serial/umodem2.c
  user/sam/wifi/sys/dev/usb2/serial/umoscom2.c
  user/sam/wifi/sys/dev/usb2/serial/uplcom2.c
  user/sam/wifi/sys/dev/usb2/serial/uvisor2.c
  user/sam/wifi/sys/dev/usb2/serial/uvscom2.c
  user/sam/wifi/sys/dev/usb2/sound/uaudio2.c
  user/sam/wifi/sys/dev/usb2/storage/ata-usb2.c
  user/sam/wifi/sys/dev/usb2/storage/umass2.c
  user/sam/wifi/sys/dev/usb2/storage/urio2.c
  user/sam/wifi/sys/dev/usb2/storage/ustorage2_fs.c
  user/sam/wifi/sys/dev/usb2/wlan/if_rum2.c
  user/sam/wifi/sys/dev/usb2/wlan/if_rumvar.h
  user/sam/wifi/sys/dev/usb2/wlan/if_ural2.c
  user/sam/wifi/sys/dev/usb2/wlan/if_uralvar.h
  user/sam/wifi/sys/dev/usb2/wlan/if_zyd2.c
  user/sam/wifi/sys/dev/usb2/wlan/if_zydreg.h
  user/sam/wifi/sys/dev/xen/blkback/blkback.c
  user/sam/wifi/sys/fs/cd9660/cd9660_lookup.c
  user/sam/wifi/sys/fs/cd9660/cd9660_node.c
  user/sam/wifi/sys/fs/cd9660/cd9660_node.h
  user/sam/wifi/sys/fs/cd9660/cd9660_rrip.c
  user/sam/wifi/sys/fs/cd9660/cd9660_vfsops.c
  user/sam/wifi/sys/fs/cd9660/cd9660_vnops.c
  user/sam/wifi/sys/fs/coda/coda_vfsops.c
  user/sam/wifi/sys/fs/devfs/devfs_devs.c
  user/sam/wifi/sys/fs/devfs/devfs_vnops.c
  user/sam/wifi/sys/fs/fifofs/fifo_vnops.c
  user/sam/wifi/sys/fs/hpfs/hpfs_vfsops.c
  user/sam/wifi/sys/fs/nullfs/null_vnops.c
  user/sam/wifi/sys/fs/nwfs/nwfs_subr.c
  user/sam/wifi/sys/fs/nwfs/nwfs_vnops.c
  user/sam/wifi/sys/fs/smbfs/smbfs_vnops.c
  user/sam/wifi/sys/fs/tmpfs/tmpfs_subr.c
  user/sam/wifi/sys/fs/udf/udf_vnops.c
  user/sam/wifi/sys/geom/geom.h
  user/sam/wifi/sys/geom/geom_dev.c
  user/sam/wifi/sys/geom/geom_subr.c
  user/sam/wifi/sys/gnu/fs/ext2fs/ext2_fs.h
  user/sam/wifi/sys/gnu/fs/ext2fs/ext2_fs_sb.h
  user/sam/wifi/sys/gnu/fs/ext2fs/ext2_inode.c
  user/sam/wifi/sys/gnu/fs/ext2fs/ext2_linux_ialloc.c
  user/sam/wifi/sys/gnu/fs/ext2fs/ext2_vfsops.c
  user/sam/wifi/sys/i386/conf/GENERIC
  user/sam/wifi/sys/i386/cpufreq/smist.c
  user/sam/wifi/sys/i386/i386/identcpu.c
  user/sam/wifi/sys/i386/i386/io_apic.c
  user/sam/wifi/sys/i386/i386/local_apic.c
  user/sam/wifi/sys/i386/i386/locore.s
  user/sam/wifi/sys/i386/i386/mp_machdep.c
  user/sam/wifi/sys/i386/i386/msi.c
  user/sam/wifi/sys/i386/i386/swtch.s
  user/sam/wifi/sys/i386/include/apicvar.h
  user/sam/wifi/sys/i386/include/cpufunc.h
  user/sam/wifi/sys/i386/include/intr_machdep.h
  user/sam/wifi/sys/i386/linux/linux_locore.s
  user/sam/wifi/sys/i386/svr4/svr4_locore.s
  user/sam/wifi/sys/i386/xen/mp_machdep.c
  user/sam/wifi/sys/ia64/ia64/pmap.c
  user/sam/wifi/sys/kern/imgact_elf.c
  user/sam/wifi/sys/kern/kern_clock.c
  user/sam/wifi/sys/kern/kern_jail.c
  user/sam/wifi/sys/kern/kern_malloc.c
  user/sam/wifi/sys/kern/kern_mib.c
  user/sam/wifi/sys/kern/kern_proc.c
  user/sam/wifi/sys/kern/kern_synch.c
  user/sam/wifi/sys/kern/kern_sysctl.c
  user/sam/wifi/sys/kern/kern_timeout.c
  user/sam/wifi/sys/kern/sched_4bsd.c
  user/sam/wifi/sys/kern/sched_ule.c
  user/sam/wifi/sys/kern/subr_pcpu.c
  user/sam/wifi/sys/kern/subr_smp.c
  user/sam/wifi/sys/kern/subr_witness.c
  user/sam/wifi/sys/kern/sys_generic.c
  user/sam/wifi/sys/kern/sysv_sem.c
  user/sam/wifi/sys/kern/tty.c
  user/sam/wifi/sys/kern/tty_info.c
  user/sam/wifi/sys/kern/tty_pty.c
  user/sam/wifi/sys/kern/uipc_mbuf.c
  user/sam/wifi/sys/kern/vfs_aio.c
  user/sam/wifi/sys/kern/vfs_cache.c
  user/sam/wifi/sys/kern/vfs_subr.c
  user/sam/wifi/sys/kern/vfs_syscalls.c
  user/sam/wifi/sys/kern/vfs_vnops.c
  user/sam/wifi/sys/kern/vnode_if.src
  user/sam/wifi/sys/mips/idt/idtpci.c
  user/sam/wifi/sys/mips/include/pmap.h
  user/sam/wifi/sys/mips/malta/gt_pci.c
  user/sam/wifi/sys/mips/mips/busdma_machdep.c
  user/sam/wifi/sys/mips/mips/cpu.c
  user/sam/wifi/sys/mips/mips/machdep.c
  user/sam/wifi/sys/mips/mips/nexus.c
  user/sam/wifi/sys/mips/mips/pmap.c
  user/sam/wifi/sys/modules/Makefile
  user/sam/wifi/sys/modules/agp/Makefile
  user/sam/wifi/sys/modules/sound/driver/Makefile
  user/sam/wifi/sys/modules/usb2/Makefile
  user/sam/wifi/sys/modules/usb2/serial_3g/   (props changed)
  user/sam/wifi/sys/net/if.c
  user/sam/wifi/sys/net/if_llatbl.c
  user/sam/wifi/sys/net/rtsock.c
  user/sam/wifi/sys/net80211/ieee80211.c
  user/sam/wifi/sys/net80211/ieee80211_ioctl.c
  user/sam/wifi/sys/net80211/ieee80211_node.c
  user/sam/wifi/sys/net80211/ieee80211_regdomain.c
  user/sam/wifi/sys/net80211/ieee80211_scan_sta.c
  user/sam/wifi/sys/netgraph/bluetooth/l2cap/ng_l2cap_llpi.c
  user/sam/wifi/sys/netgraph/ng_deflate.c
  user/sam/wifi/sys/netgraph/ng_iface.c
  user/sam/wifi/sys/netgraph/ng_iface.h
  user/sam/wifi/sys/netgraph/ng_mppc.c
  user/sam/wifi/sys/netgraph/ng_ppp.c
  user/sam/wifi/sys/netgraph/ng_pred1.c
  user/sam/wifi/sys/netinet/in.c
  user/sam/wifi/sys/netinet/in_pcb.c
  user/sam/wifi/sys/netinet/ip_fw2.c
  user/sam/wifi/sys/netinet/libalias/alias_ftp.c
  user/sam/wifi/sys/netinet/libalias/alias_irc.c
  user/sam/wifi/sys/netinet/libalias/alias_nbt.c
  user/sam/wifi/sys/netinet/raw_ip.c
  user/sam/wifi/sys/netinet/tcp_input.c
  user/sam/wifi/sys/netinet/tcp_subr.c
  user/sam/wifi/sys/netinet/tcp_timer.c
  user/sam/wifi/sys/netinet/tcp_var.h
  user/sam/wifi/sys/netinet/vinet.h
  user/sam/wifi/sys/netinet6/frag6.c
  user/sam/wifi/sys/netinet6/in6.c
  user/sam/wifi/sys/netinet6/in6_gif.c
  user/sam/wifi/sys/netinet6/in6_ifattach.c
  user/sam/wifi/sys/netinet6/ip6_forward.c
  user/sam/wifi/sys/netinet6/ip6_input.c
  user/sam/wifi/sys/netinet6/ip6_var.h
  user/sam/wifi/sys/netinet6/nd6.c
  user/sam/wifi/sys/netinet6/nd6_nbr.c
  user/sam/wifi/sys/netinet6/nd6_rtr.c
  user/sam/wifi/sys/netinet6/raw_ip6.c
  user/sam/wifi/sys/netinet6/vinet6.h
  user/sam/wifi/sys/netipsec/ipsec_mbuf.c
  user/sam/wifi/sys/netipsec/ipsec_output.c
  user/sam/wifi/sys/nfs4client/nfs4_subs.c
  user/sam/wifi/sys/nfsclient/nfs_vfsops.c
  user/sam/wifi/sys/nfsclient/nfs_vnops.c
  user/sam/wifi/sys/nfsserver/nfs_srvsubs.c
  user/sam/wifi/sys/opencrypto/cryptosoft.c
  user/sam/wifi/sys/pc98/conf/GENERIC
  user/sam/wifi/sys/pci/if_rlreg.h
  user/sam/wifi/sys/powerpc/conf/GENERIC
  user/sam/wifi/sys/powerpc/conf/NOTES
  user/sam/wifi/sys/powerpc/powermac/ata_macio.c
  user/sam/wifi/sys/powerpc/powerpc/intr_machdep.c
  user/sam/wifi/sys/security/mac/mac_audit.c
  user/sam/wifi/sys/security/mac/mac_framework.c
  user/sam/wifi/sys/security/mac/mac_priv.c
  user/sam/wifi/sys/sun4v/include/pcpu.h
  user/sam/wifi/sys/sys/_null.h
  user/sam/wifi/sys/sys/cdefs.h
  user/sam/wifi/sys/sys/conf.h
  user/sam/wifi/sys/sys/jail.h
  user/sam/wifi/sys/sys/ktr.h
  user/sam/wifi/sys/sys/lock.h
  user/sam/wifi/sys/sys/malloc.h
  user/sam/wifi/sys/sys/param.h
  user/sam/wifi/sys/sys/pcpu.h
  user/sam/wifi/sys/sys/pmc.h
  user/sam/wifi/sys/sys/sched.h
  user/sam/wifi/sys/sys/sysctl.h
  user/sam/wifi/sys/sys/types.h
  user/sam/wifi/sys/sys/unistd.h
  user/sam/wifi/sys/sys/vnode.h
  user/sam/wifi/sys/ufs/ffs/ffs_alloc.c
  user/sam/wifi/sys/ufs/ffs/ffs_balloc.c
  user/sam/wifi/sys/ufs/ffs/ffs_extern.h
  user/sam/wifi/sys/ufs/ffs/ffs_inode.c
  user/sam/wifi/sys/ufs/ffs/ffs_vfsops.c
  user/sam/wifi/sys/ufs/ffs/ffs_vnops.c
  user/sam/wifi/sys/ufs/ufs/ufs_dirhash.c
  user/sam/wifi/sys/ufs/ufs/ufs_lookup.c
  user/sam/wifi/sys/ufs/ufs/ufs_vnops.c
  user/sam/wifi/sys/vm/uma.h
  user/sam/wifi/sys/vm/uma_core.c
  user/sam/wifi/sys/vm/uma_dbg.c
  user/sam/wifi/sys/vm/uma_int.h
  user/sam/wifi/sys/vm/vm_meter.c
  user/sam/wifi/sys/vm/vm_mmap.c
  user/sam/wifi/tools/regression/fstest/tests/conf
  user/sam/wifi/tools/regression/fstest/tests/misc.sh
  user/sam/wifi/tools/regression/lib/libc/stdio/test-printfloat.c
  user/sam/wifi/tools/regression/lib/msun/Makefile
  user/sam/wifi/tools/regression/usr.bin/jot/regress.sh
  user/sam/wifi/tools/sched/schedgraph.py
  user/sam/wifi/tools/tools/ath/athdebug/athdebug.c
  user/sam/wifi/tools/tools/ath/athrd/   (props changed)
  user/sam/wifi/tools/tools/ath/athrd/athrd.1
  user/sam/wifi/tools/tools/ath/athstats/Makefile
  user/sam/wifi/tools/tools/ath/athstats/athstats.c
  user/sam/wifi/tools/tools/ath/athstats/main.c
  user/sam/wifi/tools/tools/nanobsd/gateworks/Files/   (props changed)
  user/sam/wifi/tools/tools/nanobsd/gateworks/Files/root/   (props changed)
  user/sam/wifi/tools/tools/nanobsd/gateworks/cfg/   (props changed)
  user/sam/wifi/tools/tools/nanobsd/gateworks/cfg/ssh/   (props changed)
  user/sam/wifi/tools/tools/net80211/Makefile
  user/sam/wifi/tools/tools/usb/print-usb-if-vids.sh
  user/sam/wifi/usr.bin/csplit/csplit.1
  user/sam/wifi/usr.bin/csup/   (props changed)
  user/sam/wifi/usr.bin/fetch/fetch.c
  user/sam/wifi/usr.bin/gprof/gprof.c
  user/sam/wifi/usr.bin/mail/Makefile
  user/sam/wifi/usr.bin/make/Makefile
  user/sam/wifi/usr.bin/make/buf.c
  user/sam/wifi/usr.bin/make/job.c
  user/sam/wifi/usr.bin/make/main.c
  user/sam/wifi/usr.bin/make/suff.c
  user/sam/wifi/usr.bin/netstat/inet6.c
  user/sam/wifi/usr.bin/netstat/main.c
  user/sam/wifi/usr.bin/netstat/netstat.1
  user/sam/wifi/usr.bin/sockstat/sockstat.c
  user/sam/wifi/usr.bin/split/split.1
  user/sam/wifi/usr.bin/truss/truss.1
  user/sam/wifi/usr.sbin/Makefile
  user/sam/wifi/usr.sbin/boot0cfg/boot0cfg.8
  user/sam/wifi/usr.sbin/config/config.8
  user/sam/wifi/usr.sbin/crunch/crunchgen/crunchgen.c
  user/sam/wifi/usr.sbin/gssd/gssd.8
  user/sam/wifi/usr.sbin/jail/jail.8
  user/sam/wifi/usr.sbin/makefs/ffs/ffs_bswap.c   (props changed)
  user/sam/wifi/usr.sbin/makefs/ffs/ffs_subr.c   (props changed)
  user/sam/wifi/usr.sbin/makefs/ffs/ufs_bswap.h   (props changed)
  user/sam/wifi/usr.sbin/makefs/getid.c   (props changed)
  user/sam/wifi/usr.sbin/mtree/create.c
  user/sam/wifi/usr.sbin/mtree/mtree.5
  user/sam/wifi/usr.sbin/mtree/mtree.8
  user/sam/wifi/usr.sbin/mtree/spec.c
  user/sam/wifi/usr.sbin/pkg_install/add/pkg_add.1
  user/sam/wifi/usr.sbin/sysinstall/devices.c
  user/sam/wifi/usr.sbin/usbconfig/usbconfig.c
  user/sam/wifi/usr.sbin/wlandebug/wlandebug.c

Modified: user/sam/wifi/Makefile.inc1
==============================================================================
--- user/sam/wifi/Makefile.inc1	Sun Feb  1 22:24:08 2009	(r187991)
+++ user/sam/wifi/Makefile.inc1	Sun Feb  1 23:27:21 2009	(r187992)
@@ -5,6 +5,7 @@
 #	-DNO_CLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir
 #	-DNO_CLEAN do not clean at all
 #	-DNO_SHARE do not go into share subdir
+#	-DKERNFAST define NO_KERNELCONFIG, NO_KERNELCLEAN and NO_KERNELCONFIG
 #	-DNO_KERNELCONFIG do not run config in ${MAKE} buildkernel
 #	-DNO_KERNELCLEAN do not run ${MAKE} clean in ${MAKE} buildkernel
 #	-DNO_KERNELDEPEND do not run ${MAKE} depend in ${MAKE} buildkernel
@@ -697,6 +698,15 @@ distrib-dirs distribution:
 # be set to cross-build, we have to make sure TARGET is set
 # properly.
 
+.if defined(KERNFAST)
+NO_KERNELCLEAN=	t
+NO_KERNELCONFIG=	t
+NO_KERNELDEPEND=	t
+# Shortcut for KERNCONF=Blah -DKERNFAST is now KERNFAST=Blah
+.if !defined(KERNCONF) && ${KERNFAST} != "1"
+KERNCONF=${KERNFAST}
+.endif
+.endif
 .if !defined(KERNCONF) && defined(KERNEL)
 KERNCONF=	${KERNEL}
 KERNWARN=

Modified: user/sam/wifi/ObsoleteFiles.inc
==============================================================================
--- user/sam/wifi/ObsoleteFiles.inc	Sun Feb  1 22:24:08 2009	(r187991)
+++ user/sam/wifi/ObsoleteFiles.inc	Sun Feb  1 23:27:21 2009	(r187992)
@@ -14,6 +14,11 @@
 # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last.
 #
 
+# 20090122: tzdata2009a import
+OLD_FILES+=usr/share/zoneinfo/Asia/Katmandu
+# 20090102: file 4.26 import
+OLD_FILES+=usr/share/misc/magic.mime
+OLD_FILES+=usr/share/misc/magic.mime.mgc
 # 20081223: bind 9.4.3 import, nsupdate.8 moved to nsupdate.1
 OLD_FILES+=usr/share/man/man8/nsupdate.8.gz
 # 20081223: ipprotosw.h removed

Modified: user/sam/wifi/UPDATING
==============================================================================
--- user/sam/wifi/UPDATING	Sun Feb  1 22:24:08 2009	(r187991)
+++ user/sam/wifi/UPDATING	Sun Feb  1 23:27:21 2009	(r187992)
@@ -22,6 +22,24 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8.
 	to maximize performance.  (To disable malloc debugging, run
 	ln -s aj /etc/malloc.conf.)
 
+20090201:
+	INET6 statistics (struct ip6stat) was updated.
+	netstat(1) needs to be recompiled.
+
+20090119:
+	NTFS has been removed from GENERIC kernel on amd64 to match
+	GENERIC on i386. Should not cause any issues since mount_ntfs(8)
+	will load ntfs.ko module automatically when NTFS support is
+	actually needed, unless ntfs.ko is not installed or security
+	level prohibits loading kernel modules. If either is the case,
+	"options NTFS" has to be added into kernel config.
+
+20090115:
+	TCP Appropriate Byte Counting (RFC 3465) support added to kernel.
+	New field in struct tcpcb breaks ABI, so bump __FreeBSD_version to
+	800061. User space tools that rely on the size of struct tcpcb in
+	tcp_var.h (e.g. sockstat) need to be recompiled.
+
 20081225:
 	ng_tty(4) module updated to match the new TTY subsystem.
 	Due to API change, user-level applications must be updated.

Modified: user/sam/wifi/bin/chmod/chmod.1
==============================================================================
--- user/sam/wifi/bin/chmod/chmod.1	Sun Feb  1 22:24:08 2009	(r187991)
+++ user/sam/wifi/bin/chmod/chmod.1	Sun Feb  1 23:27:21 2009	(r187992)
@@ -32,7 +32,7 @@
 .\"	@(#)chmod.1	8.4 (Berkeley) 3/31/94
 .\" $FreeBSD$
 .\"
-.Dd December 22, 2006
+.Dd January 26, 2009
 .Dt CHMOD 1
 .Os
 .Sh NAME
@@ -281,6 +281,10 @@ Operations upon the other permissions on
 ``o'' by itself), in combination with the
 .Ar perm
 symbols ``s'' or ``t'', are ignored.
+.Pp
+The ``w'' permission on directories will permit file creation, relocation,
+and copy into that directory.
+Files created within the directory itself will inherit its group ID.
 .Sh EXAMPLES
 .Bl -tag -width "u=rwx,go=u-w" -compact
 .It Li 644
@@ -343,4 +347,4 @@ command appeared in
 .Sh BUGS
 There is no
 .Ar perm
-option for the naughty bits.
+option for the naughty bits of a horse.

Modified: user/sam/wifi/bin/dd/dd.1
==============================================================================
--- user/sam/wifi/bin/dd/dd.1	Sun Feb  1 22:24:08 2009	(r187991)
+++ user/sam/wifi/bin/dd/dd.1	Sun Feb  1 23:27:21 2009	(r187992)
@@ -32,7 +32,7 @@
 .\"     @(#)dd.1	8.2 (Berkeley) 1/13/94
 .\" $FreeBSD$
 .\"
-.Dd August 15, 2004
+.Dd January 23, 2009
 .Dt DD 1
 .Os
 .Sh NAME
@@ -392,6 +392,11 @@ Remove parity bit from a file:
 Check for (even) parity errors on a file:
 .Pp
 .Dl "dd if=file conv=pareven | cmp -x - file"
+.Pp
+To create an image of a Mode-1 CD-ROM, which is a commonly used format
+for data CD-ROM disks, use a block size of 2048 bytes:
+.Pp
+.Dl "dd if=/dev/acd0 of=filename.iso bs=2048"
 .Sh SEE ALSO
 .Xr cp 1 ,
 .Xr mt 1 ,

Modified: user/sam/wifi/bin/kenv/kenv.1
==============================================================================
--- user/sam/wifi/bin/kenv/kenv.1	Sun Feb  1 22:24:08 2009	(r187991)
+++ user/sam/wifi/bin/kenv/kenv.1	Sun Feb  1 23:27:21 2009	(r187992)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd September 13, 2005
+.Dd January 13, 2009
 .Dt KENV 1
 .Os
 .Sh NAME
@@ -67,8 +67,28 @@ If the
 .Fl q
 option is set, warnings normally printed as a result of being unable to
 perform the requested operation will be suppressed.
+.Pp
+Variables can be added to the kernel environment using the
+.Xr /boot/loader.conf
+file, or also statically compiled into the kernel using the statement
+.Pp
+.Dl Ic env Ar filename
+.Pp
+in the kernel config file.
+The file can contain lines of the form
+.Pp
+.Dl name = "value"  # this is a comment
+.Pp
+where whitespace around name and '=', and
+everything after a '#' character, are ignored.  Almost any printable
+character except '=' is acceptable as part of a name.  Quotes
+are optional and necessary only if the value contains
+whitespace.
+.Pp
 .Sh SEE ALSO
 .Xr kenv 2 ,
+.Xr config 5 ,
+.Xr loader.conf 5 ,
 .Xr loader 8
 .Sh HISTORY
 The

Modified: user/sam/wifi/bin/ln/ln.1
==============================================================================
--- user/sam/wifi/bin/ln/ln.1	Sun Feb  1 22:24:08 2009	(r187991)
+++ user/sam/wifi/bin/ln/ln.1	Sun Feb  1 23:27:21 2009	(r187992)
@@ -38,7 +38,7 @@
 .Sh NAME
 .Nm ln ,
 .Nm link
-.Nd make links
+.Nd link files
 .Sh SYNOPSIS
 .Nm
 .Op Fl s Op Fl F
@@ -57,8 +57,13 @@
 .Sh DESCRIPTION
 The
 .Nm
-utility creates a new directory entry (linked file) which has the
-same modes as the original file.
+utility creates a new directory entry (linked file) for the file name
+specified by
+.Ar target_file .
+The
+.Ar target_file
+will be created with the same file modes as the
+.Ar source_file .
 It is useful for maintaining multiple copies of a file in many places
 at once without using up storage for the
 .Dq copies ;
@@ -148,7 +153,7 @@ links.
 A hard link to a file is indistinguishable from the original directory entry;
 any changes to a file are effectively independent of the name used to reference
 the file.
-Hard links may not normally refer to directories and may not span file systems.
+Directories may not be hardlinked, and hard links may not span file systems.
 .Pp
 A symbolic link contains the name of the file to
 which it is linked.

Modified: user/sam/wifi/bin/pax/file_subs.c
==============================================================================
--- user/sam/wifi/bin/pax/file_subs.c	Sun Feb  1 22:24:08 2009	(r187991)
+++ user/sam/wifi/bin/pax/file_subs.c	Sun Feb  1 23:27:21 2009	(r187992)
@@ -425,19 +425,11 @@ node_creat(ARCHD *arcn)
 	 * we were able to create the node. set uid/gid, modes and times
 	 */
 	if (pids)
-		res = ((arcn->type == PAX_SLK) ?
-		    set_lids(arcn->name, arcn->sb.st_uid, arcn->sb.st_gid) :
-		    set_ids(arcn->name, arcn->sb.st_uid, arcn->sb.st_gid));
+		res = set_ids(arcn->name, arcn->sb.st_uid, arcn->sb.st_gid);
 	else
 		res = 0;
 
 	/*
-	 * symlinks are done now.
-	 */
-	if (arcn->type == PAX_SLK)
-		return(0);
-
-	/*
 	 * IMPORTANT SECURITY NOTE:
 	 * if not preserving mode or we cannot set uid/gid, then PROHIBIT any
 	 * set uid/gid bits
@@ -632,7 +624,7 @@ chk_path( char *name, uid_t st_uid, gid_
  *	used by -t to reset access times).
  *	When ign is zero, only those times the user has asked for are set, the
  *	other ones are left alone. We do not assume the un-documented feature
- *	of many utimes() implementations that consider a 0 time value as a do
+ *	of many lutimes() implementations that consider a 0 time value as a do
  *	not set request.
  */
 
@@ -661,7 +653,7 @@ set_ftime(char *fnm, time_t mtime, time_
 	/*
 	 * set the times
 	 */
-	if (utimes(fnm, tv) < 0)
+	if (lutimes(fnm, tv) < 0)
 		syswarn(1, errno, "Access/modification time set failed on: %s",
 		    fnm);
 	return;
@@ -677,30 +669,6 @@ set_ftime(char *fnm, time_t mtime, time_
 int
 set_ids(char *fnm, uid_t uid, gid_t gid)
 {
-	if (chown(fnm, uid, gid) < 0) {
-		/*
-		 * ignore EPERM unless in verbose mode or being run by root.
-		 * if running as pax, POSIX requires a warning.
-		 */
-		if (strcmp(NM_PAX, argv0) == 0 || errno != EPERM || vflag ||
-		    geteuid() == 0)
-			syswarn(1, errno, "Unable to set file uid/gid of %s",
-			    fnm);
-		return(-1);
-	}
-	return(0);
-}
-
-/*
- * set_lids()
- *	set the uid and gid of a file system node
- * Return:
- *	0 when set, -1 on failure
- */
-
-int
-set_lids(char *fnm, uid_t uid, gid_t gid)
-{
 	if (lchown(fnm, uid, gid) < 0) {
 		/*
 		 * ignore EPERM unless in verbose mode or being run by root.
@@ -724,7 +692,7 @@ void
 set_pmode(char *fnm, mode_t mode)
 {
 	mode &= ABITS;
-	if (chmod(fnm, mode) < 0)
+	if (lchmod(fnm, mode) < 0)
 		syswarn(1, errno, "Could not set permissions on %s", fnm);
 	return;
 }

Modified: user/sam/wifi/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c
==============================================================================
--- user/sam/wifi/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c	Sun Feb  1 22:24:08 2009	(r187991)
+++ user/sam/wifi/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c	Sun Feb  1 23:27:21 2009	(r187992)
@@ -1739,15 +1739,11 @@ dtrace_program_link(dtrace_hdl_t *dtp, d
 		 * Arches which are 32-bit only just use the normal
 		 * library path.
 		 */
-#if defined(__i386__)
-		int use_32 = 1;  /* use /usr/lib/... -sson */
-#else
 		int use_32 = 0;
 #endif
-#endif
 
 		(void) snprintf(drti, sizeof (drti), "/usr/lib%s/dtrace/drti.o",
-		    use_32 ? "":"32");
+		    use_32 ? "32":"");
 
 		len = snprintf(&tmp, 1, fmt, dtp->dt_ld_path, file, tfile,
 		    drti) + 1;

Modified: user/sam/wifi/contrib/bind9/CHANGES
==============================================================================
--- user/sam/wifi/contrib/bind9/CHANGES	Sun Feb  1 22:24:08 2009	(r187991)
+++ user/sam/wifi/contrib/bind9/CHANGES	Sun Feb  1 23:27:21 2009	(r187992)
@@ -1,3 +1,11 @@
+	--- 9.4.3-P1 released ---
+
+2522.	[security]	Handle -1 from DSA_do_verify().
+
+2498.	[bug]		Removed a bogus function argument used with
+			ISC_SOCKET_USE_POLLWATCH: it could cause compiler
+			warning or crash named with the debug 1 level
+			of logging. [RT #18917]
 
 	--- 9.4.3 released ---
 

Modified: user/sam/wifi/contrib/bind9/lib/dns/api
==============================================================================
--- user/sam/wifi/contrib/bind9/lib/dns/api	Sun Feb  1 22:24:08 2009	(r187991)
+++ user/sam/wifi/contrib/bind9/lib/dns/api	Sun Feb  1 23:27:21 2009	(r187992)
@@ -1,3 +1,3 @@
 LIBINTERFACE = 36
-LIBREVISION = 1
+LIBREVISION = 2
 LIBAGE = 0

Modified: user/sam/wifi/contrib/bind9/lib/dns/openssldsa_link.c
==============================================================================
--- user/sam/wifi/contrib/bind9/lib/dns/openssldsa_link.c	Sun Feb  1 22:24:08 2009	(r187991)
+++ user/sam/wifi/contrib/bind9/lib/dns/openssldsa_link.c	Sun Feb  1 23:27:21 2009	(r187992)
@@ -16,7 +16,7 @@
  * IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: openssldsa_link.c,v 1.1.6.9 2007/08/28 07:20:04 tbox Exp $ */
+/* $Id: openssldsa_link.c,v 1.1.6.9.28.1 2008/12/24 00:21:22 marka Exp $ */
 
 #ifdef OPENSSL
 
@@ -133,7 +133,7 @@ openssldsa_verify(dst_context_t *dctx, c
 
 	status = DSA_do_verify(digest, ISC_SHA1_DIGESTLENGTH, dsasig, dsa);
 	DSA_SIG_free(dsasig);
-	if (status == 0)
+	if (status != 1)
 		return (dst__openssl_toresult(DST_R_VERIFYFAILURE));
 
 	return (ISC_R_SUCCESS);

Modified: user/sam/wifi/contrib/bind9/lib/dns/opensslrsa_link.c
==============================================================================
--- user/sam/wifi/contrib/bind9/lib/dns/opensslrsa_link.c	Sun Feb  1 22:24:08 2009	(r187991)
+++ user/sam/wifi/contrib/bind9/lib/dns/opensslrsa_link.c	Sun Feb  1 23:27:21 2009	(r187992)
@@ -17,7 +17,7 @@
 
 /*
  * Principal Author: Brian Wellington
- * $Id: opensslrsa_link.c,v 1.1.6.11 2006/11/07 21:28:49 marka Exp $
+ * $Id: opensslrsa_link.c,v 1.1.6.11.58.1 2008/12/24 00:21:22 marka Exp $
  */
 #ifdef OPENSSL
 
@@ -246,7 +246,7 @@ opensslrsa_verify(dst_context_t *dctx, c
 
 	status = RSA_verify(type, digest, digestlen, sig->base,
 			    RSA_size(rsa), rsa);
-	if (status == 0)
+	if (status != 1)
 		return (dst__openssl_toresult(DST_R_VERIFYFAILURE));
 
 	return (ISC_R_SUCCESS);

Modified: user/sam/wifi/contrib/bind9/lib/isc/unix/socket.c
==============================================================================
--- user/sam/wifi/contrib/bind9/lib/isc/unix/socket.c	Sun Feb  1 22:24:08 2009	(r187991)
+++ user/sam/wifi/contrib/bind9/lib/isc/unix/socket.c	Sun Feb  1 23:27:21 2009	(r187992)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: socket.c,v 1.237.18.56 2008/11/12 03:58:36 marka Exp $ */
+/* $Id: socket.c,v 1.237.18.56.2.1 2008/12/23 00:14:34 marka Exp $ */
 
 /*! \file */
 
@@ -501,7 +501,7 @@ FIX_IPV6_RECVPKTINFO(isc_socket_t *sock)
 
 	if (setsockopt(sock->fd, IPPROTO_IPV6, IPV6_RECVPKTINFO,
 		       (void *)&on, sizeof(on)) < 0) {
-	
+
 		UNEXPECTED_ERROR(__FILE__, __LINE__,
 				 "setsockopt(%d, IPV6_RECVPKTINFO) "
 				 "%s: %s", sock->fd,
@@ -3163,7 +3163,6 @@ watcher(void *uap) {
 						    ISC_LOGCATEGORY_GENERAL,
 						    ISC_LOGMODULE_SOCKET,
 						    ISC_LOG_DEBUG(1),
-						    ISC_LOG_INFO,
 						    "unexpected POLL timeout");
 				}
 				pollstate = poll_active;
@@ -4902,7 +4901,7 @@ isc_socket_ipv6only(isc_socket_t *sock, 
 		if (setsockopt(sock->fd, IPPROTO_IPV6, IPV6_V6ONLY,
 			       (void *)&onoff, sizeof(int)) < 0) {
 			char strbuf[ISC_STRERRORSIZE];
-	
+
 			UNEXPECTED_ERROR(__FILE__, __LINE__,
 					 "setsockopt(%d, IPV6_V6ONLY) "
 					 "%s: %s", sock->fd,

Modified: user/sam/wifi/contrib/bind9/version
==============================================================================
--- user/sam/wifi/contrib/bind9/version	Sun Feb  1 22:24:08 2009	(r187991)
+++ user/sam/wifi/contrib/bind9/version	Sun Feb  1 23:27:21 2009	(r187992)
@@ -1,4 +1,4 @@
-# $Id: version,v 1.29.134.23 2008/11/12 04:17:12 marka Exp $
+# $Id: version,v 1.29.134.23.2.1 2008/12/24 00:21:22 marka Exp $
 #
 # This file must follow /bin/sh rules.  It is imported directly via
 # configure.
@@ -6,5 +6,5 @@
 MAJORVER=9
 MINORVER=4
 PATCHVER=3
-RELEASETYPE=
-RELEASEVER=
+RELEASETYPE=-P
+RELEASEVER=1

Modified: user/sam/wifi/contrib/gdtoa/README
==============================================================================
--- user/sam/wifi/contrib/gdtoa/README	Sun Feb  1 22:24:08 2009	(r187991)
+++ user/sam/wifi/contrib/gdtoa/README	Sun Feb  1 23:27:21 2009	(r187992)
@@ -56,7 +56,9 @@ two letters:
 		whose sum is the desired value
 
 For decimal -> binary conversions, there are three families of
-helper routines: one for round-nearest:
+helper routines: one for round-nearest (or the current rounding
+mode on IEEE-arithmetic systems that provide the C99 fegetround()
+function, if compiled with -DHonor_FLT_ROUNDS):
 
 	strtof
 	strtod
@@ -191,6 +193,9 @@ in the buffer, if the buffer was long en
 conversion are easily done with the help of gdtoa(), such as %e or %f
 style and conversions with direction of rounding specified (so that, if
 desired, the decimal value is either >= or <= the binary value).
+On IEEE-arithmetic systems that provide the C99 fegetround() function,
+if compiled with -DHonor_FLT_ROUNDS, these routines honor the current
+rounding mode.
 
 For an example of more general conversions based on dtoa(), see
 netlib's "printf.c from ampl/solvers".
@@ -342,5 +347,11 @@ standard says it should -- when Honor_FL
 current rounding mode is obtained from fegetround() rather than from
 FLT_ROUNDS, unless Trust_FLT_ROUNDS is also #defined.
 
+Compile with -DUSE_LOCALE to use the current locale; otherwise
+decimal points are assumed to be '.'.  With -DUSE_LOCALE, unless
+you also compile with -DNO_LOCALE_CACHE, the details about the
+current "decimal point" character string are cached and assumed not
+to change during the program's execution.
+
 Please send comments to	David M. Gay (dmg at acm dot org, with " at "
 changed at "@" and " dot " changed to ".").

Modified: user/sam/wifi/contrib/gdtoa/g_Qfmt.c
==============================================================================
--- user/sam/wifi/contrib/gdtoa/g_Qfmt.c	Sun Feb  1 22:24:08 2009	(r187991)
+++ user/sam/wifi/contrib/gdtoa/g_Qfmt.c	Sun Feb  1 23:27:21 2009	(r187992)
@@ -51,15 +51,20 @@ THIS SOFTWARE.
 
  char*
 #ifdef KR_headers
-g_Qfmt(buf, V, ndig, bufsize) char *buf; char *V; int ndig; unsigned bufsize;
+g_Qfmt(buf, V, ndig, bufsize) char *buf; char *V; int ndig; size_t bufsize;
 #else
-g_Qfmt(char *buf, void *V, int ndig, unsigned bufsize)
+g_Qfmt(char *buf, void *V, int ndig, size_t bufsize)
 #endif
 {
-	static FPI fpi = { 113, 1-16383-113+1, 32766 - 16383 - 113 + 1, 1, 0 };
+	static FPI fpi0 = { 113, 1-16383-113+1, 32766 - 16383 - 113 + 1, 1, 0 };
 	char *b, *s, *se;
 	ULong bits[4], *L, sign;
 	int decpt, ex, i, mode;
+#ifdef Honor_FLT_ROUNDS
+#include "gdtoa_fltrnds.h"
+#else
+#define fpi &fpi0
+#endif
 
 	if (ndig < 0)
 		ndig = 0;
@@ -109,6 +114,6 @@ g_Qfmt(char *buf, void *V, int ndig, uns
 			return 0;
 		mode = 0;
 		}
-	s = gdtoa(&fpi, ex, bits, &i, mode, ndig, &decpt, &se);
-	return g__fmt(buf, s, se, decpt, sign);
+	s = gdtoa(fpi, ex, bits, &i, mode, ndig, &decpt, &se);
+	return g__fmt(buf, s, se, decpt, sign, bufsize);
 	}

Modified: user/sam/wifi/contrib/gdtoa/g__fmt.c
==============================================================================
--- user/sam/wifi/contrib/gdtoa/g__fmt.c	Sun Feb  1 22:24:08 2009	(r187991)
+++ user/sam/wifi/contrib/gdtoa/g__fmt.c	Sun Feb  1 23:27:21 2009	(r187992)
@@ -37,24 +37,51 @@ THIS SOFTWARE.
 
  char *
 #ifdef KR_headers
-g__fmt(b, s, se, decpt, sign) char *b; char *s; char *se; int decpt; ULong sign;
+g__fmt(b, s, se, decpt, sign, blen) char *b; char *s; char *se; int decpt; ULong sign; size_t blen;
 #else
-g__fmt(char *b, char *s, char *se, int decpt, ULong sign)
+g__fmt(char *b, char *s, char *se, int decpt, ULong sign, size_t blen)
 #endif
 {
 	int i, j, k;
-	char *s0 = s;
+	char *be, *s0;
+	size_t len;
 #ifdef USE_LOCALE
-	char decimalpoint = *localeconv()->decimal_point;
+#ifdef NO_LOCALE_CACHE
+	char *decimalpoint = localeconv()->decimal_point;
+	size_t dlen = strlen(decimalpoint);
 #else
-#define decimalpoint '.'
+	char *decimalpoint;
+	static char *decimalpoint_cache;
+	static size_t dlen;
+	if (!(s0 = decimalpoint_cache)) {
+		s0 = localeconv()->decimal_point;
+		dlen = strlen(s0);
+		if ((decimalpoint_cache = (char*)malloc(strlen(s0) + 1))) {
+			strcpy(decimalpoint_cache, s0);
+			s0 = decimalpoint_cache;
+			}
+		}
+	decimalpoint = s0;
+#endif
+#else
+#define dlen 0
 #endif
+	s0 = s;
+	len = (se-s) + dlen + 6; /* 6 = sign + e+dd + trailing null */
+	if (blen < len)
+		goto ret0;
+	be = b + blen - 1;
 	if (sign)
 		*b++ = '-';
 	if (decpt <= -4 || decpt > se - s + 5) {
 		*b++ = *s++;
 		if (*s) {
-			*b++ = decimalpoint;
+#ifdef USE_LOCALE
+			while((*b = *decimalpoint++))
+				++b;
+#else
+			*b++ = '.';
+#endif
 			while((*b = *s++) !=0)
 				b++;
 			}
@@ -69,6 +96,8 @@ g__fmt(char *b, char *s, char *se, int d
 		for(j = 2, k = 10; 10*k <= decpt; j++, k *= 10){}
 		for(;;) {
 			i = decpt / k;
+			if (b >= be)
+				goto ret0;
 			*b++ = i + '0';
 			if (--j <= 0)
 				break;
@@ -78,22 +107,41 @@ g__fmt(char *b, char *s, char *se, int d
 		*b = 0;
 		}
 	else if (decpt <= 0) {
-		*b++ = decimalpoint;
+#ifdef USE_LOCALE
+		while((*b = *decimalpoint++))
+			++b;
+#else
+		*b++ = '.';
+#endif
+		if (be < b - decpt + (se - s))
+			goto ret0;
 		for(; decpt < 0; decpt++)
 			*b++ = '0';
-		while((*b = *s++) !=0)
+		while((*b = *s++) != 0)
 			b++;
 		}
 	else {
-		while((*b = *s++) !=0) {
+		while((*b = *s++) != 0) {
 			b++;
-			if (--decpt == 0 && *s)
-				*b++ = decimalpoint;
+			if (--decpt == 0 && *s) {
+#ifdef USE_LOCALE
+				while(*b = *decimalpoint++)
+					++b;
+#else
+				*b++ = '.';
+#endif
+				}
+			}
+		if (b + decpt > be) {
+ ret0:
+			b = 0;
+			goto ret;
 			}
 		for(; decpt > 0; decpt--)
 			*b++ = '0';
 		*b = 0;
 		}
+ ret:
 	freedtoa(s0);
 	return b;
  	}

Modified: user/sam/wifi/contrib/gdtoa/g_ddfmt.c
==============================================================================
--- user/sam/wifi/contrib/gdtoa/g_ddfmt.c	Sun Feb  1 22:24:08 2009	(r187991)
+++ user/sam/wifi/contrib/gdtoa/g_ddfmt.c	Sun Feb  1 23:27:21 2009	(r187992)
@@ -33,9 +33,9 @@ THIS SOFTWARE.
 
  char *
 #ifdef KR_headers
-g_ddfmt(buf, dd, ndig, bufsize) char *buf; double *dd; int ndig; unsigned bufsize;
+g_ddfmt(buf, dd, ndig, bufsize) char *buf; double *dd; int ndig; size_t bufsize;
 #else
-g_ddfmt(char *buf, double *dd, int ndig, unsigned bufsize)
+g_ddfmt(char *buf, double *dd, int ndig, size_t bufsize)
 #endif
 {
 	FPI fpi;
@@ -44,6 +44,21 @@ g_ddfmt(char *buf, double *dd, int ndig,
 	int bx, by, decpt, ex, ey, i, j, mode;
 	Bigint *x, *y, *z;
 	double ddx[2];
+#ifdef Honor_FLT_ROUNDS /*{{*/
+	int Rounding;
+#ifdef Trust_FLT_ROUNDS /*{{ only define this if FLT_ROUNDS really works! */
+	Rounding = Flt_Rounds;
+#else /*}{*/
+	Rounding = 1;
+	switch(fegetround()) {
+	  case FE_TOWARDZERO:	Rounding = 0; break;
+	  case FE_UPWARD:	Rounding = 2; break;
+	  case FE_DOWNWARD:	Rounding = 3;
+	  }
+#endif /*}}*/
+#else /*}{*/
+#define Rounding FPI_Round_near
+#endif /*}}*/
 
 	if (bufsize < 10 || bufsize < ndig + 8)
 		return 0;
@@ -144,11 +159,11 @@ g_ddfmt(char *buf, double *dd, int ndig,
 		}
 	fpi.emin = 1-1023-53+1;
 	fpi.emax = 2046-1023-106+1;
-	fpi.rounding = FPI_Round_near;
+	fpi.rounding = Rounding;
 	fpi.sudden_underflow = 0;
 	i = STRTOG_Normal;
 	s = gdtoa(&fpi, ex, bits, &i, mode, ndig, &decpt, &se);
-	b = g__fmt(buf, s, se, decpt, z->sign);
+	b = g__fmt(buf, s, se, decpt, z->sign, bufsize);
 	Bfree(z);
 	return b;
 	}

Modified: user/sam/wifi/contrib/gdtoa/g_dfmt.c
==============================================================================
--- user/sam/wifi/contrib/gdtoa/g_dfmt.c	Sun Feb  1 22:24:08 2009	(r187991)
+++ user/sam/wifi/contrib/gdtoa/g_dfmt.c	Sun Feb  1 23:27:21 2009	(r187992)
@@ -33,15 +33,20 @@ THIS SOFTWARE.
 
  char*
 #ifdef KR_headers
-g_dfmt(buf, d, ndig, bufsize) char *buf; double *d; int ndig; unsigned bufsize;
+g_dfmt(buf, d, ndig, bufsize) char *buf; double *d; int ndig; size_t bufsize;
 #else
-g_dfmt(char *buf, double *d, int ndig, unsigned bufsize)
+g_dfmt(char *buf, double *d, int ndig, size_t bufsize)
 #endif
 {
-	static FPI fpi = { 53, 1-1023-53+1, 2046-1023-53+1, 1, 0 };
+	static FPI fpi0 = { 53, 1-1023-53+1, 2046-1023-53+1, 1, 0 };
 	char *b, *s, *se;
 	ULong bits[2], *L, sign;
 	int decpt, ex, i, mode;
+#ifdef Honor_FLT_ROUNDS
+#include "gdtoa_fltrnds.h"
+#else
+#define fpi &fpi0
+#endif
 
 	if (ndig < 0)
 		ndig = 0;
@@ -52,6 +57,8 @@ g_dfmt(char *buf, double *d, int ndig, u
 	sign = L[_0] & 0x80000000L;
 	if ((L[_0] & 0x7ff00000) == 0x7ff00000) {
 		/* Infinity or NaN */
+		if (bufsize < 10)
+			return 0;
 		if (L[_0] & 0xfffff || L[_1]) {
 			return strcp(buf, "NaN");
 			}
@@ -78,12 +85,9 @@ g_dfmt(char *buf, double *d, int ndig, u
 		ex = 1;
 	ex -= 0x3ff + 52;
 	mode = 2;
-	if (ndig <= 0) {
-		if (bufsize < 25)
-			return 0;
+	if (ndig <= 0)
 		mode = 0;
-		}
 	i = STRTOG_Normal;
-	s = gdtoa(&fpi, ex, bits, &i, mode, ndig, &decpt, &se);
-	return g__fmt(buf, s, se, decpt, sign);
+	s = gdtoa(fpi, ex, bits, &i, mode, ndig, &decpt, &se);
+	return g__fmt(buf, s, se, decpt, sign, bufsize);
 	}

Modified: user/sam/wifi/contrib/gdtoa/g_ffmt.c
==============================================================================
--- user/sam/wifi/contrib/gdtoa/g_ffmt.c	Sun Feb  1 22:24:08 2009	(r187991)
+++ user/sam/wifi/contrib/gdtoa/g_ffmt.c	Sun Feb  1 23:27:21 2009	(r187992)
@@ -33,15 +33,20 @@ THIS SOFTWARE.
 
  char*
 #ifdef KR_headers
-g_ffmt(buf, f, ndig, bufsize) char *buf; float *f; int ndig; unsigned bufsize;
+g_ffmt(buf, f, ndig, bufsize) char *buf; float *f; int ndig; size_t bufsize;
 #else
-g_ffmt(char *buf, float *f, int ndig, unsigned bufsize)
+g_ffmt(char *buf, float *f, int ndig, size_t bufsize)
 #endif
 {
-	static FPI fpi = { 24, 1-127-24+1,  254-127-24+1, 1, 0 };
+	static FPI fpi0 = { 24, 1-127-24+1,  254-127-24+1, 1, 0 };
 	char *b, *s, *se;
 	ULong bits[1], *L, sign;
 	int decpt, ex, i, mode;
+#ifdef Honor_FLT_ROUNDS
+#include "gdtoa_fltrnds.h"
+#else
+#define fpi &fpi0
+#endif
 
 	if (ndig < 0)
 		ndig = 0;
@@ -83,6 +88,6 @@ g_ffmt(char *buf, float *f, int ndig, un
 		mode = 0;
 		}
 	i = STRTOG_Normal;
-	s = gdtoa(&fpi, ex, bits, &i, mode, ndig, &decpt, &se);
-	return g__fmt(buf, s, se, decpt, sign);
+	s = gdtoa(fpi, ex, bits, &i, mode, ndig, &decpt, &se);
+	return g__fmt(buf, s, se, decpt, sign, bufsize);
 	}

Modified: user/sam/wifi/contrib/gdtoa/g_xLfmt.c
==============================================================================
--- user/sam/wifi/contrib/gdtoa/g_xLfmt.c	Sun Feb  1 22:24:08 2009	(r187991)
+++ user/sam/wifi/contrib/gdtoa/g_xLfmt.c	Sun Feb  1 23:27:21 2009	(r187992)
@@ -49,15 +49,20 @@ THIS SOFTWARE.
 
  char*
 #ifdef KR_headers
-g_xLfmt(buf, V, ndig, bufsize) char *buf; char *V; int ndig; unsigned bufsize;
+g_xLfmt(buf, V, ndig, bufsize) char *buf; char *V; int ndig; size_t bufsize;
 #else
-g_xLfmt(char *buf, void *V, int ndig, unsigned bufsize)
+g_xLfmt(char *buf, void *V, int ndig, size_t bufsize)
 #endif
 {
-	static FPI fpi = { 64, 1-16383-64+1, 32766 - 16383 - 64 + 1, 1, 0 };
+	static FPI fpi0 = { 64, 1-16383-64+1, 32766 - 16383 - 64 + 1, 1, 0 };
 	char *b, *s, *se;
 	ULong bits[2], *L, sign;
 	int decpt, ex, i, mode;
+#ifdef Honor_FLT_ROUNDS
+#include "gdtoa_fltrnds.h"
+#else
+#define fpi &fpi0
+#endif
 
 	if (ndig < 0)
 		ndig = 0;
@@ -103,6 +108,6 @@ g_xLfmt(char *buf, void *V, int ndig, un
 			return 0;
 		mode = 0;
 		}
-	s = gdtoa(&fpi, ex, bits, &i, mode, ndig, &decpt, &se);
-	return g__fmt(buf, s, se, decpt, sign);
+	s = gdtoa(fpi, ex, bits, &i, mode, ndig, &decpt, &se);
+	return g__fmt(buf, s, se, decpt, sign, bufsize);
 	}

Modified: user/sam/wifi/contrib/gdtoa/g_xfmt.c
==============================================================================
--- user/sam/wifi/contrib/gdtoa/g_xfmt.c	Sun Feb  1 22:24:08 2009	(r187991)
+++ user/sam/wifi/contrib/gdtoa/g_xfmt.c	Sun Feb  1 23:27:21 2009	(r187992)
@@ -53,16 +53,21 @@ THIS SOFTWARE.
 
  char*
 #ifdef KR_headers
-g_xfmt(buf, V, ndig, bufsize) char *buf; char *V; int ndig; unsigned bufsize;
+g_xfmt(buf, V, ndig, bufsize) char *buf; char *V; int ndig; size_t bufsize;
 #else
-g_xfmt(char *buf, void *V, int ndig, unsigned bufsize)
+g_xfmt(char *buf, void *V, int ndig, size_t bufsize)
 #endif
 {
-	static FPI fpi = { 64, 1-16383-64+1, 32766 - 16383 - 64 + 1, 1, 0 };
+	static FPI fpi0 = { 64, 1-16383-64+1, 32766 - 16383 - 64 + 1, 1, 0 };
 	char *b, *s, *se;
 	ULong bits[2], sign;
 	UShort *L;
 	int decpt, ex, i, mode;
+#ifdef Honor_FLT_ROUNDS
+#include "gdtoa_fltrnds.h"
+#else
+#define fpi &fpi0
+#endif
 
 	if (ndig < 0)
 		ndig = 0;
@@ -109,6 +114,6 @@ g_xfmt(char *buf, void *V, int ndig, uns
 			return 0;
 		mode = 0;
 		}
-	s = gdtoa(&fpi, ex, bits, &i, mode, ndig, &decpt, &se);
-	return g__fmt(buf, s, se, decpt, sign);
+	s = gdtoa(fpi, ex, bits, &i, mode, ndig, &decpt, &se);
+	return g__fmt(buf, s, se, decpt, sign, bufsize);
 	}

Modified: user/sam/wifi/contrib/gdtoa/gdtoa.c
==============================================================================
--- user/sam/wifi/contrib/gdtoa/gdtoa.c	Sun Feb  1 22:24:08 2009	(r187991)
+++ user/sam/wifi/contrib/gdtoa/gdtoa.c	Sun Feb  1 23:27:21 2009	(r187992)
@@ -417,11 +417,9 @@ gdtoa
 					if (dval(d) > ds + dval(eps))
 						goto bump_up;
 					else if (dval(d) < ds - dval(eps)) {
-						while(*--s == '0'){}
-						s++;
 						if (dval(d))
 							inex = STRTOG_Inexlo;
-						goto ret1;
+						goto clear_trailing0;
 						}
 					break;
 					}
@@ -479,8 +477,12 @@ gdtoa
 							}
 					++*s++;
 					}
-				else
+				else {
 					inex = STRTOG_Inexlo;
+ clear_trailing0:
+					while(*--s == '0'){}
+					++s;
+					}
 				break;
 				}
 			}
@@ -738,7 +740,7 @@ gdtoa
 		if (b->wds > 1 || b->x[0])
 			inex = STRTOG_Inexlo;
 		while(*--s == '0'){}
-		s++;
+		++s;
 		}
  ret:
 	Bfree(S);

Modified: user/sam/wifi/contrib/gdtoa/gdtoa.h
==============================================================================
--- user/sam/wifi/contrib/gdtoa/gdtoa.h	Sun Feb  1 22:24:08 2009	(r187991)
+++ user/sam/wifi/contrib/gdtoa/gdtoa.h	Sun Feb  1 23:27:21 2009	(r187992)
@@ -33,6 +33,7 @@ THIS SOFTWARE.
 #define GDTOA_H_INCLUDED
 
 #include "arith.h"
+#include <stddef.h> /* for size_t */
 
 #ifndef Long
 #define Long long
@@ -111,12 +112,12 @@ extern float  strtof ANSI((CONST char *,
 extern double strtod ANSI((CONST char *, char **));
 extern int strtodg ANSI((CONST char*, char**, FPI*, Long*, ULong*));
 
-extern char*	g_ddfmt  ANSI((char*, double*, int, unsigned));
-extern char*	g_dfmt   ANSI((char*, double*, int, unsigned));
-extern char*	g_ffmt   ANSI((char*, float*,  int, unsigned));
-extern char*	g_Qfmt   ANSI((char*, void*,   int, unsigned));
-extern char*	g_xfmt   ANSI((char*, void*,   int, unsigned));
-extern char*	g_xLfmt  ANSI((char*, void*,   int, unsigned));
+extern char*	g_ddfmt  ANSI((char*, double*, int, size_t));
+extern char*	g_dfmt   ANSI((char*, double*, int, size_t));
+extern char*	g_ffmt   ANSI((char*, float*,  int, size_t));
+extern char*	g_Qfmt   ANSI((char*, void*,   int, size_t));
+extern char*	g_xfmt   ANSI((char*, void*,   int, size_t));
+extern char*	g_xLfmt  ANSI((char*, void*,   int, size_t));
 
 extern int	strtoId  ANSI((CONST char*, char**, double*, double*));
 extern int	strtoIdd ANSI((CONST char*, char**, double*, double*));

Copied: user/sam/wifi/contrib/gdtoa/gdtoa_fltrnds.h (from r187991, head/contrib/gdtoa/gdtoa_fltrnds.h)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/sam/wifi/contrib/gdtoa/gdtoa_fltrnds.h	Sun Feb  1 23:27:21 2009	(r187992, copy of r187991, head/contrib/gdtoa/gdtoa_fltrnds.h)
@@ -0,0 +1,18 @@
+	FPI *fpi, fpi1;
+	int Rounding;
+#ifdef Trust_FLT_ROUNDS /*{{ only define this if FLT_ROUNDS really works! */
+	Rounding = Flt_Rounds;
+#else /*}{*/
+	Rounding = 1;
+	switch(fegetround()) {
+	  case FE_TOWARDZERO:	Rounding = 0; break;
+	  case FE_UPWARD:	Rounding = 2; break;
+	  case FE_DOWNWARD:	Rounding = 3;
+	  }
+#endif /*}}*/
+	fpi = &fpi0;
+	if (Rounding != 1) {
+		fpi1 = fpi0;
+		fpi = &fpi1;
+		fpi1.rounding = Rounding;
+		}

Modified: user/sam/wifi/contrib/gdtoa/gdtoaimp.h
==============================================================================
--- user/sam/wifi/contrib/gdtoa/gdtoaimp.h	Sun Feb  1 22:24:08 2009	(r187991)
+++ user/sam/wifi/contrib/gdtoa/gdtoaimp.h	Sun Feb  1 23:27:21 2009	(r187992)
@@ -128,8 +128,10 @@ THIS SOFTWARE.
  *	conversions of IEEE doubles in single-threaded executions with
  *	8-byte pointers, PRIVATE_MEM >= 7400 appears to suffice; with
  *	4-byte pointers, PRIVATE_MEM >= 7112 appears adequate.
- * #define INFNAN_CHECK on IEEE systems to cause strtod to check for
- *	Infinity and NaN (case insensitively).
+ * #define NO_INFNAN_CHECK if you do not wish to have INFNAN_CHECK
+ *	#defined automatically on IEEE systems.  On such systems,
+ *	when INFNAN_CHECK is #defined, strtod checks
+ *	for Infinity and NaN (case insensitively).
  *	When INFNAN_CHECK is #defined and No_Hex_NaN is not #defined,
  *	strtodg also accepts (case insensitively) strings of the form
  *	NaN(x), where x is a string of hexadecimal digits (optionally
@@ -177,6 +179,9 @@ THIS SOFTWARE.
 
 #include "gdtoa.h"
 #include "gd_qnan.h"
+#ifdef Honor_FLT_ROUNDS
+#include <fenv.h>
+#endif
 
 #ifdef DEBUG
 #include "stdio.h"
@@ -206,6 +211,7 @@ extern Char *MALLOC ANSI((size_t));
 
 #define INFNAN_CHECK
 #define USE_LOCALE
+#define NO_LOCALE_CACHE
 #define Honor_FLT_ROUNDS
 #define Trust_FLT_ROUNDS
 
@@ -608,7 +614,7 @@ extern void memcpy_D2A ANSI((void*, cons
  extern void freedtoa ANSI((char*));
  extern char *gdtoa ANSI((FPI *fpi, int be, ULong *bits, int *kindp,
 			  int mode, int ndigits, int *decpt, char **rve));
- extern char *g__fmt ANSI((char*, char*, char*, int, ULong));
+ extern char *g__fmt ANSI((char*, char*, char*, int, ULong, size_t));
  extern int gethex ANSI((CONST char**, FPI*, Long*, Bigint**, int));
  extern void hexdig_init_D2A(Void);
  extern int hexnan ANSI((CONST char**, FPI*, ULong*));
@@ -626,7 +632,7 @@ extern void memcpy_D2A ANSI((void*, cons
  extern double ratio ANSI((Bigint*, Bigint*));
  extern void rshift ANSI((Bigint*, int));
  extern char *rv_alloc ANSI((int));
- extern Bigint *s2b ANSI((CONST char*, int, int, ULong));
+ extern Bigint *s2b ANSI((CONST char*, int, int, ULong, int));
  extern Bigint *set_ones ANSI((Bigint*, int));
  extern char *strcp ANSI((char*, const char*));
  extern int strtodg ANSI((CONST char*, char**, FPI*, Long*, ULong*));
@@ -668,6 +674,10 @@ extern void memcpy_D2A ANSI((void*, cons
  * (On HP Series 700/800 machines, -DNAN_WORD0=0x7ff40000 works.)
  */
 #ifdef IEEE_Arith
+#ifndef NO_INFNAN_CHECK
+#undef INFNAN_CHECK
+#define INFNAN_CHECK
+#endif
 #ifdef IEEE_MC68k
 #define _0 0
 #define _1 1

Modified: user/sam/wifi/contrib/gdtoa/gethex.c
==============================================================================
--- user/sam/wifi/contrib/gdtoa/gethex.c	Sun Feb  1 22:24:08 2009	(r187991)
+++ user/sam/wifi/contrib/gdtoa/gethex.c	Sun Feb  1 23:27:21 2009	(r187992)
@@ -49,9 +49,21 @@ gethex( CONST char **sp, FPI *fpi, Long 
 	ULong L, lostbits, *x;
 	Long e, e1;
 #ifdef USE_LOCALE
-	unsigned char decimalpoint = *localeconv()->decimal_point;
+	int i;
+#ifdef NO_LOCALE_CACHE
+	const unsigned char *decimalpoint = (unsigned char*)localeconv()->decimal_point;
 #else
-#define decimalpoint '.'
+	const unsigned char *decimalpoint;
+	static unsigned char *decimalpoint_cache;
+	if (!(s0 = decimalpoint_cache)) {
+		s0 = (unsigned char*)localeconv()->decimal_point;
+		if ((decimalpoint_cache = (char*)malloc(strlen(s0) + 1))) {
+			strcpy(decimalpoint_cache, s0);
+			s0 = decimalpoint_cache;
+			}
+		}
+	decimalpoint = s0;
+#endif
 #endif
 
 	if (!hexdig['0'])
@@ -66,11 +78,21 @@ gethex( CONST char **sp, FPI *fpi, Long 
 	decpt = 0;
 	zret = 0;
 	e = 0;
-	if (!hexdig[*s]) {
+	if (hexdig[*s])
+		havedig++;
+	else {
 		zret = 1;
-		if (*s != decimalpoint)
+#ifdef USE_LOCALE
+		for(i = 0; decimalpoint[i]; ++i) {
+			if (s[i] != decimalpoint[i])
+				goto pcheck;
+			}
+		decpt = s += i;
+#else
+		if (*s != '.')
 			goto pcheck;
 		decpt = ++s;
+#endif
 		if (!hexdig[*s])
 			goto pcheck;

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-user@FreeBSD.ORG  Mon Feb  2 03:36:12 2009
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5CF531065672;
	Mon,  2 Feb 2009 03:36:12 +0000 (UTC) (envelope-from imp@bsdimp.com)
Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85])
	by mx1.freebsd.org (Postfix) with ESMTP id 1CEFC8FC12;
	Mon,  2 Feb 2009 03:36:12 +0000 (UTC) (envelope-from imp@bsdimp.com)
Received: from localhost (localhost [127.0.0.1])
	by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id n123ZnDp098330;
	Sun, 1 Feb 2009 20:35:49 -0700 (MST) (envelope-from imp@bsdimp.com)
Date: Sun, 01 Feb 2009 20:36:18 -0700 (MST)
Message-Id: <20090201.203618.1640016624.imp@bsdimp.com>
To: thompsa@FreeBSD.org
From: "M. Warner Losh" <imp@bsdimp.com>
In-Reply-To: <20090201213749.GJ32503@citylink.fud.org.nz>
References: <200902010650.n116obU1045871@svn.freebsd.org>
	<20090201.142808.886478999.imp@bsdimp.com>
	<20090201213749.GJ32503@citylink.fud.org.nz>
X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Cc: src-committers@FreeBSD.org, svn-src-user@FreeBSD.org
Subject: Re: svn commit: r187978 - user/thompsa/usb/sys/dev/usb2/ethernet
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 02 Feb 2009 03:36:12 -0000

In message: <20090201213749.GJ32503@citylink.fud.org.nz>
            Andrew Thompson <thompsa@FreeBSD.org> writes:
: On Sun, Feb 01, 2009 at 02:28:08PM -0700, M. Warner Losh wrote:
: > In message: <200902010650.n116obU1045871@svn.freebsd.org>
: >             Andrew Thompson <thompsa@FreeBSD.org> writes:
: > : +	locked = mtx_owned(&sc->sc_mtx);
: > : +	if (!locked)
: > : +		AUE_LOCK(sc);
: > 
: > You do know this is racy, right?
: 
: Yea... It only get called unlocked during mii probe+attach so its fine.
: I havnt actaully checked if its ok to hold a mutex during
: mii_phy_probe() which would make this go away.

You hold GIANT when probe+attach, which means I think you can't
acquire any other locks...

Warner

From owner-svn-src-user@FreeBSD.ORG  Mon Feb  2 04:55:00 2009
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 928C4106566B;
	Mon,  2 Feb 2009 04:55:00 +0000 (UTC) (envelope-from imp@bsdimp.com)
Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85])
	by mx1.freebsd.org (Postfix) with ESMTP id 500A58FC19;
	Mon,  2 Feb 2009 04:55:00 +0000 (UTC) (envelope-from imp@bsdimp.com)
Received: from localhost (localhost [127.0.0.1])
	by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id n124pmIi098982;
	Sun, 1 Feb 2009 21:51:49 -0700 (MST) (envelope-from imp@bsdimp.com)
Date: Sun, 01 Feb 2009 21:52:18 -0700 (MST)
Message-Id: <20090201.215218.1013608033.imp@bsdimp.com>
To: pyunyh@gmail.com
From: "M. Warner Losh" <imp@bsdimp.com>
In-Reply-To: <20090202044416.GC43513@michelle.cdnetworks.co.kr>
References: <20090201213749.GJ32503@citylink.fud.org.nz>
	<20090201.203618.1640016624.imp@bsdimp.com>
	<20090202044416.GC43513@michelle.cdnetworks.co.kr>
X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Cc: src-committers@FreeBSD.org, thompsa@FreeBSD.org, svn-src-user@FreeBSD.org
Subject: Re: svn commit: r187978 - user/thompsa/usb/sys/dev/usb2/ethernet
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 02 Feb 2009 04:55:00 -0000

In message: <20090202044416.GC43513@michelle.cdnetworks.co.kr>
            Pyun YongHyeon <pyunyh@gmail.com> writes:
: On Sun, Feb 01, 2009 at 08:36:18PM -0700, M. Warner Losh wrote:
: > In message: <20090201213749.GJ32503@citylink.fud.org.nz>
: >             Andrew Thompson <thompsa@FreeBSD.org> writes:
: > : On Sun, Feb 01, 2009 at 02:28:08PM -0700, M. Warner Losh wrote:
: > : > In message: <200902010650.n116obU1045871@svn.freebsd.org>
: > : >             Andrew Thompson <thompsa@FreeBSD.org> writes:
: > : > : +	locked = mtx_owned(&sc->sc_mtx);
: > : > : +	if (!locked)
: > : > : +		AUE_LOCK(sc);
: > : > 
: > : > You do know this is racy, right?
: > : 
: > : Yea... It only get called unlocked during mii probe+attach so its fine.
: > : I havnt actaully checked if its ok to hold a mutex during
: > : mii_phy_probe() which would make this go away.
: > 
: > You hold GIANT when probe+attach, which means I think you can't
: 
: AFAIK this is not true on USB2 and I think this is reason why
: it have to lock/unlock dance in probe/attach.

It is a newbus requirement that all probe/attach routines have to be
called with GIANT held.

Warner

From owner-svn-src-user@FreeBSD.ORG  Mon Feb  2 05:10:51 2009
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 12146106566B
	for <svn-src-user@freebsd.org>; Mon,  2 Feb 2009 05:10:51 +0000 (UTC)
	(envelope-from pyunyh@gmail.com)
Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.227])
	by mx1.freebsd.org (Postfix) with ESMTP id D133E8FC12
	for <svn-src-user@freebsd.org>; Mon,  2 Feb 2009 05:10:50 +0000 (UTC)
	(envelope-from pyunyh@gmail.com)
Received: by rv-out-0506.google.com with SMTP id b25so1409309rvf.43
	for <svn-src-user@freebsd.org>; Sun, 01 Feb 2009 21:10:50 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:received:received:received:from:date:to:cc
	:subject:message-id:reply-to:references:mime-version:content-type
	:content-disposition:in-reply-to:user-agent;
	bh=jXXBwsFsERorRQ9K9j8nGP51qJWKL2TxKtOhfO+XeHQ=;
	b=S+gz/URVa53Qx8aoqVMhFbMY/qQI4BMqz7QpMIf602LzY+oONGMWDJv/CQLzelZseQ
	ODTZFpGvBJnZETx0Lc/eIeMJ/qvJdHkY+FLAaW8WwTq/4Hj52s6ha+0CwgI9kksedb9k
	vHKy9xopAPokQynHAKD7J3kDHVPN9W213jxZw=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=from:date:to:cc:subject:message-id:reply-to:references:mime-version
	:content-type:content-disposition:in-reply-to:user-agent;
	b=hEejE7cnB0LgAOR6RXWMnZW/2RbO2EyCwMPNW4CgIoBIxlaDEZDYOUZLqXZY8FgyNM
	ZZbZt1ap2E4lBIu+1Qg5dSBnJvmSKHsMmlouMEOe6j3sxmvatDKFu5hiPQO1FiUB4S35
	ihhGR9uIq6nnsrG0Deg21bQG7aZEYiCMj4UOU=
Received: by 10.141.114.15 with SMTP id r15mr1730778rvm.179.1233549829633;
	Sun, 01 Feb 2009 20:43:49 -0800 (PST)
Received: from michelle.cdnetworks.co.kr ([114.111.62.249])
	by mx.google.com with ESMTPS id f42sm3846310rvb.5.2009.02.01.20.43.46
	(version=SSLv3 cipher=RC4-MD5); Sun, 01 Feb 2009 20:43:48 -0800 (PST)
Received: by michelle.cdnetworks.co.kr (sSMTP sendmail emulation);
	Mon,  2 Feb 2009 13:44:16 +0900
From: Pyun YongHyeon <pyunyh@gmail.com>
Date: Mon, 2 Feb 2009 13:44:16 +0900
To: "M. Warner Losh" <imp@bsdimp.com>
Message-ID: <20090202044416.GC43513@michelle.cdnetworks.co.kr>
References: <200902010650.n116obU1045871@svn.freebsd.org>
	<20090201.142808.886478999.imp@bsdimp.com>
	<20090201213749.GJ32503@citylink.fud.org.nz>
	<20090201.203618.1640016624.imp@bsdimp.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20090201.203618.1640016624.imp@bsdimp.com>
User-Agent: Mutt/1.4.2.3i
Cc: src-committers@freebsd.org, thompsa@freebsd.org, svn-src-user@freebsd.org
Subject: Re: svn commit: r187978 - user/thompsa/usb/sys/dev/usb2/ethernet
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
Reply-To: pyunyh@gmail.com
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 02 Feb 2009 05:10:51 -0000

On Sun, Feb 01, 2009 at 08:36:18PM -0700, M. Warner Losh wrote:
> In message: <20090201213749.GJ32503@citylink.fud.org.nz>
>             Andrew Thompson <thompsa@FreeBSD.org> writes:
> : On Sun, Feb 01, 2009 at 02:28:08PM -0700, M. Warner Losh wrote:
> : > In message: <200902010650.n116obU1045871@svn.freebsd.org>
> : >             Andrew Thompson <thompsa@FreeBSD.org> writes:
> : > : +	locked = mtx_owned(&sc->sc_mtx);
> : > : +	if (!locked)
> : > : +		AUE_LOCK(sc);
> : > 
> : > You do know this is racy, right?
> : 
> : Yea... It only get called unlocked during mii probe+attach so its fine.
> : I havnt actaully checked if its ok to hold a mutex during
> : mii_phy_probe() which would make this go away.
> 
> You hold GIANT when probe+attach, which means I think you can't

AFAIK this is not true on USB2 and I think this is reason why
it have to lock/unlock dance in probe/attach.

> acquire any other locks...
> 
> Warner

From owner-svn-src-user@FreeBSD.ORG  Mon Feb  2 05:13:54 2009
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 609C5106566B;
	Mon,  2 Feb 2009 05:13:54 +0000 (UTC)
	(envelope-from pyunyh@gmail.com)
Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.233])
	by mx1.freebsd.org (Postfix) with ESMTP id 141A58FC16;
	Mon,  2 Feb 2009 05:13:54 +0000 (UTC)
	(envelope-from pyunyh@gmail.com)
Received: by rv-out-0506.google.com with SMTP id b25so1410318rvf.43
	for <multiple recipients>; Sun, 01 Feb 2009 21:13:53 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:received:received:received:from:date:to:cc
	:subject:message-id:reply-to:references:mime-version:content-type
	:content-disposition:in-reply-to:user-agent;
	bh=kjOWWWMTNwSdK6A7y8iPw9FaeI8p2U47aC2/EVmUfb8=;
	b=D2lqTsZpZVmCR/R4uhlhK0PNzjLzJSqXlZB+iFdV732rRGM97jYlAW09OXS5Z2NKPo
	gYPAC73ysb2Ea/hcJl1gE2Xs72UpmNGsKd+40pKY+py4/E75uVvCEq5XFpzsvPLnRRpe
	nJwNqmg8mSY+udxEF3gYPqfFnq5YscZPDkklo=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=from:date:to:cc:subject:message-id:reply-to:references:mime-version
	:content-type:content-disposition:in-reply-to:user-agent;
	b=xb0CICS8AXhlpWiT+RHBJk5R2rQ63Pdd+/w+405Xhnvy3c+ewOKdTfS7Rq6RorPGDy
	S3SO27FQd7vcvJRcmqm/CKIjXmW7pxk/54/EvikwargNHVJW6BOOQR3G6UINNdNpUZSH
	CLcpwwjuTMFNUcU4NU52hS0tZPmdyNTxg+cq8=
Received: by 10.141.99.2 with SMTP id b2mr2110589rvm.46.1233551633835;
	Sun, 01 Feb 2009 21:13:53 -0800 (PST)
Received: from michelle.cdnetworks.co.kr ([114.111.62.249])
	by mx.google.com with ESMTPS id g14sm2349501rvb.1.2009.02.01.21.13.51
	(version=SSLv3 cipher=RC4-MD5); Sun, 01 Feb 2009 21:13:53 -0800 (PST)
Received: by michelle.cdnetworks.co.kr (sSMTP sendmail emulation);
	Mon,  2 Feb 2009 14:14:21 +0900
From: Pyun YongHyeon <pyunyh@gmail.com>
Date: Mon, 2 Feb 2009 14:14:21 +0900
To: "M. Warner Losh" <imp@bsdimp.com>
Message-ID: <20090202051421.GE43513@michelle.cdnetworks.co.kr>
References: <20090201213749.GJ32503@citylink.fud.org.nz>
	<20090201.203618.1640016624.imp@bsdimp.com>
	<20090202044416.GC43513@michelle.cdnetworks.co.kr>
	<20090201.215218.1013608033.imp@bsdimp.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20090201.215218.1013608033.imp@bsdimp.com>
User-Agent: Mutt/1.4.2.3i
Cc: src-committers@freebsd.org, thompsa@freebsd.org, svn-src-user@freebsd.org
Subject: Re: svn commit: r187978 - user/thompsa/usb/sys/dev/usb2/ethernet
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
Reply-To: pyunyh@gmail.com
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 02 Feb 2009 05:13:54 -0000

On Sun, Feb 01, 2009 at 09:52:18PM -0700, M. Warner Losh wrote:
> In message: <20090202044416.GC43513@michelle.cdnetworks.co.kr>
>             Pyun YongHyeon <pyunyh@gmail.com> writes:
> : On Sun, Feb 01, 2009 at 08:36:18PM -0700, M. Warner Losh wrote:
> : > In message: <20090201213749.GJ32503@citylink.fud.org.nz>
> : >             Andrew Thompson <thompsa@FreeBSD.org> writes:
> : > : On Sun, Feb 01, 2009 at 02:28:08PM -0700, M. Warner Losh wrote:
> : > : > In message: <200902010650.n116obU1045871@svn.freebsd.org>
> : > : >             Andrew Thompson <thompsa@FreeBSD.org> writes:
> : > : > : +	locked = mtx_owned(&sc->sc_mtx);
> : > : > : +	if (!locked)
> : > : > : +		AUE_LOCK(sc);
> : > : > 
> : > : > You do know this is racy, right?
> : > : 
> : > : Yea... It only get called unlocked during mii probe+attach so its fine.
> : > : I havnt actaully checked if its ok to hold a mutex during
> : > : mii_phy_probe() which would make this go away.
> : > 
> : > You hold GIANT when probe+attach, which means I think you can't
> : 
> : AFAIK this is not true on USB2 and I think this is reason why
> : it have to lock/unlock dance in probe/attach.
> 
> It is a newbus requirement that all probe/attach routines have to be
> called with GIANT held.
> 

If this can be done on USB2 it would greatly simplify MII attach
part as well as locks used in MII access routines in all USB2
ethernet drivers. I vaguely remember I asked for this to HPS, but
he seem to forget about it.

From owner-svn-src-user@FreeBSD.ORG  Mon Feb  2 05:24:37 2009
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4D201106566B;
	Mon,  2 Feb 2009 05:24:37 +0000 (UTC) (envelope-from imp@bsdimp.com)
Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85])
	by mx1.freebsd.org (Postfix) with ESMTP id CB6018FC18;
	Mon,  2 Feb 2009 05:24:36 +0000 (UTC) (envelope-from imp@bsdimp.com)
Received: from localhost (localhost [127.0.0.1])
	by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id n125Kukh099444;
	Sun, 1 Feb 2009 22:20:56 -0700 (MST) (envelope-from imp@bsdimp.com)
Date: Sun, 01 Feb 2009 22:21:19 -0700 (MST)
Message-Id: <20090201.222119.-1303462184.imp@bsdimp.com>
To: pyunyh@gmail.com
From: "M. Warner Losh" <imp@bsdimp.com>
In-Reply-To: <20090202051421.GE43513@michelle.cdnetworks.co.kr>
References: <20090202044416.GC43513@michelle.cdnetworks.co.kr>
	<20090201.215218.1013608033.imp@bsdimp.com>
	<20090202051421.GE43513@michelle.cdnetworks.co.kr>
X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Cc: src-committers@freebsd.org, thompsa@freebsd.org, svn-src-user@freebsd.org
Subject: Re: svn commit: r187978 - user/thompsa/usb/sys/dev/usb2/ethernet
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 02 Feb 2009 05:24:37 -0000

In message: <20090202051421.GE43513@michelle.cdnetworks.co.kr>
            Pyun YongHyeon <pyunyh@gmail.com> writes:
: On Sun, Feb 01, 2009 at 09:52:18PM -0700, M. Warner Losh wrote:
: > In message: <20090202044416.GC43513@michelle.cdnetworks.co.kr>
: >             Pyun YongHyeon <pyunyh@gmail.com> writes:
: > : On Sun, Feb 01, 2009 at 08:36:18PM -0700, M. Warner Losh wrote:
: > : > In message: <20090201213749.GJ32503@citylink.fud.org.nz>
: > : >             Andrew Thompson <thompsa@FreeBSD.org> writes:
: > : > : On Sun, Feb 01, 2009 at 02:28:08PM -0700, M. Warner Losh wrote:
: > : > : > In message: <200902010650.n116obU1045871@svn.freebsd.org>
: > : > : >             Andrew Thompson <thompsa@FreeBSD.org> writes:
: > : > : > : +	locked = mtx_owned(&sc->sc_mtx);
: > : > : > : +	if (!locked)
: > : > : > : +		AUE_LOCK(sc);
: > : > : > 
: > : > : > You do know this is racy, right?
: > : > : 
: > : > : Yea... It only get called unlocked during mii probe+attach so its fine.
: > : > : I havnt actaully checked if its ok to hold a mutex during
: > : > : mii_phy_probe() which would make this go away.
: > : > 
: > : > You hold GIANT when probe+attach, which means I think you can't
: > : 
: > : AFAIK this is not true on USB2 and I think this is reason why
: > : it have to lock/unlock dance in probe/attach.
: > 
: > It is a newbus requirement that all probe/attach routines have to be
: > called with GIANT held.
: > 
: 
: If this can be done on USB2 it would greatly simplify MII attach
: part as well as locks used in MII access routines in all USB2
: ethernet drivers. I vaguely remember I asked for this to HPS, but
: he seem to forget about it.

I'll take a look into the matter in more detail.  It is an absolute
requirement of newbus at the moment that any call to
device_probe_and_attach(), including bus_generic_attach().

Warner


From owner-svn-src-user@FreeBSD.ORG  Mon Feb  2 14:56:23 2009
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id CFB6E106564A;
	Mon,  2 Feb 2009 14:56:23 +0000 (UTC) (envelope-from jhb@freebsd.org)
Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42])
	by mx1.freebsd.org (Postfix) with ESMTP id 9E30E8FC2D;
	Mon,  2 Feb 2009 14:56:23 +0000 (UTC) (envelope-from jhb@freebsd.org)
Received: from server.baldwin.cx (pool-98-109-39-197.nwrknj.fios.verizon.net
	[98.109.39.197])
	by cyrus.watson.org (Postfix) with ESMTPSA id 412E546B03;
	Mon,  2 Feb 2009 09:56:23 -0500 (EST)
Received: from localhost (john@localhost [127.0.0.1]) (authenticated bits=0)
	by server.baldwin.cx (8.14.3/8.14.3) with ESMTP id n12EuHRr040398;
	Mon, 2 Feb 2009 09:56:17 -0500 (EST) (envelope-from jhb@freebsd.org)
From: John Baldwin <jhb@freebsd.org>
To: "M. Warner Losh" <imp@bsdimp.com>
Date: Mon, 2 Feb 2009 08:36:28 -0500
User-Agent: KMail/1.9.7
References: <200902010650.n116obU1045871@svn.freebsd.org>
	<20090201213749.GJ32503@citylink.fud.org.nz>
	<20090201.203618.1640016624.imp@bsdimp.com>
In-Reply-To: <20090201.203618.1640016624.imp@bsdimp.com>
MIME-Version: 1.0
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-Id: <200902020836.28882.jhb@freebsd.org>
X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by
	milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]);
	Mon, 02 Feb 2009 09:56:17 -0500 (EST)
X-Virus-Scanned: ClamAV 0.94.2/8940/Mon Feb 2 07:31:54 2009 on
	server.baldwin.cx
X-Virus-Status: Clean
X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 
	autolearn=ham version=3.1.3
X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx
Cc: src-committers@freebsd.org, thompsa@freebsd.org, svn-src-user@freebsd.org
Subject: Re: svn commit: r187978 - user/thompsa/usb/sys/dev/usb2/ethernet
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 02 Feb 2009 14:56:24 -0000

On Sunday 01 February 2009 10:36:18 pm M. Warner Losh wrote:
> In message: <20090201213749.GJ32503@citylink.fud.org.nz>
>             Andrew Thompson <thompsa@FreeBSD.org> writes:
> : On Sun, Feb 01, 2009 at 02:28:08PM -0700, M. Warner Losh wrote:
> : > In message: <200902010650.n116obU1045871@svn.freebsd.org>
> : >             Andrew Thompson <thompsa@FreeBSD.org> writes:
> : > : +	locked = mtx_owned(&sc->sc_mtx);
> : > : +	if (!locked)
> : > : +		AUE_LOCK(sc);
> : > 
> : > You do know this is racy, right?

Err, no it's not.  Individual threads are always "single-threaded", so whether 
or not a given thread holds a lock is actually deterministic.  This is 
perfectly fine, and is actually how recursive locks work.

> : Yea... It only get called unlocked during mii probe+attach so its fine.
> : I havnt actaully checked if its ok to hold a mutex during
> : mii_phy_probe() which would make this go away.
> 
> You hold GIANT when probe+attach, which means I think you can't
> acquire any other locks...

That's completely backwards.  :)  You can definitely acquire other locks while 
holding Giant.  What you can't do is acquire Giant while holding another 
mutex.

-- 
John Baldwin

From owner-svn-src-user@FreeBSD.ORG  Mon Feb  2 22:13:35 2009
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1B6331065672;
	Mon,  2 Feb 2009 22:13:35 +0000 (UTC)
	(envelope-from piso@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 051288FC1E;
	Mon,  2 Feb 2009 22:13:35 +0000 (UTC)
	(envelope-from piso@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n12MDZDk009048;
	Mon, 2 Feb 2009 22:13:35 GMT (envelope-from piso@svn.freebsd.org)
Received: (from piso@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n12MDXEU009023;
	Mon, 2 Feb 2009 22:13:33 GMT (envelope-from piso@svn.freebsd.org)
Message-Id: <200902022213.n12MDXEU009023@svn.freebsd.org>
From: Paolo Pisati <piso@FreeBSD.org>
Date: Mon, 2 Feb 2009 22:13:33 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r188034 - in user/piso: . bin/chmod bin/dd bin/kenv
	bin/ln bin/test cddl/contrib/opensolaris/cmd/zinject
	cddl/contrib/opensolaris/lib/libdtrace/common contrib/bind9
	contrib/bind9/lib/dn...
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 02 Feb 2009 22:13:35 -0000

Author: piso
Date: Mon Feb  2 22:13:32 2009
New Revision: 188034
URL: http://svn.freebsd.org/changeset/base/188034

Log:
  Update of my local branch.

Added:
  user/piso/contrib/csup/lex.rcs.c
     - copied unchanged from r187686, head/contrib/csup/lex.rcs.c
  user/piso/contrib/csup/rcsfile.c
     - copied unchanged from r187686, head/contrib/csup/rcsfile.c
  user/piso/contrib/csup/rcsfile.h
     - copied unchanged from r187686, head/contrib/csup/rcsfile.h
  user/piso/contrib/csup/rcsparse.c
     - copied unchanged from r187686, head/contrib/csup/rcsparse.c
  user/piso/contrib/csup/rcsparse.h
     - copied unchanged from r187686, head/contrib/csup/rcsparse.h
  user/piso/contrib/csup/rcstokenizer.h
     - copied unchanged from r187686, head/contrib/csup/rcstokenizer.h
  user/piso/contrib/csup/rcstokenizer.l
     - copied unchanged from r187686, head/contrib/csup/rcstokenizer.l
  user/piso/contrib/csup/rsyncfile.c
     - copied unchanged from r187686, head/contrib/csup/rsyncfile.c
  user/piso/contrib/csup/rsyncfile.h
     - copied unchanged from r187686, head/contrib/csup/rsyncfile.h
  user/piso/contrib/file/AUTHORS
     - copied unchanged from r187686, head/contrib/file/AUTHORS
  user/piso/contrib/file/COPYING
     - copied unchanged from r187686, head/contrib/file/COPYING
  user/piso/contrib/file/INSTALL
     - copied unchanged from r187686, head/contrib/file/INSTALL
  user/piso/contrib/file/Magdir/clarion
     - copied unchanged from r187686, head/contrib/file/Magdir/clarion
  user/piso/contrib/file/Magdir/erlang
     - copied unchanged from r187686, head/contrib/file/Magdir/erlang
  user/piso/contrib/file/Magdir/gnome-keyring
     - copied unchanged from r187686, head/contrib/file/Magdir/gnome-keyring
  user/piso/contrib/file/Magdir/gnumeric
     - copied unchanged from r187686, head/contrib/file/Magdir/gnumeric
  user/piso/contrib/file/Magdir/graphviz
     - copied unchanged from r187686, head/contrib/file/Magdir/graphviz
  user/piso/contrib/file/Magdir/inform
     - copied unchanged from r187686, head/contrib/file/Magdir/inform
  user/piso/contrib/file/Magdir/kde
     - copied unchanged from r187686, head/contrib/file/Magdir/kde
  user/piso/contrib/file/Magdir/llvm
     - copied unchanged from r187686, head/contrib/file/Magdir/llvm
  user/piso/contrib/file/Magdir/lua
     - copied unchanged from r187686, head/contrib/file/Magdir/lua
  user/piso/contrib/file/Magdir/luks
     - copied unchanged from r187686, head/contrib/file/Magdir/luks
  user/piso/contrib/file/Magdir/mathcad
     - copied unchanged from r187686, head/contrib/file/Magdir/mathcad
  user/piso/contrib/file/Magdir/mercurial
     - copied unchanged from r187686, head/contrib/file/Magdir/mercurial
  user/piso/contrib/file/Magdir/mozilla
     - copied unchanged from r187686, head/contrib/file/Magdir/mozilla
  user/piso/contrib/file/Magdir/netware
     - copied unchanged from r187686, head/contrib/file/Magdir/netware
  user/piso/contrib/file/Magdir/ole2compounddocs
     - copied unchanged from r187686, head/contrib/file/Magdir/ole2compounddocs
  user/piso/contrib/file/Magdir/ruby
     - copied unchanged from r187686, head/contrib/file/Magdir/ruby
  user/piso/contrib/file/Magdir/securitycerts
     - copied unchanged from r187686, head/contrib/file/Magdir/securitycerts
  user/piso/contrib/file/Magdir/warc
     - copied unchanged from r187686, head/contrib/file/Magdir/warc
  user/piso/contrib/file/Magdir/weak
     - copied unchanged from r187686, head/contrib/file/Magdir/weak
  user/piso/contrib/file/Magdir/windows
     - copied unchanged from r187686, head/contrib/file/Magdir/windows
  user/piso/contrib/file/Magdir/xilinx
     - copied unchanged from r187686, head/contrib/file/Magdir/xilinx
  user/piso/contrib/file/NEWS
     - copied unchanged from r187686, head/contrib/file/NEWS
  user/piso/contrib/file/TODO
     - copied unchanged from r187686, head/contrib/file/TODO
  user/piso/contrib/file/asprintf.c
     - copied unchanged from r187686, head/contrib/file/asprintf.c
  user/piso/contrib/file/compile
     - copied unchanged from r187686, head/contrib/file/compile
  user/piso/contrib/file/config.guess
     - copied unchanged from r187686, head/contrib/file/config.guess
  user/piso/contrib/file/config.sub
     - copied unchanged from r187686, head/contrib/file/config.sub
  user/piso/contrib/file/configure.ac
     - copied unchanged from r187686, head/contrib/file/configure.ac
  user/piso/contrib/file/elfclass.h
     - copied unchanged from r187686, head/contrib/file/elfclass.h
  user/piso/contrib/file/getopt_long.c
     - copied unchanged from r187686, head/contrib/file/getopt_long.c
  user/piso/contrib/file/mygetopt.h
     - copied unchanged from r187686, head/contrib/file/mygetopt.h
  user/piso/contrib/file/tests/
     - copied from r187686, head/contrib/file/tests/
  user/piso/contrib/file/vasprintf.c
     - copied unchanged from r187686, head/contrib/file/vasprintf.c
  user/piso/contrib/openbsm/bin/auditd/auditd_darwin.c
     - copied unchanged from r187686, head/contrib/openbsm/bin/auditd/auditd_darwin.c
  user/piso/contrib/openbsm/bin/auditd/auditd_fbsd.c
     - copied unchanged from r187686, head/contrib/openbsm/bin/auditd/auditd_fbsd.c
  user/piso/contrib/openbsm/bsm/auditd_lib.h
     - copied unchanged from r187686, head/contrib/openbsm/bsm/auditd_lib.h
  user/piso/contrib/openbsm/libauditd/
     - copied from r187686, head/contrib/openbsm/libauditd/
  user/piso/contrib/openbsm/libbsm/au_domain.3
     - copied unchanged from r187686, head/contrib/openbsm/libbsm/au_domain.3
  user/piso/contrib/openbsm/libbsm/au_errno.3
     - copied unchanged from r187686, head/contrib/openbsm/libbsm/au_errno.3
  user/piso/contrib/openbsm/libbsm/au_socket_type.3
     - copied unchanged from r187686, head/contrib/openbsm/libbsm/au_socket_type.3
  user/piso/contrib/openbsm/libbsm/bsm_domain.c
     - copied unchanged from r187686, head/contrib/openbsm/libbsm/bsm_domain.c
  user/piso/contrib/openbsm/libbsm/bsm_errno.c
     - copied unchanged from r187686, head/contrib/openbsm/libbsm/bsm_errno.c
  user/piso/contrib/openbsm/libbsm/bsm_socket_type.c
     - copied unchanged from r187686, head/contrib/openbsm/libbsm/bsm_socket_type.c
  user/piso/contrib/openbsm/sys/bsm/audit_domain.h
     - copied unchanged from r187686, head/contrib/openbsm/sys/bsm/audit_domain.h
  user/piso/contrib/openbsm/sys/bsm/audit_errno.h
     - copied unchanged from r187686, head/contrib/openbsm/sys/bsm/audit_errno.h
  user/piso/contrib/openbsm/sys/bsm/audit_socket_type.h
     - copied unchanged from r187686, head/contrib/openbsm/sys/bsm/audit_socket_type.h
  user/piso/contrib/openbsm/test/reference/E2BIG_record
     - copied unchanged from r187686, head/contrib/openbsm/test/reference/E2BIG_record
  user/piso/contrib/openbsm/test/reference/EACCES_record
     - copied unchanged from r187686, head/contrib/openbsm/test/reference/EACCES_record
  user/piso/contrib/openbsm/test/reference/EBADF_record
     - copied unchanged from r187686, head/contrib/openbsm/test/reference/EBADF_record
  user/piso/contrib/openbsm/test/reference/EBUSY_record
     - copied unchanged from r187686, head/contrib/openbsm/test/reference/EBUSY_record
  user/piso/contrib/openbsm/test/reference/ECHILD_record
     - copied unchanged from r187686, head/contrib/openbsm/test/reference/ECHILD_record
  user/piso/contrib/openbsm/test/reference/EDEADLK_record
     - copied unchanged from r187686, head/contrib/openbsm/test/reference/EDEADLK_record
  user/piso/contrib/openbsm/test/reference/EEXIST_record
     - copied unchanged from r187686, head/contrib/openbsm/test/reference/EEXIST_record
  user/piso/contrib/openbsm/test/reference/EFAULT_record
     - copied unchanged from r187686, head/contrib/openbsm/test/reference/EFAULT_record
  user/piso/contrib/openbsm/test/reference/EFBIG_record
     - copied unchanged from r187686, head/contrib/openbsm/test/reference/EFBIG_record
  user/piso/contrib/openbsm/test/reference/EINTR_record
     - copied unchanged from r187686, head/contrib/openbsm/test/reference/EINTR_record
  user/piso/contrib/openbsm/test/reference/EINVAL_record
     - copied unchanged from r187686, head/contrib/openbsm/test/reference/EINVAL_record
  user/piso/contrib/openbsm/test/reference/EIO_record
     - copied unchanged from r187686, head/contrib/openbsm/test/reference/EIO_record
  user/piso/contrib/openbsm/test/reference/EISDIR_record
     - copied unchanged from r187686, head/contrib/openbsm/test/reference/EISDIR_record
  user/piso/contrib/openbsm/test/reference/EMFILE_record
     - copied unchanged from r187686, head/contrib/openbsm/test/reference/EMFILE_record
  user/piso/contrib/openbsm/test/reference/EMLINK_record
     - copied unchanged from r187686, head/contrib/openbsm/test/reference/EMLINK_record
  user/piso/contrib/openbsm/test/reference/ENFILE_record
     - copied unchanged from r187686, head/contrib/openbsm/test/reference/ENFILE_record
  user/piso/contrib/openbsm/test/reference/ENODEV_record
     - copied unchanged from r187686, head/contrib/openbsm/test/reference/ENODEV_record
  user/piso/contrib/openbsm/test/reference/ENOENT_record
     - copied unchanged from r187686, head/contrib/openbsm/test/reference/ENOENT_record
  user/piso/contrib/openbsm/test/reference/ENOEXEC_record
     - copied unchanged from r187686, head/contrib/openbsm/test/reference/ENOEXEC_record
  user/piso/contrib/openbsm/test/reference/ENOMEM_record
     - copied unchanged from r187686, head/contrib/openbsm/test/reference/ENOMEM_record
  user/piso/contrib/openbsm/test/reference/ENOSPC_record
     - copied unchanged from r187686, head/contrib/openbsm/test/reference/ENOSPC_record
  user/piso/contrib/openbsm/test/reference/ENOTBLK_record
     - copied unchanged from r187686, head/contrib/openbsm/test/reference/ENOTBLK_record
  user/piso/contrib/openbsm/test/reference/ENOTDIR_record
     - copied unchanged from r187686, head/contrib/openbsm/test/reference/ENOTDIR_record
  user/piso/contrib/openbsm/test/reference/ENOTTY_record
     - copied unchanged from r187686, head/contrib/openbsm/test/reference/ENOTTY_record
  user/piso/contrib/openbsm/test/reference/ENXIO_record
     - copied unchanged from r187686, head/contrib/openbsm/test/reference/ENXIO_record
  user/piso/contrib/openbsm/test/reference/EPERM_record
     - copied unchanged from r187686, head/contrib/openbsm/test/reference/EPERM_record
  user/piso/contrib/openbsm/test/reference/EPIPE_record
     - copied unchanged from r187686, head/contrib/openbsm/test/reference/EPIPE_record
  user/piso/contrib/openbsm/test/reference/EROFS_record
     - copied unchanged from r187686, head/contrib/openbsm/test/reference/EROFS_record
  user/piso/contrib/openbsm/test/reference/ESPIPE_record
     - copied unchanged from r187686, head/contrib/openbsm/test/reference/ESPIPE_record
  user/piso/contrib/openbsm/test/reference/ESRCH_record
     - copied unchanged from r187686, head/contrib/openbsm/test/reference/ESRCH_record
  user/piso/contrib/openbsm/test/reference/ETXTBSY_record
     - copied unchanged from r187686, head/contrib/openbsm/test/reference/ETXTBSY_record
  user/piso/contrib/openbsm/test/reference/EXDEV_record
     - copied unchanged from r187686, head/contrib/openbsm/test/reference/EXDEV_record
  user/piso/contrib/openbsm/test/reference/socketex_record
     - copied unchanged from r187686, head/contrib/openbsm/test/reference/socketex_record
  user/piso/contrib/openbsm/test/reference/socketex_token
     - copied unchanged from r187686, head/contrib/openbsm/test/reference/socketex_token
  user/piso/lib/libarchive/test/test_write_disk_failures.c
     - copied unchanged from r187686, head/lib/libarchive/test/test_write_disk_failures.c
  user/piso/lib/libauditd/
     - copied from r187686, head/lib/libauditd/
  user/piso/lib/libc/stdio/printfcommon.h
     - copied unchanged from r187686, head/lib/libc/stdio/printfcommon.h
  user/piso/lib/libelf/README
     - copied unchanged from r187686, head/lib/libelf/README
  user/piso/share/man/man4/urtw.4
     - copied unchanged from r187686, head/share/man/man4/urtw.4
  user/piso/sys/amd64/conf/USB2
     - copied unchanged from r187686, head/sys/amd64/conf/USB2
  user/piso/sys/arm/arm/cpufunc_asm_sheeva.S
     - copied unchanged from r187686, head/sys/arm/arm/cpufunc_asm_sheeva.S
  user/piso/sys/bsm/audit_domain.h
     - copied unchanged from r187686, head/sys/bsm/audit_domain.h
  user/piso/sys/bsm/audit_errno.h
     - copied unchanged from r187686, head/sys/bsm/audit_errno.h
  user/piso/sys/bsm/audit_socket_type.h
     - copied unchanged from r187686, head/sys/bsm/audit_socket_type.h
  user/piso/sys/dev/ofw/ofw_iicbus.c
     - copied unchanged from r187686, head/sys/dev/ofw/ofw_iicbus.c
  user/piso/sys/dev/syscons/scterm-teken.c
     - copied unchanged from r187686, head/sys/dev/syscons/scterm-teken.c
  user/piso/sys/dev/syscons/teken/
     - copied from r187686, head/sys/dev/syscons/teken/
  user/piso/sys/dev/usb/if_urtw.c
     - copied unchanged from r187686, head/sys/dev/usb/if_urtw.c
  user/piso/sys/dev/usb/if_urtwreg.h
     - copied unchanged from r187686, head/sys/dev/usb/if_urtwreg.h
  user/piso/sys/dev/usb/if_urtwvar.h
     - copied unchanged from r187686, head/sys/dev/usb/if_urtwvar.h
  user/piso/sys/dev/usb2/controller/atmegadci.c
     - copied unchanged from r187686, head/sys/dev/usb2/controller/atmegadci.c
  user/piso/sys/dev/usb2/controller/atmegadci.h
     - copied unchanged from r187686, head/sys/dev/usb2/controller/atmegadci.h
  user/piso/sys/dev/usb2/controller/atmegadci_atmelarm.c
     - copied unchanged from r187686, head/sys/dev/usb2/controller/atmegadci_atmelarm.c
  user/piso/sys/dev/usb2/ethernet/if_auereg.h
     - copied unchanged from r187686, head/sys/dev/usb2/ethernet/if_auereg.h
  user/piso/sys/dev/usb2/ethernet/if_axereg.h
     - copied unchanged from r187686, head/sys/dev/usb2/ethernet/if_axereg.h
  user/piso/sys/dev/usb2/ethernet/if_cdcereg.h
     - copied unchanged from r187686, head/sys/dev/usb2/ethernet/if_cdcereg.h
  user/piso/sys/dev/usb2/ethernet/if_cuereg.h
     - copied unchanged from r187686, head/sys/dev/usb2/ethernet/if_cuereg.h
  user/piso/sys/dev/usb2/ethernet/if_kuefw.h
     - copied unchanged from r187686, head/sys/dev/usb2/ethernet/if_kuefw.h
  user/piso/sys/dev/usb2/ethernet/if_kuereg.h
     - copied unchanged from r187686, head/sys/dev/usb2/ethernet/if_kuereg.h
  user/piso/sys/dev/usb2/ethernet/if_ruereg.h
     - copied unchanged from r187686, head/sys/dev/usb2/ethernet/if_ruereg.h
  user/piso/sys/dev/usb2/ethernet/if_udavreg.h
     - copied unchanged from r187686, head/sys/dev/usb2/ethernet/if_udavreg.h
  user/piso/sys/dev/usb2/wlan/if_rumfw.h
     - copied unchanged from r187686, head/sys/dev/usb2/wlan/if_rumfw.h
  user/piso/sys/dev/usb2/wlan/if_rumreg.h
     - copied unchanged from r187686, head/sys/dev/usb2/wlan/if_rumreg.h
  user/piso/sys/dev/usb2/wlan/if_rumvar.h
     - copied unchanged from r187686, head/sys/dev/usb2/wlan/if_rumvar.h
  user/piso/sys/dev/usb2/wlan/if_uralreg.h
     - copied unchanged from r187686, head/sys/dev/usb2/wlan/if_uralreg.h
  user/piso/sys/dev/usb2/wlan/if_uralvar.h
     - copied unchanged from r187686, head/sys/dev/usb2/wlan/if_uralvar.h
  user/piso/sys/dev/usb2/wlan/if_zydfw.h
     - copied unchanged from r187686, head/sys/dev/usb2/wlan/if_zydfw.h
  user/piso/sys/dev/usb2/wlan/if_zydreg.h
     - copied unchanged from r187686, head/sys/dev/usb2/wlan/if_zydreg.h
  user/piso/sys/i386/conf/USB2
     - copied unchanged from r187686, head/sys/i386/conf/USB2
  user/piso/sys/mips/mips/elf64_machdep.c
     - copied unchanged from r187686, head/sys/mips/mips/elf64_machdep.c
  user/piso/sys/modules/urtw/
     - copied from r187686, head/sys/modules/urtw/
  user/piso/sys/modules/usb2/controller_atmegadci/
     - copied from r187686, head/sys/modules/usb2/controller_atmegadci/
  user/piso/sys/modules/usb2/serial_3g/
     - copied from r187686, head/sys/modules/usb2/serial_3g/
  user/piso/sys/net80211/ieee80211_tdma.c
     - copied unchanged from r187686, head/sys/net80211/ieee80211_tdma.c
  user/piso/sys/net80211/ieee80211_tdma.h
     - copied unchanged from r187686, head/sys/net80211/ieee80211_tdma.h
  user/piso/sys/pc98/cbus/sctermvar.h
     - copied unchanged from r187686, head/sys/pc98/cbus/sctermvar.h
  user/piso/sys/powerpc/powermac/kiic.c
     - copied unchanged from r187686, head/sys/powerpc/powermac/kiic.c
  user/piso/sys/security/audit/audit_bsm_domain.c
     - copied unchanged from r187686, head/sys/security/audit/audit_bsm_domain.c
  user/piso/sys/security/audit/audit_bsm_errno.c
     - copied unchanged from r187686, head/sys/security/audit/audit_bsm_errno.c
  user/piso/sys/security/audit/audit_bsm_socket_type.c
     - copied unchanged from r187686, head/sys/security/audit/audit_bsm_socket_type.c
  user/piso/sys/xen/evtchn.h
     - copied unchanged from r187686, head/sys/xen/evtchn.h
  user/piso/sys/xen/hypervisor.h
     - copied unchanged from r187686, head/sys/xen/hypervisor.h
  user/piso/sys/xen/xen_intr.h
     - copied unchanged from r187686, head/sys/xen/xen_intr.h
  user/piso/tools/regression/usr.bin/jot/regress.wX1.out
     - copied unchanged from r187686, head/tools/regression/usr.bin/jot/regress.wX1.out
  user/piso/tools/tools/ath/athrd/
     - copied from r187686, head/tools/tools/ath/athrd/
  user/piso/tools/tools/nanobsd/gateworks/
     - copied from r187686, head/tools/tools/nanobsd/gateworks/
  user/piso/tools/tools/net80211/scripts/setup.tdma-master
     - copied unchanged from r187686, head/tools/tools/net80211/scripts/setup.tdma-master
  user/piso/tools/tools/net80211/scripts/setup.tdma-slave
     - copied unchanged from r187686, head/tools/tools/net80211/scripts/setup.tdma-slave
  user/piso/tools/tools/net80211/wlantxtime/
     - copied from r187686, head/tools/tools/net80211/wlantxtime/
  user/piso/tools/tools/sysbuild/
     - copied from r187686, head/tools/tools/sysbuild/
  user/piso/usr.bin/mail/util.c
     - copied unchanged from r187686, head/usr.bin/mail/util.c
Replaced:
  user/piso/contrib/file/FREEBSD-upgrade
     - copied unchanged from r187686, head/contrib/file/FREEBSD-upgrade
  user/piso/contrib/file/magic2mime
     - copied unchanged from r187686, head/contrib/file/magic2mime
Deleted:
  user/piso/contrib/file/LEGAL.NOTICE
  user/piso/contrib/file/Makefile.std
  user/piso/contrib/file/PORTING
  user/piso/contrib/file/configure.in
  user/piso/contrib/file/magic.mime
  user/piso/contrib/file/mkinstalldirs
  user/piso/contrib/file/test.c
  user/piso/sys/arm/arm/cpufunc_asm_feroceon.S
  user/piso/sys/boot/common/load.c
  user/piso/sys/dev/digi/con.CX-IBM.h
  user/piso/sys/dev/digi/con.CX.h
  user/piso/sys/dev/digi/con.EPCX.h
  user/piso/sys/dev/digi/con.MBank.h
  user/piso/sys/dev/sound/pci/au88x0.c
  user/piso/sys/dev/sound/pci/au88x0.h
  user/piso/sys/dev/syscons/scterm-dumb.c
  user/piso/sys/dev/syscons/scterm-sc.c
  user/piso/sys/dev/syscons/sctermvar.h
  user/piso/sys/dev/usb2/ethernet/if_aue2_reg.h
  user/piso/sys/dev/usb2/ethernet/if_axe2_reg.h
  user/piso/sys/dev/usb2/ethernet/if_cdce2_reg.h
  user/piso/sys/dev/usb2/ethernet/if_cue2_reg.h
  user/piso/sys/dev/usb2/ethernet/if_kue2_fw.h
  user/piso/sys/dev/usb2/ethernet/if_kue2_reg.h
  user/piso/sys/dev/usb2/ethernet/if_rue2_reg.h
  user/piso/sys/dev/usb2/ethernet/if_udav2_reg.h
  user/piso/sys/dev/usb2/wlan/if_rum2_fw.h
  user/piso/sys/dev/usb2/wlan/if_rum2_reg.h
  user/piso/sys/dev/usb2/wlan/if_rum2_var.h
  user/piso/sys/dev/usb2/wlan/if_ural2_reg.h
  user/piso/sys/dev/usb2/wlan/if_ural2_var.h
  user/piso/sys/dev/usb2/wlan/if_zyd2_fw.h
  user/piso/sys/dev/usb2/wlan/if_zyd2_reg.h
  user/piso/sys/i386/include/xen/evtchn.h
  user/piso/sys/i386/include/xen/hypervisor.h
  user/piso/sys/i386/include/xen/xen_intr.h
  user/piso/sys/modules/sound/driver/au88x0/
  user/piso/sys/powerpc/booke/support.S
  user/piso/tools/regression/usr.bin/jot/regress.wX.out
  user/piso/usr.bin/mail/aux.c
Modified:
  user/piso/   (props changed)
  user/piso/COPYRIGHT
  user/piso/Makefile.inc1
  user/piso/ObsoleteFiles.inc
  user/piso/UPDATING
  user/piso/bin/chmod/chmod.1
  user/piso/bin/dd/dd.1
  user/piso/bin/kenv/kenv.1
  user/piso/bin/ln/ln.1
  user/piso/bin/test/test.1
  user/piso/cddl/contrib/opensolaris/cmd/zinject/zinject.c
  user/piso/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c
  user/piso/contrib/bind9/   (props changed)
  user/piso/contrib/bind9/CHANGES
  user/piso/contrib/bind9/lib/dns/api
  user/piso/contrib/bind9/lib/dns/openssldsa_link.c
  user/piso/contrib/bind9/lib/dns/opensslrsa_link.c
  user/piso/contrib/bind9/lib/isc/unix/socket.c
  user/piso/contrib/bind9/version
  user/piso/contrib/csup/   (props changed)
  user/piso/contrib/csup/GNUmakefile
  user/piso/contrib/csup/Makefile
  user/piso/contrib/csup/TODO
  user/piso/contrib/csup/config.c
  user/piso/contrib/csup/csup.1
  user/piso/contrib/csup/detailer.c
  user/piso/contrib/csup/diff.c
  user/piso/contrib/csup/diff.h
  user/piso/contrib/csup/fattr.c
  user/piso/contrib/csup/fattr.h
  user/piso/contrib/csup/keyword.c
  user/piso/contrib/csup/keyword.h
  user/piso/contrib/csup/lister.c
  user/piso/contrib/csup/misc.c
  user/piso/contrib/csup/misc.h
  user/piso/contrib/csup/mux.c
  user/piso/contrib/csup/proto.c
  user/piso/contrib/csup/proto.h
  user/piso/contrib/csup/status.c
  user/piso/contrib/csup/stream.c
  user/piso/contrib/csup/stream.h
  user/piso/contrib/csup/updater.c
  user/piso/contrib/file/   (props changed)
  user/piso/contrib/file/ChangeLog
  user/piso/contrib/file/MAINT
  user/piso/contrib/file/Magdir/adventure
  user/piso/contrib/file/Magdir/animation
  user/piso/contrib/file/Magdir/apple
  user/piso/contrib/file/Magdir/archive
  user/piso/contrib/file/Magdir/audio
  user/piso/contrib/file/Magdir/c-lang
  user/piso/contrib/file/Magdir/c64
  user/piso/contrib/file/Magdir/cafebabe
  user/piso/contrib/file/Magdir/cddb
  user/piso/contrib/file/Magdir/commands
  user/piso/contrib/file/Magdir/compress
  user/piso/contrib/file/Magdir/console
  user/piso/contrib/file/Magdir/cracklib
  user/piso/contrib/file/Magdir/ctags
  user/piso/contrib/file/Magdir/database
  user/piso/contrib/file/Magdir/diff
  user/piso/contrib/file/Magdir/dump
  user/piso/contrib/file/Magdir/elf
  user/piso/contrib/file/Magdir/filesystems
  user/piso/contrib/file/Magdir/flash
  user/piso/contrib/file/Magdir/fonts
  user/piso/contrib/file/Magdir/fortran
  user/piso/contrib/file/Magdir/frame
  user/piso/contrib/file/Magdir/freebsd
  user/piso/contrib/file/Magdir/fsav
  user/piso/contrib/file/Magdir/games
  user/piso/contrib/file/Magdir/gimp
  user/piso/contrib/file/Magdir/gnu
  user/piso/contrib/file/Magdir/hp
  user/piso/contrib/file/Magdir/iff
  user/piso/contrib/file/Magdir/images
  user/piso/contrib/file/Magdir/java
  user/piso/contrib/file/Magdir/jpeg
  user/piso/contrib/file/Magdir/lex
  user/piso/contrib/file/Magdir/linux
  user/piso/contrib/file/Magdir/lisp
  user/piso/contrib/file/Magdir/macintosh
  user/piso/contrib/file/Magdir/mail.news
  user/piso/contrib/file/Magdir/mathematica
  user/piso/contrib/file/Magdir/misctools
  user/piso/contrib/file/Magdir/msdos
  user/piso/contrib/file/Magdir/mup
  user/piso/contrib/file/Magdir/os2
  user/piso/contrib/file/Magdir/palm
  user/piso/contrib/file/Magdir/pdf
  user/piso/contrib/file/Magdir/perl
  user/piso/contrib/file/Magdir/pgp
  user/piso/contrib/file/Magdir/pkgadd
  user/piso/contrib/file/Magdir/printer
  user/piso/contrib/file/Magdir/psion
  user/piso/contrib/file/Magdir/revision
  user/piso/contrib/file/Magdir/riff
  user/piso/contrib/file/Magdir/rpm
  user/piso/contrib/file/Magdir/rtf
  user/piso/contrib/file/Magdir/sc
  user/piso/contrib/file/Magdir/scientific
  user/piso/contrib/file/Magdir/sgi
  user/piso/contrib/file/Magdir/sgml
  user/piso/contrib/file/Magdir/sharc
  user/piso/contrib/file/Magdir/sketch
  user/piso/contrib/file/Magdir/softquad
  user/piso/contrib/file/Magdir/spectrum
  user/piso/contrib/file/Magdir/tex
  user/piso/contrib/file/Magdir/troff
  user/piso/contrib/file/Magdir/unicode
  user/piso/contrib/file/Magdir/uuencode
  user/piso/contrib/file/Magdir/varied.script
  user/piso/contrib/file/Magdir/vorbis
  user/piso/contrib/file/Magdir/wordprocessors
  user/piso/contrib/file/Makefile.am
  user/piso/contrib/file/Makefile.in
  user/piso/contrib/file/README
  user/piso/contrib/file/acinclude.m4
  user/piso/contrib/file/aclocal.m4
  user/piso/contrib/file/apprentice.c
  user/piso/contrib/file/ascmagic.c
  user/piso/contrib/file/compress.c
  user/piso/contrib/file/config.h.in
  user/piso/contrib/file/configure
  user/piso/contrib/file/file.c
  user/piso/contrib/file/file.h
  user/piso/contrib/file/file.man
  user/piso/contrib/file/fsmagic.c
  user/piso/contrib/file/funcs.c
  user/piso/contrib/file/is_tar.c
  user/piso/contrib/file/libmagic.man
  user/piso/contrib/file/magic.c
  user/piso/contrib/file/magic.h
  user/piso/contrib/file/magic.man
  user/piso/contrib/file/names.h
  user/piso/contrib/file/patchlevel.h
  user/piso/contrib/file/print.c
  user/piso/contrib/file/readelf.c
  user/piso/contrib/file/readelf.h
  user/piso/contrib/file/softmagic.c
  user/piso/contrib/file/tar.h
  user/piso/contrib/lukemftpd/src/extern.h
  user/piso/contrib/lukemftpd/src/ftpcmd.y
  user/piso/contrib/lukemftpd/src/ftpd.c
  user/piso/contrib/ntp/ntpd/ntp_crypto.c
  user/piso/contrib/openbsm/   (props changed)
  user/piso/contrib/openbsm/INSTALL
  user/piso/contrib/openbsm/Makefile.am
  user/piso/contrib/openbsm/Makefile.in
  user/piso/contrib/openbsm/NEWS
  user/piso/contrib/openbsm/README
  user/piso/contrib/openbsm/TODO
  user/piso/contrib/openbsm/VERSION
  user/piso/contrib/openbsm/bin/Makefile.in
  user/piso/contrib/openbsm/bin/audit/Makefile.am
  user/piso/contrib/openbsm/bin/audit/Makefile.in
  user/piso/contrib/openbsm/bin/audit/audit.8
  user/piso/contrib/openbsm/bin/audit/audit.c
  user/piso/contrib/openbsm/bin/auditd/Makefile.am
  user/piso/contrib/openbsm/bin/auditd/Makefile.in
  user/piso/contrib/openbsm/bin/auditd/audit_warn.c
  user/piso/contrib/openbsm/bin/auditd/auditd.8
  user/piso/contrib/openbsm/bin/auditd/auditd.c
  user/piso/contrib/openbsm/bin/auditd/auditd.h
  user/piso/contrib/openbsm/bin/auditfilterd/Makefile.in
  user/piso/contrib/openbsm/bin/auditreduce/Makefile.in
  user/piso/contrib/openbsm/bin/auditreduce/auditreduce.c
  user/piso/contrib/openbsm/bin/praudit/Makefile.in
  user/piso/contrib/openbsm/bsm/Makefile.am
  user/piso/contrib/openbsm/bsm/Makefile.in
  user/piso/contrib/openbsm/bsm/audit_uevents.h
  user/piso/contrib/openbsm/bsm/libbsm.h
  user/piso/contrib/openbsm/compat/endian.h
  user/piso/contrib/openbsm/config/config.h
  user/piso/contrib/openbsm/config/config.h.in
  user/piso/contrib/openbsm/configure
  user/piso/contrib/openbsm/configure.ac
  user/piso/contrib/openbsm/etc/audit_event
  user/piso/contrib/openbsm/libbsm/Makefile.am
  user/piso/contrib/openbsm/libbsm/Makefile.in
  user/piso/contrib/openbsm/libbsm/au_token.3
  user/piso/contrib/openbsm/libbsm/audit_submit.3
  user/piso/contrib/openbsm/libbsm/bsm_audit.c
  user/piso/contrib/openbsm/libbsm/bsm_class.c
  user/piso/contrib/openbsm/libbsm/bsm_control.c
  user/piso/contrib/openbsm/libbsm/bsm_event.c
  user/piso/contrib/openbsm/libbsm/bsm_io.c
  user/piso/contrib/openbsm/libbsm/bsm_mask.c
  user/piso/contrib/openbsm/libbsm/bsm_token.c
  user/piso/contrib/openbsm/libbsm/bsm_user.c
  user/piso/contrib/openbsm/libbsm/bsm_wrappers.c
  user/piso/contrib/openbsm/libbsm/libbsm.3
  user/piso/contrib/openbsm/man/Makefile.in
  user/piso/contrib/openbsm/man/audit.log.5
  user/piso/contrib/openbsm/man/audit_user.5
  user/piso/contrib/openbsm/modules/Makefile.in
  user/piso/contrib/openbsm/modules/auditfilter_noop/Makefile.in
  user/piso/contrib/openbsm/sys/Makefile.in
  user/piso/contrib/openbsm/sys/bsm/Makefile.am
  user/piso/contrib/openbsm/sys/bsm/Makefile.in
  user/piso/contrib/openbsm/sys/bsm/audit.h
  user/piso/contrib/openbsm/sys/bsm/audit_internal.h
  user/piso/contrib/openbsm/sys/bsm/audit_kevents.h
  user/piso/contrib/openbsm/sys/bsm/audit_record.h
  user/piso/contrib/openbsm/test/Makefile.in
  user/piso/contrib/openbsm/test/bsm/Makefile.in
  user/piso/contrib/openbsm/test/bsm/generate.c
  user/piso/contrib/openbsm/test/reference/arg32_record
  user/piso/contrib/openbsm/test/reference/data_record
  user/piso/contrib/openbsm/test/reference/data_token
  user/piso/contrib/openbsm/test/reference/file_record
  user/piso/contrib/openbsm/test/reference/header32_token
  user/piso/contrib/openbsm/test/reference/in_addr_record
  user/piso/contrib/openbsm/test/reference/ip_record
  user/piso/contrib/openbsm/test/reference/ipc_record
  user/piso/contrib/openbsm/test/reference/iport_record
  user/piso/contrib/openbsm/test/reference/opaque_record
  user/piso/contrib/openbsm/test/reference/path_record
  user/piso/contrib/openbsm/test/reference/process32_record
  user/piso/contrib/openbsm/test/reference/process32ex_record-IPv4
  user/piso/contrib/openbsm/test/reference/process32ex_record-IPv6
  user/piso/contrib/openbsm/test/reference/process64_record
  user/piso/contrib/openbsm/test/reference/process64ex_record-IPv4
  user/piso/contrib/openbsm/test/reference/process64ex_record-IPv6
  user/piso/contrib/openbsm/test/reference/return32_record
  user/piso/contrib/openbsm/test/reference/return32_token
  user/piso/contrib/openbsm/test/reference/seq_record
  user/piso/contrib/openbsm/test/reference/subject32_record
  user/piso/contrib/openbsm/test/reference/subject32ex_record
  user/piso/contrib/openbsm/test/reference/text_record
  user/piso/contrib/openbsm/test/reference/zonename_record
  user/piso/contrib/openbsm/tools/Makefile.in
  user/piso/contrib/smbfs/mount_smbfs/mount_smbfs.8
  user/piso/contrib/smbfs/mount_smbfs/mount_smbfs.c
  user/piso/contrib/wpa_supplicant/   (props changed)
  user/piso/crypto/openssl/apps/speed.c
  user/piso/crypto/openssl/apps/spkac.c
  user/piso/crypto/openssl/apps/verify.c
  user/piso/crypto/openssl/apps/x509.c
  user/piso/crypto/openssl/ssl/s2_clnt.c
  user/piso/crypto/openssl/ssl/s2_srvr.c
  user/piso/crypto/openssl/ssl/s3_clnt.c
  user/piso/crypto/openssl/ssl/s3_srvr.c
  user/piso/crypto/openssl/ssl/ssltest.c
  user/piso/etc/defaults/rc.conf
  user/piso/etc/periodic/weekly/Makefile
  user/piso/etc/rc.shutdown
  user/piso/etc/regdomain.xml
  user/piso/games/fortune/datfiles/freebsd-tips
  user/piso/gnu/lib/libstdc++/Makefile
  user/piso/gnu/usr.bin/man/manpath/manpath.config
  user/piso/lib/Makefile
  user/piso/lib/libalias/modules/Makefile.inc
  user/piso/lib/libarchive/archive_read_support_compression_gzip.c
  user/piso/lib/libarchive/archive_read_support_format_iso9660.c
  user/piso/lib/libarchive/archive_write_disk.c
  user/piso/lib/libarchive/test/Makefile
  user/piso/lib/libarchive/test/test_write_disk_secure.c
  user/piso/lib/libbsm/Makefile
  user/piso/lib/libc/locale/mbstowcs.c
  user/piso/lib/libc/locale/wcsftime.c
  user/piso/lib/libc/locale/wcstombs.c
  user/piso/lib/libc/net/getaddrinfo.3
  user/piso/lib/libc/stdio/fputws.c
  user/piso/lib/libc/stdio/vfprintf.c
  user/piso/lib/libc/stdio/vfscanf.c
  user/piso/lib/libc/stdio/vfwprintf.c
  user/piso/lib/libc/stdio/vfwscanf.c
  user/piso/lib/libc/stdio/vswscanf.c
  user/piso/lib/libc/stdio/wsetup.c
  user/piso/lib/libc/string/Makefile.inc
  user/piso/lib/libc/string/ffs.3
  user/piso/lib/libc/string/strlcat.c
  user/piso/lib/libc/string/strlcpy.3
  user/piso/lib/libc/sys/jail.2
  user/piso/lib/libc/sys/socket.2
  user/piso/lib/libc/sys/timer_create.2
  user/piso/lib/libmagic/Makefile
  user/piso/lib/libmd/mdX.3
  user/piso/lib/libstand/bootp.c
  user/piso/lib/libusb20/libusb20.c
  user/piso/lib/libusb20/libusb20_desc.c
  user/piso/lib/msun/src/e_rem_pio2.c
  user/piso/lib/msun/src/e_rem_pio2f.c
  user/piso/lib/msun/src/k_cosf.c
  user/piso/lib/msun/src/k_sinf.c
  user/piso/lib/msun/src/k_tanf.c
  user/piso/lib/msun/src/math.h
  user/piso/libexec/comsat/comsat.c
  user/piso/release/doc/en_US.ISO8859-1/relnotes/article.sgml
  user/piso/sbin/fdisk/fdisk.c
  user/piso/sbin/fsck_ffs/fsck.h
  user/piso/sbin/fsck_ffs/fsck_ffs.8
  user/piso/sbin/fsck_ffs/fsutil.c
  user/piso/sbin/fsck_ffs/main.c
  user/piso/sbin/geom/class/virstor/gvirstor.8
  user/piso/sbin/ifconfig/ifconfig.8
  user/piso/sbin/ifconfig/ifconfig.c
  user/piso/sbin/ifconfig/ifieee80211.c
  user/piso/sbin/ipfw/ipfw2.c
  user/piso/sbin/md5/md5.1
  user/piso/sbin/mdconfig/mdconfig.8
  user/piso/sbin/mdconfig/mdconfig.c
  user/piso/sbin/mount/mount.c
  user/piso/sbin/mount_msdosfs/mount_msdosfs.8
  user/piso/sbin/mount_ntfs/mount_ntfs.8
  user/piso/sbin/ping/ping.8
  user/piso/sbin/recoverdisk/recoverdisk.c
  user/piso/sbin/route/route.c
  user/piso/share/examples/cvsup/refuse.README
  user/piso/share/man/man4/Makefile
  user/piso/share/man/man4/ae.4
  user/piso/share/man/man4/ath.4
  user/piso/share/man/man4/bce.4
  user/piso/share/man/man4/bge.4
  user/piso/share/man/man4/cd.4
  user/piso/share/man/man4/cpuctl.4
  user/piso/share/man/man4/gem.4
  user/piso/share/man/man4/hme.4
  user/piso/share/man/man4/nge.4
  user/piso/share/man/man4/sdhci.4
  user/piso/share/man/man4/sk.4
  user/piso/share/man/man4/snd_hda.4
  user/piso/share/man/man4/snd_ich.4
  user/piso/share/man/man4/sysmouse.4
  user/piso/share/man/man5/rc.conf.5
  user/piso/share/man/man7/build.7
  user/piso/share/man/man7/ports.7
  user/piso/share/man/man7/tuning.7
  user/piso/share/man/man9/dev_clone.9
  user/piso/share/man/man9/domain.9
  user/piso/share/man/man9/insmntque.9
  user/piso/share/man/man9/redzone.9
  user/piso/share/misc/bsd-family-tree
  user/piso/share/misc/pci_vendors
  user/piso/share/mk/bsd.libnames.mk
  user/piso/share/mk/bsd.own.mk
  user/piso/share/zoneinfo/   (props changed)
  user/piso/share/zoneinfo/asia
  user/piso/share/zoneinfo/backward
  user/piso/share/zoneinfo/europe
  user/piso/share/zoneinfo/leapseconds
  user/piso/share/zoneinfo/northamerica
  user/piso/share/zoneinfo/zone.tab
  user/piso/sys/   (props changed)
  user/piso/sys/amd64/amd64/amd64_mem.c
  user/piso/sys/amd64/amd64/cpu_switch.S
  user/piso/sys/amd64/amd64/exception.S
  user/piso/sys/amd64/amd64/identcpu.c
  user/piso/sys/amd64/amd64/initcpu.c
  user/piso/sys/amd64/amd64/msi.c
  user/piso/sys/amd64/conf/GENERIC
  user/piso/sys/amd64/include/cputypes.h
  user/piso/sys/amd64/include/md_var.h
  user/piso/sys/amd64/include/specialreg.h
  user/piso/sys/arm/arm/cpufunc.c
  user/piso/sys/arm/arm/elf_trampoline.c
  user/piso/sys/arm/at91/at91.c
  user/piso/sys/arm/at91/at91_mci.c
  user/piso/sys/arm/at91/at91_twi.c
  user/piso/sys/arm/at91/at91_twireg.h
  user/piso/sys/arm/at91/at91var.h
  user/piso/sys/arm/at91/uart_bus_at91usart.c
  user/piso/sys/arm/at91/uart_cpu_at91rm9200usart.c
  user/piso/sys/arm/at91/uart_dev_at91usart.c
  user/piso/sys/arm/include/cpufunc.h
  user/piso/sys/arm/include/vmparam.h
  user/piso/sys/arm/mv/common.c
  user/piso/sys/arm/mv/discovery/db78xxx.c
  user/piso/sys/arm/mv/discovery/discovery.c
  user/piso/sys/arm/mv/files.mv
  user/piso/sys/arm/mv/gpio.c
  user/piso/sys/arm/mv/kirkwood/db88f6xxx.c
  user/piso/sys/arm/mv/kirkwood/kirkwood.c
  user/piso/sys/arm/mv/mv_machdep.c
  user/piso/sys/arm/mv/mv_pci.c
  user/piso/sys/arm/mv/mvreg.h
  user/piso/sys/arm/mv/mvvar.h
  user/piso/sys/arm/mv/obio.c
  user/piso/sys/arm/mv/orion/db88f5xxx.c
  user/piso/sys/arm/mv/orion/orion.c
  user/piso/sys/arm/xscale/i8134x/i81342_mcu.c
  user/piso/sys/boot/forth/loader.4th
  user/piso/sys/boot/forth/loader.conf
  user/piso/sys/boot/forth/pnp.4th
  user/piso/sys/boot/forth/support.4th
  user/piso/sys/boot/i386/boot0/Makefile
  user/piso/sys/boot/i386/boot0/boot0.S
  user/piso/sys/boot/i386/libi386/bootinfo64.c
  user/piso/sys/bsm/audit.h
  user/piso/sys/bsm/audit_internal.h
  user/piso/sys/bsm/audit_kevents.h
  user/piso/sys/bsm/audit_record.h
  user/piso/sys/cam/cam_periph.c
  user/piso/sys/cam/cam_xpt.c
  user/piso/sys/cam/cam_xpt_sim.h
  user/piso/sys/cam/scsi/scsi_all.c
  user/piso/sys/cam/scsi/scsi_cd.c
  user/piso/sys/cam/scsi/scsi_ch.c
  user/piso/sys/cam/scsi/scsi_da.c
  user/piso/sys/cam/scsi/scsi_low.c
  user/piso/sys/cam/scsi/scsi_pass.c
  user/piso/sys/cam/scsi/scsi_pt.c
  user/piso/sys/cam/scsi/scsi_sa.c
  user/piso/sys/cam/scsi/scsi_ses.c
  user/piso/sys/cam/scsi/scsi_sg.c
  user/piso/sys/compat/freebsd32/freebsd32_misc.c
  user/piso/sys/compat/linprocfs/linprocfs.c
  user/piso/sys/compat/linux/linux_misc.c
  user/piso/sys/conf/Makefile.arm
  user/piso/sys/conf/NOTES
  user/piso/sys/conf/files
  user/piso/sys/conf/files.amd64
  user/piso/sys/conf/files.i386
  user/piso/sys/conf/files.ia64
  user/piso/sys/conf/files.pc98
  user/piso/sys/conf/files.powerpc
  user/piso/sys/conf/files.sparc64
  user/piso/sys/conf/kern.post.mk
  user/piso/sys/conf/kern.pre.mk
  user/piso/sys/conf/newvers.sh
  user/piso/sys/conf/options
  user/piso/sys/contrib/altq/altq/altq_subr.c
  user/piso/sys/contrib/pf/   (props changed)
  user/piso/sys/crypto/via/padlock.c
  user/piso/sys/crypto/via/padlock_hash.c
  user/piso/sys/dev/acpica/acpi_battery.c
  user/piso/sys/dev/adb/adb_kbd.c
  user/piso/sys/dev/agp/agp_amd64.c
  user/piso/sys/dev/agp/agp_via.c
  user/piso/sys/dev/ata/ata-queue.c
  user/piso/sys/dev/ata/atapi-cam.c
  user/piso/sys/dev/ath/ath_hal/ah_regdomain.c
  user/piso/sys/dev/ath/ath_hal/ar5210/ar5210_reset.c
  user/piso/sys/dev/ath/ath_hal/ar5211/ar5211_misc.c
  user/piso/sys/dev/ath/ath_hal/ar5211/ar5211_reset.c
  user/piso/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c
  user/piso/sys/dev/ath/ath_hal/ar5212/ar5212_reset.c
  user/piso/sys/dev/ath/ath_hal/ar5212/ar5212_rfgain.c
  user/piso/sys/dev/ath/ath_hal/ar5312/ar5312_reset.c
  user/piso/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c
  user/piso/sys/dev/ath/ath_rate/amrr/amrr.c
  user/piso/sys/dev/ath/ath_rate/onoe/onoe.c
  user/piso/sys/dev/ath/ath_rate/sample/sample.c
  user/piso/sys/dev/ath/if_ath.c
  user/piso/sys/dev/ath/if_ath_pci.c
  user/piso/sys/dev/ath/if_athioctl.h
  user/piso/sys/dev/ath/if_athvar.h
  user/piso/sys/dev/bce/if_bce.c
  user/piso/sys/dev/cardbus/cardbus.c
  user/piso/sys/dev/dcons/dcons_crom.c
  user/piso/sys/dev/dcons/dcons_os.c
  user/piso/sys/dev/e1000/if_igb.c
  user/piso/sys/dev/exca/exca.c
  user/piso/sys/dev/fxp/if_fxp.c
  user/piso/sys/dev/if_ndis/if_ndis.c
  user/piso/sys/dev/iicbus/ad7418.c
  user/piso/sys/dev/iicbus/ds1672.c
  user/piso/sys/dev/iicbus/icee.c
  user/piso/sys/dev/iicbus/if_ic.c
  user/piso/sys/dev/iicbus/iic.c
  user/piso/sys/dev/iicbus/iicbus.c
  user/piso/sys/dev/iicbus/iicsmb.c
  user/piso/sys/dev/md/md.c
  user/piso/sys/dev/mge/if_mge.c
  user/piso/sys/dev/mge/if_mgevar.h
  user/piso/sys/dev/mmc/mmc.c
  user/piso/sys/dev/mpt/mpt.c
  user/piso/sys/dev/mpt/mpt.h
  user/piso/sys/dev/mpt/mpt_cam.c
  user/piso/sys/dev/mpt/mpt_raid.c
  user/piso/sys/dev/mpt/mpt_user.c
  user/piso/sys/dev/msk/if_msk.c
  user/piso/sys/dev/msk/if_mskreg.h
  user/piso/sys/dev/ofw/ofw_bus_subr.c
  user/piso/sys/dev/ofw/openfirm.c
  user/piso/sys/dev/ofw/openfirm.h
  user/piso/sys/dev/pccard/pccardvar.h
  user/piso/sys/dev/pci/pci.c
  user/piso/sys/dev/pcn/if_pcn.c
  user/piso/sys/dev/ppbus/if_plip.c
  user/piso/sys/dev/ppbus/immio.c
  user/piso/sys/dev/ppbus/lpbb.c
  user/piso/sys/dev/ppbus/lpt.c
  user/piso/sys/dev/ppbus/pcfclock.c
  user/piso/sys/dev/ppbus/ppb_1284.c
  user/piso/sys/dev/ppbus/ppb_base.c
  user/piso/sys/dev/ppbus/ppb_msq.c
  user/piso/sys/dev/ppbus/ppbconf.c
  user/piso/sys/dev/ppbus/ppbconf.h
  user/piso/sys/dev/ppbus/ppi.c
  user/piso/sys/dev/ppbus/pps.c
  user/piso/sys/dev/ppbus/vpo.c
  user/piso/sys/dev/ppbus/vpoio.c
  user/piso/sys/dev/ppc/ppc.c
  user/piso/sys/dev/ppc/ppc_acpi.c
  user/piso/sys/dev/ppc/ppc_isa.c
  user/piso/sys/dev/ppc/ppc_pci.c
  user/piso/sys/dev/ppc/ppc_puc.c
  user/piso/sys/dev/ppc/ppcreg.h
  user/piso/sys/dev/ppc/ppcvar.h
  user/piso/sys/dev/re/if_re.c
  user/piso/sys/dev/sound/pci/cmi.c
  user/piso/sys/dev/sound/pci/hda/hdac.c
  user/piso/sys/dev/sound/pcm/dsp.c
  user/piso/sys/dev/sound/pcm/mixer.c
  user/piso/sys/dev/sound/pcm/sound.c
  user/piso/sys/dev/sound/pcm/sound.h
  user/piso/sys/dev/speaker/spkr.c
  user/piso/sys/dev/syscons/scterm.c
  user/piso/sys/dev/syscons/syscons.c
  user/piso/sys/dev/syscons/syscons.h
  user/piso/sys/dev/uart/uart_cpu_mv.c
  user/piso/sys/dev/usb/ehci.c
  user/piso/sys/dev/usb/ehci_ixp4xx.c   (props changed)
  user/piso/sys/dev/usb/ehci_mbus.c
  user/piso/sys/dev/usb/ehci_pci.c
  user/piso/sys/dev/usb/uftdi.c
  user/piso/sys/dev/usb/uhci_pci.c
  user/piso/sys/dev/usb/usbdevs
  user/piso/sys/dev/usb/usbdi.c
  user/piso/sys/dev/usb/uscanner.c
  user/piso/sys/dev/usb2/bluetooth/ng_ubt2.c
  user/piso/sys/dev/usb2/bluetooth/ng_ubt2_var.h
  user/piso/sys/dev/usb2/bluetooth/ubtbcmfw2.c
  user/piso/sys/dev/usb2/controller/at91dci.c
  user/piso/sys/dev/usb2/controller/at91dci.h
  user/piso/sys/dev/usb2/controller/at91dci_atmelarm.c
  user/piso/sys/dev/usb2/controller/ehci2.c
  user/piso/sys/dev/usb2/controller/ehci2.h
  user/piso/sys/dev/usb2/controller/ehci2_pci.c
  user/piso/sys/dev/usb2/controller/musb2_otg.c
  user/piso/sys/dev/usb2/controller/musb2_otg.h
  user/piso/sys/dev/usb2/controller/musb2_otg_atmelarm.c
  user/piso/sys/dev/usb2/controller/ohci2.c
  user/piso/sys/dev/usb2/controller/ohci2.h
  user/piso/sys/dev/usb2/controller/ohci2_atmelarm.c
  user/piso/sys/dev/usb2/controller/ohci2_pci.c
  user/piso/sys/dev/usb2/controller/uhci2.c
  user/piso/sys/dev/usb2/controller/uhci2.h
  user/piso/sys/dev/usb2/controller/uhci2_pci.c
  user/piso/sys/dev/usb2/controller/usb2_bus.h
  user/piso/sys/dev/usb2/controller/usb2_controller.c
  user/piso/sys/dev/usb2/controller/usb2_controller.h
  user/piso/sys/dev/usb2/controller/uss820dci.c
  user/piso/sys/dev/usb2/controller/uss820dci.h
  user/piso/sys/dev/usb2/controller/uss820dci_atmelarm.c
  user/piso/sys/dev/usb2/core/usb2_busdma.c
  user/piso/sys/dev/usb2/core/usb2_compat_linux.c
  user/piso/sys/dev/usb2/core/usb2_core.h
  user/piso/sys/dev/usb2/core/usb2_debug.c
  user/piso/sys/dev/usb2/core/usb2_device.c
  user/piso/sys/dev/usb2/core/usb2_device.h
  user/piso/sys/dev/usb2/core/usb2_dynamic.c
  user/piso/sys/dev/usb2/core/usb2_dynamic.h
  user/piso/sys/dev/usb2/core/usb2_generic.c
  user/piso/sys/dev/usb2/core/usb2_handle_request.c
  user/piso/sys/dev/usb2/core/usb2_hub.c
  user/piso/sys/dev/usb2/core/usb2_hub.h
  user/piso/sys/dev/usb2/core/usb2_mbuf.h
  user/piso/sys/dev/usb2/core/usb2_msctest.c
  user/piso/sys/dev/usb2/core/usb2_msctest.h
  user/piso/sys/dev/usb2/core/usb2_parse.c
  user/piso/sys/dev/usb2/core/usb2_request.c
  user/piso/sys/dev/usb2/core/usb2_request.h
  user/piso/sys/dev/usb2/core/usb2_sw_transfer.c
  user/piso/sys/dev/usb2/core/usb2_transfer.c
  user/piso/sys/dev/usb2/core/usb2_transfer.h
  user/piso/sys/dev/usb2/ethernet/if_aue2.c
  user/piso/sys/dev/usb2/ethernet/if_axe2.c
  user/piso/sys/dev/usb2/ethernet/if_cdce2.c
  user/piso/sys/dev/usb2/ethernet/if_cue2.c
  user/piso/sys/dev/usb2/ethernet/if_kue2.c
  user/piso/sys/dev/usb2/ethernet/if_rue2.c
  user/piso/sys/dev/usb2/ethernet/if_udav2.c
  user/piso/sys/dev/usb2/image/uscanner2.c
  user/piso/sys/dev/usb2/include/usb2_defs.h
  user/piso/sys/dev/usb2/include/usb2_devid.h
  user/piso/sys/dev/usb2/include/usb2_devtable.h
  user/piso/sys/dev/usb2/include/usb2_ioctl.h
  user/piso/sys/dev/usb2/include/usb2_standard.h
  user/piso/sys/dev/usb2/input/uhid2.c
  user/piso/sys/dev/usb2/input/ukbd2.c
  user/piso/sys/dev/usb2/input/ums2.c
  user/piso/sys/dev/usb2/misc/ufm2.c
  user/piso/sys/dev/usb2/serial/u3g2.c
  user/piso/sys/dev/usb2/serial/uark2.c
  user/piso/sys/dev/usb2/serial/ubsa2.c
  user/piso/sys/dev/usb2/serial/ubser2.c
  user/piso/sys/dev/usb2/serial/uchcom2.c
  user/piso/sys/dev/usb2/serial/ucycom2.c
  user/piso/sys/dev/usb2/serial/ufoma2.c
  user/piso/sys/dev/usb2/serial/uftdi2.c
  user/piso/sys/dev/usb2/serial/ugensa2.c
  user/piso/sys/dev/usb2/serial/uipaq2.c
  user/piso/sys/dev/usb2/serial/ulpt2.c
  user/piso/sys/dev/usb2/serial/umct2.c
  user/piso/sys/dev/usb2/serial/umodem2.c
  user/piso/sys/dev/usb2/serial/umoscom2.c
  user/piso/sys/dev/usb2/serial/uplcom2.c
  user/piso/sys/dev/usb2/serial/usb2_serial.c
  user/piso/sys/dev/usb2/serial/usb2_serial.h
  user/piso/sys/dev/usb2/serial/uvisor2.c
  user/piso/sys/dev/usb2/serial/uvscom2.c
  user/piso/sys/dev/usb2/sound/uaudio2.c
  user/piso/sys/dev/usb2/storage/ata-usb2.c
  user/piso/sys/dev/usb2/storage/umass2.c
  user/piso/sys/dev/usb2/storage/urio2.c
  user/piso/sys/dev/usb2/storage/ustorage2_fs.c
  user/piso/sys/dev/usb2/wlan/if_rum2.c
  user/piso/sys/dev/usb2/wlan/if_ural2.c
  user/piso/sys/dev/usb2/wlan/if_zyd2.c
  user/piso/sys/dev/xen/blkfront/blkfront.c
  user/piso/sys/dev/xen/console/console.c
  user/piso/sys/dev/xen/console/xencons_ring.c
  user/piso/sys/dev/xen/evtchn/evtchn_dev.c
  user/piso/sys/dev/xen/netfront/netfront.c
  user/piso/sys/fs/devfs/devfs_vnops.c
  user/piso/sys/fs/msdosfs/msdosfs_conv.c
  user/piso/sys/fs/msdosfs/msdosfs_denode.c
  user/piso/sys/fs/procfs/procfs_map.c
  user/piso/sys/fs/pseudofs/pseudofs_vncache.c
  user/piso/sys/fs/pseudofs/pseudofs_vnops.c
  user/piso/sys/geom/geom_dev.c
  user/piso/sys/geom/geom_vfs.c
  user/piso/sys/geom/part/g_part.c
  user/piso/sys/geom/part/g_part_pc98.c
  user/piso/sys/geom/part/g_part_vtoc8.c
  user/piso/sys/gnu/fs/ext2fs/ext2_bitops.h
  user/piso/sys/gnu/fs/ext2fs/ext2_fs.h
  user/piso/sys/gnu/fs/ext2fs/ext2_fs_sb.h
  user/piso/sys/gnu/fs/ext2fs/ext2_inode.c
  user/piso/sys/gnu/fs/ext2fs/ext2_linux_ialloc.c
  user/piso/sys/gnu/fs/ext2fs/ext2_vfsops.c
  user/piso/sys/i386/conf/GENERIC
  user/piso/sys/i386/conf/XEN
  user/piso/sys/i386/cpufreq/est.c
  user/piso/sys/i386/cpufreq/smist.c
  user/piso/sys/i386/i386/genassym.c
  user/piso/sys/i386/i386/i686_mem.c
  user/piso/sys/i386/i386/identcpu.c
  user/piso/sys/i386/i386/initcpu.c
  user/piso/sys/i386/i386/machdep.c
  user/piso/sys/i386/i386/msi.c
  user/piso/sys/i386/i386/vm_machdep.c
  user/piso/sys/i386/ibcs2/ibcs2_sysi86.c
  user/piso/sys/i386/include/xen/xenfunc.h
  user/piso/sys/i386/isa/npx.c
  user/piso/sys/i386/xen/clock.c
  user/piso/sys/i386/xen/mp_machdep.c
  user/piso/sys/i386/xen/mptable.c
  user/piso/sys/i386/xen/pmap.c
  user/piso/sys/i386/xen/xen_machdep.c
  user/piso/sys/ia64/ia64/pmap.c
  user/piso/sys/kern/imgact_elf.c
  user/piso/sys/kern/kern_clock.c
  user/piso/sys/kern/kern_descrip.c
  user/piso/sys/kern/kern_jail.c
  user/piso/sys/kern/kern_malloc.c
  user/piso/sys/kern/kern_mbuf.c
  user/piso/sys/kern/kern_proc.c
  user/piso/sys/kern/kern_synch.c
  user/piso/sys/kern/kern_sysctl.c
  user/piso/sys/kern/kern_timeout.c
  user/piso/sys/kern/kern_xxx.c
  user/piso/sys/kern/sched_4bsd.c
  user/piso/sys/kern/sched_ule.c
  user/piso/sys/kern/subr_param.c
  user/piso/sys/kern/subr_pcpu.c
  user/piso/sys/kern/subr_witness.c
  user/piso/sys/kern/sys_generic.c
  user/piso/sys/kern/sysv_sem.c
  user/piso/sys/kern/tty.c
  user/piso/sys/kern/tty_pty.c
  user/piso/sys/kern/uipc_cow.c
  user/piso/sys/kern/uipc_debug.c
  user/piso/sys/kern/uipc_domain.c
  user/piso/sys/kern/uipc_mbuf.c
  user/piso/sys/kern/uipc_usrreq.c
  user/piso/sys/kern/vfs_aio.c
  user/piso/sys/kern/vfs_cache.c
  user/piso/sys/kern/vfs_extattr.c
  user/piso/sys/kern/vfs_subr.c
  user/piso/sys/kern/vfs_syscalls.c
  user/piso/sys/kern/vfs_vnops.c
  user/piso/sys/kern/vnode_if.src
  user/piso/sys/mips/idt/idtpci.c
  user/piso/sys/mips/include/pmap.h
  user/piso/sys/mips/malta/gt_pci.c
  user/piso/sys/mips/mips/busdma_machdep.c
  user/piso/sys/mips/mips/cpu.c
  user/piso/sys/mips/mips/machdep.c
  user/piso/sys/mips/mips/nexus.c
  user/piso/sys/mips/mips/pmap.c
  user/piso/sys/modules/Makefile
  user/piso/sys/modules/agp/Makefile
  user/piso/sys/modules/iwnfw/Makefile
  user/piso/sys/modules/usb2/Makefile
  user/piso/sys/net/if.c
  user/piso/sys/net/if_loop.c
  user/piso/sys/net/route.c
  user/piso/sys/net/route.h
  user/piso/sys/net/rtsock.c
  user/piso/sys/net80211/_ieee80211.h
  user/piso/sys/net80211/ieee80211.c
  user/piso/sys/net80211/ieee80211.h
  user/piso/sys/net80211/ieee80211_adhoc.c
  user/piso/sys/net80211/ieee80211_ddb.c
  user/piso/sys/net80211/ieee80211_freebsd.c
  user/piso/sys/net80211/ieee80211_hostap.c
  user/piso/sys/net80211/ieee80211_input.c
  user/piso/sys/net80211/ieee80211_input.h
  user/piso/sys/net80211/ieee80211_ioctl.c
  user/piso/sys/net80211/ieee80211_ioctl.h
  user/piso/sys/net80211/ieee80211_node.c
  user/piso/sys/net80211/ieee80211_node.h
  user/piso/sys/net80211/ieee80211_output.c
  user/piso/sys/net80211/ieee80211_proto.h
  user/piso/sys/net80211/ieee80211_regdomain.c
  user/piso/sys/net80211/ieee80211_scan.h
  user/piso/sys/net80211/ieee80211_scan_sta.c
  user/piso/sys/net80211/ieee80211_var.h
  user/piso/sys/net80211/ieee80211_wds.c
  user/piso/sys/netgraph/bluetooth/l2cap/ng_l2cap_llpi.c
  user/piso/sys/netgraph/ng_deflate.c
  user/piso/sys/netgraph/ng_iface.c
  user/piso/sys/netgraph/ng_iface.h
  user/piso/sys/netgraph/ng_mppc.c
  user/piso/sys/netgraph/ng_ppp.c
  user/piso/sys/netgraph/ng_pred1.c
  user/piso/sys/netgraph/ng_vjc.c
  user/piso/sys/netinet/in.c
  user/piso/sys/netinet/in.h
  user/piso/sys/netinet/in_pcb.c
  user/piso/sys/netinet/in_pcb.h
  user/piso/sys/netinet/ip_output.c
  user/piso/sys/netinet/libalias/alias_ftp.c
  user/piso/sys/netinet/libalias/alias_irc.c
  user/piso/sys/netinet/libalias/alias_nbt.c
  user/piso/sys/netinet/raw_ip.c
  user/piso/sys/netinet/tcp_input.c
  user/piso/sys/netinet/tcp_subr.c
  user/piso/sys/netinet/tcp_syncache.c
  user/piso/sys/netinet/tcp_timer.c
  user/piso/sys/netinet/tcp_var.h
  user/piso/sys/netinet/udp_usrreq.c
  user/piso/sys/netinet/udp_var.h
  user/piso/sys/netinet/vinet.h
  user/piso/sys/netinet6/in6.c
  user/piso/sys/netinet6/in6_gif.c
  user/piso/sys/netinet6/in6_ifattach.c
  user/piso/sys/netinet6/ip6protosw.h
  user/piso/sys/netinet6/raw_ip6.c
  user/piso/sys/netinet6/udp6_usrreq.c
  user/piso/sys/netipsec/xform_ipip.c
  user/piso/sys/nfsclient/nfs_vnops.c
  user/piso/sys/pc98/cbus/scterm-sck.c
  user/piso/sys/pc98/conf/GENERIC
  user/piso/sys/pci/if_rlreg.h
  user/piso/sys/powerpc/booke/locore.S
  user/piso/sys/powerpc/booke/machdep.c
  user/piso/sys/powerpc/booke/pmap.c
  user/piso/sys/powerpc/booke/trap_subr.S
  user/piso/sys/powerpc/conf/NOTES
  user/piso/sys/powerpc/include/pcpu.h
  user/piso/sys/powerpc/include/pmap.h
  user/piso/sys/powerpc/include/pte.h
  user/piso/sys/powerpc/include/tlb.h
  user/piso/sys/powerpc/powermac/ata_macio.c
  user/piso/sys/powerpc/powermac/grackle.c
  user/piso/sys/powerpc/powermac/gracklevar.h
  user/piso/sys/powerpc/powermac/macgpio.c
  user/piso/sys/powerpc/powermac/macio.c
  user/piso/sys/powerpc/powermac/uninorth.c
  user/piso/sys/powerpc/powermac/uninorthvar.h
  user/piso/sys/powerpc/powerpc/genassym.c
  user/piso/sys/security/audit/audit.h
  user/piso/sys/security/audit/audit_bsm.c
  user/piso/sys/security/audit/audit_bsm_token.c
  user/piso/sys/security/audit/audit_pipe.c
  user/piso/sys/security/mac/mac_audit.c
  user/piso/sys/security/mac/mac_framework.c
  user/piso/sys/security/mac/mac_inet6.c
  user/piso/sys/security/mac/mac_internal.h
  user/piso/sys/security/mac/mac_policy.h
  user/piso/sys/security/mac/mac_priv.c
  user/piso/sys/security/mac_biba/mac_biba.c
  user/piso/sys/security/mac_bsdextended/mac_bsdextended.c
  user/piso/sys/security/mac_ifoff/mac_ifoff.c
  user/piso/sys/security/mac_lomac/mac_lomac.c
  user/piso/sys/security/mac_mls/mac_mls.c
  user/piso/sys/security/mac_none/mac_none.c
  user/piso/sys/security/mac_partition/mac_partition.c
  user/piso/sys/security/mac_portacl/mac_portacl.c
  user/piso/sys/security/mac_seeotheruids/mac_seeotheruids.c
  user/piso/sys/security/mac_stub/mac_stub.c
  user/piso/sys/security/mac_test/mac_test.c
  user/piso/sys/sparc64/include/tlb.h
  user/piso/sys/sparc64/sparc64/machdep.c
  user/piso/sys/sparc64/sparc64/pmap.c
  user/piso/sys/sun4v/include/pcpu.h
  user/piso/sys/sys/copyright.h
  user/piso/sys/sys/elf64.h
  user/piso/sys/sys/elf_common.h
  user/piso/sys/sys/elf_generic.h
  user/piso/sys/sys/file.h
  user/piso/sys/sys/imgact_elf.h
  user/piso/sys/sys/jail.h
  user/piso/sys/sys/ktr.h
  user/piso/sys/sys/link_elf.h
  user/piso/sys/sys/lock.h
  user/piso/sys/sys/mbuf.h
  user/piso/sys/sys/param.h
  user/piso/sys/sys/pcpu.h
  user/piso/sys/sys/protosw.h
  user/piso/sys/sys/sched.h
  user/piso/sys/sys/soundcard.h
  user/piso/sys/sys/sysctl.h
  user/piso/sys/sys/vnode.h
  user/piso/sys/ufs/ffs/ffs_inode.c
  user/piso/sys/ufs/ffs/ffs_vfsops.c
  user/piso/sys/ufs/ffs/ffs_vnops.c
  user/piso/sys/ufs/ufs/ufs_dirhash.c
  user/piso/sys/ufs/ufs/ufs_extattr.c
  user/piso/sys/ufs/ufs/ufs_lookup.c
  user/piso/sys/ufs/ufs/ufs_vnops.c
  user/piso/sys/vm/uma.h
  user/piso/sys/vm/uma_core.c
  user/piso/sys/vm/uma_dbg.c
  user/piso/sys/vm/uma_int.h
  user/piso/sys/vm/vm_map.c
  user/piso/sys/vm/vm_map.h
  user/piso/sys/vm/vm_meter.c
  user/piso/sys/vm/vm_mmap.c
  user/piso/sys/vm/vm_page.c
  user/piso/sys/vm/vm_page.h
  user/piso/sys/xen/evtchn/evtchn.c
  user/piso/sys/xen/evtchn/evtchn_dev.c
  user/piso/sys/xen/features.c
  user/piso/sys/xen/gnttab.c
  user/piso/sys/xen/gnttab.h
  user/piso/sys/xen/xenbus/xenbus_client.c
  user/piso/sys/xen/xenbus/xenbus_comms.c
  user/piso/sys/xen/xenbus/xenbus_comms.h
  user/piso/sys/xen/xenbus/xenbus_dev.c
  user/piso/sys/xen/xenbus/xenbus_probe.c
  user/piso/sys/xen/xenbus/xenbus_probe_backend.c
  user/piso/sys/xen/xenbus/xenbus_xs.c
  user/piso/sys/xen/xenbus/xenbusvar.h
  user/piso/tools/regression/fstest/tests/conf
  user/piso/tools/regression/fstest/tests/misc.sh
  user/piso/tools/regression/usr.bin/jot/regress.sh
  user/piso/tools/sched/schedgraph.py
  user/piso/tools/tools/ath/Makefile
  user/piso/tools/tools/ath/Makefile.inc
  user/piso/tools/tools/ath/athdebug/athdebug.c
  user/piso/tools/tools/ath/athstats/Makefile
  user/piso/tools/tools/ath/athstats/athstats.c
  user/piso/tools/tools/ath/athstats/main.c
  user/piso/tools/tools/nanobsd/gateworks/Files/   (props changed)
  user/piso/tools/tools/nanobsd/gateworks/Files/root/   (props changed)
  user/piso/tools/tools/nanobsd/gateworks/cfg/   (props changed)
  user/piso/tools/tools/nanobsd/gateworks/cfg/ssh/   (props changed)
  user/piso/tools/tools/net80211/Makefile
  user/piso/tools/tools/usb/print-usb-if-vids.sh
  user/piso/usr.bin/csplit/csplit.1
  user/piso/usr.bin/csup/   (props changed)
  user/piso/usr.bin/csup/Makefile
  user/piso/usr.bin/fetch/fetch.c
  user/piso/usr.bin/fstat/zfs.c
  user/piso/usr.bin/gprof/gprof.c
  user/piso/usr.bin/mail/Makefile
  user/piso/usr.bin/make/Makefile
  user/piso/usr.bin/make/buf.c
  user/piso/usr.bin/make/for.c
  user/piso/usr.bin/make/globals.h
  user/piso/usr.bin/make/job.c
  user/piso/usr.bin/make/job.h
  user/piso/usr.bin/make/main.c
  user/piso/usr.bin/make/make.1
  user/piso/usr.bin/make/make.h
  user/piso/usr.bin/make/parse.c
  user/piso/usr.bin/make/suff.c
  user/piso/usr.bin/make/var.c
  user/piso/usr.bin/netstat/inet6.c
  user/piso/usr.bin/netstat/main.c
  user/piso/usr.bin/netstat/netstat.1
  user/piso/usr.bin/netstat/unix.c
  user/piso/usr.bin/procstat/procstat.c
  user/piso/usr.bin/procstat/procstat_args.c
  user/piso/usr.bin/procstat/procstat_basic.c
  user/piso/usr.bin/procstat/procstat_bin.c
  user/piso/usr.bin/procstat/procstat_cred.c
  user/piso/usr.bin/procstat/procstat_files.c
  user/piso/usr.bin/procstat/procstat_kstack.c
  user/piso/usr.bin/procstat/procstat_threads.c
  user/piso/usr.bin/procstat/procstat_vm.c
  user/piso/usr.bin/split/split.1
  user/piso/usr.bin/truss/truss.1
  user/piso/usr.sbin/auditd/Makefile
  user/piso/usr.sbin/boot0cfg/boot0cfg.8
  user/piso/usr.sbin/burncd/burncd.c
  user/piso/usr.sbin/cpucontrol/cpucontrol.8
  user/piso/usr.sbin/crunch/crunchgen/crunchgen.c
  user/piso/usr.sbin/fwcontrol/fwcontrol.c
  user/piso/usr.sbin/gssd/Makefile
  user/piso/usr.sbin/jail/jail.8
  user/piso/usr.sbin/kldxref/ef_i386.c
  user/piso/usr.sbin/kldxref/ef_obj.c
  user/piso/usr.sbin/kldxref/fileformat
  user/piso/usr.sbin/kldxref/kldxref.c
  user/piso/usr.sbin/makefs/ffs/ffs_bswap.c   (props changed)
  user/piso/usr.sbin/makefs/ffs/ffs_subr.c   (props changed)
  user/piso/usr.sbin/makefs/ffs/ufs_bswap.h   (props changed)
  user/piso/usr.sbin/makefs/getid.c   (props changed)
  user/piso/usr.sbin/mergemaster/mergemaster.8
  user/piso/usr.sbin/mergemaster/mergemaster.sh
  user/piso/usr.sbin/mld6query/mld6query.8
  user/piso/usr.sbin/pkg_install/add/pkg_add.1
  user/piso/usr.sbin/pkg_install/lib/lib.h
  user/piso/usr.sbin/pkg_install/lib/plist.c
  user/piso/usr.sbin/rrenumd/rrenumd.8
  user/piso/usr.sbin/rtadvd/rtadvd.8
  user/piso/usr.sbin/rtsold/rtsold.8
  user/piso/usr.sbin/sade/disks.c
  user/piso/usr.sbin/sysinstall/devices.c
  user/piso/usr.sbin/sysinstall/disks.c
  user/piso/usr.sbin/sysinstall/menus.c
  user/piso/usr.sbin/sysinstall/sysinstall.8
  user/piso/usr.sbin/traceroute6/traceroute6.8
  user/piso/usr.sbin/usbconfig/usbconfig.c
  user/piso/usr.sbin/usbdevs/usbdevs.c
  user/piso/usr.sbin/wlandebug/wlandebug.c

Modified: user/piso/COPYRIGHT
==============================================================================
--- user/piso/COPYRIGHT	Mon Feb  2 22:06:20 2009	(r188033)
+++ user/piso/COPYRIGHT	Mon Feb  2 22:13:32 2009	(r188034)
@@ -4,7 +4,7 @@
 The compilation of software known as FreeBSD is distributed under the
 following terms:
 
-Copyright (C) 1992-2008 The FreeBSD Project. All rights reserved.
+Copyright (c) 1992-2009 The FreeBSD Project. All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions

Modified: user/piso/Makefile.inc1
==============================================================================
--- user/piso/Makefile.inc1	Mon Feb  2 22:06:20 2009	(r188033)
+++ user/piso/Makefile.inc1	Mon Feb  2 22:13:32 2009	(r188034)
@@ -5,6 +5,7 @@
 #	-DNO_CLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir
 #	-DNO_CLEAN do not clean at all
 #	-DNO_SHARE do not go into share subdir
+#	-DKERNFAST define NO_KERNELCONFIG, NO_KERNELCLEAN and NO_KERNELCONFIG
 #	-DNO_KERNELCONFIG do not run config in ${MAKE} buildkernel
 #	-DNO_KERNELCLEAN do not run ${MAKE} clean in ${MAKE} buildkernel
 #	-DNO_KERNELDEPEND do not run ${MAKE} depend in ${MAKE} buildkernel
@@ -697,6 +698,15 @@ distrib-dirs distribution:
 # be set to cross-build, we have to make sure TARGET is set
 # properly.
 
+.if defined(KERNFAST)
+NO_KERNELCLEAN=	t
+NO_KERNELCONFIG=	t
+NO_KERNELDEPEND=	t
+# Shortcut for KERNCONF=Blah -DKERNFAST is now KERNFAST=Blah
+.if !defined(KERNCONF) && ${KERNFAST} != "1"
+KERNCONF=${KERNFAST}
+.endif
+.endif
 .if !defined(KERNCONF) && defined(KERNEL)
 KERNCONF=	${KERNEL}
 KERNWARN=

Modified: user/piso/ObsoleteFiles.inc
==============================================================================
--- user/piso/ObsoleteFiles.inc	Mon Feb  2 22:06:20 2009	(r188033)
+++ user/piso/ObsoleteFiles.inc	Mon Feb  2 22:13:32 2009	(r188034)
@@ -14,6 +14,8 @@
 # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last.
 #
 
+# 20081223: bind 9.4.3 import, nsupdate.8 moved to nsupdate.1
+OLD_FILES+=usr/share/man/man8/nsupdate.8.gz
 # 20081223: ipprotosw.h removed
 OLD_FILES+=usr/include/netinet/ipprotosw.h
 # 20081123: vfs_mountedon.9 removed

Modified: user/piso/UPDATING
==============================================================================
--- user/piso/UPDATING	Mon Feb  2 22:06:20 2009	(r188033)
+++ user/piso/UPDATING	Mon Feb  2 22:13:32 2009	(r188034)
@@ -22,6 +22,20 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8.
 	to maximize performance.  (To disable malloc debugging, run
 	ln -s aj /etc/malloc.conf.)
 
+20090119:
+	NTFS has been removed from GENERIC kernel on amd64 to match
+	GENERIC on i386. Should not cause any issues since mount_ntfs(8)
+	will load ntfs.ko module automatically when NTFS support is
+	actually needed, unless ntfs.ko is not installed or security
+	level prohibits loading kernel modules. If either is the case,
+	"options NTFS" has to be added into kernel config.
+
+20090115:
+	TCP Appropriate Byte Counting (RFC 3465) support added to kernel.
+	New field in struct tcpcb breaks ABI, so bump __FreeBSD_version to
+	800061. User space tools that rely on the size of struct tcpcb in
+	tcp_var.h (e.g. sockstat) need to be recompiled.
+
 20081225:
 	ng_tty(4) module updated to match the new TTY subsystem.
 	Due to API change, user-level applications must be updated.

Modified: user/piso/bin/chmod/chmod.1
==============================================================================
--- user/piso/bin/chmod/chmod.1	Mon Feb  2 22:06:20 2009	(r188033)
+++ user/piso/bin/chmod/chmod.1	Mon Feb  2 22:13:32 2009	(r188034)
@@ -32,7 +32,7 @@
 .\"	@(#)chmod.1	8.4 (Berkeley) 3/31/94
 .\" $FreeBSD$
 .\"
-.Dd December 22, 2006
+.Dd January 23, 2009
 .Dt CHMOD 1
 .Os
 .Sh NAME
@@ -281,6 +281,10 @@ Operations upon the other permissions on
 ``o'' by itself), in combination with the
 .Ar perm
 symbols ``s'' or ``t'', are ignored.
+.Pp
+The ``w'' permission on directories will permit file creation, relocation,
+and copy into that directory.
+Files created within the directory itself will inherit its group ID.
 .Sh EXAMPLES
 .Bl -tag -width "u=rwx,go=u-w" -compact
 .It Li 644
@@ -343,4 +347,5 @@ command appeared in
 .Sh BUGS
 There is no
 .Ar perm
-option for the naughty bits.
+option for the naughty bits which are ``S'' and
+``T'' respectively.

Modified: user/piso/bin/dd/dd.1
==============================================================================
--- user/piso/bin/dd/dd.1	Mon Feb  2 22:06:20 2009	(r188033)
+++ user/piso/bin/dd/dd.1	Mon Feb  2 22:13:32 2009	(r188034)
@@ -392,6 +392,11 @@ Remove parity bit from a file:
 Check for (even) parity errors on a file:
 .Pp
 .Dl "dd if=file conv=pareven | cmp -x - file"
+.Pp
+To create an image of a Mode-1 CD-ROM, which is a commonly used format
+for data CD-ROM disks, use a block size of 2048 bytes:
+.Pp
+.Dl "dd if=/dev/acd0 of=filename.iso bs=2048"
 .Sh SEE ALSO
 .Xr cp 1 ,
 .Xr mt 1 ,

Modified: user/piso/bin/kenv/kenv.1
==============================================================================
--- user/piso/bin/kenv/kenv.1	Mon Feb  2 22:06:20 2009	(r188033)
+++ user/piso/bin/kenv/kenv.1	Mon Feb  2 22:13:32 2009	(r188034)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd September 13, 2005
+.Dd January 13, 2009
 .Dt KENV 1
 .Os
 .Sh NAME
@@ -67,8 +67,28 @@ If the
 .Fl q
 option is set, warnings normally printed as a result of being unable to
 perform the requested operation will be suppressed.
+.Pp
+Variables can be added to the kernel environment using the
+.Xr /boot/loader.conf
+file, or also statically compiled into the kernel using the statement
+.Pp
+.Dl Ic env Ar filename
+.Pp
+in the kernel config file.
+The file can contain lines of the form
+.Pp
+.Dl name = "value"  # this is a comment
+.Pp
+where whitespace around name and '=', and
+everything after a '#' character, are ignored.  Almost any printable
+character except '=' is acceptable as part of a name.  Quotes
+are optional and necessary only if the value contains
+whitespace.
+.Pp
 .Sh SEE ALSO
 .Xr kenv 2 ,
+.Xr config 5 ,
+.Xr loader.conf 5 ,
 .Xr loader 8
 .Sh HISTORY
 The

Modified: user/piso/bin/ln/ln.1
==============================================================================
--- user/piso/bin/ln/ln.1	Mon Feb  2 22:06:20 2009	(r188033)
+++ user/piso/bin/ln/ln.1	Mon Feb  2 22:13:32 2009	(r188034)
@@ -38,7 +38,7 @@
 .Sh NAME
 .Nm ln ,
 .Nm link
-.Nd make links
+.Nd link files
 .Sh SYNOPSIS
 .Nm
 .Op Fl s Op Fl F
@@ -57,8 +57,13 @@
 .Sh DESCRIPTION
 The
 .Nm
-utility creates a new directory entry (linked file) which has the
-same modes as the original file.
+utility creates a new directory entry (linked file) for the file name
+specified by
+.Ar target_file .
+The
+.Ar target_file
+will be created with the same file modes as the
+.Ar source_file .
 It is useful for maintaining multiple copies of a file in many places
 at once without using up storage for the
 .Dq copies ;
@@ -148,7 +153,7 @@ links.
 A hard link to a file is indistinguishable from the original directory entry;
 any changes to a file are effectively independent of the name used to reference
 the file.
-Hard links may not normally refer to directories and may not span file systems.
+Directories may not be hardlinked, and hard links may not span file systems.
 .Pp
 A symbolic link contains the name of the file to
 which it is linked.

Modified: user/piso/bin/test/test.1
==============================================================================
--- user/piso/bin/test/test.1	Mon Feb  2 22:06:20 2009	(r188033)
+++ user/piso/bin/test/test.1	Mon Feb  2 22:13:32 2009	(r188034)
@@ -310,7 +310,7 @@ are evaluated consistently according to 
 standards document.
 All other cases are subject to the ambiguity in the
 command semantics.
-.Sh RETURN VALUES
+.Sh EXIT STATUS
 The
 .Nm
 utility exits with one of the following values:

Modified: user/piso/cddl/contrib/opensolaris/cmd/zinject/zinject.c
==============================================================================
--- user/piso/cddl/contrib/opensolaris/cmd/zinject/zinject.c	Mon Feb  2 22:06:20 2009	(r188033)
+++ user/piso/cddl/contrib/opensolaris/cmd/zinject/zinject.c	Mon Feb  2 22:13:32 2009	(r188034)
@@ -146,6 +146,7 @@
 #include <unistd.h>
 
 #include <sys/fs/zfs.h>
+#include <sys/param.h>
 #include <sys/mount.h>
 
 #include <libzfs.h>

Modified: user/piso/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c
==============================================================================
--- user/piso/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c	Mon Feb  2 22:06:20 2009	(r188033)
+++ user/piso/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c	Mon Feb  2 22:13:32 2009	(r188034)
@@ -1739,15 +1739,11 @@ dtrace_program_link(dtrace_hdl_t *dtp, d
 		 * Arches which are 32-bit only just use the normal
 		 * library path.
 		 */
-#if defined(__i386__)
-		int use_32 = 1;  /* use /usr/lib/... -sson */
-#else
 		int use_32 = 0;
 #endif
-#endif
 
 		(void) snprintf(drti, sizeof (drti), "/usr/lib%s/dtrace/drti.o",
-		    use_32 ? "":"32");
+		    use_32 ? "32":"");
 
 		len = snprintf(&tmp, 1, fmt, dtp->dt_ld_path, file, tfile,
 		    drti) + 1;

Modified: user/piso/contrib/bind9/CHANGES
==============================================================================
--- user/piso/contrib/bind9/CHANGES	Mon Feb  2 22:06:20 2009	(r188033)
+++ user/piso/contrib/bind9/CHANGES	Mon Feb  2 22:13:32 2009	(r188034)
@@ -1,3 +1,11 @@
+	--- 9.4.3-P1 released ---
+
+2522.	[security]	Handle -1 from DSA_do_verify().
+
+2498.	[bug]		Removed a bogus function argument used with
+			ISC_SOCKET_USE_POLLWATCH: it could cause compiler
+			warning or crash named with the debug 1 level
+			of logging. [RT #18917]
 
 	--- 9.4.3 released ---
 

Modified: user/piso/contrib/bind9/lib/dns/api
==============================================================================
--- user/piso/contrib/bind9/lib/dns/api	Mon Feb  2 22:06:20 2009	(r188033)
+++ user/piso/contrib/bind9/lib/dns/api	Mon Feb  2 22:13:32 2009	(r188034)
@@ -1,3 +1,3 @@
 LIBINTERFACE = 36
-LIBREVISION = 1
+LIBREVISION = 2
 LIBAGE = 0

Modified: user/piso/contrib/bind9/lib/dns/openssldsa_link.c
==============================================================================
--- user/piso/contrib/bind9/lib/dns/openssldsa_link.c	Mon Feb  2 22:06:20 2009	(r188033)
+++ user/piso/contrib/bind9/lib/dns/openssldsa_link.c	Mon Feb  2 22:13:32 2009	(r188034)
@@ -16,7 +16,7 @@
  * IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: openssldsa_link.c,v 1.1.6.9 2007/08/28 07:20:04 tbox Exp $ */
+/* $Id: openssldsa_link.c,v 1.1.6.9.28.1 2008/12/24 00:21:22 marka Exp $ */
 
 #ifdef OPENSSL
 
@@ -133,7 +133,7 @@ openssldsa_verify(dst_context_t *dctx, c
 
 	status = DSA_do_verify(digest, ISC_SHA1_DIGESTLENGTH, dsasig, dsa);
 	DSA_SIG_free(dsasig);
-	if (status == 0)
+	if (status != 1)
 		return (dst__openssl_toresult(DST_R_VERIFYFAILURE));
 
 	return (ISC_R_SUCCESS);

Modified: user/piso/contrib/bind9/lib/dns/opensslrsa_link.c
==============================================================================
--- user/piso/contrib/bind9/lib/dns/opensslrsa_link.c	Mon Feb  2 22:06:20 2009	(r188033)
+++ user/piso/contrib/bind9/lib/dns/opensslrsa_link.c	Mon Feb  2 22:13:32 2009	(r188034)
@@ -17,7 +17,7 @@
 
 /*
  * Principal Author: Brian Wellington
- * $Id: opensslrsa_link.c,v 1.1.6.11 2006/11/07 21:28:49 marka Exp $
+ * $Id: opensslrsa_link.c,v 1.1.6.11.58.1 2008/12/24 00:21:22 marka Exp $
  */
 #ifdef OPENSSL
 
@@ -246,7 +246,7 @@ opensslrsa_verify(dst_context_t *dctx, c
 
 	status = RSA_verify(type, digest, digestlen, sig->base,
 			    RSA_size(rsa), rsa);
-	if (status == 0)
+	if (status != 1)
 		return (dst__openssl_toresult(DST_R_VERIFYFAILURE));
 
 	return (ISC_R_SUCCESS);

Modified: user/piso/contrib/bind9/lib/isc/unix/socket.c
==============================================================================
--- user/piso/contrib/bind9/lib/isc/unix/socket.c	Mon Feb  2 22:06:20 2009	(r188033)
+++ user/piso/contrib/bind9/lib/isc/unix/socket.c	Mon Feb  2 22:13:32 2009	(r188034)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: socket.c,v 1.237.18.56 2008/11/12 03:58:36 marka Exp $ */
+/* $Id: socket.c,v 1.237.18.56.2.1 2008/12/23 00:14:34 marka Exp $ */
 
 /*! \file */
 
@@ -501,7 +501,7 @@ FIX_IPV6_RECVPKTINFO(isc_socket_t *sock)
 
 	if (setsockopt(sock->fd, IPPROTO_IPV6, IPV6_RECVPKTINFO,
 		       (void *)&on, sizeof(on)) < 0) {
-	
+
 		UNEXPECTED_ERROR(__FILE__, __LINE__,
 				 "setsockopt(%d, IPV6_RECVPKTINFO) "
 				 "%s: %s", sock->fd,
@@ -3163,7 +3163,6 @@ watcher(void *uap) {
 						    ISC_LOGCATEGORY_GENERAL,
 						    ISC_LOGMODULE_SOCKET,
 						    ISC_LOG_DEBUG(1),
-						    ISC_LOG_INFO,
 						    "unexpected POLL timeout");
 				}
 				pollstate = poll_active;
@@ -4902,7 +4901,7 @@ isc_socket_ipv6only(isc_socket_t *sock, 
 		if (setsockopt(sock->fd, IPPROTO_IPV6, IPV6_V6ONLY,
 			       (void *)&onoff, sizeof(int)) < 0) {
 			char strbuf[ISC_STRERRORSIZE];
-	
+
 			UNEXPECTED_ERROR(__FILE__, __LINE__,
 					 "setsockopt(%d, IPV6_V6ONLY) "
 					 "%s: %s", sock->fd,

Modified: user/piso/contrib/bind9/version
==============================================================================
--- user/piso/contrib/bind9/version	Mon Feb  2 22:06:20 2009	(r188033)
+++ user/piso/contrib/bind9/version	Mon Feb  2 22:13:32 2009	(r188034)
@@ -1,4 +1,4 @@
-# $Id: version,v 1.29.134.23 2008/11/12 04:17:12 marka Exp $
+# $Id: version,v 1.29.134.23.2.1 2008/12/24 00:21:22 marka Exp $
 #
 # This file must follow /bin/sh rules.  It is imported directly via
 # configure.
@@ -6,5 +6,5 @@
 MAJORVER=9
 MINORVER=4
 PATCHVER=3
-RELEASETYPE=
-RELEASEVER=
+RELEASETYPE=-P
+RELEASEVER=1

Modified: user/piso/contrib/csup/GNUmakefile
==============================================================================
--- user/piso/contrib/csup/GNUmakefile	Mon Feb  2 22:06:20 2009	(r188033)
+++ user/piso/contrib/csup/GNUmakefile	Mon Feb  2 22:13:32 2009	(r188034)
@@ -12,8 +12,9 @@ GROUP?=	0
 UNAME=	$(shell uname -s)
 
 SRCS=	attrstack.c config.c detailer.c diff.c fattr.c fixups.c fnmatch.c \
-	globtree.c idcache.c keyword.c lister.c main.c misc.c mux.c pathcomp.c \
-	parse.c proto.c status.c stream.c threads.c token.c updater.c
+	globtree.c idcache.c keyword.c lex.rcs.c lister.c main.c misc.c mux.c \
+	pathcomp.c parse.c proto.c rcsfile.c rcsparse.c rsyncfile.c status.c \
+	stream.c threads.c token.c updater.c
 OBJS=	$(SRCS:.c=.o)
 
 WARNS=	-Wall -W -Wno-unused-parameter -Wmissing-prototypes -Wpointer-arith \

Modified: user/piso/contrib/csup/Makefile
==============================================================================
--- user/piso/contrib/csup/Makefile	Mon Feb  2 22:06:20 2009	(r188033)
+++ user/piso/contrib/csup/Makefile	Mon Feb  2 22:13:32 2009	(r188034)
@@ -9,10 +9,11 @@ UNAME!=		/usr/bin/uname -s
 PROG=	csup
 SRCS=	attrstack.c config.c detailer.c diff.c fattr.c fixups.c fnmatch.c \
 	globtree.c idcache.c keyword.c lister.c main.c misc.c mux.c parse.y \
-	pathcomp.c proto.c status.c stream.c threads.c token.l updater.c
+	pathcomp.c proto.c status.c stream.c threads.c token.l updater.c \
+	rcsfile.c rcsparse.c lex.rcs.c rsyncfile.c
 
 CFLAGS+=	-I. -I${.CURDIR} -g -pthread -DHAVE_FFLAGS -DNDEBUG
-WARNS?=		6
+WARNS?=		1
 
 # A bit of tweaking is needed to get this Makefile working
 # with the bsd.prog.mk of all the *BSD OSes...

Modified: user/piso/contrib/csup/TODO
==============================================================================
--- user/piso/contrib/csup/TODO	Mon Feb  2 22:06:20 2009	(r188033)
+++ user/piso/contrib/csup/TODO	Mon Feb  2 22:13:32 2009	(r188034)
@@ -28,4 +28,3 @@ MISSING FEATURES:
   checkout files (files in CVS/ subdirectores), a command line override
   to only update a specific collection and a third verbosity level to
   display commit log messages.
-- Add support for CVS mode (maybe?).

Modified: user/piso/contrib/csup/config.c
==============================================================================
--- user/piso/contrib/csup/config.c	Mon Feb  2 22:06:20 2009	(r188033)
+++ user/piso/contrib/csup/config.c	Mon Feb  2 22:13:32 2009	(r188034)
@@ -133,7 +133,6 @@ config_init(const char *file, struct col
 			coll->co_options &= ~CO_CHECKRCS;
 		/* In recent versions, we always try to set the file modes. */
 		coll->co_options |= CO_SETMODE;
-		/* XXX We don't support the rsync updating algorithm yet. */
 		coll->co_options |= CO_NORSYNC;
 		error = config_parse_refusefiles(coll);
 		if (error)
@@ -444,10 +443,6 @@ coll_add(char *name)
 		    "\"%s\"\n", cur_coll->co_name);
 		exit(1);
 	}
-	if (!(cur_coll->co_options & CO_CHECKOUTMODE)) {
-		lprintf(-1, "Client only supports checkout mode\n");
-		exit(1);
-	}
 	if (!STAILQ_EMPTY(&colls)) {
 		coll = STAILQ_LAST(&colls, coll, co_next);
 		if (strcmp(coll->co_host, cur_coll->co_host) != 0) {

Modified: user/piso/contrib/csup/csup.1
==============================================================================
--- user/piso/contrib/csup/csup.1	Mon Feb  2 22:06:20 2009	(r188033)
+++ user/piso/contrib/csup/csup.1	Mon Feb  2 22:13:32 2009	(r188034)
@@ -442,8 +442,6 @@ They are called
 mode and
 .Em checkout
 mode.
-.Nm
-only supports the checkout mode for now.
 .Pp
 In CVS mode, the client receives copies of the actual RCS files making
 up the master CVS repository.  CVS mode is the default mode of operation.

Modified: user/piso/contrib/csup/detailer.c
==============================================================================
--- user/piso/contrib/csup/detailer.c	Mon Feb  2 22:06:20 2009	(r188033)
+++ user/piso/contrib/csup/detailer.c	Mon Feb  2 22:13:32 2009	(r188034)
@@ -30,13 +30,21 @@
 #include <errno.h>
 #include <stdlib.h>
 #include <string.h>
+#include <stdio.h>
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
 
 #include "config.h"
 #include "detailer.h"
 #include "fixups.h"
+#include "globtree.h"
 #include "misc.h"
 #include "mux.h"
 #include "proto.h"
+#include "rcsfile.h"
+#include "rsyncfile.h"
 #include "status.h"
 #include "stream.h"
 
@@ -56,8 +64,16 @@ struct detailer {
 static int	detailer_batch(struct detailer *);
 static int	detailer_coll(struct detailer *, struct coll *,
 		    struct status *);
-static int	detailer_dofile(struct detailer *, struct coll *,
+static int	detailer_dofile_co(struct detailer *, struct coll *,
 		    struct status *, char *);
+static int	detailer_dofile_rcs(struct detailer *, struct coll *, 
+		    char *, char *);
+static int	detailer_dofile_regular(struct detailer *, char *, char *);
+static int	detailer_dofile_rsync(struct detailer *, char *, char *);
+static int	detailer_checkrcsattr(struct detailer *, struct coll *, char *,
+		    struct fattr *, int);
+int		detailer_send_details(struct detailer *, struct coll *, char *,
+		    char *, struct fattr *);
 
 void *
 detailer(void *arg)
@@ -186,8 +202,13 @@ detailer_batch(struct detailer *d)
 			}
 			if (fixup->f_coll != coll)
 				break;
-			error = proto_printf(wr, "Y %s %s %s\n", fixup->f_name,
-			    coll->co_tag, coll->co_date);
+			if (coll->co_options & CO_CHECKOUTMODE)
+				error = proto_printf(wr, "Y %s %s %s\n",
+				    fixup->f_name, coll->co_tag, coll->co_date);
+			else {
+				error = proto_printf(wr, "A %s\n",
+				    fixup->f_name);
+			}
 			if (error)
 				return (DETAILER_ERR_WRITE);
 			fixup = NULL;
@@ -208,12 +229,14 @@ detailer_batch(struct detailer *d)
 static int
 detailer_coll(struct detailer *d, struct coll *coll, struct status *st)
 {
+	struct fattr *rcsattr;
 	struct stream *rd, *wr;
-	char *cmd, *file, *line, *msg;
-	int error;
+	char *attr, *cmd, *file, *line, *msg, *path, *target;
+	int error, attic;
 
 	rd = d->rd;
 	wr = d->wr;
+	attic = 0;
 	line = stream_getln(rd, NULL);
 	if (line == NULL)
 		return (DETAILER_ERR_READ);
@@ -226,17 +249,84 @@ detailer_coll(struct detailer *d, struct
 			/* Delete file. */
 			file = proto_get_ascii(&line);
 			if (file == NULL || line != NULL)
-				return (DETAILER_ERR_PROTO);
+				return (DETAILER_ERR_PROTO); 
 			error = proto_printf(wr, "D %s\n", file);
 			if (error)
 				return (DETAILER_ERR_WRITE);
 			break;
+		case 'I':
+		case 'i':
+		case 'j':
+			/* Directory operations. */
+			file = proto_get_ascii(&line);
+			if (file == NULL || line != NULL)
+				return (DETAILER_ERR_PROTO);
+			error = proto_printf(wr, "%s %s\n", cmd, file);
+			if (error)
+				return (DETAILER_ERR_WRITE);
+			break;
+		case 'J':
+			/* Set directory attributes. */
+			file = proto_get_ascii(&line);
+			attr = proto_get_ascii(&line);
+			if (file == NULL || line != NULL || attr == NULL)
+				return (DETAILER_ERR_PROTO);
+			error = proto_printf(wr, "%s %s %s\n", cmd, file, attr);
+			if (error)
+				return (DETAILER_ERR_WRITE);
+			break;
+		case 'H':
+		case 'h':
+			/* Create a hard link. */
+			file = proto_get_ascii(&line);
+			target = proto_get_ascii(&line);
+			if (file == NULL || target == NULL)
+				return (DETAILER_ERR_PROTO);
+			error = proto_printf(wr, "%s %s %s\n", cmd, file,
+			    target);
+			break;
+		case 't':
+			file = proto_get_ascii(&line);
+			attr = proto_get_ascii(&line);
+			if (file == NULL || attr == NULL || line != NULL) {
+				return (DETAILER_ERR_PROTO);
+			}
+			rcsattr = fattr_decode(attr);
+			if (rcsattr == NULL) {
+				return (DETAILER_ERR_PROTO);
+			}
+			error = detailer_checkrcsattr(d, coll, file, rcsattr,
+			    1);
+			break;
+
+		case 'T':
+			file = proto_get_ascii(&line);
+			attr = proto_get_ascii(&line);
+			if (file == NULL || attr == NULL || line != NULL)
+				return (DETAILER_ERR_PROTO);
+			rcsattr = fattr_decode(attr);
+			if (rcsattr == NULL)
+				return (DETAILER_ERR_PROTO);
+			error = detailer_checkrcsattr(d, coll, file, rcsattr,
+			    0);
+			break;
+
 		case 'U':
 			/* Add or update file. */
 			file = proto_get_ascii(&line);
 			if (file == NULL || line != NULL)
 				return (DETAILER_ERR_PROTO);
-			error = detailer_dofile(d, coll, st, file);
+			if (coll->co_options & CO_CHECKOUTMODE) {
+				error = detailer_dofile_co(d, coll, st, file);
+			} else {
+				path = cvspath(coll->co_prefix, file, 0);
+				rcsattr = fattr_frompath(path, FATTR_NOFOLLOW);
+				error = detailer_send_details(d, coll, file,
+				    path, rcsattr);
+				if (rcsattr != NULL)
+					fattr_free(rcsattr);
+				free(path);
+			}
 			if (error)
 				return (error);
 			break;
@@ -261,14 +351,110 @@ detailer_coll(struct detailer *d, struct
 	return (0);
 }
 
+/*
+ * Tell the server to update a regular file.
+ */
 static int
-detailer_dofile(struct detailer *d, struct coll *coll, struct status *st,
-    char *file)
+detailer_dofile_regular(struct detailer *d, char *name, char *path)
 {
+	struct stream *wr;
+	struct stat st;
 	char md5[MD5_DIGEST_SIZE];
+	int error;
+	
+	wr = d->wr;
+	error = stat(path, &st);
+	/* If we don't have it or it's unaccessible, we want it again. */
+	if (error) {
+		proto_printf(wr, "A %s\n", name);
+		return (0);
+	}
+
+	/* If not, we want the file to be updated. */
+	error = MD5_File(path, md5);
+	if (error) {
+		lprintf(-1, "Error reading \"%s\"\n", name);
+		return (error);
+	}
+	error = proto_printf(wr, "R %s %O %s\n", name, st.st_size, md5);
+	if (error)
+		return (DETAILER_ERR_WRITE);
+	return (0);
+}
+
+/*
+ * Tell the server to update a file with the rsync algorithm.
+ */
+static int
+detailer_dofile_rsync(struct detailer *d, char *name, char *path)
+{
+	struct stream *wr;
+	struct rsyncfile *rf;
+
+	wr = d->wr;
+	rf = rsync_open(path, 0, 1);
+	if (rf == NULL) {
+		/* Fallback if we fail in opening it. */
+		proto_printf(wr, "A %s\n", name);
+		return (0);
+	}
+	proto_printf(wr, "r %s %z %z\n", name, rsync_filesize(rf),
+	    rsync_blocksize(rf));
+	/* Detail the blocks. */
+	while (rsync_nextblock(rf) != 0)
+		proto_printf(wr, "%s %s\n", rsync_rsum(rf), rsync_blockmd5(rf));
+	proto_printf(wr, ".\n");
+	rsync_close(rf);
+	return (0);
+}
+
+/*
+ * Tell the server to update an RCS file that we have, or send it if we don't.
+ */
+static int
+detailer_dofile_rcs(struct detailer *d, struct coll *coll, char *name,
+    char *path)
+{
+	struct stream *wr;
+	struct fattr *fa;
+	struct rcsfile *rf;
+	int error;
+
+	wr = d->wr;
+	path = atticpath(coll->co_prefix, name);
+	fa = fattr_frompath(path, FATTR_NOFOLLOW);
+	if (fa == NULL) {
+		/* We don't have it, so send request to get it. */
+		error = proto_printf(wr, "A %s\n", name);
+		if (error)
+			return (DETAILER_ERR_WRITE);
+		free(path);
+		return (0);
+	}
+
+	rf = rcsfile_frompath(path, name, coll->co_cvsroot, coll->co_tag, 1);
+	free(path);
+	if (rf == NULL) {
+		error = proto_printf(wr, "A %s\n", name);
+		if (error)
+			return (DETAILER_ERR_WRITE);
+		return (0);
+	}
+	/* Tell to update the RCS file. The client version details follow. */
+	rcsfile_send_details(rf, wr);
+	rcsfile_free(rf);
+	fattr_free(fa);
+	return (0);
+}
+
+static int
+detailer_dofile_co(struct detailer *d, struct coll *coll, struct status *st,
+    char *file)
+{
 	struct stream *wr;
 	struct fattr *fa;
 	struct statusrec *sr;
+	char md5[MD5_DIGEST_SIZE];
 	char *path;
 	int error, ret;
 
@@ -337,3 +523,81 @@ detailer_dofile(struct detailer *d, stru
 		return (DETAILER_ERR_WRITE);
 	return (0);
 }
+
+int
+detailer_checkrcsattr(struct detailer *d, struct coll *coll, char *name,
+    struct fattr *server_attr, int attic)
+{
+	struct fattr *client_attr;
+	char *attr, *path;
+	int error;
+
+	/*
+	 * I don't think we can use the status file, since it only records file
+	 * attributes in cvsmode.
+	 */
+	client_attr = NULL;
+	path = cvspath(coll->co_prefix, name, attic);
+	if (path == NULL) {
+		return (DETAILER_ERR_PROTO);
+	}
+
+	if (access(path, F_OK) == 0 && 
+	    ((client_attr = fattr_frompath(path, FATTR_NOFOLLOW)) != NULL) &&
+	    fattr_equal(client_attr, server_attr)) {
+		attr = fattr_encode(client_attr, NULL, 0);
+		if (attic) {
+			error = proto_printf(d->wr, "l %s %s\n", name, attr);
+		} else {
+			error = proto_printf(d->wr, "L %s %s\n", name, attr);
+		}
+		free(attr);
+		free(path);
+		fattr_free(client_attr);
+		if (error)
+			return (DETAILER_ERR_WRITE);
+		return (0);
+	}
+	/* We don't have it, so tell the server to send it. */
+	error = detailer_send_details(d, coll, name, path, client_attr);
+	fattr_free(client_attr);
+	free(path);
+	return (error);
+}
+
+int
+detailer_send_details(struct detailer *d, struct coll *coll, char *name,
+    char *path, struct fattr *fa)
+{
+	int error;
+	size_t len;
+
+       /*
+        * Try to check if the file exists either live or dead to see if we can
+        * edit it and put it live or dead, rather than receiving the entire
+        * file.
+	*/
+	if (fa == NULL) {
+		path = atticpath(coll->co_prefix, name); 
+		fa = fattr_frompath(path, FATTR_NOFOLLOW);
+	}
+	if (fa == NULL) {
+		error = proto_printf(d->wr, "A %s\n", name);
+		if (error)
+			return (DETAILER_ERR_WRITE);
+	} else if (fattr_type(fa) == FT_FILE) {
+		if (isrcs(name, &len) && !(coll->co_options & CO_NORCS)) {
+			detailer_dofile_rcs(d, coll, name, path);
+		} else if (!(coll->co_options & CO_NORSYNC) &&
+		    !globtree_test(coll->co_norsync, name)) {
+			detailer_dofile_rsync(d, name, path);
+		} else {
+			detailer_dofile_regular(d, name, path);
+		}
+	} else {
+		error = proto_printf(d->wr, "N %s\n", name);
+		if (error)
+			return (DETAILER_ERR_WRITE);
+	}
+	return (0);
+}

Modified: user/piso/contrib/csup/diff.c
==============================================================================
--- user/piso/contrib/csup/diff.c	Mon Feb  2 22:06:20 2009	(r188033)
+++ user/piso/contrib/csup/diff.c	Mon Feb  2 22:13:32 2009	(r188034)
@@ -26,9 +26,12 @@
  * $FreeBSD$
  */
 
+#include <sys/limits.h>
+
 #include <assert.h>
 #include <err.h>
 #include <errno.h>
+#include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
@@ -36,15 +39,20 @@
 #include "keyword.h"
 #include "misc.h"
 #include "stream.h"
+#include "queue.h"
 
 typedef long lineno_t;
 
 #define	EC_ADD	0
 #define	EC_DEL	1
+#define	MAXKEY	LONG_MAX
 
 /* Editing command and state. */
 struct editcmd {
 	int cmd;
+	long key;
+	int havetext;
+	int offset;
 	lineno_t where;
 	lineno_t count;
 	lineno_t lasta;
@@ -55,20 +63,28 @@ struct editcmd {
 	struct diffinfo *di;
 	struct stream *orig;
 	struct stream *dest;
+	LIST_ENTRY(editcmd) next;
+};
+
+struct diffstart {
+	LIST_HEAD(, editcmd) dhead;
 };
 
 static int	diff_geteditcmd(struct editcmd *, char *);
 static int	diff_copyln(struct editcmd *, lineno_t);
+static int	diff_ignoreln(struct editcmd *, lineno_t);
 static void	diff_write(struct editcmd *, void *, size_t);
+static int	diff_insert_edit(struct diffstart *, struct editcmd *);
+static void	diff_free(struct diffstart *);
 
 int
 diff_apply(struct stream *rd, struct stream *orig, struct stream *dest,
-    struct keyword *keyword, struct diffinfo *di)
+    struct keyword *keyword, struct diffinfo *di, int comode)
 {
 	struct editcmd ec;
 	lineno_t i;
-	char *line;
 	size_t size;
+	char *line;
 	int empty, error, noeol;
 
 	memset(&ec, 0, sizeof(ec));
@@ -104,7 +120,7 @@ diff_apply(struct stream *rd, struct str
 				line = stream_getln(rd, &size);
 				if (line == NULL)
 					return (-1);
-				if (line[0] == '.') {
+				if (comode && line[0] == '.') {
 					line++;
 					size--;
 				}
@@ -124,10 +140,10 @@ diff_apply(struct stream *rd, struct str
 		}
 		line = stream_getln(rd, NULL);
 	}
-	if (line == NULL)
+	if (comode && line == NULL)
 		return (-1);
 	/* If we got ".+", there's no ending newline. */
-	if (strcmp(line, ".+") == 0 && !empty)
+	if (comode && strcmp(line, ".+") == 0 && !empty)
 		noeol = 1;
 	ec.where = 0;
 	while ((line = stream_getln(orig, &size)) != NULL)
@@ -143,6 +159,198 @@ diff_apply(struct stream *rd, struct str
 	return (0);
 }
 
+/*
+ * Reverse a diff using the same algorithm as in cvsup.
+ */
+static int
+diff_write_reverse(struct stream *dest, struct diffstart *ds)
+{
+	struct editcmd *ec, *nextec;
+	long editline, endline, firstoutputlinedeleted;
+	long num_added, num_deleted, startline;
+	int num;
+
+	nextec = LIST_FIRST(&ds->dhead);
+	editline = 0;
+	num = 0;
+	while (nextec != NULL) {
+		ec = nextec;
+		nextec = LIST_NEXT(nextec, next);
+		if (nextec == NULL)
+			break;
+		num++;
+		num_deleted = 0;
+		if (ec->havetext)
+			num_deleted = ec->count;
+		num_added = num_deleted + nextec->offset - ec->offset;
+		if (num_deleted > 0) {
+			firstoutputlinedeleted = ec->key - num_deleted + 1;
+			stream_printf(dest, "d%ld %ld\n", firstoutputlinedeleted,
+			    num_deleted);
+			if (num_added <= 0)
+				continue;
+		}
+		if (num_added > 0) {
+			stream_printf(dest, "a%ld %ld\n", ec->key, num_added);
+			startline = ec->key - num_deleted + 1 + ec->offset;
+			endline = startline + num_added - 1;
+
+			/* Copy lines from original file. First ignore some. */
+			ec->editline = editline;
+			diff_ignoreln(ec,  startline - 1);
+			diff_copyln(ec, endline);
+			editline = ec->editline;
+		}
+	}
+	return (0);
+}
+
+/* 
+ * Insert a diff into the list sorted on key. Should perhaps use quicker
+ * algorithms than insertion sort, but do this for now.
+ */
+static int
+diff_insert_edit(struct diffstart *ds, struct editcmd *ec)
+{
+	struct editcmd *curec;
+
+	if (ec == NULL)
+		return (0);
+
+	if (LIST_EMPTY(&ds->dhead)) {
+		LIST_INSERT_HEAD(&ds->dhead, ec, next);
+		return (0);
+	}
+
+	/* Insertion sort based on key. */
+	LIST_FOREACH(curec, &ds->dhead, next) {
+		if (ec->key < curec->key) {
+			LIST_INSERT_BEFORE(curec, ec, next);
+			return (0);
+		}
+		if (LIST_NEXT(curec, next) == NULL)
+			break;
+	}
+	/* Just insert it after. */
+	LIST_INSERT_AFTER(curec, ec, next);
+	return (0);
+}
+
+static void 
+diff_free(struct diffstart *ds)
+{
+	struct editcmd *ec;
+
+	while(!LIST_EMPTY(&ds->dhead)) {
+		ec = LIST_FIRST(&ds->dhead);
+		LIST_REMOVE(ec, next);
+		free(ec);
+	}
+}
+
+/*
+ * Write the reverse diff from the diff in rd, and original file into
+ * destination. This algorithm is the same as used in cvsup.
+ */
+int
+diff_reverse(struct stream *rd, struct stream *orig, struct stream *dest,
+    struct keyword *keyword, struct diffinfo *di)
+{
+	struct diffstart ds;
+	struct editcmd ec, *addec, *delec;
+	lineno_t i;
+	char *line;
+	int error, offset;
+
+	memset(&ec, 0, sizeof(ec));
+	ec.orig = orig;
+	ec.dest = dest;
+	ec.keyword = keyword;
+	ec.di = di;
+	addec = NULL;
+	delec = NULL;
+	ec.havetext = 0;
+	offset = 0;
+	LIST_INIT(&ds.dhead);
+
+	/* Start with next since we need it. */
+	line = stream_getln(rd, NULL);
+	/* First we build up the list of diffs from input. */
+	while (line != NULL) {
+		error = diff_geteditcmd(&ec, line);
+		if (error)
+			break;
+		if (ec.cmd == EC_ADD) {
+			addec = xmalloc(sizeof(struct editcmd));
+			*addec = ec;
+			addec->havetext = 1;
+			/* Ignore the lines we was supposed to add. */
+			for (i = 0; i < ec.count; i++) {
+				line = stream_getln(rd, NULL);
+				if (line == NULL)
+					return (-1);
+			}
+
+			/* Get the next diff command if we have one. */
+			addec->key = addec->where + addec->count - offset;
+			if (delec != NULL &&
+			    delec->key == addec->key - addec->count) {
+				delec->key = addec->key;

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-user@FreeBSD.ORG  Tue Feb  3 18:07:21 2009
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A64791065672;
	Tue,  3 Feb 2009 18:07:21 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 8B44C8FC0C;
	Tue,  3 Feb 2009 18:07:21 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n13I7LMF037412;
	Tue, 3 Feb 2009 18:07:21 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n13I7LeZ037410;
	Tue, 3 Feb 2009 18:07:21 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <200902031807.n13I7LeZ037410@svn.freebsd.org>
From: Andrew Thompson <thompsa@FreeBSD.org>
Date: Tue, 3 Feb 2009 18:07:21 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r188081 - user/thompsa/usb/sys/dev/usb2/ethernet
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 03 Feb 2009 18:07:22 -0000

Author: thompsa
Date: Tue Feb  3 18:07:21 2009
New Revision: 188081
URL: http://svn.freebsd.org/changeset/base/188081

Log:
  Use a flag and cv when initing the hardware as the device could be detached
  while the driver init is sleeping.
  
  Spotted by:	HPS

Modified:
  user/thompsa/usb/sys/dev/usb2/ethernet/usb2_ethernet.c
  user/thompsa/usb/sys/dev/usb2/ethernet/usb2_ethernet.h

Modified: user/thompsa/usb/sys/dev/usb2/ethernet/usb2_ethernet.c
==============================================================================
--- user/thompsa/usb/sys/dev/usb2/ethernet/usb2_ethernet.c	Tue Feb  3 17:58:20 2009	(r188080)
+++ user/thompsa/usb/sys/dev/usb2/ethernet/usb2_ethernet.c	Tue Feb  3 18:07:21 2009	(r188081)
@@ -27,6 +27,7 @@
 #include <dev/usb2/core/usb2_core.h>
 #include <dev/usb2/core/usb2_process.h>
 #include <dev/usb2/core/usb2_busdma.h>
+#include <dev/usb2/core/usb2_util.h>
 #include <dev/usb2/ethernet/usb2_ethernet.h>
 
 SYSCTL_NODE(_net, OID_AUTO, ue, CTLFLAG_RD, 0, "USB Ethernet parameters");
@@ -102,6 +103,7 @@ usb2_ether_ifattach(struct usb2_ether *u
 	USB_TASK_INIT(&ue->ue_tick_task, ue_tick_task, ue, ue->ue_mtx);
 	usb2_callout_init_mtx(&ue->ue_watchdog, ue->ue_mtx, 0);
 	sysctl_ctx_init(&ue->ue_sysctl_ctx);
+	usb2_cv_init(&ue->ue_cv, device_get_nameunit(ue->ue_dev));
 
 	error = usb2_proc_create(&ue->ue_tq, USB_PRI_MED,
 	    device_get_nameunit(ue->ue_dev));
@@ -172,6 +174,12 @@ usb2_ether_ifdetach(struct usb2_ether *u
 	KASSERT((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0,
 	    ("ifnet still running"));
 
+	UE_LOCK(ue);
+	/* Wait if the interface init routine is still running */
+	while (ue->ue_flags & UE_FLAG_INIT)
+		usb2_cv_wait(&ue->ue_cv, ue->ue_mtx);
+	UE_UNLOCK(ue);
+
 	usb2_callout_drain(&ue->ue_watchdog);
 	usb2_proc_free(&ue->ue_tq);
 	if (ue->ue_miibus)
@@ -179,6 +187,7 @@ usb2_ether_ifdetach(struct usb2_ether *u
 	ether_ifdetach(ifp);
 	if_free(ifp);
 	sysctl_ctx_free(&ue->ue_sysctl_ctx);
+	usb2_cv_destroy(&ue->ue_cv);
 	free_unr(ueunit, ue->ue_unit);
 }
 
@@ -199,7 +208,15 @@ ue_init_locked(struct usb2_ether *ue)
 
 	UE_LOCK_ASSERT(ue, MA_OWNED);
 
+	/*
+	 * Init the hardware, this is flagged as the device could be
+	 * detached while the driver init is sleeping.
+	 */
+	ue->ue_flags |= UE_FLAG_INIT;
 	ue->ue_init(ue->ue_sc);
+	ue->ue_flags &= ~UE_FLAG_INIT;
+	usb2_cv_signal(&ue->ue_cv);
+
 	if ((ifp->if_drv_flags & IFF_DRV_RUNNING) && ue->ue_tick != NULL)
 		usb2_callout_reset(&ue->ue_watchdog, hz, ue_watchdog, ue);
 }

Modified: user/thompsa/usb/sys/dev/usb2/ethernet/usb2_ethernet.h
==============================================================================
--- user/thompsa/usb/sys/dev/usb2/ethernet/usb2_ethernet.h	Tue Feb  3 17:58:20 2009	(r188080)
+++ user/thompsa/usb/sys/dev/usb2/ethernet/usb2_ethernet.h	Tue Feb  3 18:07:21 2009	(r188081)
@@ -63,6 +63,10 @@ struct usb2_ether {
 
 	struct ifqueue		ue_rxq;
 
+	int			ue_flags;
+#define UE_FLAG_INIT		1
+
+	struct cv		ue_cv;
 	struct usb2_callout	ue_watchdog;
 	struct usb2_task	ue_media_task;
 	struct usb2_task	ue_multi_task;

From owner-svn-src-user@FreeBSD.ORG  Tue Feb  3 18:08:32 2009
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5878F106566B;
	Tue,  3 Feb 2009 18:08:32 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 4764E8FC27;
	Tue,  3 Feb 2009 18:08:32 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n13I8W3Z037468;
	Tue, 3 Feb 2009 18:08:32 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n13I8Wfn037467;
	Tue, 3 Feb 2009 18:08:32 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <200902031808.n13I8Wfn037467@svn.freebsd.org>
From: Andrew Thompson <thompsa@FreeBSD.org>
Date: Tue, 3 Feb 2009 18:08:32 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r188082 - user/thompsa/usb/sys/dev/usb2/ethernet
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 03 Feb 2009 18:08:32 -0000

Author: thompsa
Date: Tue Feb  3 18:08:32 2009
New Revision: 188082
URL: http://svn.freebsd.org/changeset/base/188082

Log:
  Use the correct pointer, it didnt actually matter as they had the same value.
  
  Submitted by:	HPS

Modified:
  user/thompsa/usb/sys/dev/usb2/ethernet/usb2_ethernet.c

Modified: user/thompsa/usb/sys/dev/usb2/ethernet/usb2_ethernet.c
==============================================================================
--- user/thompsa/usb/sys/dev/usb2/ethernet/usb2_ethernet.c	Tue Feb  3 18:07:21 2009	(r188081)
+++ user/thompsa/usb/sys/dev/usb2/ethernet/usb2_ethernet.c	Tue Feb  3 18:08:32 2009	(r188082)
@@ -213,7 +213,7 @@ ue_init_locked(struct usb2_ether *ue)
 	 * detached while the driver init is sleeping.
 	 */
 	ue->ue_flags |= UE_FLAG_INIT;
-	ue->ue_init(ue->ue_sc);
+	ue->ue_init(ue);
 	ue->ue_flags &= ~UE_FLAG_INIT;
 	usb2_cv_signal(&ue->ue_cv);
 

From owner-svn-src-user@FreeBSD.ORG  Tue Feb  3 22:22:07 2009
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E4CD4106566C;
	Tue,  3 Feb 2009 22:22:07 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id D0B668FC3E;
	Tue,  3 Feb 2009 22:22:07 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n13MM7SU043898;
	Tue, 3 Feb 2009 22:22:07 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n13MM7TH043897;
	Tue, 3 Feb 2009 22:22:07 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <200902032222.n13MM7TH043897@svn.freebsd.org>
From: Andrew Thompson <thompsa@FreeBSD.org>
Date: Tue, 3 Feb 2009 22:22:07 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r188105 - user/thompsa/usb/sys/dev/usb2/ethernet
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 03 Feb 2009 22:22:10 -0000

Author: thompsa
Date: Tue Feb  3 22:22:07 2009
New Revision: 188105
URL: http://svn.freebsd.org/changeset/base/188105

Log:
  Add pauses in the register read/write loops.
  
  Submitted by:	HPS

Modified:
  user/thompsa/usb/sys/dev/usb2/ethernet/if_aue2.c

Modified: user/thompsa/usb/sys/dev/usb2/ethernet/if_aue2.c
==============================================================================
--- user/thompsa/usb/sys/dev/usb2/ethernet/if_aue2.c	Tue Feb  3 20:48:17 2009	(r188104)
+++ user/thompsa/usb/sys/dev/usb2/ethernet/if_aue2.c	Tue Feb  3 22:22:07 2009	(r188105)
@@ -352,6 +352,7 @@ aue_eeprom_getword(struct aue_softc *sc,
 	for (i = 0; i < AUE_TIMEOUT; i++) {
 		if (aue_csr_read_1(sc, AUE_EE_CTL) & AUE_EECTL_DONE)
 			break;
+		usb2_pause_mtx(&sc->sc_mtx, hz / 100);
 	}
 
 	if (i == AUE_TIMEOUT)
@@ -402,6 +403,7 @@ aue_miibus_readreg(device_t dev, int phy
 	for (i = 0; i < AUE_TIMEOUT; i++) {
 		if (aue_csr_read_1(sc, AUE_PHY_CTL) & AUE_PHYCTL_DONE)
 			break;
+		usb2_pause_mtx(&sc->sc_mtx, hz / 100);
 	}
 
 	if (i == AUE_TIMEOUT)
@@ -434,6 +436,7 @@ aue_miibus_writereg(device_t dev, int ph
 	for (i = 0; i < AUE_TIMEOUT; i++) {
 		if (aue_csr_read_1(sc, AUE_PHY_CTL) & AUE_PHYCTL_DONE)
 			break;
+		usb2_pause_mtx(&sc->sc_mtx, hz / 100);
 	}
 
 	if (i == AUE_TIMEOUT)
@@ -542,6 +545,7 @@ aue_reset(struct aue_softc *sc)
 	for (i = 0; i < AUE_TIMEOUT; i++) {
 		if (!(aue_csr_read_1(sc, AUE_CTL1) & AUE_CTL1_RESETMAC))
 			break;
+		usb2_pause_mtx(&sc->sc_mtx, hz / 100);
 	}
 
 	if (i == AUE_TIMEOUT)

From owner-svn-src-user@FreeBSD.ORG  Thu Feb  5 14:02:04 2009
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id BD47C106566C;
	Thu,  5 Feb 2009 14:02:04 +0000 (UTC) (envelope-from dfr@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id AB6438FC20;
	Thu,  5 Feb 2009 14:02:04 +0000 (UTC) (envelope-from dfr@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n15E24rc028588;
	Thu, 5 Feb 2009 14:02:04 GMT (envelope-from dfr@svn.freebsd.org)
Received: (from dfr@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n15E24bY028587;
	Thu, 5 Feb 2009 14:02:04 GMT (envelope-from dfr@svn.freebsd.org)
Message-Id: <200902051402.n15E24bY028587@svn.freebsd.org>
From: Doug Rabson <dfr@FreeBSD.org>
Date: Thu, 5 Feb 2009 14:02:04 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r188143 - user/dfr/xenhvm/6/sys/amd64/amd64
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 05 Feb 2009 14:02:05 -0000

Author: dfr
Date: Thu Feb  5 14:02:04 2009
New Revision: 188143
URL: http://svn.freebsd.org/changeset/base/188143

Log:
  Add some disabled code which calls the hypervisor to flush TLBs. Disabled
  because it seems to be slower in my tests.

Modified:
  user/dfr/xenhvm/6/sys/amd64/amd64/pmap.c

Modified: user/dfr/xenhvm/6/sys/amd64/amd64/pmap.c
==============================================================================
--- user/dfr/xenhvm/6/sys/amd64/amd64/pmap.c	Thu Feb  5 11:48:10 2009	(r188142)
+++ user/dfr/xenhvm/6/sys/amd64/amd64/pmap.c	Thu Feb  5 14:02:04 2009	(r188143)
@@ -144,6 +144,11 @@ __FBSDID("$FreeBSD$");
 #ifdef SMP
 #include <machine/smp.h>
 #endif
+#ifdef XENHVM
+#include <machine/xen/xen-os.h>
+#include <xen/hypervisor.h>
+#include <xen/interface/hvm/hvm_op.h>
+#endif
 
 #ifndef PMAP_SHPGPERPROC
 #define PMAP_SHPGPERPROC 200
@@ -793,8 +798,20 @@ pmap_invalidate_all(pmap_t pmap)
 
 	sched_pin();
 	if (pmap == kernel_pmap || pmap->pm_active == all_cpus) {
-		invltlb();
-		smp_invltlb();
+#if defined(XENHVM) && defined(notdef)
+		/*
+		 * As far as I can tell, this makes things slower, at
+		 * least where there are only two physical cpus and
+		 * the host is not overcommitted.
+		 */
+		if (is_running_on_xen()) {
+			HYPERVISOR_hvm_op(HVMOP_flush_tlbs, NULL);
+		} else
+#endif
+		{
+			invltlb();
+			smp_invltlb();
+		}
 	} else {
 		cpumask = PCPU_GET(cpumask);
 		other_cpus = PCPU_GET(other_cpus);

From owner-svn-src-user@FreeBSD.ORG  Thu Feb  5 15:09:56 2009
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3D05010656ED;
	Thu,  5 Feb 2009 15:09:56 +0000 (UTC) (envelope-from dfr@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 6FB218FD44;
	Thu,  5 Feb 2009 15:09:42 +0000 (UTC) (envelope-from dfr@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n15F9geo030371;
	Thu, 5 Feb 2009 15:09:42 GMT (envelope-from dfr@svn.freebsd.org)
Received: (from dfr@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n15F9gCj030370;
	Thu, 5 Feb 2009 15:09:42 GMT (envelope-from dfr@svn.freebsd.org)
Message-Id: <200902051509.n15F9gCj030370@svn.freebsd.org>
From: Doug Rabson <dfr@FreeBSD.org>
Date: Thu, 5 Feb 2009 15:09:42 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r188153 - user/dfr/xenhvm/6/sys/amd64/conf
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 05 Feb 2009 15:10:15 -0000

Author: dfr
Date: Thu Feb  5 15:09:42 2009
New Revision: 188153
URL: http://svn.freebsd.org/changeset/base/188153

Log:
  Adaptive mutex spinning turns out to be very slightly slower on Xen, probably
  due to scheduling conflicts with other guests within the same hypervisor.

Modified:
  user/dfr/xenhvm/6/sys/amd64/conf/XENHVM

Modified: user/dfr/xenhvm/6/sys/amd64/conf/XENHVM
==============================================================================
--- user/dfr/xenhvm/6/sys/amd64/conf/XENHVM	Thu Feb  5 15:09:04 2009	(r188152)
+++ user/dfr/xenhvm/6/sys/amd64/conf/XENHVM	Thu Feb  5 15:09:42 2009	(r188153)
@@ -59,7 +59,8 @@ options 	SYSVMSG			# SYSV-style message 
 options 	SYSVSEM			# SYSV-style semaphores
 options 	_KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions
 options 	KBD_INSTALL_CDEV	# install a CDEV entry in /dev
-options 	ADAPTIVE_GIANT		# Giant mutex is adaptive.
+options		NO_ADAPTIVE_MUTEXES
+#options 	ADAPTIVE_GIANT		# Giant mutex is adaptive.
 
 options		KDB
 options		DDB
@@ -69,6 +70,7 @@ device		atpic			# 8259A compatability
 
 # Linux 32-bit ABI support
 options 	LINPROCFS		# Cannot be a module yet.
+options		SMP
 
 # Bus support.
 device		acpi

From owner-svn-src-user@FreeBSD.ORG  Thu Feb  5 15:39:02 2009
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id DECDF1065674;
	Thu,  5 Feb 2009 15:39:02 +0000 (UTC)
	(envelope-from rwatson@FreeBSD.org)
Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42])
	by mx1.freebsd.org (Postfix) with ESMTP id BAC0E8FC17;
	Thu,  5 Feb 2009 15:39:02 +0000 (UTC)
	(envelope-from rwatson@FreeBSD.org)
Received: from fledge.watson.org (fledge.watson.org [65.122.17.41])
	by cyrus.watson.org (Postfix) with ESMTPS id 3FD6746B42;
	Thu,  5 Feb 2009 10:39:02 -0500 (EST)
Date: Thu, 5 Feb 2009 15:39:02 +0000 (GMT)
From: Robert Watson <rwatson@FreeBSD.org>
X-X-Sender: robert@fledge.watson.org
To: Doug Rabson <dfr@FreeBSD.org>
In-Reply-To: <200902051509.n15F9gCj030370@svn.freebsd.org>
Message-ID: <alpine.BSF.2.00.0902051536300.71447@fledge.watson.org>
References: <200902051509.n15F9gCj030370@svn.freebsd.org>
User-Agent: Alpine 2.00 (BSF 1167 2008-08-23)
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
Cc: src-committers@freebsd.org, svn-src-user@freebsd.org
Subject: Re: svn commit: r188153 - user/dfr/xenhvm/6/sys/amd64/conf
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 05 Feb 2009 15:39:03 -0000


On Thu, 5 Feb 2009, Doug Rabson wrote:

>  Adaptive mutex spinning turns out to be very slightly slower on Xen, 
> probably
>  due to scheduling conflicts with other guests within the same hypervisor.

Part of the effectiveness of adaptive mutexes is in their being able to tell 
with a single read whether or not the thread owning the lock is (likely) in 
execution.  This is complicated with a hypervisor because although the FreeBSD 
kernel has the thread in the run state doesn't mean that the hypervisor has 
FreeBSD in the run state.  Is there any way we could provide similar hints 
here?  As core density goes up, people may over-commit hardware resources 
less, using Xen for assigning subsets of the core pool to particular VMs as 
opposed to time-sharing individual cores, in which case we'd like adaptive 
mutexes to work...

Robert N M Watson
Computer Laboratory
University of Cambridge

From owner-svn-src-user@FreeBSD.ORG  Thu Feb  5 16:10:56 2009
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 531991065670;
	Thu,  5 Feb 2009 16:10:56 +0000 (UTC) (envelope-from dfr@rabson.org)
Received: from itchy.rabson.org (unknown [IPv6:2002:50b1:e8f2:1::143])
	by mx1.freebsd.org (Postfix) with ESMTP id 0AFE38FC18;
	Thu,  5 Feb 2009 16:10:56 +0000 (UTC) (envelope-from dfr@rabson.org)
Received: from [IPv6:2001:470:909f:1:21b:63ff:feb8:5abc] (unknown
	[IPv6:2001:470:909f:1:21b:63ff:feb8:5abc])
	by itchy.rabson.org (Postfix) with ESMTP id 4987C3F9F;
	Thu,  5 Feb 2009 16:10:19 +0000 (GMT)
Message-Id: <75E8FE57-7235-4F4D-813B-41BEFE7907C5@rabson.org>
From: Doug Rabson <dfr@rabson.org>
To: Robert Watson <rwatson@FreeBSD.org>
In-Reply-To: <alpine.BSF.2.00.0902051536300.71447@fledge.watson.org>
Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
Content-Transfer-Encoding: 7bit
Mime-Version: 1.0 (Apple Message framework v930.3)
Date: Thu, 5 Feb 2009 16:10:54 +0000
References: <200902051509.n15F9gCj030370@svn.freebsd.org>
	<alpine.BSF.2.00.0902051536300.71447@fledge.watson.org>
X-Mailer: Apple Mail (2.930.3)
Cc: Doug Rabson <dfr@FreeBSD.org>, src-committers@freebsd.org,
	svn-src-user@freebsd.org
Subject: Re: svn commit: r188153 - user/dfr/xenhvm/6/sys/amd64/conf
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 05 Feb 2009 16:10:56 -0000


On 5 Feb 2009, at 15:39, Robert Watson wrote:

>
> On Thu, 5 Feb 2009, Doug Rabson wrote:
>
>> Adaptive mutex spinning turns out to be very slightly slower on  
>> Xen, probably
>> due to scheduling conflicts with other guests within the same  
>> hypervisor.
>
> Part of the effectiveness of adaptive mutexes is in their being able  
> to tell with a single read whether or not the thread owning the lock  
> is (likely) in execution.  This is complicated with a hypervisor  
> because although the FreeBSD kernel has the thread in the run state  
> doesn't mean that the hypervisor has FreeBSD in the run state.  Is  
> there any way we could provide similar hints here?  As core density  
> goes up, people may over-commit hardware resources less, using Xen  
> for assigning subsets of the core pool to particular VMs as opposed  
> to time-sharing individual cores, in which case we'd like adaptive  
> mutexes to work...

This is indeed the key problem. At least with Xen, there is no way of  
telling that the vcpu which is ostensibly executing the lock owning  
thread is actually scheduled onto a physical cpu by the hypervisor.  
Its something I will encourage the Xen people to improve on in future.


From owner-svn-src-user@FreeBSD.ORG  Thu Feb  5 16:41:13 2009
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E9F8E106564A;
	Thu,  5 Feb 2009 16:41:13 +0000 (UTC) (envelope-from alc@cs.rice.edu)
Received: from mail.cs.rice.edu (mail.cs.rice.edu [128.42.1.31])
	by mx1.freebsd.org (Postfix) with ESMTP id 41F638FC1B;
	Thu,  5 Feb 2009 16:41:12 +0000 (UTC) (envelope-from alc@cs.rice.edu)
Received: from mail.cs.rice.edu (localhost.localdomain [127.0.0.1])
	by mail.cs.rice.edu (Postfix) with ESMTP id 937852C2C3D;
	Thu,  5 Feb 2009 10:41:12 -0600 (CST)
X-Virus-Scanned: by amavis-2.4.0 at mail.cs.rice.edu
Received: from mail.cs.rice.edu ([127.0.0.1])
	by mail.cs.rice.edu (mail.cs.rice.edu [127.0.0.1]) (amavisd-new,
	port 10024)
	with LMTP id 6pgu5F2+bNYK; Thu,  5 Feb 2009 10:41:04 -0600 (CST)
Received: from adsl-216-63-78-18.dsl.hstntx.swbell.net
	(adsl-216-63-78-18.dsl.hstntx.swbell.net [216.63.78.18])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mail.cs.rice.edu (Postfix) with ESMTP id 7754D2C2C55;
	Thu,  5 Feb 2009 10:41:04 -0600 (CST)
Message-ID: <498B169F.8080005@cs.rice.edu>
Date: Thu, 05 Feb 2009 10:41:03 -0600
From: Alan Cox <alc@cs.rice.edu>
User-Agent: Thunderbird 2.0.0.19 (X11/20090124)
MIME-Version: 1.0
To: Doug Rabson <dfr@rabson.org>
References: <200902051509.n15F9gCj030370@svn.freebsd.org>
	<alpine.BSF.2.00.0902051536300.71447@fledge.watson.org>
	<75E8FE57-7235-4F4D-813B-41BEFE7907C5@rabson.org>
In-Reply-To: <75E8FE57-7235-4F4D-813B-41BEFE7907C5@rabson.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Cc: Doug Rabson <dfr@FreeBSD.org>, src-committers@freebsd.org,
	Robert Watson <rwatson@FreeBSD.org>, svn-src-user@freebsd.org
Subject: Re: svn commit: r188153 - user/dfr/xenhvm/6/sys/amd64/conf
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 05 Feb 2009 16:41:14 -0000

Doug Rabson wrote:
>
> On 5 Feb 2009, at 15:39, Robert Watson wrote:
>
>>
>> On Thu, 5 Feb 2009, Doug Rabson wrote:
>>
>>> Adaptive mutex spinning turns out to be very slightly slower on Xen, 
>>> probably
>>> due to scheduling conflicts with other guests within the same 
>>> hypervisor.
>>
>> Part of the effectiveness of adaptive mutexes is in their being able 
>> to tell with a single read whether or not the thread owning the lock 
>> is (likely) in execution.  This is complicated with a hypervisor 
>> because although the FreeBSD kernel has the thread in the run state 
>> doesn't mean that the hypervisor has FreeBSD in the run state.  Is 
>> there any way we could provide similar hints here?  As core density 
>> goes up, people may over-commit hardware resources less, using Xen 
>> for assigning subsets of the core pool to particular VMs as opposed 
>> to time-sharing individual cores, in which case we'd like adaptive 
>> mutexes to work...
>
> This is indeed the key problem. At least with Xen, there is no way of 
> telling that the vcpu which is ostensibly executing the lock owning 
> thread is actually scheduled onto a physical cpu by the hypervisor. 
> Its something I will encourage the Xen people to improve on in future.

I have seen presentations on this topic by AMDers: 
http://www.amd64.org/research/virtualization.html

However, what they are doing is making Linux spin locks adaptive so that 
they block using a new hypercall that tries to perform a directed yield 
of the CPU to the preempted lock holder.  However, the new hypercall can 
only guess at who the preempted lock holder is.

So, they are not yet worried about completely avoiding pointless 
spinning, because they first need to get over hump of non-adaptive spinning.

Alan


From owner-svn-src-user@FreeBSD.ORG  Thu Feb  5 19:04:51 2009
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 32F09106566B;
	Thu,  5 Feb 2009 19:04:51 +0000 (UTC) (envelope-from sam@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 1E6388FC0A;
	Thu,  5 Feb 2009 19:04:51 +0000 (UTC) (envelope-from sam@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n15J4pDO035356;
	Thu, 5 Feb 2009 19:04:51 GMT (envelope-from sam@svn.freebsd.org)
Received: (from sam@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n15J4mtV035304;
	Thu, 5 Feb 2009 19:04:48 GMT (envelope-from sam@svn.freebsd.org)
Message-Id: <200902051904.n15J4mtV035304@svn.freebsd.org>
From: Sam Leffler <sam@FreeBSD.org>
Date: Thu, 5 Feb 2009 19:04:48 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r188168 - in user/sam/wifi: . contrib/csup contrib/file
	contrib/wpa_supplicant etc etc/defaults etc/rc.d
	lib/libc/sparc64/sys lib/libc/string lib/libc/sys
	lib/libusbhid sbin/fsck_ffs sb...
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 05 Feb 2009 19:04:51 -0000

Author: sam
Date: Thu Feb  5 19:04:48 2009
New Revision: 188168
URL: http://svn.freebsd.org/changeset/base/188168

Log:
  sync w/ head

Added:
  user/sam/wifi/lib/libusbhid/descr_compat.c
     - copied unchanged from r188167, head/lib/libusbhid/descr_compat.c
  user/sam/wifi/sys/dev/cfi/cfi_bus_ixp4xx.c
     - copied unchanged from r188167, head/sys/dev/cfi/cfi_bus_ixp4xx.c
  user/sam/wifi/tools/tools/cfi/
     - copied from r188167, head/tools/tools/cfi/
Modified:
  user/sam/wifi/   (props changed)
  user/sam/wifi/ObsoleteFiles.inc
  user/sam/wifi/contrib/csup/   (props changed)
  user/sam/wifi/contrib/file/   (props changed)
  user/sam/wifi/contrib/wpa_supplicant/   (props changed)
  user/sam/wifi/etc/defaults/rc.conf
  user/sam/wifi/etc/network.subr
  user/sam/wifi/etc/rc.d/defaultroute
  user/sam/wifi/lib/libc/sparc64/sys/__sparc_utrap.c
  user/sam/wifi/lib/libc/string/memccpy.c
  user/sam/wifi/lib/libc/string/memchr.c
  user/sam/wifi/lib/libc/string/memcmp.c
  user/sam/wifi/lib/libc/string/memmem.c
  user/sam/wifi/lib/libc/string/strcasecmp.c
  user/sam/wifi/lib/libc/string/strcasestr.c
  user/sam/wifi/lib/libc/string/strcmp.c
  user/sam/wifi/lib/libc/string/strcoll.c
  user/sam/wifi/lib/libc/string/strdup.c
  user/sam/wifi/lib/libc/string/strmode.c
  user/sam/wifi/lib/libc/string/strncmp.c
  user/sam/wifi/lib/libc/string/strncpy.c
  user/sam/wifi/lib/libc/string/strnstr.c
  user/sam/wifi/lib/libc/string/strpbrk.c
  user/sam/wifi/lib/libc/string/strsep.c
  user/sam/wifi/lib/libc/string/strstr.c
  user/sam/wifi/lib/libc/string/wcscat.c
  user/sam/wifi/lib/libc/string/wcscmp.c
  user/sam/wifi/lib/libc/string/wcscpy.c
  user/sam/wifi/lib/libc/string/wcscspn.c
  user/sam/wifi/lib/libc/string/wcslcat.c
  user/sam/wifi/lib/libc/string/wcslcpy.c
  user/sam/wifi/lib/libc/string/wcslen.c
  user/sam/wifi/lib/libc/string/wcsncat.c
  user/sam/wifi/lib/libc/string/wcsncmp.c
  user/sam/wifi/lib/libc/string/wcspbrk.c
  user/sam/wifi/lib/libc/string/wcsspn.c
  user/sam/wifi/lib/libc/string/wcsstr.c
  user/sam/wifi/lib/libc/string/wmemchr.c
  user/sam/wifi/lib/libc/string/wmemcmp.c
  user/sam/wifi/lib/libc/string/wmemcpy.c
  user/sam/wifi/lib/libc/string/wmemmove.c
  user/sam/wifi/lib/libc/string/wmemset.c
  user/sam/wifi/lib/libc/sys/send.2
  user/sam/wifi/lib/libusbhid/Makefile
  user/sam/wifi/lib/libusbhid/descr.c
  user/sam/wifi/lib/libusbhid/usbhid.3
  user/sam/wifi/lib/libusbhid/usbhid.h
  user/sam/wifi/lib/libusbhid/usbvar.h
  user/sam/wifi/sbin/fsck_ffs/fsck.h
  user/sam/wifi/sbin/fsck_ffs/fsck_ffs.8
  user/sam/wifi/sbin/fsck_ffs/fsutil.c
  user/sam/wifi/sbin/fsck_ffs/inode.c
  user/sam/wifi/sbin/fsck_ffs/main.c
  user/sam/wifi/sbin/fsck_ffs/pass1.c
  user/sam/wifi/sbin/geom/core/geom.c
  user/sam/wifi/sbin/ifconfig/ifieee80211.c
  user/sam/wifi/sbin/ifconfig/regdomain.c
  user/sam/wifi/sbin/ifconfig/regdomain.h
  user/sam/wifi/sbin/ipfw/dummynet.c
  user/sam/wifi/sbin/ipfw/ipfw2.c
  user/sam/wifi/share/man/man9/lock.9
  user/sam/wifi/sys/   (props changed)
  user/sam/wifi/sys/amd64/amd64/exception.S
  user/sam/wifi/sys/amd64/amd64/machdep.c
  user/sam/wifi/sys/amd64/amd64/mp_machdep.c
  user/sam/wifi/sys/amd64/include/intr_machdep.h
  user/sam/wifi/sys/arm/arm/busdma_machdep.c
  user/sam/wifi/sys/arm/arm/dump_machdep.c
  user/sam/wifi/sys/arm/arm/elf_trampoline.c
  user/sam/wifi/sys/arm/arm/pmap.c
  user/sam/wifi/sys/arm/arm/vm_machdep.c
  user/sam/wifi/sys/arm/conf/AVILA
  user/sam/wifi/sys/arm/conf/AVILA.hints
  user/sam/wifi/sys/arm/include/atomic.h
  user/sam/wifi/sys/arm/sa11x0/assabet_machdep.c
  user/sam/wifi/sys/arm/xscale/ixp425/avila_machdep.c
  user/sam/wifi/sys/arm/xscale/ixp425/files.ixp425
  user/sam/wifi/sys/arm/xscale/ixp425/ixp425.c
  user/sam/wifi/sys/arm/xscale/ixp425/ixp425reg.h
  user/sam/wifi/sys/conf/options
  user/sam/wifi/sys/dev/acpi_support/acpi_panasonic.c
  user/sam/wifi/sys/dev/acpica/acpi_pcib_acpi.c
  user/sam/wifi/sys/dev/ae/if_ae.c
  user/sam/wifi/sys/dev/an/if_an.c
  user/sam/wifi/sys/dev/an/if_anreg.h
  user/sam/wifi/sys/dev/ata/ata-disk.c
  user/sam/wifi/sys/dev/ata/atapi-cam.c
  user/sam/wifi/sys/dev/ata/atapi-cd.c
  user/sam/wifi/sys/dev/ata/atapi-fd.c
  user/sam/wifi/sys/dev/ata/atapi-tape.c
  user/sam/wifi/sys/dev/ath/   (props changed)
  user/sam/wifi/sys/dev/ath/ath_hal/ah_regdomain.c
  user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212.h
  user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_reset.c
  user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c
  user/sam/wifi/sys/dev/atkbdc/atkbdc_isa.c
  user/sam/wifi/sys/dev/bge/if_bge.c
  user/sam/wifi/sys/dev/bm/if_bm.c
  user/sam/wifi/sys/dev/cardbus/cardbus.c
  user/sam/wifi/sys/dev/cfi/cfi_core.c
  user/sam/wifi/sys/dev/cfi/cfi_dev.c
  user/sam/wifi/sys/dev/cfi/cfi_reg.h
  user/sam/wifi/sys/dev/cfi/cfi_var.h
  user/sam/wifi/sys/dev/exca/exca.c
  user/sam/wifi/sys/dev/firewire/firewire.c
  user/sam/wifi/sys/dev/firewire/fwohci.c
  user/sam/wifi/sys/dev/firewire/fwohci_pci.c
  user/sam/wifi/sys/dev/firewire/fwohcivar.h
  user/sam/wifi/sys/dev/firewire/sbp.c
  user/sam/wifi/sys/dev/ichsmb/ichsmb.c
  user/sam/wifi/sys/dev/ipmi/ipmi_acpi.c
  user/sam/wifi/sys/dev/ipmi/ipmi_smbios.c
  user/sam/wifi/sys/dev/kbdmux/kbdmux.c
  user/sam/wifi/sys/dev/mmc/mmc.c
  user/sam/wifi/sys/dev/mmc/mmcreg.h
  user/sam/wifi/sys/dev/pccbb/pccbb.c
  user/sam/wifi/sys/dev/pccbb/pccbb_pci.c
  user/sam/wifi/sys/dev/pccbb/pccbbvar.h
  user/sam/wifi/sys/dev/pci/pci_user.c
  user/sam/wifi/sys/dev/pci/pcireg.h
  user/sam/wifi/sys/dev/ppbus/ppbconf.h
  user/sam/wifi/sys/dev/smbus/smb.c
  user/sam/wifi/sys/dev/snp/snp.c
  user/sam/wifi/sys/dev/syscons/teken/   (props changed)
  user/sam/wifi/sys/dev/usb2/bluetooth/ubtbcmfw2.c
  user/sam/wifi/sys/dev/usb2/core/usb2_error.c
  user/sam/wifi/sys/dev/usb2/core/usb2_process.c
  user/sam/wifi/sys/dev/usb2/include/usb2_error.h
  user/sam/wifi/sys/dev/usb2/include/usb2_hid.h
  user/sam/wifi/sys/dev/usb2/include/usb2_mfunc.h
  user/sam/wifi/sys/dev/usb2/include/usb2_revision.h
  user/sam/wifi/sys/dev/usb2/input/uhid2.c
  user/sam/wifi/sys/dev/usb2/quirk/usb2_quirk.c
  user/sam/wifi/sys/dev/usb2/quirk/usb2_quirk.h
  user/sam/wifi/sys/dev/usb2/serial/uftdi2.c
  user/sam/wifi/sys/dev/xen/netback/netback.c
  user/sam/wifi/sys/dev/xen/netfront/netfront.c
  user/sam/wifi/sys/geom/geom_subr.c
  user/sam/wifi/sys/i386/xen/clock.c
  user/sam/wifi/sys/i386/xen/xen_machdep.c
  user/sam/wifi/sys/ia64/ia64/mca.c
  user/sam/wifi/sys/ia64/include/mca.h
  user/sam/wifi/sys/kern/kern_jail.c
  user/sam/wifi/sys/kern/subr_autoconf.c
  user/sam/wifi/sys/kern/subr_bus.c
  user/sam/wifi/sys/kern/subr_clist.c
  user/sam/wifi/sys/kern/subr_devstat.c
  user/sam/wifi/sys/kern/subr_disk.c
  user/sam/wifi/sys/kern/subr_firmware.c
  user/sam/wifi/sys/kern/subr_kobj.c
  user/sam/wifi/sys/kern/subr_prf.c
  user/sam/wifi/sys/kern/subr_prof.c
  user/sam/wifi/sys/kern/subr_rman.c
  user/sam/wifi/sys/kern/subr_rtc.c
  user/sam/wifi/sys/kern/subr_taskqueue.c
  user/sam/wifi/sys/kern/subr_witness.c
  user/sam/wifi/sys/kern/sys_generic.c
  user/sam/wifi/sys/kern/tty.c
  user/sam/wifi/sys/kern/tty_inq.c
  user/sam/wifi/sys/kern/tty_outq.c
  user/sam/wifi/sys/kern/uipc_socket.c
  user/sam/wifi/sys/kern/vfs_mount.c
  user/sam/wifi/sys/kern/vfs_subr.c
  user/sam/wifi/sys/kern/vfs_syscalls.c
  user/sam/wifi/sys/modules/usb2/serial_3g/   (props changed)
  user/sam/wifi/sys/net/if.c
  user/sam/wifi/sys/net/if_ethersubr.c
  user/sam/wifi/sys/net/rtsock.c
  user/sam/wifi/sys/net80211/ieee80211.c
  user/sam/wifi/sys/netatalk/ddp_usrreq.c
  user/sam/wifi/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap_raw.c
  user/sam/wifi/sys/netinet/in.c
  user/sam/wifi/sys/netinet/in_pcb.c
  user/sam/wifi/sys/netinet/ip_divert.c
  user/sam/wifi/sys/netinet/ip_ipsec.c
  user/sam/wifi/sys/netinet/ip_output.c
  user/sam/wifi/sys/netinet/raw_ip.c
  user/sam/wifi/sys/netinet/sctp_auth.c
  user/sam/wifi/sys/netinet/sctp_constants.h
  user/sam/wifi/sys/netinet/sctp_crc32.c
  user/sam/wifi/sys/netinet/sctp_crc32.h
  user/sam/wifi/sys/netinet/sctp_input.c
  user/sam/wifi/sys/netinet/sctp_os_bsd.h
  user/sam/wifi/sys/netinet/sctp_output.c
  user/sam/wifi/sys/netinet/sctp_pcb.c
  user/sam/wifi/sys/netinet/sctp_pcb.h
  user/sam/wifi/sys/netinet/sctp_sysctl.c
  user/sam/wifi/sys/netinet/sctp_uio.h
  user/sam/wifi/sys/netinet/sctp_usrreq.c
  user/sam/wifi/sys/netinet/sctputil.c
  user/sam/wifi/sys/netinet/sctputil.h
  user/sam/wifi/sys/netinet/tcp_usrreq.c
  user/sam/wifi/sys/netinet/udp_usrreq.c
  user/sam/wifi/sys/netinet6/in6.c
  user/sam/wifi/sys/netinet6/in6_pcb.c
  user/sam/wifi/sys/netinet6/in6_src.c
  user/sam/wifi/sys/netinet6/nd6_rtr.c
  user/sam/wifi/sys/netinet6/raw_ip6.c
  user/sam/wifi/sys/netinet6/sctp6_usrreq.c
  user/sam/wifi/sys/netinet6/udp6_usrreq.c
  user/sam/wifi/sys/opencrypto/cryptosoft.c
  user/sam/wifi/sys/rpc/clnt_rc.c
  user/sam/wifi/sys/security/audit/audit_pipe.c
  user/sam/wifi/sys/sys/cfictl.h
  user/sam/wifi/sys/sys/clist.h
  user/sam/wifi/sys/sys/conf.h
  user/sam/wifi/sys/sys/elf_common.h
  user/sam/wifi/sys/sys/jail.h
  user/sam/wifi/sys/sys/kobj.h
  user/sam/wifi/sys/sys/lockmgr.h
  user/sam/wifi/sys/sys/pciio.h
  user/sam/wifi/sys/sys/sysctl.h
  user/sam/wifi/sys/sys/tty.h
  user/sam/wifi/sys/sys/ttyqueue.h
  user/sam/wifi/tools/regression/lib/msun/test-conj.t   (props changed)
  user/sam/wifi/tools/tools/README
  user/sam/wifi/tools/tools/ath/athrd/   (props changed)
  user/sam/wifi/tools/tools/sysbuild/sysbuild.sh
  user/sam/wifi/usr.bin/basename/basename.1
  user/sam/wifi/usr.bin/bluetooth/rfcomm_sppd/rfcomm_sppd.c
  user/sam/wifi/usr.bin/csup/   (props changed)
  user/sam/wifi/usr.bin/dirname/dirname.c
  user/sam/wifi/usr.bin/make/job.c
  user/sam/wifi/usr.bin/make/main.c
  user/sam/wifi/usr.bin/usbhidaction/usbhidaction.c
  user/sam/wifi/usr.bin/usbhidctl/usbhid.c
  user/sam/wifi/usr.sbin/bluetooth/Makefile
  user/sam/wifi/usr.sbin/bluetooth/btpand/btpand.c
  user/sam/wifi/usr.sbin/bluetooth/btpand/btpand.h
  user/sam/wifi/usr.sbin/bluetooth/btpand/server.c
  user/sam/wifi/usr.sbin/bluetooth/hcsecd/hcsecd.c
  user/sam/wifi/usr.sbin/bluetooth/hcseriald/hcseriald.c
  user/sam/wifi/usr.sbin/bluetooth/rfcomm_pppd/rfcomm_pppd.c
  user/sam/wifi/usr.sbin/fifolog/lib/fifolog_reader.c
  user/sam/wifi/usr.sbin/fifolog/lib/fifolog_write_poll.c
  user/sam/wifi/usr.sbin/fwcontrol/fwdv.c
  user/sam/wifi/usr.sbin/fwcontrol/fwmpegts.c
  user/sam/wifi/usr.sbin/makefs/ffs/ffs_bswap.c   (props changed)
  user/sam/wifi/usr.sbin/makefs/ffs/ffs_subr.c   (props changed)
  user/sam/wifi/usr.sbin/makefs/ffs/ufs_bswap.h   (props changed)
  user/sam/wifi/usr.sbin/makefs/getid.c   (props changed)
  user/sam/wifi/usr.sbin/pciconf/pciconf.8
  user/sam/wifi/usr.sbin/pciconf/pciconf.c
  user/sam/wifi/usr.sbin/pstat/pstat.8
  user/sam/wifi/usr.sbin/pstat/pstat.c

Modified: user/sam/wifi/ObsoleteFiles.inc
==============================================================================
--- user/sam/wifi/ObsoleteFiles.inc	Thu Feb  5 18:51:14 2009	(r188167)
+++ user/sam/wifi/ObsoleteFiles.inc	Thu Feb  5 19:04:48 2009	(r188168)
@@ -14,6 +14,8 @@
 # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last.
 #
 
+# 20090203: adding_user.8 moved to adding_user.7
+OLD_FILES+=usr/share/man/man8/adding_user.8.gz
 # 20090122: tzdata2009a import
 OLD_FILES+=usr/share/zoneinfo/Asia/Katmandu
 # 20090102: file 4.26 import

Modified: user/sam/wifi/etc/defaults/rc.conf
==============================================================================
--- user/sam/wifi/etc/defaults/rc.conf	Thu Feb  5 18:51:14 2009	(r188167)
+++ user/sam/wifi/etc/defaults/rc.conf	Thu Feb  5 19:04:48 2009	(r188168)
@@ -101,7 +101,7 @@ nisdomainname="NO"		# Set to NIS domain 
 dhclient_program="/sbin/dhclient"	# Path to dhcp client program.
 dhclient_flags=""		# Extra flags to pass to dhcp client.
 #dhclient_flags_fxp0=""		# Extra dhclient flags for fxp0 only
-background_dhclient="NO"	# Start dhcp client in the background.
+background_dhclient="YES"	# Start dhcp client in the background.
 #background_dhclient_fxp0="YES"	# Start dhcp client on fxp0 in the background.
 synchronous_dhclient="NO"	# Start dhclient directly on configured
 				# interfaces during startup.

Modified: user/sam/wifi/etc/network.subr
==============================================================================
--- user/sam/wifi/etc/network.subr	Thu Feb  5 18:51:14 2009	(r188167)
+++ user/sam/wifi/etc/network.subr	Thu Feb  5 19:04:48 2009	(r188168)
@@ -515,7 +515,9 @@ childif_create()
 			i=`ifconfig wlan create ${create_args}`
 			ifconfig $i name $child && cfg=0
 		fi
-		ifn_start $child
+		if autoif $child; then
+			ifn_start $child
+		fi
 	done
 
 	return ${cfg}

Modified: user/sam/wifi/etc/rc.d/defaultroute
==============================================================================
--- user/sam/wifi/etc/rc.d/defaultroute	Thu Feb  5 18:51:14 2009	(r188167)
+++ user/sam/wifi/etc/rc.d/defaultroute	Thu Feb  5 19:04:48 2009	(r188168)
@@ -18,10 +18,21 @@ stop_cmd=":"
 
 defaultroute_start()
 {
-	# Return without waiting if we don't have dhcp interfaces.
-	# Once we can test that the link is actually up, we should
-	# remove this test and always wait.
-	[ -z "`list_net_interfaces dhcp`" ] && return
+	local output carrier nocarrier
+
+	# Return without waiting if we don't have dhcp interfaces or
+	# if none of the dhcp interfaces is plugged in.
+	dhcp_interfaces=`list_net_interfaces dhcp`
+	[ -z "${dhcp_interfaces}" ] && return
+	carrier=false
+	for _if in ${dhcp_interfaces}; do
+		output=`/sbin/ifconfig ${_if}` 
+		nocarrier=`expr "${output}" : '.*[[:blank:]]status: \(no carrier\)'`
+		[ -z "${nocarrier}" ] && carrier=true
+	done
+	if ! ${carrier}; then
+		return
+	fi
 
 	# Wait for a default route
 	delay=${if_up_delay}

Modified: user/sam/wifi/lib/libc/sparc64/sys/__sparc_utrap.c
==============================================================================
--- user/sam/wifi/lib/libc/sparc64/sys/__sparc_utrap.c	Thu Feb  5 18:51:14 2009	(r188167)
+++ user/sam/wifi/lib/libc/sparc64/sys/__sparc_utrap.c	Thu Feb  5 19:04:48 2009	(r188168)
@@ -122,7 +122,7 @@ __utrap_write(const char *str)
 }
 
 void
-__utrap_kill_self(sig)
+__utrap_kill_self(int sig)
 {
 	int berrno;
 

Modified: user/sam/wifi/lib/libc/string/memccpy.c
==============================================================================
--- user/sam/wifi/lib/libc/string/memccpy.c	Thu Feb  5 18:51:14 2009	(r188167)
+++ user/sam/wifi/lib/libc/string/memccpy.c	Thu Feb  5 19:04:48 2009	(r188168)
@@ -36,11 +36,7 @@ __FBSDID("$FreeBSD$");
 #include <string.h>
 
 void *
-memccpy(t, f, c, n)
-	void *t;
-	const void *f;
-	int c;
-	size_t n;
+memccpy(void *t, const void *f, int c, size_t n)
 {
 
 	if (n) {

Modified: user/sam/wifi/lib/libc/string/memchr.c
==============================================================================
--- user/sam/wifi/lib/libc/string/memchr.c	Thu Feb  5 18:51:14 2009	(r188167)
+++ user/sam/wifi/lib/libc/string/memchr.c	Thu Feb  5 19:04:48 2009	(r188168)
@@ -39,10 +39,7 @@ __FBSDID("$FreeBSD$");
 #include <string.h>
 
 void *
-memchr(s, c, n)
-	const void *s;
-	unsigned char c;
-	size_t n;
+memchr(const void *s, int c, size_t n)
 {
 	if (n != 0) {
 		const unsigned char *p = s;

Modified: user/sam/wifi/lib/libc/string/memcmp.c
==============================================================================
--- user/sam/wifi/lib/libc/string/memcmp.c	Thu Feb  5 18:51:14 2009	(r188167)
+++ user/sam/wifi/lib/libc/string/memcmp.c	Thu Feb  5 19:04:48 2009	(r188168)
@@ -42,9 +42,7 @@ __FBSDID("$FreeBSD$");
  * Compare memory regions.
  */
 int
-memcmp(s1, s2, n)
-	const void *s1, *s2;
-	size_t n;
+memcmp(const void *s1, const void *s2, size_t n)
 {
 	if (n != 0) {
 		const unsigned char *p1 = s1, *p2 = s2;

Modified: user/sam/wifi/lib/libc/string/memmem.c
==============================================================================
--- user/sam/wifi/lib/libc/string/memmem.c	Thu Feb  5 18:51:14 2009	(r188167)
+++ user/sam/wifi/lib/libc/string/memmem.c	Thu Feb  5 19:04:48 2009	(r188168)
@@ -36,9 +36,7 @@ __FBSDID("$FreeBSD$");
  */
 
 void *
-memmem(l, l_len, s, s_len)
-	const void *l; size_t l_len;
-	const void *s; size_t s_len;
+memmem(const void *l, size_t l_len, const void *s, size_t s_len)
 {
 	register char *cur, *last;
 	const char *cl = (const char *)l;

Modified: user/sam/wifi/lib/libc/string/strcasecmp.c
==============================================================================
--- user/sam/wifi/lib/libc/string/strcasecmp.c	Thu Feb  5 18:51:14 2009	(r188167)
+++ user/sam/wifi/lib/libc/string/strcasecmp.c	Thu Feb  5 19:04:48 2009	(r188168)
@@ -39,8 +39,7 @@ __FBSDID("$FreeBSD$");
 typedef unsigned char u_char;
 
 int
-strcasecmp(s1, s2)
-	const char *s1, *s2;
+strcasecmp(const char *s1, const char *s2)
 {
 	const u_char
 			*us1 = (const u_char *)s1,
@@ -53,9 +52,7 @@ strcasecmp(s1, s2)
 }
 
 int
-strncasecmp(s1, s2, n)
-	const char *s1, *s2;
-	size_t n;
+strncasecmp(const char *s1, const char *s2, size_t n)
 {
 	if (n != 0) {
 		const u_char

Modified: user/sam/wifi/lib/libc/string/strcasestr.c
==============================================================================
--- user/sam/wifi/lib/libc/string/strcasestr.c	Thu Feb  5 18:51:14 2009	(r188167)
+++ user/sam/wifi/lib/libc/string/strcasestr.c	Thu Feb  5 19:04:48 2009	(r188168)
@@ -40,8 +40,7 @@ __FBSDID("$FreeBSD$");
  * Find the first occurrence of find in s, ignore case.
  */
 char *
-strcasestr(s, find)
-	const char *s, *find;
+strcasestr(const char *s, const char *find)
 {
 	char c, sc;
 	size_t len;

Modified: user/sam/wifi/lib/libc/string/strcmp.c
==============================================================================
--- user/sam/wifi/lib/libc/string/strcmp.c	Thu Feb  5 18:51:14 2009	(r188167)
+++ user/sam/wifi/lib/libc/string/strcmp.c	Thu Feb  5 19:04:48 2009	(r188168)
@@ -42,11 +42,10 @@ __FBSDID("$FreeBSD$");
  * Compare strings.
  */
 int
-strcmp(s1, s2)
-	const char *s1, *s2;
+strcmp(const char *s1, const char *s2)
 {
 	while (*s1 == *s2++)
-		if (*s1++ == 0)
+		if (*s1++ == '\0')
 			return (0);
 	return (*(const unsigned char *)s1 - *(const unsigned char *)(s2 - 1));
 }

Modified: user/sam/wifi/lib/libc/string/strcoll.c
==============================================================================
--- user/sam/wifi/lib/libc/string/strcoll.c	Thu Feb  5 18:51:14 2009	(r188167)
+++ user/sam/wifi/lib/libc/string/strcoll.c	Thu Feb  5 19:04:48 2009	(r188168)
@@ -33,8 +33,7 @@ __FBSDID("$FreeBSD$");
 #include "collate.h"
 
 int
-strcoll(s, s2)
-	const char *s, *s2;
+strcoll(const char *s, const char *s2)
 {
 	int len, len2, prim, prim2, sec, sec2, ret, ret2;
 	const char *t, *t2;

Modified: user/sam/wifi/lib/libc/string/strdup.c
==============================================================================
--- user/sam/wifi/lib/libc/string/strdup.c	Thu Feb  5 18:51:14 2009	(r188167)
+++ user/sam/wifi/lib/libc/string/strdup.c	Thu Feb  5 19:04:48 2009	(r188168)
@@ -38,8 +38,7 @@ __FBSDID("$FreeBSD$");
 #include <string.h>
 
 char *
-strdup(str)
-	const char *str;
+strdup(const char *str)
 {
 	size_t len;
 	char *copy;

Modified: user/sam/wifi/lib/libc/string/strmode.c
==============================================================================
--- user/sam/wifi/lib/libc/string/strmode.c	Thu Feb  5 18:51:14 2009	(r188167)
+++ user/sam/wifi/lib/libc/string/strmode.c	Thu Feb  5 19:04:48 2009	(r188168)
@@ -38,9 +38,7 @@ __FBSDID("$FreeBSD$");
 #include <string.h>
 
 void
-strmode(mode, p)
-	mode_t mode;
-	char *p;
+strmode(/* mode_t */ int mode, char *p)
 {
 	 /* print type */
 	switch (mode & S_IFMT) {

Modified: user/sam/wifi/lib/libc/string/strncmp.c
==============================================================================
--- user/sam/wifi/lib/libc/string/strncmp.c	Thu Feb  5 18:51:14 2009	(r188167)
+++ user/sam/wifi/lib/libc/string/strncmp.c	Thu Feb  5 19:04:48 2009	(r188168)
@@ -36,9 +36,7 @@ __FBSDID("$FreeBSD$");
 #include <string.h>
 
 int
-strncmp(s1, s2, n)
-	const char *s1, *s2;
-	size_t n;
+strncmp(const char *s1, const char *s2, size_t n)
 {
 
 	if (n == 0)
@@ -47,7 +45,7 @@ strncmp(s1, s2, n)
 		if (*s1 != *s2++)
 			return (*(const unsigned char *)s1 -
 				*(const unsigned char *)(s2 - 1));
-		if (*s1++ == 0)
+		if (*s1++ == '\0')
 			break;
 	} while (--n != 0);
 	return (0);

Modified: user/sam/wifi/lib/libc/string/strncpy.c
==============================================================================
--- user/sam/wifi/lib/libc/string/strncpy.c	Thu Feb  5 18:51:14 2009	(r188167)
+++ user/sam/wifi/lib/libc/string/strncpy.c	Thu Feb  5 19:04:48 2009	(r188168)
@@ -50,10 +50,10 @@ strncpy(char * __restrict dst, const cha
 		const char *s = src;
 
 		do {
-			if ((*d++ = *s++) == 0) {
+			if ((*d++ = *s++) == '\0') {
 				/* NUL pad the remaining n-1 bytes */
 				while (--n != 0)
-					*d++ = 0;
+					*d++ = '\0';
 				break;
 			}
 		} while (--n != 0);

Modified: user/sam/wifi/lib/libc/string/strnstr.c
==============================================================================
--- user/sam/wifi/lib/libc/string/strnstr.c	Thu Feb  5 18:51:14 2009	(r188167)
+++ user/sam/wifi/lib/libc/string/strnstr.c	Thu Feb  5 19:04:48 2009	(r188168)
@@ -44,10 +44,7 @@ __FBSDID("$FreeBSD$");
  * first slen characters of s.
  */
 char *
-strnstr(s, find, slen)
-	const char *s;
-	const char *find;
-	size_t slen;
+strnstr(const char *s, const char *find, size_t slen)
 {
 	char c, sc;
 	size_t len;

Modified: user/sam/wifi/lib/libc/string/strpbrk.c
==============================================================================
--- user/sam/wifi/lib/libc/string/strpbrk.c	Thu Feb  5 18:51:14 2009	(r188167)
+++ user/sam/wifi/lib/libc/string/strpbrk.c	Thu Feb  5 19:04:48 2009	(r188168)
@@ -39,14 +39,13 @@ __FBSDID("$FreeBSD$");
  * Find the first occurrence in s1 of a character in s2 (excluding NUL).
  */
 char *
-strpbrk(s1, s2)
-	const char *s1, *s2;
+strpbrk(const char *s1, const char *s2)
 {
 	const char *scanp;
 	int c, sc;
 
 	while ((c = *s1++) != 0) {
-		for (scanp = s2; (sc = *scanp++) != 0;)
+		for (scanp = s2; (sc = *scanp++) != '\0';)
 			if (sc == c)
 				return ((char *)(s1 - 1));
 	}

Modified: user/sam/wifi/lib/libc/string/strsep.c
==============================================================================
--- user/sam/wifi/lib/libc/string/strsep.c	Thu Feb  5 18:51:14 2009	(r188167)
+++ user/sam/wifi/lib/libc/string/strsep.c	Thu Feb  5 19:04:48 2009	(r188168)
@@ -48,9 +48,7 @@ __FBSDID("$FreeBSD$");
  * If *stringp is NULL, strsep returns NULL.
  */
 char *
-strsep(stringp, delim)
-	char **stringp;
-	const char *delim;
+strsep(char **stringp, const char *delim)
 {
 	char *s;
 	const char *spanp;

Modified: user/sam/wifi/lib/libc/string/strstr.c
==============================================================================
--- user/sam/wifi/lib/libc/string/strstr.c	Thu Feb  5 18:51:14 2009	(r188167)
+++ user/sam/wifi/lib/libc/string/strstr.c	Thu Feb  5 19:04:48 2009	(r188168)
@@ -42,17 +42,16 @@ __FBSDID("$FreeBSD$");
  * Find the first occurrence of find in s.
  */
 char *
-strstr(s, find)
-	const char *s, *find;
+strstr(const char *s, const char *find)
 {
 	char c, sc;
 	size_t len;
 
-	if ((c = *find++) != 0) {
+	if ((c = *find++) != '\0') {
 		len = strlen(find);
 		do {
 			do {
-				if ((sc = *s++) == 0)
+				if ((sc = *s++) == '\0')
 					return (NULL);
 			} while (sc != c);
 		} while (strncmp(s, find, len) != 0);

Modified: user/sam/wifi/lib/libc/string/wcscat.c
==============================================================================
--- user/sam/wifi/lib/libc/string/wcscat.c	Thu Feb  5 18:51:14 2009	(r188167)
+++ user/sam/wifi/lib/libc/string/wcscat.c	Thu Feb  5 19:04:48 2009	(r188168)
@@ -37,9 +37,7 @@ __FBSDID("$FreeBSD$");
 #include <wchar.h>
 
 wchar_t *
-wcscat(s1, s2)
-	wchar_t * __restrict s1;
-	const wchar_t * __restrict s2;
+wcscat(wchar_t * __restrict s1, const wchar_t * __restrict s2)
 {
 	wchar_t *cp;
 

Modified: user/sam/wifi/lib/libc/string/wcscmp.c
==============================================================================
--- user/sam/wifi/lib/libc/string/wcscmp.c	Thu Feb  5 18:51:14 2009	(r188167)
+++ user/sam/wifi/lib/libc/string/wcscmp.c	Thu Feb  5 19:04:48 2009	(r188168)
@@ -45,12 +45,11 @@ __FBSDID("$FreeBSD$");
  * Compare strings.
  */
 int
-wcscmp(s1, s2)
-	const wchar_t *s1, *s2;
+wcscmp(const wchar_t *s1, const wchar_t *s2)
 {
 
 	while (*s1 == *s2++)
-		if (*s1++ == 0)
+		if (*s1++ == '\0')
 			return (0);
 	/* XXX assumes wchar_t = int */
 	return (*(const unsigned int *)s1 - *(const unsigned int *)--s2);

Modified: user/sam/wifi/lib/libc/string/wcscpy.c
==============================================================================
--- user/sam/wifi/lib/libc/string/wcscpy.c	Thu Feb  5 18:51:14 2009	(r188167)
+++ user/sam/wifi/lib/libc/string/wcscpy.c	Thu Feb  5 19:04:48 2009	(r188168)
@@ -37,9 +37,7 @@ __FBSDID("$FreeBSD$");
 #include <wchar.h>
 
 wchar_t *
-wcscpy(s1, s2)
-	wchar_t * __restrict s1;
-	const wchar_t * __restrict s2;
+wcscpy(wchar_t * __restrict s1, const wchar_t * __restrict s2)
 {
 	wchar_t *cp;
 

Modified: user/sam/wifi/lib/libc/string/wcscspn.c
==============================================================================
--- user/sam/wifi/lib/libc/string/wcscspn.c	Thu Feb  5 18:51:14 2009	(r188167)
+++ user/sam/wifi/lib/libc/string/wcscspn.c	Thu Feb  5 19:04:48 2009	(r188168)
@@ -37,9 +37,7 @@ __FBSDID("$FreeBSD$");
 #include <wchar.h>
 
 size_t
-wcscspn(s, set)
-	const wchar_t *s;
-	const wchar_t *set;
+wcscspn(const wchar_t *s, const wchar_t *set)
 {
 	const wchar_t *p;
 	const wchar_t *q;

Modified: user/sam/wifi/lib/libc/string/wcslcat.c
==============================================================================
--- user/sam/wifi/lib/libc/string/wcslcat.c	Thu Feb  5 18:51:14 2009	(r188167)
+++ user/sam/wifi/lib/libc/string/wcslcat.c	Thu Feb  5 19:04:48 2009	(r188168)
@@ -46,10 +46,7 @@ __FBSDID("$FreeBSD$");
  * truncation occurred.
  */
 size_t
-wcslcat(dst, src, siz)
-	wchar_t *dst;
-	const wchar_t *src;
-	size_t siz;
+wcslcat(wchar_t *dst, const wchar_t *src, size_t siz)
 {
 	wchar_t *d = dst;
 	const wchar_t *s = src;

Modified: user/sam/wifi/lib/libc/string/wcslcpy.c
==============================================================================
--- user/sam/wifi/lib/libc/string/wcslcpy.c	Thu Feb  5 18:51:14 2009	(r188167)
+++ user/sam/wifi/lib/libc/string/wcslcpy.c	Thu Feb  5 19:04:48 2009	(r188168)
@@ -44,10 +44,7 @@ __FBSDID("$FreeBSD$");
  * Returns wcslen(src); if retval >= siz, truncation occurred.
  */
 size_t
-wcslcpy(dst, src, siz)
-	wchar_t *dst;
-	const wchar_t *src;
-	size_t siz;
+wcslcpy(wchar_t *dst, const wchar_t *src, size_t siz)
 {
 	wchar_t *d = dst;
 	const wchar_t *s = src;

Modified: user/sam/wifi/lib/libc/string/wcslen.c
==============================================================================
--- user/sam/wifi/lib/libc/string/wcslen.c	Thu Feb  5 18:51:14 2009	(r188167)
+++ user/sam/wifi/lib/libc/string/wcslen.c	Thu Feb  5 19:04:48 2009	(r188168)
@@ -37,8 +37,7 @@ __FBSDID("$FreeBSD$");
 #include <wchar.h>
 
 size_t
-wcslen(s)
-	const wchar_t *s;
+wcslen(const wchar_t *s)
 {
 	const wchar_t *p;
 

Modified: user/sam/wifi/lib/libc/string/wcsncat.c
==============================================================================
--- user/sam/wifi/lib/libc/string/wcsncat.c	Thu Feb  5 18:51:14 2009	(r188167)
+++ user/sam/wifi/lib/libc/string/wcsncat.c	Thu Feb  5 19:04:48 2009	(r188168)
@@ -37,10 +37,7 @@ __FBSDID("$FreeBSD$");
 #include <wchar.h>
 
 wchar_t *
-wcsncat(s1, s2, n)
-	wchar_t * __restrict s1;
-	const wchar_t * __restrict s2;
-	size_t n;
+wcsncat(wchar_t * __restrict s1, const wchar_t * __restrict s2, size_t n)
 {
 	wchar_t *p;
 	wchar_t *q;

Modified: user/sam/wifi/lib/libc/string/wcsncmp.c
==============================================================================
--- user/sam/wifi/lib/libc/string/wcsncmp.c	Thu Feb  5 18:51:14 2009	(r188167)
+++ user/sam/wifi/lib/libc/string/wcsncmp.c	Thu Feb  5 19:04:48 2009	(r188168)
@@ -39,9 +39,7 @@ __FBSDID("$FreeBSD$");
 #include <wchar.h>
 
 int
-wcsncmp(s1, s2, n)
-	const wchar_t *s1, *s2;
-	size_t n;
+wcsncmp(const wchar_t *s1, const wchar_t *s2, size_t n)
 {
 
 	if (n == 0)

Modified: user/sam/wifi/lib/libc/string/wcspbrk.c
==============================================================================
--- user/sam/wifi/lib/libc/string/wcspbrk.c	Thu Feb  5 18:51:14 2009	(r188167)
+++ user/sam/wifi/lib/libc/string/wcspbrk.c	Thu Feb  5 19:04:48 2009	(r188168)
@@ -37,9 +37,7 @@ __FBSDID("$FreeBSD$");
 #include <wchar.h>
 
 wchar_t *
-wcspbrk(s, set)
-	const wchar_t *s;
-	const wchar_t *set;
+wcspbrk(const wchar_t *s, const wchar_t *set)
 {
 	const wchar_t *p;
 	const wchar_t *q;

Modified: user/sam/wifi/lib/libc/string/wcsspn.c
==============================================================================
--- user/sam/wifi/lib/libc/string/wcsspn.c	Thu Feb  5 18:51:14 2009	(r188167)
+++ user/sam/wifi/lib/libc/string/wcsspn.c	Thu Feb  5 19:04:48 2009	(r188168)
@@ -37,9 +37,7 @@ __FBSDID("$FreeBSD$");
 #include <wchar.h>
 
 size_t
-wcsspn(s, set)
-	const wchar_t *s;
-	const wchar_t *set;
+wcsspn(const wchar_t *s, const wchar_t *set)
 {
 	const wchar_t *p;
 	const wchar_t *q;

Modified: user/sam/wifi/lib/libc/string/wcsstr.c
==============================================================================
--- user/sam/wifi/lib/libc/string/wcsstr.c	Thu Feb  5 18:51:14 2009	(r188167)
+++ user/sam/wifi/lib/libc/string/wcsstr.c	Thu Feb  5 19:04:48 2009	(r188168)
@@ -49,7 +49,7 @@ wcsstr(const wchar_t * __restrict s, con
 	wchar_t c, sc;
 	size_t len;
 
-	if ((c = *find++) != 0) {
+	if ((c = *find++) != L'\0') {
 		len = wcslen(find);
 		do {
 			do {

Modified: user/sam/wifi/lib/libc/string/wmemchr.c
==============================================================================
--- user/sam/wifi/lib/libc/string/wmemchr.c	Thu Feb  5 18:51:14 2009	(r188167)
+++ user/sam/wifi/lib/libc/string/wmemchr.c	Thu Feb  5 19:04:48 2009	(r188168)
@@ -37,10 +37,7 @@ __FBSDID("$FreeBSD$");
 #include <wchar.h>
 
 wchar_t	*
-wmemchr(s, c, n)
-	const wchar_t *s;
-	wchar_t c;
-	size_t n;
+wmemchr(const wchar_t *s, wchar_t c, size_t n)
 {
 	size_t i;
 

Modified: user/sam/wifi/lib/libc/string/wmemcmp.c
==============================================================================
--- user/sam/wifi/lib/libc/string/wmemcmp.c	Thu Feb  5 18:51:14 2009	(r188167)
+++ user/sam/wifi/lib/libc/string/wmemcmp.c	Thu Feb  5 19:04:48 2009	(r188168)
@@ -37,10 +37,7 @@ __FBSDID("$FreeBSD$");
 #include <wchar.h>
 
 int
-wmemcmp(s1, s2, n)
-	const wchar_t *s1;
-	const wchar_t *s2;
-	size_t n;
+wmemcmp(const wchar_t *s1, const wchar_t *s2, size_t n)
 {
 	size_t i;
 

Modified: user/sam/wifi/lib/libc/string/wmemcpy.c
==============================================================================
--- user/sam/wifi/lib/libc/string/wmemcpy.c	Thu Feb  5 18:51:14 2009	(r188167)
+++ user/sam/wifi/lib/libc/string/wmemcpy.c	Thu Feb  5 19:04:48 2009	(r188168)
@@ -38,11 +38,7 @@ __FBSDID("$FreeBSD$");
 #include <wchar.h>
 
 wchar_t *
-wmemcpy(d, s, n)
-	wchar_t * __restrict d;
-	const wchar_t * __restrict s;
-	size_t n;
+wmemcpy(wchar_t * __restrict d, const wchar_t * __restrict s, size_t n)
 {
-
 	return (wchar_t *)memcpy(d, s, n * sizeof(wchar_t));
 }

Modified: user/sam/wifi/lib/libc/string/wmemmove.c
==============================================================================
--- user/sam/wifi/lib/libc/string/wmemmove.c	Thu Feb  5 18:51:14 2009	(r188167)
+++ user/sam/wifi/lib/libc/string/wmemmove.c	Thu Feb  5 19:04:48 2009	(r188168)
@@ -38,11 +38,7 @@ __FBSDID("$FreeBSD$");
 #include <wchar.h>
 
 wchar_t *
-wmemmove(d, s, n)
-	wchar_t *d;
-	const wchar_t *s;
-	size_t n;
+wmemmove(wchar_t *d, const wchar_t *s, size_t n)
 {
-
 	return (wchar_t *)memmove(d, s, n * sizeof(wchar_t));
 }

Modified: user/sam/wifi/lib/libc/string/wmemset.c
==============================================================================
--- user/sam/wifi/lib/libc/string/wmemset.c	Thu Feb  5 18:51:14 2009	(r188167)
+++ user/sam/wifi/lib/libc/string/wmemset.c	Thu Feb  5 19:04:48 2009	(r188168)
@@ -37,10 +37,7 @@ __FBSDID("$FreeBSD$");
 #include <wchar.h>
 
 wchar_t	*
-wmemset(s, c, n)
-	wchar_t *s;
-	wchar_t c;
-	size_t n;
+wmemset(wchar_t *s, wchar_t c, size_t n)
 {
 	size_t i;
 	wchar_t *p;

Modified: user/sam/wifi/lib/libc/sys/send.2
==============================================================================
--- user/sam/wifi/lib/libc/sys/send.2	Thu Feb  5 18:51:14 2009	(r188167)
+++ user/sam/wifi/lib/libc/sys/send.2	Thu Feb  5 19:04:48 2009	(r188168)
@@ -28,7 +28,7 @@
 .\"     From: @(#)send.2	8.2 (Berkeley) 2/21/94
 .\" $FreeBSD$
 .\"
-.Dd September 13, 2006
+.Dd February 5, 2009
 .Dt SEND 2
 .Os
 .Sh NAME
@@ -190,7 +190,7 @@ receiver is not listening on the remote 
 The remote host was down.
 .It Bq Er ENETDOWN
 The remote network was down.
-.It Bq Er EPERM
+.It Bq Er EADDRNOTAVAIL
 The process using a
 .Dv SOCK_RAW
 socket was jailed and the source

Modified: user/sam/wifi/lib/libusbhid/Makefile
==============================================================================
--- user/sam/wifi/lib/libusbhid/Makefile	Thu Feb  5 18:51:14 2009	(r188167)
+++ user/sam/wifi/lib/libusbhid/Makefile	Thu Feb  5 19:04:48 2009	(r188168)
@@ -15,7 +15,7 @@ MLINKS=	usbhid.3 libusbhid.3 usbhid.3 hi
 	usbhid.3 hid_init.3 \
 	usbhid.3 hid_get_data.3 usbhid.3 hid_set_data.3
 
-SRCS=	descr.c parse.c usage.c data.c
+SRCS=	descr.c descr_compat.c parse.c usage.c data.c
 
 INCS=	usbhid.h
 

Modified: user/sam/wifi/lib/libusbhid/descr.c
==============================================================================
--- user/sam/wifi/lib/libusbhid/descr.c	Thu Feb  5 18:51:14 2009	(r188167)
+++ user/sam/wifi/lib/libusbhid/descr.c	Thu Feb  5 19:04:48 2009	(r188168)
@@ -39,21 +39,83 @@ __FBSDID("$FreeBSD$");
 #include <sys/time.h>
 #include <sys/ioctl.h>
 
-#include <dev/usb/usb.h>
+#include <dev/usb2/include/usb2_ioctl.h>
 
 #include "usbhid.h"
 #include "usbvar.h"
 
+int
+hid_set_immed(int fd, int enable)
+{
+	int ret;
+	ret = ioctl(fd, USB_SET_IMMED, &enable);
+	if (ret < 0)
+		ret = hid_set_immed_compat7(fd, enable);
+	return (ret);
+}
+
+int
+hid_get_report_id(int fd)
+{
+	int temp = -1;
+	int ret;
+
+	ret = ioctl(fd, USB_GET_REPORT_ID, &temp);
+	if (ret < 0)
+		ret = hid_get_report_id_compat7(fd);
+	else
+		ret = temp;
+
+	return (ret);
+}
+
 report_desc_t
 hid_get_report_desc(int fd)
 {
-	struct usb_ctl_report_desc rep;
+	struct usb2_gen_descriptor ugd;
+	report_desc_t rep;
+	void *data;
+
+	memset(&ugd, 0, sizeof(ugd));
+
+	/* get actual length first */
+	ugd.ugd_data = NULL;
+	ugd.ugd_maxlen = 65535;
+	if (ioctl(fd, USB_GET_REPORT_DESC, &ugd) < 0) {
+		/* could not read descriptor */
+		/* try FreeBSD 7 compat code */
+		return (hid_get_report_desc_compat7(fd));
+	}
 
-	rep.ucrd_size = 0;
-	if (ioctl(fd, USB_GET_REPORT_DESC, &rep) < 0)
+	/*
+	 * NOTE: The kernel will return a failure if 
+	 * "ugd_actlen" is zero.
+	 */
+	data = malloc(ugd.ugd_actlen);
+	if (data == NULL)
 		return (NULL);
 
-	return hid_use_report_desc(rep.ucrd_data, (unsigned int)rep.ucrd_size);
+	/* fetch actual descriptor */
+	ugd.ugd_data = data;
+	ugd.ugd_maxlen = ugd.ugd_actlen;
+	if (ioctl(fd, USB_GET_REPORT_DESC, &ugd) < 0) {
+		/* could not read descriptor */
+		free(data);
+		return (NULL);
+	}
+
+	/* check END_COLLECTION */
+	if (((unsigned char *)ugd.ugd_data)[ugd.ugd_actlen -1] != 0xC0) {
+		/* invalid end byte */
+		free(data);
+		return (NULL);
+	}
+
+	rep = hid_use_report_desc(data, ugd.ugd_actlen);
+
+	free(data);
+
+	return (rep);
 }
 
 report_desc_t

Copied: user/sam/wifi/lib/libusbhid/descr_compat.c (from r188167, head/lib/libusbhid/descr_compat.c)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/sam/wifi/lib/libusbhid/descr_compat.c	Thu Feb  5 19:04:48 2009	(r188168, copy of r188167, head/lib/libusbhid/descr_compat.c)
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 1999 Lennart Augustsson <augustss@netbsd.org>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * This file contains fallback-compatibility code for the old FreeBSD
+ * USB stack.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/types.h>
+
+#include <assert.h>
+#include <errno.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <sys/time.h>
+#include <sys/ioctl.h>
+
+#include <dev/usb/usb.h>
+
+#include "usbhid.h"
+#include "usbvar.h"
+
+int
+hid_set_immed_compat7(int fd, int enable)
+{
+	return (ioctl(fd, USB_SET_IMMED, &enable));
+}
+
+int
+hid_get_report_id_compat7(int fd)
+{
+	int temp = -1;
+
+	if (ioctl(fd, USB_GET_REPORT_ID, &temp) < 0)
+		return (-1);
+
+	return (temp);
+}
+
+report_desc_t
+hid_get_report_desc_compat7(int fd)
+{
+	struct usb_ctl_report_desc rep;
+
+	rep.ucrd_size = 0;
+	if (ioctl(fd, USB_GET_REPORT_DESC, &rep) < 0)
+		return (NULL);
+
+	return (hid_use_report_desc(rep.ucrd_data, (unsigned int)rep.ucrd_size));
+}

Modified: user/sam/wifi/lib/libusbhid/usbhid.3
==============================================================================
--- user/sam/wifi/lib/libusbhid/usbhid.3	Thu Feb  5 18:51:14 2009	(r188167)
+++ user/sam/wifi/lib/libusbhid/usbhid.3	Thu Feb  5 19:04:48 2009	(r188168)
@@ -26,12 +26,13 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd December 29, 2001
+.Dd January 27, 2009
 .Dt USBHID 3
 .Os
 .Sh NAME
 .Nm usbhid ,
 .Nm hid_get_report_desc ,
+.Nm hid_get_report_id ,
 .Nm hid_use_report_desc ,
 .Nm hid_dispose_report_desc ,
 .Nm hid_start_parse ,
@@ -51,6 +52,10 @@
 .In usbhid.h
 .Ft report_desc_t
 .Fn hid_get_report_desc "int file"
+.Ft int
+.Fn hid_get_report_id "int file"
+.Ft int
+.Fn hid_set_immed "int fd" "int enable"
 .Ft report_desc_t
 .Fn hid_use_report_desc "unsigned char *data" "unsigned int size"
 .Ft void
@@ -94,7 +99,15 @@ which contains the data layout informati
 The routines can be divided into four parts: extraction of the descriptor,
 parsing of the descriptor, translating to/from symbolic names, and
 data manipulation.
+.Ss Synchronous HID operation
+Synchronous HID operation can be enabled or disabled by a call to
+.Fn hid_set_immed .
+If the second argument is zero synchronous HID operation is disabled.
+Else synchronous HID operation is enabled.
+The function returns a negative value on failure.
 .Ss Descriptor Functions
+The report descriptor ID can be obtained by calling
+.Fn hid_get_report_id .
 A report descriptor can be obtained by calling
 .Fn hid_get_report_desc
 with a file descriptor obtained by opening a

Modified: user/sam/wifi/lib/libusbhid/usbhid.h
==============================================================================
--- user/sam/wifi/lib/libusbhid/usbhid.h	Thu Feb  5 18:51:14 2009	(r188167)
+++ user/sam/wifi/lib/libusbhid/usbhid.h	Thu Feb  5 19:04:48 2009	(r188168)
@@ -87,6 +87,8 @@ __BEGIN_DECLS
 report_desc_t hid_get_report_desc(int file);
 report_desc_t hid_use_report_desc(unsigned char *data, unsigned int size);
 void hid_dispose_report_desc(report_desc_t);
+int hid_get_report_id(int file);
+int hid_set_immed(int fd, int enable);
 
 /* Parsing of a HID report descriptor, parse.c: */
 hid_data_t hid_start_parse(report_desc_t d, int kindset, int id);

Modified: user/sam/wifi/lib/libusbhid/usbvar.h
==============================================================================
--- user/sam/wifi/lib/libusbhid/usbvar.h	Thu Feb  5 18:51:14 2009	(r188167)
+++ user/sam/wifi/lib/libusbhid/usbvar.h	Thu Feb  5 19:04:48 2009	(r188168)
@@ -34,3 +34,8 @@ struct report_desc {
 	unsigned char data[1];
 };
 
+/* internal backwards compatibility functions */
+
+int	hid_set_immed_compat7(int fd, int enable);
+int	hid_get_report_id_compat7(int fd);
+report_desc_t	hid_get_report_desc_compat7(int fd);

Modified: user/sam/wifi/sbin/fsck_ffs/fsck.h
==============================================================================
--- user/sam/wifi/sbin/fsck_ffs/fsck.h	Thu Feb  5 18:51:14 2009	(r188167)
+++ user/sam/wifi/sbin/fsck_ffs/fsck.h	Thu Feb  5 19:04:48 2009	(r188168)
@@ -270,7 +270,7 @@ char	yflag;			/* assume a yes response *
 int	bkgrdflag;		/* use a snapshot to run on an active system */
 int	bflag;			/* location of alternate super block */
 int	debug;			/* output debugging info */
-char	damagedflag;		/* run in damaged mode */
+int	inoopt;			/* trim out unused inodes */
 char	ckclean;		/* only do work if not cleanly unmounted */
 int	cvtlevel;		/* convert to newer file system format */
 int	bkgrdcheck;		/* determine if background check is possible */
@@ -337,7 +337,7 @@ void		cacheino(union dinode *dp, ino_t i
 void		catch(int);
 void		catchquit(int);
 int		changeino(ino_t dir, const char *name, ino_t newnum);
-void		check_cgmagic(int cg, struct cg *cgp);
+int		check_cgmagic(int cg, struct cg *cgp);
 int		chkrange(ufs2_daddr_t blk, int cnt);
 void		ckfini(int markclean);
 int		ckinode(union dinode *dp, struct inodesc *);
@@ -362,7 +362,7 @@ int		ftypeok(union dinode *dp);
 void		getblk(struct bufarea *bp, ufs2_daddr_t blk, long size);
 struct bufarea *getdatablk(ufs2_daddr_t blkno, long size);
 struct inoinfo *getinoinfo(ino_t inumber);
-union dinode   *getnextinode(ino_t inumber);
+union dinode   *getnextinode(ino_t inumber, int rebuildcg);
 void		getpathname(char *namebuf, ino_t curdir, ino_t ino);
 union dinode   *ginode(ino_t inumber);
 void		infohandler(int sig);

Modified: user/sam/wifi/sbin/fsck_ffs/fsck_ffs.8
==============================================================================
--- user/sam/wifi/sbin/fsck_ffs/fsck_ffs.8	Thu Feb  5 18:51:14 2009	(r188167)
+++ user/sam/wifi/sbin/fsck_ffs/fsck_ffs.8	Thu Feb  5 19:04:48 2009	(r188168)
@@ -38,7 +38,7 @@
 .Nd file system consistency check and interactive repair
 .Sh SYNOPSIS
 .Nm
-.Op Fl BDFpfny
+.Op Fl BFprfny
 .Op Fl b Ar block
 .Op Fl c Ar level
 .Op Fl m Ar mode
@@ -216,22 +216,6 @@ are being converted at once.
 The format of a file system can be determined from the
 first line of output from
 .Xr dumpfs 8 .
-.It Fl D
-Run
-.Nm
-in 'damaged recovery' mode, which will enable certain aggressive
-operations that can make
-.Nm
-to survive with file systems that has very serious data damage, which
-is an useful last resort when on disk data damage is very serious
-and causes
-.Nm
-to crash otherwise.  Be
-.Em very careful
-using this flag, it is dangerous if there are data transmission hazards
-because a false positive cylinder group magic number mismatch could
-cause
-.Em irrevertible data loss!
 .Pp
 This option implies the
 .Fl f
@@ -259,6 +243,15 @@ which is assumed to be affirmative;
 do not open the file system for writing.
 .It Fl p
 Preen file systems (see above).
+.It Fl r
+Free up excess unused inodes.
+Decreasing the number of preallocated inodes reduces the
+running time of future runs of
+.Nm
+and frees up space that can allocated to files.
+The
+.Fl r
+option is ignored when running in preen mode.
 .It Fl y
 Assume a yes response to all questions asked by
 .Nm ;

Modified: user/sam/wifi/sbin/fsck_ffs/fsutil.c
==============================================================================
--- user/sam/wifi/sbin/fsck_ffs/fsutil.c	Thu Feb  5 18:51:14 2009	(r188167)
+++ user/sam/wifi/sbin/fsck_ffs/fsutil.c	Thu Feb  5 19:04:48 2009	(r188168)
@@ -333,9 +333,13 @@ ckfini(int markclean)
 			if (!markclean)
 				rerun = 1;
 		}
-	} else if (!preen && !markclean) {
-		printf("\n***** FILE SYSTEM STILL DIRTY *****\n");
-		rerun = 1;
+	} else if (!preen) {
+		if (markclean) {
+			printf("\n***** FILE SYSTEM IS CLEAN *****\n");
+		} else {
+			printf("\n***** FILE SYSTEM STILL DIRTY *****\n");
+			rerun = 1;
+		}
 	}
 	if (debug && totalreads > 0)
 		printf("cache missed %ld of %ld (%d%%)\n", diskreads,
@@ -418,32 +422,73 @@ blwrite(int fd, char *buf, ufs2_daddr_t 
 }
 
 /*
- * Check cg's magic number.  If catastrophic mode is enabled and the cg's
- * magic number is bad, offer an option to clear the whole cg.
+ * Verify cylinder group's magic number and other parameters.  If the
+ * test fails, offer an option to rebuild the whole cylinder group.
  */
-void
+int
 check_cgmagic(int cg, struct cg *cgp)
 {
 
-	if (!cg_chkmagic(cgp)) {
-	    pwarn("CG %d: BAD MAGIC NUMBER\n", cg);
-	    if (damagedflag) {
-		if (reply("CLEAR CG")) {
-			memset(cgp, 0, (size_t)sblock.fs_cgsize);
-			cgp->cg_initediblk = sblock.fs_ipg;
-			cgp->cg_old_niblk = sblock.fs_ipg;
-			cgp->cg_old_ncyl = sblock.fs_old_cpg;
-			cgp->cg_cgx = cg;
-			cgp->cg_niblk = sblock.fs_ipg;
-			cgp->cg_ndblk = sblock.fs_size - cgbase(&sblock, cg);
-			cgp->cg_magic = CG_MAGIC;
-			cgdirty();
-			printf("PLEASE RERUN FSCK.\n");
-			rerun = 1;
-		}
-	    } else
-		printf("YOU MAY NEED TO RERUN FSCK WITH -D IF IT CRASHED.\n");
+	/*
+	 * Extended cylinder group checks.
+	 */
+	if (cg_chkmagic(cgp) &&
+	    ((sblock.fs_magic == FS_UFS1_MAGIC &&
+	      cgp->cg_old_niblk == sblock.fs_ipg &&
+	      cgp->cg_ndblk <= sblock.fs_fpg &&
+	      cgp->cg_old_ncyl == sblock.fs_old_cpg) ||
+	     (sblock.fs_magic == FS_UFS2_MAGIC &&
+	      cgp->cg_niblk == sblock.fs_ipg &&
+	      cgp->cg_ndblk <= sblock.fs_fpg &&
+	      cgp->cg_initediblk <= sblock.fs_ipg))) {
+		return (1);
+	}
+	pfatal("CYLINDER GROUP %d: BAD MAGIC NUMBER", cg);
+	if (!reply("REBUILD CYLINDER GROUP")) {
+		printf("YOU WILL NEED TO RERUN FSCK.\n");
+		rerun = 1;
+		return (1);
 	}
+	/*
+	 * Zero out the cylinder group and then initialize critical fields.
+	 * Bit maps and summaries will be recalculated by later passes.
+	 */
+	memset(cgp, 0, (size_t)sblock.fs_cgsize);
+	cgp->cg_magic = CG_MAGIC;
+	cgp->cg_cgx = cg;
+	cgp->cg_niblk = sblock.fs_ipg;
+	cgp->cg_initediblk = sblock.fs_ipg < 2 * INOPB(&sblock) ?
+	    sblock.fs_ipg : 2 * INOPB(&sblock);
+	if (cgbase(&sblock, cg) + sblock.fs_fpg < sblock.fs_size)
+		cgp->cg_ndblk = sblock.fs_fpg;
+	else
+		cgp->cg_ndblk = sblock.fs_size - cgbase(&sblock, cg);
+	cgp->cg_iusedoff = &cgp->cg_space[0] - (u_char *)(&cgp->cg_firstfield);
+	if (sblock.fs_magic == FS_UFS1_MAGIC) {
+		cgp->cg_niblk = 0;
+		cgp->cg_initediblk = 0;
+		cgp->cg_old_ncyl = sblock.fs_old_cpg;
+		cgp->cg_old_niblk = sblock.fs_ipg;
+		cgp->cg_old_btotoff = cgp->cg_iusedoff;
+		cgp->cg_old_boff = cgp->cg_old_btotoff +
+		    sblock.fs_old_cpg * sizeof(int32_t);
+		cgp->cg_iusedoff = cgp->cg_old_boff +
+		    sblock.fs_old_cpg * sizeof(u_int16_t);
+	}
+	cgp->cg_freeoff = cgp->cg_iusedoff + howmany(sblock.fs_ipg, CHAR_BIT);

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-user@FreeBSD.ORG  Thu Feb  5 19:09:15 2009
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id BE23F106566B;
	Thu,  5 Feb 2009 19:09:15 +0000 (UTC) (envelope-from sam@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 3A68E8FC1E;
	Thu,  5 Feb 2009 19:09:15 +0000 (UTC) (envelope-from sam@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n15J9FTQ035484;
	Thu, 5 Feb 2009 19:09:15 GMT (envelope-from sam@svn.freebsd.org)
Received: (from sam@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n15J9F5Q035482;
	Thu, 5 Feb 2009 19:09:15 GMT (envelope-from sam@svn.freebsd.org)
Message-Id: <200902051909.n15J9F5Q035482@svn.freebsd.org>
From: Sam Leffler <sam@FreeBSD.org>
Date: Thu, 5 Feb 2009 19:09:15 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r188169 - user/sam/wifi/sys/net80211
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 05 Feb 2009 19:09:29 -0000

Author: sam
Date: Thu Feb  5 19:09:15 2009
New Revision: 188169
URL: http://svn.freebsd.org/changeset/base/188169

Log:
  explicitly add these

Added:
  user/sam/wifi/sys/net80211/ieee80211_tdma.c   (contents, props changed)
  user/sam/wifi/sys/net80211/ieee80211_tdma.h   (contents, props changed)

Added: user/sam/wifi/sys/net80211/ieee80211_tdma.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/sam/wifi/sys/net80211/ieee80211_tdma.c	Thu Feb  5 19:09:15 2009	(r188169)
@@ -0,0 +1,731 @@
+/*-
+ * Copyright (c) 2007-2009 Sam Leffler, Errno Consulting
+ * Copyright (c) 2007-2009 Intel Corporation
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <sys/cdefs.h>
+#ifdef __FreeBSD__
+__FBSDID("$FreeBSD$");
+#endif
+
+/*
+ * IEEE 802.11 TDMA mode support.
+ */
+#include "opt_inet.h"
+#include "opt_wlan.h"
+
+#ifdef IEEE80211_SUPPORT_TDMA
+#include <sys/param.h>
+#include <sys/systm.h> 
+#include <sys/mbuf.h>   
+#include <sys/malloc.h>
+#include <sys/kernel.h>
+
+#include <sys/socket.h>
+#include <sys/sockio.h>
+#include <sys/endian.h>
+#include <sys/errno.h>
+#include <sys/proc.h>
+#include <sys/sysctl.h>
+
+#include <net/if.h>
+#include <net/if_media.h>
+#include <net/if_llc.h>
+#include <net/ethernet.h>
+
+#include <net/bpf.h>
+
+#include <net80211/ieee80211_var.h>
+#include <net80211/ieee80211_tdma.h>
+#include <net80211/ieee80211_input.h>
+
+#include "opt_tdma.h"
+#ifndef TDMA_SLOTLEN_DEFAULT
+#define	TDMA_SLOTLEN_DEFAULT	10*1000		/* 10ms */
+#endif
+#ifndef TDMA_SLOTCNT_DEFAULT
+#define	TDMA_SLOTCNT_DEFAULT	2		/* 2x (pt-to-pt) */
+#endif
+#ifndef TDMA_BINTVAL_DEFAULT
+#define	TDMA_BINTVAL_DEFAULT	5		/* 5x ~= 100TU beacon intvl */
+#endif
+#ifndef TDMA_TXRATE_11B_DEFAULT
+#define	TDMA_TXRATE_11B_DEFAULT	2*11
+#endif
+#ifndef TDMA_TXRATE_11G_DEFAULT
+#define	TDMA_TXRATE_11G_DEFAULT	2*24
+#endif
+#ifndef TDMA_TXRATE_11A_DEFAULT
+#define	TDMA_TXRATE_11A_DEFAULT	2*24
+#endif
+#ifndef TDMA_TXRATE_STURBO_A_DEFAULT
+#define	TDMA_TXRATE_STURBO_A_DEFAULT	2*24
+#endif
+#ifndef TDMA_TXRATE_11NA_DEFAULT
+#define	TDMA_TXRATE_11NA_DEFAULT	(4 | IEEE80211_RATE_MCS)
+#endif
+#ifndef TDMA_TXRATE_11NG_DEFAULT
+#define	TDMA_TXRATE_11NG_DEFAULT	(4 | IEEE80211_RATE_MCS)
+#endif
+
+static void tdma_vdetach(struct ieee80211vap *vap);
+static int tdma_newstate(struct ieee80211vap *, enum ieee80211_state, int);
+static void tdma_beacon_miss(struct ieee80211vap *vap);
+static void tdma_recv_mgmt(struct ieee80211_node *, struct mbuf *,
+	int subtype, int rssi, int noise, uint32_t rstamp);
+static int tdma_update(struct ieee80211vap *vap,
+	const struct ieee80211_tdma_param *tdma, struct ieee80211_node *ni,
+	int pickslot);
+static int tdma_process_params(struct ieee80211_node *ni,
+	const u_int8_t *ie, u_int32_t rstamp, const struct ieee80211_frame *wh);
+
+static void
+settxparms(struct ieee80211vap *vap, enum ieee80211_phymode mode, int rate)
+{
+	vap->iv_txparms[mode].ucastrate = rate;
+	vap->iv_txparms[mode].mcastrate = rate;
+}
+
+static void
+setackpolicy(struct ieee80211com *ic, int noack)
+{
+	struct ieee80211_wme_state *wme = &ic->ic_wme;
+	int ac;
+
+	for (ac = 0; ac < WME_NUM_AC; ac++) {
+		wme->wme_chanParams.cap_wmeParams[ac].wmep_noackPolicy = noack;
+		wme->wme_wmeChanParams.cap_wmeParams[ac].wmep_noackPolicy = noack;
+	}
+}
+
+void
+ieee80211_tdma_vattach(struct ieee80211vap *vap)
+{
+	struct ieee80211_tdma_state *ts;
+
+	KASSERT(vap->iv_caps & IEEE80211_C_TDMA,
+	     ("not a tdma vap, caps 0x%x", vap->iv_caps));
+
+	ts = (struct ieee80211_tdma_state *) malloc(
+	     sizeof(struct ieee80211_tdma_state), M_80211_VAP, M_NOWAIT | M_ZERO);
+	if (ts == NULL) {
+		printf("%s: cannot allocate TDMA state block\n", __func__);
+		/* NB: fall back to adhdemo mode */
+		vap->iv_caps &= ~IEEE80211_C_TDMA;
+		return;
+	}
+	/* NB: default configuration is passive so no beacons */
+	ts->tdma_slotlen = TDMA_SLOTLEN_DEFAULT;
+	ts->tdma_slotcnt = TDMA_SLOTCNT_DEFAULT;
+	ts->tdma_bintval = TDMA_BINTVAL_DEFAULT;
+	ts->tdma_slot = 1;			/* passive operation */
+
+	/* setup default fixed rates */
+	settxparms(vap, IEEE80211_MODE_11A, TDMA_TXRATE_11A_DEFAULT);
+	settxparms(vap, IEEE80211_MODE_11B, TDMA_TXRATE_11B_DEFAULT);
+	settxparms(vap, IEEE80211_MODE_11G, TDMA_TXRATE_11G_DEFAULT);
+	settxparms(vap, IEEE80211_MODE_STURBO_A, TDMA_TXRATE_STURBO_A_DEFAULT);
+	settxparms(vap, IEEE80211_MODE_11NA, TDMA_TXRATE_11NA_DEFAULT);
+	settxparms(vap, IEEE80211_MODE_11NG, TDMA_TXRATE_11NG_DEFAULT);
+
+	setackpolicy(vap->iv_ic, 1);	/* disable ACK's */
+
+	ts->tdma_opdetach = vap->iv_opdetach;
+	vap->iv_opdetach = tdma_vdetach;
+	ts->tdma_newstate = vap->iv_newstate;
+	vap->iv_newstate = tdma_newstate;
+	vap->iv_bmiss = tdma_beacon_miss;
+	ts->tdma_recv_mgmt = vap->iv_recv_mgmt;
+	vap->iv_recv_mgmt = tdma_recv_mgmt;
+
+	vap->iv_tdma = ts;
+}
+
+static void
+tdma_vdetach(struct ieee80211vap *vap)
+{
+	struct ieee80211_tdma_state *ts = vap->iv_tdma;
+
+	ts->tdma_opdetach(vap);
+	free(vap->iv_tdma, M_80211_VAP);
+
+	setackpolicy(vap->iv_ic, 0);	/* enable ACK's */
+}
+
+/*
+ * TDMA state machine handler.
+ */
+static int
+tdma_newstate(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg)
+{
+	struct ieee80211_tdma_state *ts = vap->iv_tdma;
+	enum ieee80211_state ostate;
+	int status;
+
+	IEEE80211_LOCK_ASSERT(vap->iv_ic);
+
+	ostate = vap->iv_state;
+	IEEE80211_DPRINTF(vap, IEEE80211_MSG_STATE, "%s: %s -> %s (%d)\n",
+	    __func__, ieee80211_state_name[ostate],
+	    ieee80211_state_name[nstate], arg);
+
+	if (vap->iv_flags_ext & IEEE80211_FEXT_SWBMISS)
+		callout_stop(&vap->iv_swbmiss);
+	if (nstate == IEEE80211_S_SCAN &&
+	    (ostate == IEEE80211_S_INIT || ostate == IEEE80211_S_RUN) &&
+	    ts->tdma_slot != 0) {
+		/*
+		 * Override adhoc behaviour when operating as a slave;
+		 * we need to scan even if the channel is locked.
+		 */
+		vap->iv_state = nstate;			/* state transition */
+		ieee80211_cancel_scan(vap);		/* background scan */
+		if (vap->iv_flags_ext & IEEE80211_FEXT_SCANREQ) {
+			ieee80211_check_scan(vap,
+			    vap->iv_scanreq_flags,
+			    vap->iv_scanreq_duration,
+			    vap->iv_scanreq_mindwell,
+			    vap->iv_scanreq_maxdwell,
+			    vap->iv_scanreq_nssid, vap->iv_scanreq_ssid);
+			vap->iv_flags_ext &= ~IEEE80211_FEXT_SCANREQ;
+		} else
+			ieee80211_check_scan_current(vap);
+		status = 0;
+	} else {
+		status = ts->tdma_newstate(vap, nstate, arg);
+	}
+	if (status == 0 && 
+	    nstate == IEEE80211_S_RUN && ostate != IEEE80211_S_RUN &&
+	    (vap->iv_flags_ext & IEEE80211_FEXT_SWBMISS) &&
+	    ts->tdma_slot != 0) {
+		/*
+		 * Start s/w beacon miss timer for slave devices w/o
+		 * hardware support.  The 2x is a fudge for our doing
+		 * this in software.
+		 */
+		vap->iv_swbmiss_period = IEEE80211_TU_TO_TICKS(
+		    2 * vap->iv_bmissthreshold * ts->tdma_bintval *
+		    ((ts->tdma_slotcnt * ts->tdma_slotlen) / 1024));
+		vap->iv_swbmiss_count = 0;
+		callout_reset(&vap->iv_swbmiss, vap->iv_swbmiss_period,
+			ieee80211_swbmiss, vap);
+	}
+	return status;
+}
+
+static void
+tdma_beacon_miss(struct ieee80211vap *vap)
+{
+	struct ieee80211_tdma_state *ts = vap->iv_tdma;
+
+	KASSERT((vap->iv_ic->ic_flags & IEEE80211_F_SCAN) == 0, ("scanning"));
+	KASSERT(vap->iv_state == IEEE80211_S_RUN,
+	    ("wrong state %d", vap->iv_state));
+
+	IEEE80211_DPRINTF(vap,
+		IEEE80211_MSG_STATE | IEEE80211_MSG_TDMA | IEEE80211_MSG_DEBUG,
+		"beacon miss, mode %u state %s\n",
+		vap->iv_opmode, ieee80211_state_name[vap->iv_state]);
+
+	if (ts->tdma_peer != NULL) {	/* XXX? can this be null? */
+		ieee80211_notify_node_leave(vap->iv_bss);
+		ts->tdma_peer = NULL;
+		/*
+		 * Treat beacon miss like an associate failure wrt the
+		 * scan policy; this forces the entry in the scan cache
+		 * to be ignored after several tries.
+		 */
+		ieee80211_scan_assoc_fail(vap, vap->iv_bss->ni_macaddr,
+		    IEEE80211_STATUS_TIMEOUT);
+	}
+#if 0
+	ts->tdma_inuse = 0;		/* clear slot usage */
+#endif
+	ieee80211_new_state(vap, IEEE80211_S_SCAN, 0);
+}
+
+static void
+tdma_recv_mgmt(struct ieee80211_node *ni, struct mbuf *m0,
+	int subtype, int rssi, int noise, uint32_t rstamp)
+{
+	struct ieee80211com *ic = ni->ni_ic;
+	struct ieee80211vap *vap = ni->ni_vap;
+	struct ieee80211_tdma_state *ts = vap->iv_tdma;
+
+	if (subtype == IEEE80211_FC0_SUBTYPE_BEACON &&
+	    (ic->ic_flags & IEEE80211_F_SCAN) == 0) {
+		struct ieee80211_frame *wh = mtod(m0, struct ieee80211_frame *);
+		struct ieee80211_scanparams scan;
+
+		if (ieee80211_parse_beacon(ni, m0, &scan) != 0)
+			return;
+		if (scan.tdma == NULL) {
+			/*
+			 * TDMA stations must beacon a TDMA ie; ignore
+			 * any other station.
+			 * XXX detect overlapping bss and change channel
+			 */
+			IEEE80211_DISCARD(vap,
+			    IEEE80211_MSG_ELEMID | IEEE80211_MSG_INPUT,
+			    wh, ieee80211_mgt_subtype_name[subtype >>
+				IEEE80211_FC0_SUBTYPE_SHIFT],
+			    "%s", "no TDMA ie");
+			vap->iv_stats.is_rx_mgtdiscard++;
+			return;
+		}
+		if (ni == vap->iv_bss &&
+		    !IEEE80211_ADDR_EQ(wh->i_addr2, ni->ni_macaddr)) {
+			/*
+			 * Fake up a node for this newly
+			 * discovered member of the IBSS.
+			 */
+			ni = ieee80211_add_neighbor(vap, wh, &scan);
+			if (ni == NULL) {
+				/* NB: stat kept for alloc failure */
+				return;
+			}
+		}
+		/*
+		 * Check for state updates.
+		 */
+		if (IEEE80211_ADDR_EQ(wh->i_addr2, ni->ni_bssid)) {
+			/*
+			 * Count frame now that we know it's to be processed.
+			 */
+			vap->iv_stats.is_rx_beacon++;
+			IEEE80211_NODE_STAT(ni, rx_beacons);
+			/*
+			 * Record tsf of last beacon.  NB: this must be
+			 * done before calling tdma_process_params
+			 * as deeper routines reference it.
+			 */
+			memcpy(&ni->ni_tstamp.data, scan.tstamp,
+				sizeof(ni->ni_tstamp.data));
+			/*
+			 * Count beacon frame for s/w bmiss handling.
+			 */
+			vap->iv_swbmiss_count++;
+			vap->iv_bmiss_count = 0;
+			/*
+			 * Process tdma ie.  The contents are used to sync
+			 * the slot timing, reconfigure the bss, etc.
+			 */
+			(void) tdma_process_params(ni, scan.tdma, rstamp, wh);
+			return;
+		}
+		/*
+		 * NB: defer remaining work to the adhoc code; this causes
+		 *     2x parsing of the frame but should happen infrequently
+		 */
+	}
+	ts->tdma_recv_mgmt(ni, m0, subtype, rssi, noise, rstamp);
+}
+
+/*
+ * Update TDMA state on receipt of a beacon frame with
+ * a TDMA information element.  The sender's identity
+ * is provided so we can track who our peer is.  If pickslot
+ * is non-zero we scan the slot allocation state in the ie
+ * locate a free slot for our use.
+ */
+static int
+tdma_update(struct ieee80211vap *vap, const struct ieee80211_tdma_param *tdma,
+	struct ieee80211_node *ni, int pickslot)
+{
+	struct ieee80211_tdma_state *ts = vap->iv_tdma;
+	int slotlen, slotcnt, slot, bintval;
+
+	KASSERT(vap->iv_caps & IEEE80211_C_TDMA,
+	     ("not a tdma vap, caps 0x%x", vap->iv_caps));
+
+	slotlen = le16toh(tdma->tdma_slotlen);
+	slotcnt = tdma->tdma_slotcnt;
+	bintval = tdma->tdma_bintval;
+
+	/* XXX rate-limit printf's */
+	if (!(2 <= slotcnt && slotcnt <= IEEE80211_TDMA_MAXSLOTS)) {
+		printf("%s: bogus slot cnt %u\n", __func__, slotcnt);
+		return 0;
+	}
+	/* XXX magic constants */
+	if (slotlen < 2 || slotlen > (0xfffff/100)) {
+		printf("%s: bogus slot len %u\n", __func__, slotlen);
+		return 0;
+	}
+	if (bintval < 1) {
+		printf("%s: bogus beacon interval %u\n", __func__, bintval);
+		return 0;
+	}
+	if (pickslot) {
+		/*
+		 * Pick unoccupied slot.  Note we never choose slot 0.
+		 */
+		for (slot = slotcnt-1; slot > 0; slot--)
+			if (isclr(tdma->tdma_inuse, slot))
+				break;
+		if (slot <= 0) {
+			printf("%s: no free slot, slotcnt %u inuse: 0x%x\n",
+				__func__, slotcnt, tdma->tdma_inuse[0]);
+			/* XXX need to do something better */
+			return 0;
+		}
+	} else
+		slot = ts->tdma_slot;
+
+	if (slotcnt != ts->tdma_slotcnt ||
+	    100*slotlen != ts->tdma_slotlen ||
+	    bintval != ts->tdma_bintval ||
+	    slot != ts->tdma_slot ||
+	    ts->tdma_peer != ni) {
+		/*
+		 * New/changed parameters; update runtime state.
+		 */
+		/* XXX overwrites user parameters */
+		ts->tdma_slotcnt = slotcnt;
+		ts->tdma_slotlen = 100*slotlen;
+		ts->tdma_slot = slot;
+		ts->tdma_bintval = bintval;
+		/* mark beacon to be updated before next xmit */
+		ieee80211_beacon_notify(vap, IEEE80211_BEACON_TDMA);
+
+		IEEE80211_DPRINTF(vap, IEEE80211_MSG_TDMA,
+		    "%s: slot %u slotcnt %u slotlen %u us bintval %u\n",
+		    __func__, slot, slotcnt, 100*slotlen, tdma->tdma_bintval);
+	}
+	/*
+	 * Notify driver.  Note we can be called before
+	 * entering RUN state if we scanned and are
+	 * joining an existing bss.  In that case do not
+	 * call the driver because not all necessary state
+	 * has been setup.  The next beacon will dtrt.
+	 */
+	if (vap->iv_state == IEEE80211_S_RUN)
+		vap->iv_ic->ic_tdma_update(ni, tdma);
+	/*
+	 * Dispatch join event on first beacon from new master.
+	 */
+	if (ts->tdma_peer != ni) {
+		if (ts->tdma_peer != NULL)
+			ieee80211_notify_node_leave(vap->iv_bss);
+		ieee80211_notify_node_join(ni, 1);
+		/* NB: no reference, we just use the address */
+		ts->tdma_peer = ni;
+	}
+	return 1;
+}
+
+/*
+ * Process received TDMA parameters.
+ */
+static int
+tdma_process_params(struct ieee80211_node *ni,
+	const u_int8_t *ie, u_int32_t rstamp, const struct ieee80211_frame *wh)
+{
+	struct ieee80211vap *vap = ni->ni_vap;
+	struct ieee80211_tdma_state *ts = vap->iv_tdma;
+	const struct ieee80211_tdma_param *tdma = 
+		(const struct ieee80211_tdma_param *) ie;
+	u_int len = ie[1];
+
+	KASSERT(vap->iv_caps & IEEE80211_C_TDMA,
+	     ("not a tdma vap, caps 0x%x", vap->iv_caps));
+
+	if (len < sizeof(*tdma) - 2) {
+		IEEE80211_DISCARD_IE(vap,
+		    IEEE80211_MSG_ELEMID | IEEE80211_MSG_TDMA,
+		    wh, "tdma", "too short, len %u", len);
+		return IEEE80211_REASON_IE_INVALID;
+	}
+	if (tdma->tdma_version != TDMA_VERSION) {
+		IEEE80211_DISCARD_IE(vap,
+		    IEEE80211_MSG_ELEMID | IEEE80211_MSG_TDMA,
+		    wh, "tdma", "bad version %u", tdma->tdma_version);
+		return IEEE80211_REASON_IE_INVALID;
+	}
+	/*
+	 * Can reach here while scanning, update
+	 * operational state only in RUN state.
+	 */
+	if (vap->iv_state == IEEE80211_S_RUN) {
+		if (tdma->tdma_slot != ts->tdma_slot &&
+		    isclr(ts->tdma_inuse, tdma->tdma_slot)) {
+			IEEE80211_NOTE(vap, IEEE80211_MSG_TDMA, ni,
+			    "discovered in slot %u", tdma->tdma_slot);
+			setbit(ts->tdma_inuse, tdma->tdma_slot);
+			/* XXX dispatch event only when operating as master */
+			if (ts->tdma_slot == 0)
+				ieee80211_notify_node_join(ni, 1);
+		}
+		setbit(ts->tdma_active, tdma->tdma_slot);
+		if (tdma->tdma_slot == ts->tdma_slot-1) {
+			/*
+			 * Slave tsf synchronization to station
+			 * just before us in the schedule. The driver
+			 * is responsible for copying the timestamp
+			 * of the received beacon into our beacon
+			 * frame so the sender can calculate round
+			 * trip time.  We cannot do that here because
+			 * we don't know how to update our beacon frame.
+			 */
+			(void) tdma_update(vap, tdma, ni, 0);
+			/* XXX reschedule swbmiss timer on parameter change */
+		} else if (tdma->tdma_slot == ts->tdma_slot+1) {
+			uint64_t tstamp;
+			int32_t rtt;
+			/*
+			 * Use returned timstamp to calculate the
+			 * roundtrip time.
+			 */
+			memcpy(&tstamp, tdma->tdma_tstamp, 8);
+			/* XXX use only 15 bits of rstamp */
+			rtt = rstamp - (le64toh(tstamp) & 0x7fff);
+			if (rtt < 0)
+				rtt += 0x7fff;
+			/* XXX hack to quiet normal use */
+			IEEE80211_DPRINTF(vap, IEEE80211_MSG_DOT1X,
+			    "tdma rtt %5u [rstamp %5u tstamp %llu]\n",
+			    rtt, rstamp,
+			    (unsigned long long) le64toh(tstamp));
+		} else if (tdma->tdma_slot == ts->tdma_slot &&
+		    le64toh(ni->ni_tstamp.tsf) > vap->iv_bss->ni_tstamp.tsf) {
+			/*
+			 * Station using the same slot as us and has
+			 * been around longer than us; we must move.
+			 * Note this can happen if stations do not
+			 * see each other while scanning.
+			 */
+			IEEE80211_DPRINTF(vap, IEEE80211_MSG_TDMA,
+			    "slot %u collision rxtsf %llu tsf %llu\n",
+			    tdma->tdma_slot,
+			    (unsigned long long) le64toh(ni->ni_tstamp.tsf),
+			    vap->iv_bss->ni_tstamp.tsf);
+			setbit(ts->tdma_inuse, tdma->tdma_slot);
+
+			(void) tdma_update(vap, tdma, ni, 1);
+		}
+	}
+	return 0;
+}
+
+int
+ieee80211_tdma_getslot(struct ieee80211vap *vap)
+{
+	struct ieee80211_tdma_state *ts = vap->iv_tdma;
+
+	KASSERT(vap->iv_caps & IEEE80211_C_TDMA,
+	     ("not a tdma vap, caps 0x%x", vap->iv_caps));
+	return ts->tdma_slot;
+}
+
+/*
+ * Parse a TDMA ie on station join and use it to setup node state.
+ */
+void
+ieee80211_parse_tdma(struct ieee80211_node *ni, const uint8_t *ie)
+{
+	struct ieee80211vap *vap = ni->ni_vap;
+
+	if (vap->iv_caps & IEEE80211_C_TDMA) {
+		const struct ieee80211_tdma_param *tdma =
+		    (const struct ieee80211_tdma_param *)ie;
+		struct ieee80211_tdma_state *ts = vap->iv_tdma;
+		/*
+		 * Adopt TDMA configuration when joining an
+		 * existing network.
+		 */
+		setbit(ts->tdma_inuse, tdma->tdma_slot);
+		(void) tdma_update(vap, tdma, ni, 1);
+		/*
+		 * Propagate capabilities based on the local
+		 * configuration and the remote station's advertised
+		 * capabilities. In particular this permits us to
+		 * enable use of QoS to disable ACK's.
+		 */
+		if ((vap->iv_flags & IEEE80211_F_WME) &&
+		    ni->ni_ies.wme_ie != NULL)
+			ni->ni_flags |= IEEE80211_NODE_QOS;
+	}
+}
+
+#define	TDMA_OUI_BYTES		0x00, 0x03, 0x7f
+/*
+ * Add a TDMA parameters element to a frame.
+ */
+uint8_t *
+ieee80211_add_tdma(uint8_t *frm, struct ieee80211vap *vap)
+{
+#define	ADDSHORT(frm, v) do {			\
+	frm[0] = (v) & 0xff;			\
+	frm[1] = (v) >> 8;			\
+	frm += 2;				\
+} while (0)
+	static const struct ieee80211_tdma_param param = {
+		.tdma_id	= IEEE80211_ELEMID_VENDOR,
+		.tdma_len	= sizeof(struct ieee80211_tdma_param) - 2,
+		.tdma_oui	= { TDMA_OUI_BYTES },
+		.tdma_type	= TDMA_OUI_TYPE,
+		.tdma_subtype	= TDMA_SUBTYPE_PARAM,
+		.tdma_version	= TDMA_VERSION,
+	};
+	const struct ieee80211_tdma_state *tdma = vap->iv_tdma;
+	uint16_t slotlen;
+
+	KASSERT(vap->iv_caps & IEEE80211_C_TDMA,
+	     ("not a tdma vap, caps 0x%x", vap->iv_caps));
+
+	memcpy(frm, &param, sizeof(param));
+	frm += __offsetof(struct ieee80211_tdma_param, tdma_slot);
+	*frm++ = tdma->tdma_slot;
+	*frm++ = tdma->tdma_slotcnt;
+	/* NB: convert units to fit in 16-bits */
+	slotlen = tdma->tdma_slotlen / 100;	/* 100us units */
+	ADDSHORT(frm, slotlen);
+	*frm++ = tdma->tdma_bintval;
+	*frm++ = tdma->tdma_inuse[0];
+	frm += 10;				/* pad+timestamp */
+	return frm; 
+#undef ADDSHORT
+}
+#undef TDMA_OUI_BYTES
+
+/*
+ * Update TDMA state at TBTT.
+ */
+void
+ieee80211_tdma_update_beacon(struct ieee80211vap *vap,
+	struct ieee80211_beacon_offsets *bo)
+{
+	struct ieee80211_tdma_state *ts = vap->iv_tdma;
+
+	KASSERT(vap->iv_caps & IEEE80211_C_TDMA,
+	     ("not a tdma vap, caps 0x%x", vap->iv_caps));
+
+	if (isset(bo->bo_flags,  IEEE80211_BEACON_TDMA)) {
+		(void) ieee80211_add_tdma(bo->bo_tdma, vap);
+		clrbit(bo->bo_flags, IEEE80211_BEACON_TDMA);
+	}
+	if (ts->tdma_slot != 0)		/* only on master */
+		return;
+	if (ts->tdma_count <= 0) {
+		/*
+		 * Time to update the mask of active/inuse stations.
+		 * We track stations that we've received a beacon
+		 * frame from and update this mask periodically.
+		 * This allows us to miss a few beacons before marking
+		 * a slot free for re-use.
+		 */
+		ts->tdma_inuse[0] = ts->tdma_active[0];
+		ts->tdma_active[0] = 0x01;
+		/* update next time 'round */
+		/* XXX use notify framework */
+		setbit(bo->bo_flags, IEEE80211_BEACON_TDMA);
+		/* NB: use s/w beacon miss threshold; may be too high */
+		ts->tdma_count = vap->iv_bmissthreshold-1;
+	} else
+		ts->tdma_count--;
+}
+
+int
+ieee80211_tdma_ioctl_get80211(struct ieee80211vap *vap,
+	struct ieee80211req *ireq)
+{
+	struct ieee80211_tdma_state *ts = vap->iv_tdma;
+
+	if ((vap->iv_caps & IEEE80211_C_TDMA) == 0)
+		return EOPNOTSUPP;
+
+	switch (ireq->i_type) {
+	case IEEE80211_IOC_TDMA_SLOT:
+		ireq->i_val = ts->tdma_slot;
+		break;
+	case IEEE80211_IOC_TDMA_SLOTCNT:
+		ireq->i_val = ts->tdma_slotcnt;
+		break;
+	case IEEE80211_IOC_TDMA_SLOTLEN:
+		ireq->i_val = ts->tdma_slotlen;
+		break;
+	case IEEE80211_IOC_TDMA_BINTERVAL:
+		ireq->i_val = ts->tdma_bintval;
+		break;
+	default:
+		return EINVAL;
+	}
+	return 0;
+}
+
+int
+ieee80211_tdma_ioctl_set80211(struct ieee80211vap *vap,
+	struct ieee80211req *ireq)
+{
+	struct ieee80211_tdma_state *ts = vap->iv_tdma;
+
+	if ((vap->iv_caps & IEEE80211_C_TDMA) == 0)
+		return EOPNOTSUPP;
+
+	switch (ireq->i_type) {
+	case IEEE80211_IOC_TDMA_SLOT:
+		if (!(0 <= ireq->i_val && ireq->i_val <= ts->tdma_slotcnt))
+			return EINVAL;
+		if (ireq->i_val != ts->tdma_slot) {
+			ts->tdma_slot = ireq->i_val;
+			return ERESTART;
+		}
+		break;
+	case IEEE80211_IOC_TDMA_SLOTCNT:
+		if (!(2 <= ireq->i_val &&
+		      ireq->i_val <= IEEE80211_TDMA_MAXSLOTS))
+			return EINVAL;
+		if (ireq->i_val != ts->tdma_slotcnt) {
+			ts->tdma_slotcnt = ireq->i_val;
+			return ERESTART;
+		}
+		break;
+	case IEEE80211_IOC_TDMA_SLOTLEN:
+		/*
+		 * XXX
+		 * 150 insures at least 1/8 TU
+		 * 0xfffff is the max duration for bursting
+		 * (implict by way of 16-bit data type for i_val)
+		 */
+		if (ireq->i_val < 150)
+			return EINVAL;
+		if (ireq->i_val != ts->tdma_slotlen) {
+			ts->tdma_slotlen = ireq->i_val;
+			return ERESTART;
+		}
+		break;
+	case IEEE80211_IOC_TDMA_BINTERVAL:
+		if (ireq->i_val < 1)
+			return EINVAL;
+		if (ireq->i_val != ts->tdma_bintval) {
+			ts->tdma_bintval = ireq->i_val;
+			return ERESTART;
+		}
+		break;
+	default:
+		return EINVAL;
+	}
+	return 0;
+}
+#endif /* IEEE80211_SUPPORT_TDMA */

Added: user/sam/wifi/sys/net80211/ieee80211_tdma.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/sam/wifi/sys/net80211/ieee80211_tdma.h	Thu Feb  5 19:09:15 2009	(r188169)
@@ -0,0 +1,66 @@
+/*-
+ * Copyright (c) 2007-2009 Sam Leffler, Errno Consulting
+ * Copyright (c) 2007-2009 Intel Corporation
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+#ifndef _NET80211_IEEE80211_TDMA_H_
+#define _NET80211_IEEE80211_TDMA_H_
+
+/*
+ * TDMA-mode implementation definitions.
+ */
+struct ieee80211_tdma_state {
+	u_int	tdma_slotlen;		/* bss slot length (us) */
+	uint8_t	tdma_slotcnt;		/* bss slot count */
+	uint8_t	tdma_bintval;		/* beacon interval (slots) */
+	uint8_t	tdma_slot;		/* station slot # */
+	uint8_t	tdma_inuse[1];		/* mask of slots in use */
+#define	IEEE80211_TDMA_MAXSLOTS	8
+	void	*tdma_peer;		/* peer station cookie */
+	uint8_t	tdma_active[1];		/* mask of active slots */
+	int	tdma_count;		/* active/inuse countdown */
+
+	/* parent method pointers */
+	int	(*tdma_newstate)(struct ieee80211vap *, enum ieee80211_state,
+		    int arg);
+	void	(*tdma_recv_mgmt)(struct ieee80211_node *,
+		    struct mbuf *, int, int, int, uint32_t);
+	void	(*tdma_opdetach)(struct ieee80211vap *);
+};
+
+void	ieee80211_tdma_vattach(struct ieee80211vap *);
+
+int	ieee80211_tdma_getslot(struct ieee80211vap *vap);
+void	ieee80211_parse_tdma(struct ieee80211_node *ni, const uint8_t *ie);
+uint8_t *ieee80211_add_tdma(uint8_t *frm, struct ieee80211vap *vap);
+struct ieee80211_beacon_offsets;
+void	ieee80211_tdma_update_beacon(struct ieee80211vap *vap,
+	    struct ieee80211_beacon_offsets *bo);
+struct ieee80211req;
+int	ieee80211_tdma_ioctl_get80211(struct ieee80211vap *vap,
+	    struct ieee80211req *ireq);
+int	ieee80211_tdma_ioctl_set80211(struct ieee80211vap *vap,
+	    struct ieee80211req *ireq);
+#endif /* !_NET80211_IEEE80211_TDMA_H_ */

From owner-svn-src-user@FreeBSD.ORG  Thu Feb  5 20:13:54 2009
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 997B11065675;
	Thu,  5 Feb 2009 20:13:54 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 848548FC13;
	Thu,  5 Feb 2009 20:13:54 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n15KDsiD037214;
	Thu, 5 Feb 2009 20:13:54 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n15KDqL4037162;
	Thu, 5 Feb 2009 20:13:52 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <200902052013.n15KDqL4037162@svn.freebsd.org>
From: Andrew Thompson <thompsa@FreeBSD.org>
Date: Thu, 5 Feb 2009 20:13:52 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r188181 - in user/thompsa/usb: . bin/pax
	contrib/wpa_supplicant etc etc/defaults etc/rc.d
	lib/libarchive lib/libc/sparc64/sys lib/libc/string
	lib/libc/sys lib/libusbhid sbin/fsck_ffs sb...
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 05 Feb 2009 20:13:55 -0000

Author: thompsa
Date: Thu Feb  5 20:13:51 2009
New Revision: 188181
URL: http://svn.freebsd.org/changeset/base/188181

Log:
  MFH r187971-188180

Added:
  user/thompsa/usb/lib/libusbhid/descr_compat.c
     - copied unchanged from r188180, head/lib/libusbhid/descr_compat.c
  user/thompsa/usb/sbin/ipfw/altq.c
     - copied unchanged from r188180, head/sbin/ipfw/altq.c
  user/thompsa/usb/sys/dev/cfi/cfi_bus_ixp4xx.c
     - copied unchanged from r188180, head/sys/dev/cfi/cfi_bus_ixp4xx.c
  user/thompsa/usb/tools/tools/cfi/
     - copied from r188180, head/tools/tools/cfi/
Modified:
  user/thompsa/usb/   (props changed)
  user/thompsa/usb/ObsoleteFiles.inc
  user/thompsa/usb/UPDATING
  user/thompsa/usb/bin/pax/file_subs.c
  user/thompsa/usb/contrib/wpa_supplicant/   (props changed)
  user/thompsa/usb/etc/defaults/rc.conf
  user/thompsa/usb/etc/network.subr
  user/thompsa/usb/etc/rc.d/defaultroute
  user/thompsa/usb/lib/libarchive/archive_read_support_format_ar.c
  user/thompsa/usb/lib/libc/sparc64/sys/__sparc_utrap.c
  user/thompsa/usb/lib/libc/string/memccpy.c
  user/thompsa/usb/lib/libc/string/memchr.c
  user/thompsa/usb/lib/libc/string/memcmp.c
  user/thompsa/usb/lib/libc/string/memmem.c
  user/thompsa/usb/lib/libc/string/strcasecmp.c
  user/thompsa/usb/lib/libc/string/strcasestr.c
  user/thompsa/usb/lib/libc/string/strcmp.c
  user/thompsa/usb/lib/libc/string/strcoll.c
  user/thompsa/usb/lib/libc/string/strdup.c
  user/thompsa/usb/lib/libc/string/strmode.c
  user/thompsa/usb/lib/libc/string/strncmp.c
  user/thompsa/usb/lib/libc/string/strncpy.c
  user/thompsa/usb/lib/libc/string/strnstr.c
  user/thompsa/usb/lib/libc/string/strpbrk.c
  user/thompsa/usb/lib/libc/string/strsep.c
  user/thompsa/usb/lib/libc/string/strstr.c
  user/thompsa/usb/lib/libc/string/wcscat.c
  user/thompsa/usb/lib/libc/string/wcscmp.c
  user/thompsa/usb/lib/libc/string/wcscpy.c
  user/thompsa/usb/lib/libc/string/wcscspn.c
  user/thompsa/usb/lib/libc/string/wcslcat.c
  user/thompsa/usb/lib/libc/string/wcslcpy.c
  user/thompsa/usb/lib/libc/string/wcslen.c
  user/thompsa/usb/lib/libc/string/wcsncat.c
  user/thompsa/usb/lib/libc/string/wcsncmp.c
  user/thompsa/usb/lib/libc/string/wcspbrk.c
  user/thompsa/usb/lib/libc/string/wcsspn.c
  user/thompsa/usb/lib/libc/string/wcsstr.c
  user/thompsa/usb/lib/libc/string/wmemchr.c
  user/thompsa/usb/lib/libc/string/wmemcmp.c
  user/thompsa/usb/lib/libc/string/wmemcpy.c
  user/thompsa/usb/lib/libc/string/wmemmove.c
  user/thompsa/usb/lib/libc/string/wmemset.c
  user/thompsa/usb/lib/libc/sys/send.2
  user/thompsa/usb/lib/libusbhid/Makefile
  user/thompsa/usb/lib/libusbhid/descr.c
  user/thompsa/usb/lib/libusbhid/usbhid.3
  user/thompsa/usb/lib/libusbhid/usbhid.h
  user/thompsa/usb/lib/libusbhid/usbvar.h
  user/thompsa/usb/sbin/fsck_ffs/fsck.h
  user/thompsa/usb/sbin/fsck_ffs/fsck_ffs.8
  user/thompsa/usb/sbin/fsck_ffs/fsutil.c
  user/thompsa/usb/sbin/fsck_ffs/inode.c
  user/thompsa/usb/sbin/fsck_ffs/main.c
  user/thompsa/usb/sbin/fsck_ffs/pass1.c
  user/thompsa/usb/sbin/geom/core/geom.c
  user/thompsa/usb/sbin/ifconfig/ifieee80211.c
  user/thompsa/usb/sbin/ifconfig/regdomain.c
  user/thompsa/usb/sbin/ifconfig/regdomain.h
  user/thompsa/usb/sbin/ipfw/Makefile
  user/thompsa/usb/sbin/ipfw/dummynet.c
  user/thompsa/usb/sbin/ipfw/ipfw2.c
  user/thompsa/usb/sbin/ipfw/ipfw2.h
  user/thompsa/usb/sbin/ipfw/nat.c
  user/thompsa/usb/share/man/man9/lock.9
  user/thompsa/usb/sys/   (props changed)
  user/thompsa/usb/sys/amd64/amd64/exception.S
  user/thompsa/usb/sys/amd64/amd64/machdep.c
  user/thompsa/usb/sys/amd64/amd64/mp_machdep.c
  user/thompsa/usb/sys/amd64/include/intr_machdep.h
  user/thompsa/usb/sys/arm/arm/busdma_machdep.c
  user/thompsa/usb/sys/arm/arm/cpufunc_asm_sheeva.S   (props changed)
  user/thompsa/usb/sys/arm/arm/dump_machdep.c
  user/thompsa/usb/sys/arm/arm/elf_trampoline.c
  user/thompsa/usb/sys/arm/arm/pmap.c
  user/thompsa/usb/sys/arm/arm/vm_machdep.c
  user/thompsa/usb/sys/arm/conf/AVILA
  user/thompsa/usb/sys/arm/conf/AVILA.hints
  user/thompsa/usb/sys/arm/include/atomic.h
  user/thompsa/usb/sys/arm/sa11x0/assabet_machdep.c
  user/thompsa/usb/sys/arm/xscale/ixp425/avila_machdep.c
  user/thompsa/usb/sys/arm/xscale/ixp425/files.ixp425
  user/thompsa/usb/sys/arm/xscale/ixp425/ixp425.c
  user/thompsa/usb/sys/arm/xscale/ixp425/ixp425reg.h
  user/thompsa/usb/sys/conf/options
  user/thompsa/usb/sys/contrib/pf/   (props changed)
  user/thompsa/usb/sys/crypto/via/padlock.c
  user/thompsa/usb/sys/dev/acpi_support/acpi_panasonic.c
  user/thompsa/usb/sys/dev/acpica/acpi_pcib_acpi.c
  user/thompsa/usb/sys/dev/ae/if_ae.c
  user/thompsa/usb/sys/dev/an/if_an.c
  user/thompsa/usb/sys/dev/an/if_anreg.h
  user/thompsa/usb/sys/dev/ata/ata-disk.c
  user/thompsa/usb/sys/dev/ata/atapi-cam.c
  user/thompsa/usb/sys/dev/ata/atapi-cd.c
  user/thompsa/usb/sys/dev/ata/atapi-fd.c
  user/thompsa/usb/sys/dev/ata/atapi-tape.c
  user/thompsa/usb/sys/dev/ath/ath_hal/ah_regdomain.c
  user/thompsa/usb/sys/dev/ath/ath_hal/ar5212/ar5212.h
  user/thompsa/usb/sys/dev/ath/ath_hal/ar5212/ar5212_reset.c
  user/thompsa/usb/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c
  user/thompsa/usb/sys/dev/atkbdc/atkbdc_isa.c
  user/thompsa/usb/sys/dev/bge/if_bge.c
  user/thompsa/usb/sys/dev/bm/if_bm.c
  user/thompsa/usb/sys/dev/cardbus/cardbus.c
  user/thompsa/usb/sys/dev/cfi/cfi_core.c
  user/thompsa/usb/sys/dev/cfi/cfi_dev.c
  user/thompsa/usb/sys/dev/cfi/cfi_reg.h
  user/thompsa/usb/sys/dev/cfi/cfi_var.h
  user/thompsa/usb/sys/dev/exca/exca.c
  user/thompsa/usb/sys/dev/firewire/firewire.c
  user/thompsa/usb/sys/dev/firewire/fwohci.c
  user/thompsa/usb/sys/dev/firewire/fwohci_pci.c
  user/thompsa/usb/sys/dev/firewire/fwohcivar.h
  user/thompsa/usb/sys/dev/firewire/sbp.c
  user/thompsa/usb/sys/dev/fxp/if_fxp.c
  user/thompsa/usb/sys/dev/hifn/hifn7751.c
  user/thompsa/usb/sys/dev/ichsmb/ichsmb.c
  user/thompsa/usb/sys/dev/ipmi/ipmi_acpi.c
  user/thompsa/usb/sys/dev/ipmi/ipmi_smbios.c
  user/thompsa/usb/sys/dev/kbdmux/kbdmux.c
  user/thompsa/usb/sys/dev/lmc/if_lmc.c
  user/thompsa/usb/sys/dev/lmc/if_lmc.h
  user/thompsa/usb/sys/dev/mmc/mmc.c
  user/thompsa/usb/sys/dev/mmc/mmcreg.h
  user/thompsa/usb/sys/dev/my/if_my.c
  user/thompsa/usb/sys/dev/nve/if_nve.c
  user/thompsa/usb/sys/dev/pccard/card_if.m
  user/thompsa/usb/sys/dev/pccard/pccard.c
  user/thompsa/usb/sys/dev/pccbb/pccbb.c
  user/thompsa/usb/sys/dev/pccbb/pccbb_pci.c
  user/thompsa/usb/sys/dev/pccbb/pccbbvar.h
  user/thompsa/usb/sys/dev/pci/pci_user.c
  user/thompsa/usb/sys/dev/pci/pcireg.h
  user/thompsa/usb/sys/dev/pcn/if_pcn.c
  user/thompsa/usb/sys/dev/ppbus/ppbconf.h
  user/thompsa/usb/sys/dev/ppc/ppc.c
  user/thompsa/usb/sys/dev/ppc/ppcvar.h
  user/thompsa/usb/sys/dev/safe/safe.c
  user/thompsa/usb/sys/dev/scc/scc_if.m
  user/thompsa/usb/sys/dev/smbus/smb.c
  user/thompsa/usb/sys/dev/snp/snp.c
  user/thompsa/usb/sys/dev/usb/ehci_ixp4xx.c   (props changed)
  user/thompsa/usb/sys/dev/usb2/bluetooth/ubtbcmfw2.c
  user/thompsa/usb/sys/dev/usb2/core/usb2_error.c
  user/thompsa/usb/sys/dev/usb2/include/usb2_error.h
  user/thompsa/usb/sys/dev/usb2/include/usb2_hid.h
  user/thompsa/usb/sys/dev/usb2/include/usb2_mfunc.h
  user/thompsa/usb/sys/dev/usb2/include/usb2_revision.h
  user/thompsa/usb/sys/dev/usb2/input/uhid2.c
  user/thompsa/usb/sys/dev/usb2/quirk/usb2_quirk.c
  user/thompsa/usb/sys/dev/usb2/quirk/usb2_quirk.h
  user/thompsa/usb/sys/dev/usb2/serial/uftdi2.c
  user/thompsa/usb/sys/dev/xen/netback/netback.c
  user/thompsa/usb/sys/dev/xen/netfront/netfront.c
  user/thompsa/usb/sys/geom/geom.h
  user/thompsa/usb/sys/geom/geom_subr.c
  user/thompsa/usb/sys/i386/xen/clock.c
  user/thompsa/usb/sys/i386/xen/xen_machdep.c
  user/thompsa/usb/sys/ia64/ia64/mca.c
  user/thompsa/usb/sys/ia64/include/mca.h
  user/thompsa/usb/sys/kern/kern_jail.c
  user/thompsa/usb/sys/kern/subr_autoconf.c
  user/thompsa/usb/sys/kern/subr_bus.c
  user/thompsa/usb/sys/kern/subr_clist.c
  user/thompsa/usb/sys/kern/subr_devstat.c
  user/thompsa/usb/sys/kern/subr_disk.c
  user/thompsa/usb/sys/kern/subr_firmware.c
  user/thompsa/usb/sys/kern/subr_kobj.c
  user/thompsa/usb/sys/kern/subr_prf.c
  user/thompsa/usb/sys/kern/subr_prof.c
  user/thompsa/usb/sys/kern/subr_rman.c
  user/thompsa/usb/sys/kern/subr_rtc.c
  user/thompsa/usb/sys/kern/subr_taskqueue.c
  user/thompsa/usb/sys/kern/subr_witness.c
  user/thompsa/usb/sys/kern/sys_generic.c
  user/thompsa/usb/sys/kern/tty.c
  user/thompsa/usb/sys/kern/tty_inq.c
  user/thompsa/usb/sys/kern/tty_outq.c
  user/thompsa/usb/sys/kern/uipc_socket.c
  user/thompsa/usb/sys/kern/vfs_mount.c
  user/thompsa/usb/sys/kern/vfs_subr.c
  user/thompsa/usb/sys/kern/vfs_syscalls.c
  user/thompsa/usb/sys/mips/mips/elf64_machdep.c   (props changed)
  user/thompsa/usb/sys/modules/usb2/controller_atmegadci/   (props changed)
  user/thompsa/usb/sys/net/if.c
  user/thompsa/usb/sys/net/if_ethersubr.c
  user/thompsa/usb/sys/net/rtsock.c
  user/thompsa/usb/sys/net80211/ieee80211.c
  user/thompsa/usb/sys/net80211/ieee80211_crypto.h
  user/thompsa/usb/sys/net80211/ieee80211_ddb.c
  user/thompsa/usb/sys/net80211/ieee80211_scan_sta.c
  user/thompsa/usb/sys/netatalk/ddp_usrreq.c
  user/thompsa/usb/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap_raw.c
  user/thompsa/usb/sys/netinet/in.c
  user/thompsa/usb/sys/netinet/in_pcb.c
  user/thompsa/usb/sys/netinet/ip_divert.c
  user/thompsa/usb/sys/netinet/ip_ipsec.c
  user/thompsa/usb/sys/netinet/ip_output.c
  user/thompsa/usb/sys/netinet/raw_ip.c
  user/thompsa/usb/sys/netinet/sctp_auth.c
  user/thompsa/usb/sys/netinet/sctp_constants.h
  user/thompsa/usb/sys/netinet/sctp_crc32.c
  user/thompsa/usb/sys/netinet/sctp_crc32.h
  user/thompsa/usb/sys/netinet/sctp_input.c
  user/thompsa/usb/sys/netinet/sctp_os_bsd.h
  user/thompsa/usb/sys/netinet/sctp_output.c
  user/thompsa/usb/sys/netinet/sctp_pcb.c
  user/thompsa/usb/sys/netinet/sctp_pcb.h
  user/thompsa/usb/sys/netinet/sctp_sysctl.c
  user/thompsa/usb/sys/netinet/sctp_uio.h
  user/thompsa/usb/sys/netinet/sctp_usrreq.c
  user/thompsa/usb/sys/netinet/sctputil.c
  user/thompsa/usb/sys/netinet/sctputil.h
  user/thompsa/usb/sys/netinet/tcp_usrreq.c
  user/thompsa/usb/sys/netinet/udp_usrreq.c
  user/thompsa/usb/sys/netinet6/frag6.c
  user/thompsa/usb/sys/netinet6/in6.c
  user/thompsa/usb/sys/netinet6/in6_pcb.c
  user/thompsa/usb/sys/netinet6/in6_src.c
  user/thompsa/usb/sys/netinet6/ip6_forward.c
  user/thompsa/usb/sys/netinet6/ip6_input.c
  user/thompsa/usb/sys/netinet6/ip6_var.h
  user/thompsa/usb/sys/netinet6/nd6_rtr.c
  user/thompsa/usb/sys/netinet6/raw_ip6.c
  user/thompsa/usb/sys/netinet6/sctp6_usrreq.c
  user/thompsa/usb/sys/netinet6/udp6_usrreq.c
  user/thompsa/usb/sys/netinet6/vinet6.h
  user/thompsa/usb/sys/opencrypto/cryptosoft.c
  user/thompsa/usb/sys/rpc/clnt_rc.c
  user/thompsa/usb/sys/security/audit/audit_pipe.c
  user/thompsa/usb/sys/sys/cfictl.h
  user/thompsa/usb/sys/sys/clist.h
  user/thompsa/usb/sys/sys/conf.h
  user/thompsa/usb/sys/sys/elf_common.h
  user/thompsa/usb/sys/sys/jail.h
  user/thompsa/usb/sys/sys/kobj.h
  user/thompsa/usb/sys/sys/lockmgr.h
  user/thompsa/usb/sys/sys/pciio.h
  user/thompsa/usb/sys/sys/sysctl.h
  user/thompsa/usb/sys/sys/tty.h
  user/thompsa/usb/sys/sys/ttyqueue.h
  user/thompsa/usb/tools/tools/README
  user/thompsa/usb/tools/tools/sysbuild/sysbuild.sh
  user/thompsa/usb/usr.bin/basename/basename.1
  user/thompsa/usb/usr.bin/bluetooth/rfcomm_sppd/rfcomm_sppd.c
  user/thompsa/usb/usr.bin/dirname/dirname.c
  user/thompsa/usb/usr.bin/make/job.c
  user/thompsa/usb/usr.bin/make/main.c
  user/thompsa/usb/usr.bin/netstat/inet6.c
  user/thompsa/usb/usr.bin/usbhidaction/usbhidaction.c
  user/thompsa/usb/usr.bin/usbhidctl/usbhid.c
  user/thompsa/usb/usr.sbin/bluetooth/Makefile
  user/thompsa/usb/usr.sbin/bluetooth/hcsecd/hcsecd.c
  user/thompsa/usb/usr.sbin/bluetooth/hcseriald/hcseriald.c
  user/thompsa/usb/usr.sbin/bluetooth/rfcomm_pppd/rfcomm_pppd.c
  user/thompsa/usb/usr.sbin/fifolog/lib/fifolog_reader.c
  user/thompsa/usb/usr.sbin/fifolog/lib/fifolog_write_poll.c
  user/thompsa/usb/usr.sbin/fwcontrol/fwdv.c
  user/thompsa/usb/usr.sbin/fwcontrol/fwmpegts.c
  user/thompsa/usb/usr.sbin/makefs/ffs/ffs_bswap.c   (props changed)
  user/thompsa/usb/usr.sbin/makefs/ffs/ffs_subr.c   (props changed)
  user/thompsa/usb/usr.sbin/makefs/ffs/ufs_bswap.h   (props changed)
  user/thompsa/usb/usr.sbin/makefs/getid.c   (props changed)
  user/thompsa/usb/usr.sbin/pciconf/pciconf.8
  user/thompsa/usb/usr.sbin/pciconf/pciconf.c
  user/thompsa/usb/usr.sbin/pstat/pstat.8
  user/thompsa/usb/usr.sbin/pstat/pstat.c

Modified: user/thompsa/usb/ObsoleteFiles.inc
==============================================================================
--- user/thompsa/usb/ObsoleteFiles.inc	Thu Feb  5 19:39:07 2009	(r188180)
+++ user/thompsa/usb/ObsoleteFiles.inc	Thu Feb  5 20:13:51 2009	(r188181)
@@ -14,6 +14,8 @@
 # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last.
 #
 
+# 20090203: adding_user.8 moved to adding_user.7
+OLD_FILES+=usr/share/man/man8/adding_user.8.gz
 # 20090122: tzdata2009a import
 OLD_FILES+=usr/share/zoneinfo/Asia/Katmandu
 # 20090102: file 4.26 import

Modified: user/thompsa/usb/UPDATING
==============================================================================
--- user/thompsa/usb/UPDATING	Thu Feb  5 19:39:07 2009	(r188180)
+++ user/thompsa/usb/UPDATING	Thu Feb  5 20:13:51 2009	(r188181)
@@ -22,6 +22,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8.
 	to maximize performance.  (To disable malloc debugging, run
 	ln -s aj /etc/malloc.conf.)
 
+20090201:
+	INET6 statistics (struct ip6stat) was updated.
+	netstat(1) needs to be recompiled.
+
 20090119:
 	NTFS has been removed from GENERIC kernel on amd64 to match
 	GENERIC on i386. Should not cause any issues since mount_ntfs(8)

Modified: user/thompsa/usb/bin/pax/file_subs.c
==============================================================================
--- user/thompsa/usb/bin/pax/file_subs.c	Thu Feb  5 19:39:07 2009	(r188180)
+++ user/thompsa/usb/bin/pax/file_subs.c	Thu Feb  5 20:13:51 2009	(r188181)
@@ -425,19 +425,11 @@ node_creat(ARCHD *arcn)
 	 * we were able to create the node. set uid/gid, modes and times
 	 */
 	if (pids)
-		res = ((arcn->type == PAX_SLK) ?
-		    set_lids(arcn->name, arcn->sb.st_uid, arcn->sb.st_gid) :
-		    set_ids(arcn->name, arcn->sb.st_uid, arcn->sb.st_gid));
+		res = set_ids(arcn->name, arcn->sb.st_uid, arcn->sb.st_gid);
 	else
 		res = 0;
 
 	/*
-	 * symlinks are done now.
-	 */
-	if (arcn->type == PAX_SLK)
-		return(0);
-
-	/*
 	 * IMPORTANT SECURITY NOTE:
 	 * if not preserving mode or we cannot set uid/gid, then PROHIBIT any
 	 * set uid/gid bits
@@ -632,7 +624,7 @@ chk_path( char *name, uid_t st_uid, gid_
  *	used by -t to reset access times).
  *	When ign is zero, only those times the user has asked for are set, the
  *	other ones are left alone. We do not assume the un-documented feature
- *	of many utimes() implementations that consider a 0 time value as a do
+ *	of many lutimes() implementations that consider a 0 time value as a do
  *	not set request.
  */
 
@@ -661,7 +653,7 @@ set_ftime(char *fnm, time_t mtime, time_
 	/*
 	 * set the times
 	 */
-	if (utimes(fnm, tv) < 0)
+	if (lutimes(fnm, tv) < 0)
 		syswarn(1, errno, "Access/modification time set failed on: %s",
 		    fnm);
 	return;
@@ -677,30 +669,6 @@ set_ftime(char *fnm, time_t mtime, time_
 int
 set_ids(char *fnm, uid_t uid, gid_t gid)
 {
-	if (chown(fnm, uid, gid) < 0) {
-		/*
-		 * ignore EPERM unless in verbose mode or being run by root.
-		 * if running as pax, POSIX requires a warning.
-		 */
-		if (strcmp(NM_PAX, argv0) == 0 || errno != EPERM || vflag ||
-		    geteuid() == 0)
-			syswarn(1, errno, "Unable to set file uid/gid of %s",
-			    fnm);
-		return(-1);
-	}
-	return(0);
-}
-
-/*
- * set_lids()
- *	set the uid and gid of a file system node
- * Return:
- *	0 when set, -1 on failure
- */
-
-int
-set_lids(char *fnm, uid_t uid, gid_t gid)
-{
 	if (lchown(fnm, uid, gid) < 0) {
 		/*
 		 * ignore EPERM unless in verbose mode or being run by root.
@@ -724,7 +692,7 @@ void
 set_pmode(char *fnm, mode_t mode)
 {
 	mode &= ABITS;
-	if (chmod(fnm, mode) < 0)
+	if (lchmod(fnm, mode) < 0)
 		syswarn(1, errno, "Could not set permissions on %s", fnm);
 	return;
 }

Modified: user/thompsa/usb/etc/defaults/rc.conf
==============================================================================
--- user/thompsa/usb/etc/defaults/rc.conf	Thu Feb  5 19:39:07 2009	(r188180)
+++ user/thompsa/usb/etc/defaults/rc.conf	Thu Feb  5 20:13:51 2009	(r188181)
@@ -101,7 +101,7 @@ nisdomainname="NO"		# Set to NIS domain 
 dhclient_program="/sbin/dhclient"	# Path to dhcp client program.
 dhclient_flags=""		# Extra flags to pass to dhcp client.
 #dhclient_flags_fxp0=""		# Extra dhclient flags for fxp0 only
-background_dhclient="NO"	# Start dhcp client in the background.
+background_dhclient="YES"	# Start dhcp client in the background.
 #background_dhclient_fxp0="YES"	# Start dhcp client on fxp0 in the background.
 synchronous_dhclient="NO"	# Start dhclient directly on configured
 				# interfaces during startup.

Modified: user/thompsa/usb/etc/network.subr
==============================================================================
--- user/thompsa/usb/etc/network.subr	Thu Feb  5 19:39:07 2009	(r188180)
+++ user/thompsa/usb/etc/network.subr	Thu Feb  5 20:13:51 2009	(r188181)
@@ -515,7 +515,9 @@ childif_create()
 			i=`ifconfig wlan create ${create_args}`
 			ifconfig $i name $child && cfg=0
 		fi
-		ifn_start $child
+		if autoif $child; then
+			ifn_start $child
+		fi
 	done
 
 	return ${cfg}

Modified: user/thompsa/usb/etc/rc.d/defaultroute
==============================================================================
--- user/thompsa/usb/etc/rc.d/defaultroute	Thu Feb  5 19:39:07 2009	(r188180)
+++ user/thompsa/usb/etc/rc.d/defaultroute	Thu Feb  5 20:13:51 2009	(r188181)
@@ -18,10 +18,21 @@ stop_cmd=":"
 
 defaultroute_start()
 {
-	# Return without waiting if we don't have dhcp interfaces.
-	# Once we can test that the link is actually up, we should
-	# remove this test and always wait.
-	[ -z "`list_net_interfaces dhcp`" ] && return
+	local output carrier nocarrier
+
+	# Return without waiting if we don't have dhcp interfaces or
+	# if none of the dhcp interfaces is plugged in.
+	dhcp_interfaces=`list_net_interfaces dhcp`
+	[ -z "${dhcp_interfaces}" ] && return
+	carrier=false
+	for _if in ${dhcp_interfaces}; do
+		output=`/sbin/ifconfig ${_if}` 
+		nocarrier=`expr "${output}" : '.*[[:blank:]]status: \(no carrier\)'`
+		[ -z "${nocarrier}" ] && carrier=true
+	done
+	if ! ${carrier}; then
+		return
+	fi
 
 	# Wait for a default route
 	delay=${if_up_delay}

Modified: user/thompsa/usb/lib/libarchive/archive_read_support_format_ar.c
==============================================================================
--- user/thompsa/usb/lib/libarchive/archive_read_support_format_ar.c	Thu Feb  5 19:39:07 2009	(r188180)
+++ user/thompsa/usb/lib/libarchive/archive_read_support_format_ar.c	Thu Feb  5 20:13:51 2009	(r188181)
@@ -511,11 +511,10 @@ ar_parse_gnu_filename_table(struct archi
 		}
 	}
 	/*
-	 * Sanity check, last two chars must be `/\n' or '\n\n',
-	 * depending on whether the string table is padded by a '\n'
-	 * (string table produced by GNU ar always has a even size).
+	 * GNU ar always pads the table to an even size.
+	 * The pad character is either '\n' or '`'.
 	 */
-	if (p != ar->strtab + size && *p != '\n')
+	if (p != ar->strtab + size && *p != '\n' && *p != '`')
 		goto bad_string_table;
 
 	/* Enforce zero termination. */

Modified: user/thompsa/usb/lib/libc/sparc64/sys/__sparc_utrap.c
==============================================================================
--- user/thompsa/usb/lib/libc/sparc64/sys/__sparc_utrap.c	Thu Feb  5 19:39:07 2009	(r188180)
+++ user/thompsa/usb/lib/libc/sparc64/sys/__sparc_utrap.c	Thu Feb  5 20:13:51 2009	(r188181)
@@ -122,7 +122,7 @@ __utrap_write(const char *str)
 }
 
 void
-__utrap_kill_self(sig)
+__utrap_kill_self(int sig)
 {
 	int berrno;
 

Modified: user/thompsa/usb/lib/libc/string/memccpy.c
==============================================================================
--- user/thompsa/usb/lib/libc/string/memccpy.c	Thu Feb  5 19:39:07 2009	(r188180)
+++ user/thompsa/usb/lib/libc/string/memccpy.c	Thu Feb  5 20:13:51 2009	(r188181)
@@ -36,11 +36,7 @@ __FBSDID("$FreeBSD$");
 #include <string.h>
 
 void *
-memccpy(t, f, c, n)
-	void *t;
-	const void *f;
-	int c;
-	size_t n;
+memccpy(void *t, const void *f, int c, size_t n)
 {
 
 	if (n) {

Modified: user/thompsa/usb/lib/libc/string/memchr.c
==============================================================================
--- user/thompsa/usb/lib/libc/string/memchr.c	Thu Feb  5 19:39:07 2009	(r188180)
+++ user/thompsa/usb/lib/libc/string/memchr.c	Thu Feb  5 20:13:51 2009	(r188181)
@@ -39,10 +39,7 @@ __FBSDID("$FreeBSD$");
 #include <string.h>
 
 void *
-memchr(s, c, n)
-	const void *s;
-	unsigned char c;
-	size_t n;
+memchr(const void *s, int c, size_t n)
 {
 	if (n != 0) {
 		const unsigned char *p = s;

Modified: user/thompsa/usb/lib/libc/string/memcmp.c
==============================================================================
--- user/thompsa/usb/lib/libc/string/memcmp.c	Thu Feb  5 19:39:07 2009	(r188180)
+++ user/thompsa/usb/lib/libc/string/memcmp.c	Thu Feb  5 20:13:51 2009	(r188181)
@@ -42,9 +42,7 @@ __FBSDID("$FreeBSD$");
  * Compare memory regions.
  */
 int
-memcmp(s1, s2, n)
-	const void *s1, *s2;
-	size_t n;
+memcmp(const void *s1, const void *s2, size_t n)
 {
 	if (n != 0) {
 		const unsigned char *p1 = s1, *p2 = s2;

Modified: user/thompsa/usb/lib/libc/string/memmem.c
==============================================================================
--- user/thompsa/usb/lib/libc/string/memmem.c	Thu Feb  5 19:39:07 2009	(r188180)
+++ user/thompsa/usb/lib/libc/string/memmem.c	Thu Feb  5 20:13:51 2009	(r188181)
@@ -36,9 +36,7 @@ __FBSDID("$FreeBSD$");
  */
 
 void *
-memmem(l, l_len, s, s_len)
-	const void *l; size_t l_len;
-	const void *s; size_t s_len;
+memmem(const void *l, size_t l_len, const void *s, size_t s_len)
 {
 	register char *cur, *last;
 	const char *cl = (const char *)l;

Modified: user/thompsa/usb/lib/libc/string/strcasecmp.c
==============================================================================
--- user/thompsa/usb/lib/libc/string/strcasecmp.c	Thu Feb  5 19:39:07 2009	(r188180)
+++ user/thompsa/usb/lib/libc/string/strcasecmp.c	Thu Feb  5 20:13:51 2009	(r188181)
@@ -39,8 +39,7 @@ __FBSDID("$FreeBSD$");
 typedef unsigned char u_char;
 
 int
-strcasecmp(s1, s2)
-	const char *s1, *s2;
+strcasecmp(const char *s1, const char *s2)
 {
 	const u_char
 			*us1 = (const u_char *)s1,
@@ -53,9 +52,7 @@ strcasecmp(s1, s2)
 }
 
 int
-strncasecmp(s1, s2, n)
-	const char *s1, *s2;
-	size_t n;
+strncasecmp(const char *s1, const char *s2, size_t n)
 {
 	if (n != 0) {
 		const u_char

Modified: user/thompsa/usb/lib/libc/string/strcasestr.c
==============================================================================
--- user/thompsa/usb/lib/libc/string/strcasestr.c	Thu Feb  5 19:39:07 2009	(r188180)
+++ user/thompsa/usb/lib/libc/string/strcasestr.c	Thu Feb  5 20:13:51 2009	(r188181)
@@ -40,8 +40,7 @@ __FBSDID("$FreeBSD$");
  * Find the first occurrence of find in s, ignore case.
  */
 char *
-strcasestr(s, find)
-	const char *s, *find;
+strcasestr(const char *s, const char *find)
 {
 	char c, sc;
 	size_t len;

Modified: user/thompsa/usb/lib/libc/string/strcmp.c
==============================================================================
--- user/thompsa/usb/lib/libc/string/strcmp.c	Thu Feb  5 19:39:07 2009	(r188180)
+++ user/thompsa/usb/lib/libc/string/strcmp.c	Thu Feb  5 20:13:51 2009	(r188181)
@@ -42,11 +42,10 @@ __FBSDID("$FreeBSD$");
  * Compare strings.
  */
 int
-strcmp(s1, s2)
-	const char *s1, *s2;
+strcmp(const char *s1, const char *s2)
 {
 	while (*s1 == *s2++)
-		if (*s1++ == 0)
+		if (*s1++ == '\0')
 			return (0);
 	return (*(const unsigned char *)s1 - *(const unsigned char *)(s2 - 1));
 }

Modified: user/thompsa/usb/lib/libc/string/strcoll.c
==============================================================================
--- user/thompsa/usb/lib/libc/string/strcoll.c	Thu Feb  5 19:39:07 2009	(r188180)
+++ user/thompsa/usb/lib/libc/string/strcoll.c	Thu Feb  5 20:13:51 2009	(r188181)
@@ -33,8 +33,7 @@ __FBSDID("$FreeBSD$");
 #include "collate.h"
 
 int
-strcoll(s, s2)
-	const char *s, *s2;
+strcoll(const char *s, const char *s2)
 {
 	int len, len2, prim, prim2, sec, sec2, ret, ret2;
 	const char *t, *t2;

Modified: user/thompsa/usb/lib/libc/string/strdup.c
==============================================================================
--- user/thompsa/usb/lib/libc/string/strdup.c	Thu Feb  5 19:39:07 2009	(r188180)
+++ user/thompsa/usb/lib/libc/string/strdup.c	Thu Feb  5 20:13:51 2009	(r188181)
@@ -38,8 +38,7 @@ __FBSDID("$FreeBSD$");
 #include <string.h>
 
 char *
-strdup(str)
-	const char *str;
+strdup(const char *str)
 {
 	size_t len;
 	char *copy;

Modified: user/thompsa/usb/lib/libc/string/strmode.c
==============================================================================
--- user/thompsa/usb/lib/libc/string/strmode.c	Thu Feb  5 19:39:07 2009	(r188180)
+++ user/thompsa/usb/lib/libc/string/strmode.c	Thu Feb  5 20:13:51 2009	(r188181)
@@ -38,9 +38,7 @@ __FBSDID("$FreeBSD$");
 #include <string.h>
 
 void
-strmode(mode, p)
-	mode_t mode;
-	char *p;
+strmode(/* mode_t */ int mode, char *p)
 {
 	 /* print type */
 	switch (mode & S_IFMT) {

Modified: user/thompsa/usb/lib/libc/string/strncmp.c
==============================================================================
--- user/thompsa/usb/lib/libc/string/strncmp.c	Thu Feb  5 19:39:07 2009	(r188180)
+++ user/thompsa/usb/lib/libc/string/strncmp.c	Thu Feb  5 20:13:51 2009	(r188181)
@@ -36,9 +36,7 @@ __FBSDID("$FreeBSD$");
 #include <string.h>
 
 int
-strncmp(s1, s2, n)
-	const char *s1, *s2;
-	size_t n;
+strncmp(const char *s1, const char *s2, size_t n)
 {
 
 	if (n == 0)
@@ -47,7 +45,7 @@ strncmp(s1, s2, n)
 		if (*s1 != *s2++)
 			return (*(const unsigned char *)s1 -
 				*(const unsigned char *)(s2 - 1));
-		if (*s1++ == 0)
+		if (*s1++ == '\0')
 			break;
 	} while (--n != 0);
 	return (0);

Modified: user/thompsa/usb/lib/libc/string/strncpy.c
==============================================================================
--- user/thompsa/usb/lib/libc/string/strncpy.c	Thu Feb  5 19:39:07 2009	(r188180)
+++ user/thompsa/usb/lib/libc/string/strncpy.c	Thu Feb  5 20:13:51 2009	(r188181)
@@ -50,10 +50,10 @@ strncpy(char * __restrict dst, const cha
 		const char *s = src;
 
 		do {
-			if ((*d++ = *s++) == 0) {
+			if ((*d++ = *s++) == '\0') {
 				/* NUL pad the remaining n-1 bytes */
 				while (--n != 0)
-					*d++ = 0;
+					*d++ = '\0';
 				break;
 			}
 		} while (--n != 0);

Modified: user/thompsa/usb/lib/libc/string/strnstr.c
==============================================================================
--- user/thompsa/usb/lib/libc/string/strnstr.c	Thu Feb  5 19:39:07 2009	(r188180)
+++ user/thompsa/usb/lib/libc/string/strnstr.c	Thu Feb  5 20:13:51 2009	(r188181)
@@ -44,10 +44,7 @@ __FBSDID("$FreeBSD$");
  * first slen characters of s.
  */
 char *
-strnstr(s, find, slen)
-	const char *s;
-	const char *find;
-	size_t slen;
+strnstr(const char *s, const char *find, size_t slen)
 {
 	char c, sc;
 	size_t len;

Modified: user/thompsa/usb/lib/libc/string/strpbrk.c
==============================================================================
--- user/thompsa/usb/lib/libc/string/strpbrk.c	Thu Feb  5 19:39:07 2009	(r188180)
+++ user/thompsa/usb/lib/libc/string/strpbrk.c	Thu Feb  5 20:13:51 2009	(r188181)
@@ -39,14 +39,13 @@ __FBSDID("$FreeBSD$");
  * Find the first occurrence in s1 of a character in s2 (excluding NUL).
  */
 char *
-strpbrk(s1, s2)
-	const char *s1, *s2;
+strpbrk(const char *s1, const char *s2)
 {
 	const char *scanp;
 	int c, sc;
 
 	while ((c = *s1++) != 0) {
-		for (scanp = s2; (sc = *scanp++) != 0;)
+		for (scanp = s2; (sc = *scanp++) != '\0';)
 			if (sc == c)
 				return ((char *)(s1 - 1));
 	}

Modified: user/thompsa/usb/lib/libc/string/strsep.c
==============================================================================
--- user/thompsa/usb/lib/libc/string/strsep.c	Thu Feb  5 19:39:07 2009	(r188180)
+++ user/thompsa/usb/lib/libc/string/strsep.c	Thu Feb  5 20:13:51 2009	(r188181)
@@ -48,9 +48,7 @@ __FBSDID("$FreeBSD$");
  * If *stringp is NULL, strsep returns NULL.
  */
 char *
-strsep(stringp, delim)
-	char **stringp;
-	const char *delim;
+strsep(char **stringp, const char *delim)
 {
 	char *s;
 	const char *spanp;

Modified: user/thompsa/usb/lib/libc/string/strstr.c
==============================================================================
--- user/thompsa/usb/lib/libc/string/strstr.c	Thu Feb  5 19:39:07 2009	(r188180)
+++ user/thompsa/usb/lib/libc/string/strstr.c	Thu Feb  5 20:13:51 2009	(r188181)
@@ -42,17 +42,16 @@ __FBSDID("$FreeBSD$");
  * Find the first occurrence of find in s.
  */
 char *
-strstr(s, find)
-	const char *s, *find;
+strstr(const char *s, const char *find)
 {
 	char c, sc;
 	size_t len;
 
-	if ((c = *find++) != 0) {
+	if ((c = *find++) != '\0') {
 		len = strlen(find);
 		do {
 			do {
-				if ((sc = *s++) == 0)
+				if ((sc = *s++) == '\0')
 					return (NULL);
 			} while (sc != c);
 		} while (strncmp(s, find, len) != 0);

Modified: user/thompsa/usb/lib/libc/string/wcscat.c
==============================================================================
--- user/thompsa/usb/lib/libc/string/wcscat.c	Thu Feb  5 19:39:07 2009	(r188180)
+++ user/thompsa/usb/lib/libc/string/wcscat.c	Thu Feb  5 20:13:51 2009	(r188181)
@@ -37,9 +37,7 @@ __FBSDID("$FreeBSD$");
 #include <wchar.h>
 
 wchar_t *
-wcscat(s1, s2)
-	wchar_t * __restrict s1;
-	const wchar_t * __restrict s2;
+wcscat(wchar_t * __restrict s1, const wchar_t * __restrict s2)
 {
 	wchar_t *cp;
 

Modified: user/thompsa/usb/lib/libc/string/wcscmp.c
==============================================================================
--- user/thompsa/usb/lib/libc/string/wcscmp.c	Thu Feb  5 19:39:07 2009	(r188180)
+++ user/thompsa/usb/lib/libc/string/wcscmp.c	Thu Feb  5 20:13:51 2009	(r188181)
@@ -45,12 +45,11 @@ __FBSDID("$FreeBSD$");
  * Compare strings.
  */
 int
-wcscmp(s1, s2)
-	const wchar_t *s1, *s2;
+wcscmp(const wchar_t *s1, const wchar_t *s2)
 {
 
 	while (*s1 == *s2++)
-		if (*s1++ == 0)
+		if (*s1++ == '\0')
 			return (0);
 	/* XXX assumes wchar_t = int */
 	return (*(const unsigned int *)s1 - *(const unsigned int *)--s2);

Modified: user/thompsa/usb/lib/libc/string/wcscpy.c
==============================================================================
--- user/thompsa/usb/lib/libc/string/wcscpy.c	Thu Feb  5 19:39:07 2009	(r188180)
+++ user/thompsa/usb/lib/libc/string/wcscpy.c	Thu Feb  5 20:13:51 2009	(r188181)
@@ -37,9 +37,7 @@ __FBSDID("$FreeBSD$");
 #include <wchar.h>
 
 wchar_t *
-wcscpy(s1, s2)
-	wchar_t * __restrict s1;
-	const wchar_t * __restrict s2;
+wcscpy(wchar_t * __restrict s1, const wchar_t * __restrict s2)
 {
 	wchar_t *cp;
 

Modified: user/thompsa/usb/lib/libc/string/wcscspn.c
==============================================================================
--- user/thompsa/usb/lib/libc/string/wcscspn.c	Thu Feb  5 19:39:07 2009	(r188180)
+++ user/thompsa/usb/lib/libc/string/wcscspn.c	Thu Feb  5 20:13:51 2009	(r188181)
@@ -37,9 +37,7 @@ __FBSDID("$FreeBSD$");
 #include <wchar.h>
 
 size_t
-wcscspn(s, set)
-	const wchar_t *s;
-	const wchar_t *set;
+wcscspn(const wchar_t *s, const wchar_t *set)
 {
 	const wchar_t *p;
 	const wchar_t *q;

Modified: user/thompsa/usb/lib/libc/string/wcslcat.c
==============================================================================
--- user/thompsa/usb/lib/libc/string/wcslcat.c	Thu Feb  5 19:39:07 2009	(r188180)
+++ user/thompsa/usb/lib/libc/string/wcslcat.c	Thu Feb  5 20:13:51 2009	(r188181)
@@ -46,10 +46,7 @@ __FBSDID("$FreeBSD$");
  * truncation occurred.
  */
 size_t
-wcslcat(dst, src, siz)
-	wchar_t *dst;
-	const wchar_t *src;
-	size_t siz;
+wcslcat(wchar_t *dst, const wchar_t *src, size_t siz)
 {
 	wchar_t *d = dst;
 	const wchar_t *s = src;

Modified: user/thompsa/usb/lib/libc/string/wcslcpy.c
==============================================================================
--- user/thompsa/usb/lib/libc/string/wcslcpy.c	Thu Feb  5 19:39:07 2009	(r188180)
+++ user/thompsa/usb/lib/libc/string/wcslcpy.c	Thu Feb  5 20:13:51 2009	(r188181)
@@ -44,10 +44,7 @@ __FBSDID("$FreeBSD$");
  * Returns wcslen(src); if retval >= siz, truncation occurred.
  */
 size_t
-wcslcpy(dst, src, siz)
-	wchar_t *dst;
-	const wchar_t *src;
-	size_t siz;
+wcslcpy(wchar_t *dst, const wchar_t *src, size_t siz)
 {
 	wchar_t *d = dst;
 	const wchar_t *s = src;

Modified: user/thompsa/usb/lib/libc/string/wcslen.c
==============================================================================
--- user/thompsa/usb/lib/libc/string/wcslen.c	Thu Feb  5 19:39:07 2009	(r188180)
+++ user/thompsa/usb/lib/libc/string/wcslen.c	Thu Feb  5 20:13:51 2009	(r188181)
@@ -37,8 +37,7 @@ __FBSDID("$FreeBSD$");
 #include <wchar.h>
 
 size_t
-wcslen(s)
-	const wchar_t *s;
+wcslen(const wchar_t *s)
 {
 	const wchar_t *p;
 

Modified: user/thompsa/usb/lib/libc/string/wcsncat.c
==============================================================================
--- user/thompsa/usb/lib/libc/string/wcsncat.c	Thu Feb  5 19:39:07 2009	(r188180)
+++ user/thompsa/usb/lib/libc/string/wcsncat.c	Thu Feb  5 20:13:51 2009	(r188181)
@@ -37,10 +37,7 @@ __FBSDID("$FreeBSD$");
 #include <wchar.h>
 
 wchar_t *
-wcsncat(s1, s2, n)
-	wchar_t * __restrict s1;
-	const wchar_t * __restrict s2;
-	size_t n;
+wcsncat(wchar_t * __restrict s1, const wchar_t * __restrict s2, size_t n)
 {
 	wchar_t *p;
 	wchar_t *q;

Modified: user/thompsa/usb/lib/libc/string/wcsncmp.c
==============================================================================
--- user/thompsa/usb/lib/libc/string/wcsncmp.c	Thu Feb  5 19:39:07 2009	(r188180)
+++ user/thompsa/usb/lib/libc/string/wcsncmp.c	Thu Feb  5 20:13:51 2009	(r188181)
@@ -39,9 +39,7 @@ __FBSDID("$FreeBSD$");
 #include <wchar.h>
 
 int
-wcsncmp(s1, s2, n)
-	const wchar_t *s1, *s2;
-	size_t n;
+wcsncmp(const wchar_t *s1, const wchar_t *s2, size_t n)
 {
 
 	if (n == 0)

Modified: user/thompsa/usb/lib/libc/string/wcspbrk.c
==============================================================================
--- user/thompsa/usb/lib/libc/string/wcspbrk.c	Thu Feb  5 19:39:07 2009	(r188180)
+++ user/thompsa/usb/lib/libc/string/wcspbrk.c	Thu Feb  5 20:13:51 2009	(r188181)
@@ -37,9 +37,7 @@ __FBSDID("$FreeBSD$");
 #include <wchar.h>
 
 wchar_t *
-wcspbrk(s, set)
-	const wchar_t *s;
-	const wchar_t *set;
+wcspbrk(const wchar_t *s, const wchar_t *set)
 {
 	const wchar_t *p;
 	const wchar_t *q;

Modified: user/thompsa/usb/lib/libc/string/wcsspn.c
==============================================================================
--- user/thompsa/usb/lib/libc/string/wcsspn.c	Thu Feb  5 19:39:07 2009	(r188180)
+++ user/thompsa/usb/lib/libc/string/wcsspn.c	Thu Feb  5 20:13:51 2009	(r188181)
@@ -37,9 +37,7 @@ __FBSDID("$FreeBSD$");
 #include <wchar.h>
 
 size_t
-wcsspn(s, set)
-	const wchar_t *s;
-	const wchar_t *set;
+wcsspn(const wchar_t *s, const wchar_t *set)
 {
 	const wchar_t *p;
 	const wchar_t *q;

Modified: user/thompsa/usb/lib/libc/string/wcsstr.c
==============================================================================
--- user/thompsa/usb/lib/libc/string/wcsstr.c	Thu Feb  5 19:39:07 2009	(r188180)
+++ user/thompsa/usb/lib/libc/string/wcsstr.c	Thu Feb  5 20:13:51 2009	(r188181)
@@ -49,7 +49,7 @@ wcsstr(const wchar_t * __restrict s, con
 	wchar_t c, sc;
 	size_t len;
 
-	if ((c = *find++) != 0) {
+	if ((c = *find++) != L'\0') {
 		len = wcslen(find);
 		do {
 			do {

Modified: user/thompsa/usb/lib/libc/string/wmemchr.c
==============================================================================
--- user/thompsa/usb/lib/libc/string/wmemchr.c	Thu Feb  5 19:39:07 2009	(r188180)
+++ user/thompsa/usb/lib/libc/string/wmemchr.c	Thu Feb  5 20:13:51 2009	(r188181)
@@ -37,10 +37,7 @@ __FBSDID("$FreeBSD$");
 #include <wchar.h>
 
 wchar_t	*
-wmemchr(s, c, n)
-	const wchar_t *s;
-	wchar_t c;
-	size_t n;
+wmemchr(const wchar_t *s, wchar_t c, size_t n)
 {
 	size_t i;
 

Modified: user/thompsa/usb/lib/libc/string/wmemcmp.c
==============================================================================
--- user/thompsa/usb/lib/libc/string/wmemcmp.c	Thu Feb  5 19:39:07 2009	(r188180)
+++ user/thompsa/usb/lib/libc/string/wmemcmp.c	Thu Feb  5 20:13:51 2009	(r188181)
@@ -37,10 +37,7 @@ __FBSDID("$FreeBSD$");
 #include <wchar.h>
 
 int
-wmemcmp(s1, s2, n)
-	const wchar_t *s1;
-	const wchar_t *s2;
-	size_t n;
+wmemcmp(const wchar_t *s1, const wchar_t *s2, size_t n)
 {
 	size_t i;
 

Modified: user/thompsa/usb/lib/libc/string/wmemcpy.c
==============================================================================
--- user/thompsa/usb/lib/libc/string/wmemcpy.c	Thu Feb  5 19:39:07 2009	(r188180)
+++ user/thompsa/usb/lib/libc/string/wmemcpy.c	Thu Feb  5 20:13:51 2009	(r188181)
@@ -38,11 +38,7 @@ __FBSDID("$FreeBSD$");
 #include <wchar.h>
 
 wchar_t *
-wmemcpy(d, s, n)
-	wchar_t * __restrict d;
-	const wchar_t * __restrict s;
-	size_t n;
+wmemcpy(wchar_t * __restrict d, const wchar_t * __restrict s, size_t n)
 {
-
 	return (wchar_t *)memcpy(d, s, n * sizeof(wchar_t));
 }

Modified: user/thompsa/usb/lib/libc/string/wmemmove.c
==============================================================================
--- user/thompsa/usb/lib/libc/string/wmemmove.c	Thu Feb  5 19:39:07 2009	(r188180)
+++ user/thompsa/usb/lib/libc/string/wmemmove.c	Thu Feb  5 20:13:51 2009	(r188181)
@@ -38,11 +38,7 @@ __FBSDID("$FreeBSD$");
 #include <wchar.h>
 
 wchar_t *
-wmemmove(d, s, n)
-	wchar_t *d;
-	const wchar_t *s;
-	size_t n;
+wmemmove(wchar_t *d, const wchar_t *s, size_t n)
 {
-
 	return (wchar_t *)memmove(d, s, n * sizeof(wchar_t));
 }

Modified: user/thompsa/usb/lib/libc/string/wmemset.c
==============================================================================
--- user/thompsa/usb/lib/libc/string/wmemset.c	Thu Feb  5 19:39:07 2009	(r188180)
+++ user/thompsa/usb/lib/libc/string/wmemset.c	Thu Feb  5 20:13:51 2009	(r188181)
@@ -37,10 +37,7 @@ __FBSDID("$FreeBSD$");
 #include <wchar.h>
 
 wchar_t	*
-wmemset(s, c, n)
-	wchar_t *s;
-	wchar_t c;
-	size_t n;
+wmemset(wchar_t *s, wchar_t c, size_t n)
 {
 	size_t i;
 	wchar_t *p;

Modified: user/thompsa/usb/lib/libc/sys/send.2
==============================================================================
--- user/thompsa/usb/lib/libc/sys/send.2	Thu Feb  5 19:39:07 2009	(r188180)
+++ user/thompsa/usb/lib/libc/sys/send.2	Thu Feb  5 20:13:51 2009	(r188181)
@@ -28,7 +28,7 @@
 .\"     From: @(#)send.2	8.2 (Berkeley) 2/21/94
 .\" $FreeBSD$
 .\"
-.Dd September 13, 2006
+.Dd February 5, 2009
 .Dt SEND 2
 .Os
 .Sh NAME
@@ -190,7 +190,7 @@ receiver is not listening on the remote 
 The remote host was down.
 .It Bq Er ENETDOWN
 The remote network was down.
-.It Bq Er EPERM
+.It Bq Er EADDRNOTAVAIL
 The process using a
 .Dv SOCK_RAW
 socket was jailed and the source

Modified: user/thompsa/usb/lib/libusbhid/Makefile
==============================================================================
--- user/thompsa/usb/lib/libusbhid/Makefile	Thu Feb  5 19:39:07 2009	(r188180)
+++ user/thompsa/usb/lib/libusbhid/Makefile	Thu Feb  5 20:13:51 2009	(r188181)
@@ -15,7 +15,7 @@ MLINKS=	usbhid.3 libusbhid.3 usbhid.3 hi
 	usbhid.3 hid_init.3 \
 	usbhid.3 hid_get_data.3 usbhid.3 hid_set_data.3
 
-SRCS=	descr.c parse.c usage.c data.c
+SRCS=	descr.c descr_compat.c parse.c usage.c data.c
 
 INCS=	usbhid.h
 

Modified: user/thompsa/usb/lib/libusbhid/descr.c
==============================================================================
--- user/thompsa/usb/lib/libusbhid/descr.c	Thu Feb  5 19:39:07 2009	(r188180)
+++ user/thompsa/usb/lib/libusbhid/descr.c	Thu Feb  5 20:13:51 2009	(r188181)
@@ -39,21 +39,83 @@ __FBSDID("$FreeBSD$");
 #include <sys/time.h>
 #include <sys/ioctl.h>
 
-#include <dev/usb/usb.h>
+#include <dev/usb2/include/usb2_ioctl.h>
 
 #include "usbhid.h"
 #include "usbvar.h"
 
+int
+hid_set_immed(int fd, int enable)
+{
+	int ret;
+	ret = ioctl(fd, USB_SET_IMMED, &enable);
+	if (ret < 0)
+		ret = hid_set_immed_compat7(fd, enable);
+	return (ret);
+}
+
+int
+hid_get_report_id(int fd)
+{
+	int temp = -1;
+	int ret;
+
+	ret = ioctl(fd, USB_GET_REPORT_ID, &temp);
+	if (ret < 0)
+		ret = hid_get_report_id_compat7(fd);
+	else
+		ret = temp;
+
+	return (ret);
+}
+
 report_desc_t
 hid_get_report_desc(int fd)
 {
-	struct usb_ctl_report_desc rep;
+	struct usb2_gen_descriptor ugd;
+	report_desc_t rep;
+	void *data;
+
+	memset(&ugd, 0, sizeof(ugd));
+
+	/* get actual length first */
+	ugd.ugd_data = NULL;
+	ugd.ugd_maxlen = 65535;
+	if (ioctl(fd, USB_GET_REPORT_DESC, &ugd) < 0) {
+		/* could not read descriptor */
+		/* try FreeBSD 7 compat code */
+		return (hid_get_report_desc_compat7(fd));
+	}
 
-	rep.ucrd_size = 0;
-	if (ioctl(fd, USB_GET_REPORT_DESC, &rep) < 0)
+	/*
+	 * NOTE: The kernel will return a failure if 
+	 * "ugd_actlen" is zero.
+	 */
+	data = malloc(ugd.ugd_actlen);
+	if (data == NULL)
 		return (NULL);
 
-	return hid_use_report_desc(rep.ucrd_data, (unsigned int)rep.ucrd_size);
+	/* fetch actual descriptor */
+	ugd.ugd_data = data;
+	ugd.ugd_maxlen = ugd.ugd_actlen;
+	if (ioctl(fd, USB_GET_REPORT_DESC, &ugd) < 0) {
+		/* could not read descriptor */
+		free(data);
+		return (NULL);
+	}
+
+	/* check END_COLLECTION */
+	if (((unsigned char *)ugd.ugd_data)[ugd.ugd_actlen -1] != 0xC0) {
+		/* invalid end byte */
+		free(data);
+		return (NULL);
+	}
+
+	rep = hid_use_report_desc(data, ugd.ugd_actlen);
+
+	free(data);
+
+	return (rep);
 }
 
 report_desc_t

Copied: user/thompsa/usb/lib/libusbhid/descr_compat.c (from r188180, head/lib/libusbhid/descr_compat.c)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/thompsa/usb/lib/libusbhid/descr_compat.c	Thu Feb  5 20:13:51 2009	(r188181, copy of r188180, head/lib/libusbhid/descr_compat.c)
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 1999 Lennart Augustsson <augustss@netbsd.org>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * This file contains fallback-compatibility code for the old FreeBSD
+ * USB stack.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/types.h>
+
+#include <assert.h>
+#include <errno.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <sys/time.h>
+#include <sys/ioctl.h>
+
+#include <dev/usb/usb.h>
+
+#include "usbhid.h"
+#include "usbvar.h"
+
+int
+hid_set_immed_compat7(int fd, int enable)
+{
+	return (ioctl(fd, USB_SET_IMMED, &enable));
+}
+
+int
+hid_get_report_id_compat7(int fd)
+{
+	int temp = -1;
+
+	if (ioctl(fd, USB_GET_REPORT_ID, &temp) < 0)
+		return (-1);
+
+	return (temp);
+}
+
+report_desc_t
+hid_get_report_desc_compat7(int fd)
+{
+	struct usb_ctl_report_desc rep;
+
+	rep.ucrd_size = 0;
+	if (ioctl(fd, USB_GET_REPORT_DESC, &rep) < 0)
+		return (NULL);
+
+	return (hid_use_report_desc(rep.ucrd_data, (unsigned int)rep.ucrd_size));
+}

Modified: user/thompsa/usb/lib/libusbhid/usbhid.3
==============================================================================
--- user/thompsa/usb/lib/libusbhid/usbhid.3	Thu Feb  5 19:39:07 2009	(r188180)
+++ user/thompsa/usb/lib/libusbhid/usbhid.3	Thu Feb  5 20:13:51 2009	(r188181)
@@ -26,12 +26,13 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd December 29, 2001
+.Dd January 27, 2009
 .Dt USBHID 3
 .Os
 .Sh NAME
 .Nm usbhid ,
 .Nm hid_get_report_desc ,
+.Nm hid_get_report_id ,
 .Nm hid_use_report_desc ,
 .Nm hid_dispose_report_desc ,
 .Nm hid_start_parse ,
@@ -51,6 +52,10 @@
 .In usbhid.h
 .Ft report_desc_t
 .Fn hid_get_report_desc "int file"
+.Ft int
+.Fn hid_get_report_id "int file"
+.Ft int
+.Fn hid_set_immed "int fd" "int enable"
 .Ft report_desc_t
 .Fn hid_use_report_desc "unsigned char *data" "unsigned int size"
 .Ft void
@@ -94,7 +99,15 @@ which contains the data layout informati
 The routines can be divided into four parts: extraction of the descriptor,
 parsing of the descriptor, translating to/from symbolic names, and
 data manipulation.
+.Ss Synchronous HID operation
+Synchronous HID operation can be enabled or disabled by a call to
+.Fn hid_set_immed .
+If the second argument is zero synchronous HID operation is disabled.
+Else synchronous HID operation is enabled.
+The function returns a negative value on failure.
 .Ss Descriptor Functions
+The report descriptor ID can be obtained by calling
+.Fn hid_get_report_id .
 A report descriptor can be obtained by calling
 .Fn hid_get_report_desc
 with a file descriptor obtained by opening a

Modified: user/thompsa/usb/lib/libusbhid/usbhid.h
==============================================================================
--- user/thompsa/usb/lib/libusbhid/usbhid.h	Thu Feb  5 19:39:07 2009	(r188180)
+++ user/thompsa/usb/lib/libusbhid/usbhid.h	Thu Feb  5 20:13:51 2009	(r188181)
@@ -87,6 +87,8 @@ __BEGIN_DECLS
 report_desc_t hid_get_report_desc(int file);
 report_desc_t hid_use_report_desc(unsigned char *data, unsigned int size);
 void hid_dispose_report_desc(report_desc_t);
+int hid_get_report_id(int file);
+int hid_set_immed(int fd, int enable);
 
 /* Parsing of a HID report descriptor, parse.c: */
 hid_data_t hid_start_parse(report_desc_t d, int kindset, int id);

Modified: user/thompsa/usb/lib/libusbhid/usbvar.h
==============================================================================
--- user/thompsa/usb/lib/libusbhid/usbvar.h	Thu Feb  5 19:39:07 2009	(r188180)
+++ user/thompsa/usb/lib/libusbhid/usbvar.h	Thu Feb  5 20:13:51 2009	(r188181)
@@ -34,3 +34,8 @@ struct report_desc {
 	unsigned char data[1];
 };
 
+/* internal backwards compatibility functions */
+
+int	hid_set_immed_compat7(int fd, int enable);
+int	hid_get_report_id_compat7(int fd);
+report_desc_t	hid_get_report_desc_compat7(int fd);

Modified: user/thompsa/usb/sbin/fsck_ffs/fsck.h
==============================================================================
--- user/thompsa/usb/sbin/fsck_ffs/fsck.h	Thu Feb  5 19:39:07 2009	(r188180)
+++ user/thompsa/usb/sbin/fsck_ffs/fsck.h	Thu Feb  5 20:13:51 2009	(r188181)
@@ -270,7 +270,7 @@ char	yflag;			/* assume a yes response *
 int	bkgrdflag;		/* use a snapshot to run on an active system */
 int	bflag;			/* location of alternate super block */
 int	debug;			/* output debugging info */
-char	damagedflag;		/* run in damaged mode */
+int	inoopt;			/* trim out unused inodes */
 char	ckclean;		/* only do work if not cleanly unmounted */
 int	cvtlevel;		/* convert to newer file system format */
 int	bkgrdcheck;		/* determine if background check is possible */
@@ -337,7 +337,7 @@ void		cacheino(union dinode *dp, ino_t i
 void		catch(int);
 void		catchquit(int);
 int		changeino(ino_t dir, const char *name, ino_t newnum);
-void		check_cgmagic(int cg, struct cg *cgp);
+int		check_cgmagic(int cg, struct cg *cgp);
 int		chkrange(ufs2_daddr_t blk, int cnt);
 void		ckfini(int markclean);
 int		ckinode(union dinode *dp, struct inodesc *);
@@ -362,7 +362,7 @@ int		ftypeok(union dinode *dp);
 void		getblk(struct bufarea *bp, ufs2_daddr_t blk, long size);
 struct bufarea *getdatablk(ufs2_daddr_t blkno, long size);
 struct inoinfo *getinoinfo(ino_t inumber);
-union dinode   *getnextinode(ino_t inumber);
+union dinode   *getnextinode(ino_t inumber, int rebuildcg);
 void		getpathname(char *namebuf, ino_t curdir, ino_t ino);
 union dinode   *ginode(ino_t inumber);
 void		infohandler(int sig);

Modified: user/thompsa/usb/sbin/fsck_ffs/fsck_ffs.8
==============================================================================
--- user/thompsa/usb/sbin/fsck_ffs/fsck_ffs.8	Thu Feb  5 19:39:07 2009	(r188180)
+++ user/thompsa/usb/sbin/fsck_ffs/fsck_ffs.8	Thu Feb  5 20:13:51 2009	(r188181)
@@ -38,7 +38,7 @@
 .Nd file system consistency check and interactive repair
 .Sh SYNOPSIS
 .Nm
-.Op Fl BDFpfny
+.Op Fl BFprfny
 .Op Fl b Ar block
 .Op Fl c Ar level
 .Op Fl m Ar mode
@@ -216,22 +216,6 @@ are being converted at once.
 The format of a file system can be determined from the
 first line of output from
 .Xr dumpfs 8 .
-.It Fl D
-Run
-.Nm
-in 'damaged recovery' mode, which will enable certain aggressive
-operations that can make
-.Nm
-to survive with file systems that has very serious data damage, which
-is an useful last resort when on disk data damage is very serious
-and causes
-.Nm
-to crash otherwise.  Be
-.Em very careful
-using this flag, it is dangerous if there are data transmission hazards
-because a false positive cylinder group magic number mismatch could
-cause
-.Em irrevertible data loss!
 .Pp
 This option implies the
 .Fl f
@@ -259,6 +243,15 @@ which is assumed to be affirmative;
 do not open the file system for writing.
 .It Fl p

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-user@FreeBSD.ORG  Fri Feb  6 20:41:30 2009
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A2390106568F;
	Fri,  6 Feb 2009 20:41:30 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 85D708FC1D;
	Fri,  6 Feb 2009 20:41:30 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n16KfUpS070989;
	Fri, 6 Feb 2009 20:41:30 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n16KfUSP070987;
	Fri, 6 Feb 2009 20:41:30 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <200902062041.n16KfUSP070987@svn.freebsd.org>
From: Andrew Thompson <thompsa@FreeBSD.org>
Date: Fri, 6 Feb 2009 20:41:30 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r188246 - user/thompsa/usb/sys/dev/usb2/wlan
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 06 Feb 2009 20:41:30 -0000

Author: thompsa
Date: Fri Feb  6 20:41:30 2009
New Revision: 188246
URL: http://svn.freebsd.org/changeset/base/188246

Log:
  - Fix up the intrrupt read to copy the data from the right buffer.
  - Change rx handling slightly to make it a bit more robust.

Modified:
  user/thompsa/usb/sys/dev/usb2/wlan/if_zyd2.c
  user/thompsa/usb/sys/dev/usb2/wlan/if_zydreg.h

Modified: user/thompsa/usb/sys/dev/usb2/wlan/if_zyd2.c
==============================================================================
--- user/thompsa/usb/sys/dev/usb2/wlan/if_zyd2.c	Fri Feb  6 20:09:14 2009	(r188245)
+++ user/thompsa/usb/sys/dev/usb2/wlan/if_zyd2.c	Fri Feb  6 20:41:30 2009	(r188246)
@@ -368,7 +368,7 @@ zyd_attach(device_t dev)
 	sc->sc_dev = dev;
 	sc->sc_udev = uaa->device;
 	sc->sc_macrev = USB_GET_DRIVER_INFO(uaa);
-#ifdef ZYD_DEBUG
+#ifdef USB_DEBUG
 	sc->sc_debug = zyd_debug;
 #endif
 	mtx_init(&sc->sc_mtx, device_get_nameunit(sc->sc_dev),
@@ -757,10 +757,16 @@ zyd_intr_read_callback(struct usb2_xfer 
 				}
 				if (i != rqp->olen)
 					continue;
+				/* copy answer into caller-supplied buffer */
+				bcopy(cmd->data, rqp->odata,
+				    sizeof(struct zyd_pair) * rqp->olen);
 				wakeup(rqp);	/* wakeup caller */
 				return;
 			}
-			return;	/* unexpected IORD notification */
+			device_printf(sc->sc_dev,
+			    "unexpected IORD notification %*D\n",
+			    datalen, cmd->data, ":");
+			break;
 		}
 		default:
 			device_printf(sc->sc_dev, "unknown notification %x\n",
@@ -846,8 +852,6 @@ zyd_intr_write_callback(struct usb2_xfer
 			sc->sc_flags |= ZYD_FLAG_INTR_WRITE_STALL;
 			usb2_transfer_start(sc->sc_xfer[ZYD_INTR_CS_WR]);
 		}
-		rqp = xfer->priv_fifo;
-		wakeup(rqp);	/* wakeup caller */
 		break;
 	}
 }
@@ -883,10 +887,12 @@ zyd_cmd(struct zyd_softc *sc, uint16_t c
 
 	rq.cmd = &cmd;
 	rq.idata = idata;
+	rq.odata = odata;
 	rq.ilen = sizeof(uint16_t) + ilen;
 	rq.olen = olen / sizeof(struct zyd_pair);
 	rq.flags = flags;
 	STAILQ_INSERT_TAIL(&sc->sc_rqh, &rq, rq);
+	usb2_transfer_start(sc->sc_xfer[ZYD_INTR_DT_RD]);
 	usb2_transfer_start(sc->sc_xfer[ZYD_INTR_DT_WR]);
 
 	/* wait at most one second for command reply */
@@ -894,7 +900,6 @@ zyd_cmd(struct zyd_softc *sc, uint16_t c
 	if (error)
 		device_printf(sc->sc_dev, "command timeout\n");
 	STAILQ_REMOVE(&sc->sc_rqh, &rq, zyd_rq, rq);
-	bcopy(cmd.data, odata, olen);	/* copy answer into caller buffer */
 
 	return (error);
 }
@@ -2246,7 +2251,12 @@ zyd_rx_data(struct usb2_xfer *xfer, int 
 	    sizeof(struct zyd_rx_stat) - IEEE80211_CRC_LEN;
 
 	/* allocate a mbuf to store the frame */
-	if (rlen > MHLEN)
+	if (rlen > MCLBYTES) {
+		DPRINTF(sc, ZYD_DEBUG_RECV, "%s: frame too long (length=%d)\n",
+		    device_get_nameunit(sc->sc_dev), rlen);
+		ifp->if_ierrors++;
+		return;
+	} else if (rlen > MHLEN)
 		m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
 	else
 		m = m_gethdr(M_DONTWAIT, MT_DATA);
@@ -2258,7 +2268,8 @@ zyd_rx_data(struct usb2_xfer *xfer, int 
 	}
 	m->m_pkthdr.rcvif = ifp;
 	m->m_pkthdr.len = m->m_len = rlen;
-	usb2_copy_out(xfer->frbuffers, offset + sizeof(plcp), m->m_data, rlen);
+	usb2_copy_out(xfer->frbuffers, offset + sizeof(plcp),
+	    mtod(m, uint8_t *), rlen);
 
 	if (bpf_peers_present(ifp->if_bpf)) {
 		struct zyd_rx_radiotap_header *tap = &sc->sc_rxtap;
@@ -2281,6 +2292,7 @@ zyd_rx_data(struct usb2_xfer *xfer, int 
 
 	sc->sc_rx_data[idx].rssi = rssi;
 	sc->sc_rx_data[idx].m = m;
+	sc->sc_rx_count++;
 }
 
 static void
@@ -2295,16 +2307,11 @@ zyd_bulk_read_callback(struct usb2_xfer 
 	uint32_t offset;
 	uint8_t rssi;
 	int8_t nf;
-	int i, rxcount;
+	int i;
 
-	rxcount = 0;
+	sc->sc_rx_count = 0;
 	switch (USB_GET_STATE(xfer)) {
 	case USB_ST_TRANSFERRED:
-		if (xfer->actlen < MAX(sizeof(desc), ZYD_MIN_FRAGSZ)) {
-			DPRINTF(sc, ZYD_DEBUG_ANY, "xfer too short, %d bytes\n", xfer->actlen);
-			ifp->if_ierrors++;
-			goto tr_setup;
-		}
 		usb2_copy_out(xfer->frbuffers, xfer->actlen - sizeof(desc),
 		    &desc, sizeof(desc));
 
@@ -2320,7 +2327,6 @@ zyd_bulk_read_callback(struct usb2_xfer 
 					break;
 
 				zyd_rx_data(xfer, i, offset, len16);
-				rxcount++;
 
 				/* next frame is aligned on a 32-bit boundary */
 				len16 = (len16 + 3) & ~3;
@@ -2334,11 +2340,9 @@ zyd_bulk_read_callback(struct usb2_xfer 
 			    "%s: received single-frame transfer\n", __func__);
 
 			zyd_rx_data(xfer, 0, 0, xfer->actlen);
-			rxcount++;
 		}
 		/* FALLTHROUGH */
 	case USB_ST_SETUP:
-tr_setup:
 		if (sc->sc_flags & ZYD_FLAG_BULK_READ_STALL) {
 			usb2_transfer_start(sc->sc_xfer[ZYD_BULK_CS_RD]);
 		} else {
@@ -2352,9 +2356,10 @@ tr_setup:
 		 * "ieee80211_input" here, and not some lines up!
 		 */
 		ZYD_UNLOCK(sc);
-		for (i = 0;i < rxcount; i++) {
+		for (i = 0; i < sc->sc_rx_count; i++) {
 			rssi = sc->sc_rx_data[i].rssi;
 			m = sc->sc_rx_data[i].m;
+			sc->sc_rx_data[i].m = NULL;
 
 			nf = -95;	/* XXX */
 
@@ -2859,6 +2864,7 @@ zyd_init_locked(struct zyd_softc *sc)
 	int error;
 	struct ifnet *ifp = sc->sc_ifp;
 	struct ieee80211com *ic = ifp->if_l2com;
+	struct usb2_config_descriptor *cd;
 	uint32_t val;
 
 	ZYD_LOCK_ASSERT(sc, MA_OWNED);
@@ -2874,7 +2880,15 @@ zyd_init_locked(struct zyd_softc *sc)
 			goto fail;
 		}
 
-		if ((error = zyd_hw_init(sc)) != 0) {
+		/* reset device */
+		cd = usb2_get_config_descriptor(sc->sc_udev);
+		error = usb2_req_set_config(sc->sc_udev, &sc->sc_mtx,
+		    cd->bConfigurationValue);
+		if (error)
+			device_printf(sc->sc_dev, "reset failed, continuing\n");
+
+		error = zyd_hw_init(sc);
+		if (error) {
 			device_printf(sc->sc_dev,
 			    "hardware initialization failed\n");
 			goto fail;
@@ -2950,6 +2964,7 @@ zyd_init_locked(struct zyd_softc *sc)
 
 	ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
 	ifp->if_drv_flags |= IFF_DRV_RUNNING;
+	usb2_transfer_start(sc->sc_xfer[ZYD_BULK_DT_RD]);
 	usb2_transfer_start(sc->sc_xfer[ZYD_INTR_DT_RD]);
 
 	return;
@@ -2993,8 +3008,9 @@ zyd_stop(struct zyd_softc *sc)
 
 	zyd_free_tx_list(sc);
 
-	/* Stop now if the device has vanished */
-	if (sc->sc_flags & ZYD_FLAG_DETACHING)
+	/* Stop now if the device has vanished or was never set up */
+	if (sc->sc_flags & ZYD_FLAG_DETACHING ||
+	    (sc->sc_flags & ZYD_FLAG_INITONCE) == 0)
 		return;
 
 	/* switch radio transmitter OFF */
@@ -3121,7 +3137,7 @@ zyd_scantask(void *arg, struct usb2_task
 	struct ifnet *ifp = sc->sc_ifp;
 	struct ieee80211com *ic = ifp->if_l2com;
 
-	ZYD_LOCK(sc);
+	ZYD_LOCK_ASSERT(sc, MA_OWNED);
 
 	switch (sc->sc_scan_action) {
 	case ZYD_SCAN_START:
@@ -3140,8 +3156,6 @@ zyd_scantask(void *arg, struct usb2_task
 		    sc->sc_scan_action);
                 break;
         }
-
-        ZYD_UNLOCK(sc);
 }
 
 static void

Modified: user/thompsa/usb/sys/dev/usb2/wlan/if_zydreg.h
==============================================================================
--- user/thompsa/usb/sys/dev/usb2/wlan/if_zydreg.h	Fri Feb  6 20:09:14 2009	(r188245)
+++ user/thompsa/usb/sys/dev/usb2/wlan/if_zydreg.h	Fri Feb  6 20:41:30 2009	(r188246)
@@ -1231,6 +1231,7 @@ struct zyd_rf {
 struct zyd_rq {
 	struct zyd_cmd		*cmd;
 	const uint16_t		*idata;
+	struct zyd_pair		*odata;
 	int			ilen;
 	int			olen;
 	int			flags;
@@ -1325,6 +1326,7 @@ struct zyd_softc {
 	int			tx_nfree;
 	struct zyd_rx_desc	sc_rx_desc;
 	struct zyd_rx_data	sc_rx_data[ZYD_MAX_RXFRAMECNT];
+	int			sc_rx_count;
 
 	struct zyd_cmd		sc_ibuf;
 

From owner-svn-src-user@FreeBSD.ORG  Fri Feb  6 21:22:36 2009
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 571471065673;
	Fri,  6 Feb 2009 21:22:36 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 2B7C18FC1A;
	Fri,  6 Feb 2009 21:22:36 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n16LMaW7071775;
	Fri, 6 Feb 2009 21:22:36 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n16LMaAu071774;
	Fri, 6 Feb 2009 21:22:36 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <200902062122.n16LMaAu071774@svn.freebsd.org>
From: Andrew Thompson <thompsa@FreeBSD.org>
Date: Fri, 6 Feb 2009 21:22:36 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r188248 - user/thompsa/usb/sys/dev/usb2/wlan
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 06 Feb 2009 21:22:36 -0000

Author: thompsa
Date: Fri Feb  6 21:22:35 2009
New Revision: 188248
URL: http://svn.freebsd.org/changeset/base/188248

Log:
  Avoid freeing the tx data if its already been reaped.

Modified:
  user/thompsa/usb/sys/dev/usb2/wlan/if_zyd2.c

Modified: user/thompsa/usb/sys/dev/usb2/wlan/if_zyd2.c
==============================================================================
--- user/thompsa/usb/sys/dev/usb2/wlan/if_zyd2.c	Fri Feb  6 20:57:10 2009	(r188247)
+++ user/thompsa/usb/sys/dev/usb2/wlan/if_zyd2.c	Fri Feb  6 21:22:35 2009	(r188248)
@@ -124,7 +124,7 @@ static void	zyd_update_mcast(struct ifne
 static int	zyd_set_rxfilter(struct zyd_softc *);
 static void	zyd_set_chan(struct zyd_softc *, struct ieee80211_channel *);
 static int	zyd_set_beacon_interval(struct zyd_softc *, int);
-static void	zyd_rx_data(struct usb2_xfer *, int, int, uint16_t);
+static void	zyd_rx_data(struct usb2_xfer *, int, uint16_t);
 static int	zyd_tx_mgt(struct zyd_softc *, struct mbuf *,
 		    struct ieee80211_node *);
 static int	zyd_tx_data(struct zyd_softc *, struct mbuf *,
@@ -2219,7 +2219,7 @@ fail:
 }
 
 static void
-zyd_rx_data(struct usb2_xfer *xfer, int idx, int offset, uint16_t len)
+zyd_rx_data(struct usb2_xfer *xfer, int offset, uint16_t len)
 {
 	struct zyd_softc *sc = xfer->priv_sc;
 	struct ifnet *ifp = sc->sc_ifp;
@@ -2290,8 +2290,8 @@ zyd_rx_data(struct usb2_xfer *xfer, int 
 	}
 	rssi = (stat.rssi > 63) ? 127 : 2 * stat.rssi;
 
-	sc->sc_rx_data[idx].rssi = rssi;
-	sc->sc_rx_data[idx].m = m;
+	sc->sc_rx_data[sc->sc_rx_count].rssi = rssi;
+	sc->sc_rx_data[sc->sc_rx_count].m = m;
 	sc->sc_rx_count++;
 }
 
@@ -2326,7 +2326,7 @@ zyd_bulk_read_callback(struct usb2_xfer 
 				if (len16 == 0 || len16 > xfer->actlen)
 					break;
 
-				zyd_rx_data(xfer, i, offset, len16);
+				zyd_rx_data(xfer, offset, len16);
 
 				/* next frame is aligned on a 32-bit boundary */
 				len16 = (len16 + 3) & ~3;
@@ -2339,7 +2339,7 @@ zyd_bulk_read_callback(struct usb2_xfer 
 			DPRINTF(sc, ZYD_DEBUG_RECV,
 			    "%s: received single-frame transfer\n", __func__);
 
-			zyd_rx_data(xfer, 0, 0, xfer->actlen);
+			zyd_rx_data(xfer, 0, xfer->actlen);
 		}
 		/* FALLTHROUGH */
 	case USB_ST_SETUP:
@@ -2623,10 +2623,9 @@ zyd_bulk_write_callback(struct usb2_xfer
 
 		ifp->if_oerrors++;
 		data = xfer->priv_fifo;
-		if (data != NULL) {
+		xfer->priv_fifo = NULL;
+		if (data != NULL && ifp->if_drv_flags & IFF_DRV_RUNNING)
 			zyd_tx_free(data, xfer->error);
-			xfer->priv_fifo = NULL;
-		}
 		break;
 	}
 }

From owner-svn-src-user@FreeBSD.ORG  Fri Feb  6 22:40:16 2009
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2DDB0106566B;
	Fri,  6 Feb 2009 22:40:16 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 023E98FC1F;
	Fri,  6 Feb 2009 22:40:16 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n16MeF06073341;
	Fri, 6 Feb 2009 22:40:15 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n16MeFAZ073339;
	Fri, 6 Feb 2009 22:40:15 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <200902062240.n16MeFAZ073339@svn.freebsd.org>
From: Andrew Thompson <thompsa@FreeBSD.org>
Date: Fri, 6 Feb 2009 22:40:15 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r188252 - user/thompsa/usb/sys/dev/usb2/controller
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 06 Feb 2009 22:40:16 -0000

Author: thompsa
Date: Fri Feb  6 22:40:15 2009
New Revision: 188252
URL: http://svn.freebsd.org/changeset/base/188252

Log:
  Fix OHCI and EHCI counting bug when multiple TD's are involved in
  a short USB transfer and a short packet happens on the non-last
  TD in the USB transfer frame.
  
  Submitted by:	Hans Petter Selasky

Modified:
  user/thompsa/usb/sys/dev/usb2/controller/ehci2.c
  user/thompsa/usb/sys/dev/usb2/controller/ohci2.c

Modified: user/thompsa/usb/sys/dev/usb2/controller/ehci2.c
==============================================================================
--- user/thompsa/usb/sys/dev/usb2/controller/ehci2.c	Fri Feb  6 22:24:03 2009	(r188251)
+++ user/thompsa/usb/sys/dev/usb2/controller/ehci2.c	Fri Feb  6 22:40:15 2009	(r188252)
@@ -1144,6 +1144,9 @@ ehci_non_isoc_done_sub(struct usb2_xfer 
 	td = xfer->td_transfer_cache;
 	td_alt_next = td->alt_next;
 
+	if (xfer->aframes != xfer->nframes) {
+		xfer->frlengths[xfer->aframes] = 0;
+	}
 	while (1) {
 
 		usb2_pc_cpu_invalidate(td->page_cache);
@@ -1152,8 +1155,8 @@ ehci_non_isoc_done_sub(struct usb2_xfer 
 		len = EHCI_QTD_GET_BYTES(status);
 
 		/*
-	         * Verify the status length and subtract
-	         * the remainder from "frlengths[]":
+	         * Verify the status length and
+		 * add the length to "frlengths[]":
 	         */
 		if (len > td->len) {
 			/* should not happen */
@@ -1161,7 +1164,7 @@ ehci_non_isoc_done_sub(struct usb2_xfer 
 			    "0x%04x/0x%04x bytes\n", len, td->len);
 			status |= EHCI_QTD_HALTED;
 		} else if (xfer->aframes != xfer->nframes) {
-			xfer->frlengths[xfer->aframes] -= len;
+			xfer->frlengths[xfer->aframes] += td->len - len;
 		}
 		/* Check for last transfer */
 		if (((void *)td) == xfer->td_transfer_last) {

Modified: user/thompsa/usb/sys/dev/usb2/controller/ohci2.c
==============================================================================
--- user/thompsa/usb/sys/dev/usb2/controller/ohci2.c	Fri Feb  6 22:24:03 2009	(r188251)
+++ user/thompsa/usb/sys/dev/usb2/controller/ohci2.c	Fri Feb  6 22:40:15 2009	(r188252)
@@ -836,6 +836,9 @@ ohci_non_isoc_done_sub(struct usb2_xfer 
 	td_alt_next = td->alt_next;
 	td_flags = 0;
 
+	if (xfer->aframes != xfer->nframes) {
+		xfer->frlengths[xfer->aframes] = 0;
+	}
 	while (1) {
 
 		usb2_pc_cpu_invalidate(td->page_cache);
@@ -859,10 +862,15 @@ ohci_non_isoc_done_sub(struct usb2_xfer 
 				cc = OHCI_CC_STALL;
 			} else if (xfer->aframes != xfer->nframes) {
 				/*
-				 * subtract remaining length from
-				 * "frlengths[]"
+				 * Sum up total transfer length
+				 * in "frlengths[]":
 				 */
-				xfer->frlengths[xfer->aframes] -= temp;
+				xfer->frlengths[xfer->aframes] += td->len - temp;
+			}
+		} else{
+			if (xfer->aframes != xfer->nframes) {
+				/* transfer was complete */
+				xfer->frlengths[xfer->aframes] += td->len;
 			}
 		}
 		/* Check for last transfer */