From owner-svn-src-head@FreeBSD.ORG Sun May 9 00:32:52 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E5E95106564A; Sun, 9 May 2010 00:32:52 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id D626A8FC0C; Sun, 9 May 2010 00:32:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o490Wqm3074260; Sun, 9 May 2010 00:32:52 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o490Wqfp074258; Sun, 9 May 2010 00:32:52 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201005090032.o490Wqfp074258@svn.freebsd.org> From: Alan Cox Date: Sun, 9 May 2010 00:32:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207806 - head/sys/vm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 May 2010 00:32:53 -0000 Author: alc Date: Sun May 9 00:32:52 2010 New Revision: 207806 URL: http://svn.freebsd.org/changeset/base/207806 Log: Remove the page queues lock around a call to vm_page_activate(). Make the page dirty before adding it to the active queue. Modified: head/sys/vm/swap_pager.c Modified: head/sys/vm/swap_pager.c ============================================================================== --- head/sys/vm/swap_pager.c Sat May 8 23:01:47 2010 (r207805) +++ head/sys/vm/swap_pager.c Sun May 9 00:32:52 2010 (r207806) @@ -1707,11 +1707,9 @@ swp_pager_force_pagein(vm_object_t objec m = vm_page_grab(object, pindex, VM_ALLOC_NORMAL|VM_ALLOC_RETRY); if (m->valid == VM_PAGE_BITS_ALL) { vm_object_pip_subtract(object, 1); + vm_page_dirty(m); vm_page_lock(m); - vm_page_lock_queues(); vm_page_activate(m); - vm_page_dirty(m); - vm_page_unlock_queues(); vm_page_unlock(m); vm_page_wakeup(m); vm_pager_page_unswapped(m); From owner-svn-src-head@FreeBSD.ORG Sun May 9 09:20:26 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1ED6F106564A; Sun, 9 May 2010 09:20:26 +0000 (UTC) (envelope-from kaiw@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 0E4D78FC15; Sun, 9 May 2010 09:20:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o499KPph089988; Sun, 9 May 2010 09:20:25 GMT (envelope-from kaiw@svn.freebsd.org) Received: (from kaiw@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o499KPGD089986; Sun, 9 May 2010 09:20:25 GMT (envelope-from kaiw@svn.freebsd.org) Message-Id: <201005090920.o499KPGD089986@svn.freebsd.org> From: Kai Wang Date: Sun, 9 May 2010 09:20:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207812 - head/usr.sbin/bluetooth/bthidd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 May 2010 09:20:26 -0000 Author: kaiw Date: Sun May 9 09:20:25 2010 New Revision: 207812 URL: http://svn.freebsd.org/changeset/base/207812 Log: Catch up with libusbhid merge (rev 205728). hid_get_data() now expects that the hid data passed in always contains the report ID byte. Thus we should not skip the the report ID byte in hid_interrupt(). Also, if HUP_KEYBOARD usage is an array, do not try to modify the 'data' pointer, instead, increase the hid_item_t field 'pos' by 'report_size' before calling hid_get_data() during each iteration. PR: usb/146367 Reported and tested by: Alex Deiter Pointy hat to: kaiw Reviewed by: emax Modified: head/usr.sbin/bluetooth/bthidd/hid.c Modified: head/usr.sbin/bluetooth/bthidd/hid.c ============================================================================== --- head/usr.sbin/bluetooth/bthidd/hid.c Sun May 9 08:22:33 2010 (r207811) +++ head/usr.sbin/bluetooth/bthidd/hid.c Sun May 9 09:20:25 2010 (r207812) @@ -130,7 +130,7 @@ hid_interrupt(bthid_session_p s, uint8_t hid_item_t h; int32_t report_id, usage, page, val, mouse_x, mouse_y, mouse_z, mouse_butt, - mevents, kevents; + mevents, kevents, i; assert(s != NULL); assert(s->srv != NULL); @@ -150,8 +150,8 @@ hid_interrupt(bthid_session_p s, uint8_t } report_id = data[1]; - data += 2; - len -= 2; + data ++; + len --; hid_device = get_hid_device(&s->bdaddr); assert(hid_device != NULL); @@ -202,17 +202,11 @@ hid_interrupt(bthid_session_p s, uint8_t if (val && val < kbd_maxkey()) bit_set(s->keys1, val); - data ++; - len --; - - len = min(len, h.report_size); - while (len > 0) { + for (i = 1; i < h.report_count; i++) { + h.pos += h.report_size; val = hid_get_data(data, &h); if (val && val < kbd_maxkey()) bit_set(s->keys1, val); - - data ++; - len --; } } break; From owner-svn-src-head@FreeBSD.ORG Sun May 9 14:21:35 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 33C00106564A; Sun, 9 May 2010 14:21:35 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 22DF58FC27; Sun, 9 May 2010 14:21:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o49ELZFx057259; Sun, 9 May 2010 14:21:35 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o49ELZFC057255; Sun, 9 May 2010 14:21:35 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201005091421.o49ELZFC057255@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 9 May 2010 14:21:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207816 - head/share/man/man3 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 May 2010 14:21:35 -0000 Author: jilles Date: Sun May 9 14:21:34 2010 New Revision: 207816 URL: http://svn.freebsd.org/changeset/base/207816 Log: Document clock and pshared condvar attributes. Note: clock accepts CLOCK_VIRTUAL and CLOCK_PROF too, but this seems broken as it simply waits for the difference of the current and given value of the clock as if it were CLOCK_MONOTONIC. So document only CLOCK_REALTIME and CLOCK_MONOTONIC as allowed. MFC after: 1 week Modified: head/share/man/man3/Makefile head/share/man/man3/pthread_cond_timedwait.3 head/share/man/man3/pthread_condattr.3 Modified: head/share/man/man3/Makefile ============================================================================== --- head/share/man/man3/Makefile Sun May 9 12:36:51 2010 (r207815) +++ head/share/man/man3/Makefile Sun May 9 14:21:34 2010 (r207816) @@ -251,7 +251,11 @@ PTHREAD_MLINKS+=pthread_barrierattr.3 pt PTHREAD_MLINKS+=pthread_barrier_destroy.3 pthread_barrier_init.3 \ pthread_barrier_destroy.3 pthread_barrier_wait.3 PTHREAD_MLINKS+=pthread_condattr.3 pthread_condattr_destroy.3 \ - pthread_condattr.3 pthread_condattr_init.3 + pthread_condattr.3 pthread_condattr_init.3 \ + pthread_condattr.3 pthread_condattr_getclock.3 \ + pthread_condattr.3 pthread_condattr_setclock.3 \ + pthread_condattr.3 pthread_condattr_getpshared.3 \ + pthread_condattr.3 pthread_condattr_setpshared.3 PTHREAD_MLINKS+=pthread_getconcurrency.3 pthread_setconcurrency.3 PTHREAD_MLINKS+=pthread_multi_np.3 pthread_single_np.3 PTHREAD_MLINKS+=pthread_mutexattr.3 pthread_mutexattr_destroy.3 \ Modified: head/share/man/man3/pthread_cond_timedwait.3 ============================================================================== --- head/share/man/man3/pthread_cond_timedwait.3 Sun May 9 12:36:51 2010 (r207815) +++ head/share/man/man3/pthread_cond_timedwait.3 Sun May 9 14:21:34 2010 (r207816) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 28, 1998 +.Dd May 9, 2010 .Dt PTHREAD_COND_TIMEDWAIT 3 .Os .Sh NAME @@ -56,6 +56,11 @@ time specified in .Fa abstime , and the current thread reacquires the lock on .Fa mutex . +.Pp +The clock used to measure +.Fa abstime +can be specified during creation of the condition variable using +.Xr pthread_condattr_setclock 3 . .Sh RETURN VALUES If successful, the .Fn pthread_cond_timedwait @@ -87,7 +92,8 @@ was not locked by the calling thread. .Xr pthread_cond_destroy 3 , .Xr pthread_cond_init 3 , .Xr pthread_cond_signal 3 , -.Xr pthread_cond_wait 3 +.Xr pthread_cond_wait 3 , +.Xr pthread_condattr_setclock 3 .Sh STANDARDS The .Fn pthread_cond_timedwait Modified: head/share/man/man3/pthread_condattr.3 ============================================================================== --- head/share/man/man3/pthread_condattr.3 Sun May 9 12:36:51 2010 (r207815) +++ head/share/man/man3/pthread_condattr.3 Sun May 9 14:21:34 2010 (r207816) @@ -26,12 +26,16 @@ .\" EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd April 28, 2000 +.Dd May 9, 2010 .Dt PTHREAD_CONDATTR 3 .Os .Sh NAME .Nm pthread_condattr_init , -.Nm pthread_condattr_destroy +.Nm pthread_condattr_destroy , +.Nm pthread_condattr_getclock , +.Nm pthread_condattr_setclock , +.Nm pthread_condattr_getpshared , +.Nm pthread_condattr_setpshared , .Nd condition attribute operations .Sh LIBRARY .Lb libpthread @@ -41,14 +45,17 @@ .Fn pthread_condattr_init "pthread_condattr_t *attr" .Ft int .Fn pthread_condattr_destroy "pthread_condattr_t *attr" +.Ft int +.Fn pthread_condattr_getclock "pthread_condattr_t * restrict attr" "clock_t * restrict clock_id" +.Ft int +.Fn pthread_condattr_setclock "pthread_condattr_t *attr" "clock_t clock_id" +.Ft int +.Fn pthread_condattr_getpshared "pthread_condattr_t * restrict attr" "int * restrict pshared" +.Ft int +.Fn pthread_condattr_setpshared "pthread_condattr_t *attr" "int pshared" .Sh DESCRIPTION Condition attribute objects are used to specify parameters to .Fn pthread_cond_init . -.Fx Ns 's -implementation of conditions does not support any non-default -attributes, so these functions are not very useful, though they are required -to be present by -.Tn POSIX . .Pp The .Fn pthread_condattr_init @@ -57,6 +64,52 @@ function initializes a condition attribu The .Fn pthread_condattr_destroy function destroys a condition attribute object. +.Pp +The +.Fn pthread_condattr_getclock +function will put the value of the clock attribute from +.Fa attr +into the memory area pointed to by +.Fa clock_id . +The +.Fn pthread_condattr_setclock +function will set the clock attribute of +.Fa attr +to the value specified in +.Fa clock_id . +The clock attribute affects the interpretation of +.Fa abstime +in +.Xr pthread_cond_timedwait 3 +and may be set to +.Dv CLOCK_REALTIME +(default) +or +.Dv CLOCK_MONOTONIC . +.Pp +The +.Fn pthread_condattr_getpshared +function will put the value of the process-shared attribute from +.Fa attr +into the memory area pointed to by +.Fa pshared . +The +.Fn pthread_condattr_setpshared +function will set the process-shared attribute of +.Fa attr +to the value specified in +.Fa pshared . +The argument +.Fa pshared +may have one of the following values: +.Bl -tag -width ".Dv PTHREAD_PROCESS_PRIVATE" +.It Dv PTHREAD_PROCESS_PRIVATE +The condition variable it is attached to may only be accessed by +threads in the same process as the one that created the object. +.It Dv PTHREAD_PROCESS_SHARED +The condition variable it is attached to may be accessed by +threads in processes other than the one that created the object. +.El .Sh RETURN VALUES If successful, these functions return 0. Otherwise, an error number is returned to indicate the error. @@ -77,8 +130,29 @@ function will fail if: Invalid value for .Fa attr . .El +.Pp +The +.Fn pthread_condattr_setclock +function will fail if: +.Bl -tag -width Er +.It Bq Er EINVAL +The value specified in +.Fa clock_id +is not one of the allowed values. +.El +.Pp +The +.Fn pthread_condattr_setpshared +function will fail if: +.Bl -tag -width Er +.It Bq Er EINVAL +The value specified in +.Fa pshared +is not one of the allowed values. +.El .Sh SEE ALSO -.Xr pthread_cond_init 3 +.Xr pthread_cond_init 3 , +.Xr pthread_cond_timedwait 3 .Sh STANDARDS The .Fn pthread_condattr_init @@ -86,3 +160,15 @@ and .Fn pthread_condattr_destroy functions conform to .St -p1003.1-96 +.Sh BUGS +The implementation of +condition variables +does not fully conform to +.St -p1003.2 +because the process-shared attribute is ignored; +if any value other than +.Dv PTHREAD_PROCESSES_PRIVATE +is specified in a call to +.Fn pthread_condattr_setpshared , +it will return +.Er EINVAL . From owner-svn-src-head@FreeBSD.ORG Sun May 9 15:00:30 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A3A8E1065679; Sun, 9 May 2010 15:00:30 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 9397F8FC17; Sun, 9 May 2010 15:00:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o49F0UUb066007; Sun, 9 May 2010 15:00:30 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o49F0U67066005; Sun, 9 May 2010 15:00:30 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201005091500.o49F0U67066005@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 9 May 2010 15:00:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207817 - head/share/man/man1 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 May 2010 15:00:30 -0000 Author: jilles Date: Sun May 9 15:00:30 2010 New Revision: 207817 URL: http://svn.freebsd.org/changeset/base/207817 Log: builtin(1): sh has no @ builtin command. MFC after: 1 week Modified: head/share/man/man1/builtin.1 Modified: head/share/man/man1/builtin.1 ============================================================================== --- head/share/man/man1/builtin.1 Sun May 9 14:21:34 2010 (r207816) +++ head/share/man/man1/builtin.1 Sun May 9 15:00:30 2010 (r207817) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 25, 2010 +.Dd May 9, 2010 .Dt BUILTIN 1 .Os .Sh NAME @@ -200,7 +200,7 @@ but are implemented as scripts using a b .It Ic % Ta \&No Ta Yes Ta \&No .It Ic \&. Ta \&No Ta \&No Ta Yes .It Ic \&: Ta \&No Ta Yes Ta Yes -.It Ic @ Ta \&No Ta Yes Ta Yes +.It Ic @ Ta \&No Ta Yes Ta \&No .It Ic \&[ Ta Yes Ta \&No Ta Yes .It Ic { Ta \&No Ta \&No Ta Yes .It Ic } Ta \&No Ta \&No Ta Yes From owner-svn-src-head@FreeBSD.ORG Sun May 9 16:04:32 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 706CD1065672; Sun, 9 May 2010 16:04:32 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 602638FC14; Sun, 9 May 2010 16:04:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o49G4WD5080074; Sun, 9 May 2010 16:04:32 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o49G4Wur080072; Sun, 9 May 2010 16:04:32 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201005091604.o49G4Wur080072@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 9 May 2010 16:04:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207820 - head/tools/regression/bin/sh/errors X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 May 2010 16:04:32 -0000 Author: jilles Date: Sun May 9 16:04:32 2010 New Revision: 207820 URL: http://svn.freebsd.org/changeset/base/207820 Log: sh: Fix bug in assignment error test. The test failed if the command returned nonzero exit status, and it really should return that. Modified: head/tools/regression/bin/sh/errors/assignment-error1.0 Modified: head/tools/regression/bin/sh/errors/assignment-error1.0 ============================================================================== --- head/tools/regression/bin/sh/errors/assignment-error1.0 Sun May 9 15:41:27 2010 (r207819) +++ head/tools/regression/bin/sh/errors/assignment-error1.0 Sun May 9 16:04:32 2010 (r207820) @@ -26,5 +26,5 @@ do done # Other utilities must not abort; we currently still execute them. -sh -c "readonly a=0; a=1 true; exit $a" 2>/dev/null || exit 1 -sh -c "readonly a=0; a=1 command :; exit $a" 2>/dev/null || exit 1 +sh -c 'readonly a=0; a=1 true; exit $a' 2>/dev/null || exit 1 +sh -c 'readonly a=0; a=1 command :; exit $a' 2>/dev/null || exit 1 From owner-svn-src-head@FreeBSD.ORG Sun May 9 16:15:40 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5DC56106566C; Sun, 9 May 2010 16:15:40 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 4C4778FC14; Sun, 9 May 2010 16:15:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o49GFekh082543; Sun, 9 May 2010 16:15:40 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o49GFeOd082538; Sun, 9 May 2010 16:15:40 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201005091615.o49GFeOd082538@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 9 May 2010 16:15:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207821 - in head/tools/regression: bin/sh/builtins lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 May 2010 16:15:40 -0000 Author: jilles Date: Sun May 9 16:15:40 2010 New Revision: 207821 URL: http://svn.freebsd.org/changeset/base/207821 Log: Generate some tests for sh's case command from the fnmatch tests. I'm committing the generated files because I don't like a build dependency for the sh(1) tests, and they are small and will not change much. Added: head/tools/regression/bin/sh/builtins/case2.0 (contents, props changed) head/tools/regression/bin/sh/builtins/case3.0 (contents, props changed) Modified: head/tools/regression/lib/libc/gen/Makefile head/tools/regression/lib/libc/gen/test-fnmatch.c Added: head/tools/regression/bin/sh/builtins/case2.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/builtins/case2.0 Sun May 9 16:15:40 2010 (r207821) @@ -0,0 +1,106 @@ +# Generated by ./test-fnmatch -s 1, do not edit. +# $FreeBSD$ +failures= +failed() { printf '%s\n' "Failed: $1 '$2' '$3'"; failures=x$failures; } +testmatch() { eval "case \$2 in ''$1) ;; *) failed testmatch \"\$@\";; esac"; } +testnomatch() { eval "case \$2 in ''$1) failed testnomatch \"\$@\";; esac"; } +testmatch '' '' +testmatch 'a' 'a' +testnomatch 'a' 'b' +testnomatch 'a' 'A' +testmatch '*' 'a' +testmatch '*' 'aa' +testmatch '*a' 'a' +testnomatch '*a' 'b' +testnomatch '*a*' 'b' +testmatch '*a*b*' 'ab' +testmatch '*a*b*' 'qaqbq' +testmatch '*a*bb*' 'qaqbqbbq' +testmatch '*a*bc*' 'qaqbqbcq' +testmatch '*a*bb*' 'qaqbqbb' +testmatch '*a*bc*' 'qaqbqbc' +testmatch '*a*bb' 'qaqbqbb' +testmatch '*a*bc' 'qaqbqbc' +testnomatch '*a*bb' 'qaqbqbbq' +testnomatch '*a*bc' 'qaqbqbcq' +testnomatch '*a*a*a*a*a*a*a*a*a*a*' 'aaaaaaaaa' +testmatch '*a*a*a*a*a*a*a*a*a*a*' 'aaaaaaaaaa' +testmatch '*a*a*a*a*a*a*a*a*a*a*' 'aaaaaaaaaaa' +testnomatch '.*.*.*.*.*.*.*.*.*.*' '.........' +testmatch '.*.*.*.*.*.*.*.*.*.*' '..........' +testmatch '.*.*.*.*.*.*.*.*.*.*' '...........' +testnomatch '*?*?*?*?*?*?*?*?*?*?*' '123456789' +testnomatch '??????????*' '123456789' +testnomatch '*??????????' '123456789' +testmatch '*?*?*?*?*?*?*?*?*?*?*' '1234567890' +testmatch '??????????*' '1234567890' +testmatch '*??????????' '1234567890' +testmatch '*?*?*?*?*?*?*?*?*?*?*' '12345678901' +testmatch '??????????*' '12345678901' +testmatch '*??????????' '12345678901' +testmatch '[x]' 'x' +testmatch '[*]' '*' +testmatch '[?]' '?' +testmatch '[' '[' +testmatch '[[]' '[' +testnomatch '[[]' 'x' +testnomatch '[*]' '' +testnomatch '[*]' 'x' +testnomatch '[?]' 'x' +testmatch '*[*]*' 'foo*foo' +testnomatch '*[*]*' 'foo' +testmatch '[0-9]' '0' +testmatch '[0-9]' '5' +testmatch '[0-9]' '9' +testnomatch '[0-9]' '/' +testnomatch '[0-9]' ':' +testnomatch '[0-9]' '*' +testnomatch '[!0-9]' '0' +testnomatch '[!0-9]' '5' +testnomatch '[!0-9]' '9' +testmatch '[!0-9]' '/' +testmatch '[!0-9]' ':' +testmatch '[!0-9]' '*' +testmatch '*[0-9]' 'a0' +testmatch '*[0-9]' 'a5' +testmatch '*[0-9]' 'a9' +testnomatch '*[0-9]' 'a/' +testnomatch '*[0-9]' 'a:' +testnomatch '*[0-9]' 'a*' +testnomatch '*[!0-9]' 'a0' +testnomatch '*[!0-9]' 'a5' +testnomatch '*[!0-9]' 'a9' +testmatch '*[!0-9]' 'a/' +testmatch '*[!0-9]' 'a:' +testmatch '*[!0-9]' 'a*' +testmatch '*[0-9]' 'a00' +testmatch '*[0-9]' 'a55' +testmatch '*[0-9]' 'a99' +testmatch '*[0-9]' 'a0a0' +testmatch '*[0-9]' 'a5a5' +testmatch '*[0-9]' 'a9a9' +testmatch '\*' '*' +testmatch '\?' '?' +testmatch '\[x]' '[x]' +testmatch '\[' '[' +testmatch '\\' '\' +testmatch '*\**' 'foo*foo' +testnomatch '*\**' 'foo' +testmatch '*\\*' 'foo\foo' +testnomatch '*\\*' 'foo' +testmatch '\(' '(' +testmatch '\a' 'a' +testnomatch '\*' 'a' +testnomatch '\?' 'a' +testnomatch '\*' '\*' +testnomatch '\?' '\?' +testnomatch '\[x]' '\[x]' +testnomatch '\[x]' '\x' +testnomatch '\[' '\[' +testnomatch '\(' '\(' +testnomatch '\a' '\a' +testmatch '.*' '.' +testmatch '.*' '..' +testmatch '.*' '.a' +testmatch 'a*' 'a.' +[ -z "$failures" ] Added: head/tools/regression/bin/sh/builtins/case3.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/builtins/case3.0 Sun May 9 16:15:40 2010 (r207821) @@ -0,0 +1,95 @@ +# Generated by ./test-fnmatch -s 2, do not edit. +# $FreeBSD$ +failures= +failed() { printf '%s\n' "Failed: $1 '$2' '$3'"; failures=x$failures; } +# We do not treat a backslash specially in this case, +# but this is not the case in all shells. +netestmatch() { case $2 in $1) ;; *) failed netestmatch "$@";; esac; } +netestnomatch() { case $2 in $1) failed netestnomatch "$@";; esac; } +netestmatch '' '' +netestmatch 'a' 'a' +netestnomatch 'a' 'b' +netestnomatch 'a' 'A' +netestmatch '*' 'a' +netestmatch '*' 'aa' +netestmatch '*a' 'a' +netestnomatch '*a' 'b' +netestnomatch '*a*' 'b' +netestmatch '*a*b*' 'ab' +netestmatch '*a*b*' 'qaqbq' +netestmatch '*a*bb*' 'qaqbqbbq' +netestmatch '*a*bc*' 'qaqbqbcq' +netestmatch '*a*bb*' 'qaqbqbb' +netestmatch '*a*bc*' 'qaqbqbc' +netestmatch '*a*bb' 'qaqbqbb' +netestmatch '*a*bc' 'qaqbqbc' +netestnomatch '*a*bb' 'qaqbqbbq' +netestnomatch '*a*bc' 'qaqbqbcq' +netestnomatch '*a*a*a*a*a*a*a*a*a*a*' 'aaaaaaaaa' +netestmatch '*a*a*a*a*a*a*a*a*a*a*' 'aaaaaaaaaa' +netestmatch '*a*a*a*a*a*a*a*a*a*a*' 'aaaaaaaaaaa' +netestnomatch '.*.*.*.*.*.*.*.*.*.*' '.........' +netestmatch '.*.*.*.*.*.*.*.*.*.*' '..........' +netestmatch '.*.*.*.*.*.*.*.*.*.*' '...........' +netestnomatch '*?*?*?*?*?*?*?*?*?*?*' '123456789' +netestnomatch '??????????*' '123456789' +netestnomatch '*??????????' '123456789' +netestmatch '*?*?*?*?*?*?*?*?*?*?*' '1234567890' +netestmatch '??????????*' '1234567890' +netestmatch '*??????????' '1234567890' +netestmatch '*?*?*?*?*?*?*?*?*?*?*' '12345678901' +netestmatch '??????????*' '12345678901' +netestmatch '*??????????' '12345678901' +netestmatch '[x]' 'x' +netestmatch '[*]' '*' +netestmatch '[?]' '?' +netestmatch '[' '[' +netestmatch '[[]' '[' +netestnomatch '[[]' 'x' +netestnomatch '[*]' '' +netestnomatch '[*]' 'x' +netestnomatch '[?]' 'x' +netestmatch '*[*]*' 'foo*foo' +netestnomatch '*[*]*' 'foo' +netestmatch '[0-9]' '0' +netestmatch '[0-9]' '5' +netestmatch '[0-9]' '9' +netestnomatch '[0-9]' '/' +netestnomatch '[0-9]' ':' +netestnomatch '[0-9]' '*' +netestnomatch '[!0-9]' '0' +netestnomatch '[!0-9]' '5' +netestnomatch '[!0-9]' '9' +netestmatch '[!0-9]' '/' +netestmatch '[!0-9]' ':' +netestmatch '[!0-9]' '*' +netestmatch '*[0-9]' 'a0' +netestmatch '*[0-9]' 'a5' +netestmatch '*[0-9]' 'a9' +netestnomatch '*[0-9]' 'a/' +netestnomatch '*[0-9]' 'a:' +netestnomatch '*[0-9]' 'a*' +netestnomatch '*[!0-9]' 'a0' +netestnomatch '*[!0-9]' 'a5' +netestnomatch '*[!0-9]' 'a9' +netestmatch '*[!0-9]' 'a/' +netestmatch '*[!0-9]' 'a:' +netestmatch '*[!0-9]' 'a*' +netestmatch '*[0-9]' 'a00' +netestmatch '*[0-9]' 'a55' +netestmatch '*[0-9]' 'a99' +netestmatch '*[0-9]' 'a0a0' +netestmatch '*[0-9]' 'a5a5' +netestmatch '*[0-9]' 'a9a9' +netestmatch '\*' '\*' +netestmatch '\?' '\?' +netestmatch '\' '\' +netestnomatch '\\' '\' +netestmatch '\\' '\\' +netestmatch '*\*' 'foo\foo' +netestnomatch '*\*' 'foo' +netestmatch '.*' '.' +netestmatch '.*' '..' +netestmatch '.*' '.a' +netestmatch 'a*' 'a.' +[ -z "$failures" ] Modified: head/tools/regression/lib/libc/gen/Makefile ============================================================================== --- head/tools/regression/lib/libc/gen/Makefile Sun May 9 16:04:32 2010 (r207820) +++ head/tools/regression/lib/libc/gen/Makefile Sun May 9 16:15:40 2010 (r207821) @@ -9,3 +9,7 @@ tests: ${TESTS} .PHONY: clean clean: -rm -f ${TESTS} + +sh-tests: test-fnmatch + ./test-fnmatch -s 1 >../../../bin/sh/builtins/case2.0 + ./test-fnmatch -s 2 >../../../bin/sh/builtins/case3.0 Modified: head/tools/regression/lib/libc/gen/test-fnmatch.c ============================================================================== --- head/tools/regression/lib/libc/gen/test-fnmatch.c Sun May 9 16:04:32 2010 (r207820) +++ head/tools/regression/lib/libc/gen/test-fnmatch.c Sun May 9 16:15:40 2010 (r207821) @@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include struct testcase { @@ -210,13 +211,62 @@ flags_to_string(int flags) return result; } +static int +write_sh_tests(const char *progname, int num) +{ + size_t i, n; + struct testcase *t; + + printf("# Generated by %s -s %d, do not edit.\n", progname, num); + printf("# $" "FreeBSD$\n"); + printf("failures=\n"); + printf("failed() { printf '%%s\\n' \"Failed: $1 '$2' '$3'\"; failures=x$failures; }\n"); + if (num == 1) { + printf("testmatch() { eval \"case \\$2 in ''$1) ;; *) failed testmatch \\\"\\$@\\\";; esac\"; }\n"); + printf("testnomatch() { eval \"case \\$2 in ''$1) failed testnomatch \\\"\\$@\\\";; esac\"; }\n"); + } else if (num == 2) { + printf("# We do not treat a backslash specially in this case,\n"); + printf("# but this is not the case in all shells.\n"); + printf("netestmatch() { case $2 in $1) ;; *) failed netestmatch \"$@\";; esac; }\n"); + printf("netestnomatch() { case $2 in $1) failed netestnomatch \"$@\";; esac; }\n"); + } + n = sizeof(testcases) / sizeof(testcases[0]); + for (i = 0; i < n; i++) { + t = &testcases[i]; + if (strchr(t->pattern, '\'') != NULL || + strchr(t->string, '\'') != NULL) + continue; + if (num == 1 && t->flags == 0) + printf("test%smatch '%s' '%s'\n", + t->result == FNM_NOMATCH ? "no" : "", + t->pattern, t->string); + if (num == 2 && (t->flags == FNM_NOESCAPE || + (t->flags == 0 && strchr(t->pattern, '\\') == NULL))) + printf("netest%smatch '%s' '%s'\n", + t->result == FNM_NOMATCH ? "no" : "", + t->pattern, t->string); + } + printf("[ -z \"$failures\" ]\n"); + return 0; +} + int main(int argc, char *argv[]) { size_t i, n; - int flags, result, extra, errors; + int opt, flags, result, extra, errors; struct testcase *t; + while ((opt = getopt(argc, argv, "s:")) != -1) { + switch (opt) { + case 's': + return (write_sh_tests(argv[0], atoi(optarg))); + default: + fprintf(stderr, "usage: %s [-s num]\n", argv[0]); + fprintf(stderr, "-s option writes tests for sh(1), num is 1 or 2\n"); + exit(1); + } + } n = sizeof(testcases) / sizeof(testcases[0]); errors = 0; printf("1..%zu\n", n); From owner-svn-src-head@FreeBSD.ORG Sun May 9 16:27:43 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 39A54106566C; Sun, 9 May 2010 16:27:43 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 29B158FC12; Sun, 9 May 2010 16:27:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o49GRghM085234; Sun, 9 May 2010 16:27:42 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o49GRgGC085232; Sun, 9 May 2010 16:27:42 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201005091627.o49GRgGC085232@svn.freebsd.org> From: Alan Cox Date: Sun, 9 May 2010 16:27:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207822 - head/sys/vm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 May 2010 16:27:43 -0000 Author: alc Date: Sun May 9 16:27:42 2010 New Revision: 207822 URL: http://svn.freebsd.org/changeset/base/207822 Log: Call vm_page_deactivate() rather than vm_page_dontneed() in swp_pager_force_pagein(). By dirtying the page, swp_pager_force_pagein() forces vm_page_dontneed() to insert the page at the head of the inactive queue, just like vm_page_deactivate() does. Moreover, because the page was invalid, it can't have been mapped, and thus the other effect of vm_page_dontneed(), clearing the page's reference bits has no effect. In summary, there is no reason to call vm_page_dontneed() since its effect will be identical to calling the simpler vm_page_deactivate(). Modified: head/sys/vm/swap_pager.c Modified: head/sys/vm/swap_pager.c ============================================================================== --- head/sys/vm/swap_pager.c Sun May 9 16:15:40 2010 (r207821) +++ head/sys/vm/swap_pager.c Sun May 9 16:27:42 2010 (r207822) @@ -1719,11 +1719,9 @@ swp_pager_force_pagein(vm_object_t objec if (swap_pager_getpages(object, &m, 1, 0) != VM_PAGER_OK) panic("swap_pager_force_pagein: read from swap failed");/*XXX*/ vm_object_pip_subtract(object, 1); - vm_page_lock(m); - vm_page_lock_queues(); vm_page_dirty(m); - vm_page_dontneed(m); - vm_page_unlock_queues(); + vm_page_lock(m); + vm_page_deactivate(m); vm_page_unlock(m); vm_page_wakeup(m); vm_pager_page_unswapped(m); From owner-svn-src-head@FreeBSD.ORG Sun May 9 16:55:43 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4D287106566C; Sun, 9 May 2010 16:55:43 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 3CE488FC08; Sun, 9 May 2010 16:55:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o49Gthdf091352; Sun, 9 May 2010 16:55:43 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o49GthC9091349; Sun, 9 May 2010 16:55:43 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201005091655.o49GthC9091349@svn.freebsd.org> From: Alan Cox Date: Sun, 9 May 2010 16:55:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207823 - head/sys/vm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 May 2010 16:55:43 -0000 Author: alc Date: Sun May 9 16:55:42 2010 New Revision: 207823 URL: http://svn.freebsd.org/changeset/base/207823 Log: Push down the acquisition of the page queues lock into vm_pageq_remove(). (This eliminates a surprising number of page queues lock acquisitions by vm_fault() because the page's queue is PQ_NONE and thus the page queues lock is not needed to remove the page from a queue.) Modified: head/sys/vm/vm_fault.c head/sys/vm/vm_page.c Modified: head/sys/vm/vm_fault.c ============================================================================== --- head/sys/vm/vm_fault.c Sun May 9 16:27:42 2010 (r207822) +++ head/sys/vm/vm_fault.c Sun May 9 16:55:42 2010 (r207823) @@ -363,9 +363,7 @@ RetryFault:; vm_object_deallocate(fs.first_object); goto RetryFault; } - vm_page_lock_queues(); vm_pageq_remove(fs.m); - vm_page_unlock_queues(); vm_page_unlock(fs.m); /* Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Sun May 9 16:27:42 2010 (r207822) +++ head/sys/vm/vm_page.c Sun May 9 16:55:42 2010 (r207823) @@ -169,6 +169,7 @@ TUNABLE_INT("vm.boot_pages", &boot_pages SYSCTL_INT(_vm, OID_AUTO, boot_pages, CTLFLAG_RD, &boot_pages, 0, "number of pages allocated for bootstrapping the VM system"); +static void vm_page_queue_remove(int queue, vm_page_t m); static void vm_page_enqueue(int queue, vm_page_t m); /* Make sure that u_long is at least 64 bits when PAGE_SIZE is 32K. */ @@ -1328,24 +1329,43 @@ vm_page_requeue(vm_page_t m) } /* + * vm_page_queue_remove: + * + * Remove the given page from the specified queue. + * + * The page and page queues must be locked. + */ +static __inline void +vm_page_queue_remove(int queue, vm_page_t m) +{ + struct vpgqueues *pq; + + mtx_assert(&vm_page_queue_mtx, MA_OWNED); + vm_page_lock_assert(m, MA_OWNED); + pq = &vm_page_queues[queue]; + TAILQ_REMOVE(&pq->pl, m, pageq); + (*pq->cnt)--; +} + +/* * vm_pageq_remove: * * Remove a page from its queue. * - * The queue containing the given page must be locked. + * The given page must be locked. * This routine may not block. */ void vm_pageq_remove(vm_page_t m) { int queue = VM_PAGE_GETQUEUE(m); - struct vpgqueues *pq; + vm_page_lock_assert(m, MA_OWNED); if (queue != PQ_NONE) { + vm_page_lock_queues(); VM_PAGE_SETQUEUE2(m, PQ_NONE); - pq = &vm_page_queues[queue]; - TAILQ_REMOVE(&pq->pl, m, pageq); - (*pq->cnt)--; + vm_page_queue_remove(queue, m); + vm_page_unlock_queues(); } } @@ -1380,18 +1400,20 @@ vm_page_enqueue(int queue, vm_page_t m) void vm_page_activate(vm_page_t m) { + int queue; vm_page_lock_assert(m, MA_OWNED); - if (VM_PAGE_GETKNOWNQUEUE2(m) != PQ_ACTIVE) { + if ((queue = VM_PAGE_GETKNOWNQUEUE2(m)) != PQ_ACTIVE) { if (m->wire_count == 0 && (m->flags & PG_UNMANAGED) == 0) { if (m->act_count < ACT_INIT) m->act_count = ACT_INIT; vm_page_lock_queues(); - vm_pageq_remove(m); + if (queue != PQ_NONE) + vm_page_queue_remove(queue, m); vm_page_enqueue(PQ_ACTIVE, m); vm_page_unlock_queues(); } else - KASSERT(m->queue == PQ_NONE, + KASSERT(queue == PQ_NONE, ("vm_page_activate: wired page %p is queued", m)); } else { if (m->act_count < ACT_INIT) @@ -1472,11 +1494,8 @@ vm_page_free_toq(vm_page_t m) * callback routine until after we've put the page on the * appropriate free queue. */ - if (VM_PAGE_GETQUEUE(m) != PQ_NONE) { - vm_page_lock_queues(); + if ((m->flags & PG_UNMANAGED) == 0) vm_pageq_remove(m); - vm_page_unlock_queues(); - } vm_page_remove(m); /* @@ -1554,11 +1573,8 @@ vm_page_wire(vm_page_t m) if (m->flags & PG_FICTITIOUS) return; if (m->wire_count == 0) { - if ((m->flags & PG_UNMANAGED) == 0) { - vm_page_lock_queues(); + if ((m->flags & PG_UNMANAGED) == 0) vm_pageq_remove(m); - vm_page_unlock_queues(); - } atomic_add_int(&cnt.v_wire_count, 1); } m->wire_count++; @@ -1633,22 +1649,26 @@ vm_page_unwire(vm_page_t m, int activate static inline void _vm_page_deactivate(vm_page_t m, int athead) { + int queue; vm_page_lock_assert(m, MA_OWNED); /* * Ignore if already inactive. */ - if (VM_PAGE_INQUEUE2(m, PQ_INACTIVE)) + if ((queue = VM_PAGE_GETKNOWNQUEUE2(m)) == PQ_INACTIVE) return; if (m->wire_count == 0 && (m->flags & PG_UNMANAGED) == 0) { vm_page_lock_queues(); vm_page_flag_clear(m, PG_WINATCFLS); - vm_pageq_remove(m); + if (queue != PQ_NONE) + vm_page_queue_remove(queue, m); if (athead) - TAILQ_INSERT_HEAD(&vm_page_queues[PQ_INACTIVE].pl, m, pageq); + TAILQ_INSERT_HEAD(&vm_page_queues[PQ_INACTIVE].pl, m, + pageq); else - TAILQ_INSERT_TAIL(&vm_page_queues[PQ_INACTIVE].pl, m, pageq); + TAILQ_INSERT_TAIL(&vm_page_queues[PQ_INACTIVE].pl, m, + pageq); VM_PAGE_SETQUEUE2(m, PQ_INACTIVE); cnt.v_inactive_count++; vm_page_unlock_queues(); @@ -1751,11 +1771,7 @@ vm_page_cache(vm_page_t m) /* * Remove the page from the paging queues. */ - if (VM_PAGE_GETQUEUE(m) != PQ_NONE) { - vm_page_lock_queues(); - vm_pageq_remove(m); - vm_page_unlock_queues(); - } + vm_pageq_remove(m); /* * Remove the page from the object's collection of resident From owner-svn-src-head@FreeBSD.ORG Sun May 9 17:04:17 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 60BE8106566B; Sun, 9 May 2010 17:04:17 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) by mx1.freebsd.org (Postfix) with ESMTP id C88D08FC08; Sun, 9 May 2010 17:04:16 +0000 (UTC) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.14.3/8.14.3/ALCHEMY.FRANKEN.DE) with ESMTP id o49H4FKe022289; Sun, 9 May 2010 19:04:15 +0200 (CEST) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.14.3/8.14.3/Submit) id o49H4FcP022288; Sun, 9 May 2010 19:04:15 +0200 (CEST) (envelope-from marius) Date: Sun, 9 May 2010 19:04:15 +0200 From: Marius Strobl To: Attilio Rao Message-ID: <20100509170414.GA35602@alchemy.franken.de> References: <201004192327.o3JNRsK4047856@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201004192327.o3JNRsK4047856@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r206878 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 May 2010 17:04:17 -0000 On Mon, Apr 19, 2010 at 11:27:54PM +0000, Attilio Rao wrote: > Author: attilio > Date: Mon Apr 19 23:27:54 2010 > New Revision: 206878 > URL: http://svn.freebsd.org/changeset/base/206878 > > Log: > Fix a deadlock in the shutdown code: > When performing a smp_rendezvous() or more likely, on amd64 and i386, > a smp_tlb_shootdown() the caller will end up with the smp_ipi_mtx > spinlock held, busy-waiting for other CPUs to acknowledge the operation. > As long as CPUs are suspended (via cpu_reset()) between the active mask > read and IPI sending there can be a deadlock where the caller will wait > forever for a dead CPU to acknowledge the operation. > Please note that on CPU0 that is going to be someway heavier because of > the spinlocks being disabled earlier than quitting the machine. > > Fix this bug by calling cpu_reset() with the smp_ipi_mtx held. > Note that it is very likely that a saner offline/online CPUs mechanism > will help heavilly in fixing similar cases as it is likely more bugs > of this type may arise in the future. > This change causes a hang for me when running an SMP kernel on an UP machine or an MP machine with SMP disabled as in these cases smp_ipi_mtx isn't initialized (see mp_start()). The below patch fixes this for me. Marius Index: kern_shutdown.c =================================================================== --- kern_shutdown.c (revision 207463) +++ kern_shutdown.c (working copy) @@ -491,8 +491,8 @@ shutdown_reset(void *junk, int howto) /* * Acquiring smp_ipi_mtx here has a double effect: * - it disables interrupts avoiding CPU0 preemption - * by fast handlers (thus deadlocking against other CPUs) - * - it avoids deadlocks against smp_rendezvous() or, more + * by fast handlers (thus deadlocking against other CPUs) + * - it avoids deadlocks against smp_rendezvous() or, more * generally, threads busy-waiting, with this spinlock held, * and waiting for responses by threads on other CPUs * (ie. smp_tlb_shootdown()). @@ -500,9 +500,11 @@ shutdown_reset(void *junk, int howto) * For the !SMP case it just needs to handle the former problem. */ #ifdef SMP - mtx_lock_spin(&smp_ipi_mtx); + if (mtx_initialized(&smp_ipi_mtx) != 0) + mtx_lock_spin(&smp_ipi_mtx); + else #else - spinlock_enter(); + spinlock_enter(); #endif /* cpu_boot(howto); */ /* doesn't do anything at the moment */ From owner-svn-src-head@FreeBSD.ORG Sun May 9 17:10:51 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4C6231065672; Sun, 9 May 2010 17:10:51 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 3BE7D8FC16; Sun, 9 May 2010 17:10:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o49HAp8R094681; Sun, 9 May 2010 17:10:51 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o49HApol094677; Sun, 9 May 2010 17:10:51 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201005091710.o49HApol094677@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 9 May 2010 17:10:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207824 - head/tools/regression/bin/sh/parser X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 May 2010 17:10:51 -0000 Author: jilles Date: Sun May 9 17:10:50 2010 New Revision: 207824 URL: http://svn.freebsd.org/changeset/base/207824 Log: sh: Add some parser tests. case1.0 tests POSIX requirements and one more for keywords in case statements. The others test very special cases of command substitution. These also work on stable/8. Added: head/tools/regression/bin/sh/parser/case1.0 (contents, props changed) head/tools/regression/bin/sh/parser/case2.0 (contents, props changed) head/tools/regression/bin/sh/parser/heredoc3.0 (contents, props changed) Added: head/tools/regression/bin/sh/parser/case1.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/parser/case1.0 Sun May 9 17:10:50 2010 (r207824) @@ -0,0 +1,14 @@ +# $FreeBSD$ + +keywords='if then else elif fi while until for do done { } case esac ! in' + +# Keywords can be used unquoted in case statements, except the keyword +# esac as the first pattern of a '|' alternation without a starting '('. +# (POSIX doesn't seem to require (esac) to work.) +for k in $keywords; do + eval "case $k in (foo|$k) ;; *) echo bad ;; esac" + eval "case $k in ($k) ;; *) echo bad ;; esac" + eval "case $k in foo|$k) ;; *) echo bad ;; esac" + [ "$k" = esac ] && continue + eval "case $k in $k) ;; *) echo bad ;; esac" +done Added: head/tools/regression/bin/sh/parser/case2.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/parser/case2.0 Sun May 9 17:10:50 2010 (r207824) @@ -0,0 +1,32 @@ +# $FreeBSD$ + +# Pretty much only ash derivatives can parse all of this. + +f1() { + x=$(case x in + (x|esac) ;; + (*) echo bad >&2 ;; + esac) +} +f1 +f2() { + x=$(case x in + (x|esac) ;; + (*) echo bad >&2 + esac) +} +f2 +f3() { + x=$(case x in + x|esac) ;; + *) echo bad >&2 ;; + esac) +} +f3 +f4() { + x=$(case x in + x|esac) ;; + *) echo bad >&2 + esac) +} +f4 Added: head/tools/regression/bin/sh/parser/heredoc3.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/parser/heredoc3.0 Sun May 9 17:10:50 2010 (r207824) @@ -0,0 +1,7 @@ +# $FreeBSD$ + +# This may be expected to work, but pretty much only ash derivatives allow it. + +test "$(cat < Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 48C2E1065700; Sun, 9 May 2010 17:15:27 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 380478FC13; Sun, 9 May 2010 17:15:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o49HFRIc095736; Sun, 9 May 2010 17:15:27 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o49HFR6h095734; Sun, 9 May 2010 17:15:27 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201005091715.o49HFR6h095734@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 9 May 2010 17:15:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207825 - head/tools/regression/bin/sh/builtins X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 May 2010 17:15:27 -0000 Author: jilles Date: Sun May 9 17:15:26 2010 New Revision: 207825 URL: http://svn.freebsd.org/changeset/base/207825 Log: Fix error in comment. Modified: head/tools/regression/bin/sh/builtins/var-assign2.0 Modified: head/tools/regression/bin/sh/builtins/var-assign2.0 ============================================================================== --- head/tools/regression/bin/sh/builtins/var-assign2.0 Sun May 9 17:10:50 2010 (r207824) +++ head/tools/regression/bin/sh/builtins/var-assign2.0 Sun May 9 17:15:26 2010 (r207825) @@ -40,7 +40,7 @@ UTILS="alias,\ set -e -# With 'command', variable assignments affect the shell environment. +# With 'command', variable assignments do not affect the shell environment. set -- ${SPECIAL} for cmd in "$@" From owner-svn-src-head@FreeBSD.ORG Sun May 9 20:32:00 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DA6451065670; Sun, 9 May 2010 20:32:00 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id C9F738FC19; Sun, 9 May 2010 20:32:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o49KW0qd038800; Sun, 9 May 2010 20:32:00 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o49KW0Q4038795; Sun, 9 May 2010 20:32:00 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <201005092032.o49KW0Q4038795@svn.freebsd.org> From: Kip Macy Date: Sun, 9 May 2010 20:32:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207828 - head/sys/netinet6 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 May 2010 20:32:01 -0000 Author: kmacy Date: Sun May 9 20:32:00 2010 New Revision: 207828 URL: http://svn.freebsd.org/changeset/base/207828 Log: Add flowtable support to IPv6 Tested by: qingli@ Reviewed by: qingli@ MFC after: 3 days Modified: head/sys/netinet6/in6_proto.c head/sys/netinet6/ip6_input.c head/sys/netinet6/ip6_output.c head/sys/netinet6/udp6_usrreq.c Modified: head/sys/netinet6/in6_proto.c ============================================================================== --- head/sys/netinet6/in6_proto.c Sun May 9 19:32:37 2010 (r207827) +++ head/sys/netinet6/in6_proto.c Sun May 9 20:32:00 2010 (r207828) @@ -70,6 +70,7 @@ __FBSDID("$FreeBSD$"); #include "opt_carp.h" #include "opt_sctp.h" #include "opt_mpath.h" +#include "opt_route.h" #include #include @@ -130,6 +131,10 @@ __FBSDID("$FreeBSD$"); #include +#ifdef FLOWTABLE +#include +#endif + /* * TCP/IP protocol family: IP6, ICMP6, UDP, TCP. */ @@ -569,6 +574,16 @@ SYSCTL_VNET_INT(_net_inet6_ip6, IPV6CTL_ &VNET_NAME(ip6stealth), 0, ""); #endif +#ifdef FLOWTABLE +VNET_DEFINE(int, ip6_output_flowtable_size) = 2048; +VNET_DEFINE(struct flowtable *, ip6_ft); +#define V_ip6_output_flowtable_size VNET(ip6_output_flowtable_size) + +SYSCTL_VNET_INT(_net_inet6_ip6, OID_AUTO, output_flowtable_size, CTLFLAG_RDTUN, + &VNET_NAME(ip6_output_flowtable_size), 2048, + "number of entries in the per-cpu output flow caches"); +#endif + /* net.inet6.icmp6 */ SYSCTL_VNET_INT(_net_inet6_icmp6, ICMPV6CTL_REDIRACCEPT, rediraccept, CTLFLAG_RW, &VNET_NAME(icmp6_rediraccept), 0, ""); Modified: head/sys/netinet6/ip6_input.c ============================================================================== --- head/sys/netinet6/ip6_input.c Sun May 9 19:32:37 2010 (r207827) +++ head/sys/netinet6/ip6_input.c Sun May 9 20:32:00 2010 (r207828) @@ -66,6 +66,7 @@ __FBSDID("$FreeBSD$"); #include "opt_inet.h" #include "opt_inet6.h" #include "opt_ipsec.h" +#include "opt_route.h" #include #include @@ -113,6 +114,12 @@ __FBSDID("$FreeBSD$"); #include +#ifdef FLOWTABLE +#include +extern VNET_DEFINE(int, ip6_output_flowtable_size); +#define V_ip6_output_flowtable_size VNET(ip6_output_flowtable_size) +#endif + extern struct domain inet6domain; u_char ip6_protox[IPPROTO_MAX]; @@ -169,6 +176,12 @@ ip6_init(void) nd6_init(); frag6_init(); +#ifdef FLOWTABLE + TUNABLE_INT_FETCH("net.inet6.ip6.output_flowtable_size", + &V_ip6_output_flowtable_size); + V_ip6_ft = flowtable_alloc("ipv6", V_ip6_output_flowtable_size, FL_PCPU); +#endif + V_ip6_desync_factor = arc4random() % MAX_TEMP_DESYNC_FACTOR; /* Skip global initialization stuff for non-default instances. */ Modified: head/sys/netinet6/ip6_output.c ============================================================================== --- head/sys/netinet6/ip6_output.c Sun May 9 19:32:37 2010 (r207827) +++ head/sys/netinet6/ip6_output.c Sun May 9 20:32:00 2010 (r207828) @@ -67,6 +67,7 @@ __FBSDID("$FreeBSD$"); #include "opt_inet6.h" #include "opt_ipsec.h" #include "opt_sctp.h" +#include "opt_route.h" #include #include @@ -111,6 +112,10 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef FLOWTABLE +#include +#endif + extern int in6_mcast_loop; struct ip6_exthdrs { @@ -211,6 +216,7 @@ ip6_output(struct mbuf *m0, struct ip6_p struct in6_addr finaldst, src0, dst0; u_int32_t zone; struct route_in6 *ro_pmtu = NULL; + int flevalid = 0; int hdrsplit = 0; int needipsec = 0; #ifdef SCTP @@ -231,9 +237,7 @@ ip6_output(struct mbuf *m0, struct ip6_p } finaldst = ip6->ip6_dst; - bzero(&exthdrs, sizeof(exthdrs)); - if (opt) { /* Hop-by-Hop options header */ MAKE_EXTHDR(opt->ip6po_hbh, &exthdrs.ip6e_hbh); @@ -470,7 +474,22 @@ skip_ipsec2:; if (opt && opt->ip6po_rthdr) ro = &opt->ip6po_route; dst = (struct sockaddr_in6 *)&ro->ro_dst; - +#ifdef FLOWTABLE + if (ro == &ip6route) { + struct flentry *fle; + + /* + * The flow table returns route entries valid for up to 30 + * seconds; we rely on the remainder of ip_output() taking no + * longer than that long for the stability of ro_rt. The + * flow ID assignment must have happened before this point. + */ + if ((fle = flowtable_lookup_mbuf(V_ip6_ft, m, AF_INET6)) != NULL) { + flow_to_route_in6(fle, ro); + flevalid = 1; + } + } +#endif again: /* * if specified, try to fill in the traffic class field. @@ -576,7 +595,10 @@ again: dst_sa.sin6_family = AF_INET6; dst_sa.sin6_len = sizeof(dst_sa); dst_sa.sin6_addr = ip6->ip6_dst; - if ((error = in6_selectroute(&dst_sa, opt, im6o, ro, + if (flevalid) { + rt = ro->ro_rt; + ifp = ro->ro_rt->rt_ifp; + } else if ((error = in6_selectroute(&dst_sa, opt, im6o, ro, &ifp, &rt)) != 0) { switch (error) { case EHOSTUNREACH: @@ -1071,9 +1093,11 @@ sendorfree: V_ip6stat.ip6s_fragmented++; done: - if (ro == &ip6route && ro->ro_rt) { /* brace necessary for RTFREE */ + if (ro == &ip6route && ro->ro_rt && flevalid == 0) { + /* brace necessary for RTFREE */ RTFREE(ro->ro_rt); - } else if (ro_pmtu == &ip6route && ro_pmtu->ro_rt) { + } else if (ro_pmtu == &ip6route && ro_pmtu->ro_rt && + ((flevalid == 0) || (ro_pmtu != ro))) { RTFREE(ro_pmtu->ro_rt); } #ifdef IPSEC Modified: head/sys/netinet6/udp6_usrreq.c ============================================================================== --- head/sys/netinet6/udp6_usrreq.c Sun May 9 19:32:37 2010 (r207827) +++ head/sys/netinet6/udp6_usrreq.c Sun May 9 20:32:00 2010 (r207828) @@ -1079,7 +1079,9 @@ udp6_send(struct socket *so, int flags, mac_inpcb_create_mbuf(inp, m); #endif error = udp6_output(inp, m, addr, control, td); +#ifdef INET out: +#endif INP_WUNLOCK(inp); INP_INFO_WUNLOCK(&V_udbinfo); return (error); From owner-svn-src-head@FreeBSD.ORG Sun May 9 21:34:05 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A78911065670; Sun, 9 May 2010 21:34:05 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 970068FC08; Sun, 9 May 2010 21:34:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o49LY5jN052425; Sun, 9 May 2010 21:34:05 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o49LY5K4052423; Sun, 9 May 2010 21:34:05 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201005092134.o49LY5K4052423@svn.freebsd.org> From: Christian Brueffer Date: Sun, 9 May 2010 21:34:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207829 - head/share/man/man4 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 May 2010 21:34:05 -0000 Author: brueffer Date: Sun May 9 21:34:05 2010 New Revision: 207829 URL: http://svn.freebsd.org/changeset/base/207829 Log: Various wording, spelling and markup fixes. PR: 145251 Submitted by: Hywel Mallett (partly) MFC after: 3 week Modified: head/share/man/man4/iscsi_initiator.4 Modified: head/share/man/man4/iscsi_initiator.4 ============================================================================== --- head/share/man/man4/iscsi_initiator.4 Sun May 9 20:32:00 2010 (r207828) +++ head/share/man/man4/iscsi_initiator.4 Sun May 9 21:34:05 2010 (r207829) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 23, 2007 +.Dd May 9, 2010 .Dt ISCSI_INITIATOR 4 .Os .Sh NAME @@ -48,34 +48,39 @@ iscsi_initiator_load="YES" The .Nm implements the kernel side of the Internet SCSI (iSCSI) network -protocol standard, the user land companion is +protocol standard. +The userland companion is .Xr iscontrol 8 , and permits access to remote .Em virtual SCSI devices via .Xr cam 4 . .Sh SYSCTL VARIABLES -.Bl -tag -width ".Va net.iscsi.n.targeaddress" +.Bl -tag -width "net.iscsi.n.targedaddress" .It Va debug.iscsi_initiator set the debug-level, 0 means no debugging, 9 for maximum. .It Va net.iscsi.isid the initiator part of the Session Identifier. -.It "the following are informative only:" +.El +.Pp +The following are informative only: +.Pp +.Bl -tag -width "net.iscsi.n.targedaddress" .It Va net.iscsi.driver_version the current version of the driver. .It Va net.iscsi.sessions the number of current active sessions. .It Va net.iscsi.n.targetname -is the targe name of session +the target name of session .Em n . -.It Va net.iscsi.n.targeaddress -is the IP address of the target of session +.It Va net.iscsi.n.targedaddress +the IP address of the target of session .Em n . .It Va net.iscsi.n.stats -are some statistics for session +statistics for session .Em n .It Va net.iscsi.n.pid -is the +the .Em "process id" of the userland side of session .Em n , From owner-svn-src-head@FreeBSD.ORG Sun May 9 22:01:36 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4490B1065672; Sun, 9 May 2010 22:01:36 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 3459E8FC0C; Sun, 9 May 2010 22:01:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o49M1aRp058524; Sun, 9 May 2010 22:01:36 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o49M1a6F058522; Sun, 9 May 2010 22:01:36 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201005092201.o49M1a6F058522@svn.freebsd.org> From: Edwin Groothuis Date: Sun, 9 May 2010 22:01:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207830 - head/lib/libc/stdtime X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 May 2010 22:01:36 -0000 Author: edwin Date: Sun May 9 22:01:35 2010 New Revision: 207830 URL: http://svn.freebsd.org/changeset/base/207830 Log: strptime(3) confused July with June with the fr_FR locale. When parsing the month "juillet" (abbr "jul"), %B recognized it as "juin" (abbr "jui") because the full name of the month names is checked at the same time as the abbrevation. The new behaviour checks the full names first before checking the abbrevation names. PR: kern/141939 Submitted by: Denis Chatelain MFC after: 1 week Modified: head/lib/libc/stdtime/strptime.c Modified: head/lib/libc/stdtime/strptime.c ============================================================================== --- head/lib/libc/stdtime/strptime.c Sun May 9 21:34:05 2010 (r207829) +++ head/lib/libc/stdtime/strptime.c Sun May 9 22:01:35 2010 (r207830) @@ -408,6 +408,14 @@ label: if (strncasecmp(buf, tptr->month[i], len) == 0) break; + } + } + /* + * Try the abbreviated month name if the full name + * wasn't found and Oalternative was not requested. + */ + if (i == asizeof(tptr->month) && !Oalternative) { + for (i = 0; i < asizeof(tptr->month); i++) { len = strlen(tptr->mon[i]); if (strncasecmp(buf, tptr->mon[i], len) == 0) From owner-svn-src-head@FreeBSD.ORG Sun May 9 22:03:18 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6BCFE106566B; Sun, 9 May 2010 22:03:18 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 5B6CC8FC0C; Sun, 9 May 2010 22:03:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o49M3IOd058922; Sun, 9 May 2010 22:03:18 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o49M3IpZ058920; Sun, 9 May 2010 22:03:18 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201005092203.o49M3IpZ058920@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 9 May 2010 22:03:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207831 - head/bin/sh X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 May 2010 22:03:18 -0000 Author: jilles Date: Sun May 9 22:03:18 2010 New Revision: 207831 URL: http://svn.freebsd.org/changeset/base/207831 Log: sh(1): Fix "reserved word" vs "keyword" inconsistency. Use "keyword" everywhere, like the output of the 'type' builtin, and only mention "reserved word" once to say it is the same thing. Modified: head/bin/sh/sh.1 Modified: head/bin/sh/sh.1 ============================================================================== --- head/bin/sh/sh.1 Sun May 9 22:01:35 2010 (r207830) +++ head/bin/sh/sh.1 Sun May 9 22:03:18 2010 (r207831) @@ -32,7 +32,7 @@ .\" from: @(#)sh.1 8.6 (Berkeley) 5/4/95 .\" $FreeBSD$ .\" -.Dd April 5, 2010 +.Dd May 9, 2010 .Dt SH 1 .Os .Sh NAME @@ -415,11 +415,11 @@ character, with the exception of the new .Pq Ql \en . A backslash preceding a newline is treated as a line continuation. .El -.Ss Reserved Words -Reserved words are words that have special meaning to the +.Ss Keywords +Keywords or reserved words are words that have special meaning to the shell and are recognized at the beginning of a line and after a control operator. -The following are reserved words: +The following are keywords: .Bl -column "doneXX" "elifXX" "elseXX" "untilXX" "whileX" -offset center .It Li \&! Ta { Ta } Ta Ic case Ta Ic do .It Ic done Ta Ic elif Ta Ic else Ta Ic esac Ta Ic fi @@ -429,8 +429,8 @@ The following are reserved words: An alias is a name and corresponding value set using the .Ic alias built-in command. -Whenever a reserved word may occur (see above), -and after checking for reserved words, the shell +Whenever a keyword may occur (see above), +and after checking for keywords, the shell checks the word to see if it matches an alias. If it does, it replaces it in the input stream with its value. For example, if there is an alias called @@ -469,7 +469,7 @@ of this man page (refer to the BNF in th document). Essentially though, a line is read and if the first word of the line (or after a control operator) -is not a reserved word, then the shell has recognized a +is not a keyword, then the shell has recognized a simple command. Otherwise, a complex command or some other special construct may have been recognized. @@ -695,7 +695,7 @@ Signal numbers are defined in the header .In sys/signal.h . .Ss Complex Commands Complex commands are combinations of simple commands -with control operators or reserved words, together creating a larger complex +with control operators or keywords, together creating a larger complex command. More generally, a command is one of the following: .Bl -item -offset indent @@ -739,7 +739,7 @@ operators that are part of the command. If the pipeline is not in the background (discussed later), the shell waits for all commands to complete. .Pp -If the reserved word +If the keyword .Ic !\& does not precede the pipeline, the exit status is the exit status of the last command specified From owner-svn-src-head@FreeBSD.ORG Sun May 9 22:16:15 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 83C5E1065673; Sun, 9 May 2010 22:16:15 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 72B458FC0A; Sun, 9 May 2010 22:16:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o49MGFoh061881; Sun, 9 May 2010 22:16:15 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o49MGFdp061877; Sun, 9 May 2010 22:16:15 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201005092216.o49MGFdp061877@svn.freebsd.org> From: Pyun YongHyeon Date: Sun, 9 May 2010 22:16:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207832 - head/sys/dev/fxp X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 May 2010 22:16:15 -0000 Author: yongari Date: Sun May 9 22:16:15 2010 New Revision: 207832 URL: http://svn.freebsd.org/changeset/base/207832 Log: Export hardware MAC statistics through sysctl node. Previously fxp(4) already used to extract most hardware MAC statistics but it didn't show them. With this change, all MAC statistics counters are exported. Because there are a couple of new counters for 82558 and 82559, enable extended MAC statistics functionality to get these counters. Accoring to public data sheet, 82559 MAC statistics return 24 DWORD counters(3 counters are unknown at this moment) so increase MAC counter structure to meet the MAC statistics block size. The completion of MAC counter dump is now checked against FXP_STATS_DR_COMPLETE status code which is appended at the end of status block. Previously fxp(4) ignored the status of the FXP_SCB_COMMAND_CU_DUMPRESET command. fxp(4) does not wait for the completion of pending command before issuing FXP_SCB_COMMAND_CU_DUMPRESET. Instead it skips the command and try it next time. This scheme may show better performance but there is chance to loose updated counters after stopping controller. So make sure to update MAC statistics in fxp_stop(). While I'm here move sysctl node creation to fxp_sysctl_node(). Tested by: Larry Baird < lab <> gta dot com > Modified: head/sys/dev/fxp/if_fxp.c head/sys/dev/fxp/if_fxpreg.h head/sys/dev/fxp/if_fxpvar.h Modified: head/sys/dev/fxp/if_fxp.c ============================================================================== --- head/sys/dev/fxp/if_fxp.c Sun May 9 22:03:18 2010 (r207831) +++ head/sys/dev/fxp/if_fxp.c Sun May 9 22:16:15 2010 (r207832) @@ -262,6 +262,8 @@ static int fxp_miibus_readreg(device_t static int fxp_miibus_writereg(device_t dev, int phy, int reg, int value); static void fxp_load_ucode(struct fxp_softc *sc); +static void fxp_update_stats(struct fxp_softc *sc); +static void fxp_sysctl_node(struct fxp_softc *sc); static int sysctl_int_range(SYSCTL_HANDLER_ARGS, int low, int high); static int sysctl_hw_fxp_bundle_max(SYSCTL_HANDLER_ARGS); @@ -537,39 +539,7 @@ fxp_attach(device_t dev) && (data & FXP_PHY_SERIAL_ONLY)) sc->flags |= FXP_FLAG_SERIAL_MEDIA; - SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), - SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), - OID_AUTO, "int_delay", CTLTYPE_INT | CTLFLAG_RW, - &sc->tunable_int_delay, 0, sysctl_hw_fxp_int_delay, "I", - "FXP driver receive interrupt microcode bundling delay"); - SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), - SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), - OID_AUTO, "bundle_max", CTLTYPE_INT | CTLFLAG_RW, - &sc->tunable_bundle_max, 0, sysctl_hw_fxp_bundle_max, "I", - "FXP driver receive interrupt microcode bundle size limit"); - SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), - SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), - OID_AUTO, "rnr", CTLFLAG_RD, &sc->rnr, 0, - "FXP RNR events"); - SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), - SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), - OID_AUTO, "noflow", CTLFLAG_RW, &sc->tunable_noflow, 0, - "FXP flow control disabled"); - - /* - * Pull in device tunables. - */ - sc->tunable_int_delay = TUNABLE_INT_DELAY; - sc->tunable_bundle_max = TUNABLE_BUNDLE_MAX; - sc->tunable_noflow = 1; - (void) resource_int_value(device_get_name(dev), device_get_unit(dev), - "int_delay", &sc->tunable_int_delay); - (void) resource_int_value(device_get_name(dev), device_get_unit(dev), - "bundle_max", &sc->tunable_bundle_max); - (void) resource_int_value(device_get_name(dev), device_get_unit(dev), - "noflow", &sc->tunable_noflow); - sc->rnr = 0; - + fxp_sysctl_node(sc); /* * Enable workarounds for certain chip revision deficiencies. * @@ -2020,6 +1990,81 @@ fxp_intr_body(struct fxp_softc *sc, stru return (rx_npkts); } +static void +fxp_update_stats(struct fxp_softc *sc) +{ + struct ifnet *ifp = sc->ifp; + struct fxp_stats *sp = sc->fxp_stats; + struct fxp_hwstats *hsp; + uint32_t *status; + + FXP_LOCK_ASSERT(sc, MA_OWNED); + + bus_dmamap_sync(sc->fxp_stag, sc->fxp_smap, + BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); + /* Update statistical counters. */ + if (sc->revision >= FXP_REV_82559_A0) + status = &sp->completion_status; + else if (sc->revision >= FXP_REV_82558_A4) + status = (uint32_t *)&sp->tx_tco; + else + status = &sp->tx_pause; + if (*status == htole32(FXP_STATS_DR_COMPLETE)) { + hsp = &sc->fxp_hwstats; + hsp->tx_good += le32toh(sp->tx_good); + hsp->tx_maxcols += le32toh(sp->tx_maxcols); + hsp->tx_latecols += le32toh(sp->tx_latecols); + hsp->tx_underruns += le32toh(sp->tx_underruns); + hsp->tx_lostcrs += le32toh(sp->tx_lostcrs); + hsp->tx_deffered += le32toh(sp->tx_deffered); + hsp->tx_single_collisions += le32toh(sp->tx_single_collisions); + hsp->tx_multiple_collisions += + le32toh(sp->tx_multiple_collisions); + hsp->tx_total_collisions += le32toh(sp->tx_total_collisions); + hsp->rx_good += le32toh(sp->rx_good); + hsp->rx_crc_errors += le32toh(sp->rx_crc_errors); + hsp->rx_alignment_errors += le32toh(sp->rx_alignment_errors); + hsp->rx_rnr_errors += le32toh(sp->rx_rnr_errors); + hsp->rx_overrun_errors += le32toh(sp->rx_overrun_errors); + hsp->rx_cdt_errors += le32toh(sp->rx_cdt_errors); + hsp->rx_shortframes += le32toh(sp->rx_shortframes); + hsp->tx_pause += le32toh(sp->tx_pause); + hsp->rx_pause += le32toh(sp->rx_pause); + hsp->rx_controls += le32toh(sp->rx_controls); + hsp->tx_tco += le16toh(sp->tx_tco); + hsp->rx_tco += le16toh(sp->rx_tco); + + ifp->if_opackets += le32toh(sp->tx_good); + ifp->if_collisions += le32toh(sp->tx_total_collisions); + if (sp->rx_good) { + ifp->if_ipackets += le32toh(sp->rx_good); + sc->rx_idle_secs = 0; + } else if (sc->flags & FXP_FLAG_RXBUG) { + /* + * Receiver's been idle for another second. + */ + sc->rx_idle_secs++; + } + ifp->if_ierrors += + le32toh(sp->rx_crc_errors) + + le32toh(sp->rx_alignment_errors) + + le32toh(sp->rx_rnr_errors) + + le32toh(sp->rx_overrun_errors); + /* + * If any transmit underruns occured, bump up the transmit + * threshold by another 512 bytes (64 * 8). + */ + if (sp->tx_underruns) { + ifp->if_oerrors += le32toh(sp->tx_underruns); + if (tx_threshold < 192) + tx_threshold += 64; + } + *status = 0; + bus_dmamap_sync(sc->fxp_stag, sc->fxp_smap, + BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); + } +} + /* * Update packet in/out/collision statistics. The i82557 doesn't * allow you to access these counters without doing a fairly @@ -2036,35 +2081,11 @@ fxp_tick(void *xsc) { struct fxp_softc *sc = xsc; struct ifnet *ifp = sc->ifp; - struct fxp_stats *sp = sc->fxp_stats; FXP_LOCK_ASSERT(sc, MA_OWNED); - bus_dmamap_sync(sc->fxp_stag, sc->fxp_smap, BUS_DMASYNC_POSTREAD); - ifp->if_opackets += le32toh(sp->tx_good); - ifp->if_collisions += le32toh(sp->tx_total_collisions); - if (sp->rx_good) { - ifp->if_ipackets += le32toh(sp->rx_good); - sc->rx_idle_secs = 0; - } else if (sc->flags & FXP_FLAG_RXBUG) { - /* - * Receiver's been idle for another second. - */ - sc->rx_idle_secs++; - } - ifp->if_ierrors += - le32toh(sp->rx_crc_errors) + - le32toh(sp->rx_alignment_errors) + - le32toh(sp->rx_rnr_errors) + - le32toh(sp->rx_overrun_errors); - /* - * If any transmit underruns occured, bump up the transmit - * threshold by another 512 bytes (64 * 8). - */ - if (sp->tx_underruns) { - ifp->if_oerrors += le32toh(sp->tx_underruns); - if (tx_threshold < 192) - tx_threshold += 64; - } + + /* Update statistical counters. */ + fxp_update_stats(sc); /* * Release any xmit buffers that have completed DMA. This isn't @@ -2099,24 +2120,7 @@ fxp_tick(void *xsc) /* * Start another stats dump. */ - bus_dmamap_sync(sc->fxp_stag, sc->fxp_smap, - BUS_DMASYNC_PREREAD); fxp_scb_cmd(sc, FXP_SCB_COMMAND_CU_DUMPRESET); - } else { - /* - * A previous command is still waiting to be accepted. - * Just zero our copy of the stats and wait for the - * next timer event to update them. - */ - sp->tx_good = 0; - sp->tx_underruns = 0; - sp->tx_total_collisions = 0; - - sp->rx_good = 0; - sp->rx_crc_errors = 0; - sp->rx_alignment_errors = 0; - sp->rx_rnr_errors = 0; - sp->rx_overrun_errors = 0; } if (sc->miibus != NULL) mii_tick(device_get_softc(sc->miibus)); @@ -2160,6 +2164,8 @@ fxp_stop(struct fxp_softc *sc) /* Disable interrupts. */ CSR_WRITE_1(sc, FXP_CSR_SCB_INTRCNTL, FXP_SCB_INTR_DISABLE); + fxp_update_stats(sc); + /* * Release any xmit buffers. */ @@ -2262,7 +2268,9 @@ fxp_init_body(struct fxp_softc *sc) * Initialize base of dump-stats buffer. */ fxp_scb_wait(sc); - bus_dmamap_sync(sc->fxp_stag, sc->fxp_smap, BUS_DMASYNC_PREREAD); + bzero(sc->fxp_stats, sizeof(struct fxp_stats)); + bus_dmamap_sync(sc->fxp_stag, sc->fxp_smap, + BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); CSR_WRITE_4(sc, FXP_CSR_SCB_GENERAL, sc->stats_addr); fxp_scb_cmd(sc, FXP_SCB_COMMAND_CU_DUMP_ADR); @@ -2383,6 +2391,22 @@ fxp_init_body(struct fxp_softc *sc) cbp->pri_fc_loc = 1; /* FC pri location (byte31) */ } + /* Enable 82558 and 82559 extended statistics functionality. */ + if (sc->revision >= FXP_REV_82558_A4) { + if (sc->revision >= FXP_REV_82559_A0) { + /* + * Extend configuration table size to 32 + * to include TCO configuration. + */ + cbp->byte_count = 32; + cbp->ext_stats_dis = 1; + /* Enable TCO stats. */ + cbp->tno_int_or_tco_en = 1; + cbp->gamla_rx = 1; + } else + cbp->ext_stats_dis = 0; + } + /* * Start the config command/DMA. */ @@ -3004,6 +3028,113 @@ fxp_load_ucode(struct fxp_softc *sc) sc->flags |= FXP_FLAG_UCODE; } +#define FXP_SYSCTL_STAT_ADD(c, h, n, p, d) \ + SYSCTL_ADD_UINT(c, h, OID_AUTO, n, CTLFLAG_RD, p, 0, d) + +static void +fxp_sysctl_node(struct fxp_softc *sc) +{ + struct sysctl_ctx_list *ctx; + struct sysctl_oid_list *child, *parent; + struct sysctl_oid *tree; + struct fxp_hwstats *hsp; + + ctx = device_get_sysctl_ctx(sc->dev); + child = SYSCTL_CHILDREN(device_get_sysctl_tree(sc->dev)); + + SYSCTL_ADD_PROC(ctx, child, + OID_AUTO, "int_delay", CTLTYPE_INT | CTLFLAG_RW, + &sc->tunable_int_delay, 0, sysctl_hw_fxp_int_delay, "I", + "FXP driver receive interrupt microcode bundling delay"); + SYSCTL_ADD_PROC(ctx, child, + OID_AUTO, "bundle_max", CTLTYPE_INT | CTLFLAG_RW, + &sc->tunable_bundle_max, 0, sysctl_hw_fxp_bundle_max, "I", + "FXP driver receive interrupt microcode bundle size limit"); + SYSCTL_ADD_INT(ctx, child,OID_AUTO, "rnr", CTLFLAG_RD, &sc->rnr, 0, + "FXP RNR events"); + SYSCTL_ADD_INT(ctx, child, + OID_AUTO, "noflow", CTLFLAG_RW, &sc->tunable_noflow, 0, + "FXP flow control disabled"); + + /* + * Pull in device tunables. + */ + sc->tunable_int_delay = TUNABLE_INT_DELAY; + sc->tunable_bundle_max = TUNABLE_BUNDLE_MAX; + sc->tunable_noflow = 1; + (void) resource_int_value(device_get_name(sc->dev), + device_get_unit(sc->dev), "int_delay", &sc->tunable_int_delay); + (void) resource_int_value(device_get_name(sc->dev), + device_get_unit(sc->dev), "bundle_max", &sc->tunable_bundle_max); + (void) resource_int_value(device_get_name(sc->dev), + device_get_unit(sc->dev), "noflow", &sc->tunable_noflow); + sc->rnr = 0; + + hsp = &sc->fxp_hwstats; + tree = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, "stats", CTLFLAG_RD, + NULL, "FXP statistics"); + parent = SYSCTL_CHILDREN(tree); + + /* Rx MAC statistics. */ + tree = SYSCTL_ADD_NODE(ctx, parent, OID_AUTO, "rx", CTLFLAG_RD, + NULL, "Rx MAC statistics"); + child = SYSCTL_CHILDREN(tree); + FXP_SYSCTL_STAT_ADD(ctx, child, "good_frames", + &hsp->rx_good, "Good frames"); + FXP_SYSCTL_STAT_ADD(ctx, child, "crc_errors", + &hsp->rx_crc_errors, "CRC errors"); + FXP_SYSCTL_STAT_ADD(ctx, child, "alignment_errors", + &hsp->rx_alignment_errors, "Alignment errors"); + FXP_SYSCTL_STAT_ADD(ctx, child, "rnr_errors", + &hsp->rx_rnr_errors, "RNR errors"); + FXP_SYSCTL_STAT_ADD(ctx, child, "overrun_errors", + &hsp->rx_overrun_errors, "Overrun errors"); + FXP_SYSCTL_STAT_ADD(ctx, child, "cdt_errors", + &hsp->rx_cdt_errors, "Collision detect errors"); + FXP_SYSCTL_STAT_ADD(ctx, child, "shortframes", + &hsp->rx_shortframes, "Short frame errors"); + if (sc->revision >= FXP_REV_82558_A4) { + FXP_SYSCTL_STAT_ADD(ctx, child, "pause", + &hsp->rx_pause, "Pause frames"); + FXP_SYSCTL_STAT_ADD(ctx, child, "controls", + &hsp->rx_controls, "Unsupported control frames"); + } + if (sc->revision >= FXP_REV_82559_A0) + FXP_SYSCTL_STAT_ADD(ctx, child, "tco", + &hsp->rx_tco, "TCO frames"); + + /* Tx MAC statistics. */ + tree = SYSCTL_ADD_NODE(ctx, parent, OID_AUTO, "tx", CTLFLAG_RD, + NULL, "Tx MAC statistics"); + child = SYSCTL_CHILDREN(tree); + FXP_SYSCTL_STAT_ADD(ctx, child, "good_frames", + &hsp->tx_good, "Good frames"); + FXP_SYSCTL_STAT_ADD(ctx, child, "maxcols", + &hsp->tx_maxcols, "Maximum collisions errors"); + FXP_SYSCTL_STAT_ADD(ctx, child, "latecols", + &hsp->tx_latecols, "Late collisions errors"); + FXP_SYSCTL_STAT_ADD(ctx, child, "underruns", + &hsp->tx_underruns, "Underrun errors"); + FXP_SYSCTL_STAT_ADD(ctx, child, "lostcrs", + &hsp->tx_lostcrs, "Lost carrier sense"); + FXP_SYSCTL_STAT_ADD(ctx, child, "deffered", + &hsp->tx_deffered, "Deferred"); + FXP_SYSCTL_STAT_ADD(ctx, child, "single_collisions", + &hsp->tx_single_collisions, "Single collisions"); + FXP_SYSCTL_STAT_ADD(ctx, child, "multiple_collisions", + &hsp->tx_multiple_collisions, "Multiple collisions"); + FXP_SYSCTL_STAT_ADD(ctx, child, "total_collisions", + &hsp->tx_total_collisions, "Total collisions"); + if (sc->revision >= FXP_REV_82558_A4) + FXP_SYSCTL_STAT_ADD(ctx, child, "pause", + &hsp->tx_pause, "Pause frames"); + if (sc->revision >= FXP_REV_82559_A0) + FXP_SYSCTL_STAT_ADD(ctx, child, "tco", + &hsp->tx_tco, "TCO frames"); +} + +#undef FXP_SYSCTL_STAT_ADD + static int sysctl_int_range(SYSCTL_HANDLER_ARGS, int low, int high) { Modified: head/sys/dev/fxp/if_fxpreg.h ============================================================================== --- head/sys/dev/fxp/if_fxpreg.h Sun May 9 22:03:18 2010 (r207831) +++ head/sys/dev/fxp/if_fxpreg.h Sun May 9 22:16:15 2010 (r207832) @@ -418,7 +418,15 @@ struct fxp_stats { uint32_t rx_overrun_errors; uint32_t rx_cdt_errors; uint32_t rx_shortframes; + uint32_t tx_pause; + uint32_t rx_pause; + uint32_t rx_controls; + uint16_t tx_tco; + uint16_t rx_tco; uint32_t completion_status; + uint32_t reserved0; + uint32_t reserved1; + uint32_t reserved2; }; #define FXP_STATS_DUMP_COMPLETE 0xa005 #define FXP_STATS_DR_COMPLETE 0xa007 Modified: head/sys/dev/fxp/if_fxpvar.h ============================================================================== --- head/sys/dev/fxp/if_fxpvar.h Sun May 9 22:03:18 2010 (r207831) +++ head/sys/dev/fxp/if_fxpvar.h Sun May 9 22:16:15 2010 (r207832) @@ -149,6 +149,30 @@ struct fxp_ident { char *name; }; +struct fxp_hwstats { + uint32_t tx_good; + uint32_t tx_maxcols; + uint32_t tx_latecols; + uint32_t tx_underruns; + uint32_t tx_lostcrs; + uint32_t tx_deffered; + uint32_t tx_single_collisions; + uint32_t tx_multiple_collisions; + uint32_t tx_total_collisions; + uint32_t tx_pause; + uint32_t tx_tco; + uint32_t rx_good; + uint32_t rx_crc_errors; + uint32_t rx_alignment_errors; + uint32_t rx_rnr_errors; + uint32_t rx_overrun_errors; + uint32_t rx_cdt_errors; + uint32_t rx_shortframes; + uint32_t rx_pause; + uint32_t rx_controls; + uint32_t rx_tco; +}; + /* * NOTE: Elements are ordered for optimal cacheline behavior, and NOT * for functional grouping. @@ -175,6 +199,7 @@ struct fxp_softc { int tx_queued; /* # of active TxCB's */ struct fxp_stats *fxp_stats; /* Pointer to interface stats */ uint32_t stats_addr; /* DMA address of the stats structure */ + struct fxp_hwstats fxp_hwstats; int rx_idle_secs; /* # of seconds RX has been idle */ struct callout stat_ch; /* stat callout */ int watchdog_timer; /* seconds until chip reset */ From owner-svn-src-head@FreeBSD.ORG Sun May 9 22:27:42 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7730E1065672; Sun, 9 May 2010 22:27:42 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 9999C8FC0C; Sun, 9 May 2010 22:27:41 +0000 (UTC) Received: by fxm15 with SMTP id 15so2333558fxm.13 for ; Sun, 09 May 2010 15:27:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=qoYqY+tv55oJAt/bH2ZQ+8Z8AVFfepbGGdkvp7Lfwns=; b=udQtucTxYDpe6zgf6MVMCa/00/YnGQnuNnH+wA0u8gZUsaTawdQLFk6yvhce8nFYEu EAzFcdzFOAzMQ5mOCeztL7WdYfvBqgU87+d14ZzqNiRO8hBH8q4oxm7UP9060rOk9+xi wVOSP3wYLmUAPZ5MMRjc+uoy96FEby9ZLJkb4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=ACy6MmbJhHLPUbiI0s3FyahbcteaX8zDQnE98VVm7aY+DyMkNWFNoEqbY3T2sjucry qdQai94qblDlMJ4HQCPXS5c0kssvarkstxEv8xf71y0/hPS06roGgCWO/IksE9a/It2r UGyfJvgfcARfZo3b6zOe1tTuU/9kF8cQuSupY= MIME-Version: 1.0 Received: by 10.239.136.133 with SMTP id h5mr339890hbh.47.1273444060348; Sun, 09 May 2010 15:27:40 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.239.129.207 with HTTP; Sun, 9 May 2010 15:27:40 -0700 (PDT) In-Reply-To: <20100509170414.GA35602@alchemy.franken.de> References: <201004192327.o3JNRsK4047856@svn.freebsd.org> <20100509170414.GA35602@alchemy.franken.de> Date: Mon, 10 May 2010 00:27:40 +0200 X-Google-Sender-Auth: 5de89d4bde43defc Message-ID: From: Attilio Rao To: Marius Strobl Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r206878 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 May 2010 22:27:42 -0000 2010/5/9 Marius Strobl : > On Mon, Apr 19, 2010 at 11:27:54PM +0000, Attilio Rao wrote: >> Author: attilio >> Date: Mon Apr 19 23:27:54 2010 >> New Revision: 206878 >> URL: http://svn.freebsd.org/changeset/base/206878 >> >> Log: >> =C2=A0 Fix a deadlock in the shutdown code: >> =C2=A0 When performing a smp_rendezvous() or more likely, on amd64 and i= 386, >> =C2=A0 a smp_tlb_shootdown() the caller will end up with the smp_ipi_mtx >> =C2=A0 spinlock held, busy-waiting for other CPUs to acknowledge the ope= ration. >> =C2=A0 As long as CPUs are suspended (via cpu_reset()) between the activ= e mask >> =C2=A0 read and IPI sending there can be a deadlock where the caller wil= l wait >> =C2=A0 forever for a dead CPU to acknowledge the operation. >> =C2=A0 Please note that on CPU0 that is going to be someway heavier beca= use of >> =C2=A0 the spinlocks being disabled earlier than quitting the machine. >> >> =C2=A0 Fix this bug by calling cpu_reset() with the smp_ipi_mtx held. >> =C2=A0 Note that it is very likely that a saner offline/online CPUs mech= anism >> =C2=A0 will help heavilly in fixing similar cases as it is likely more b= ugs >> =C2=A0 of this type may arise in the future. >> > > This change causes a hang for me when running an SMP kernel on an > UP machine or an MP machine with SMP disabled as in these cases > smp_ipi_mtx isn't initialized (see mp_start()). The below patch > fixes this for me. Marius, thanks a lot for reporting this. However, I think that a better fix is to always initialize the mutex. Do you think the following patch is fine for you?: http://www.freebsd.org/~attilio/smpipi_fixup.diff Thanks, Attilio --=20 Peace can only be achieved by understanding - A. Einstein From owner-svn-src-head@FreeBSD.ORG Mon May 10 06:59:50 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7D0081065674; Mon, 10 May 2010 06:59:50 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 68DC58FC1F; Mon, 10 May 2010 06:59:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4A6xoqa076716; Mon, 10 May 2010 06:59:50 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4A6xoAt076701; Mon, 10 May 2010 06:59:50 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201005100659.o4A6xoAt076701@svn.freebsd.org> From: Martin Matuska Date: Mon, 10 May 2010 06:59:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207842 - in head: contrib/xz etc/mtree lib lib/liblzma share/mk sys/sys usr.bin usr.bin/less usr.bin/lzmainfo usr.bin/xz usr.bin/xzdec X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 May 2010 06:59:50 -0000 Author: mm Date: Mon May 10 06:59:50 2010 New Revision: 207842 URL: http://svn.freebsd.org/changeset/base/207842 Log: Import of liblzma, xz, xzdec, lzmainfo from vendor branch Add support for xz and lzma to lesspipe.sh (xzless, lzless) Bump __FreeBSD_version Approved by: delphij (mentor) MFC after: 2 weeks Added: head/contrib/xz/ - copied from r207829, vendor/xz/dist/ head/contrib/xz/FREEBSD-Xlist (contents, props changed) head/contrib/xz/FREEBSD-upgrade (contents, props changed) head/lib/liblzma/ head/lib/liblzma/Makefile (contents, props changed) head/lib/liblzma/config.h (contents, props changed) head/usr.bin/lzmainfo/ head/usr.bin/lzmainfo/Makefile (contents, props changed) head/usr.bin/xz/ head/usr.bin/xz/Makefile (contents, props changed) head/usr.bin/xzdec/ head/usr.bin/xzdec/Makefile (contents, props changed) Modified: head/etc/mtree/BSD.include.dist head/lib/Makefile head/share/mk/bsd.libnames.mk head/sys/sys/param.h head/usr.bin/Makefile head/usr.bin/less/Makefile head/usr.bin/less/lesspipe.sh Added: head/contrib/xz/FREEBSD-Xlist ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/xz/FREEBSD-Xlist Mon May 10 06:59:50 2010 (r207842) @@ -0,0 +1,37 @@ +$FreeBSD$ +*/*/*/Makefile.* +*/*/Makefile.* +*/.gitignore +*/Makefile.* +.git +.gitignore +ABOUT-NLS +COPYING.GPLv2 +COPYING.GPLv3 +COPYING.LGPLv2.1 +Doxyfile.in +INSTALL +INSTALL.generic +Makefile +Makefile.* +NEWS +PACKAGERS +aclocal.m4 +autogen.sh +build-aux/ +config.h.in +configure +configure.ac +debug/ +doc/ +dos/ +extra/ +lib/ +m4/ +makefile.am +src/*/*.rc +src/liblzma/liblzma.pc.in +src/scripts/ +tests/ +version.sh +windows/ Added: head/contrib/xz/FREEBSD-upgrade ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/xz/FREEBSD-upgrade Mon May 10 06:59:50 2010 (r207842) @@ -0,0 +1,28 @@ +$FreeBSD$ + +xz + +The source code is pulled with git: + + git clone git://ctrl.tukaani.org/xz.git xz + +ChangeLog is generated with: + + git log > ChangeLog + +For the import files and directories were pruned by: + +sh -c 'for F in `cat FREEBSD-Xlist | grep -v FreeBSD`; do rm -rf ./$F ; done' + +You may check if there are any new files that we don't need. + +The instructions for importing new release and merging to HEAD can be found +at FreeBSD wiki: + + http://wiki.freebsd.org/SubversionPrimer/VendorImports + +To make local changes to xz, simply patch and commit to the trunk +branch (aka HEAD). Never make local changes on the vendor branch. + +mm@FreeBSD.org +10-May-2010 Modified: head/etc/mtree/BSD.include.dist ============================================================================== --- head/etc/mtree/BSD.include.dist Mon May 10 06:59:07 2010 (r207841) +++ head/etc/mtree/BSD.include.dist Mon May 10 06:59:50 2010 (r207842) @@ -207,6 +207,8 @@ .. lwres .. + lzma + .. machine pc .. Modified: head/lib/Makefile ============================================================================== --- head/lib/Makefile Mon May 10 06:59:07 2010 (r207841) +++ head/lib/Makefile Mon May 10 06:59:50 2010 (r207842) @@ -76,6 +76,7 @@ SUBDIR= ${SUBDIR_ORDERED} \ ${_libipx} \ libjail \ libkiconv \ + liblzma \ libmagic \ libmemstat \ ${_libmilter} \ Added: head/lib/liblzma/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/liblzma/Makefile Mon May 10 06:59:50 2010 (r207842) @@ -0,0 +1,135 @@ +# $FreeBSD$ + +LIB= lzma +SHLIB_MAJOR= 0 +LZMADIR= ${.CURDIR}/../../contrib/xz/src/liblzma + +.PATH: ${LZMADIR}/../common +SRCS+= tuklib_physmem.c + +.PATH: ${LZMADIR}/api/lzma + +MAININCS= ../lzma.h +MAININCSDIR= ${INCLUDEDIR} + +LZMAINCS+= base.h \ + bcj.h \ + block.h \ + check.h \ + container.h \ + delta.h \ + filter.h \ + index_hash.h \ + lzma.h \ + stream_flags.h \ + subblock.h \ + version.h \ + vli.h + +LZMAINCSDIR= ${INCLUDEDIR}/lzma + +INCSGROUPS= MAININCS LZMAINCS + +.PATH: ${LZMADIR}/common +SRCS+= common.c \ + block_util.c \ + easy_preset.c \ + filter_common.c \ + hardware_physmem.c \ + index.c \ + stream_flags_common.c \ + vli_size.c \ + alone_encoder.c \ + block_buffer_encoder.c \ + block_encoder.c \ + block_header_encoder.c \ + easy_buffer_encoder.c \ + easy_encoder.c \ + easy_encoder_memusage.c \ + filter_buffer_encoder.c \ + filter_encoder.c \ + filter_flags_encoder.c \ + index_encoder.c \ + stream_buffer_encoder.c \ + stream_encoder.c \ + stream_flags_encoder.c \ + vli_encoder.c \ + alone_decoder.c \ + auto_decoder.c \ + block_buffer_decoder.c \ + block_decoder.c \ + block_header_decoder.c \ + easy_decoder_memusage.c \ + filter_buffer_decoder.c \ + filter_decoder.c \ + filter_flags_decoder.c \ + index_decoder.c \ + index_hash.c \ + stream_buffer_decoder.c \ + stream_decoder.c \ + stream_flags_decoder.c \ + vli_decoder.c + +.PATH: ${LZMADIR}/check +SRCS+= check.c \ + crc32_table.c \ + crc64_table.c \ + sha256.c +.if defined(MACHINE_ARCH) && ${MACHINE_ARCH} == "i386" +SRCS+= crc32_x86.S \ + crc64_x86.S +.else +SRCS+= crc32_fast.c \ + crc64_fast.c +.endif + +.PATH: ${LZMADIR}/lz +SRCS+= lz_encoder.c \ + lz_encoder_mf.c \ + lz_decoder.c + +.PATH: ${LZMADIR}/lzma +SRCS+= lzma_encoder.c \ + lzma_encoder_presets.c \ + lzma_encoder_optimum_fast.c \ + lzma_encoder_optimum_normal.c \ + fastpos_table.c \ + lzma_decoder.c \ + lzma2_encoder.c \ + lzma2_decoder.c + +.PATH: ${LZMADIR}/rangecoder +SRCS+= price_table.c + +.PATH: ${LZMADIR}/delta +SRCS+= delta_common.c \ + delta_encoder.c \ + delta_decoder.c + +.PATH: ${LZMADIR}/simple +SRCS+= simple_coder.c \ + simple_encoder.c \ + simple_decoder.c \ + x86.c \ + powerpc.c \ + ia64.c \ + arm.c \ + armthumb.c \ + sparc.c + +WARNS?= 3 + +CFLAGS+= -DHAVE_CONFIG_H \ + -I${.CURDIR} \ + -I${LZMADIR}/api \ + -I${LZMADIR}/common \ + -I${LZMADIR}/check \ + -I${LZMADIR}/lz \ + -I${LZMADIR}/rangecoder \ + -I${LZMADIR}/lzma \ + -I${LZMADIR}/subblock \ + -I${LZMADIR}/delta \ + -I${LZMADIR}/simple \ + -I${LZMADIR}/../common + +.include Added: head/lib/liblzma/config.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/liblzma/config.h Mon May 10 06:59:50 2010 (r207842) @@ -0,0 +1,95 @@ +// $FreeBSD$ +#define ASSUME_RAM 128 +#define HAVE_CHECK_CRC32 1 +#define HAVE_CHECK_CRC64 1 +#define HAVE_CHECK_SHA256 1 +#define HAVE_DECL_PROGRAM_INVOCATION_NAME 0 +#define HAVE_DECODER 1 +#define HAVE_DECODER_ARM 1 +#define HAVE_DECODER_ARMTHUMB 1 +#define HAVE_DECODER_DELTA 1 +#define HAVE_DECODER_IA64 1 +#define HAVE_DECODER_LZMA1 1 +#define HAVE_DECODER_LZMA2 1 +#define HAVE_DECODER_POWERPC 1 +#define HAVE_DECODER_SPARC 1 +#define HAVE_DECODER_X86 1 +#define HAVE_DLFCN_H 1 +#define HAVE_ENCODER 1 +#define HAVE_ENCODER_ARM 1 +#define HAVE_ENCODER_ARMTHUMB 1 +#define HAVE_ENCODER_DELTA 1 +#define HAVE_ENCODER_IA64 1 +#define HAVE_ENCODER_LZMA1 1 +#define HAVE_ENCODER_LZMA2 1 +#define HAVE_ENCODER_POWERPC 1 +#define HAVE_ENCODER_SPARC 1 +#define HAVE_ENCODER_X86 1 +#define HAVE_FCNTL_H 1 +#define HAVE_FUTIMES 1 +#define HAVE_GETOPT_H 1 +#define HAVE_GETOPT_LONG 1 +#define HAVE_INTTYPES_H 1 +#define HAVE_LIMITS_H 1 +#define HAVE_MEMORY_H 1 +#define HAVE_MF_BT2 1 +#define HAVE_MF_BT3 1 +#define HAVE_MF_BT4 1 +#define HAVE_MF_HC3 1 +#define HAVE_MF_HC4 1 +#define HAVE_OPTRESET 1 +#define HAVE_PTHREAD 1 +#define HAVE_STDBOOL_H 1 +#define HAVE_STDINT_H 1 +#define HAVE_STDLIB_H 1 +#define HAVE_STRINGS_H 1 +#define HAVE_STRING_H 1 +#define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1 +#define HAVE_SYS_ENDIAN_H 1 +#define HAVE_SYS_PARAM_H 1 +#define HAVE_SYS_STAT_H 1 +#define HAVE_SYS_TIME_H 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_UINTPTR_T 1 +#define HAVE_UNISTD_H 1 +#define HAVE_VISIBILITY 1 +#define HAVE__BOOL 1 +#define LT_OBJDIR ".libs/" +#define NDEBUG 1 +#define PACKAGE "xz" +#define PACKAGE_BUGREPORT "lasse.collin@tukaani.org" +#define PACKAGE_NAME "XZ Utils" +#define PACKAGE_STRING "XZ Utils 4.999.9beta" +#define PACKAGE_TARNAME "xz" +#define PACKAGE_URL "http://tukaani.org/xz/" +#define PACKAGE_VERSION "4.999.9beta" +#define SIZEOF_SIZE_T 8 +#define STDC_HEADERS 1 +#define TUKLIB_CPUCORES_SYSCONF 1 +#define TUKLIB_FAST_UNALIGNED_ACCESS 1 +#define TUKLIB_PHYSMEM_SYSCONF 1 +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif +#define VERSION "4.999.9beta" +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +/* # undef WORDS_BIGENDIAN */ +# endif +#endif Modified: head/share/mk/bsd.libnames.mk ============================================================================== --- head/share/mk/bsd.libnames.mk Mon May 10 06:59:07 2010 (r207841) +++ head/share/mk/bsd.libnames.mk Mon May 10 06:59:50 2010 (r207842) @@ -82,6 +82,7 @@ LIBLN?= "don't use LIBLN, use LIBL" .if ${MK_BIND} != "no" LIBLWRES?= ${DESTDIR}${LIBDIR}/liblwres.a .endif +LIBLZMA?= ${DESTDIR}${LIBDIR}/liblzma.a LIBM?= ${DESTDIR}${LIBDIR}/libm.a LIBMAGIC?= ${DESTDIR}${LIBDIR}/libmagic.a LIBMD?= ${DESTDIR}${LIBDIR}/libmd.a Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Mon May 10 06:59:07 2010 (r207841) +++ head/sys/sys/param.h Mon May 10 06:59:50 2010 (r207842) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 900011 /* Master, propagated to newvers */ +#define __FreeBSD_version 900012 /* Master, propagated to newvers */ #ifndef LOCORE #include Modified: head/usr.bin/Makefile ============================================================================== --- head/usr.bin/Makefile Mon May 10 06:59:07 2010 (r207841) +++ head/usr.bin/Makefile Mon May 10 06:59:50 2010 (r207842) @@ -116,6 +116,7 @@ SUBDIR= alias \ look \ lorder \ lsvfs \ + lzmainfo \ m4 \ ${_mail} \ ${_make} \ @@ -233,6 +234,8 @@ SUBDIR= alias \ xinstall \ ${_xlint} \ ${_xstr} \ + xz \ + xzdec \ ${_yacc} \ yes \ ${_ypcat} \ Modified: head/usr.bin/less/Makefile ============================================================================== --- head/usr.bin/less/Makefile Mon May 10 06:59:07 2010 (r207841) +++ head/usr.bin/less/Makefile Mon May 10 06:59:50 2010 (r207842) @@ -11,7 +11,9 @@ SCRIPTSNAME_lesspipe.sh=lesspipe.sh DPADD= ${LIBTERMCAP} LDADD= -ltermcap LINKS= ${BINDIR}/less ${BINDIR}/more \ - ${BINDIR}/zless ${BINDIR}/bzless + ${BINDIR}/zless ${BINDIR}/bzless \ + ${BINDIR}/zless ${BINDIR}/xzless \ + ${BINDIR}/zless ${BINDIR}/lzless MLINKS= less.1 more.1 CLEANFILES= less.1 Modified: head/usr.bin/less/lesspipe.sh ============================================================================== --- head/usr.bin/less/lesspipe.sh Mon May 10 06:59:07 2010 (r207841) +++ head/usr.bin/less/lesspipe.sh Mon May 10 06:59:50 2010 (r207842) @@ -13,4 +13,10 @@ case "$1" in *.bz2) exec bzip2 -d -c "$1" 2>/dev/null ;; + *.xz) + exec xz -d -c "$1" 2>/dev/null + ;; + *.lzma) + exec lzma -d -c "$1" 2>/dev/null + ;; esac Added: head/usr.bin/lzmainfo/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/lzmainfo/Makefile Mon May 10 06:59:50 2010 (r207842) @@ -0,0 +1,25 @@ +# $FreeBSD$ + +PROG= lzmainfo + +XZDIR= ${.CURDIR}/../../contrib/xz/src +LZMALIBDIR= ${.CURDIR}/../../lib/liblzma + +.PATH: ${XZDIR}/lzmainfo +SRCS+= lzmainfo.c + +.PATH: ${XZDIR}/common +SRCS+= tuklib_progname.c \ + tuklib_exit.c + +WARNS?= 3 + +CFLAGS+= -DHAVE_CONFIG_H \ + -I${LZMALIBDIR} \ + -I${XZDIR}/common \ + -I${XZDIR}/liblzma/api + +DPADD= ${LIBLZMA} +LDADD= -llzma + +.include Added: head/usr.bin/xz/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/xz/Makefile Mon May 10 06:59:50 2010 (r207842) @@ -0,0 +1,47 @@ +# $FreeBSD$ + +PROG= xz + +LINKS= ${BINDIR}/xz ${BINDIR}/unxz +LINKS+= ${BINDIR}/xz ${BINDIR}/lzma +LINKS+= ${BINDIR}/xz ${BINDIR}/unlzma +LINKS+= ${BINDIR}/xz ${BINDIR}/xzcat +LINKS+= ${BINDIR}/xz ${BINDIR}/lzcat + +MLINKS= xz.1 unxz.1 xz.1 lzma.1 xz.1 unlzma.1 xz.1 xzcat.1 xz.1 lzcat.1 + +XZDIR= ${.CURDIR}/../../contrib/xz/src +LZMALIBDIR= ${.CURDIR}/../../lib/liblzma + +.PATH: ${XZDIR}/xz + +SRCS= args.c \ + coder.c \ + file_io.c \ + hardware.c \ + list.c \ + main.c \ + message.c \ + options.c \ + signals.c \ + suffix.c \ + util.c + +.PATH: ${XZDIR}/common + +SRCS+= tuklib_open_stdxxx.c \ + tuklib_progname.c \ + tuklib_exit.c \ + tuklib_cpucores.c + +WARNS?= 3 + +CFLAGS+= -DHAVE_CONFIG_H \ + -I${LZMALIBDIR} \ + -I${XZDIR}/common \ + -I${XZDIR}/liblzma/api + +DPADD= ${LIBLZMA} +LDADD= -llzma + +.include Added: head/usr.bin/xzdec/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/xzdec/Makefile Mon May 10 06:59:50 2010 (r207842) @@ -0,0 +1,31 @@ +# $FreeBSD$ + +PROG= xzdec + +LINKS= ${BINDIR}/xzdec ${BINDIR}/lzdec + +MLINKS= xzdec.1 lzmadec.1 + +XZDIR= ${.CURDIR}/../../contrib/xz/src +LZMALIBDIR= ${.CURDIR}/../../lib/liblzma + +.PATH: ${XZDIR}/xzdec + +SRCS= xzdec.c + +.PATH: ${XZDIR}/common + +SRCS+= tuklib_progname.c \ + tuklib_exit.c + +WARNS?= 3 + +CFLAGS+= -DHAVE_CONFIG_H \ + -I${LZMALIBDIR} \ + -I${XZDIR}/common \ + -I${XZDIR}/liblzma/api + +DPADD= ${LIBLZMA} +LDADD= -llzma + +.include From owner-svn-src-head@FreeBSD.ORG Mon May 10 07:47:32 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 236AA106566C; Mon, 10 May 2010 07:47:32 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 11C8F8FC18; Mon, 10 May 2010 07:47:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4A7lVJn087170; Mon, 10 May 2010 07:47:31 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4A7lVQb087165; Mon, 10 May 2010 07:47:31 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201005100747.o4A7lVQb087165@svn.freebsd.org> From: Martin Matuska Date: Mon, 10 May 2010 07:47:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207844 - in head: lib/liblzma usr.bin/lzmainfo usr.bin/xz usr.bin/xzdec X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 May 2010 07:47:32 -0000 Author: mm Date: Mon May 10 07:47:31 2010 New Revision: 207844 URL: http://svn.freebsd.org/changeset/base/207844 Log: Add two public headers missing in r207842 Adjust CFLAGS for lzmainfo, xz, xzdec Approved by: delphij (mentor) MFC after: 2 weeks Modified: head/lib/liblzma/Makefile head/usr.bin/lzmainfo/Makefile head/usr.bin/xz/Makefile head/usr.bin/xzdec/Makefile Modified: head/lib/liblzma/Makefile ============================================================================== --- head/lib/liblzma/Makefile Mon May 10 07:01:52 2010 (r207843) +++ head/lib/liblzma/Makefile Mon May 10 07:47:31 2010 (r207844) @@ -19,6 +19,8 @@ LZMAINCS+= base.h \ container.h \ delta.h \ filter.h \ + hardware.h \ + index.h \ index_hash.h \ lzma.h \ stream_flags.h \ Modified: head/usr.bin/lzmainfo/Makefile ============================================================================== --- head/usr.bin/lzmainfo/Makefile Mon May 10 07:01:52 2010 (r207843) +++ head/usr.bin/lzmainfo/Makefile Mon May 10 07:47:31 2010 (r207844) @@ -16,8 +16,7 @@ WARNS?= 3 CFLAGS+= -DHAVE_CONFIG_H \ -I${LZMALIBDIR} \ - -I${XZDIR}/common \ - -I${XZDIR}/liblzma/api + -I${XZDIR}/common DPADD= ${LIBLZMA} LDADD= -llzma Modified: head/usr.bin/xz/Makefile ============================================================================== --- head/usr.bin/xz/Makefile Mon May 10 07:01:52 2010 (r207843) +++ head/usr.bin/xz/Makefile Mon May 10 07:47:31 2010 (r207844) @@ -38,8 +38,7 @@ WARNS?= 3 CFLAGS+= -DHAVE_CONFIG_H \ -I${LZMALIBDIR} \ - -I${XZDIR}/common \ - -I${XZDIR}/liblzma/api + -I${XZDIR}/common DPADD= ${LIBLZMA} LDADD= -llzma Modified: head/usr.bin/xzdec/Makefile ============================================================================== --- head/usr.bin/xzdec/Makefile Mon May 10 07:01:52 2010 (r207843) +++ head/usr.bin/xzdec/Makefile Mon May 10 07:47:31 2010 (r207844) @@ -22,8 +22,7 @@ WARNS?= 3 CFLAGS+= -DHAVE_CONFIG_H \ -I${LZMALIBDIR} \ - -I${XZDIR}/common \ - -I${XZDIR}/liblzma/api + -I${XZDIR}/common DPADD= ${LIBLZMA} LDADD= -llzma From owner-svn-src-head@FreeBSD.ORG Mon May 10 11:53:40 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C050D106566B; Mon, 10 May 2010 11:53:40 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id B02FF8FC1B; Mon, 10 May 2010 11:53:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4ABre1R043977; Mon, 10 May 2010 11:53:40 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4ABregP043975; Mon, 10 May 2010 11:53:40 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201005101153.o4ABregP043975@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 10 May 2010 11:53:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207846 - head/sys/vm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 May 2010 11:53:40 -0000 Author: kib Date: Mon May 10 11:53:40 2010 New Revision: 207846 URL: http://svn.freebsd.org/changeset/base/207846 Log: Continue cleaning the queue instead of moving to the next queue or bailing out if acquisition of page lock caused page position in the queue to change. Pointed out by: alc Modified: head/sys/vm/vm_contig.c Modified: head/sys/vm/vm_contig.c ============================================================================== --- head/sys/vm/vm_contig.c Mon May 10 11:50:26 2010 (r207845) +++ head/sys/vm/vm_contig.c Mon May 10 11:53:40 2010 (r207846) @@ -168,10 +168,8 @@ vm_contig_launder(int queue) if ((m->flags & PG_MARKER) != 0) continue; - if (!vm_pageout_page_lock(m, &next)) { - vm_page_unlock(m); - return (FALSE); - } + if (!vm_pageout_page_lock(m, &next)) + continue; KASSERT(VM_PAGE_INQUEUE2(m, queue), ("vm_contig_launder: page %p's queue is not %d", m, queue)); error = vm_contig_launder_page(m, &next); From owner-svn-src-head@FreeBSD.ORG Mon May 10 14:15:18 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 67A2F106566C; Mon, 10 May 2010 14:15:18 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from mx0.hoeg.nl (mx0.hoeg.nl [178.63.0.170]) by mx1.freebsd.org (Postfix) with ESMTP id 25A728FC0C; Mon, 10 May 2010 14:15:17 +0000 (UTC) Received: by mx0.hoeg.nl (Postfix, from userid 1000) id 1F5FE2A28CF3; Mon, 10 May 2010 16:15:17 +0200 (CEST) Date: Mon, 10 May 2010 16:15:17 +0200 From: Ed Schouten To: Martin Matuska Message-ID: <20100510141517.GS56080@hoeg.nl> References: <201005100659.o4A6xoAt076701@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="UHIpmL4a+UjiyldO" Content-Disposition: inline In-Reply-To: <201005100659.o4A6xoAt076701@svn.freebsd.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r207842 - in head: contrib/xz etc/mtree lib lib/liblzma share/mk sys/sys usr.bin usr.bin/less usr.bin/lzmainfo usr.bin/xz usr.bin/xzdec X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 May 2010 14:15:18 -0000 --UHIpmL4a+UjiyldO Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Martin Matuska wrote: > Author: mm > Date: Mon May 10 06:59:50 2010 > New Revision: 207842 > URL: http://svn.freebsd.org/changeset/base/207842 >=20 > Log: > Import of liblzma, xz, xzdec, lzmainfo from vendor branch > Add support for xz and lzma to lesspipe.sh (xzless, lzless) > Bump __FreeBSD_version > =20 > Approved by: delphij (mentor) > MFC after: 2 weeks Woohoo! --=20 Ed Schouten WWW: http://80386.nl/ --UHIpmL4a+UjiyldO Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAkvoFPUACgkQ52SDGA2eCwWa5gCfWMkYEsYQTwOLU5nL8HB4DAzN fmQAn1RK0p4PjkcI+4VdBm6Qk8nhWLm6 =buk8 -----END PGP SIGNATURE----- --UHIpmL4a+UjiyldO-- From owner-svn-src-head@FreeBSD.ORG Mon May 10 15:18:04 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 131671065674; Mon, 10 May 2010 15:18:04 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 02A788FC19; Mon, 10 May 2010 15:18:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4AFI3cA089509; Mon, 10 May 2010 15:18:03 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4AFI3MP089507; Mon, 10 May 2010 15:18:03 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201005101518.o4AFI3MP089507@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 10 May 2010 15:18:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207847 - head/sys/fs/procfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 May 2010 15:18:04 -0000 Author: kib Date: Mon May 10 15:18:03 2010 New Revision: 207847 URL: http://svn.freebsd.org/changeset/base/207847 Log: For detach procfs ctl command, also clear P_STOPPED_TRACE process stop flag, and for each thread, TDB_SUSPEND debug flag, same as it is done by exit1() for orphaned debugee. Approved by: des (procfs maintainer) MFC after: 1 week Modified: head/sys/fs/procfs/procfs_ctl.c Modified: head/sys/fs/procfs/procfs_ctl.c ============================================================================== --- head/sys/fs/procfs/procfs_ctl.c Mon May 10 11:53:40 2010 (r207846) +++ head/sys/fs/procfs/procfs_ctl.c Mon May 10 15:18:03 2010 (r207847) @@ -110,6 +110,7 @@ static int procfs_control(struct thread *td, struct proc *p, int op) { int error = 0; + struct thread *temp; /* * Attach - attaches the target process for debugging @@ -212,10 +213,12 @@ out: } /* not being traced any more */ - p->p_flag &= ~P_TRACED; + p->p_flag &= ~(P_TRACED | P_STOPPED_TRACE); /* remove pending SIGTRAP, else the process will die */ sigqueue_delete_proc(p, SIGTRAP); + FOREACH_THREAD_IN_PROC(p, temp) + temp->td_dbgflags &= ~TDB_SUSPEND; PROC_UNLOCK(p); /* give process back to original parent */ From owner-svn-src-head@FreeBSD.ORG Mon May 10 15:19:13 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 02DC6106566B; Mon, 10 May 2010 15:19:13 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id E6B048FC19; Mon, 10 May 2010 15:19:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4AFJCAD089806; Mon, 10 May 2010 15:19:12 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4AFJCeQ089804; Mon, 10 May 2010 15:19:12 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201005101519.o4AFJCeQ089804@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 10 May 2010 15:19:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207848 - head/sys/fs/procfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 May 2010 15:19:13 -0000 Author: kib Date: Mon May 10 15:19:12 2010 New Revision: 207848 URL: http://svn.freebsd.org/changeset/base/207848 Log: The thread_unsuspend() requires both process mutex and process spinlock locked. Postpone the process unlock till the thread_unsuspend() is called. Approved by: des (procfs maintainer) MFC after: 1 week Modified: head/sys/fs/procfs/procfs_ctl.c Modified: head/sys/fs/procfs/procfs_ctl.c ============================================================================== --- head/sys/fs/procfs/procfs_ctl.c Mon May 10 15:18:03 2010 (r207847) +++ head/sys/fs/procfs/procfs_ctl.c Mon May 10 15:19:12 2010 (r207848) @@ -236,7 +236,6 @@ out: PROC_LOCK(p); p->p_oppid = 0; p->p_flag &= ~P_WAITED; /* XXX ? */ - PROC_UNLOCK(p); sx_xunlock(&proctree_lock); wakeup(td->td_proc); /* XXX for CTL_WAIT below ? */ @@ -249,9 +248,10 @@ out: */ case PROCFS_CTL_STEP: error = proc_sstep(FIRST_THREAD_IN_PROC(p)); - PROC_UNLOCK(p); - if (error) + if (error) { + PROC_UNLOCK(p); return (error); + } break; /* @@ -260,7 +260,6 @@ out: */ case PROCFS_CTL_RUN: p->p_flag &= ~P_STOPPED_SIG; /* this uses SIGSTOP */ - PROC_UNLOCK(p); break; /* @@ -292,6 +291,7 @@ out: PROC_SLOCK(p); thread_unsuspend(p); /* If it can run, let it do so. */ PROC_SUNLOCK(p); + PROC_UNLOCK(p); return (0); } From owner-svn-src-head@FreeBSD.ORG Mon May 10 15:28:45 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 428DB106564A; Mon, 10 May 2010 15:28:45 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 304E78FC0C; Mon, 10 May 2010 15:28:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4AFSjY3091922; Mon, 10 May 2010 15:28:45 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4AFSiMx091913; Mon, 10 May 2010 15:28:44 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201005101528.o4AFSiMx091913@svn.freebsd.org> From: Martin Matuska Date: Mon, 10 May 2010 15:28:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207849 - in head: . lib/libarchive rescue/rescue usr.bin/ar usr.bin/cpio usr.bin/cpio/test usr.bin/tar usr.bin/tar/test X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 May 2010 15:28:45 -0000 Author: mm Date: Mon May 10 15:28:44 2010 New Revision: 207849 URL: http://svn.freebsd.org/changeset/base/207849 Log: Enable liblzma support in libarchive Adjust dependencies for programs using libarchive Add xz and linkage against liblzma to rescue system Approved by: kientzle, delphij (mentor) MFC after: 2 weeks Modified: head/Makefile.inc1 head/lib/libarchive/Makefile head/rescue/rescue/Makefile head/usr.bin/ar/Makefile head/usr.bin/cpio/Makefile head/usr.bin/cpio/test/Makefile head/usr.bin/tar/Makefile head/usr.bin/tar/test/Makefile Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Mon May 10 15:19:12 2010 (r207848) +++ head/Makefile.inc1 Mon May 10 15:28:44 2010 (r207849) @@ -1113,7 +1113,7 @@ _prebuild_libs= ${_kerberos5_lib_libasn1 lib/libbz2 lib/libcom_err lib/libcrypt \ lib/libexpat lib/libfetch \ ${_lib_libgssapi} ${_lib_libipx} \ - lib/libkiconv lib/libkvm lib/libmd \ + lib/libkiconv lib/libkvm lib/liblzma lib/libmd \ lib/ncurses/ncurses lib/ncurses/ncursesw \ lib/libopie lib/libpam ${_lib_libthr} \ lib/libradius lib/libsbuf lib/libtacplus \ Modified: head/lib/libarchive/Makefile ============================================================================== --- head/lib/libarchive/Makefile Mon May 10 15:19:12 2010 (r207848) +++ head/lib/libarchive/Makefile Mon May 10 15:28:44 2010 (r207849) @@ -2,8 +2,8 @@ .include LIB= archive -DPADD= ${LIBBZ2} ${LIBZ} ${LIBMD} -LDADD= -lbz2 -lz -lmd +DPADD= ${LIBBZ2} ${LIBZ} ${LIBMD} ${LIBLZMA} +LDADD= -lbz2 -lz -lmd -llzma # FreeBSD SHLIB_MAJOR value is managed as part of the FreeBSD system. # It has no real relation to the libarchive version number. @@ -11,10 +11,7 @@ SHLIB_MAJOR= 5 CFLAGS+= -DPLATFORM_CONFIG_H=\"config_freebsd.h\" CFLAGS+= -I${.OBJDIR} -#Uncomment to build with full lzma/xz support via liblzma -#liblzma is not (yet?) part of the FreeBSD base system -#CFLAGS+= -I/usr/local/include -DHAVE_LIBLZMA=1 -DHAVE_LZMA_H=1 -#LDADD+= -L/usr/local/lib -llzma +CFLAGS+= -DHAVE_LIBLZMA=1 -DHAVE_LZMA_H=1 .if ${MK_OPENSSL} != "no" CFLAGS+= -DWITH_OPENSSL Modified: head/rescue/rescue/Makefile ============================================================================== --- head/rescue/rescue/Makefile Mon May 10 15:19:12 2010 (r207848) +++ head/rescue/rescue/Makefile Mon May 10 15:28:44 2010 (r207849) @@ -208,6 +208,10 @@ CRUNCH_PROGS_usr.bin+= bzip2 CRUNCH_ALIAS_bzip2= bunzip2 bzcat CRUNCH_LIBS+= -lbz2 +CRUNCH_PROGS_usr.bin+= xz +CRUNCH_ALIAS_xz= unxz lzma unlzma xzcat lzcat +CRUNCH_LIBS+= -llzma + CRUNCH_PROGS_usr.bin+= tar CRUNCH_LIBS+= -larchive -lmd .if ${MK_OPENSSL} != "no" Modified: head/usr.bin/ar/Makefile ============================================================================== --- head/usr.bin/ar/Makefile Mon May 10 15:19:12 2010 (r207848) +++ head/usr.bin/ar/Makefile Mon May 10 15:28:44 2010 (r207849) @@ -3,8 +3,8 @@ PROG= ar SRCS= ar.c acplex.l acpyacc.y read.c util.c write.c y.tab.h -DPADD= ${LIBARCHIVE} ${LIBBZ2} ${LIBZ} ${LIBELF} -LDADD= -larchive -lbz2 -lz -lelf +DPADD= ${LIBARCHIVE} ${LIBBZ2} ${LIBZ} ${LIBLZMA} ${LIBELF} +LDADD= -larchive -lbz2 -lz -llzma -lelf CFLAGS+=-I. -I${.CURDIR} Modified: head/usr.bin/cpio/Makefile ============================================================================== --- head/usr.bin/cpio/Makefile Mon May 10 15:19:12 2010 (r207848) +++ head/usr.bin/cpio/Makefile Mon May 10 15:28:44 2010 (r207849) @@ -12,8 +12,8 @@ CFLAGS+= -DPLATFORM_CONFIG_H=\"config_fr # statically linked, cannot use -lcrypto, and are size sensitive. CFLAGS+= -DSMALLER .endif -DPADD= ${LIBARCHIVE} ${LIBZ} ${LIBBZ2} ${LIBMD} -LDADD= -larchive -lz -lbz2 -lmd +DPADD= ${LIBARCHIVE} ${LIBZ} ${LIBBZ2} ${LIBMD} ${LIBLZMA} +LDADD= -larchive -lz -lbz2 -lmd -llzma .if ${MK_OPENSSL} != "no" DPADD+= ${LIBCRYPTO} LDADD+= -lcrypto Modified: head/usr.bin/cpio/test/Makefile ============================================================================== --- head/usr.bin/cpio/test/Makefile Mon May 10 15:19:12 2010 (r207848) +++ head/usr.bin/cpio/test/Makefile Mon May 10 15:28:44 2010 (r207849) @@ -42,10 +42,10 @@ CLEANFILES+= list.h bsdcpio_test NO_MAN=yes PROG=bsdcpio_test -DPADD=${LIBARCHIVE} ${LIBBZ2} ${LIBZ} +DPADD=${LIBARCHIVE} ${LIBBZ2} ${LIBZ} ${LIBLZMA} CFLAGS+= -DPLATFORM_CONFIG_H=\"config_freebsd.h\" CFLAGS+= -I.. -LDADD= -larchive -lz -lbz2 +LDADD= -larchive -lz -lbz2 -llzma CFLAGS+= -static -g -O2 -Wall CFLAGS+= -I${.OBJDIR} CFLAGS+= -I${CPIO_SRCDIR} Modified: head/usr.bin/tar/Makefile ============================================================================== --- head/usr.bin/tar/Makefile Mon May 10 15:19:12 2010 (r207848) +++ head/usr.bin/tar/Makefile Mon May 10 15:28:44 2010 (r207849) @@ -15,8 +15,8 @@ SRCS= bsdtar.c \ tree.c \ util.c \ write.c -DPADD= ${LIBARCHIVE} ${LIBBZ2} ${LIBZ} ${LIBMD} -LDADD= -larchive -lbz2 -lz -lmd +DPADD= ${LIBARCHIVE} ${LIBBZ2} ${LIBZ} ${LIBMD} ${LIBLZMA} +LDADD= -larchive -lbz2 -lz -lmd -llzma .if ${MK_OPENSSL} != "no" DPADD+= ${LIBCRYPTO} LDADD+= -lcrypto Modified: head/usr.bin/tar/test/Makefile ============================================================================== --- head/usr.bin/tar/test/Makefile Mon May 10 15:19:12 2010 (r207848) +++ head/usr.bin/tar/test/Makefile Mon May 10 15:28:44 2010 (r207849) @@ -34,10 +34,10 @@ CLEANFILES+= list.h NO_MAN=yes PROG=bsdtar_test -DPADD=${LIBARCHIVE} ${LIBBZ2} ${LIBZ} +DPADD=${LIBARCHIVE} ${LIBBZ2} ${LIBZ} ${LIBLZMA} CFLAGS+= -DPLATFORM_CONFIG_H=\"config_freebsd.h\" CFLAGS+= -I.. -LDADD= -larchive -lz -lbz2 +LDADD= -larchive -lz -lbz2 -llzma CFLAGS+= -static -g -O2 -Wall CFLAGS+= -I${.OBJDIR} CFLAGS+= -I${TAR_SRCDIR} From owner-svn-src-head@FreeBSD.ORG Mon May 10 17:14:15 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4F97B106566C; Mon, 10 May 2010 17:14:15 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 3E1548FC18; Mon, 10 May 2010 17:14:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4AHEFns015082; Mon, 10 May 2010 17:14:15 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4AHEFuu015079; Mon, 10 May 2010 17:14:15 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201005101714.o4AHEFuu015079@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 10 May 2010 17:14:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207851 - head/sys/dev/sge X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 May 2010 17:14:15 -0000 Author: yongari Date: Mon May 10 17:14:14 2010 New Revision: 207851 URL: http://svn.freebsd.org/changeset/base/207851 Log: Implement TSO and TSO over VLAN. Increase number of allowed fragmentation of mbuf chain to 32 from 16 because TSO can send 64KB sized packet which in turn requires long list of mbuf chain. Due to lack of documentation, I'm not sure whether driver have to pull up ethernet/IP/TCP header with options to make controller work but driver have to parse TCP header to update pseudo TCP checksum anyway. The controller expects pseudo TCP checksum computed by upper stack and the checksum should follow the MS NDIS specification to make TSO work. Tested by: xclin cs dot nctu dot edu dot tw > Modified: head/sys/dev/sge/if_sge.c head/sys/dev/sge/if_sgereg.h Modified: head/sys/dev/sge/if_sge.c ============================================================================== --- head/sys/dev/sge/if_sge.c Mon May 10 16:35:13 2010 (r207850) +++ head/sys/dev/sge/if_sge.c Mon May 10 17:14:14 2010 (r207851) @@ -72,8 +72,13 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include +#include +#include + #include -#include +#include #include #include @@ -620,8 +625,8 @@ sge_attach(device_t dev) ifp->if_snd.ifq_drv_maxlen = SGE_TX_RING_CNT - 1; IFQ_SET_MAXLEN(&ifp->if_snd, ifp->if_snd.ifq_drv_maxlen); IFQ_SET_READY(&ifp->if_snd); - ifp->if_capabilities = IFCAP_TXCSUM | IFCAP_RXCSUM; - ifp->if_hwassist = SGE_CSUM_FEATURES; + ifp->if_capabilities = IFCAP_TXCSUM | IFCAP_RXCSUM | IFCAP_TSO4; + ifp->if_hwassist = SGE_CSUM_FEATURES | CSUM_TSO; ifp->if_capenable = ifp->if_capabilities; /* * Do MII setup. @@ -641,7 +646,7 @@ sge_attach(device_t dev) /* VLAN setup. */ if ((sc->sge_flags & SGE_FLAG_SIS190) == 0) ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING | - IFCAP_VLAN_HWCSUM; + IFCAP_VLAN_HWCSUM | IFCAP_VLAN_HWTSO; ifp->if_capabilities |= IFCAP_VLAN_MTU; ifp->if_capenable = ifp->if_capabilities; /* Tell the upper layer(s) we support long frames. */ @@ -851,8 +856,8 @@ sge_dma_alloc(struct sge_softc *sc) /* Create DMA tag for Tx buffers. */ error = bus_dma_tag_create(cd->sge_tag, 1, 0, BUS_SPACE_MAXADDR, - BUS_SPACE_MAXADDR, NULL, NULL, MCLBYTES * SGE_MAXTXSEGS, - SGE_MAXTXSEGS, MCLBYTES, 0, NULL, NULL, &cd->sge_txmbuf_tag); + BUS_SPACE_MAXADDR, NULL, NULL, SGE_TSO_MAXSIZE, SGE_MAXTXSEGS, + SGE_TSO_MAXSEGSIZE, 0, NULL, NULL, &cd->sge_txmbuf_tag); if (error != 0) { device_printf(sc->sge_dev, "could not create Tx mbuf DMA tag.\n"); @@ -1424,13 +1429,73 @@ sge_encap(struct sge_softc *sc, struct m struct sge_desc *desc; struct sge_txdesc *txd; bus_dma_segment_t txsegs[SGE_MAXTXSEGS]; - uint32_t cflags; + uint32_t cflags, mss; int error, i, nsegs, prod, si; SGE_LOCK_ASSERT(sc); si = prod = sc->sge_cdata.sge_tx_prod; txd = &sc->sge_cdata.sge_txdesc[prod]; + if (((*m_head)->m_pkthdr.csum_flags & CSUM_TSO) != 0) { + struct ether_header *eh; + struct ip *ip; + struct tcphdr *tcp; + uint32_t ip_off, poff; + + if (M_WRITABLE(*m_head) == 0) { + /* Get a writable copy. */ + m = m_dup(*m_head, M_DONTWAIT); + m_freem(*m_head); + if (m == NULL) { + *m_head = NULL; + return (ENOBUFS); + } + *m_head = m; + } + ip_off = sizeof(struct ether_header); + m = m_pullup(*m_head, ip_off); + if (m == NULL) { + *m_head = NULL; + return (ENOBUFS); + } + eh = mtod(m, struct ether_header *); + /* Check the existence of VLAN tag. */ + if (eh->ether_type == htons(ETHERTYPE_VLAN)) { + ip_off = sizeof(struct ether_vlan_header); + m = m_pullup(m, ip_off); + if (m == NULL) { + *m_head = NULL; + return (ENOBUFS); + } + } + m = m_pullup(m, ip_off + sizeof(struct ip)); + if (m == NULL) { + *m_head = NULL; + return (ENOBUFS); + } + ip = (struct ip *)(mtod(m, char *) + ip_off); + poff = ip_off + (ip->ip_hl << 2); + m = m_pullup(m, poff + sizeof(struct tcphdr)); + if (m == NULL) { + *m_head = NULL; + return (ENOBUFS); + } + tcp = (struct tcphdr *)(mtod(m, char *) + poff); + m = m_pullup(m, poff + (tcp->th_off << 2)); + if (m == NULL) { + *m_head = NULL; + return (ENOBUFS); + } + /* + * Reset IP checksum and recompute TCP pseudo + * checksum that NDIS specification requires. + */ + ip->ip_sum = 0; + tcp->th_sum = in_pseudo(ip->ip_src.s_addr, ip->ip_dst.s_addr, + htons(IPPROTO_TCP)); + *m_head = m; + } + error = bus_dmamap_load_mbuf_sg(sc->sge_cdata.sge_txmbuf_tag, txd->tx_dmamap, *m_head, txsegs, &nsegs, 0); if (error == EFBIG) { @@ -1462,16 +1527,23 @@ sge_encap(struct sge_softc *sc, struct m m = *m_head; cflags = 0; - if (m->m_pkthdr.csum_flags & CSUM_IP) - cflags |= TDC_IP_CSUM; - if (m->m_pkthdr.csum_flags & CSUM_TCP) - cflags |= TDC_TCP_CSUM; - if (m->m_pkthdr.csum_flags & CSUM_UDP) - cflags |= TDC_UDP_CSUM; + mss = 0; + if ((m->m_pkthdr.csum_flags & CSUM_TSO) != 0) { + cflags |= TDC_LS; + mss = (uint32_t)m->m_pkthdr.tso_segsz; + mss <<= 16; + } else { + if (m->m_pkthdr.csum_flags & CSUM_IP) + cflags |= TDC_IP_CSUM; + if (m->m_pkthdr.csum_flags & CSUM_TCP) + cflags |= TDC_TCP_CSUM; + if (m->m_pkthdr.csum_flags & CSUM_UDP) + cflags |= TDC_UDP_CSUM; + } for (i = 0; i < nsegs; i++) { desc = &sc->sge_ldata.sge_tx_ring[prod]; if (i == 0) { - desc->sge_sts_size = htole32(m->m_pkthdr.len); + desc->sge_sts_size = htole32(m->m_pkthdr.len | mss); desc->sge_cmdsts = 0; } else { desc->sge_sts_size = 0; @@ -1759,6 +1831,17 @@ sge_ioctl(struct ifnet *ifp, u_long comm if ((mask & IFCAP_VLAN_HWCSUM) != 0 && (ifp->if_capabilities & IFCAP_VLAN_HWCSUM) != 0) ifp->if_capenable ^= IFCAP_VLAN_HWCSUM; + if ((mask & IFCAP_TSO4) != 0 && + (ifp->if_capabilities & IFCAP_TSO4) != 0) { + ifp->if_capenable ^= IFCAP_TSO4; + if ((ifp->if_capenable & IFCAP_TSO4) != 0) + ifp->if_hwassist |= CSUM_TSO; + else + ifp->if_hwassist &= ~CSUM_TSO; + } + if ((mask & IFCAP_VLAN_HWTSO) != 0 && + (ifp->if_capabilities & IFCAP_VLAN_HWTSO) != 0) + ifp->if_capenable ^= IFCAP_VLAN_HWTSO; if ((mask & IFCAP_VLAN_HWTAGGING) != 0 && (ifp->if_capabilities & IFCAP_VLAN_HWTAGGING) != 0) { /* @@ -1766,6 +1849,9 @@ sge_ioctl(struct ifnet *ifp, u_long comm * tagging require interface reinitialization. */ ifp->if_capenable ^= IFCAP_VLAN_HWTAGGING; + if ((ifp->if_capenable & IFCAP_VLAN_HWTAGGING) == 0) + ifp->if_capenable &= + ~(IFCAP_VLAN_HWTSO | IFCAP_VLAN_HWCSUM); reinit = 1; } if (reinit > 0 && (ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) { Modified: head/sys/dev/sge/if_sgereg.h ============================================================================== --- head/sys/dev/sge/if_sgereg.h Mon May 10 16:35:13 2010 (r207850) +++ head/sys/dev/sge/if_sgereg.h Mon May 10 17:14:14 2010 (r207851) @@ -283,7 +283,9 @@ struct sge_desc { #define SGE_RX_RING_CNT 256 /* [8, 1024] */ #define SGE_TX_RING_CNT 256 /* [8, 8192] */ #define SGE_DESC_ALIGN 16 -#define SGE_MAXTXSEGS 16 +#define SGE_MAXTXSEGS 32 +#define SGE_TSO_MAXSIZE (65535 + sizeof(struct ether_vlan_header)) +#define SGE_TSO_MAXSEGSIZE 4096 #define SGE_RX_BUF_ALIGN sizeof(uint64_t) #define SGE_RX_RING_SZ (SGE_RX_RING_CNT * sizeof(struct sge_desc)) From owner-svn-src-head@FreeBSD.ORG Mon May 10 17:35:18 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 10D891065675; Mon, 10 May 2010 17:35:18 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id E951D8FC19; Mon, 10 May 2010 17:35:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4AHZHgU019691; Mon, 10 May 2010 17:35:17 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4AHZHxB019689; Mon, 10 May 2010 17:35:17 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201005101735.o4AHZHxB019689@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 10 May 2010 17:35:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207852 - head/sys/dev/sge X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 May 2010 17:35:18 -0000 Author: yongari Date: Mon May 10 17:35:17 2010 New Revision: 207852 URL: http://svn.freebsd.org/changeset/base/207852 Log: SiS190 supports RX 10 bytes padding, CRC stripping as well as VLAN hardware tag insertion/stripping. Remove conditional code that disables these hardware features on SiS190. Also nuke RX fixup code which is no more required on strict-alignment architectures because SiS190 supports RX 10 bytes padding. Now all hardware features except jumbo frame and WOL are supported. Thanks to Masa Murayama who confirmed SiS190 also has the same hardware features of SiS191. I guess the only difference between SiS191 and SiS190 would be jumbo frame support. It will be implemented in near future. Modified: head/sys/dev/sge/if_sge.c Modified: head/sys/dev/sge/if_sge.c ============================================================================== --- head/sys/dev/sge/if_sge.c Mon May 10 17:14:14 2010 (r207851) +++ head/sys/dev/sge/if_sge.c Mon May 10 17:35:17 2010 (r207852) @@ -117,10 +117,6 @@ static void sge_miibus_statchg(device_t) static int sge_newbuf(struct sge_softc *, int); static int sge_encap(struct sge_softc *, struct mbuf **); -#ifndef __NO_STRICT_ALIGNMENT -static __inline void - sge_fixup_rx(struct mbuf *); -#endif static __inline void sge_discard_rxbuf(struct sge_softc *, int); static void sge_rxeof(struct sge_softc *); @@ -644,10 +640,8 @@ sge_attach(device_t dev) ether_ifattach(ifp, eaddr); /* VLAN setup. */ - if ((sc->sge_flags & SGE_FLAG_SIS190) == 0) - ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING | - IFCAP_VLAN_HWCSUM | IFCAP_VLAN_HWTSO; - ifp->if_capabilities |= IFCAP_VLAN_MTU; + ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_HWCSUM | + IFCAP_VLAN_HWTSO | IFCAP_VLAN_MTU; ifp->if_capenable = ifp->if_capabilities; /* Tell the upper layer(s) we support long frames. */ ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header); @@ -1129,23 +1123,6 @@ sge_newbuf(struct sge_softc *sc, int pro return (0); } -#ifndef __NO_STRICT_ALIGNMENT -static __inline void -sge_fixup_rx(struct mbuf *m) -{ - int i; - uint16_t *src, *dst; - - src = mtod(m, uint16_t *); - dst = src - 3; - - for (i = 0; i < (m->m_len / sizeof(uint16_t) + 1); i++) - *dst++ = *src++; - - m->m_data -= (SGE_RX_BUF_ALIGN - ETHER_ALIGN); -} -#endif - static __inline void sge_discard_rxbuf(struct sge_softc *sc, int index) { @@ -1228,23 +1205,15 @@ sge_rxeof(struct sge_softc *sc) m->m_pkthdr.ether_vtag = rxinfo & RDC_VLAN_MASK; m->m_flags |= M_VLANTAG; } - if ((sc->sge_flags & SGE_FLAG_SIS190) == 0) { - /* - * Account for 10bytes auto padding which is used - * to align IP header on 32bit boundary. Also note, - * CRC bytes is automatically removed by the - * hardware. - */ - m->m_data += SGE_RX_PAD_BYTES; - m->m_pkthdr.len = m->m_len = SGE_RX_BYTES(rxstat) - - SGE_RX_PAD_BYTES; - } else { - m->m_pkthdr.len = m->m_len = SGE_RX_BYTES(rxstat) - - ETHER_CRC_LEN; -#ifndef __NO_STRICT_ALIGNMENT - sge_fixup_rx(m); -#endif - } + /* + * Account for 10bytes auto padding which is used + * to align IP header on 32bit boundary. Also note, + * CRC bytes is automatically removed by the + * hardware. + */ + m->m_data += SGE_RX_PAD_BYTES; + m->m_pkthdr.len = m->m_len = SGE_RX_BYTES(rxstat) - + SGE_RX_PAD_BYTES; m->m_pkthdr.rcvif = ifp; ifp->if_ipackets++; SGE_UNLOCK(sc); @@ -1688,18 +1657,13 @@ sge_init_locked(struct sge_softc *sc) CSR_WRITE_4(sc, RxWakeOnLan, 0); CSR_WRITE_4(sc, RxWakeOnLanData, 0); /* Allow receiving VLAN frames. */ - if ((sc->sge_flags & SGE_FLAG_SIS190) == 0) - CSR_WRITE_2(sc, RxMPSControl, - ETHER_MAX_LEN + ETHER_VLAN_ENCAP_LEN + SGE_RX_PAD_BYTES); - else - CSR_WRITE_2(sc, RxMPSControl, ETHER_MAX_LEN + ETHER_VLAN_ENCAP_LEN); + CSR_WRITE_2(sc, RxMPSControl, ETHER_MAX_LEN + ETHER_VLAN_ENCAP_LEN + + SGE_RX_PAD_BYTES); for (i = 0; i < ETHER_ADDR_LEN; i++) CSR_WRITE_1(sc, RxMacAddr + i, IF_LLADDR(ifp)[i]); /* Configure RX MAC. */ - rxfilt = 0; - if ((sc->sge_flags & SGE_FLAG_SIS190) == 0) - rxfilt |= RXMAC_STRIP_FCS | RXMAC_PAD_ENB; + rxfilt = RXMAC_STRIP_FCS | RXMAC_PAD_ENB; CSR_WRITE_2(sc, RxMacControl, rxfilt); sge_rxfilter(sc); sge_setvlan(sc); From owner-svn-src-head@FreeBSD.ORG Mon May 10 17:48:00 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 74747106566B; Mon, 10 May 2010 17:48:00 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 63A948FC12; Mon, 10 May 2010 17:48:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4AHm0Q2022448; Mon, 10 May 2010 17:48:00 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4AHm0OI022446; Mon, 10 May 2010 17:48:00 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201005101748.o4AHm0OI022446@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 10 May 2010 17:48:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207853 - head/share/man/man4 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 May 2010 17:48:00 -0000 Author: yongari Date: Mon May 10 17:48:00 2010 New Revision: 207853 URL: http://svn.freebsd.org/changeset/base/207853 Log: Now sge(4) supports TCP segmentation offload (TSO). Modified: head/share/man/man4/sge.4 Modified: head/share/man/man4/sge.4 ============================================================================== --- head/share/man/man4/sge.4 Mon May 10 17:35:17 2010 (r207852) +++ head/share/man/man4/sge.4 Mon May 10 17:48:00 2010 (r207853) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 29, 2010 +.Dd May 10, 2010 .Dt SGE 4 .Os .Sh NAME @@ -54,9 +54,9 @@ controllers and SiS191 Fast/Gigabit Ethe All LOMs supported by the .Nm driver have TCP/UDP/IP checksum offload for transmit and receive, -hardware VLAN tag stripping/insertion features. -Due to lack of documentation more offloading features like TCP -segmentation offload (TSO), Wake On Lan (WOL), Jumbo frame and an +TCP segmentation offload (TSO), hardware VLAN tag stripping/insertion +features. +Due to lack of documentation Wake On Lan (WOL), Jumbo frame and an interrupt moderation mechanism are not supported yet. .Pp The From owner-svn-src-head@FreeBSD.ORG Mon May 10 18:23:00 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 89A051065670; Mon, 10 May 2010 18:23:00 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 793F68FC16; Mon, 10 May 2010 18:23:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4AIN0hS030228; Mon, 10 May 2010 18:23:00 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4AIN0Ms030226; Mon, 10 May 2010 18:23:00 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201005101823.o4AIN0Ms030226@svn.freebsd.org> From: Warner Losh Date: Mon, 10 May 2010 18:23:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207854 - head/sys/boot/common X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 May 2010 18:23:00 -0000 Author: imp Date: Mon May 10 18:23:00 2010 New Revision: 207854 URL: http://svn.freebsd.org/changeset/base/207854 Log: Formatting nit Modified: head/sys/boot/common/module.c Modified: head/sys/boot/common/module.c ============================================================================== --- head/sys/boot/common/module.c Mon May 10 17:48:00 2010 (r207853) +++ head/sys/boot/common/module.c Mon May 10 18:23:00 2010 (r207854) @@ -295,7 +295,8 @@ file_load(char *filename, vm_offset_t de } static int -file_load_dependencies(struct preloaded_file *base_file) { +file_load_dependencies(struct preloaded_file *base_file) +{ struct file_metadata *md; struct preloaded_file *fp; struct mod_depend *verinfo; From owner-svn-src-head@FreeBSD.ORG Mon May 10 18:33:04 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A273F1065670; Mon, 10 May 2010 18:33:04 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) by mx1.freebsd.org (Postfix) with ESMTP id 1DB538FC1B; Mon, 10 May 2010 18:33:03 +0000 (UTC) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.14.3/8.14.3/ALCHEMY.FRANKEN.DE) with ESMTP id o4AIX273032583; Mon, 10 May 2010 20:33:02 +0200 (CEST) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.14.3/8.14.3/Submit) id o4AIX2YR032582; Mon, 10 May 2010 20:33:02 +0200 (CEST) (envelope-from marius) Date: Mon, 10 May 2010 20:33:02 +0200 From: Marius Strobl To: Attilio Rao Message-ID: <20100510183302.GC43981@alchemy.franken.de> References: <201004192327.o3JNRsK4047856@svn.freebsd.org> <20100509170414.GA35602@alchemy.franken.de> Mime-Version: 1.0 Content-Type: text/plain; charset=unknown-8bit Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r206878 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 May 2010 18:33:04 -0000 On Mon, May 10, 2010 at 12:27:40AM +0200, Attilio Rao wrote: > 2010/5/9 Marius Strobl : > > On Mon, Apr 19, 2010 at 11:27:54PM +0000, Attilio Rao wrote: > >> Author: attilio > >> Date: Mon Apr 19 23:27:54 2010 > >> New Revision: 206878 > >> URL: http://svn.freebsd.org/changeset/base/206878 > >> > >> Log: > >>   Fix a deadlock in the shutdown code: > >>   When performing a smp_rendezvous() or more likely, on amd64 and i386, > >>   a smp_tlb_shootdown() the caller will end up with the smp_ipi_mtx > >>   spinlock held, busy-waiting for other CPUs to acknowledge the operation. > >>   As long as CPUs are suspended (via cpu_reset()) between the active mask > >>   read and IPI sending there can be a deadlock where the caller will wait > >>   forever for a dead CPU to acknowledge the operation. > >>   Please note that on CPU0 that is going to be someway heavier because of > >>   the spinlocks being disabled earlier than quitting the machine. > >> > >>   Fix this bug by calling cpu_reset() with the smp_ipi_mtx held. > >>   Note that it is very likely that a saner offline/online CPUs mechanism > >>   will help heavilly in fixing similar cases as it is likely more bugs > >>   of this type may arise in the future. > >> > > > > This change causes a hang for me when running an SMP kernel on an > > UP machine or an MP machine with SMP disabled as in these cases > > smp_ipi_mtx isn't initialized (see mp_start()). The below patch > > fixes this for me. > > Marius, > thanks a lot for reporting this. > However, I think that a better fix is to always initialize the mutex. > Do you think the following patch is fine for you?: > http://www.freebsd.org/~attilio/smpipi_fixup.diff > Yes, this fixes it as well. Marius From owner-svn-src-head@FreeBSD.ORG Mon May 10 19:08:53 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D5E401065672; Mon, 10 May 2010 19:08:53 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id C5B098FC08; Mon, 10 May 2010 19:08:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4AJ8rDo041567; Mon, 10 May 2010 19:08:53 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4AJ8rZL041565; Mon, 10 May 2010 19:08:53 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201005101908.o4AJ8rZL041565@svn.freebsd.org> From: Jaakko Heinonen Date: Mon, 10 May 2010 19:08:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207877 - head/sys/geom/zero X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 May 2010 19:08:53 -0000 Author: jh Date: Mon May 10 19:08:53 2010 New Revision: 207877 URL: http://svn.freebsd.org/changeset/base/207877 Log: In g_zero_destroy_geom(), return 0 instead of EBUSY in the success case. EBUSY was probably used as a workaround for the deadlock fixed in r207671. Approved by: pjd X-MFC after: r207671 Modified: head/sys/geom/zero/g_zero.c Modified: head/sys/geom/zero/g_zero.c ============================================================================== --- head/sys/geom/zero/g_zero.c Mon May 10 19:02:22 2010 (r207876) +++ head/sys/geom/zero/g_zero.c Mon May 10 19:08:53 2010 (r207877) @@ -104,7 +104,7 @@ g_zero_destroy_geom(struct gctl_req *req if (pp->acr > 0 || pp->acw > 0 || pp->ace > 0) return (EBUSY); g_wither_geom(gp, ENXIO); - return (EBUSY); + return (0); } static struct g_class g_zero_class = { From owner-svn-src-head@FreeBSD.ORG Mon May 10 19:12:24 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 41E7E1065678; Mon, 10 May 2010 19:12:24 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 313658FC25; Mon, 10 May 2010 19:12:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4AJCOrX042397; Mon, 10 May 2010 19:12:24 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4AJCOFX042392; Mon, 10 May 2010 19:12:24 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201005101912.o4AJCOFX042392@svn.freebsd.org> From: Jaakko Heinonen Date: Mon, 10 May 2010 19:12:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207878 - head/sys/geom/vinum X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 May 2010 19:12:24 -0000 Author: jh Date: Mon May 10 19:12:23 2010 New Revision: 207878 URL: http://svn.freebsd.org/changeset/base/207878 Log: - Don't return EAGAIN from gv_unload(). It was used to work around the deadlock fixed in r207671. - Wait for worker process to exit at class unload. The worker process was not guaranteed to exit before the linker unloaded the module. - Use 0 as the worker process exit status instead of ENXIO and style the NOTREACHED comment. Reviewed by: lulf X-MFC after: r207671 Modified: head/sys/geom/vinum/geom_vinum.c head/sys/geom/vinum/geom_vinum.h head/sys/geom/vinum/geom_vinum_events.c head/sys/geom/vinum/geom_vinum_var.h Modified: head/sys/geom/vinum/geom_vinum.c ============================================================================== --- head/sys/geom/vinum/geom_vinum.c Mon May 10 19:08:53 2010 (r207877) +++ head/sys/geom/vinum/geom_vinum.c Mon May 10 19:12:23 2010 (r207878) @@ -186,7 +186,7 @@ gv_init(struct g_class *mp) mtx_init(&sc->config_mtx, "gv_config", NULL, MTX_DEF); mtx_init(&sc->equeue_mtx, "gv_equeue", NULL, MTX_DEF); mtx_init(&sc->bqueue_mtx, "gv_bqueue", NULL, MTX_DEF); - kproc_create(gv_worker, sc, NULL, 0, 0, "gv_worker"); + kproc_create(gv_worker, sc, &sc->worker, 0, 0, "gv_worker"); } static int @@ -200,10 +200,9 @@ gv_unload(struct gctl_req *req, struct g sc = gp->softc; if (sc != NULL) { - gv_post_event(sc, GV_EVENT_THREAD_EXIT, NULL, NULL, 0, 0); + gv_worker_exit(sc); gp->softc = NULL; g_wither_geom(gp, ENXIO); - return (EAGAIN); } return (0); @@ -984,8 +983,8 @@ gv_worker(void *arg) g_free(sc->bqueue_down); g_free(sc->bqueue_up); g_free(sc); - kproc_exit(ENXIO); - break; /* not reached */ + kproc_exit(0); + /* NOTREACHED */ default: G_VINUM_DEBUG(1, "unknown event %d", ev->type); Modified: head/sys/geom/vinum/geom_vinum.h ============================================================================== --- head/sys/geom/vinum/geom_vinum.h Mon May 10 19:08:53 2010 (r207877) +++ head/sys/geom/vinum/geom_vinum.h Mon May 10 19:12:23 2010 (r207878) @@ -122,6 +122,7 @@ int gv_detach_sd(struct gv_sd *, int) void gv_worker(void *); void gv_post_event(struct gv_softc *, int, void *, void *, intmax_t, intmax_t); +void gv_worker_exit(struct gv_softc *); struct gv_event *gv_get_event(struct gv_softc *); void gv_remove_event(struct gv_softc *, struct gv_event *); void gv_drive_tasted(struct gv_softc *, struct g_provider *); Modified: head/sys/geom/vinum/geom_vinum_events.c ============================================================================== --- head/sys/geom/vinum/geom_vinum_events.c Mon May 10 19:08:53 2010 (r207877) +++ head/sys/geom/vinum/geom_vinum_events.c Mon May 10 19:12:23 2010 (r207878) @@ -58,6 +58,20 @@ gv_post_event(struct gv_softc *sc, int e mtx_unlock(&sc->equeue_mtx); } +void +gv_worker_exit(struct gv_softc *sc) +{ + struct gv_event *ev; + + ev = g_malloc(sizeof(*ev), M_WAITOK | M_ZERO); + ev->type = GV_EVENT_THREAD_EXIT; + + mtx_lock(&sc->equeue_mtx); + TAILQ_INSERT_TAIL(&sc->equeue, ev, events); + wakeup(sc); + msleep(sc->worker, &sc->equeue_mtx, PDROP, "gv_wor", 0); +} + struct gv_event * gv_get_event(struct gv_softc *sc) { Modified: head/sys/geom/vinum/geom_vinum_var.h ============================================================================== --- head/sys/geom/vinum/geom_vinum_var.h Mon May 10 19:08:53 2010 (r207877) +++ head/sys/geom/vinum/geom_vinum_var.h Mon May 10 19:12:23 2010 (r207878) @@ -238,6 +238,7 @@ struct gv_softc { struct bio_queue_head *bqueue_up; /* BIO queue for completed requests. */ struct g_geom *geom; /* Pointer to our VINUM geom. */ + struct proc *worker; /* Worker process. */ }; #endif From owner-svn-src-head@FreeBSD.ORG Mon May 10 20:02:40 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 54DB6106566C; Mon, 10 May 2010 20:02:40 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 0C3B18FC19; Mon, 10 May 2010 20:02:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4AK2dmd053956; Mon, 10 May 2010 20:02:39 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4AK2dJ4053954; Mon, 10 May 2010 20:02:39 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201005102002.o4AK2dJ4053954@svn.freebsd.org> From: Marius Strobl Date: Mon, 10 May 2010 20:02:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207885 - head/sys/dev/esp X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 May 2010 20:02:40 -0000 Author: marius Date: Mon May 10 20:02:39 2010 New Revision: 207885 URL: http://svn.freebsd.org/changeset/base/207885 Log: Include for OF_getscsinitid(). Modified: head/sys/dev/esp/esp_sbus.c Modified: head/sys/dev/esp/esp_sbus.c ============================================================================== --- head/sys/dev/esp/esp_sbus.c Mon May 10 20:01:51 2010 (r207884) +++ head/sys/dev/esp/esp_sbus.c Mon May 10 20:02:39 2010 (r207885) @@ -79,6 +79,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include From owner-svn-src-head@FreeBSD.ORG Mon May 10 21:02:17 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 30F1C106566C; Mon, 10 May 2010 21:02:17 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 2049A8FC16; Mon, 10 May 2010 21:02:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4AL2HXD068009; Mon, 10 May 2010 21:02:17 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4AL2GWx068006; Mon, 10 May 2010 21:02:16 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201005102102.o4AL2GWx068006@svn.freebsd.org> From: Edwin Groothuis Date: Mon, 10 May 2010 21:02:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207898 - head/contrib/tzdata X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 May 2010 21:02:17 -0000 Author: edwin Date: Mon May 10 21:02:16 2010 New Revision: 207898 URL: http://svn.freebsd.org/changeset/base/207898 Log: MFV of tzdata2010j, r207896 - Bahia de Banderas (Mexican state of Nayarit) changed time zone UTC-7 to new time zone UTC-6 on April 4, 2010 (to share the same time zone as nearby city Puerto Vallarta, Jalisco). Obtained from: ftp://elsie.nci.nih.gov/pub/ Modified: head/contrib/tzdata/northamerica head/contrib/tzdata/zone.tab Directory Properties: head/contrib/tzdata/ (props changed) Modified: head/contrib/tzdata/northamerica ============================================================================== --- head/contrib/tzdata/northamerica Mon May 10 20:56:57 2010 (r207897) +++ head/contrib/tzdata/northamerica Mon May 10 21:02:16 2010 (r207898) @@ -1,5 +1,5 @@ #
-# @(#)northamerica	8.30
+# @(#)northamerica	8.31
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -2089,7 +2089,44 @@ Zone America/Hermosillo	-7:23:52 -	LMT	1
 			-8:00	-	PST	1970
 			-7:00	Mexico	M%sT	1999
 			-7:00	-	MST
+
+# From Alexander Krivenyshev (2010-04-21):
+# According to news, Bahía de Banderas (Mexican state of Nayarit)
+# changed time zone UTC-7 to new time zone UTC-6 on April 4, 2010 (to
+# share the same time zone as nearby city Puerto Vallarta, Jalisco).
+#
+# (Spanish)
+# Bahía de Banderas homologa su horario al del centro del
+# país, a partir de este domingo
+# 
+# http://www.nayarit.gob.mx/notes.asp?id=20748
+# 
+#
+# Bahía de Banderas homologa su horario con el del Centro del
+# País
+# 
+# http://www.bahiadebanderas.gob.mx/principal/index.php?option=com_content&view=article&id=261:bahia-de-banderas-homologa-su-horario-con-el-del-centro-del-pais&catid=42:comunicacion-social&Itemid=50"
+# 
+#
+# (English)
+# Puerto Vallarta and Bahía de Banderas: One Time Zone
+# 
+# http://virtualvallarta.com/puertovallarta/puertovallarta/localnews/2009-12-03-Puerto-Vallarta-and-Bahia-de-Banderas-One-Time-Zone.shtml
+# 
+#
+# or
+# 
+# http://www.worldtimezone.com/dst_news/dst_news_mexico08.html
+# 
+#
+# "Mexico's Senate approved the amendments to the Mexican Schedule System that
+# will allow Bahía de Banderas and Puerto Vallarta to share the same time
+# zone ..."
 # Baja California Sur, Nayarit, Sinaloa
+
+# From Arthur David Olson (2010-05-01):
+# Use "Bahia_Banderas" to keep the name to fourteen characters.
+
 Zone America/Mazatlan	-7:05:40 -	LMT	1921 Dec 31 23:54:20
 			-7:00	-	MST	1927 Jun 10 23:00
 			-6:00	-	CST	1930 Nov 15
@@ -2100,6 +2137,19 @@ Zone America/Mazatlan	-7:05:40 -	LMT	192
 			-7:00	-	MST	1949 Jan 14
 			-8:00	-	PST	1970
 			-7:00	Mexico	M%sT
+
+Zone America/Bahia_Banderas	-7:01:00 -	LMT	1921 Dec 31 23:59:00
+			-7:00	-	MST	1927 Jun 10 23:00
+			-6:00	-	CST	1930 Nov 15
+			-7:00	-	MST	1931 May  1 23:00
+			-6:00	-	CST	1931 Oct
+			-7:00	-	MST	1932 Apr  1
+			-6:00	-	CST	1942 Apr 24
+			-7:00	-	MST	1949 Jan 14
+			-8:00	-	PST	1970
+			-7:00	Mexico	M%sT	2010 Apr 4
+			-6:00	Mexico	C%sT
+
 # Baja California (near US border)
 Zone America/Tijuana	-7:48:04 -	LMT	1922 Jan  1  0:11:56
 			-7:00	-	MST	1924

Modified: head/contrib/tzdata/zone.tab
==============================================================================
--- head/contrib/tzdata/zone.tab	Mon May 10 20:56:57 2010	(r207897)
+++ head/contrib/tzdata/zone.tab	Mon May 10 21:02:16 2010	(r207898)
@@ -1,5 +1,5 @@
 # 
-# @(#)zone.tab	8.35
+# @(#)zone.tab	8.36
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 #
@@ -288,6 +288,7 @@ MX	+2934-10425	America/Ojinaga	US Mounta
 MX	+2904-11058	America/Hermosillo	Mountain Standard Time - Sonora
 MX	+3232-11701	America/Tijuana	US Pacific Time - Baja California near US border
 MX	+3018-11452	America/Santa_Isabel	Mexican Pacific Time - Baja California away from US border
+MX	+2048-10515	America/Bahia_Banderas	Mexican Central Time - Bahia de Banderas
 MY	+0310+10142	Asia/Kuala_Lumpur	peninsular Malaysia
 MY	+0133+11020	Asia/Kuching	Sabah & Sarawak
 MZ	-2558+03235	Africa/Maputo

From owner-svn-src-head@FreeBSD.ORG  Mon May 10 21:31:21 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 285CB1065672;
	Mon, 10 May 2010 21:31:21 +0000 (UTC)
	(envelope-from kmacy@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44])
	by mx1.freebsd.org (Postfix) with ESMTP id 18ECF8FC0C;
	Mon, 10 May 2010 21:31:21 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4ALVK11074550;
	Mon, 10 May 2010 21:31:20 GMT (envelope-from kmacy@svn.freebsd.org)
Received: (from kmacy@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4ALVKmg074548;
	Mon, 10 May 2010 21:31:20 GMT (envelope-from kmacy@svn.freebsd.org)
Message-Id: <201005102131.o4ALVKmg074548@svn.freebsd.org>
From: Kip Macy 
Date: Mon, 10 May 2010 21:31:20 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r207902 - head/sys/netinet6
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 10 May 2010 21:31:21 -0000

Author: kmacy
Date: Mon May 10 21:31:20 2010
New Revision: 207902
URL: http://svn.freebsd.org/changeset/base/207902

Log:
  boot time size the flowtable
  
  MFC after:	3 days

Modified:
  head/sys/netinet6/ip6_input.c

Modified: head/sys/netinet6/ip6_input.c
==============================================================================
--- head/sys/netinet6/ip6_input.c	Mon May 10 21:04:45 2010	(r207901)
+++ head/sys/netinet6/ip6_input.c	Mon May 10 21:31:20 2010	(r207902)
@@ -177,9 +177,21 @@ ip6_init(void)
 	frag6_init();
 
 #ifdef FLOWTABLE
- 	TUNABLE_INT_FETCH("net.inet6.ip6.output_flowtable_size",
- 	    &V_ip6_output_flowtable_size);
- 	V_ip6_ft = flowtable_alloc("ipv6", V_ip6_output_flowtable_size, FL_PCPU);
+	if (TUNABLE_INT_FETCH("net.inet6.ip6.output_flowtable_size",
+		&V_ip6_output_flowtable_size)) {
+		if (V_ip6_output_flowtable_size < 256)
+			V_ip6_output_flowtable_size = 256;
+		if (!powerof2(V_ip6_output_flowtable_size)) {
+			printf("flowtable must be power of 2 size\n");
+			V_ip6_output_flowtable_size = 2048;
+		}
+	} else {
+		/*
+		 * round up to the next power of 2
+		 */
+		V_ip6_output_flowtable_size = 1 << fls((1024 + maxusers * 64)-1);
+	}
+	V_ip6_ft = flowtable_alloc("ipv6", V_ip6_output_flowtable_size, FL_PCPU);
 #endif	
 	
 	V_ip6_desync_factor = arc4random() % MAX_TEMP_DESYNC_FACTOR;

From owner-svn-src-head@FreeBSD.ORG  Tue May 11 01:29:19 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 4AB30106564A;
	Tue, 11 May 2010 01:29:19 +0000 (UTC) (envelope-from alc@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44])
	by mx1.freebsd.org (Postfix) with ESMTP id 3B53C8FC1C;
	Tue, 11 May 2010 01:29:19 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4B1TJDO026535;
	Tue, 11 May 2010 01:29:19 GMT (envelope-from alc@svn.freebsd.org)
Received: (from alc@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4B1TJEk026533;
	Tue, 11 May 2010 01:29:19 GMT (envelope-from alc@svn.freebsd.org)
Message-Id: <201005110129.o4B1TJEk026533@svn.freebsd.org>
From: Alan Cox 
Date: Tue, 11 May 2010 01:29:19 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r207905 - head/sys/vm
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 11 May 2010 01:29:19 -0000

Author: alc
Date: Tue May 11 01:29:18 2010
New Revision: 207905
URL: http://svn.freebsd.org/changeset/base/207905

Log:
  Update synchronization annotations for struct vm_page.  Add a comment
  explaining how the setting of PG_WRITEABLE is synchronized.

Modified:
  head/sys/vm/vm_page.h

Modified: head/sys/vm/vm_page.h
==============================================================================
--- head/sys/vm/vm_page.h	Mon May 10 22:21:08 2010	(r207904)
+++ head/sys/vm/vm_page.h	Tue May 11 01:29:18 2010	(r207905)
@@ -112,7 +112,7 @@ struct vm_page {
 	u_short	flags;			/* see below */
 	uint8_t	order;			/* index of the buddy queue */
 	uint8_t pool;
-	u_short cow;			/* page cow mapping count (Q) */
+	u_short cow;			/* page cow mapping count (P) */
 	u_int wire_count;		/* wired down maps refs (P) */
 	short hold_count;		/* page hold count (P) */
 	u_short oflags;			/* page flags (O) */
@@ -122,16 +122,16 @@ struct vm_page {
 	/* so, on normal X86 kernels, they must be at least 8 bits wide */
 #if PAGE_SIZE == 4096
 	u_char	valid;			/* map of valid DEV_BSIZE chunks (O) */
-	u_char	dirty;			/* map of dirty DEV_BSIZE chunks */
+	u_char	dirty;			/* map of dirty DEV_BSIZE chunks (O) */
 #elif PAGE_SIZE == 8192
 	u_short	valid;			/* map of valid DEV_BSIZE chunks (O) */
-	u_short	dirty;			/* map of dirty DEV_BSIZE chunks */
+	u_short	dirty;			/* map of dirty DEV_BSIZE chunks (O) */
 #elif PAGE_SIZE == 16384
 	u_int valid;			/* map of valid DEV_BSIZE chunks (O) */
-	u_int dirty;			/* map of dirty DEV_BSIZE chunks */
+	u_int dirty;			/* map of dirty DEV_BSIZE chunks (O) */
 #elif PAGE_SIZE == 32768
 	u_long valid;			/* map of valid DEV_BSIZE chunks (O) */
-	u_long dirty;			/* map of dirty DEV_BSIZE chunks */
+	u_long dirty;			/* map of dirty DEV_BSIZE chunks (O) */
 #endif
 };
 
@@ -216,6 +216,9 @@ extern struct vpglocks pa_lock[];
  *	 via the object/vm_page_t because there is no knowledge of their
  *	 pte mappings, nor can they be removed from their objects via 
  *	 the object, and such pages are also not on any PQ queue.
+ *
+ * PG_WRITEABLE is set exclusively by pmap_enter().  When it does so, either
+ * the page must be VPO_BUSY or the containing object must be locked.
  */
 #define	PG_CACHED	0x0001		/* page is cached */
 #define	PG_FREE		0x0002		/* page is free */

From owner-svn-src-head@FreeBSD.ORG  Tue May 11 07:25:14 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 44CF4106567C;
	Tue, 11 May 2010 07:25:14 +0000 (UTC) (envelope-from mm@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44])
	by mx1.freebsd.org (Postfix) with ESMTP id 342158FC12;
	Tue, 11 May 2010 07:25:14 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4B7PEBA004949;
	Tue, 11 May 2010 07:25:14 GMT (envelope-from mm@svn.freebsd.org)
Received: (from mm@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4B7PEnC004947;
	Tue, 11 May 2010 07:25:14 GMT (envelope-from mm@svn.freebsd.org)
Message-Id: <201005110725.o4B7PEnC004947@svn.freebsd.org>
From: Martin Matuska 
Date: Tue, 11 May 2010 07:25:14 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r207908 -
	head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 11 May 2010 07:25:14 -0000

Author: mm
Date: Tue May 11 07:25:13 2010
New Revision: 207908
URL: http://svn.freebsd.org/changeset/base/207908

Log:
  Fix endianess bug in ZFS intent log (ZIL).
  
  OpenSolaris onnv revision:	8109:6147a1bdd359
  
  Approved by:	pjd, delphij (mentor)
  Obtained from:	OpenSolaris (Bug ID 6760048)
  MFC after:	3 days

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c	Tue May 11 07:07:44 2010	(r207907)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c	Tue May 11 07:25:13 2010	(r207908)
@@ -358,14 +358,20 @@ zil_create(zilog_t *zilog)
 	blk = zh->zh_log;
 
 	/*
-	 * If we don't already have an initial log block, allocate one now.
+	 * If we don't already have an initial log block or we have one
+	 * but it's the wrong endianness then allocate one.
 	 */
-	if (BP_IS_HOLE(&blk)) {
+	if (BP_IS_HOLE(&blk) || BP_SHOULD_BYTESWAP(&blk)) {
 		tx = dmu_tx_create(zilog->zl_os);
 		(void) dmu_tx_assign(tx, TXG_WAIT);
 		dsl_dataset_dirty(dmu_objset_ds(zilog->zl_os), tx);
 		txg = dmu_tx_get_txg(tx);
 
+		if (!BP_IS_HOLE(&blk)) {
+			zio_free_blk(zilog->zl_spa, &blk, txg);
+			BP_ZERO(&blk);
+		}
+
 		error = zio_alloc_blk(zilog->zl_spa, ZIL_MIN_BLKSZ, &blk,
 		    NULL, txg);
 

From owner-svn-src-head@FreeBSD.ORG  Tue May 11 09:12:42 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 791F41065677;
	Tue, 11 May 2010 09:12:42 +0000 (UTC)
	(envelope-from rpaulo@freebsd.org)
Received: from karen.lavabit.com (karen.lavabit.com [72.249.41.33])
	by mx1.freebsd.org (Postfix) with ESMTP id 34DF88FC1A;
	Tue, 11 May 2010 09:12:41 +0000 (UTC)
Received: from e.earth.lavabit.com (e.earth.lavabit.com [192.168.111.14])
	by karen.lavabit.com (Postfix) with ESMTP id E5EE911B8A3;
	Tue, 11 May 2010 04:12:40 -0500 (CDT)
Received: from 10.0.10.3 (54.81.54.77.rev.vodafone.pt [77.54.81.54])
	by lavabit.com with ESMTP id FRBYZ07UMEK5;
	Tue, 11 May 2010 04:12:40 -0500
Mime-Version: 1.0 (Apple Message framework v1078)
Content-Type: text/plain; charset=us-ascii
From: Rui Paulo 
In-Reply-To: <201005081156.o48Bu0ma006645@svn.freebsd.org>
Date: Tue, 11 May 2010 10:12:37 +0100
Content-Transfer-Encoding: quoted-printable
Message-Id: <615D8823-C354-4CC7-8CC1-75BCD1791EC2@FreeBSD.org>
References: <201005081156.o48Bu0ma006645@svn.freebsd.org>
To: Ed Maste 
X-Mailer: Apple Mail (2.1078)
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r207768 - head/sys/dev/usb/wlan
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 11 May 2010 09:12:42 -0000

On 8 May 2010, at 12:56, Ed Maste wrote:

> Author: emaste
> Date: Sat May  8 11:56:00 2010
> New Revision: 207768
> URL: http://svn.freebsd.org/changeset/base/207768
>=20
> Log:
>  Add dummy function for ic_update_mcast (a la if_urtw) to avoid =
console
>  spam.

I don't agree with this. I think these dummy functions should be removed =
in all drivers and if the console spam is annoying it should be limited =
to one message per interface.

Regards,
--
Rui Paulo



From owner-svn-src-head@FreeBSD.ORG  Tue May 11 09:19:42 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 2EFFB1065672;
	Tue, 11 May 2010 09:19:42 +0000 (UTC) (envelope-from mm@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44])
	by mx1.freebsd.org (Postfix) with ESMTP id 1F2D48FC08;
	Tue, 11 May 2010 09:19:42 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4B9Jgkq030136;
	Tue, 11 May 2010 09:19:42 GMT (envelope-from mm@svn.freebsd.org)
Received: (from mm@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4B9JfuV030134;
	Tue, 11 May 2010 09:19:42 GMT (envelope-from mm@svn.freebsd.org)
Message-Id: <201005110919.o4B9JfuV030134@svn.freebsd.org>
From: Martin Matuska 
Date: Tue, 11 May 2010 09:19:41 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r207909 -
	head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 11 May 2010 09:19:42 -0000

Author: mm
Date: Tue May 11 09:19:41 2010
New Revision: 207909
URL: http://svn.freebsd.org/changeset/base/207909

Log:
  Fix zfs rename (may occasionally fail with dataset busy).
  
  OpenSolaris onnv revision:	8517:41a0783dde17
  
  PR:		kern/146471
  Approved by:	pjd, delphij (mentor)
  Obtained from:	OpenSolaris (Bug ID 6784757)
  MFC after:	3 days

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c	Tue May 11 07:25:13 2010	(r207908)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c	Tue May 11 09:19:41 2010	(r207909)
@@ -19,7 +19,7 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -2205,6 +2205,12 @@ dsl_dataset_rename(char *oldname, const 
 	err = dsl_dir_open(oldname, FTAG, &dd, &tail);
 	if (err)
 		return (err);
+	/*
+	 * If there are more than 2 references there may be holds
+	 * hanging around that haven't been cleared out yet.
+	 */
+	if (dmu_buf_refcount(dd->dd_dbuf) > 2)
+		txg_wait_synced(dd->dd_pool, 0);
 	if (tail == NULL) {
 		int delta = strlen(newname) - strlen(oldname);
 

From owner-svn-src-head@FreeBSD.ORG  Tue May 11 09:23:46 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 681AB1065672;
	Tue, 11 May 2010 09:23:46 +0000 (UTC) (envelope-from mm@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44])
	by mx1.freebsd.org (Postfix) with ESMTP id 571A78FC0C;
	Tue, 11 May 2010 09:23:46 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4B9NkXF031112;
	Tue, 11 May 2010 09:23:46 GMT (envelope-from mm@svn.freebsd.org)
Received: (from mm@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4B9Nkg4031079;
	Tue, 11 May 2010 09:23:46 GMT (envelope-from mm@svn.freebsd.org)
Message-Id: <201005110923.o4B9Nkg4031079@svn.freebsd.org>
From: Martin Matuska 
Date: Tue, 11 May 2010 09:23:46 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r207910 - in head: cddl/contrib/opensolaris/cmd/ztest
	sys/cddl/contrib/opensolaris/uts/common/fs/zfs
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 11 May 2010 09:23:46 -0000

Author: mm
Date: Tue May 11 09:23:46 2010
New Revision: 207910
URL: http://svn.freebsd.org/changeset/base/207910

Log:
  Fix possible panic with zfs destroy.
  
  OpenSolaris onnv revision:	8779:f164e0e90508
  
  PR:		kern/146471
  Approved by:	pjd, delphij (mentor)
  Obtained from:	OpenSolaris (Bug ID 6784924)
  MFC after:	3 days

Modified:
  head/cddl/contrib/opensolaris/cmd/ztest/ztest.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c

Modified: head/cddl/contrib/opensolaris/cmd/ztest/ztest.c
==============================================================================
--- head/cddl/contrib/opensolaris/cmd/ztest/ztest.c	Tue May 11 09:19:41 2010	(r207909)
+++ head/cddl/contrib/opensolaris/cmd/ztest/ztest.c	Tue May 11 09:23:46 2010	(r207910)
@@ -19,7 +19,7 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -93,6 +93,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -174,6 +175,7 @@ ztest_func_t ztest_traverse;
 ztest_func_t ztest_dsl_prop_get_set;
 ztest_func_t ztest_dmu_objset_create_destroy;
 ztest_func_t ztest_dmu_snapshot_create_destroy;
+ztest_func_t ztest_dsl_dataset_promote_busy;
 ztest_func_t ztest_spa_create_destroy;
 ztest_func_t ztest_fault_inject;
 ztest_func_t ztest_spa_rename;
@@ -208,6 +210,7 @@ ztest_info_t ztest_info[] = {
 	{ ztest_dsl_prop_get_set,		1,	&zopt_sometimes	},
 	{ ztest_dmu_objset_create_destroy,	1,	&zopt_sometimes },
 	{ ztest_dmu_snapshot_create_destroy,	1,	&zopt_sometimes },
+	{ ztest_dsl_dataset_promote_busy,	1,	&zopt_sometimes },
 	{ ztest_spa_create_destroy,		1,	&zopt_sometimes },
 	{ ztest_fault_inject,			1,	&zopt_sometimes	},
 	{ ztest_spa_rename,			1,	&zopt_rarely	},
@@ -1591,6 +1594,109 @@ ztest_traverse(ztest_args_t *za)
 }
 
 /*
+ * Verify dsl_dataset_promote handles EBUSY
+ */
+void
+ztest_dsl_dataset_promote_busy(ztest_args_t *za)
+{
+	int error;
+	objset_t *os = za->za_os;
+	objset_t *clone;
+	dsl_dataset_t *ds;
+	char snap1name[100];
+	char clone1name[100];
+	char snap2name[100];
+	char clone2name[100];
+	char snap3name[100];
+	char osname[MAXNAMELEN];
+	static uint64_t uniq = 0;
+	uint64_t curval;
+
+	curval = atomic_add_64_nv(&uniq, 5) - 5;
+
+	(void) rw_rdlock(&ztest_shared->zs_name_lock);
+
+	dmu_objset_name(os, osname);
+	(void) snprintf(snap1name, 100, "%s@s1_%llu", osname, curval++);
+	(void) snprintf(clone1name, 100, "%s/c1_%llu", osname, curval++);
+	(void) snprintf(snap2name, 100, "%s@s2_%llu", clone1name, curval++);
+	(void) snprintf(clone2name, 100, "%s/c2_%llu", osname, curval++);
+	(void) snprintf(snap3name, 100, "%s@s3_%llu", clone1name, curval++);
+
+	error = dmu_objset_snapshot(osname, strchr(snap1name, '@')+1, FALSE);
+	if (error == ENOSPC)
+		ztest_record_enospc("dmu_take_snapshot");
+	else if (error != 0 && error != EEXIST)
+		fatal(0, "dmu_take_snapshot = %d", error);
+
+	error = dmu_objset_open(snap1name, DMU_OST_OTHER,
+	    DS_MODE_USER | DS_MODE_READONLY, &clone);
+	if (error)
+		fatal(0, "dmu_open_snapshot(%s) = %d", snap1name, error);
+
+	error = dmu_objset_create(clone1name, DMU_OST_OTHER, clone, 0,
+	    NULL, NULL);
+	if (error)
+		fatal(0, "dmu_objset_create(%s) = %d", clone1name, error);
+	dmu_objset_close(clone);
+
+	error = dmu_objset_snapshot(clone1name, strchr(snap2name, '@')+1,
+	    FALSE);
+	if (error == ENOSPC)
+		ztest_record_enospc("dmu_take_snapshot");
+	else if (error != 0 && error != EEXIST)
+		fatal(0, "dmu_take_snapshot = %d", error);
+
+	error = dmu_objset_snapshot(clone1name, strchr(snap3name, '@')+1,
+	    FALSE);
+	if (error == ENOSPC)
+		ztest_record_enospc("dmu_take_snapshot");
+	else if (error != 0 && error != EEXIST)
+		fatal(0, "dmu_take_snapshot = %d", error);
+
+	error = dmu_objset_open(snap3name, DMU_OST_OTHER,
+	    DS_MODE_USER | DS_MODE_READONLY, &clone);
+	if (error)
+		fatal(0, "dmu_open_snapshot(%s) = %d", snap3name, error);
+
+	error = dmu_objset_create(clone2name, DMU_OST_OTHER, clone, 0,
+	    NULL, NULL);
+	if (error)
+		fatal(0, "dmu_objset_create(%s) = %d", clone2name, error);
+	dmu_objset_close(clone);
+
+	error = dsl_dataset_own(snap1name, 0, FTAG, &ds);
+	if (error)
+		fatal(0, "dsl_dataset_own(%s) = %d", snap1name, error);
+	error = dsl_dataset_promote(clone2name);
+	if (error != EBUSY)
+		fatal(0, "dsl_dataset_promote(%s), %d, not EBUSY", clone2name,
+		    error);
+	dsl_dataset_disown(ds, FTAG);
+
+	error = dmu_objset_destroy(clone2name);
+	if (error)
+		fatal(0, "dmu_objset_destroy(%s) = %d", clone2name, error);
+
+	error = dmu_objset_destroy(snap3name);
+	if (error)
+		fatal(0, "dmu_objset_destroy(%s) = %d", snap2name, error);
+
+	error = dmu_objset_destroy(snap2name);
+	if (error)
+		fatal(0, "dmu_objset_destroy(%s) = %d", snap2name, error);
+
+	error = dmu_objset_destroy(clone1name);
+	if (error)
+		fatal(0, "dmu_objset_destroy(%s) = %d", clone1name, error);
+	error = dmu_objset_destroy(snap1name);
+	if (error)
+		fatal(0, "dmu_objset_destroy(%s) = %d", snap1name, error);
+
+	(void) rw_unlock(&ztest_shared->zs_name_lock);
+}
+
+/*
  * Verify that dmu_object_{alloc,free} work as expected.
  */
 void

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c	Tue May 11 09:19:41 2010	(r207909)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c	Tue May 11 09:23:46 2010	(r207910)
@@ -554,6 +554,7 @@ dsl_dataset_own_obj(dsl_pool_t *dp, uint
 		return (err);
 	if (!dsl_dataset_tryown(*dsp, DS_MODE_IS_INCONSISTENT(flags), owner)) {
 		dsl_dataset_rele(*dsp, owner);
+		*dsp = NULL;
 		return (EBUSY);
 	}
 	return (0);
@@ -2584,7 +2585,7 @@ snaplist_destroy(list_t *l, boolean_t ow
 {
 	struct promotenode *snap;
 
-	if (!list_link_active(&l->list_head))
+	if (!l || !list_link_active(&l->list_head))
 		return;
 
 	while ((snap = list_tail(l)) != NULL) {

From owner-svn-src-head@FreeBSD.ORG  Tue May 11 09:26:46 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id A7730106564A;
	Tue, 11 May 2010 09:26:46 +0000 (UTC) (envelope-from mm@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44])
	by mx1.freebsd.org (Postfix) with ESMTP id 97A178FC13;
	Tue, 11 May 2010 09:26:46 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4B9Qk2D031767;
	Tue, 11 May 2010 09:26:46 GMT (envelope-from mm@svn.freebsd.org)
Received: (from mm@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4B9QkmF031765;
	Tue, 11 May 2010 09:26:46 GMT (envelope-from mm@svn.freebsd.org)
Message-Id: <201005110926.o4B9QkmF031765@svn.freebsd.org>
From: Martin Matuska 
Date: Tue, 11 May 2010 09:26:46 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r207911 -
	head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 11 May 2010 09:26:46 -0000

Author: mm
Date: Tue May 11 09:26:46 2010
New Revision: 207911
URL: http://svn.freebsd.org/changeset/base/207911

Log:
  Fix failed assertion on destroying datasets from an older pool version.
  
  OpenSolaris onnv revision:	9390:887948510f80
  
  PR:		kern/146471
  Approved by:	pjd, delphij (mentor)
  Obtained from:	OpenSolaris (Bug ID 6826861)
  MFC after:	3 days

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c	Tue May 11 09:23:46 2010	(r207910)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c	Tue May 11 09:26:46 2010	(r207911)
@@ -1268,8 +1268,7 @@ dsl_dataset_rollback_sync(void *arg1, vo
 		(void) zio_wait(zio);
 	}
 
-	ASSERT(!(ds->ds_phys->ds_flags & DS_FLAG_UNIQUE_ACCURATE) ||
-	    ds->ds_phys->ds_unique_bytes == 0);
+	ASSERT(!DS_UNIQUE_IS_ACCURATE(ds) || ds->ds_phys->ds_unique_bytes == 0);
 
 	if (ds->ds_prev && ds->ds_prev != ds->ds_dir->dd_pool->dp_origin_snap) {
 		/* Change our contents to that of the prev snapshot */
@@ -1661,7 +1660,7 @@ dsl_dataset_destroy_sync(void *arg1, voi
 		err = traverse_dsl_dataset(ds, ds->ds_phys->ds_prev_snap_txg,
 		    ADVANCE_POST, kill_blkptr, &ka);
 		ASSERT3U(err, ==, 0);
-		ASSERT(spa_version(dp->dp_spa) < SPA_VERSION_UNIQUE_ACCURATE ||
+		ASSERT(!DS_UNIQUE_IS_ACCURATE(ds) ||
 		    ds->ds_phys->ds_unique_bytes == 0);
 	}
 

From owner-svn-src-head@FreeBSD.ORG  Tue May 11 15:32:22 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 53437106566B;
	Tue, 11 May 2010 15:32:22 +0000 (UTC) (envelope-from pjd@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44])
	by mx1.freebsd.org (Postfix) with ESMTP id 434B48FC18;
	Tue, 11 May 2010 15:32:22 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4BFWMvo021742;
	Tue, 11 May 2010 15:32:22 GMT (envelope-from pjd@svn.freebsd.org)
Received: (from pjd@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4BFWMYd021740;
	Tue, 11 May 2010 15:32:22 GMT (envelope-from pjd@svn.freebsd.org)
Message-Id: <201005111532.o4BFWMYd021740@svn.freebsd.org>
From: Pawel Jakub Dawidek 
Date: Tue, 11 May 2010 15:32:22 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r207920 - head/sys/modules/zfs
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 11 May 2010 15:32:22 -0000

Author: pjd
Date: Tue May 11 15:32:21 2010
New Revision: 207920
URL: http://svn.freebsd.org/changeset/base/207920

Log:
  Back out r205134. It is not stable.
  
  MFC after:	3 days

Modified:
  head/sys/modules/zfs/Makefile

Modified: head/sys/modules/zfs/Makefile
==============================================================================
--- head/sys/modules/zfs/Makefile	Tue May 11 13:39:37 2010	(r207919)
+++ head/sys/modules/zfs/Makefile	Tue May 11 15:32:21 2010	(r207920)
@@ -64,7 +64,7 @@ SRCS+=	${ZFS_SRCS}
 SRCS+=	vdev_geom.c
 
 # Use UMA for ZIO allocation.
-CFLAGS+=-DZIO_USE_UMA
+#CFLAGS+=-DZIO_USE_UMA
 
 # Use FreeBSD's namecache.
 CFLAGS+=-DFREEBSD_NAMECACHE

From owner-svn-src-head@FreeBSD.ORG  Tue May 11 15:36:17 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 287A8106567A;
	Tue, 11 May 2010 15:36:17 +0000 (UTC)
	(envelope-from attilio@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44])
	by mx1.freebsd.org (Postfix) with ESMTP id 1860E8FC24;
	Tue, 11 May 2010 15:36:17 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4BFaGPk022635;
	Tue, 11 May 2010 15:36:16 GMT (envelope-from attilio@svn.freebsd.org)
Received: (from attilio@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4BFaGWv022633;
	Tue, 11 May 2010 15:36:16 GMT (envelope-from attilio@svn.freebsd.org)
Message-Id: <201005111536.o4BFaGWv022633@svn.freebsd.org>
From: Attilio Rao 
Date: Tue, 11 May 2010 15:36:16 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r207921 - head/sys/kern
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 11 May 2010 15:36:17 -0000

Author: attilio
Date: Tue May 11 15:36:16 2010
New Revision: 207921
URL: http://svn.freebsd.org/changeset/base/207921

Log:
  Fix a hang introduced in r206878 for kernel compiled with SMP support but
  being not actual SMP and similar situations by always initializing the
  smp ipi mutex.
  
  Reported by:	marius
  MFC after:	3 days
  X-MFC:		r206878

Modified:
  head/sys/kern/subr_smp.c

Modified: head/sys/kern/subr_smp.c
==============================================================================
--- head/sys/kern/subr_smp.c	Tue May 11 15:32:21 2010	(r207920)
+++ head/sys/kern/subr_smp.c	Tue May 11 15:36:16 2010	(r207921)
@@ -137,6 +137,8 @@ static void
 mp_start(void *dummy)
 {
 
+	mtx_init(&smp_ipi_mtx, "smp rendezvous", NULL, MTX_SPIN);
+
 	/* Probe for MP hardware. */
 	if (smp_disabled != 0 || cpu_mp_probe() == 0) {
 		mp_ncpus = 1;
@@ -144,7 +146,6 @@ mp_start(void *dummy)
 		return;
 	}
 
-	mtx_init(&smp_ipi_mtx, "smp rendezvous", NULL, MTX_SPIN);
 	cpu_mp_start();
 	printf("FreeBSD/SMP: Multiprocessor System Detected: %d CPUs\n",
 	    mp_ncpus);

From owner-svn-src-head@FreeBSD.ORG  Tue May 11 16:11:13 2010
Return-Path: 
Delivered-To: svn-src-head@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 06DA81065673;
	Tue, 11 May 2010 16:11:13 +0000 (UTC) (envelope-from sam@errno.com)
Received: from ebb.errno.com (ebb.errno.com [69.12.149.25])
	by mx1.freebsd.org (Postfix) with ESMTP id CBCEE8FC1B;
	Tue, 11 May 2010 16:11:12 +0000 (UTC)
Received: from [10.1.64.240] (216-239-44-65.google.com [216.239.44.65])
	(authenticated bits=0)
	by ebb.errno.com (8.13.6/8.12.6) with ESMTP id o4BGB9pQ063845
	(version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO);
	Tue, 11 May 2010 09:11:11 -0700 (PDT) (envelope-from sam@errno.com)
Message-Id: 
From: Sam Leffler 
To: Rui Paulo 
In-Reply-To: <615D8823-C354-4CC7-8CC1-75BCD1791EC2@FreeBSD.org>
Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
Content-Transfer-Encoding: 7bit
Mime-Version: 1.0 (Apple Message framework v936)
Date: Tue, 11 May 2010 12:11:09 -0400
References: <201005081156.o48Bu0ma006645@svn.freebsd.org>
	<615D8823-C354-4CC7-8CC1-75BCD1791EC2@FreeBSD.org>
X-Mailer: Apple Mail (2.936)
X-DCC-USENIX-Metrics: ebb.errno.com; whitelist
Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org,
	src-committers@FreeBSD.org, Ed Maste 
Subject: Re: svn commit: r207768 - head/sys/dev/usb/wlan
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 11 May 2010 16:11:13 -0000

On May 11, 2010, at 5:12 AM, Rui Paulo wrote:

> On 8 May 2010, at 12:56, Ed Maste wrote:
>
>> Author: emaste
>> Date: Sat May  8 11:56:00 2010
>> New Revision: 207768
>> URL: http://svn.freebsd.org/changeset/base/207768
>>
>> Log:
>> Add dummy function for ic_update_mcast (a la if_urtw) to avoid  
>> console
>> spam.
>
> I don't agree with this. I think these dummy functions should be  
> removed in all drivers and if the console spam is annoying it should  
> be limited to one message per interface.
>

Yes, I didn't catch the other stubs going in but already talked to Ed  
about this one.  People need to understand that stub'ing out this  
function is masking a real problem.  Drivers that can support mcast  
filtering should do so.  Otherwise we need mcast filtering implemented  
in the 802.3 layer to support the ALLMULTI ifnet flag; in which case  
drivers that are incomplete can fallback on this support.  In lieu of  
working support a better solution is to provide a stub in net80211  
that ratelimits the printf but doesn't completely remove it.

	Sam


From owner-svn-src-head@FreeBSD.ORG  Tue May 11 17:01:15 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 457E01065672;
	Tue, 11 May 2010 17:01:15 +0000 (UTC)
	(envelope-from attilio@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 341568FC15;
	Tue, 11 May 2010 17:01:15 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4BH1EMH041358;
	Tue, 11 May 2010 17:01:14 GMT (envelope-from attilio@svn.freebsd.org)
Received: (from attilio@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4BH1EQZ041354;
	Tue, 11 May 2010 17:01:14 GMT (envelope-from attilio@svn.freebsd.org)
Message-Id: <201005111701.o4BH1EQZ041354@svn.freebsd.org>
From: Attilio Rao 
Date: Tue, 11 May 2010 17:01:14 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r207922 - in head/sys: ddb kern
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 11 May 2010 17:01:15 -0000

Author: attilio
Date: Tue May 11 17:01:14 2010
New Revision: 207922
URL: http://svn.freebsd.org/changeset/base/207922

Log:
  There is not a good reason to have a different prototype for db_printf()
  when compared to printf().
  Unify it by returning the number of characters displayed for db_printf()
  as well.
  
  MFC after:	7 days

Modified:
  head/sys/ddb/db_output.c
  head/sys/ddb/ddb.h
  head/sys/kern/subr_witness.c

Modified: head/sys/ddb/db_output.c
==============================================================================
--- head/sys/ddb/db_output.c	Tue May 11 15:36:16 2010	(r207921)
+++ head/sys/ddb/db_output.c	Tue May 11 17:01:14 2010	(r207922)
@@ -316,7 +316,7 @@ db_print_position()
 /*
  * Printing
  */
-void
+int
 db_printf(const char *fmt, ...)
 {
 #ifdef DDB_BUFR_SIZE
@@ -324,6 +324,7 @@ db_printf(const char *fmt, ...)
 #endif
 	struct dbputchar_arg dca;
 	va_list	listp;
+	int retval;
 
 #ifdef DDB_BUFR_SIZE
 	dca.da_pbufr = bufr;
@@ -336,13 +337,14 @@ db_printf(const char *fmt, ...)
 #endif
 
 	va_start(listp, fmt);
-	kvprintf (fmt, db_putchar, &dca, db_radix, listp);
+	retval = kvprintf (fmt, db_putchar, &dca, db_radix, listp);
 	va_end(listp);
 
 #ifdef DDB_BUFR_SIZE
 	if (*dca.da_pbufr != '\0')
 		db_puts(dca.da_pbufr);
 #endif
+	return (retval);
 }
 
 int db_indent;

Modified: head/sys/ddb/ddb.h
==============================================================================
--- head/sys/ddb/ddb.h	Tue May 11 15:36:16 2010	(r207921)
+++ head/sys/ddb/ddb.h	Tue May 11 17:01:14 2010	(r207922)
@@ -200,7 +200,7 @@ int		db_md_clr_watchpoint(db_expr_t addr
 void		db_md_list_watchpoints(void);
 void		db_print_loc_and_inst(db_addr_t loc);
 void		db_print_thread(void);
-void		db_printf(const char *fmt, ...) __printflike(1, 2);
+int		db_printf(const char *fmt, ...) __printflike(1, 2);
 int		db_read_bytes(vm_offset_t addr, size_t size, char *data);
 				/* machine-dependent */
 int		db_readline(char *lstart, int lsize);

Modified: head/sys/kern/subr_witness.c
==============================================================================
--- head/sys/kern/subr_witness.c	Tue May 11 15:36:16 2010	(r207921)
+++ head/sys/kern/subr_witness.c	Tue May 11 17:01:14 2010	(r207922)
@@ -343,10 +343,10 @@ static int	sysctl_debug_witness_fullgrap
 static void	witness_add_fullgraph(struct sbuf *sb, struct witness *parent);
 #ifdef DDB
 static void	witness_ddb_compute_levels(void);
-static void	witness_ddb_display(void(*)(const char *fmt, ...));
-static void	witness_ddb_display_descendants(void(*)(const char *fmt, ...),
+static void	witness_ddb_display(int(*)(const char *fmt, ...));
+static void	witness_ddb_display_descendants(int(*)(const char *fmt, ...),
 		    struct witness *, int indent);
-static void	witness_ddb_display_list(void(*prnt)(const char *fmt, ...),
+static void	witness_ddb_display_list(int(*prnt)(const char *fmt, ...),
 		    struct witness_list *list);
 static void	witness_ddb_level_descendants(struct witness *parent, int l);
 static void	witness_ddb_list(struct thread *td);
@@ -908,7 +908,7 @@ witness_ddb_level_descendants(struct wit
 }
 
 static void
-witness_ddb_display_descendants(void(*prnt)(const char *fmt, ...),
+witness_ddb_display_descendants(int(*prnt)(const char *fmt, ...),
     struct witness *w, int indent)
 {
 	int i;
@@ -938,7 +938,7 @@ witness_ddb_display_descendants(void(*pr
 }
 
 static void
-witness_ddb_display_list(void(*prnt)(const char *fmt, ...),
+witness_ddb_display_list(int(*prnt)(const char *fmt, ...),
     struct witness_list *list)
 {
 	struct witness *w;
@@ -953,7 +953,7 @@ witness_ddb_display_list(void(*prnt)(con
 }
 	
 static void
-witness_ddb_display(void(*prnt)(const char *fmt, ...))
+witness_ddb_display(int(*prnt)(const char *fmt, ...))
 {
 	struct witness *w;
 

From owner-svn-src-head@FreeBSD.ORG  Tue May 11 17:02:12 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id F093C106566C;
	Tue, 11 May 2010 17:02:12 +0000 (UTC)
	(envelope-from brueffer@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id DFD878FC14;
	Tue, 11 May 2010 17:02:12 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4BH2Cn3041621;
	Tue, 11 May 2010 17:02:12 GMT
	(envelope-from brueffer@svn.freebsd.org)
Received: (from brueffer@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4BH2CgZ041619;
	Tue, 11 May 2010 17:02:12 GMT
	(envelope-from brueffer@svn.freebsd.org)
Message-Id: <201005111702.o4BH2CgZ041619@svn.freebsd.org>
From: Christian Brueffer 
Date: Tue, 11 May 2010 17:02:12 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r207923 - head/lib/libc/sys
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 11 May 2010 17:02:13 -0000

Author: brueffer
Date: Tue May 11 17:02:12 2010
New Revision: 207923
URL: http://svn.freebsd.org/changeset/base/207923

Log:
  Document FIONREAD, FIONWRITE and FIONSPACE.
  
  Obtained from:	NetBSD
  Submitted by:	emaste
  MFC after:	1 week

Modified:
  head/lib/libc/sys/ioctl.2

Modified: head/lib/libc/sys/ioctl.2
==============================================================================
--- head/lib/libc/sys/ioctl.2	Tue May 11 17:01:14 2010	(r207922)
+++ head/lib/libc/sys/ioctl.2	Tue May 11 17:02:12 2010	(r207923)
@@ -29,7 +29,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd July 14, 2007
+.Dd May 11, 2010
 .Dt IOCTL 2
 .Os
 .Sh NAME
@@ -80,6 +80,30 @@ Macros and defines used in specifying an
 .Fa request
 are located in the file
 .In sys/ioctl.h .
+.Sh GENERIC IOCTLS
+Some generic ioctls are not implemented for all types of file
+descriptors.
+These include:
+.Bl -tag -width "xxxxxx"
+.It Dv FIONREAD int
+Get the number of bytes that are immediately available for reading.
+.It Dv FIONWRITE int
+Get the number of bytes in the descriptor's send queue.
+These bytes are data which has been written to the descriptor but
+which are being held by the kernel for further processing.
+The nature of the required processing depends on the underlying device.
+For TCP sockets, these bytes have not yet been acknowledged by the
+other side of the connection.
+.It Dv FIONSPACE int
+Get the free space in the descriptor's send queue.
+This value is the size of the send queue minus the number of bytes
+being held in the queue.
+Note: while this value represents the number of bytes that may be
+added to the queue, other resource limitations may cause a write
+not larger than the send queue's space to be blocked.
+One such limitation would be a lack of network buffers for a write
+to a network connection.
+.El
 .Sh RETURN VALUES
 If an error has occurred, a value of -1 is returned and
 .Va errno

From owner-svn-src-head@FreeBSD.ORG  Tue May 11 17:02:29 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8F0181065752;
	Tue, 11 May 2010 17:02:29 +0000 (UTC) (envelope-from rrs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 7DB838FC17;
	Tue, 11 May 2010 17:02:29 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4BH2TRY041726;
	Tue, 11 May 2010 17:02:29 GMT (envelope-from rrs@svn.freebsd.org)
Received: (from rrs@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4BH2TLA041721;
	Tue, 11 May 2010 17:02:29 GMT (envelope-from rrs@svn.freebsd.org)
Message-Id: <201005111702.o4BH2TLA041721@svn.freebsd.org>
From: Randall Stewart 
Date: Tue, 11 May 2010 17:02:29 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r207924 - head/sys/netinet
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 11 May 2010 17:02:29 -0000

Author: rrs
Date: Tue May 11 17:02:29 2010
New Revision: 207924
URL: http://svn.freebsd.org/changeset/base/207924

Log:
  This fixes a bug with the one-2-one model socket when a
  user sets up a socket to a server sends data and closes
  the socket before the server has called accept(). It used
  to NOT work at all. Now we add a flag to the assoc and
  defer assoc cleanup so that the accept will suceed.

Modified:
  head/sys/netinet/sctp_constants.h
  head/sys/netinet/sctp_input.c
  head/sys/netinet/sctp_pcb.c
  head/sys/netinet/sctp_usrreq.c

Modified: head/sys/netinet/sctp_constants.h
==============================================================================
--- head/sys/netinet/sctp_constants.h	Tue May 11 17:02:12 2010	(r207923)
+++ head/sys/netinet/sctp_constants.h	Tue May 11 17:02:29 2010	(r207924)
@@ -498,6 +498,7 @@ __FBSDID("$FreeBSD$");
 #define SCTP_STATE_ABOUT_TO_BE_FREED    0x0200
 #define SCTP_STATE_PARTIAL_MSG_LEFT     0x0400
 #define SCTP_STATE_WAS_ABORTED          0x0800
+#define SCTP_STATE_IN_ACCEPT_QUEUE      0x1000
 #define SCTP_STATE_MASK			0x007f
 
 #define SCTP_GET_STATE(asoc)	((asoc)->state & SCTP_STATE_MASK)

Modified: head/sys/netinet/sctp_input.c
==============================================================================
--- head/sys/netinet/sctp_input.c	Tue May 11 17:02:12 2010	(r207923)
+++ head/sys/netinet/sctp_input.c	Tue May 11 17:02:29 2010	(r207924)
@@ -2743,6 +2743,14 @@ sctp_handle_cookie_echo(struct mbuf *m, 
 			 * Now we must move it from one hash table to
 			 * another and get the tcb in the right place.
 			 */
+
+			/*
+			 * This is where the one-2-one socket is put into
+			 * the accept state waiting for the accept!
+			 */
+			if (*stcb) {
+				(*stcb)->asoc.state |= SCTP_STATE_IN_ACCEPT_QUEUE;
+			}
 			sctp_move_pcb_and_assoc(*inp_p, inp, *stcb);
 
 			atomic_add_int(&(*stcb)->asoc.refcnt, 1);
@@ -4859,8 +4867,8 @@ process_control_chunks:
 			}
 			/*
 			 * First are we accepting? We do this again here
-			 * sincen it is possible that a previous endpoint
-			 * WAS listening responded to a INIT-ACK and then
+			 * since it is possible that a previous endpoint WAS
+			 * listening responded to a INIT-ACK and then
 			 * closed. We opened and bound.. and are now no
 			 * longer listening.
 			 */

Modified: head/sys/netinet/sctp_pcb.c
==============================================================================
--- head/sys/netinet/sctp_pcb.c	Tue May 11 17:02:12 2010	(r207923)
+++ head/sys/netinet/sctp_pcb.c	Tue May 11 17:02:29 2010	(r207924)
@@ -4576,12 +4576,13 @@ sctp_free_assoc(struct sctp_inpcb *inp, 
 			stcb->block_entry = NULL;
 		}
 	}
-	if (stcb->asoc.refcnt) {
+	if ((stcb->asoc.refcnt) || (stcb->asoc.state & SCTP_STATE_IN_ACCEPT_QUEUE)) {
 		/*
-		 * reader or writer in the way, we have hopefully given him
-		 * something to chew on above.
+		 * Someone holds a reference OR the socket is unaccepted
+		 * yet.
 		 */
-		sctp_timer_start(SCTP_TIMER_TYPE_ASOCKILL, inp, stcb, NULL);
+		if (stcb->asoc.refcnt)
+			sctp_timer_start(SCTP_TIMER_TYPE_ASOCKILL, inp, stcb, NULL);
 		SCTP_TCB_UNLOCK(stcb);
 		if ((inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_ALLGONE) ||
 		    (inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE))

Modified: head/sys/netinet/sctp_usrreq.c
==============================================================================
--- head/sys/netinet/sctp_usrreq.c	Tue May 11 17:02:12 2010	(r207923)
+++ head/sys/netinet/sctp_usrreq.c	Tue May 11 17:02:29 2010	(r207924)
@@ -1510,7 +1510,7 @@ sctp_do_connect_x(struct socket *so, str
 	added = sctp_connectx_helper_add(stcb, sa, (totaddr - 1), &error);
 	/* Fill in the return id */
 	if (error) {
-		(void)sctp_free_assoc(inp, stcb, SCTP_PCBFREE_FORCE, SCTP_FROM_SCTP_USRREQ + SCTP_LOC_12);
+		(void)sctp_free_assoc(inp, stcb, SCTP_PCBFREE_FORCE, SCTP_FROM_SCTP_USRREQ + SCTP_LOC_6);
 		goto out_now;
 	}
 	a_id = (sctp_assoc_t *) optval;
@@ -4670,6 +4670,7 @@ sctp_accept(struct socket *so, struct so
 	SCTP_TCB_LOCK(stcb);
 	SCTP_INP_RUNLOCK(inp);
 	store = stcb->asoc.primary_destination->ro._l_addr;
+	stcb->asoc.state &= ~SCTP_STATE_IN_ACCEPT_QUEUE;
 	SCTP_TCB_UNLOCK(stcb);
 	switch (store.sa.sa_family) {
 	case AF_INET:
@@ -4736,6 +4737,10 @@ sctp_accept(struct socket *so, struct so
 		}
 		SCTP_INP_WUNLOCK(inp);
 	}
+	if (stcb->asoc.state & SCTP_STATE_ABOUT_TO_BE_FREED) {
+		SCTP_TCB_LOCK(stcb);
+		sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_USRREQ + SCTP_LOC_7);
+	}
 	return (0);
 }
 

From owner-svn-src-head@FreeBSD.ORG  Tue May 11 17:03:49 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 0DA2A106567F;
	Tue, 11 May 2010 17:03:49 +0000 (UTC)
	(envelope-from attilio@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id F114E8FC34;
	Tue, 11 May 2010 17:03:48 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4BH3mOc042027;
	Tue, 11 May 2010 17:03:48 GMT (envelope-from attilio@svn.freebsd.org)
Received: (from attilio@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4BH3mhb042025;
	Tue, 11 May 2010 17:03:48 GMT (envelope-from attilio@svn.freebsd.org)
Message-Id: <201005111703.o4BH3mhb042025@svn.freebsd.org>
From: Attilio Rao 
Date: Tue, 11 May 2010 17:03:48 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r207925 - head/sys/sys
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 11 May 2010 17:03:49 -0000

Author: attilio
Date: Tue May 11 17:03:48 2010
New Revision: 207925
URL: http://svn.freebsd.org/changeset/base/207925

Log:
  Fix style for witness functions prototypes.
  
  MFC after:	7 days

Modified:
  head/sys/sys/lock.h

Modified: head/sys/sys/lock.h
==============================================================================
--- head/sys/sys/lock.h	Tue May 11 17:02:29 2010	(r207924)
+++ head/sys/sys/lock.h	Tue May 11 17:03:48 2010	(r207925)
@@ -197,7 +197,7 @@ extern struct lock_class lock_class_lock
 extern struct lock_class *lock_classes[];
 
 void	lock_init(struct lock_object *, struct lock_class *,
-    const char *, const char *, int);
+	    const char *, const char *, int);
 void	lock_destroy(struct lock_object *);
 void	spinlock_enter(void);
 void	spinlock_exit(void);
@@ -205,7 +205,7 @@ void	witness_init(struct lock_object *, 
 void	witness_destroy(struct lock_object *);
 int	witness_defineorder(struct lock_object *, struct lock_object *);
 void	witness_checkorder(struct lock_object *, int, const char *, int,
-    struct lock_object *);
+	    struct lock_object *);
 void	witness_lock(struct lock_object *, int, const char *, int);
 void	witness_upgrade(struct lock_object *, int, const char *, int);
 void	witness_downgrade(struct lock_object *, int, const char *, int);

From owner-svn-src-head@FreeBSD.ORG  Tue May 11 17:14:18 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 29BF1106566C;
	Tue, 11 May 2010 17:14:18 +0000 (UTC)
	(envelope-from bschmidt@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 18B278FC1A;
	Tue, 11 May 2010 17:14:18 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4BHEH88044407;
	Tue, 11 May 2010 17:14:17 GMT
	(envelope-from bschmidt@svn.freebsd.org)
Received: (from bschmidt@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4BHEHc0044405;
	Tue, 11 May 2010 17:14:17 GMT
	(envelope-from bschmidt@svn.freebsd.org)
Message-Id: <201005111714.o4BHEHc0044405@svn.freebsd.org>
From: Bernhard Schmidt 
Date: Tue, 11 May 2010 17:14:17 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r207926 - head/sys/dev/ipw
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 11 May 2010 17:14:18 -0000

Author: bschmidt
Date: Tue May 11 17:14:17 2010
New Revision: 207926
URL: http://svn.freebsd.org/changeset/base/207926

Log:
  Enable 5.5 and 11Mbit TX rates.
  
  Reviewed by:	sam
  Approved by:	rpaulo (mentor)
  MFC after:	3 days

Modified:
  head/sys/dev/ipw/if_ipw.c

Modified: head/sys/dev/ipw/if_ipw.c
==============================================================================
--- head/sys/dev/ipw/if_ipw.c	Tue May 11 17:03:48 2010	(r207925)
+++ head/sys/dev/ipw/if_ipw.c	Tue May 11 17:14:17 2010	(r207926)
@@ -2505,19 +2505,19 @@ ipw_config(struct ipw_softc *sc)
 	if (error != 0)
 		return error;
 
-	data = htole32(0x3); /* 1, 2 */
+	data = htole32(0xf); /* 1, 2, 5.5, 11 */
 	DPRINTF(("Setting basic tx rates to 0x%x\n", le32toh(data)));
 	error = ipw_cmd(sc, IPW_CMD_SET_BASIC_TX_RATES, &data, sizeof data);
 	if (error != 0)
 		return error;
 
-	/* NB: use the same rate set */
+	/* Use the same rate set */
 	DPRINTF(("Setting msdu tx rates to 0x%x\n", le32toh(data)));
 	error = ipw_cmd(sc, IPW_CMD_SET_MSDU_TX_RATES, &data, sizeof data);
 	if (error != 0)
 		return error;
 
-	data = htole32(0xf); /* 1, 2, 5.5, 11 */
+	/* Use the same rate set */
 	DPRINTF(("Setting tx rates to 0x%x\n", le32toh(data)));
 	error = ipw_cmd(sc, IPW_CMD_SET_TX_RATES, &data, sizeof data);
 	if (error != 0)

From owner-svn-src-head@FreeBSD.ORG  Tue May 11 18:24:22 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8F5F2106566B;
	Tue, 11 May 2010 18:24:22 +0000 (UTC)
	(envelope-from attilio@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 7DC178FC08;
	Tue, 11 May 2010 18:24:22 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4BIOM8c060022;
	Tue, 11 May 2010 18:24:22 GMT (envelope-from attilio@svn.freebsd.org)
Received: (from attilio@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4BIOMdP060017;
	Tue, 11 May 2010 18:24:22 GMT (envelope-from attilio@svn.freebsd.org)
Message-Id: <201005111824.o4BIOMdP060017@svn.freebsd.org>
From: Attilio Rao 
Date: Tue, 11 May 2010 18:24:22 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r207929 - in head/sys: kern sys
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 11 May 2010 18:24:22 -0000

Author: attilio
Date: Tue May 11 18:24:22 2010
New Revision: 207929
URL: http://svn.freebsd.org/changeset/base/207929

Log:
  Right now, WITNESS just blindly pipes all the output to the
  (TOCONS | TOLOG) mask even when called from DDB points.
  That breaks several output, where the most notable is textdump output.
  Fix this by having configurable callbacks passed to witness_list_locks()
  and witness_display_spinlock() for printing out datas.
  
  Reported by:	several broken textdump outputs
  Tested by:	Giovanni Trematerra
  		
  MFC after:	7 days
  X-MFC:		r207922

Modified:
  head/sys/kern/kern_mutex.c
  head/sys/kern/subr_pcpu.c
  head/sys/kern/subr_witness.c
  head/sys/sys/lock.h

Modified: head/sys/kern/kern_mutex.c
==============================================================================
--- head/sys/kern/kern_mutex.c	Tue May 11 18:09:24 2010	(r207928)
+++ head/sys/kern/kern_mutex.c	Tue May 11 18:24:22 2010	(r207929)
@@ -485,7 +485,7 @@ _mtx_lock_spin_failed(struct mtx *m)
 	printf( "spin lock %p (%s) held by %p (tid %d) too long\n",
 	    m, m->lock_object.lo_name, td, td->td_tid);
 #ifdef WITNESS
-	witness_display_spinlock(&m->lock_object, td);
+	witness_display_spinlock(&m->lock_object, td, printf);
 #endif
 	panic("spin lock held too long");
 }

Modified: head/sys/kern/subr_pcpu.c
==============================================================================
--- head/sys/kern/subr_pcpu.c	Tue May 11 18:09:24 2010	(r207928)
+++ head/sys/kern/subr_pcpu.c	Tue May 11 18:24:22 2010	(r207929)
@@ -363,7 +363,7 @@ show_pcpu(struct pcpu *pc)
 
 #ifdef WITNESS
 	db_printf("spin locks held:\n");
-	witness_list_locks(&pc->pc_spinlocks);
+	witness_list_locks(&pc->pc_spinlocks, db_printf);
 #endif
 }
 

Modified: head/sys/kern/subr_witness.c
==============================================================================
--- head/sys/kern/subr_witness.c	Tue May 11 18:09:24 2010	(r207928)
+++ head/sys/kern/subr_witness.c	Tue May 11 18:24:22 2010	(r207929)
@@ -367,7 +367,8 @@ static int	witness_lock_order_check(stru
 static struct witness_lock_order_data	*witness_lock_order_get(
 					    struct witness *parent,
 					    struct witness *child);
-static void	witness_list_lock(struct lock_instance *instance);
+static void	witness_list_lock(struct lock_instance *instance,
+		    int (*prnt)(const char *fmt, ...));
 static void	witness_setflag(struct lock_object *lock, int flag, int set);
 
 #ifdef KDB
@@ -1597,7 +1598,7 @@ witness_thread_exit(struct thread *td)
 		printf("Thread %p exiting with the following locks held:\n",
 					    td);
 				n++;
-				witness_list_lock(&lle->ll_children[i]);
+				witness_list_lock(&lle->ll_children[i], printf);
 				
 			}
 		panic("Thread %p cannot exit while holding sleeplocks\n", td);
@@ -1646,7 +1647,7 @@ witness_warn(int flags, struct lock_obje
 				printf(" locks held:\n");
 			}
 			n++;
-			witness_list_lock(lock1);
+			witness_list_lock(lock1, printf);
 		}
 
 	/*
@@ -1677,7 +1678,7 @@ witness_warn(int flags, struct lock_obje
 		if (flags & WARN_SLEEPOK)
 			printf(" non-sleepable");
 		printf(" locks held:\n");
-		n += witness_list_locks(&lock_list);
+		n += witness_list_locks(&lock_list, printf);
 	} else
 		sched_unpin();
 	if (flags & WARN_PANIC && n)
@@ -2063,16 +2064,17 @@ find_instance(struct lock_list_entry *li
 }
 
 static void
-witness_list_lock(struct lock_instance *instance)
+witness_list_lock(struct lock_instance *instance,
+    int (*prnt)(const char *fmt, ...))
 {
 	struct lock_object *lock;
 
 	lock = instance->li_lock;
-	printf("%s %s %s", (instance->li_flags & LI_EXCLUSIVE) != 0 ?
+	prnt("%s %s %s", (instance->li_flags & LI_EXCLUSIVE) != 0 ?
 	    "exclusive" : "shared", LOCK_CLASS(lock)->lc_name, lock->lo_name);
 	if (lock->lo_witness->w_name != lock->lo_name)
-		printf(" (%s)", lock->lo_witness->w_name);
-	printf(" r = %d (%p) locked @ %s:%d\n",
+		prnt(" (%s)", lock->lo_witness->w_name);
+	prnt(" r = %d (%p) locked @ %s:%d\n",
 	    instance->li_flags & LI_RECURSEMASK, lock, instance->li_file,
 	    instance->li_line);
 }
@@ -2101,7 +2103,8 @@ witness_proc_has_locks(struct proc *p)
 #endif
 
 int
-witness_list_locks(struct lock_list_entry **lock_list)
+witness_list_locks(struct lock_list_entry **lock_list,
+    int (*prnt)(const char *fmt, ...))
 {
 	struct lock_list_entry *lle;
 	int i, nheld;
@@ -2109,7 +2112,7 @@ witness_list_locks(struct lock_list_entr
 	nheld = 0;
 	for (lle = *lock_list; lle != NULL; lle = lle->ll_next)
 		for (i = lle->ll_count - 1; i >= 0; i--) {
-			witness_list_lock(&lle->ll_children[i]);
+			witness_list_lock(&lle->ll_children[i], prnt);
 			nheld++;
 		}
 	return (nheld);
@@ -2123,7 +2126,8 @@ witness_list_locks(struct lock_list_entr
  * see when it was last acquired.
  */
 void
-witness_display_spinlock(struct lock_object *lock, struct thread *owner)
+witness_display_spinlock(struct lock_object *lock, struct thread *owner,
+    int (*prnt)(const char *fmt, ...))
 {
 	struct lock_instance *instance;
 	struct pcpu *pc;
@@ -2133,7 +2137,7 @@ witness_display_spinlock(struct lock_obj
 	pc = pcpu_find(owner->td_oncpu);
 	instance = find_instance(pc->pc_spinlocks, lock);
 	if (instance != NULL)
-		witness_list_lock(instance);
+		witness_list_lock(instance, prnt);
 }
 
 void
@@ -2306,7 +2310,7 @@ witness_ddb_list(struct thread *td)
 	if (witness_watch < 1)
 		return;
 
-	witness_list_locks(&td->td_sleeplocks);
+	witness_list_locks(&td->td_sleeplocks, db_printf);
 
 	/*
 	 * We only handle spinlocks if td == curthread.  This is somewhat broken
@@ -2322,7 +2326,7 @@ witness_ddb_list(struct thread *td)
 	 * handle threads on other CPU's for now.
 	 */
 	if (td == curthread && PCPU_GET(spinlocks) != NULL)
-		witness_list_locks(PCPU_PTR(spinlocks));
+		witness_list_locks(PCPU_PTR(spinlocks), db_printf);
 }
 
 DB_SHOW_COMMAND(locks, db_witness_list)

Modified: head/sys/sys/lock.h
==============================================================================
--- head/sys/sys/lock.h	Tue May 11 18:09:24 2010	(r207928)
+++ head/sys/sys/lock.h	Tue May 11 18:24:22 2010	(r207929)
@@ -212,10 +212,12 @@ void	witness_downgrade(struct lock_objec
 void	witness_unlock(struct lock_object *, int, const char *, int);
 void	witness_save(struct lock_object *, const char **, int *);
 void	witness_restore(struct lock_object *, const char *, int);
-int	witness_list_locks(struct lock_list_entry **);
+int	witness_list_locks(struct lock_list_entry **,
+	    int (*)(const char *, ...));
 int	witness_warn(int, struct lock_object *, const char *, ...);
 void	witness_assert(struct lock_object *, int, const char *, int);
-void	witness_display_spinlock(struct lock_object *, struct thread *);
+void	witness_display_spinlock(struct lock_object *, struct thread *,
+	    int (*)(const char *, ...));
 int	witness_line(struct lock_object *);
 void	witness_norelease(struct lock_object *);
 void	witness_releaseok(struct lock_object *);

From owner-svn-src-head@FreeBSD.ORG  Tue May 11 19:02:28 2010
Return-Path: 
Delivered-To: svn-src-head@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3FB05106564A
	for ; Tue, 11 May 2010 19:02:28 +0000 (UTC)
	(envelope-from njm@njm.me.uk)
Received: from smtp004.apm-internet.net (smtp004.apm-internet.net
	[85.119.248.54]) by mx1.freebsd.org (Postfix) with SMTP id A27688FC0A
	for ; Tue, 11 May 2010 19:02:27 +0000 (UTC)
Received: (qmail 57915 invoked from network); 11 May 2010 19:02:25 -0000
Received: from unknown (HELO oberon.njm.me.uk) (81.155.116.165)
	by smtp004.apm-internet.net with SMTP; 11 May 2010 19:02:25 -0000
Received: from titania.njm.me.uk (titania.njm.me.uk [192.168.144.130])
	by oberon.njm.me.uk (8.14.4/8.14.4) with ESMTP id o4BJ2Pn9051986;
	Tue, 11 May 2010 20:02:25 +0100 (BST) (envelope-from njm@njm.me.uk)
Received: from titania.njm.me.uk (localhost [127.0.0.1])
	by titania.njm.me.uk (8.14.4/8.14.4) with ESMTP id o4BJ2OaI092587;
	Tue, 11 May 2010 20:02:24 +0100 (BST) (envelope-from njm@njm.me.uk)
Received: (from njm@localhost)
	by titania.njm.me.uk (8.14.4/8.14.4/Submit) id o4BJ2Oc8092586;
	Tue, 11 May 2010 20:02:24 +0100 (BST) (envelope-from njm@njm.me.uk)
Date: Tue, 11 May 2010 20:02:24 +0100
From: "N.J. Mann" 
To: Martin Matuska 
Message-ID: <20100511190224.GA90875@titania.njm.me.uk>
Mail-Followup-To: Martin Matuska ,
	src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
References: <201005101528.o4AFSiMx091913@svn.freebsd.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <201005101528.o4AFSiMx091913@svn.freebsd.org>
X-Operating-System: FreeBSD 7.3-STABLE
User-Agent: mutt-NJM (2010-05-06)
Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org,
	src-committers@FreeBSD.org
Subject: Re: svn commit: r207849 - in head: . lib/libarchive rescue/rescue
 usr.bin/ar usr.bin/cpio usr.bin/cpio/test usr.bin/tar usr.bin/tar/test
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 11 May 2010 19:02:28 -0000

In message <201005101528.o4AFSiMx091913@svn.freebsd.org>,
	 Martin Matuska (mm@FreeBSD.org) wrote:
> Author: mm
> Date: Mon May 10 15:28:44 2010
> New Revision: 207849
> URL: http://svn.freebsd.org/changeset/base/207849
> 
> Log:
>   Enable liblzma support in libarchive
>   Adjust dependencies for programs using libarchive
>   Add xz and linkage against liblzma to rescue system
>   
>   Approved by:	kientzle, delphij (mentor)
>   MFC after:	2 weeks
> 
> Modified:
>   head/Makefile.inc1
>   head/lib/libarchive/Makefile
>   head/rescue/rescue/Makefile
>   head/usr.bin/ar/Makefile
>   head/usr.bin/cpio/Makefile
>   head/usr.bin/cpio/test/Makefile
>   head/usr.bin/tar/Makefile
>   head/usr.bin/tar/test/Makefile
[...]

This commit breaks the build for me.  I am building on a i386 system
running FreeBSD 7.3-STABLE r205828.  Prior to this commit I could build
HEAD fine.  Here are the last few lines of the build up to the point it
fails:

===> usr.bin/ar (obj,depend,all,install)
/usr/obj/home/FreeBSD.svn/base/head/tmp/home/FreeBSD.svn/base/head/usr.bin/ar created for /home/FreeBSD.svn/base/head/usr.bin/ar
lex -t  /home/FreeBSD.svn/base/head/usr.bin/ar/acplex.l > acplex.c
yacc -d /home/FreeBSD.svn/base/head/usr.bin/ar/acpyacc.y
cp y.tab.c acpyacc.c
rm -f .depend
mkdep -f .depend -a    -I. -I/home/FreeBSD.svn/base/head/usr.bin/ar -I/usr/obj/home/FreeBSD.svn/base/head/tmp/legacy/usr/include /home/FreeBSD.svn/base/head/usr.bin/ar/ar.c acplex.c acpyacc.c /home/FreeBSD.svn/base/head/usr.bin/ar/read.c /home/FreeBSD.svn/base/head/usr.bin/ar/util.c /home/FreeBSD.svn/base/head/usr.bin/ar/write.c
echo ar: /usr/lib/libc.a /usr/lib/libarchive.a /usr/lib/libbz2.a /usr/lib/libz.a /usr/lib/liblzma.a /usr/lib/libelf.a /usr/obj/home/FreeBSD.svn/base/head/tmp/legacy/usr/lib/libegacy.a >> .depend
cc -O2 -pipe -I. -I/home/FreeBSD.svn/base/head/usr.bin/ar -std=gnu99   -I/usr/obj/home/FreeBSD.svn/base/head/tmp/legacy/usr/include -c /home/FreeBSD.svn/base/head/usr.bin/ar/ar.c
cc -O2 -pipe -I. -I/home/FreeBSD.svn/base/head/usr.bin/ar -std=gnu99   -I/usr/obj/home/FreeBSD.svn/base/head/tmp/legacy/usr/include -c acplex.c
cc -O2 -pipe -I. -I/home/FreeBSD.svn/base/head/usr.bin/ar -std=gnu99   -I/usr/obj/home/FreeBSD.svn/base/head/tmp/legacy/usr/include -c acpyacc.c
cc -O2 -pipe -I. -I/home/FreeBSD.svn/base/head/usr.bin/ar -std=gnu99   -I/usr/obj/home/FreeBSD.svn/base/head/tmp/legacy/usr/include -c /home/FreeBSD.svn/base/head/usr.bin/ar/read.c
cc -O2 -pipe -I. -I/home/FreeBSD.svn/base/head/usr.bin/ar -std=gnu99   -I/usr/obj/home/FreeBSD.svn/base/head/tmp/legacy/usr/include -c /home/FreeBSD.svn/base/head/usr.bin/ar/util.c
cc -O2 -pipe -I. -I/home/FreeBSD.svn/base/head/usr.bin/ar -std=gnu99   -I/usr/obj/home/FreeBSD.svn/base/head/tmp/legacy/usr/include -c /home/FreeBSD.svn/base/head/usr.bin/ar/write.c
make: don't know how to make /usr/lib/liblzma.a. Stop
*** Error code 2

Stop in /home/FreeBSD.svn/base/head.
*** Error code 1

Stop in /home/FreeBSD.svn/base/head.
*** Error code 1

Stop in /home/FreeBSD.svn/base/head.


I have removed my /etc/make.conf and /etc/src.conf and deleted /usr/obj
before starting the build.


Cheers,
       Nick.
-- 


From owner-svn-src-head@FreeBSD.ORG  Tue May 11 19:34:50 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4C6A1106564A;
	Tue, 11 May 2010 19:34:50 +0000 (UTC)
	(envelope-from yanefbsd@gmail.com)
Received: from mail-pz0-f174.google.com (mail-pz0-f174.google.com
	[209.85.222.174])
	by mx1.freebsd.org (Postfix) with ESMTP id 0BFC38FC1C;
	Tue, 11 May 2010 19:34:49 +0000 (UTC)
Received: by pzk4 with SMTP id 4so2637780pzk.7
	for ; Tue, 11 May 2010 12:34:49 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:received:received:subject:mime-version
	:content-type:from:in-reply-to:date:cc:content-transfer-encoding
	:message-id:references:to:x-mailer;
	bh=5M2mm8WR7czKYWSlcAtGjHWmWqEV2991+4hspZh7TMc=;
	b=md4MyIDZUgcURWGBaNZyfs+lfCkVhNgefmK377VwpL/0lYfVSFVUh7SlUKx8A4Ol8m
	nyB7C5IC3umedGihVjgvdV2s8IWsO70rWxH2s35OK6HT0TEz4KQmg4T6drRyz3582ykf
	QaarlrOSyNW7WoSUntuSzAAXkRp+ebLuJDc+g=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=subject:mime-version:content-type:from:in-reply-to:date:cc
	:content-transfer-encoding:message-id:references:to:x-mailer;
	b=uGpEzQeSeq+WhVlmsw4SC8VOGAP+emYZvphPSMQn782HsBqWyVhDe6CYBalEfFPNJm
	LbdvFOzumCHi3od8hopxD0yVTv5QgLp8sYYQ+s7RAE0Zc1fHT8ig+4xeCtJXWS5gkude
	rNAETrQ20IPZ4YnoZJ80i2VJLqO7169uCA/Og=
Received: by 10.143.193.8 with SMTP id v8mr3971952wfp.162.1273606489370;
	Tue, 11 May 2010 12:34:49 -0700 (PDT)
Received: from [172.24.100.15] ([192.75.139.254])
	by mx.google.com with ESMTPS id s21sm941947wff.0.2010.05.11.12.34.46
	(version=TLSv1/SSLv3 cipher=RC4-MD5);
	Tue, 11 May 2010 12:34:47 -0700 (PDT)
Mime-Version: 1.0 (Apple Message framework v1078)
Content-Type: text/plain; charset=us-ascii
From: Garrett Cooper 
In-Reply-To: <20100511190224.GA90875@titania.njm.me.uk>
Date: Tue, 11 May 2010 15:34:54 -0400
Content-Transfer-Encoding: quoted-printable
Message-Id: <25885E8D-93A9-47C7-BC55-AEE2D3773010@gmail.com>
References: <201005101528.o4AFSiMx091913@svn.freebsd.org>
	<20100511190224.GA90875@titania.njm.me.uk>
To: N.J. Mann 
X-Mailer: Apple Mail (2.1078)
Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org,
	src-committers@FreeBSD.org, Martin Matuska 
Subject: Re: svn commit: r207849 - in head: . lib/libarchive rescue/rescue
	usr.bin/ar usr.bin/cpio usr.bin/cpio/test usr.bin/tar
	usr.bin/tar/test
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 11 May 2010 19:34:50 -0000

On May 11, 2010, at 3:02 PM, N.J. Mann wrote:

> In message <201005101528.o4AFSiMx091913@svn.freebsd.org>,
> 	 Martin Matuska (mm@FreeBSD.org) wrote:
>> Author: mm
>> Date: Mon May 10 15:28:44 2010
>> New Revision: 207849
>> URL: http://svn.freebsd.org/changeset/base/207849
>>=20
>> Log:
>>  Enable liblzma support in libarchive
>>  Adjust dependencies for programs using libarchive
>>  Add xz and linkage against liblzma to rescue system
>>=20
>>  Approved by:	kientzle, delphij (mentor)
>>  MFC after:	2 weeks
>>=20
>> Modified:
>>  head/Makefile.inc1
>>  head/lib/libarchive/Makefile
>>  head/rescue/rescue/Makefile
>>  head/usr.bin/ar/Makefile
>>  head/usr.bin/cpio/Makefile
>>  head/usr.bin/cpio/test/Makefile
>>  head/usr.bin/tar/Makefile
>>  head/usr.bin/tar/test/Makefile
> [...]
>=20
> This commit breaks the build for me.  I am building on a i386 system
> running FreeBSD 7.3-STABLE r205828.  Prior to this commit I could =
build
> HEAD fine.  Here are the last few lines of the build up to the point =
it
> fails:
>=20
> =3D=3D=3D> usr.bin/ar (obj,depend,all,install)
> =
/usr/obj/home/FreeBSD.svn/base/head/tmp/home/FreeBSD.svn/base/head/usr.bin=
/ar created for /home/FreeBSD.svn/base/head/usr.bin/ar
> lex -t  /home/FreeBSD.svn/base/head/usr.bin/ar/acplex.l > acplex.c
> yacc -d /home/FreeBSD.svn/base/head/usr.bin/ar/acpyacc.y
> cp y.tab.c acpyacc.c
> rm -f .depend
> mkdep -f .depend -a    -I. -I/home/FreeBSD.svn/base/head/usr.bin/ar =
-I/usr/obj/home/FreeBSD.svn/base/head/tmp/legacy/usr/include =
/home/FreeBSD.svn/base/head/usr.bin/ar/ar.c acplex.c acpyacc.c =
/home/FreeBSD.svn/base/head/usr.bin/ar/read.c =
/home/FreeBSD.svn/base/head/usr.bin/ar/util.c =
/home/FreeBSD.svn/base/head/usr.bin/ar/write.c
> echo ar: /usr/lib/libc.a /usr/lib/libarchive.a /usr/lib/libbz2.a =
/usr/lib/libz.a /usr/lib/liblzma.a /usr/lib/libelf.a =
/usr/obj/home/FreeBSD.svn/base/head/tmp/legacy/usr/lib/libegacy.a >> =
.depend
> cc -O2 -pipe -I. -I/home/FreeBSD.svn/base/head/usr.bin/ar -std=3Dgnu99 =
  -I/usr/obj/home/FreeBSD.svn/base/head/tmp/legacy/usr/include -c =
/home/FreeBSD.svn/base/head/usr.bin/ar/ar.c
> cc -O2 -pipe -I. -I/home/FreeBSD.svn/base/head/usr.bin/ar -std=3Dgnu99 =
  -I/usr/obj/home/FreeBSD.svn/base/head/tmp/legacy/usr/include -c =
acplex.c
> cc -O2 -pipe -I. -I/home/FreeBSD.svn/base/head/usr.bin/ar -std=3Dgnu99 =
  -I/usr/obj/home/FreeBSD.svn/base/head/tmp/legacy/usr/include -c =
acpyacc.c
> cc -O2 -pipe -I. -I/home/FreeBSD.svn/base/head/usr.bin/ar -std=3Dgnu99 =
  -I/usr/obj/home/FreeBSD.svn/base/head/tmp/legacy/usr/include -c =
/home/FreeBSD.svn/base/head/usr.bin/ar/read.c
> cc -O2 -pipe -I. -I/home/FreeBSD.svn/base/head/usr.bin/ar -std=3Dgnu99 =
  -I/usr/obj/home/FreeBSD.svn/base/head/tmp/legacy/usr/include -c =
/home/FreeBSD.svn/base/head/usr.bin/ar/util.c
> cc -O2 -pipe -I. -I/home/FreeBSD.svn/base/head/usr.bin/ar -std=3Dgnu99 =
  -I/usr/obj/home/FreeBSD.svn/base/head/tmp/legacy/usr/include -c =
/home/FreeBSD.svn/base/head/usr.bin/ar/write.c
> make: don't know how to make /usr/lib/liblzma.a. Stop
> *** Error code 2
>=20
> Stop in /home/FreeBSD.svn/base/head.
> *** Error code 1
>=20
> Stop in /home/FreeBSD.svn/base/head.
> *** Error code 1
>=20
> Stop in /home/FreeBSD.svn/base/head.
>=20
>=20
> I have removed my /etc/make.conf and /etc/src.conf and deleted =
/usr/obj
> before starting the build.


Hi Nick,
	Please detail the steps that you did to actually reproduce the =
problem. Just to let you know though, piecewise updating of just =
libarchive isn't possible; you need to update some Makefiles and other =
pieces that Martin touched in the lzma import (in particular =
Makefile.inc1). Otherwise things will break quickly.
HTH,
-Garrett=

From owner-svn-src-head@FreeBSD.ORG  Tue May 11 20:03:54 2010
Return-Path: 
Delivered-To: svn-src-head@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C09E7106566C
	for ; Tue, 11 May 2010 20:03:54 +0000 (UTC)
	(envelope-from njm@njm.me.uk)
Received: from smtp004.apm-internet.net (smtp004.apm-internet.net
	[85.119.248.54]) by mx1.freebsd.org (Postfix) with SMTP id 2CE2E8FC0C
	for ; Tue, 11 May 2010 20:03:54 +0000 (UTC)
Received: (qmail 71996 invoked from network); 11 May 2010 20:03:53 -0000
Received: from unknown (HELO oberon.njm.me.uk) (81.155.116.165)
	by smtp004.apm-internet.net with SMTP; 11 May 2010 20:03:53 -0000
Received: from titania.njm.me.uk (titania.njm.me.uk [192.168.144.130])
	by oberon.njm.me.uk (8.14.4/8.14.4) with ESMTP id o4BK3qAF074111;
	Tue, 11 May 2010 21:03:52 +0100 (BST) (envelope-from njm@njm.me.uk)
Received: from titania.njm.me.uk (localhost [127.0.0.1])
	by titania.njm.me.uk (8.14.4/8.14.4) with ESMTP id o4BK3q10094284;
	Tue, 11 May 2010 21:03:52 +0100 (BST) (envelope-from njm@njm.me.uk)
Received: (from njm@localhost)
	by titania.njm.me.uk (8.14.4/8.14.4/Submit) id o4BK3qOj094283;
	Tue, 11 May 2010 21:03:52 +0100 (BST) (envelope-from njm@njm.me.uk)
Date: Tue, 11 May 2010 21:03:52 +0100
From: "N.J. Mann" 
To: Garrett Cooper 
Message-ID: <20100511200352.GB90875@titania.njm.me.uk>
Mail-Followup-To: Garrett Cooper ,
	svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org,
	src-committers@FreeBSD.org, Martin Matuska 
References: <201005101528.o4AFSiMx091913@svn.freebsd.org>
	<20100511190224.GA90875@titania.njm.me.uk>
	<25885E8D-93A9-47C7-BC55-AEE2D3773010@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <25885E8D-93A9-47C7-BC55-AEE2D3773010@gmail.com>
X-Operating-System: FreeBSD 7.3-STABLE
User-Agent: mutt-NJM (2010-05-06)
Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org,
	src-committers@FreeBSD.org, Martin Matuska 
Subject: Re: svn commit: r207849 - in head: . lib/libarchive rescue/rescue
 usr.bin/ar usr.bin/cpio usr.bin/cpio/test usr.bin/tar usr.bin/tar/test
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 11 May 2010 20:03:54 -0000

In message <25885E8D-93A9-47C7-BC55-AEE2D3773010@gmail.com>,
	Garrett Cooper (yanefbsd@gmail.com) wrote:
> Please detail the steps that you did to actually reproduce the problem.

I usually do a SVN update every day and then do a buildworld and buildkernel
(GENERIC and four other custom kernels) for head, stable/8 and stable/7.
Because the build box is an old dual-P3 machine that lot takes about 18
hours.  Also, I am preparing to update my desktop machine from 7-STABLE to
8-STABLE and so I didn't do a SVN update for a couple of days.  Hence, this
was the first time I had done a SVN update since lzma was imported to the
tree.

My usual procedure is:

1. remove any local patches
2. svn update
3. re-add local patches
4. buildworld in head
5. buildkernel in head (GENERIC and then custom kernels)
6. buildworld in stable/8
7. buildkernel in stable/8 (GENERIC and then custom kernels)
8. buildworld in stable/7
9. buildkernel in stable/7 (GENERIC and then custom kernels)

When I had the initial failure I immediately did a `rm -r /usr/obj' and
re-tried the build (step 4 above).  It failed again in the same place.  I
then moved my /usr/src.conf and /usr/make.conf aside, just in case, `rm -r
/usr/obj' again and re-tried the build.  It failed in the same place, so I
then started to a search to find which commit was causing the breakage:
207848 is okay, 207849 fails.

> Just to let you know though, piecewise updating of just libarchive isn't
> possible; you need to update some Makefiles and other pieces that Martin
> touched in the lzma import (in particular Makefile.inc1).
> Otherwise things will break quickly.

So, should I build 207848 and then update to 207849?  I think I must be
misunderstanding something here because I fail to see how that will work.
Please feel free to enlighten me.  :-)

Many thanks.


Cheers,
       Nick.
-- 


From owner-svn-src-head@FreeBSD.ORG  Tue May 11 20:08:59 2010
Return-Path: 
Delivered-To: svn-src-head@FreeBSD.ORG
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 283AA106564A;
	Tue, 11 May 2010 20:08:59 +0000 (UTC)
	(envelope-from delphij@delphij.net)
Received: from tarsier.geekcn.org (tarsier.geekcn.org [211.166.10.233])
	by mx1.freebsd.org (Postfix) with ESMTP id BD0CB8FC08;
	Tue, 11 May 2010 20:08:58 +0000 (UTC)
Received: from mail.geekcn.org (tarsier.geekcn.org [211.166.10.233])
	by tarsier.geekcn.org (Postfix) with ESMTP id 7BC53A672B6;
	Wed, 12 May 2010 04:08:27 +0800 (CST)
X-Virus-Scanned: amavisd-new at geekcn.org
Received: from tarsier.geekcn.org ([211.166.10.233])
	by mail.geekcn.org (mail.geekcn.org [211.166.10.233]) (amavisd-new,
	port 10024)
	with LMTP id TOe5+ztxvE5m; Wed, 12 May 2010 04:08:09 +0800 (CST)
Received: from delta.delphij.net (drawbridge.ixsystems.com [206.40.55.65])
	(using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits))
	(No client certificate requested)
	by tarsier.geekcn.org (Postfix) with ESMTPSA id 3D089A550AB;
	Wed, 12 May 2010 04:08:07 +0800 (CST)
DomainKey-Signature: a=rsa-sha1; s=default; d=delphij.net; c=nofws; q=dns;
	h=message-id:date:from:reply-to:organization:user-agent:
	mime-version:to:cc:subject:references:in-reply-to:
	x-enigmail-version:openpgp:content-type:content-transfer-encoding;
	b=OcpGRm2ibAA5KDo3nkdX4dZlnuAPDSI8BouiMJYJeIfExTmmSDjoH8g1KeAcN8A5D
	3LqpcryPoMKxfrH6tq1oQ==
Message-ID: <4BE9B923.9020800@delphij.net>
Date: Tue, 11 May 2010 13:08:03 -0700
From: Xin LI 
Organization: The Geek China Organization
User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US;
	rv:1.9.1.9) Gecko/20100408 Thunderbird/3.0.4 ThunderBrowse/3.2.8.1
MIME-Version: 1.0
To: Garrett Cooper 
References: <201005101528.o4AFSiMx091913@svn.freebsd.org>
	<20100511190224.GA90875@titania.njm.me.uk>
	<25885E8D-93A9-47C7-BC55-AEE2D3773010@gmail.com>
In-Reply-To: <25885E8D-93A9-47C7-BC55-AEE2D3773010@gmail.com>
X-Enigmail-Version: 1.0.1
OpenPGP: id=3FCA37C1;
	url=http://www.delphij.net/delphij.asc
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Cc: svn-src-head@FreeBSD.ORG, svn-src-all@FreeBSD.ORG,
	src-committers@FreeBSD.ORG, Martin Matuska ,
	"N.J. Mann" 
Subject: Re: svn commit: r207849 - in head: . lib/libarchive rescue/rescue
 usr.bin/ar usr.bin/cpio usr.bin/cpio/test usr.bin/tar usr.bin/tar/test
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
Reply-To: d@delphij.net
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 11 May 2010 20:08:59 -0000

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 2010/05/11 12:34, Garrett Cooper wrote:
> Hi Nick,
> 	Please detail the steps that you did to actually reproduce the problem. Just to let you know though, piecewise updating of just libarchive isn't possible; you need to update some Makefiles and other pieces that Martin touched in the lzma import (in particular Makefile.inc1). Otherwise things will break quickly.

I don't think there is anything wrong with Nick's procedure, I am able
to reproduce this on ref7.  Figuring out why this would happen...

Cheers,
- -- 
Xin LI 	http://www.delphij.net/
FreeBSD - The Power to Serve!	       Live free or die
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (FreeBSD)

iQEcBAEBAgAGBQJL6bkjAAoJEATO+BI/yjfBiHwH/1iCBXPC+07tNc/luBwDub3v
fl5t4DSassr6QAZ9GEK3q2TQtbnOCtBPaEU70AgjX+7UHnzUQc9+4Dpyz8wVGpXB
L5SP1hDXKPhwmbzadUbk6xPS2k7AMdcJVhedf13TR6T7WRDKfudx90wYhtC3FSKZ
zPla/IIrBHuNb4sHgSBRZdpdpcmi+exi4wXQjGPER7MwRGT3snlK8YPSClS/7M5R
NrghOA9EEQ1xCK4sGX3PcUX45RG+Fm+QSMe7iiYzDXNWzxZ7Qr+lBYqISilEM+hC
luZHFPCswmAinh/XgCVCM/CYHBCvi5fRHnmE0ykAxD4bwmgu1ODSVXnsmZSOO8k=
=5qQt
-----END PGP SIGNATURE-----

From owner-svn-src-head@FreeBSD.ORG  Tue May 11 22:22:02 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 27E311065670;
	Tue, 11 May 2010 22:22:02 +0000 (UTC)
	(envelope-from mjacob@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 1762A8FC18;
	Tue, 11 May 2010 22:22:02 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4BMM1MA012876;
	Tue, 11 May 2010 22:22:01 GMT (envelope-from mjacob@svn.freebsd.org)
Received: (from mjacob@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4BMM1uq012874;
	Tue, 11 May 2010 22:22:01 GMT (envelope-from mjacob@svn.freebsd.org)
Message-Id: <201005112222.o4BMM1uq012874@svn.freebsd.org>
From: Matt Jacob 
Date: Tue, 11 May 2010 22:22:01 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r207933 - head/sys/cam/scsi
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 11 May 2010 22:22:02 -0000

Author: mjacob
Date: Tue May 11 22:22:01 2010
New Revision: 207933
URL: http://svn.freebsd.org/changeset/base/207933

Log:
  Deal sensibly with more than 26 sg devices. It isn't a complete
  solution.
  
  Sponsored by:   Panasas
  MFC after:	1 week

Modified:
  head/sys/cam/scsi/scsi_sg.c

Modified: head/sys/cam/scsi/scsi_sg.c
==============================================================================
--- head/sys/cam/scsi/scsi_sg.c	Tue May 11 21:07:47 2010	(r207932)
+++ head/sys/cam/scsi/scsi_sg.c	Tue May 11 22:22:01 2010	(r207933)
@@ -303,7 +303,12 @@ sgregister(struct cam_periph *periph, vo
 	softc->dev = make_dev(&sg_cdevsw, periph->unit_number,
 			      UID_ROOT, GID_OPERATOR, 0600, "%s%d",
 			      periph->periph_name, periph->unit_number);
-	(void)make_dev_alias(softc->dev, "sg%c", 'a' + periph->unit_number);
+	if (periph->unit_number < 26) {
+		(void)make_dev_alias(softc->dev, "sg%c", periph->unit_number + 'a');
+	} else {
+		(void)make_dev_alias(softc->dev, "sg%c%c",
+		    ((periph->unit_number / 26) - 1) + 'a', periph->unit_number + 'a');
+	}
 	cam_periph_lock(periph);
 	softc->dev->si_drv1 = periph;
 

From owner-svn-src-head@FreeBSD.ORG  Tue May 11 22:23:36 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2E6971065673;
	Tue, 11 May 2010 22:23:36 +0000 (UTC) (envelope-from pjd@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 1D8938FC14;
	Tue, 11 May 2010 22:23:36 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4BMNadk013235;
	Tue, 11 May 2010 22:23:36 GMT (envelope-from pjd@svn.freebsd.org)
Received: (from pjd@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4BMNZjv013233;
	Tue, 11 May 2010 22:23:36 GMT (envelope-from pjd@svn.freebsd.org)
Message-Id: <201005112223.o4BMNZjv013233@svn.freebsd.org>
From: Pawel Jakub Dawidek 
Date: Tue, 11 May 2010 22:23:35 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r207934 -
	head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 11 May 2010 22:23:36 -0000

Author: pjd
Date: Tue May 11 22:23:35 2010
New Revision: 207934
URL: http://svn.freebsd.org/changeset/base/207934

Log:
  Add missing new line characters to the warnings.
  
  MFC after:	3 days

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c	Tue May 11 22:22:01 2010	(r207933)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c	Tue May 11 22:23:35 2010	(r207934)
@@ -396,7 +396,7 @@ vdev_geom_attach_by_guid_event(void *arg
 					continue;
 				ap->cp = vdev_geom_attach(pp);
 				if (ap->cp == NULL) {
-					printf("ZFS WARNING: Unable to attach to %s.",
+					printf("ZFS WARNING: Unable to attach to %s.\n",
 					    pp->name);
 					continue;
 				}
@@ -533,7 +533,7 @@ vdev_geom_open(vdev_t *vd, uint64_t *psi
 		g_topology_lock();
 		error = g_access(cp, 0, 1, 0);
 		if (error != 0) {
-			printf("ZFS WARNING: Unable to open %s for writing (error=%d).",
+			printf("ZFS WARNING: Unable to open %s for writing (error=%d).\n",
 			    vd->vdev_path, error);
 			vdev_geom_detach(cp, 0);
 			cp = NULL;

From owner-svn-src-head@FreeBSD.ORG  Tue May 11 22:28:55 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id BFC84106566C;
	Tue, 11 May 2010 22:28:55 +0000 (UTC)
	(envelope-from jilles@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 959A18FC19;
	Tue, 11 May 2010 22:28:55 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4BMStih014502;
	Tue, 11 May 2010 22:28:55 GMT (envelope-from jilles@svn.freebsd.org)
Received: (from jilles@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4BMStlD014501;
	Tue, 11 May 2010 22:28:55 GMT (envelope-from jilles@svn.freebsd.org)
Message-Id: <201005112228.o4BMStlD014501@svn.freebsd.org>
From: Jilles Tjoelker 
Date: Tue, 11 May 2010 22:28:55 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r207935 - head/tools/regression/bin/sh/expansion
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 11 May 2010 22:28:55 -0000

Author: jilles
Date: Tue May 11 22:28:55 2010
New Revision: 207935
URL: http://svn.freebsd.org/changeset/base/207935

Log:
  sh: Add some simple testcases for pathname expansion.

Added:
  head/tools/regression/bin/sh/expansion/pathname1.0   (contents, props changed)

Added: head/tools/regression/bin/sh/expansion/pathname1.0
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/tools/regression/bin/sh/expansion/pathname1.0	Tue May 11 22:28:55 2010	(r207935)
@@ -0,0 +1,61 @@
+# $FreeBSD$
+
+failures=0
+
+check() {
+	testcase=$1
+	expect=$2
+	eval "set -- $testcase"
+	actual="$*"
+	if [ "$actual" != "$expect" ]; then
+		failures=$((failures+1))
+		printf '%s\n' "For $testcase, expected $expect actual $actual"
+	fi
+}
+
+set -e
+T=$(mktemp -d ${TMPDIR:-/tmp}/sh-test.XXXXXX)
+trap 'rm -rf $T' 0
+cd -P $T
+
+mkdir testdir testdir2 'testdir/*' 'testdir/?' testdir/a testdir/b testdir2/b
+mkdir testdir2/.c
+touch testf 'testdir/*/1' 'testdir/?/1' testdir/a/1 testdir/b/1 testdir2/b/.a
+
+check '' ''
+check 'testdir/b' 'testdir/b'
+check 'testdir/c' 'testdir/c'
+check '\*' '*'
+check '\?' '?'
+check '*' 'testdir testdir2 testf'
+check '*""' 'testdir testdir2 testf'
+check '""*' 'testdir testdir2 testf'
+check '*/' 'testdir/ testdir2/'
+check 'testdir*/a' 'testdir/a'
+check 'testdir*/b' 'testdir/b testdir2/b'
+check '*/.c' 'testdir2/.c'
+check 'testdir2/*' 'testdir2/b'
+check 'testdir2/b/*' 'testdir2/b/*'
+check 'testdir/*' 'testdir/* testdir/? testdir/a testdir/b'
+check 'testdir/*/1' 'testdir/*/1 testdir/?/1 testdir/a/1 testdir/b/1'
+check '"testdir/"*/1' 'testdir/*/1 testdir/?/1 testdir/a/1 testdir/b/1'
+check 'testdir/\*/*' 'testdir/*/1'
+check 'testdir/\?/*' 'testdir/?/1'
+check 'testdir/"?"/*' 'testdir/?/1'
+check '"testdir"/"?"/*' 'testdir/?/1'
+check '"testdir"/"?"*/*' 'testdir/?/1'
+check '"testdir"/*"?"/*' 'testdir/?/1'
+check '"testdir/?"*/*' 'testdir/?/1'
+check 'testdir/\*/' 'testdir/*/'
+check 'testdir/\?/' 'testdir/?/'
+check 'testdir/"?"/' 'testdir/?/'
+check '"testdir"/"?"/' 'testdir/?/'
+check '"testdir"/"?"*/' 'testdir/?/'
+check '"testdir"/*"?"/' 'testdir/?/'
+check '"testdir/?"*/' 'testdir/?/'
+check 'testdir/[*]/' 'testdir/*/'
+check 'testdir/[?]/' 'testdir/?/'
+check 'testdir/[*?]/' 'testdir/*/ testdir/?/'
+check '[tz]estdir/[*]/' 'testdir/*/'
+
+exit $((failures != 0))

From owner-svn-src-head@FreeBSD.ORG  Tue May 11 22:29:00 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 72679106564A;
	Tue, 11 May 2010 22:29:00 +0000 (UTC) (envelope-from pjd@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 614288FC1A;
	Tue, 11 May 2010 22:29:00 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4BMT0L8014540;
	Tue, 11 May 2010 22:29:00 GMT (envelope-from pjd@svn.freebsd.org)
Received: (from pjd@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4BMT08P014538;
	Tue, 11 May 2010 22:29:00 GMT (envelope-from pjd@svn.freebsd.org)
Message-Id: <201005112229.o4BMT08P014538@svn.freebsd.org>
From: Pawel Jakub Dawidek 
Date: Tue, 11 May 2010 22:29:00 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r207936 -
	head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 11 May 2010 22:29:00 -0000

Author: pjd
Date: Tue May 11 22:29:00 2010
New Revision: 207936
URL: http://svn.freebsd.org/changeset/base/207936

Log:
  Eventhough r203504 eliminates taste traffic provoked by vdev_geom.c,
  ZFS still like to open all vdevs, close them and open them again,
  which in turn provokes taste traffic anyway.
  
  I don't know of any clean way to fix it, so do it the hard way - if we can't
  open provider for writing just retry 5 times with 0.5 pauses. This should
  elimitate accidental races caused by other classes tasting providers created on
  top of our vdevs.
  
  MFC after:	3 days
  Reported by:	James R. Van Artsdalen 
  Reported by:	Yuri Pankov 

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c	Tue May 11 22:28:55 2010	(r207935)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c	Tue May 11 22:29:00 2010	(r207936)
@@ -530,8 +530,17 @@ vdev_geom_open(vdev_t *vd, uint64_t *psi
 		ZFS_LOG(1, "Provider %s not found.", vd->vdev_path);
 		error = ENOENT;
 	} else if (cp->acw == 0 && (spa_mode & FWRITE) != 0) {
+		int i;
+
 		g_topology_lock();
-		error = g_access(cp, 0, 1, 0);
+		for (i = 0; i < 5; i++) {
+			error = g_access(cp, 0, 1, 0);
+			if (error == 0)
+				break;
+			g_topology_unlock();
+			tsleep(vd, 0, "vdev", hz / 2);
+			g_topology_lock();
+		}
 		if (error != 0) {
 			printf("ZFS WARNING: Unable to open %s for writing (error=%d).\n",
 			    vd->vdev_path, error);

From owner-svn-src-head@FreeBSD.ORG  Tue May 11 22:46:36 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id EFC6C106566C;
	Tue, 11 May 2010 22:46:36 +0000 (UTC) (envelope-from pjd@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44])
	by mx1.freebsd.org (Postfix) with ESMTP id DEACC8FC1B;
	Tue, 11 May 2010 22:46:36 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4BMkaQB018391;
	Tue, 11 May 2010 22:46:36 GMT (envelope-from pjd@svn.freebsd.org)
Received: (from pjd@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4BMkan5018387;
	Tue, 11 May 2010 22:46:36 GMT (envelope-from pjd@svn.freebsd.org)
Message-Id: <201005112246.o4BMkan5018387@svn.freebsd.org>
From: Pawel Jakub Dawidek 
Date: Tue, 11 May 2010 22:46:36 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r207937 - in head/sys: cddl/compat/opensolaris/sys kern
	sys
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 11 May 2010 22:46:37 -0000

Author: pjd
Date: Tue May 11 22:46:36 2010
New Revision: 207937
URL: http://svn.freebsd.org/changeset/base/207937

Log:
  I added vfs_lowvnodes event, but it was only used for a short while and now
  it is totally unused. Remove it.
  
  MFC after:	3 days

Modified:
  head/sys/cddl/compat/opensolaris/sys/dnlc.h
  head/sys/kern/vfs_subr.c
  head/sys/sys/eventhandler.h

Modified: head/sys/cddl/compat/opensolaris/sys/dnlc.h
==============================================================================
--- head/sys/cddl/compat/opensolaris/sys/dnlc.h	Tue May 11 22:29:00 2010	(r207936)
+++ head/sys/cddl/compat/opensolaris/sys/dnlc.h	Tue May 11 22:46:36 2010	(r207937)
@@ -35,6 +35,6 @@
 #define	dnlc_update(dvp, name, vp)	do { } while (0)
 #define	dnlc_remove(dvp, name)		do { } while (0)
 #define	dnlc_purge_vfsp(vfsp, count)	(0)
-#define	dnlc_reduce_cache(percent)	EVENTHANDLER_INVOKE(vfs_lowvnodes, (int)(intptr_t)(percent))
+#define	dnlc_reduce_cache(percent)	do { } while (0)
 
 #endif	/* !_OPENSOLARIS_SYS_DNLC_H_ */

Modified: head/sys/kern/vfs_subr.c
==============================================================================
--- head/sys/kern/vfs_subr.c	Tue May 11 22:29:00 2010	(r207936)
+++ head/sys/kern/vfs_subr.c	Tue May 11 22:46:36 2010	(r207937)
@@ -800,7 +800,6 @@ vnlru_proc(void)
 		}
 		mtx_unlock(&mountlist_mtx);
 		if (done == 0) {
-			EVENTHANDLER_INVOKE(vfs_lowvnodes, desiredvnodes / 10);
 #if 0
 			/* These messages are temporary debugging aids */
 			if (vnlru_nowhere < 5)

Modified: head/sys/sys/eventhandler.h
==============================================================================
--- head/sys/sys/eventhandler.h	Tue May 11 22:29:00 2010	(r207936)
+++ head/sys/sys/eventhandler.h	Tue May 11 22:46:36 2010	(r207937)
@@ -183,10 +183,6 @@ typedef void (*vm_lowmem_handler_t)(void
 #define	LOWMEM_PRI_DEFAULT	EVENTHANDLER_PRI_FIRST
 EVENTHANDLER_DECLARE(vm_lowmem, vm_lowmem_handler_t);
 
-/* Low vnodes event */
-typedef void (*vfs_lowvnodes_handler_t)(void *, int);
-EVENTHANDLER_DECLARE(vfs_lowvnodes, vfs_lowvnodes_handler_t);
-
 /* Root mounted event */
 typedef void (*mountroot_handler_t)(void *);
 EVENTHANDLER_DECLARE(mountroot, mountroot_handler_t);

From owner-svn-src-head@FreeBSD.ORG  Tue May 11 22:51:15 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 2ECA9106564A;
	Tue, 11 May 2010 22:51:15 +0000 (UTC)
	(envelope-from mjacob@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44])
	by mx1.freebsd.org (Postfix) with ESMTP id B122C8FC12;
	Tue, 11 May 2010 22:51:13 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4BMpDfj019435;
	Tue, 11 May 2010 22:51:13 GMT (envelope-from mjacob@svn.freebsd.org)
Received: (from mjacob@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4BMpDAW019433;
	Tue, 11 May 2010 22:51:13 GMT (envelope-from mjacob@svn.freebsd.org)
Message-Id: <201005112251.o4BMpDAW019433@svn.freebsd.org>
From: Matt Jacob 
Date: Tue, 11 May 2010 22:51:13 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r207938 - head/sys/cam/scsi
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 11 May 2010 22:51:15 -0000

Author: mjacob
Date: Tue May 11 22:51:13 2010
New Revision: 207938
URL: http://svn.freebsd.org/changeset/base/207938

Log:
  Pick up the right change, not it's close cousin. The one
  previously submitted was wrong.
  
  Point hat:      mjacob
  X-MFC:          207933
  MFC after:	1 week

Modified:
  head/sys/cam/scsi/scsi_sg.c

Modified: head/sys/cam/scsi/scsi_sg.c
==============================================================================
--- head/sys/cam/scsi/scsi_sg.c	Tue May 11 22:46:36 2010	(r207937)
+++ head/sys/cam/scsi/scsi_sg.c	Tue May 11 22:51:13 2010	(r207938)
@@ -304,10 +304,12 @@ sgregister(struct cam_periph *periph, vo
 			      UID_ROOT, GID_OPERATOR, 0600, "%s%d",
 			      periph->periph_name, periph->unit_number);
 	if (periph->unit_number < 26) {
-		(void)make_dev_alias(softc->dev, "sg%c", periph->unit_number + 'a');
+		(void)make_dev_alias(softc->dev, "sg%c",
+		    periph->unit_number + 'a');
 	} else {
 		(void)make_dev_alias(softc->dev, "sg%c%c",
-		    ((periph->unit_number / 26) - 1) + 'a', periph->unit_number + 'a');
+		    ((periph->unit_number / 26) - 1) + 'a',
+		    (periph->unit_number % 26) + 'a');
 	}
 	cam_periph_lock(periph);
 	softc->dev->si_drv1 = periph;

From owner-svn-src-head@FreeBSD.ORG  Tue May 11 23:08:07 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 7121D1065677;
	Tue, 11 May 2010 23:08:07 +0000 (UTC) (envelope-from uqs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44])
	by mx1.freebsd.org (Postfix) with ESMTP id 60B468FC1C;
	Tue, 11 May 2010 23:08:07 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4BN8780023133;
	Tue, 11 May 2010 23:08:07 GMT (envelope-from uqs@svn.freebsd.org)
Received: (from uqs@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4BN87Dv023131;
	Tue, 11 May 2010 23:08:07 GMT (envelope-from uqs@svn.freebsd.org)
Message-Id: <201005112308.o4BN87Dv023131@svn.freebsd.org>
From: Ulrich Spoerlein 
Date: Tue, 11 May 2010 23:08:07 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r207939 - head/share/misc
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 11 May 2010 23:08:07 -0000

Author: uqs
Date: Tue May 11 23:08:07 2010
New Revision: 207939
URL: http://svn.freebsd.org/changeset/base/207939

Log:
  mdoc: fix prologue order in mdoc template
  
  Reviewed by:	brueffer

Modified:
  head/share/misc/mdoc.template

Modified: head/share/misc/mdoc.template
==============================================================================
--- head/share/misc/mdoc.template	Tue May 11 22:51:13 2010	(r207938)
+++ head/share/misc/mdoc.template	Tue May 11 23:08:07 2010	(r207939)
@@ -2,8 +2,8 @@
 .\"
 .\" The following requests are required for all man pages.
 .Dd Month day, year
-.Os [OPERATING_SYSTEM] [version/release]
 .Dt DOCUMENT_TITLE [section number] [architecture/volume]
+.Os [OPERATING_SYSTEM] [version/release]
 .Sh NAME
 .Nm name
 .Nd one line description of name

From owner-svn-src-head@FreeBSD.ORG  Tue May 11 23:08:15 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id A1D93106566B;
	Tue, 11 May 2010 23:08:15 +0000 (UTC) (envelope-from uqs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44])
	by mx1.freebsd.org (Postfix) with ESMTP id 914FB8FC15;
	Tue, 11 May 2010 23:08:15 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4BN8FjI023201;
	Tue, 11 May 2010 23:08:15 GMT (envelope-from uqs@svn.freebsd.org)
Received: (from uqs@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4BN8Fft023198;
	Tue, 11 May 2010 23:08:15 GMT (envelope-from uqs@svn.freebsd.org)
Message-Id: <201005112308.o4BN8Fft023198@svn.freebsd.org>
From: Ulrich Spoerlein 
Date: Tue, 11 May 2010 23:08:15 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r207940 - head/lib/libc/stdio
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 11 May 2010 23:08:15 -0000

Author: uqs
Date: Tue May 11 23:08:15 2010
New Revision: 207940
URL: http://svn.freebsd.org/changeset/base/207940

Log:
  mdoc: use macro for +- that is understood by mdocml
  
  Reviewed by:	brueffer

Modified:
  head/lib/libc/stdio/printf.3
  head/lib/libc/stdio/wprintf.3

Modified: head/lib/libc/stdio/printf.3
==============================================================================
--- head/lib/libc/stdio/printf.3	Tue May 11 23:08:07 2010	(r207939)
+++ head/lib/libc/stdio/printf.3	Tue May 11 23:08:15 2010	(r207940)
@@ -449,7 +449,7 @@ The
 .Vt double
 argument is rounded and converted in the style
 .Sm off
-.Oo \- Oc Ar d Li \&. Ar ddd Li e \\*[Pm] Ar dd
+.Oo \- Oc Ar d Li \&. Ar ddd Li e \(+- Ar dd
 .Sm on
 where there is one digit before the
 decimal-point character
@@ -525,7 +525,7 @@ The
 .Vt double
 argument is rounded and converted to hexadecimal notation in the style
 .Sm off
-.Oo \- Oc Li 0x Ar h Li \&. Ar hhhp Oo \\*[Pm] Oc Ar d ,
+.Oo \- Oc Li 0x Ar h Li \&. Ar hhhp Oo \(+- Oc Ar d ,
 .Sm on
 where the number of digits after the hexadecimal-point character
 is equal to the precision specification.

Modified: head/lib/libc/stdio/wprintf.3
==============================================================================
--- head/lib/libc/stdio/wprintf.3	Tue May 11 23:08:07 2010	(r207939)
+++ head/lib/libc/stdio/wprintf.3	Tue May 11 23:08:15 2010	(r207940)
@@ -376,7 +376,7 @@ The
 .Vt double
 argument is rounded and converted in the style
 .Sm off
-.Oo \- Oc Ar d Li \&. Ar ddd Li e \\*[Pm] Ar dd
+.Oo \- Oc Ar d Li \&. Ar ddd Li e \(+- Ar dd
 .Sm on
 where there is one digit before the
 decimal-point character
@@ -452,7 +452,7 @@ The
 .Vt double
 argument is converted to hexadecimal notation in the style
 .Sm off
-.Oo \- Oc Li 0x Ar h Li \&. Ar hhhp Oo \\*[Pm] Oc Ar d ,
+.Oo \- Oc Li 0x Ar h Li \&. Ar hhhp Oo \(+- Oc Ar d ,
 .Sm on
 where the number of digits after the hexadecimal-point character
 is equal to the precision specification.

From owner-svn-src-head@FreeBSD.ORG  Tue May 11 23:08:23 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 52243106564A;
	Tue, 11 May 2010 23:08:23 +0000 (UTC) (envelope-from uqs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44])
	by mx1.freebsd.org (Postfix) with ESMTP id 285208FC14;
	Tue, 11 May 2010 23:08:23 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4BN8Nhw023267;
	Tue, 11 May 2010 23:08:23 GMT (envelope-from uqs@svn.freebsd.org)
Received: (from uqs@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4BN8NE4023265;
	Tue, 11 May 2010 23:08:23 GMT (envelope-from uqs@svn.freebsd.org)
Message-Id: <201005112308.o4BN8NE4023265@svn.freebsd.org>
From: Ulrich Spoerlein 
Date: Tue, 11 May 2010 23:08:23 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r207941 - head/usr.bin/chpass
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 11 May 2010 23:08:23 -0000

Author: uqs
Date: Tue May 11 23:08:22 2010
New Revision: 207941
URL: http://svn.freebsd.org/changeset/base/207941

Log:
  mdoc: remove stray and
  
  Found via:	mdocml
  Reviewed by:	brueffer

Modified:
  head/usr.bin/chpass/chpass.1

Modified: head/usr.bin/chpass/chpass.1
==============================================================================
--- head/usr.bin/chpass/chpass.1	Tue May 11 23:08:15 2010	(r207940)
+++ head/usr.bin/chpass/chpass.1	Tue May 11 23:08:22 2010	(r207941)
@@ -479,7 +479,6 @@ the list of approved shells
 .Xr vipw 8
 .Rs
 .%A Robert Morris
-and
 .%A Ken Thompson
 .%T "UNIX Password security"
 .Re

From owner-svn-src-head@FreeBSD.ORG  Tue May 11 23:08:31 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 6CFE21065670;
	Tue, 11 May 2010 23:08:31 +0000 (UTC) (envelope-from uqs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44])
	by mx1.freebsd.org (Postfix) with ESMTP id 5CB258FC1A;
	Tue, 11 May 2010 23:08:31 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4BN8Vv0023335;
	Tue, 11 May 2010 23:08:31 GMT (envelope-from uqs@svn.freebsd.org)
Received: (from uqs@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4BN8VLg023332;
	Tue, 11 May 2010 23:08:31 GMT (envelope-from uqs@svn.freebsd.org)
Message-Id: <201005112308.o4BN8VLg023332@svn.freebsd.org>
From: Ulrich Spoerlein 
Date: Tue, 11 May 2010 23:08:31 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r207942 - in head/lib: libc/stdio libelf
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 11 May 2010 23:08:31 -0000

Author: uqs
Date: Tue May 11 23:08:31 2010
New Revision: 207942
URL: http://svn.freebsd.org/changeset/base/207942

Log:
  mdoc: fix parenthesis
  
  Reviewed by:	brueffer

Modified:
  head/lib/libc/stdio/fopen.3
  head/lib/libelf/elf.3

Modified: head/lib/libc/stdio/fopen.3
==============================================================================
--- head/lib/libc/stdio/fopen.3	Tue May 11 23:08:22 2010	(r207941)
+++ head/lib/libc/stdio/fopen.3	Tue May 11 23:08:31 2010	(r207942)
@@ -104,7 +104,7 @@ This is strictly for compatibility with
 and has no effect; the ``b'' is ignored.
 .Pp
 Any created files will have mode
-.Pf \\*q Dv S_IRUSR
+.Do Dv S_IRUSR
 \&|
 .Dv S_IWUSR
 \&|
@@ -114,7 +114,7 @@ Any created files will have mode
 \&|
 .Dv S_IROTH
 \&|
-.Dv S_IWOTH Ns \\*q
+.Dv S_IWOTH Dc
 .Pq Li 0666 ,
 as modified by the process'
 umask value (see

Modified: head/lib/libelf/elf.3
==============================================================================
--- head/lib/libelf/elf.3	Tue May 11 23:08:22 2010	(r207941)
+++ head/lib/libelf/elf.3	Tue May 11 23:08:31 2010	(r207942)
@@ -111,11 +111,13 @@ constraints.
 Accordingly, the
 .Xr ELF 3
 library offers translation facilities
-.Xr ( elf32_xlatetof 3 ,
+.Po
+.Xr elf32_xlatetof 3 ,
 .Xr elf32_xlatetom 3 ,
 .Xr elf64_xlatetof 3
 and
-.Xr elf64_xlatetom 3 )
+.Xr elf64_xlatetom 3
+.Pc
 to and from these
 representations and also provides higher-level APIs that retrieve and store
 data from the ELF object in a transparent manner.

From owner-svn-src-head@FreeBSD.ORG  Tue May 11 23:08:39 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 52C02106564A;
	Tue, 11 May 2010 23:08:39 +0000 (UTC) (envelope-from uqs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44])
	by mx1.freebsd.org (Postfix) with ESMTP id 424528FC20;
	Tue, 11 May 2010 23:08:39 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4BN8dHI023401;
	Tue, 11 May 2010 23:08:39 GMT (envelope-from uqs@svn.freebsd.org)
Received: (from uqs@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4BN8dIA023399;
	Tue, 11 May 2010 23:08:39 GMT (envelope-from uqs@svn.freebsd.org)
Message-Id: <201005112308.o4BN8dIA023399@svn.freebsd.org>
From: Ulrich Spoerlein 
Date: Tue, 11 May 2010 23:08:39 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r207943 - head/lib/libc/locale
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 11 May 2010 23:08:39 -0000

Author: uqs
Date: Tue May 11 23:08:38 2010
New Revision: 207943
URL: http://svn.freebsd.org/changeset/base/207943

Log:
  mdoc: simplify quotation scheme
  
  Reviewed by:	brueffer

Modified:
  head/lib/libc/locale/isblank.3

Modified: head/lib/libc/locale/isblank.3
==============================================================================
--- head/lib/libc/locale/isblank.3	Tue May 11 23:08:31 2010	(r207942)
+++ head/lib/libc/locale/isblank.3	Tue May 11 23:08:38 2010	(r207943)
@@ -45,9 +45,8 @@ The
 .Fn isblank
 function tests for a space or tab character.
 For any locale, this includes the following standard characters:
-.Pp
-.Bl -column \&`\et''___ \&``\et''___
-.It "\&``\et''\t`` ''"
+.Bl -column XXXX
+.It Do \et Dc Ta Dq " "
 .El
 .Pp
 In the "C" locale, a successful

From owner-svn-src-head@FreeBSD.ORG  Tue May 11 23:19:28 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id C12891065673;
	Tue, 11 May 2010 23:19:28 +0000 (UTC)
	(envelope-from jilles@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44])
	by mx1.freebsd.org (Postfix) with ESMTP id AF9218FC13;
	Tue, 11 May 2010 23:19:28 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4BNJSKg025793;
	Tue, 11 May 2010 23:19:28 GMT (envelope-from jilles@svn.freebsd.org)
Received: (from jilles@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4BNJSl2025790;
	Tue, 11 May 2010 23:19:28 GMT (envelope-from jilles@svn.freebsd.org)
Message-Id: <201005112319.o4BNJSl2025790@svn.freebsd.org>
From: Jilles Tjoelker 
Date: Tue, 11 May 2010 23:19:28 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r207944 - in head: bin/sh
	tools/regression/bin/sh/expansion
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 11 May 2010 23:19:28 -0000

Author: jilles
Date: Tue May 11 23:19:28 2010
New Revision: 207944
URL: http://svn.freebsd.org/changeset/base/207944

Log:
  sh: Fix pathname expansion with quoted slashes like *\/.
  
  These are git commits 36f0fa8fcbc8c7b2b194addd29100fb40e73e4e9 and
  d6d06ff5c2ea0fa44becc5ef4340e5f2f15073e4 in dash.
  
  Because this is the first code I'm importing from dash to expand.c, add the
  Herbert Xu copyright notice which is in dash's expand.c.
  
  When pathname expanding *\/, the CTLESC representing the quoted state was
  erroneously taken as part of the * pathname component. This CTLESC was then
  seen by the pattern matching code as escaping the '\0' terminating the
  string.
  
  The code is slightly different because dash converts the CTLESC characters
  to backslashes and removes all the other CTL* characters to allow
  substituting glob(3).
  
  The effect of the bug was also slightly different from dash (where nothing
  matched at all). Because a CTLESC can escape a '\0' in some way, whether
  files were included despite the bug depended on memory that should not be
  read. In particular, on many machines /*\/ expanded to a strict subset of
  what /*/ expanded to.
  
  Example:
    echo /*"/null"
  
  This should print /dev/null, not /*/null.
  
  PR:		bin/146378
  Obtained from:	dash

Added:
  head/tools/regression/bin/sh/expansion/pathname2.0   (contents, props changed)
Modified:
  head/bin/sh/expand.c

Modified: head/bin/sh/expand.c
==============================================================================
--- head/bin/sh/expand.c	Tue May 11 23:08:38 2010	(r207943)
+++ head/bin/sh/expand.c	Tue May 11 23:19:28 2010	(r207944)
@@ -1,6 +1,8 @@
 /*-
  * Copyright (c) 1991, 1993
  *	The Regents of the University of California.  All rights reserved.
+ * Copyright (c) 1997-2005
+ *	Herbert Xu .  All rights reserved.
  *
  * This code is derived from software contributed to Berkeley by
  * Kenneth Almquist.
@@ -1150,10 +1152,11 @@ expmeta(char *enddir, char *name)
 	struct dirent *dp;
 	int atend;
 	int matchdot;
+	int esc;
 
 	metaflag = 0;
 	start = name;
-	for (p = name ; ; p++) {
+	for (p = name; esc = 0, *p; p += esc + 1) {
 		if (*p == '*' || *p == '?')
 			metaflag = 1;
 		else if (*p == '[') {
@@ -1178,12 +1181,14 @@ expmeta(char *enddir, char *name)
 			break;
 		else if (*p == CTLQUOTEMARK)
 			continue;
-		else if (*p == CTLESC)
-			p++;
-		if (*p == '/') {
-			if (metaflag)
-				break;
-			start = p + 1;
+		else {
+			if (*p == CTLESC)
+				esc++;
+			if (p[esc] == '/') {
+				if (metaflag)
+					break;
+				start = p + esc + 1;
+			}
 		}
 	}
 	if (metaflag == 0) {	/* we've reached the end of the file name */
@@ -1229,7 +1234,8 @@ expmeta(char *enddir, char *name)
 		atend = 1;
 	} else {
 		atend = 0;
-		*endname++ = '\0';
+		*endname = '\0';
+		endname += esc + 1;
 	}
 	matchdot = 0;
 	p = start;
@@ -1257,7 +1263,7 @@ expmeta(char *enddir, char *name)
 	}
 	closedir(dirp);
 	if (! atend)
-		endname[-1] = '/';
+		endname[-esc - 1] = esc ? CTLESC : '/';
 }
 
 

Added: head/tools/regression/bin/sh/expansion/pathname2.0
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/tools/regression/bin/sh/expansion/pathname2.0	Tue May 11 23:19:28 2010	(r207944)
@@ -0,0 +1,31 @@
+# $FreeBSD$
+
+failures=0
+
+check() {
+	testcase=$1
+	expect=$2
+	eval "set -- $testcase"
+	actual="$*"
+	if [ "$actual" != "$expect" ]; then
+		failures=$((failures+1))
+		printf '%s\n' "For $testcase, expected $expect actual $actual"
+	fi
+}
+
+set -e
+T=$(mktemp -d ${TMPDIR:-/tmp}/sh-test.XXXXXX)
+trap 'rm -rf $T' 0
+cd -P $T
+
+mkdir testdir testdir2 'testdir/*' 'testdir/?' testdir/a testdir/b testdir2/b
+mkdir testdir2/.c
+touch testf 'testdir/*/1' 'testdir/?/1' testdir/a/1 testdir/b/1 testdir2/b/.a
+
+check '*\/' 'testdir/ testdir2/'
+check '"testdir/"*"/1"' 'testdir/*/1 testdir/?/1 testdir/a/1 testdir/b/1'
+check '"testdir/"*"/"*' 'testdir/*/1 testdir/?/1 testdir/a/1 testdir/b/1'
+check '"testdir/"*\/*' 'testdir/*/1 testdir/?/1 testdir/a/1 testdir/b/1'
+check '"testdir"*"/"*"/"*' 'testdir/*/1 testdir/?/1 testdir/a/1 testdir/b/1'
+
+exit $((failures != 0))

From owner-svn-src-head@FreeBSD.ORG  Tue May 11 23:22:30 2010
Return-Path: 
Delivered-To: svn-src-head@FreeBSD.ORG
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 3B7B71065670;
	Tue, 11 May 2010 23:22:30 +0000 (UTC)
	(envelope-from delphij@delphij.net)
Received: from tarsier.geekcn.org (tarsier.geekcn.org [211.166.10.233])
	by mx1.freebsd.org (Postfix) with ESMTP id C49DA8FC1E;
	Tue, 11 May 2010 23:22:29 +0000 (UTC)
Received: from mail.geekcn.org (tarsier.geekcn.org [211.166.10.233])
	by tarsier.geekcn.org (Postfix) with ESMTP id A6504A69773;
	Wed, 12 May 2010 07:22:28 +0800 (CST)
X-Virus-Scanned: amavisd-new at geekcn.org
Received: from tarsier.geekcn.org ([211.166.10.233])
	by mail.geekcn.org (mail.geekcn.org [211.166.10.233]) (amavisd-new,
	port 10024)
	with LMTP id NfsXwkKn5vPO; Wed, 12 May 2010 07:22:09 +0800 (CST)
Received: from delta.delphij.net (drawbridge.ixsystems.com [206.40.55.65])
	(using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits))
	(No client certificate requested)
	by tarsier.geekcn.org (Postfix) with ESMTPSA id B1A54A550AB;
	Wed, 12 May 2010 07:22:06 +0800 (CST)
DomainKey-Signature: a=rsa-sha1; s=default; d=delphij.net; c=nofws; q=dns;
	h=message-id:date:from:reply-to:organization:user-agent:
	mime-version:to:cc:subject:references:in-reply-to:
	x-enigmail-version:openpgp:content-type:content-transfer-encoding;
	b=rIN2ZhbPL6j1Z0oz+2EXXIMcPBdZkqQ0aTlSTs6aC5QhRMIjmCXWXqEEQ6O0nwdtA
	nKqH2fd7XtBLy565pD5Aw==
Message-ID: <4BE9E69A.9020805@delphij.net>
Date: Tue, 11 May 2010 16:22:02 -0700
From: Xin LI 
Organization: The Geek China Organization
User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US;
	rv:1.9.1.9) Gecko/20100408 Thunderbird/3.0.4 ThunderBrowse/3.2.8.1
MIME-Version: 1.0
To: d@delphij.net
References: <201005101528.o4AFSiMx091913@svn.freebsd.org>
	<20100511190224.GA90875@titania.njm.me.uk>
	<25885E8D-93A9-47C7-BC55-AEE2D3773010@gmail.com>
	<4BE9B923.9020800@delphij.net>
In-Reply-To: <4BE9B923.9020800@delphij.net>
X-Enigmail-Version: 1.0.1
OpenPGP: id=3FCA37C1;
	url=http://www.delphij.net/delphij.asc
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Cc: src-committers@FreeBSD.ORG, Martin Matuska ,
	"N.J. Mann" , svn-src-all@FreeBSD.ORG,
	Ruslan Ermilov , svn-src-head@FreeBSD.ORG,
	Garrett Cooper 
Subject: Re: svn commit: r207849 - in head: . lib/libarchive rescue/rescue
 usr.bin/ar usr.bin/cpio usr.bin/cpio/test usr.bin/tar usr.bin/tar/test
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
Reply-To: d@delphij.net
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 11 May 2010 23:22:30 -0000

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

Please try this patch:

http://people.freebsd.org/~delphij/for_review/patch-lzmabuild.diff

I'm not quite satisfied with this patch though.

The problem was:

 - ar, libarchive now unconditionally depends on LZMA library;
 - When building on old system, /usr/lib/liblzma.a would not exist;
 - ar is bootstrap tool and thus will be built in BMAKE stage;
 - The build fails here since no liblzma is pre-built.

The current approach of mine is:

 - When OSRELDATE is less than the import, pass NO_LZMA when building ar(1)
 - Add support for build flag NO_LZMA to ar(1).[*]

[*] I think this is not quite right, perhaps we need to have a global
MK_XZ or something and use that flag?

Cheers,
- -- 
Xin LI 	http://www.delphij.net/
FreeBSD - The Power to Serve!	       Live free or die
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (FreeBSD)

iQEcBAEBAgAGBQJL6eaaAAoJEATO+BI/yjfB3l0H/jvOofC2zzZS1xpqVA/e4ROD
NIXl0HeXvt1ra12wqKCt9w2Ilgx830qVAB1kHLXnOOckWYrSkWQ3soxMSuszBEM5
dkrNFwzMIi4Jed1Vg9vtpPtKPyMysM+xA1b6asGT/y18NqEBr35YnZrfqr5L/G0N
7D4qLWpMNQyhJqtIhSSXarT5NTI5272/lNQh3J3568yTtvPq2gbiTg0yj0hTr00J
M+DcSFssHM9wNwM1rKWjpuRaY/x+9gjaka2y23hZVAhoFDXjSWHy5JoVwmNjHvIU
2qlnf8y87vMncEFy5FNFVzTAn/tJJfaGXO/GoHnzMxtpgdcrcwMcmcMujRaKpyI=
=4nAw
-----END PGP SIGNATURE-----

From owner-svn-src-head@FreeBSD.ORG  Wed May 12 00:56:53 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id AA0C8106566B;
	Wed, 12 May 2010 00:56:53 +0000 (UTC)
	(envelope-from brueffer@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44])
	by mx1.freebsd.org (Postfix) with ESMTP id 98E4D8FC0A;
	Wed, 12 May 2010 00:56:53 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4C0urBA046984;
	Wed, 12 May 2010 00:56:53 GMT
	(envelope-from brueffer@svn.freebsd.org)
Received: (from brueffer@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4C0urLI046982;
	Wed, 12 May 2010 00:56:53 GMT
	(envelope-from brueffer@svn.freebsd.org)
Message-Id: <201005120056.o4C0urLI046982@svn.freebsd.org>
From: Christian Brueffer 
Date: Wed, 12 May 2010 00:56:53 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r207945 - head/contrib/ipfilter/man
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 12 May 2010 00:56:53 -0000

Author: brueffer
Date: Wed May 12 00:56:53 2010
New Revision: 207945
URL: http://svn.freebsd.org/changeset/base/207945

Log:
  Comment in the BUGS section header. Matches what's in ipfilter 5.10.
  
  PR:		144880
  Submitted by:	Glen Barber 
  MFC after:	1 week

Modified:
  head/contrib/ipfilter/man/ipmon.8

Modified: head/contrib/ipfilter/man/ipmon.8
==============================================================================
--- head/contrib/ipfilter/man/ipmon.8	Tue May 11 23:19:28 2010	(r207944)
+++ head/contrib/ipfilter/man/ipmon.8	Wed May 12 00:56:53 2010	(r207945)
@@ -181,6 +181,6 @@ recorded data.
 /etc/services
 .SH SEE ALSO
 ipl(4), ipf(8), ipfstat(8), ipnat(8)
-.\".SH BUGS
+.SH BUGS
 .PP
 If you find any, please send email to me at darrenr@pobox.com

From owner-svn-src-head@FreeBSD.ORG  Wed May 12 01:13:50 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 54B3D106564A;
	Wed, 12 May 2010 01:13:50 +0000 (UTC)
	(envelope-from brueffer@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44])
	by mx1.freebsd.org (Postfix) with ESMTP id 4386A8FC1B;
	Wed, 12 May 2010 01:13:50 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4C1DocS050765;
	Wed, 12 May 2010 01:13:50 GMT
	(envelope-from brueffer@svn.freebsd.org)
Received: (from brueffer@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4C1DoVF050763;
	Wed, 12 May 2010 01:13:50 GMT
	(envelope-from brueffer@svn.freebsd.org)
Message-Id: <201005120113.o4C1DoVF050763@svn.freebsd.org>
From: Christian Brueffer 
Date: Wed, 12 May 2010 01:13:50 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r207946 - head/lib/libc/stdlib
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 12 May 2010 01:13:50 -0000

Author: brueffer
Date: Wed May 12 01:13:49 2010
New Revision: 207946
URL: http://svn.freebsd.org/changeset/base/207946

Log:
  The previous revision actually removed the bug being hinted at, so
  go ahead and remove the hint.
  
  PR:		143944
  Submitted by:	Jeremy Huddleston 
  MFC after:	1 week

Modified:
  head/lib/libc/stdlib/strtod.3

Modified: head/lib/libc/stdlib/strtod.3
==============================================================================
--- head/lib/libc/stdlib/strtod.3	Wed May 12 00:56:53 2010	(r207945)
+++ head/lib/libc/stdlib/strtod.3	Wed May 12 01:13:49 2010	(r207946)
@@ -32,7 +32,7 @@
 .\"     @(#)strtod.3	8.1 (Berkeley) 6/4/93
 .\" $FreeBSD$
 .\"
-.Dd March 2, 2003
+.Dd May 11, 2010
 .Dt STRTOD 3
 .Os
 .Sh NAME
@@ -169,8 +169,7 @@ The
 .Fn strtod
 function
 conforms to
-.St -isoC-99 ,
-with the exception of the bug noted below.
+.St -isoC-99 .
 .Sh AUTHORS
 The author of this software is
 .An David M. Gay .

From owner-svn-src-head@FreeBSD.ORG  Wed May 12 01:33:51 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 9A6EE106566C;
	Wed, 12 May 2010 01:33:51 +0000 (UTC)
	(envelope-from brueffer@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44])
	by mx1.freebsd.org (Postfix) with ESMTP id 893178FC08;
	Wed, 12 May 2010 01:33:51 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4C1Xpkf055175;
	Wed, 12 May 2010 01:33:51 GMT
	(envelope-from brueffer@svn.freebsd.org)
Received: (from brueffer@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4C1XpnF055173;
	Wed, 12 May 2010 01:33:51 GMT
	(envelope-from brueffer@svn.freebsd.org)
Message-Id: <201005120133.o4C1XpnF055173@svn.freebsd.org>
From: Christian Brueffer 
Date: Wed, 12 May 2010 01:33:51 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r207947 - head/usr.sbin/uathload
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 12 May 2010 01:33:51 -0000

Author: brueffer
Date: Wed May 12 01:33:51 2010
New Revision: 207947
URL: http://svn.freebsd.org/changeset/base/207947

Log:
  The -d flag is non-optional.
  
  PR:		143694
  Submitted by:	Nikolai Saoukh 
  MFC after:	1 week

Modified:
  head/usr.sbin/uathload/uathload.8

Modified: head/usr.sbin/uathload/uathload.8
==============================================================================
--- head/usr.sbin/uathload/uathload.8	Wed May 12 01:13:49 2010	(r207946)
+++ head/usr.sbin/uathload/uathload.8	Wed May 12 01:33:51 2010	(r207947)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd April 7, 2009
+.Dd May 11, 2010
 .Dt UATHLOAD 8
 .Os
 .Sh NAME
@@ -34,7 +34,7 @@
 .Sh SYNOPSIS
 .Nm
 .Op Fl v
-.Op Fl d Ar ugen-device
+.Fl d Ar ugen-device
 .Op Ar firmware-file
 .Sh DESCRIPTION
 The

From owner-svn-src-head@FreeBSD.ORG  Wed May 12 02:00:12 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 50E3B1065672;
	Wed, 12 May 2010 02:00:12 +0000 (UTC)
	(envelope-from brueffer@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44])
	by mx1.freebsd.org (Postfix) with ESMTP id 3F7218FC14;
	Wed, 12 May 2010 02:00:12 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4C20C9f060985;
	Wed, 12 May 2010 02:00:12 GMT
	(envelope-from brueffer@svn.freebsd.org)
Received: (from brueffer@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4C20Cnj060983;
	Wed, 12 May 2010 02:00:12 GMT
	(envelope-from brueffer@svn.freebsd.org)
Message-Id: <201005120200.o4C20Cnj060983@svn.freebsd.org>
From: Christian Brueffer 
Date: Wed, 12 May 2010 02:00:12 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r207948 - head/usr.bin/make
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 12 May 2010 02:00:12 -0000

Author: brueffer
Date: Wed May 12 02:00:11 2010
New Revision: 207948
URL: http://svn.freebsd.org/changeset/base/207948

Log:
  - Missing full stops
  - Upper case the first character of an description
  - Section headings do not need to be quoted. From OpenBSD's make.1, revision 1.81
  - Plural of suffix is suffixes. From OpenBSD's make.1, revision 1.61
  - s/seperating/separating/
  
  PR:		135165
  Submitted by:	Alan R. S. Bueno 
  MFC after:	1 week

Modified:
  head/usr.bin/make/make.1

Modified: head/usr.bin/make/make.1
==============================================================================
--- head/usr.bin/make/make.1	Wed May 12 01:33:51 2010	(r207947)
+++ head/usr.bin/make/make.1	Wed May 12 02:00:11 2010	(r207948)
@@ -990,7 +990,7 @@ Otherwise
 is the substring of
 .Ar old_string
 to be replaced in
-.Ar new_string
+.Ar new_string .
 .It Cm :T
 Replaces each word in the variable with its last component.
 .It Cm :U
@@ -1138,7 +1138,7 @@ The
 may be any one of the following:
 .Bl -tag -width "Cm XX"
 .It Cm ||
-logical
+Logical
 .Tn OR
 .It Cm &&
 Logical
@@ -1328,7 +1328,7 @@ made before the sources that succeed it 
 Loops are not being
 detected and targets that form loops will be silently ignored.
 .El
-.Sh "SPECIAL TARGETS"
+.Sh SPECIAL TARGETS
 Special targets may not be included with other targets, i.e., they must be
 the only target specified.
 .Bl -tag -width Ic
@@ -1620,7 +1620,7 @@ command in the file.
 .It Ic .SUFFIXES
 Each source specifies a suffix to
 .Nm .
-If no sources are specified, any previous specified suffices are deleted.
+If no sources are specified, any previous specified suffixes are deleted.
 .It Ic .WARN
 Each source specifies a warning flag as previously described for the
 .Fl x
@@ -1633,7 +1633,7 @@ environment variables so that a warning 
 line will influence all sub-makes.
 Several flags can be specified on a single
 .Ic .WARN
-target by seperating them with blanks.
+target by separating them with blanks.
 .El
 .Sh REMAKING MAKEFILES
 If the special target
@@ -1779,7 +1779,7 @@ The evaluation of
 .Ar expression
 in a test is very simple-minded.
 Currently, the only form that works is
-.Ql .if ${VAR} op something
+.Ql .if ${VAR} op something .
 For instance, you should write tests as
 .Ql .if ${VAR} == "string"
 not the other way around, which would give you an error.

From owner-svn-src-head@FreeBSD.ORG  Wed May 12 03:29:12 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 26ECD106564A;
	Wed, 12 May 2010 03:29:12 +0000 (UTC)
	(envelope-from kmacy@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44])
	by mx1.freebsd.org (Postfix) with ESMTP id 16C2D8FC17;
	Wed, 12 May 2010 03:29:12 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4C3TBrN080984;
	Wed, 12 May 2010 03:29:11 GMT (envelope-from kmacy@svn.freebsd.org)
Received: (from kmacy@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4C3TBoK080982;
	Wed, 12 May 2010 03:29:11 GMT (envelope-from kmacy@svn.freebsd.org)
Message-Id: <201005120329.o4C3TBoK080982@svn.freebsd.org>
From: Kip Macy 
Date: Wed, 12 May 2010 03:29:11 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r207949 - head/sys/netinet6
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 12 May 2010 03:29:12 -0000

Author: kmacy
Date: Wed May 12 03:29:11 2010
New Revision: 207949
URL: http://svn.freebsd.org/changeset/base/207949

Log:
  try working around panic by validating rt and lle
  
  MFC after:	3 days

Modified:
  head/sys/netinet6/ip6_output.c

Modified: head/sys/netinet6/ip6_output.c
==============================================================================
--- head/sys/netinet6/ip6_output.c	Wed May 12 02:00:11 2010	(r207948)
+++ head/sys/netinet6/ip6_output.c	Wed May 12 03:29:11 2010	(r207949)
@@ -486,7 +486,8 @@ skip_ipsec2:;
 		 */
 		if ((fle = flowtable_lookup_mbuf(V_ip6_ft, m, AF_INET6)) != NULL) {
 			flow_to_route_in6(fle, ro);
-			flevalid = 1;
+			if (ro->ro_rt != NULL && ro->ro_lle != NULL)
+				flevalid = 1;
 		}
 	}
 #endif	

From owner-svn-src-head@FreeBSD.ORG  Wed May 12 04:51:20 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 9BFEF10656C0;
	Wed, 12 May 2010 04:51:20 +0000 (UTC)
	(envelope-from kmacy@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44])
	by mx1.freebsd.org (Postfix) with ESMTP id 8C3BA8FC0C;
	Wed, 12 May 2010 04:51:20 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4C4pKPU099153;
	Wed, 12 May 2010 04:51:20 GMT (envelope-from kmacy@svn.freebsd.org)
Received: (from kmacy@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4C4pKnN099151;
	Wed, 12 May 2010 04:51:20 GMT (envelope-from kmacy@svn.freebsd.org)
Message-Id: <201005120451.o4C4pKnN099151@svn.freebsd.org>
From: Kip Macy 
Date: Wed, 12 May 2010 04:51:20 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r207953 - head/sys/net
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 12 May 2010 04:51:20 -0000

Author: kmacy
Date: Wed May 12 04:51:20 2010
New Revision: 207953
URL: http://svn.freebsd.org/changeset/base/207953

Log:
  workaround bug with ipv6 where a flow can have a null rtentry

Modified:
  head/sys/net/flowtable.c

Modified: head/sys/net/flowtable.c
==============================================================================
--- head/sys/net/flowtable.c	Wed May 12 04:44:59 2010	(r207952)
+++ head/sys/net/flowtable.c	Wed May 12 04:51:20 2010	(r207953)
@@ -1389,8 +1389,10 @@ fle_free(struct flentry *fle, struct flo
 
 	rt = __DEVOLATILE(struct rtentry *, fle->f_rt);
 	lle = __DEVOLATILE(struct llentry *, fle->f_lle);
-	RTFREE(rt);
-	LLE_FREE(lle);
+	if (rt != NULL)
+		RTFREE(rt);
+	if (lle != NULL)
+		LLE_FREE(lle);
 	flow_free(fle, ft);
 }
 

From owner-svn-src-head@FreeBSD.ORG  Wed May 12 05:50:57 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 9DAC3106566B;
	Wed, 12 May 2010 05:50:57 +0000 (UTC)
	(envelope-from kevlo@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44])
	by mx1.freebsd.org (Postfix) with ESMTP id 8D6178FC0C;
	Wed, 12 May 2010 05:50:57 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4C5ovBs012323;
	Wed, 12 May 2010 05:50:57 GMT (envelope-from kevlo@svn.freebsd.org)
Received: (from kevlo@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4C5ovWH012322;
	Wed, 12 May 2010 05:50:57 GMT (envelope-from kevlo@svn.freebsd.org)
Message-Id: <201005120550.o4C5ovWH012322@svn.freebsd.org>
From: Kevin Lo 
Date: Wed, 12 May 2010 05:50:57 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r207954 - in head/sys/arm: arm include
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 12 May 2010 05:50:57 -0000

Author: kevlo
Date: Wed May 12 05:50:56 2010
New Revision: 207954
URL: http://svn.freebsd.org/changeset/base/207954

Log:
  The FA526 belongs to the ARM9TDMI family

Modified:
  head/sys/arm/arm/identcpu.c
  head/sys/arm/include/md_var.h

Modified: head/sys/arm/arm/identcpu.c
==============================================================================
--- head/sys/arm/arm/identcpu.c	Wed May 12 04:51:20 2010	(r207953)
+++ head/sys/arm/arm/identcpu.c	Wed May 12 05:50:56 2010	(r207954)
@@ -220,7 +220,7 @@ const struct cpuidtab cpuids[] = {
 	  generic_steppings },
 	{ CPU_ID_ARM966ESR1,	CPU_CLASS_ARM9ES,	"ARM966E-S",
 	  generic_steppings },
-	{ CPU_ID_FA526,		CPU_CLASS_ARM9,		"FA526",
+	{ CPU_ID_FA526,		CPU_CLASS_ARM9TDMI,	"FA526",
 	  generic_steppings },
 	{ CPU_ID_FA626TE,	CPU_CLASS_ARM9ES,	"FA626TE",
 	  generic_steppings },
@@ -322,7 +322,6 @@ const struct cpu_classtab cpu_classes[] 
 	{ "ARM7",	"CPU_ARM7" },		/* CPU_CLASS_ARM7 */
 	{ "ARM7TDMI",	"CPU_ARM7TDMI" },	/* CPU_CLASS_ARM7TDMI */
 	{ "ARM8",	"CPU_ARM8" },		/* CPU_CLASS_ARM8 */
-	{ "ARM9",	"CPU_ARM9" },		/* CPU_CLASS_ARM9 */
 	{ "ARM9TDMI",	"CPU_ARM9TDMI" },	/* CPU_CLASS_ARM9TDMI */
 	{ "ARM9E-S",	"CPU_ARM9E" },		/* CPU_CLASS_ARM9ES */
 	{ "ARM9EJ-S",	"CPU_ARM9E" },		/* CPU_CLASS_ARM9EJS */

Modified: head/sys/arm/include/md_var.h
==============================================================================
--- head/sys/arm/include/md_var.h	Wed May 12 04:51:20 2010	(r207953)
+++ head/sys/arm/include/md_var.h	Wed May 12 05:50:56 2010	(r207954)
@@ -57,7 +57,6 @@ enum cpu_class {
 	CPU_CLASS_ARM7,
 	CPU_CLASS_ARM7TDMI,
 	CPU_CLASS_ARM8,
-	CPU_CLASS_ARM9,
 	CPU_CLASS_ARM9TDMI,
 	CPU_CLASS_ARM9ES,
 	CPU_CLASS_ARM9EJS,

From owner-svn-src-head@FreeBSD.ORG  Wed May 12 07:24:25 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id B73B41065670;
	Wed, 12 May 2010 07:24:25 +0000 (UTC)
	(envelope-from ronald-freebsd8@klop.yi.org)
Received: from smtp-out3.tiscali.nl (smtp-out3.tiscali.nl [195.241.79.178])
	by mx1.freebsd.org (Postfix) with ESMTP id 72EE28FC0A;
	Wed, 12 May 2010 07:24:24 +0000 (UTC)
Received: from [212.123.145.58] (helo=sjakie.klop.ws)
	by smtp-out3.tiscali.nl with esmtp (Exim)
	(envelope-from )
	id 1OC6Ip-0005CR-P4; Wed, 12 May 2010 09:24:23 +0200
Received: from 212-123-145-58.ip.telfort.nl (localhost [127.0.0.1])
	by sjakie.klop.ws (Postfix) with ESMTP id 715A8BFC3;
	Wed, 12 May 2010 09:24:17 +0200 (CEST)
Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes
To: "Matt Jacob" , src-committers@freebsd.org,
	svn-src-all@freebsd.org, svn-src-head@freebsd.org
References: <201005112222.o4BMM1uq012874@svn.freebsd.org>
Date: Wed, 12 May 2010 09:24:17 +0200
MIME-Version: 1.0
From: "Ronald Klop" 
Message-ID: 
In-Reply-To: <201005112222.o4BMM1uq012874@svn.freebsd.org>
User-Agent: Opera Mail/10.10 (FreeBSD)
Content-Transfer-Encoding: quoted-printable
Cc: 
Subject: Re: svn commit: r207933 - head/sys/cam/scsi
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 12 May 2010 07:24:25 -0000

On Wed, 12 May 2010 00:22:01 +0200, Matt Jacob  wrote=
:

> Author: mjacob
> Date: Tue May 11 22:22:01 2010
> New Revision: 207933
> URL: http://svn.freebsd.org/changeset/base/207933
>
> Log:
>   Deal sensibly with more than 26 sg devices. It isn't a complete
>   solution.
>  Sponsored by:   Panasas
>   MFC after:	1 week
>
> Modified:
>   head/sys/cam/scsi/scsi_sg.c
>
> Modified: head/sys/cam/scsi/scsi_sg.c
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
> --- head/sys/cam/scsi/scsi_sg.c	Tue May 11 21:07:47 2010	(r207932)
> +++ head/sys/cam/scsi/scsi_sg.c	Tue May 11 22:22:01 2010	(r207933)
> @@ -303,7 +303,12 @@ sgregister(struct cam_periph *periph, vo
>  	softc->dev =3D make_dev(&sg_cdevsw, periph->unit_number,
>  			      UID_ROOT, GID_OPERATOR, 0600, "%s%d",
>  			      periph->periph_name, periph->unit_number);
> -	(void)make_dev_alias(softc->dev, "sg%c", 'a' + periph->unit_number);
> +	if (periph->unit_number < 26) {
> +		(void)make_dev_alias(softc->dev, "sg%c", periph->unit_number + 'a');
> +	} else {
> +		(void)make_dev_alias(softc->dev, "sg%c%c",
> +		    ((periph->unit_number / 26) - 1) + 'a', periph->unit_number + =20
> 'a');
> +	}
>  	cam_periph_lock(periph);
>  	softc->dev->si_drv1 =3D periph;

Wow, did you copy this from windows? :-)

From owner-svn-src-head@FreeBSD.ORG  Wed May 12 09:51:57 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 935B61065670;
	Wed, 12 May 2010 09:51:57 +0000 (UTC) (envelope-from mm@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44])
	by mx1.freebsd.org (Postfix) with ESMTP id 83BAC8FC12;
	Wed, 12 May 2010 09:51:57 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4C9pvXF065379;
	Wed, 12 May 2010 09:51:57 GMT (envelope-from mm@svn.freebsd.org)
Received: (from mm@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4C9pvWs065377;
	Wed, 12 May 2010 09:51:57 GMT (envelope-from mm@svn.freebsd.org)
Message-Id: <201005120951.o4C9pvWs065377@svn.freebsd.org>
From: Martin Matuska 
Date: Wed, 12 May 2010 09:51:57 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r207956 -
	head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 12 May 2010 09:51:57 -0000

Author: mm
Date: Wed May 12 09:51:57 2010
New Revision: 207956
URL: http://svn.freebsd.org/changeset/base/207956

Log:
  Fix possible hang when replaying large truncations.
  
  OpenSolaris onnv revision:	7904:6a124a4ca9c5
  
  Approved by:	pjd, delphij (mentor)
  Obtained from:	OpenSolaris (Bug ID 6761624)
  MFC after:	3 days

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c	Wed May 12 09:34:10 2010	(r207955)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c	Wed May 12 09:51:57 2010	(r207956)
@@ -1567,6 +1567,29 @@ zil_replay_log_record(zilog_t *zilog, lr
 	}
 
 	/*
+	 * Replay of large truncates can end up needing additional txs
+	 * and a different txg. If they are nested within the replay tx
+	 * as below then a hang is possible. So we do the truncate here
+	 * and redo the truncate later (a no-op) and update the sequence
+	 * number whilst in the replay tx. Fortunately, it's safe to repeat
+	 * a truncate if we crash and the truncate commits. A create over
+	 * an existing file will also come in as a TX_TRUNCATE record.
+	 *
+	 * Note, remove of large files and renames over large files is
+	 * handled by putting the deleted object on a stable list
+	 * and if necessary force deleting the object outside of the replay
+	 * transaction using the zr_replay_cleaner.
+	 */
+	if (txtype == TX_TRUNCATE) {
+		*zr->zr_txgp = TXG_NOWAIT;
+		error = zr->zr_replay[TX_TRUNCATE](zr->zr_arg, zr->zr_lrbuf,
+		    zr->zr_byteswap);
+		if (error)
+			goto bad;
+		zr->zr_byteswap = 0; /* only byteswap once */
+	}
+
+	/*
 	 * We must now do two things atomically: replay this log record,
 	 * and update the log header to reflect the fact that we did so.
 	 * We use the DMU's ability to assign into a specific txg to do this.
@@ -1636,6 +1659,7 @@ zil_replay_log_record(zilog_t *zilog, lr
 		dprintf("pass %d, retrying\n", pass);
 	}
 
+bad:
 	ASSERT(error && error != ERESTART);
 	name = kmem_alloc(MAXNAMELEN, KM_SLEEP);
 	dmu_objset_name(zr->zr_os, name);

From owner-svn-src-head@FreeBSD.ORG  Wed May 12 10:29:07 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 208BB106566B;
	Wed, 12 May 2010 10:29:07 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44])
	by mx1.freebsd.org (Postfix) with ESMTP id 1195D8FC12;
	Wed, 12 May 2010 10:29:07 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4CAT6Uu080705;
	Wed, 12 May 2010 10:29:06 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4CAT6AB080703;
	Wed, 12 May 2010 10:29:06 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <201005121029.o4CAT6AB080703@svn.freebsd.org>
From: Konstantin Belousov 
Date: Wed, 12 May 2010 10:29:06 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r207957 - head/sys/amd64/amd64
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 12 May 2010 10:29:07 -0000

Author: kib
Date: Wed May 12 10:29:06 2010
New Revision: 207957
URL: http://svn.freebsd.org/changeset/base/207957

Log:
  Remove unneeded overrides of the segment registers in the inner trap
  frame upon segment register load fault. The doreti procedure does not
  load segment registers when returning to the kernel frame, and current
  values in the segment descriptor cache already allow the kernel mode
  to run, not modified by faulted loaded.
  
  Suggested by:	bde
  Tested by:	pho
  MFC after:	1 week

Modified:
  head/sys/amd64/amd64/trap.c

Modified: head/sys/amd64/amd64/trap.c
==============================================================================
--- head/sys/amd64/amd64/trap.c	Wed May 12 09:51:57 2010	(r207956)
+++ head/sys/amd64/amd64/trap.c	Wed May 12 10:29:06 2010	(r207957)
@@ -488,22 +488,18 @@ trap(struct trapframe *frame)
 			}
 			if (frame->tf_rip == (long)ld_ds) {
 				frame->tf_rip = (long)ds_load_fault;
-				frame->tf_ds = _udatasel;
 				goto out;
 			}
 			if (frame->tf_rip == (long)ld_es) {
 				frame->tf_rip = (long)es_load_fault;
-				frame->tf_es = _udatasel;
 				goto out;
 			}
 			if (frame->tf_rip == (long)ld_fs) {
 				frame->tf_rip = (long)fs_load_fault;
-				frame->tf_fs = _ufssel;
 				goto out;
 			}
 			if (frame->tf_rip == (long)ld_gs) {
 				frame->tf_rip = (long)gs_load_fault;
-				frame->tf_gs = _ugssel;
 				goto out;
 			}
 			if (frame->tf_rip == (long)ld_gsbase) {

From owner-svn-src-head@FreeBSD.ORG  Wed May 12 10:29:35 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 8FA5710657C2;
	Wed, 12 May 2010 10:29:35 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44])
	by mx1.freebsd.org (Postfix) with ESMTP id 808CE8FC16;
	Wed, 12 May 2010 10:29:35 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4CATZg1080839;
	Wed, 12 May 2010 10:29:35 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4CATZgR080836;
	Wed, 12 May 2010 10:29:35 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <201005121029.o4CATZgR080836@svn.freebsd.org>
From: Konstantin Belousov 
Date: Wed, 12 May 2010 10:29:35 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r207958 - head/sys/amd64/amd64
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 12 May 2010 10:29:35 -0000

Author: kib
Date: Wed May 12 10:29:35 2010
New Revision: 207958
URL: http://svn.freebsd.org/changeset/base/207958

Log:
  Route all returns from the interrupts and faults through the doreti_iret
  labeled iretq instruction.
  
  Suppose that multithreaded process executes two threads, currently
  scheduled on different processors. Let assume that thread A executes
  using %cs or %ss pointing into the descriptor from LDT. If IPI comes
  which handler does not return by jump to doreti, and meantime thread B
  invalidates descriptor pointed to by %cs or %ss, then iretq from IPI
  handler could fault.
  
  Routing the return by doreti_iret allows kernel to catch the situation
  and recover from it by sending signal to the usermode.
  
  Tested by:	pho
  MFC after:	1 week

Modified:
  head/sys/amd64/amd64/apic_vector.S
  head/sys/amd64/amd64/exception.S

Modified: head/sys/amd64/amd64/apic_vector.S
==============================================================================
--- head/sys/amd64/amd64/apic_vector.S	Wed May 12 10:29:06 2010	(r207957)
+++ head/sys/amd64/amd64/apic_vector.S	Wed May 12 10:29:35 2010	(r207958)
@@ -41,6 +41,7 @@
 
 #include "assym.s"
 
+	.extern	doreti_iret
 /*
  * I/O Interrupt Entry Point.  Rather than having one entry point for
  * each interrupt source, we use one entry point for each 32-bit word
@@ -81,7 +82,7 @@ IDTVEC(spuriousint)
 
 	/* No EOI cycle used here */
 
-	iretq
+	jmp	doreti_iret
 
 	ISR_VEC(1, apic_isr1)
 	ISR_VEC(2, apic_isr2)
@@ -135,7 +136,7 @@ IDTVEC(invltlb)
 	incl	smp_tlb_wait
 
 	popq	%rax
-	iretq
+	jmp	doreti_iret
 
 /*
  * Single page TLB shootdown
@@ -155,7 +156,7 @@ IDTVEC(invlpg)
 	incl	smp_tlb_wait
 
 	popq	%rax
-	iretq
+	jmp	doreti_iret
 
 /*
  * Page range TLB shootdown.
@@ -181,7 +182,7 @@ IDTVEC(invlrng)
 
 	popq	%rdx
 	popq	%rax
-	iretq
+	jmp	doreti_iret
 
 /*
  * Invalidate cache.
@@ -200,7 +201,7 @@ IDTVEC(invlcache)
 	incl	smp_tlb_wait
 
 	popq	%rax
-	iretq
+	jmp	doreti_iret
 
 /*
  * Handler for IPIs sent via the per-cpu IPI bitmap.
@@ -247,7 +248,7 @@ IDTVEC(cpususpend)
 	call	cpususpend_handler
 
 	POP_FRAME
-	iretq
+	jmp	doreti_iret
 
 /*
  * Executed by a CPU when it receives a RENDEZVOUS IPI from another CPU.

Modified: head/sys/amd64/amd64/exception.S
==============================================================================
--- head/sys/amd64/amd64/exception.S	Wed May 12 10:29:06 2010	(r207957)
+++ head/sys/amd64/amd64/exception.S	Wed May 12 10:29:35 2010	(r207958)
@@ -553,7 +553,7 @@ nmi_restoreregs:
 	movq	TF_R14(%rsp),%r14
 	movq	TF_R15(%rsp),%r15
 	addq	$TF_RIP,%rsp
-	iretq
+	jmp	doreti_iret
 
 ENTRY(fork_trampoline)
 	movq	%r12,%rdi		/* function */

From owner-svn-src-head@FreeBSD.ORG  Wed May 12 11:22:47 2010
Return-Path: 
Delivered-To: svn-src-head@FreeBSD.ORG
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 454ED106566C
	for ; Wed, 12 May 2010 11:22:47 +0000 (UTC)
	(envelope-from njm@njm.me.uk)
Received: from smtp004.apm-internet.net (smtp004.apm-internet.net
	[85.119.248.54]) by mx1.freebsd.org (Postfix) with SMTP id 8AFC78FC12
	for ; Wed, 12 May 2010 11:22:46 +0000 (UTC)
Received: (qmail 65936 invoked from network); 12 May 2010 11:22:45 -0000
Received: from unknown (HELO oberon.njm.me.uk) (81.155.116.165)
	by smtp004.apm-internet.net with SMTP; 12 May 2010 11:22:45 -0000
Received: from titania.njm.me.uk (titania.njm.me.uk [192.168.144.130])
	by oberon.njm.me.uk (8.14.4/8.14.4) with ESMTP id o4CBMin2090815;
	Wed, 12 May 2010 12:22:44 +0100 (BST) (envelope-from njm@njm.me.uk)
Received: from titania.njm.me.uk (localhost [127.0.0.1])
	by titania.njm.me.uk (8.14.4/8.14.4) with ESMTP id o4CBMi7t035577;
	Wed, 12 May 2010 12:22:44 +0100 (BST) (envelope-from njm@njm.me.uk)
Received: (from njm@localhost)
	by titania.njm.me.uk (8.14.4/8.14.4/Submit) id o4CBMihH035576;
	Wed, 12 May 2010 12:22:44 +0100 (BST) (envelope-from njm@njm.me.uk)
Date: Wed, 12 May 2010 12:22:44 +0100
From: "N.J. Mann" 
To: d@delphij.net
Message-ID: <20100512112244.GA34380@titania.njm.me.uk>
Mail-Followup-To: d@delphij.net, src-committers@FreeBSD.ORG,
	Martin Matuska , svn-src-all@FreeBSD.ORG,
	Ruslan Ermilov , svn-src-head@FreeBSD.ORG,
	Garrett Cooper 
References: <201005101528.o4AFSiMx091913@svn.freebsd.org>
	<20100511190224.GA90875@titania.njm.me.uk>
	<25885E8D-93A9-47C7-BC55-AEE2D3773010@gmail.com>
	<4BE9B923.9020800@delphij.net> <4BE9E69A.9020805@delphij.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <4BE9E69A.9020805@delphij.net>
X-Operating-System: FreeBSD 7.3-STABLE
User-Agent: mutt-NJM (2010-05-06)
Cc: src-committers@FreeBSD.ORG, Martin Matuska ,
	svn-src-all@FreeBSD.ORG, Ruslan Ermilov ,
	svn-src-head@FreeBSD.ORG, Garrett Cooper 
Subject: Re: svn commit: r207849 - in head: . lib/libarchive rescue/rescue
 usr.bin/ar usr.bin/cpio usr.bin/cpio/test usr.bin/tar usr.bin/tar/test
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 12 May 2010 11:22:47 -0000

In message <4BE9E69A.9020805@delphij.net>,
	Xin LI (delphij@delphij.net) wrote:
> 
> Please try this patch:
> 
> http://people.freebsd.org/~delphij/for_review/patch-lzmabuild.diff
> 
> I'm not quite satisfied with this patch though.
[...]

It fixed the build.  If you need another patch testing just let me know.

Many thanks.


Cheers,
       Nick.
-- 


From owner-svn-src-head@FreeBSD.ORG  Wed May 12 13:23:52 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 757371065679;
	Wed, 12 May 2010 13:23:52 +0000 (UTC) (envelope-from ru@freebsd.org)
Received: from mail.vega.ru (mail.vega.ru [90.156.167.5])
	by mx1.freebsd.org (Postfix) with ESMTP id 2B8A68FC23;
	Wed, 12 May 2010 13:23:51 +0000 (UTC)
Received: from [10.100.124.99] (helo=edoofus.dev.vega.ru)
	by mail.vega.ru with esmtpsa (TLSv1:AES256-SHA:256)
	(Exim 4.71 (FreeBSD)) (envelope-from )
	id 1OCBub-0008Ok-3u; Wed, 12 May 2010 17:23:45 +0400
Date: Wed, 12 May 2010 17:23:30 +0400
From: Ruslan Ermilov 
To: d@delphij.net
Message-ID: <20100512132330.GA92013@edoofus.dev.vega.ru>
References: <201005101528.o4AFSiMx091913@svn.freebsd.org>
	<20100511190224.GA90875@titania.njm.me.uk>
	<25885E8D-93A9-47C7-BC55-AEE2D3773010@gmail.com>
	<4BE9B923.9020800@delphij.net> <4BE9E69A.9020805@delphij.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <4BE9E69A.9020805@delphij.net>
Cc: src-committers@freebsd.org, Martin Matuska ,
	"N.J. Mann" , svn-src-all@freebsd.org,
	svn-src-head@freebsd.org, Garrett Cooper 
Subject: Re: svn commit: r207849 - in head: . lib/libarchive rescue/rescue
 usr.bin/ar usr.bin/cpio usr.bin/cpio/test usr.bin/tar usr.bin/tar/test
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 12 May 2010 13:23:52 -0000

On Tue, May 11, 2010 at 04:22:02PM -0700, Xin LI wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi,
> 
> Please try this patch:
> 
> http://people.freebsd.org/~delphij/for_review/patch-lzmabuild.diff
> 
> I'm not quite satisfied with this patch though.
> 
> The problem was:
> 
>  - ar, libarchive now unconditionally depends on LZMA library;
>  - When building on old system, /usr/lib/liblzma.a would not exist;
>  - ar is bootstrap tool and thus will be built in BMAKE stage;
>  - The build fails here since no liblzma is pre-built.

How about bootstrapping liblzma instead?  NB: Completely untested.

%%%
Index: Makefile.inc1
===================================================================
--- Makefile.inc1	(revision 207959)
+++ Makefile.inc1	(working copy)
@@ -931,7 +931,7 @@
 .endif
 
 .if ${BOOTSTRAPPING} >= 700044 && ${BOOTSTRAPPING} < 800022
-_ar=		usr.bin/ar
+_ar=		lib/liblzma usr.bin/ar
 .endif
 
 .if ${BOOTSTRAPPING} < 800013
%%%


Cheers,
-- 
Ruslan Ermilov
ru@FreeBSD.org
FreeBSD committer

From owner-svn-src-head@FreeBSD.ORG  Wed May 12 13:45:47 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 2A559106566B;
	Wed, 12 May 2010 13:45:47 +0000 (UTC) (envelope-from rrs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44])
	by mx1.freebsd.org (Postfix) with ESMTP id 1A9608FC26;
	Wed, 12 May 2010 13:45:47 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4CDjk4S024361;
	Wed, 12 May 2010 13:45:47 GMT (envelope-from rrs@svn.freebsd.org)
Received: (from rrs@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4CDjkcI024359;
	Wed, 12 May 2010 13:45:46 GMT (envelope-from rrs@svn.freebsd.org)
Message-Id: <201005121345.o4CDjkcI024359@svn.freebsd.org>
From: Randall Stewart 
Date: Wed, 12 May 2010 13:45:46 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r207963 - head/sys/netinet
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 12 May 2010 13:45:47 -0000

Author: rrs
Date: Wed May 12 13:45:46 2010
New Revision: 207963
URL: http://svn.freebsd.org/changeset/base/207963

Log:
  This fixes PR-SCTP issues:
   - Slide the map at the proper place.
   - Mark the bits in the nr_array ONLY if there
     is no marking.
   - When generating a FWD-TSN we allow us to skip past
     ACKED chunks too.
  
  MFC after:	1 weeks

Modified:
  head/sys/netinet/sctp_indata.c

Modified: head/sys/netinet/sctp_indata.c
==============================================================================
--- head/sys/netinet/sctp_indata.c	Wed May 12 13:20:05 2010	(r207962)
+++ head/sys/netinet/sctp_indata.c	Wed May 12 13:45:46 2010	(r207963)
@@ -3694,6 +3694,7 @@ sctp_try_advance_peer_ack_point(struct s
 	tp1 = TAILQ_FIRST(&asoc->sent_queue);
 	while (tp1) {
 		if (tp1->sent != SCTP_FORWARD_TSN_SKIP &&
+		    tp1->sent != SCTP_DATAGRAM_ACKED &&
 		    tp1->sent != SCTP_DATAGRAM_RESEND) {
 			/* no chance to advance, out of here */
 			break;
@@ -5540,8 +5541,8 @@ sctp_handle_forward_tsn(struct sctp_tcb 
 	 * report where we are.
 	 */
 	struct sctp_association *asoc;
-	uint32_t new_cum_tsn, tsn, gap;
-	unsigned int i, fwd_sz, cumack_set_flag, m_size, fnd = 0;
+	uint32_t new_cum_tsn, gap;
+	unsigned int i, fwd_sz, cumack_set_flag, m_size;
 	uint32_t str_seq;
 	struct sctp_stream_in *strm;
 	struct sctp_tmit_chunk *chk, *at;
@@ -5565,15 +5566,6 @@ sctp_handle_forward_tsn(struct sctp_tcb 
 		/* Already got there ... */
 		return;
 	}
-	if (compare_with_wrap(new_cum_tsn, asoc->highest_tsn_inside_map,
-	    MAX_TSN)) {
-		asoc->highest_tsn_inside_map = new_cum_tsn;
-
-	}
-	if (compare_with_wrap(new_cum_tsn, asoc->highest_tsn_inside_nr_map,
-	    MAX_TSN)) {
-		asoc->highest_tsn_inside_nr_map = new_cum_tsn;
-	}
 	/*
 	 * now we know the new TSN is more advanced, let's find the actual
 	 * gap
@@ -5628,34 +5620,14 @@ sctp_handle_forward_tsn(struct sctp_tcb 
 	} else {
 		SCTP_TCB_LOCK_ASSERT(stcb);
 		for (i = 0; i <= gap; i++) {
-			SCTP_UNSET_TSN_PRESENT(asoc->mapping_array, i);
-			SCTP_SET_TSN_PRESENT(asoc->nr_mapping_array, i);
-			/* FIX ME add something to set up highest TSN in map */
-		}
-		if (compare_with_wrap(new_cum_tsn, asoc->highest_tsn_inside_nr_map, MAX_TSN)) {
-			asoc->highest_tsn_inside_nr_map = new_cum_tsn;
-		}
-		if (compare_with_wrap(new_cum_tsn, asoc->highest_tsn_inside_map, MAX_TSN) ||
-		    new_cum_tsn == asoc->highest_tsn_inside_map) {
-			/* We must back down to see what the new highest is */
-			for (tsn = new_cum_tsn; (compare_with_wrap(tsn, asoc->mapping_array_base_tsn, MAX_TSN) ||
-			    (tsn == asoc->mapping_array_base_tsn)); tsn--) {
-				SCTP_CALC_TSN_TO_GAP(gap, tsn, asoc->mapping_array_base_tsn);
-				if (SCTP_IS_TSN_PRESENT(asoc->mapping_array, gap)) {
-					asoc->highest_tsn_inside_map = tsn;
-					fnd = 1;
-					break;
+			if (!SCTP_IS_TSN_PRESENT(asoc->mapping_array, i) &&
+			    !SCTP_IS_TSN_PRESENT(asoc->nr_mapping_array, i)) {
+				SCTP_SET_TSN_PRESENT(asoc->nr_mapping_array, i);
+				if (compare_with_wrap(asoc->mapping_array_base_tsn + i, asoc->highest_tsn_inside_nr_map, MAX_TSN)) {
+					asoc->highest_tsn_inside_nr_map = asoc->mapping_array_base_tsn + i;
 				}
 			}
-			if (!fnd) {
-				asoc->highest_tsn_inside_map = asoc->mapping_array_base_tsn - 1;
-			}
 		}
-		/*
-		 * Now after marking all, slide thing forward but no sack
-		 * please.
-		 */
-		sctp_slide_mapping_arrays(stcb);
 	}
 	/*************************************************************/
 	/* 2. Clear up re-assembly queue                             */
@@ -5826,6 +5798,11 @@ sctp_handle_forward_tsn(struct sctp_tcb 
 		}
 		SCTP_INP_READ_UNLOCK(stcb->sctp_ep);
 	}
+	/*
+	 * Now slide thing forward.
+	 */
+	sctp_slide_mapping_arrays(stcb);
+
 	if (TAILQ_FIRST(&asoc->reasmqueue)) {
 		/* now lets kick out and check for more fragmented delivery */
 		/* sa_ignore NO_NULL_CHK */

From owner-svn-src-head@FreeBSD.ORG  Wed May 12 14:20:49 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 0C7DA1065678;
	Wed, 12 May 2010 14:20:49 +0000 (UTC) (envelope-from mj@feral.com)
Received: from ns1.feral.com (ns1.feral.com [192.67.166.1])
	by mx1.freebsd.org (Postfix) with ESMTP id C11478FC21;
	Wed, 12 May 2010 14:20:48 +0000 (UTC)
Received: from [192.168.0.102] (m206-63.dsl.tsoft.com [198.144.206.63])
	by ns1.feral.com (8.14.3/8.14.3) with ESMTP id o4CEKlvt098002;
	Wed, 12 May 2010 07:20:48 -0700 (PDT) (envelope-from mj@feral.com)
Message-ID: <4BEAB941.1000009@feral.com>
Date: Wed, 12 May 2010 07:20:49 -0700
From: Matthew Jacob 
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
	rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4
MIME-Version: 1.0
To: Ronald Klop 
References: <201005112222.o4BMM1uq012874@svn.freebsd.org>
	
In-Reply-To: 
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.2.3
	(ns1.feral.com [192.67.166.1]);
	Wed, 12 May 2010 07:20:48 -0700 (PDT)
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, Matt Jacob 
Subject: Re: svn commit: r207933 - head/sys/cam/scsi
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 12 May 2010 14:20:49 -0000

  Ow. No need to be rude :-).

No, I didn't, why do you ask?

> Wow, did you copy this from windows? :-)


From owner-svn-src-head@FreeBSD.ORG  Wed May 12 14:23:46 2010
Return-Path: 
Delivered-To: svn-src-head@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id C62CC1065679;
	Wed, 12 May 2010 14:23:46 +0000 (UTC)
	(envelope-from scottl@samsco.org)
Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57])
	by mx1.freebsd.org (Postfix) with ESMTP id 6BF9E8FC1B;
	Wed, 12 May 2010 14:23:46 +0000 (UTC)
Received: from [127.0.0.1] (pooker.samsco.org [168.103.85.57])
	(authenticated bits=0)
	by pooker.samsco.org (8.14.3/8.14.3) with ESMTP id o4CENdUK032676;
	Wed, 12 May 2010 08:23:40 -0600 (MDT)
	(envelope-from scottl@samsco.org)
Mime-Version: 1.0 (Apple Message framework v1078)
Content-Type: text/plain; charset=us-ascii
From: Scott Long 
In-Reply-To: <4BEAB941.1000009@feral.com>
Date: Wed, 12 May 2010 08:23:39 -0600
Content-Transfer-Encoding: quoted-printable
Message-Id: 
References: <201005112222.o4BMM1uq012874@svn.freebsd.org>
	
	<4BEAB941.1000009@feral.com>
To: Matthew Jacob 
X-Mailer: Apple Mail (2.1078)
X-Spam-Status: No, score=-50.0 required=3.8 tests=ALL_TRUSTED,
	T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.0
X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on pooker.samsco.org
Cc: svn-src-head@FreeBSD.org, Ronald Klop ,
	src-committers@FreeBSD.org, Matt Jacob ,
	svn-src-all@FreeBSD.org
Subject: Re: svn commit: r207933 - head/sys/cam/scsi
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 12 May 2010 14:23:46 -0000

On May 12, 2010, at 8:20 AM, Matthew Jacob wrote:
> Ow. No need to be rude :-).
>=20
> No, I didn't, why do you ask?
>=20
>> Wow, did you copy this from windows? :-)
>=20

Actually I'm impressed that someone is using my code.  I wrote it on a =
dare to see just how horrid the linux SG interface really is, and I =
wasn't disappointed.

Scott


From owner-svn-src-head@FreeBSD.ORG  Wed May 12 14:29:23 2010
Return-Path: 
Delivered-To: svn-src-head@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 81A3A1065679;
	Wed, 12 May 2010 14:29:23 +0000 (UTC) (envelope-from mj@feral.com)
Received: from ns1.feral.com (ns1.feral.com [192.67.166.1])
	by mx1.freebsd.org (Postfix) with ESMTP id 3DE6A8FC21;
	Wed, 12 May 2010 14:29:23 +0000 (UTC)
Received: from [192.168.0.102] (m206-63.dsl.tsoft.com [198.144.206.63])
	by ns1.feral.com (8.14.3/8.14.3) with ESMTP id o4CETMcw098076;
	Wed, 12 May 2010 07:29:22 -0700 (PDT) (envelope-from mj@feral.com)
Message-ID: <4BEABB45.8030401@feral.com>
Date: Wed, 12 May 2010 07:29:25 -0700
From: Matthew Jacob 
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
	rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4
MIME-Version: 1.0
To: Scott Long 
References: <201005112222.o4BMM1uq012874@svn.freebsd.org>
	
	<4BEAB941.1000009@feral.com>
	
In-Reply-To: 
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.2.3
	(ns1.feral.com [192.67.166.1]);
	Wed, 12 May 2010 07:29:22 -0700 (PDT)
Cc: svn-src-head@FreeBSD.org, Ronald Klop ,
	src-committers@FreeBSD.org, Matt Jacob ,
	svn-src-all@FreeBSD.org
Subject: Re: svn commit: r207933 - head/sys/cam/scsi
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 12 May 2010 14:29:23 -0000

On 5/12/2010 7:23 AM, Scott Long wrote:
> On May 12, 2010, at 8:20 AM, Matthew Jacob wrote:
>    
>> Ow. No need to be rude :-).
>>
>> No, I didn't, why do you ask?
>>
>>      
>>> Wow, did you copy this from windows? :-)
>>>        
>>      
> Actually I'm impressed that someone is using my code.  I wrote it on a dare to see just how horrid the linux SG interface really is, and I wasn't disappointed.
>
> Scott
>
>    
It turns out that Panasas is using the Java bundle from LSI on FreeBSD 
for Santricity management. It opens /dev/sg**. There's a change 
somewhere else to manage some 64 and 32 bit compatibility issues I'm 
going to pull in.

No matter how bad Linux can be in many respects, it has market share, 
and it benefits freebsd to be able to support tools, no matter how 
broken, from that platform.

The reason I also hit this situation is my virtual fake HBA has one test 
mode where it creates 2000 da devices. That's why I found this funny one 
for sg.
And, it turns out, this is not just a cosmetic issue.


From owner-svn-src-head@FreeBSD.ORG  Wed May 12 14:35:33 2010
Return-Path: 
Delivered-To: svn-src-head@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id A4B8A106564A;
	Wed, 12 May 2010 14:35:33 +0000 (UTC)
	(envelope-from scottl@samsco.org)
Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57])
	by mx1.freebsd.org (Postfix) with ESMTP id 416628FC0A;
	Wed, 12 May 2010 14:35:33 +0000 (UTC)
Received: from [127.0.0.1] (pooker.samsco.org [168.103.85.57])
	(authenticated bits=0)
	by pooker.samsco.org (8.14.3/8.14.3) with ESMTP id o4CEZTnD032761;
	Wed, 12 May 2010 08:35:29 -0600 (MDT)
	(envelope-from scottl@samsco.org)
Mime-Version: 1.0 (Apple Message framework v1078)
Content-Type: text/plain; charset=us-ascii
From: Scott Long 
In-Reply-To: <4BEABB45.8030401@feral.com>
Date: Wed, 12 May 2010 08:35:29 -0600
Content-Transfer-Encoding: quoted-printable
Message-Id: <9039EF21-1DAA-445F-95D5-02CB6E0DDF7D@samsco.org>
References: <201005112222.o4BMM1uq012874@svn.freebsd.org>
	
	<4BEAB941.1000009@feral.com>
	
	<4BEABB45.8030401@feral.com>
To: Matthew Jacob 
X-Mailer: Apple Mail (2.1078)
X-Spam-Status: No, score=-50.0 required=3.8 tests=ALL_TRUSTED,
	T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.0
X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on pooker.samsco.org
Cc: svn-src-head@FreeBSD.org, Ronald Klop ,
	src-committers@FreeBSD.org, Matt Jacob ,
	svn-src-all@FreeBSD.org
Subject: Re: svn commit: r207933 - head/sys/cam/scsi
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 12 May 2010 14:35:33 -0000


On May 12, 2010, at 8:29 AM, Matthew Jacob wrote:

> On 5/12/2010 7:23 AM, Scott Long wrote:
>> On May 12, 2010, at 8:20 AM, Matthew Jacob wrote:
>>  =20
>>> Ow. No need to be rude :-).
>>>=20
>>> No, I didn't, why do you ask?
>>>=20
>>>    =20
>>>> Wow, did you copy this from windows? :-)
>>>>      =20
>>>    =20
>> Actually I'm impressed that someone is using my code.  I wrote it on =
a dare to see just how horrid the linux SG interface really is, and I =
wasn't disappointed.
>>=20
>> Scott
>>=20
>>  =20
> It turns out that Panasas is using the Java bundle from LSI on FreeBSD =
for Santricity management. It opens /dev/sg**. There's a change =
somewhere else to manage some 64 and 32 bit compatibility issues I'm =
going to pull in.
>=20
> No matter how bad Linux can be in many respects, it has market share, =
and it benefits freebsd to be able to support tools, no matter how =
broken, from that platform.
>=20

Yup, and that's exactly why I checked it into the tree instead of =
burning it while performing pagan dances under a full moon =3D-)

> The reason I also hit this situation is my virtual fake HBA has one =
test mode where it creates 2000 da devices. That's why I found this =
funny one for sg.
> And, it turns out, this is not just a cosmetic issue.
>=20

Thanks for taking an interest in it and fixing bugs.

Scott


From owner-svn-src-head@FreeBSD.ORG  Wed May 12 15:47:43 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 685E81065673;
	Wed, 12 May 2010 15:47:43 +0000 (UTC)
	(envelope-from brueffer@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44])
	by mx1.freebsd.org (Postfix) with ESMTP id 582528FC1C;
	Wed, 12 May 2010 15:47:43 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4CFlhBC051301;
	Wed, 12 May 2010 15:47:43 GMT
	(envelope-from brueffer@svn.freebsd.org)
Received: (from brueffer@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4CFlhtF051299;
	Wed, 12 May 2010 15:47:43 GMT
	(envelope-from brueffer@svn.freebsd.org)
Message-Id: <201005121547.o4CFlhtF051299@svn.freebsd.org>
From: Christian Brueffer 
Date: Wed, 12 May 2010 15:47:43 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r207964 - head/sbin/kldstat
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 12 May 2010 15:47:43 -0000

Author: brueffer
Date: Wed May 12 15:47:43 2010
New Revision: 207964
URL: http://svn.freebsd.org/changeset/base/207964

Log:
  Casting size_t to uintmax_t is not necessary anymore. This also
  removes the need for stdint.h inclusion.
  
  PR:		146046
  Submitted by:	Alexander Best 
  Reviewed by:	kan
  MFC after:	1 week

Modified:
  head/sbin/kldstat/kldstat.c

Modified: head/sbin/kldstat/kldstat.c
==============================================================================
--- head/sbin/kldstat/kldstat.c	Wed May 12 13:45:46 2010	(r207963)
+++ head/sbin/kldstat/kldstat.c	Wed May 12 15:47:43 2010	(r207964)
@@ -28,7 +28,6 @@
 __FBSDID("$FreeBSD$");
 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -60,8 +59,8 @@ static void printfile(int fileid, int ve
     if (kldstat(fileid, &stat) < 0)
 	warn("can't stat file id %d", fileid);
     else
-	printf("%2d %4d %p %-8jx %s",
-	       stat.id, stat.refs, stat.address, (uintmax_t)stat.size, 
+	printf("%2d %4d %p %-8zx %s",
+	       stat.id, stat.refs, stat.address, stat.size, 
 	       stat.name);
 
     if (verbose) {

From owner-svn-src-head@FreeBSD.ORG  Wed May 12 16:10:33 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id BEA6F1065673;
	Wed, 12 May 2010 16:10:33 +0000 (UTC)
	(envelope-from tuexen@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44])
	by mx1.freebsd.org (Postfix) with ESMTP id AE9C48FC16;
	Wed, 12 May 2010 16:10:33 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4CGAXkE056601;
	Wed, 12 May 2010 16:10:33 GMT (envelope-from tuexen@svn.freebsd.org)
Received: (from tuexen@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4CGAXp5056598;
	Wed, 12 May 2010 16:10:33 GMT (envelope-from tuexen@svn.freebsd.org)
Message-Id: <201005121610.o4CGAXp5056598@svn.freebsd.org>
From: Michael Tuexen 
Date: Wed, 12 May 2010 16:10:33 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r207966 - head/sys/netinet
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 12 May 2010 16:10:33 -0000

Author: tuexen
Date: Wed May 12 16:10:33 2010
New Revision: 207966
URL: http://svn.freebsd.org/changeset/base/207966

Log:
  Get rid of unused constants.
  
  MFC after: 3 days.

Modified:
  head/sys/netinet/sctp_constants.h
  head/sys/netinet/sctp_indata.c

Modified: head/sys/netinet/sctp_constants.h
==============================================================================
--- head/sys/netinet/sctp_constants.h	Wed May 12 16:01:48 2010	(r207965)
+++ head/sys/netinet/sctp_constants.h	Wed May 12 16:10:33 2010	(r207966)
@@ -361,14 +361,6 @@ __FBSDID("$FreeBSD$");
 						 * hit this value) */
 #define SCTP_DATAGRAM_RESEND		4
 #define SCTP_DATAGRAM_ACKED		10010
-/* EY
- * If a tsn is nr-gapped, its first tagged as NR_MARKED and then NR_ACKED
- * When yet another nr-sack is received, if a particular TSN's sent tag
- * is observed to be NR_ACKED after gap-ack info is processed, this implies
- * that particular TSN is reneged
-*/
-#define SCTP_DATAGRAM_NR_ACKED 		10020
-#define SCTP_DATAGRAM_NR_MARKED		20005
 #define SCTP_DATAGRAM_MARKED		20010
 #define SCTP_FORWARD_TSN_SKIP		30010
 

Modified: head/sys/netinet/sctp_indata.c
==============================================================================
--- head/sys/netinet/sctp_indata.c	Wed May 12 16:01:48 2010	(r207965)
+++ head/sys/netinet/sctp_indata.c	Wed May 12 16:10:33 2010	(r207966)
@@ -4917,14 +4917,6 @@ done_with_it:
 		if (tp1 != NULL) {
 			/* Peer revoked all dg's marked or acked */
 			TAILQ_FOREACH(tp1, &asoc->sent_queue, sctp_next) {
-				/*
-				 * EY- maybe check only if it is nr_acked
-				 * nr_marked may not be possible
-				 */
-				if ((tp1->sent == SCTP_DATAGRAM_NR_ACKED) ||
-				    (tp1->sent == SCTP_DATAGRAM_NR_MARKED)) {
-					continue;
-				}
 				if (tp1->sent == SCTP_DATAGRAM_ACKED) {
 					tp1->sent = SCTP_DATAGRAM_SENT;
 					if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_FLIGHT_LOGGING_ENABLE) {

From owner-svn-src-head@FreeBSD.ORG  Wed May 12 16:42:28 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id A890B1065670;
	Wed, 12 May 2010 16:42:28 +0000 (UTC) (envelope-from pjd@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44])
	by mx1.freebsd.org (Postfix) with ESMTP id 9863F8FC0C;
	Wed, 12 May 2010 16:42:28 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4CGgSlu063843;
	Wed, 12 May 2010 16:42:28 GMT (envelope-from pjd@svn.freebsd.org)
Received: (from pjd@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4CGgS8h063841;
	Wed, 12 May 2010 16:42:28 GMT (envelope-from pjd@svn.freebsd.org)
Message-Id: <201005121642.o4CGgS8h063841@svn.freebsd.org>
From: Pawel Jakub Dawidek 
Date: Wed, 12 May 2010 16:42:28 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r207970 - head/sys/kern
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 12 May 2010 16:42:28 -0000

Author: pjd
Date: Wed May 12 16:42:28 2010
New Revision: 207970
URL: http://svn.freebsd.org/changeset/base/207970

Log:
  When there is no memory or KVA, try to help by reclaiming some vnodes.
  This helps with 'kmem_map too small' panics.
  
  No objections from:	kib
  Tested by:		Alexander V. Ribchansky 
  MFC after:		1 week

Modified:
  head/sys/kern/vfs_subr.c

Modified: head/sys/kern/vfs_subr.c
==============================================================================
--- head/sys/kern/vfs_subr.c	Wed May 12 16:28:41 2010	(r207969)
+++ head/sys/kern/vfs_subr.c	Wed May 12 16:42:28 2010	(r207970)
@@ -821,6 +821,19 @@ static struct kproc_desc vnlru_kp = {
 };
 SYSINIT(vnlru, SI_SUB_KTHREAD_UPDATE, SI_ORDER_FIRST, kproc_start,
     &vnlru_kp);
+ 
+static void
+vfs_lowmem(void *arg __unused)
+{
+
+	/*
+	 * On low memory condition free 1/8th of the free vnodes.
+	 */
+	mtx_lock(&vnode_free_list_mtx);
+	vnlru_free(freevnodes / 8);
+	mtx_unlock(&vnode_free_list_mtx);
+}
+EVENTHANDLER_DEFINE(vm_lowmem, vfs_lowmem, NULL, 0);
 
 /*
  * Routines having to do with the management of the vnode table.

From owner-svn-src-head@FreeBSD.ORG  Wed May 12 16:59:59 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5693B106566B;
	Wed, 12 May 2010 16:59:59 +0000 (UTC)
	(envelope-from yongari@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 3C2258FC0A;
	Wed, 12 May 2010 16:59:59 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4CGxwKJ067687;
	Wed, 12 May 2010 16:59:58 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4CGxwCt067685;
	Wed, 12 May 2010 16:59:58 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <201005121659.o4CGxwCt067685@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Wed, 12 May 2010 16:59:58 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r207971 - head/share/man/man4
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 12 May 2010 16:59:59 -0000

Author: yongari
Date: Wed May 12 16:59:58 2010
New Revision: 207971
URL: http://svn.freebsd.org/changeset/base/207971

Log:
  Document undocumented tunables and sysctl variables.
  While here use actual string to specify width as well as using Cm
  to set command argument.
  
  Reviewed by:	brueffer

Modified:
  head/share/man/man4/fxp.4

Modified: head/share/man/man4/fxp.4
==============================================================================
--- head/share/man/man4/fxp.4	Wed May 12 16:42:28 2010	(r207970)
+++ head/share/man/man4/fxp.4	Wed May 12 16:59:58 2010	(r207971)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd December 15, 2008
+.Dd May 12, 2010
 .Dt FXP 4
 .Os
 .Sh NAME
@@ -62,23 +62,25 @@ except i82557, i82259ER and early i82558
 The
 .Nm
 driver supports the following media types:
-.Pp
-.Bl -tag -width xxxxxxxxxxxxxxxxxxxx
-.It autoselect
-Enable autoselection of the media type and options
-.It 10baseT/UTP
-Set 10Mbps operation
-.It 100baseTX
-Set 100Mbps (Fast Ethernet) operation
+.Bl -tag -width "10baseT/UTP"
+.It Cm autoselect
+Enable autoselection of the media type and options.
+The autoselected mode can be overridden by adding the media options to
+.Xr rc.conf 5 .
+.It Cm 10baseT/UTP
+Set 10Mbps operation.
+.It Cm 100baseTX
+Set 100Mbps (Fast Ethernet) operation.
 .El
 .Pp
 The
 .Nm
 driver supports the following media options:
-.Pp
-.Bl -tag -width xxxxxxxxxxxxxxxxxxxx
-.It full-duplex
-Set full duplex operation
+.Bl -tag -width "full-duplex"
+.It Cm full-duplex
+Force full duplex operation.
+.It Cm half-duplex
+Force half duplex operation.
 .El
 .Pp
 Note that 100baseTX media type is not available on the Pro/10.
@@ -143,6 +145,43 @@ NEC PC-9821X-B06 (PC-98)
 .It
 Many on-board network interfaces on Intel motherboards
 .El
+.Sh LOADER TUNABLES
+Tunables can be set at the
+.Xr loader 8
+prompt before booting the kernel or stored in
+.Xr loader.conf 5 .
+The following variables are available as both
+.Xr loader 8
+tunables and
+.Xr sysctl 8
+variables:
+.Bl -tag -width "xxxxxx"
+.It Va dev.fxp.%d.int_delay
+Maximum amount of time, in microseconds, that an interrupt may
+be delayed in an attempt to coalesce interrupts.
+This is only effective if the Intel microcode is loaded.
+The accepted range is 300 to 3000, the default is 1000.
+.It Va dev.fxp.%d.bundle_max
+Number of packets that will be bundled, before an interrupt is
+generated.
+This is only effective if the Intel microcode is loaded.
+The accepted range is 1 to 65535, the default is 6.
+.It Va dev.fxp.%d.noflow
+Controls whether flow control should be used or not.
+The default is 1 (no flow control).
+.El
+.Sh SYSCTL VARIABLES
+The following variables are available as
+.Xr sysctl 8
+variables.
+.Bl -tag -width "xxxxxx"
+.It Va dev.fxp.%d.rnr
+This is a read-only variable and shows the number of events of
+RNR (resource not ready).
+.It Va dev.fxp.%d.stats
+This is a read-only variable and displays useful MAC counters
+maintained in the driver.
+.El
 .Sh DIAGNOSTICS
 .Bl -diag
 .It "fxp%d: couldn't map memory"

From owner-svn-src-head@FreeBSD.ORG  Wed May 12 17:12:39 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2E9531065673;
	Wed, 12 May 2010 17:12:39 +0000 (UTC)
	(envelope-from brueffer@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 1E4D18FC1B;
	Wed, 12 May 2010 17:12:39 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4CHCd9K070652;
	Wed, 12 May 2010 17:12:39 GMT
	(envelope-from brueffer@svn.freebsd.org)
Received: (from brueffer@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4CHCdK4070650;
	Wed, 12 May 2010 17:12:39 GMT
	(envelope-from brueffer@svn.freebsd.org)
Message-Id: <201005121712.o4CHCdK4070650@svn.freebsd.org>
From: Christian Brueffer 
Date: Wed, 12 May 2010 17:12:38 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r207975 - head/share/man/man4
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 12 May 2010 17:12:39 -0000

Author: brueffer
Date: Wed May 12 17:12:38 2010
New Revision: 207975
URL: http://svn.freebsd.org/changeset/base/207975

Log:
  IBM ServeRAID M5015 SAS/SATA works.
  
  PR:		144614
  Submitted by:	pluknet 
  MFC after:	1 week

Modified:
  head/share/man/man4/mfi.4

Modified: head/share/man/man4/mfi.4
==============================================================================
--- head/share/man/man4/mfi.4	Wed May 12 17:11:38 2010	(r207974)
+++ head/share/man/man4/mfi.4	Wed May 12 17:12:38 2010	(r207975)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd January 2, 2010
+.Dd May 12, 2010
 .Dt MFI 4
 .Os
 .Sh NAME
@@ -91,6 +91,8 @@ Dell PERC5
 .It
 Dell PERC6
 .It
+IBM ServeRAID M5015 SAS/SATA
+.It
 IBM ServeRAID-MR10i
 .It
 Intel RAID Controller SROMBSAS18E

From owner-svn-src-head@FreeBSD.ORG  Wed May 12 17:30:47 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6E3C11065676;
	Wed, 12 May 2010 17:30:47 +0000 (UTC)
	(envelope-from brueffer@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 5DFF18FC1B;
	Wed, 12 May 2010 17:30:47 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4CHUlm2074831;
	Wed, 12 May 2010 17:30:47 GMT
	(envelope-from brueffer@svn.freebsd.org)
Received: (from brueffer@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4CHUlgp074829;
	Wed, 12 May 2010 17:30:47 GMT
	(envelope-from brueffer@svn.freebsd.org)
Message-Id: <201005121730.o4CHUlgp074829@svn.freebsd.org>
From: Christian Brueffer 
Date: Wed, 12 May 2010 17:30:47 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r207979 - head/sys/modules
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 12 May 2010 17:30:47 -0000

Author: brueffer
Date: Wed May 12 17:30:46 2010
New Revision: 207979
URL: http://svn.freebsd.org/changeset/base/207979

Log:
  Build the ixgbe(4) and mwlfw(4) modules by default.
  
  PR:		144494
  Submitted by:	John Giacomoni , brucec

Modified:
  head/sys/modules/Makefile

Modified: head/sys/modules/Makefile
==============================================================================
--- head/sys/modules/Makefile	Wed May 12 17:22:11 2010	(r207978)
+++ head/sys/modules/Makefile	Wed May 12 17:30:46 2010	(r207979)
@@ -144,6 +144,7 @@ SUBDIR=	${_3dfx} \
 	${_iwn} \
 	${_iwnfw} \
 	${_ixgb} \
+	${_ixgbe} \
 	jme \
 	joy \
 	kbdmux \
@@ -190,6 +191,7 @@ SUBDIR=	${_3dfx} \
 	msk \
 	mvs \
 	mwl \
+	mwlfw \
 	mxge \
 	my \
 	${_ncp} \
@@ -465,6 +467,7 @@ _iwifw=		iwifw
 _iwn=		iwn
 _iwnfw=		iwnfw
 _ixgb=		ixgb
+_ixgbe=		ixgbe
 _mly=		mly
 _nfe=		nfe
 _nve=		nve
@@ -537,6 +540,7 @@ _iwifw=		iwifw
 _iwn=		iwn
 _iwnfw=		iwnfw
 _ixgb=		ixgb
+_ixgbe=		ixgbe
 _lindev=	lindev
 _linprocfs=	linprocfs
 _linsysfs=	linsysfs

From owner-svn-src-head@FreeBSD.ORG  Wed May 12 17:44:00 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 97D831065673;
	Wed, 12 May 2010 17:44:00 +0000 (UTC)
	(envelope-from gordon@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 8788D8FC18;
	Wed, 12 May 2010 17:44:00 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4CHi0Zh077968;
	Wed, 12 May 2010 17:44:00 GMT (envelope-from gordon@svn.freebsd.org)
Received: (from gordon@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4CHi02M077966;
	Wed, 12 May 2010 17:44:00 GMT (envelope-from gordon@svn.freebsd.org)
Message-Id: <201005121744.o4CHi02M077966@svn.freebsd.org>
From: Gordon Tetlow 
Date: Wed, 12 May 2010 17:44:00 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r207981 - head/lib/libc/gen
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 12 May 2010 17:44:00 -0000

Author: gordon
Date: Wed May 12 17:44:00 2010
New Revision: 207981
URL: http://svn.freebsd.org/changeset/base/207981

Log:
  Fix a bug due to a type conversion from 64 to 32 bits. The side effect of
  this type conversion is the high bits which were used to indicate if a
  special character was a literal or special were dropped. As a result, all
  special character were treated as special, even if they were supposed to
  be literals.
  
  Reviewed by:	gad@
  Approved by:	mentor (wes@)

Modified:
  head/lib/libc/gen/glob.c

Modified: head/lib/libc/gen/glob.c
==============================================================================
--- head/lib/libc/gen/glob.c	Wed May 12 17:34:51 2010	(r207980)
+++ head/lib/libc/gen/glob.c	Wed May 12 17:44:00 2010	(r207981)
@@ -433,9 +433,9 @@ static int
 glob0(const Char *pattern, glob_t *pglob, size_t *limit)
 {
 	const Char *qpatnext;
-	int c, err;
+	int err;
 	size_t oldpathc;
-	Char *bufnext, patbuf[MAXPATHLEN];
+	Char *bufnext, c, patbuf[MAXPATHLEN];
 
 	qpatnext = globtilde(pattern, patbuf, MAXPATHLEN, pglob);
 	oldpathc = pglob->gl_pathc;

From owner-svn-src-head@FreeBSD.ORG  Wed May 12 17:53:06 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 29CB81065676;
	Wed, 12 May 2010 17:53:06 +0000 (UTC)
	(envelope-from brueffer@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 1909F8FC16;
	Wed, 12 May 2010 17:53:06 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4CHr5GK080049;
	Wed, 12 May 2010 17:53:05 GMT
	(envelope-from brueffer@svn.freebsd.org)
Received: (from brueffer@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4CHr5J2080047;
	Wed, 12 May 2010 17:53:05 GMT
	(envelope-from brueffer@svn.freebsd.org)
Message-Id: <201005121753.o4CHr5J2080047@svn.freebsd.org>
From: Christian Brueffer 
Date: Wed, 12 May 2010 17:53:05 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r207982 - head/release/doc/en_US.ISO8859-1/hardware
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 12 May 2010 17:53:06 -0000

Author: brueffer
Date: Wed May 12 17:53:05 2010
New Revision: 207982
URL: http://svn.freebsd.org/changeset/base/207982

Log:
  Add et(4), sge(4) and mwl(4).

Modified:
  head/release/doc/en_US.ISO8859-1/hardware/article.sgml

Modified: head/release/doc/en_US.ISO8859-1/hardware/article.sgml
==============================================================================
--- head/release/doc/en_US.ISO8859-1/hardware/article.sgml	Wed May 12 17:44:00 2010	(r207981)
+++ head/release/doc/en_US.ISO8859-1/hardware/article.sgml	Wed May 12 17:53:05 2010	(r207982)
@@ -842,6 +842,8 @@
 
       &hwlist.ep;
 
+      &hwlist.et;
+
       &hwlist.ex;
 
       &hwlist.fe;
@@ -890,6 +892,8 @@
 
       &hwlist.sf;
 
+      &hwlist.sge;
+
       &hwlist.sis;
 
       &hwlist.sk;
@@ -981,6 +985,9 @@
       [&arch.i386;, &arch.amd64;] Marvell Libertas IEEE 802.11b/g
         PCI network adapters (&man.malo.4; driver)
 
+      Marvell 88W8363 IEEE 802.11n wireless network
+	adapters (&man.mwl.4; driver)
+
       &hwlist.ral;
 
       &hwlist.rum;

From owner-svn-src-head@FreeBSD.ORG  Wed May 12 18:00:15 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B767F1065672;
	Wed, 12 May 2010 18:00:15 +0000 (UTC) (envelope-from rrs@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 8A7368FC22;
	Wed, 12 May 2010 18:00:15 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4CI0FQ8081695;
	Wed, 12 May 2010 18:00:15 GMT (envelope-from rrs@svn.freebsd.org)
Received: (from rrs@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4CI0Fwq081692;
	Wed, 12 May 2010 18:00:15 GMT (envelope-from rrs@svn.freebsd.org)
Message-Id: <201005121800.o4CI0Fwq081692@svn.freebsd.org>
From: Randall Stewart 
Date: Wed, 12 May 2010 18:00:15 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r207983 - head/sys/netinet
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 12 May 2010 18:00:15 -0000

Author: rrs
Date: Wed May 12 18:00:15 2010
New Revision: 207983
URL: http://svn.freebsd.org/changeset/base/207983

Log:
  More PR-SCTP bugs:
    - Make sure that when you kick the streams you add correctly
      using a 16 bit unsigned.
    - Make sure when sending out you allow FWD-TSN to skip over
      and list the ACKED chunks in the stream/seq list (so the
      rcv will kick the stream)
  MFC after:	3 days

Modified:
  head/sys/netinet/sctp_indata.c
  head/sys/netinet/sctp_output.c

Modified: head/sys/netinet/sctp_indata.c
==============================================================================
--- head/sys/netinet/sctp_indata.c	Wed May 12 17:53:05 2010	(r207982)
+++ head/sys/netinet/sctp_indata.c	Wed May 12 18:00:15 2010	(r207983)
@@ -3750,7 +3750,8 @@ sctp_try_advance_peer_ack_point(struct s
 		 * the chunk, advance our peer ack point and we can check
 		 * the next chunk.
 		 */
-		if (tp1->sent == SCTP_FORWARD_TSN_SKIP) {
+		if ((tp1->sent == SCTP_FORWARD_TSN_SKIP) ||
+		    (tp1->sent == SCTP_DATAGRAM_ACKED)) {
 			/* advance PeerAckPoint goes forward */
 			if (compare_with_wrap(tp1->rec.data.TSN_seq,
 			    asoc->advanced_peer_ack_point,
@@ -5351,7 +5352,7 @@ sctp_kick_prsctp_reorder_queue(struct sc
 {
 	struct sctp_queued_to_read *ctl, *nctl;
 	struct sctp_association *asoc;
-	int tt;
+	uint16_t tt;
 
 	asoc = &stcb->asoc;
 	tt = strmin->last_sequence_delivered;

Modified: head/sys/netinet/sctp_output.c
==============================================================================
--- head/sys/netinet/sctp_output.c	Wed May 12 17:53:05 2010	(r207982)
+++ head/sys/netinet/sctp_output.c	Wed May 12 18:00:15 2010	(r207983)
@@ -9707,7 +9707,6 @@ send_forward_tsn(struct sctp_tcb *stcb,
 	chk->rec.chunk_id.can_take_data = 0;
 	chk->asoc = asoc;
 	chk->whoTo = NULL;
-
 	chk->data = sctp_get_mbuf_for_msg(MCLBYTES, 0, M_DONTWAIT, 1, MT_DATA);
 	if (chk->data == NULL) {
 		sctp_free_a_chunk(stcb, chk);
@@ -9734,7 +9733,8 @@ sctp_fill_in_rest:
 		unsigned int cnt_of_skipped = 0;
 
 		TAILQ_FOREACH(at, &asoc->sent_queue, sctp_next) {
-			if (at->sent != SCTP_FORWARD_TSN_SKIP) {
+			if ((at->sent != SCTP_FORWARD_TSN_SKIP) &&
+			    (at->sent != SCTP_DATAGRAM_ACKED)) {
 				/* no more to look at */
 				break;
 			}

From owner-svn-src-head@FreeBSD.ORG  Wed May 12 18:12:54 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 267C6106564A;
	Wed, 12 May 2010 18:12:54 +0000 (UTC)
	(envelope-from amdmi3@amdmi3.ru)
Received: from smtp.timeweb.ru (smtp.timeweb.ru [92.53.116.15])
	by mx1.freebsd.org (Postfix) with ESMTP id D43888FC12;
	Wed, 12 May 2010 18:12:53 +0000 (UTC)
Received: from [213.148.20.85] (helo=hive.panopticon)
	by smtp.timeweb.ru with esmtpsa (TLSv1:CAMELLIA256-SHA:256)
	(Exim 4.71) (envelope-from )
	id 1OCGQM-0000Oq-Ug; Wed, 12 May 2010 22:12:51 +0400
Received: from hades.panopticon (hades.panopticon [192.168.0.32])
	by hive.panopticon (Postfix) with ESMTP id 7A541B84D;
	Wed, 12 May 2010 22:12:50 +0400 (MSD)
Received: by hades.panopticon (Postfix, from userid 1000)
	id 65B6FB829; Wed, 12 May 2010 22:12:50 +0400 (MSD)
Date: Wed, 12 May 2010 22:12:50 +0400
From: Dmitry Marakasov 
To: Matt Jacob 
Message-ID: <20100512181250.GB497@hades.panopticon>
References: <201005112222.o4BMM1uq012874@svn.freebsd.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
In-Reply-To: <201005112222.o4BMM1uq012874@svn.freebsd.org>
User-Agent: Mutt/1.5.20 (2009-06-14)
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r207933 - head/sys/cam/scsi
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 12 May 2010 18:12:54 -0000

* Matt Jacob (mjacob@FreeBSD.org) wrote:

> -	(void)make_dev_alias(softc->dev, "sg%c", 'a' + periph->unit_number);
> +	if (periph->unit_number < 26) {
> +		(void)make_dev_alias(softc->dev, "sg%c", periph->unit_number + 'a');
> +	} else {
> +		(void)make_dev_alias(softc->dev, "sg%c%c",
> +		    ((periph->unit_number / 26) - 1) + 'a', periph->unit_number + 'a');

		    ((periph->unit_number / 26) - 1) + 'a', (periph->unit_number % 26) + 'a');

No?

-- 
Dmitry Marakasov   .   55B5 0596 FF1E 8D84 5F56  9510 D35A 80DD F9D2 F77D
amdmi3@amdmi3.ru  ..:  jabber: amdmi3@jabber.ru    http://www.amdmi3.ru

From owner-svn-src-head@FreeBSD.ORG  Wed May 12 18:18:48 2010
Return-Path: 
Delivered-To: svn-src-head@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 99105106564A;
	Wed, 12 May 2010 18:18:48 +0000 (UTC) (envelope-from mj@feral.com)
Received: from ns1.feral.com (ns1.feral.com [192.67.166.1])
	by mx1.freebsd.org (Postfix) with ESMTP id 70A1F8FC08;
	Wed, 12 May 2010 18:18:48 +0000 (UTC)
Received: from [192.168.221.2] (remotevpn [192.168.221.2])
	by ns1.feral.com (8.14.3/8.14.3) with ESMTP id o4CIIenj000562
	(version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO);
	Wed, 12 May 2010 11:18:40 -0700 (PDT) (envelope-from mj@feral.com)
Message-ID: <4BEAF100.5020500@feral.com>
Date: Wed, 12 May 2010 11:18:40 -0700
From: Matthew Jacob 
Organization: Feral Software
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US;
	rv:1.9.1.9) Gecko/20100330 Fedora/3.0.4-1.fc11 Thunderbird/3.0.4
MIME-Version: 1.0
To: Dmitry Marakasov 
References: <201005112222.o4BMM1uq012874@svn.freebsd.org>
	<20100512181250.GB497@hades.panopticon>
In-Reply-To: <20100512181250.GB497@hades.panopticon>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Greylist: Sender DNS name whitelisted, not delayed by milter-greylist-4.2.3
	(ns1.feral.com [192.168.221.1]);
	Wed, 12 May 2010 11:18:41 -0700 (PDT)
Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org,
	src-committers@FreeBSD.org, Matt Jacob 
Subject: Re: svn commit: r207933 - head/sys/cam/scsi
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
Reply-To: mj@feral.com
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 12 May 2010 18:18:48 -0000

On 05/12/2010 11:12 AM, Dmitry Marakasov wrote:
> * Matt Jacob (mjacob@FreeBSD.org) wrote:
>
>    
>> -	(void)make_dev_alias(softc->dev, "sg%c", 'a' + periph->unit_number);
>> +	if (periph->unit_number<  26) {
>> +		(void)make_dev_alias(softc->dev, "sg%c", periph->unit_number + 'a');
>> +	} else {
>> +		(void)make_dev_alias(softc->dev, "sg%c%c",
>> +		    ((periph->unit_number / 26) - 1) + 'a', periph->unit_number + 'a');
>>      
> 		((periph->unit_number / 26) - 1) + 'a', (periph->unit_number % 26) + 'a');
>
> No?
>
>    
yes, yes, the followup change corrected my pulling the wrong patch
thx


From owner-svn-src-head@FreeBSD.ORG  Wed May 12 18:33:26 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 0E14D106564A;
	Wed, 12 May 2010 18:33:26 +0000 (UTC) (envelope-from rrs@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id F22288FC0C;
	Wed, 12 May 2010 18:33:25 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4CIXPcc089137;
	Wed, 12 May 2010 18:33:25 GMT (envelope-from rrs@svn.freebsd.org)
Received: (from rrs@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4CIXPHH089135;
	Wed, 12 May 2010 18:33:25 GMT (envelope-from rrs@svn.freebsd.org)
Message-Id: <201005121833.o4CIXPHH089135@svn.freebsd.org>
From: Randall Stewart 
Date: Wed, 12 May 2010 18:33:25 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r207985 - head/sys/netinet
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 12 May 2010 18:33:26 -0000

Author: rrs
Date: Wed May 12 18:33:25 2010
New Revision: 207985
URL: http://svn.freebsd.org/changeset/base/207985

Log:
  Fix an old long time bug in generating a
  fwd-tsn. This would appear when greater than
  the size of mbuf TSN's would need to be skipped.
  
  MFC after:	3 days

Modified:
  head/sys/netinet/sctp_output.c

Modified: head/sys/netinet/sctp_output.c
==============================================================================
--- head/sys/netinet/sctp_output.c	Wed May 12 18:16:08 2010	(r207984)
+++ head/sys/netinet/sctp_output.c	Wed May 12 18:33:25 2010	(r207985)
@@ -9775,9 +9775,8 @@ sctp_fill_in_rest:
 				    0xff, 0xff, cnt_of_space,
 				    space_needed);
 			}
-			cnt_of_skipped = (cnt_of_space -
-			    ((sizeof(struct sctp_forward_tsn_chunk)) /
-			    sizeof(struct sctp_strseq)));
+			cnt_of_skipped = cnt_of_space - sizeof(struct sctp_forward_tsn_chunk);
+			cnt_of_skipped /= sizeof(struct sctp_strseq);
 			/*-
 			 * Go through and find the TSN that will be the one
 			 * we report.

From owner-svn-src-head@FreeBSD.ORG  Wed May 12 19:20:32 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id EA3831065676;
	Wed, 12 May 2010 19:20:32 +0000 (UTC)
	(envelope-from brueffer@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id DA3B28FC17;
	Wed, 12 May 2010 19:20:32 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4CJKWYq099789;
	Wed, 12 May 2010 19:20:32 GMT
	(envelope-from brueffer@svn.freebsd.org)
Received: (from brueffer@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4CJKWTs099787;
	Wed, 12 May 2010 19:20:32 GMT
	(envelope-from brueffer@svn.freebsd.org)
Message-Id: <201005121920.o4CJKWTs099787@svn.freebsd.org>
From: Christian Brueffer 
Date: Wed, 12 May 2010 19:20:32 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r207990 - head/share/man/man4
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 12 May 2010 19:20:33 -0000

Author: brueffer
Date: Wed May 12 19:20:32 2010
New Revision: 207990
URL: http://svn.freebsd.org/changeset/base/207990

Log:
  Make this ready for automatic hardware notes generation.

Modified:
  head/share/man/man4/run.4

Modified: head/share/man/man4/run.4
==============================================================================
--- head/share/man/man4/run.4	Wed May 12 19:20:03 2010	(r207989)
+++ head/share/man/man4/run.4	Wed May 12 19:20:32 2010	(r207990)
@@ -98,7 +98,9 @@ driver can be configured at runtime with
 or on boot with
 .Xr hostname.if 5 .
 .Sh HARDWARE
-The following adapters should work:
+The 
+.Nm
+driver supports the following wireless adapters:
 .Pp
 .Bl -tag -width Ds -offset indent -compact
 .It Airlink101 AWLL6090

From owner-svn-src-head@FreeBSD.ORG  Wed May 12 19:24:32 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3EF6C1065673;
	Wed, 12 May 2010 19:24:32 +0000 (UTC)
	(envelope-from brueffer@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 2E4088FC18;
	Wed, 12 May 2010 19:24:32 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4CJOWTK000821;
	Wed, 12 May 2010 19:24:32 GMT
	(envelope-from brueffer@svn.freebsd.org)
Received: (from brueffer@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4CJOWm4000818;
	Wed, 12 May 2010 19:24:32 GMT
	(envelope-from brueffer@svn.freebsd.org)
Message-Id: <201005121924.o4CJOWm4000818@svn.freebsd.org>
From: Christian Brueffer 
Date: Wed, 12 May 2010 19:24:32 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r207991 - in head/release/doc: en_US.ISO8859-1/hardware
	share/misc
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 12 May 2010 19:24:32 -0000

Author: brueffer
Date: Wed May 12 19:24:31 2010
New Revision: 207991
URL: http://svn.freebsd.org/changeset/base/207991

Log:
  Automatically generate hardware notes for run(4).

Modified:
  head/release/doc/en_US.ISO8859-1/hardware/article.sgml
  head/release/doc/share/misc/dev.archlist.txt

Modified: head/release/doc/en_US.ISO8859-1/hardware/article.sgml
==============================================================================
--- head/release/doc/en_US.ISO8859-1/hardware/article.sgml	Wed May 12 19:20:32 2010	(r207990)
+++ head/release/doc/en_US.ISO8859-1/hardware/article.sgml	Wed May 12 19:24:31 2010	(r207991)
@@ -992,6 +992,8 @@
 
       &hwlist.rum;
 
+      &hwlist.run;
+
       &hwlist.uath;
 
       &hwlist.upgt;

Modified: head/release/doc/share/misc/dev.archlist.txt
==============================================================================
--- head/release/doc/share/misc/dev.archlist.txt	Wed May 12 19:20:32 2010	(r207990)
+++ head/release/doc/share/misc/dev.archlist.txt	Wed May 12 19:24:31 2010	(r207991)
@@ -104,6 +104,7 @@ rc	i386
 ral	i386,amd64
 rue	i386,pc98,amd64
 rum	i386,amd64
+run	i386,amd64
 safe	i386,pc98,amd64
 sbp	i386,sparc64,ia64,amd64
 sis	i386,pc98,ia64,amd64

From owner-svn-src-head@FreeBSD.ORG  Wed May 12 19:59:33 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 28A5B106566C;
	Wed, 12 May 2010 19:59:33 +0000 (UTC)
	(envelope-from obrien@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 160DE8FC13;
	Wed, 12 May 2010 19:59:33 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4CJxWEO008794;
	Wed, 12 May 2010 19:59:32 GMT (envelope-from obrien@svn.freebsd.org)
Received: (from obrien@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4CJxWHc008785;
	Wed, 12 May 2010 19:59:32 GMT (envelope-from obrien@svn.freebsd.org)
Message-Id: <201005121959.o4CJxWHc008785@svn.freebsd.org>
From: "David E. O'Brien" 
Date: Wed, 12 May 2010 19:59:32 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r207995 - in head: . etc/mtree gnu/lib/libgcc
	gnu/lib/libstdc++ gnu/lib/libsupc++ gnu/usr.bin/cc
	gnu/usr.bin/cc/cc_tools gnu/usr.bin/cc/include
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 12 May 2010 19:59:33 -0000

Author: obrien
Date: Wed May 12 19:59:32 2010
New Revision: 207995
URL: http://svn.freebsd.org/changeset/base/207995

Log:
  Non-GCC gcc compatible compilers may provide the same multimedia intrinsic
  headers as GCC, but of their own implementation.  So put the GCC ones into
  their own header "namespace".
  
  Requested by:	ed

Modified:
  head/ObsoleteFiles.inc
  head/etc/mtree/BSD.include.dist
  head/gnu/lib/libgcc/Makefile
  head/gnu/lib/libstdc++/Makefile
  head/gnu/lib/libsupc++/Makefile
  head/gnu/usr.bin/cc/Makefile.inc
  head/gnu/usr.bin/cc/cc_tools/freebsd-native.h
  head/gnu/usr.bin/cc/include/Makefile

Modified: head/ObsoleteFiles.inc
==============================================================================
--- head/ObsoleteFiles.inc	Wed May 12 19:35:13 2010	(r207994)
+++ head/ObsoleteFiles.inc	Wed May 12 19:59:32 2010	(r207995)
@@ -14,6 +14,24 @@
 # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last.
 #
 
+# 20100511: move GCC-specific headers to /usr/include/gcc
+.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "i386"
+OLD_FILES+=usr/include/emmintrin.h
+OLD_FILES+=usr/include/mm_malloc.h
+OLD_FILES+=usr/include/pmmintrin.h
+OLD_FILES+=usr/include/xmmintrin.h
+.endif
+.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "i386" || ${TARGET_ARCH} == "arm"
+OLD_FILES+=usr/include/mmintrin.h
+.endif
+.if ${TARGET_ARCH} == "ia64"
+OLD_FILES+=usr/include/ia64intrin.h
+.endif
+.if ${TARGET_ARCH} == "powerpc"
+OLD_FILES+=usr/include/altivec.h
+OLD_FILES+=usr/include/ppc-asm.h
+OLD_FILES+=usr/include/spe.h
+.endif
 # 20100416: [mips] removed 
 .if ${TARGET_ARCH} == "mips"
 OLD_FILES+=usr/include/machine/psl.h

Modified: head/etc/mtree/BSD.include.dist
==============================================================================
--- head/etc/mtree/BSD.include.dist	Wed May 12 19:35:13 2010	(r207994)
+++ head/etc/mtree/BSD.include.dist	Wed May 12 19:59:32 2010	(r207995)
@@ -159,6 +159,10 @@
         unionfs
         ..
     ..
+    gcc
+        4.2
+        ..
+    ..
     geom
         cache
         ..

Modified: head/gnu/lib/libgcc/Makefile
==============================================================================
--- head/gnu/lib/libgcc/Makefile	Wed May 12 19:35:13 2010	(r207994)
+++ head/gnu/lib/libgcc/Makefile	Wed May 12 19:59:32 2010	(r207995)
@@ -1,4 +1,5 @@
 # $FreeBSD$
+
 GCCDIR=	${.CURDIR}/../../../contrib/gcc
 GCCLIB=	${.CURDIR}/../../../contrib/gcclibs
 

Modified: head/gnu/lib/libstdc++/Makefile
==============================================================================
--- head/gnu/lib/libstdc++/Makefile	Wed May 12 19:35:13 2010	(r207994)
+++ head/gnu/lib/libstdc++/Makefile	Wed May 12 19:59:32 2010	(r207995)
@@ -1,5 +1,6 @@
 # $FreeBSD$
 
+GCCVER=	4.2
 GCCDIR=	${.CURDIR}/../../../contrib/gcc
 GCCLIB=	${.CURDIR}/../../../contrib/gcclibs
 SRCDIR=	${.CURDIR}/../../../contrib/libstdc++
@@ -94,7 +95,7 @@ CLEANFILES+=	atomicity.cc
 
 INCSGROUPS=	BITSHDRS BKWHDRS EXTHDRS BASEHDRS BASEXHDRS STDHDRS \
 		TARGETHDRS THRHDRS DEBUGHDRS TR1HDRS PBHDRS0 PBHDRS1
-CXXINCLUDEDIR=	${INCLUDEDIR}/c++/4.2
+CXXINCLUDEDIR=	${INCLUDEDIR}/c++/${GCCVER}
 
 STDHDRS=	std_algorithm.h std_bitset.h std_complex.h std_deque.h \
 		std_fstream.h std_functional.h std_iomanip.h std_ios.h \

Modified: head/gnu/lib/libsupc++/Makefile
==============================================================================
--- head/gnu/lib/libsupc++/Makefile	Wed May 12 19:35:13 2010	(r207994)
+++ head/gnu/lib/libsupc++/Makefile	Wed May 12 19:59:32 2010	(r207995)
@@ -1,10 +1,11 @@
 # $FreeBSD$
 
+GCCVER=	4.2
 GCCDIR=	${.CURDIR}/../../../contrib/gcc
 GCCLIB=	${.CURDIR}/../../../contrib/gcclibs
 SRCDIR=	${.CURDIR}/../../../contrib/libstdc++/libsupc++
 
-.PATH: ${SRCDIR} ${GCCLIB}/libiberty 
+.PATH: ${SRCDIR} ${GCCLIB}/libiberty
 
 # Static only.
 LIB=	supc++
@@ -27,7 +28,7 @@ PO_CXXFLAGS=    ${CXXFLAGS:N-ffunction-s
 
 HDRS=	exception new typeinfo cxxabi.h exception_defines.h
 INCS=	${HDRS:S;^;${SRCDIR}/;}
-INCSDIR=${INCLUDEDIR}/c++/4.2
+INCSDIR=${INCLUDEDIR}/c++/${GCCVER}
 
 unwind.h: ${GCCDIR}/unwind-generic.h
 	ln -sf ${.ALLSRC} ${.TARGET}

Modified: head/gnu/usr.bin/cc/Makefile.inc
==============================================================================
--- head/gnu/usr.bin/cc/Makefile.inc	Wed May 12 19:35:13 2010	(r207994)
+++ head/gnu/usr.bin/cc/Makefile.inc	Wed May 12 19:59:32 2010	(r207995)
@@ -6,6 +6,7 @@
 .if !defined(__CC_MAKEFILE_INC__)
 __CC_MAKEFILE_INC__= ${MFILE}
 
+GCCVER=	4.2
 GCCDIR=	${.CURDIR}/../../../../contrib/gcc
 GCCLIB=	${.CURDIR}/../../../../contrib/gcclibs
 
@@ -15,6 +16,7 @@ GCCLIB=	${.CURDIR}/../../../../contrib/g
 MD_FILE=	${GCCDIR}/config/${GCC_CPU}/${GCC_CPU}.md
 GCC_TARGET=	${TARGET_ARCH}-undermydesk-freebsd
 
+CFLAGS+=	-DGCCVER=\"${GCCVER}\"
 CFLAGS+=	-DIN_GCC -DHAVE_CONFIG_H
 CFLAGS+=	-DPREFIX=\"${TOOLS_PREFIX}/usr\"
 #CFLAGS+=	-DWANT_COMPILER_INVARIANTS

Modified: head/gnu/usr.bin/cc/cc_tools/freebsd-native.h
==============================================================================
--- head/gnu/usr.bin/cc/cc_tools/freebsd-native.h	Wed May 12 19:35:13 2010	(r207994)
+++ head/gnu/usr.bin/cc/cc_tools/freebsd-native.h	Wed May 12 19:59:32 2010	(r207995)
@@ -15,9 +15,9 @@
 #undef LOCAL_INCLUDE_DIR		/* We don't wish to support one. */
 
 /* Look for the include files in the system-defined places.  */
-#define GPLUSPLUS_INCLUDE_DIR		PREFIX"/include/c++/4.2"
-#define	GPLUSPLUS_BACKWARD_INCLUDE_DIR	PREFIX"/include/c++/4.2/backward"
-#define GCC_INCLUDE_DIR			PREFIX"/include"
+#define GPLUSPLUS_INCLUDE_DIR		PREFIX"/include/c++/"GCCVER
+#define	GPLUSPLUS_BACKWARD_INCLUDE_DIR	PREFIX"/include/c++/"GCCVER"/backward"
+#define GCC_INCLUDE_DIR			PREFIX"/include/gcc/"GCCVER
 #ifdef CROSS_COMPILE
 #define CROSS_INCLUDE_DIR		PREFIX"/include"
 #else

Modified: head/gnu/usr.bin/cc/include/Makefile
==============================================================================
--- head/gnu/usr.bin/cc/include/Makefile	Wed May 12 19:35:13 2010	(r207994)
+++ head/gnu/usr.bin/cc/include/Makefile	Wed May 12 19:59:32 2010	(r207995)
@@ -2,6 +2,8 @@
 
 .include "../Makefile.inc"
 
+INCSDIR=${INCLUDEDIR}/gcc/${GCCVER}
+
 .PATH: ${GCCDIR}/config/${GCC_CPU}
 
 .if ${TARGET_ARCH} == "i386" || ${TARGET_ARCH} == "amd64"

From owner-svn-src-head@FreeBSD.ORG  Wed May 12 20:21:44 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9D54C1065676;
	Wed, 12 May 2010 20:21:44 +0000 (UTC)
	(envelope-from brueffer@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 8D54B8FC13;
	Wed, 12 May 2010 20:21:44 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4CKLiJT013790;
	Wed, 12 May 2010 20:21:44 GMT
	(envelope-from brueffer@svn.freebsd.org)
Received: (from brueffer@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4CKLiVQ013788;
	Wed, 12 May 2010 20:21:44 GMT
	(envelope-from brueffer@svn.freebsd.org)
Message-Id: <201005122021.o4CKLiVQ013788@svn.freebsd.org>
From: Christian Brueffer 
Date: Wed, 12 May 2010 20:21:44 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r207998 - head/sbin/restore
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 12 May 2010 20:21:44 -0000

Author: brueffer
Date: Wed May 12 20:21:44 2010
New Revision: 207998
URL: http://svn.freebsd.org/changeset/base/207998

Log:
  Fix grammar in a line of output.
  
  PR:		145343
  Submitted by:	Hywel Mallett 
  MFC after:	1 week

Modified:
  head/sbin/restore/symtab.c

Modified: head/sbin/restore/symtab.c
==============================================================================
--- head/sbin/restore/symtab.c	Wed May 12 20:15:05 2010	(r207997)
+++ head/sbin/restore/symtab.c	Wed May 12 20:21:44 2010	(r207998)
@@ -443,7 +443,7 @@ dumpsymtable(char *filename, long checkp
 	FILE *fd;
 	struct symtableheader hdr;
 
-	vprintf(stdout, "Check pointing the restore\n");
+	vprintf(stdout, "Checkpointing the restore\n");
 	if (Nflag)
 		return;
 	if ((fd = fopen(filename, "w")) == NULL) {

From owner-svn-src-head@FreeBSD.ORG  Wed May 12 21:20:05 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 0147B1065678;
	Wed, 12 May 2010 21:20:05 +0000 (UTC)
	(envelope-from brueffer@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id E5E948FC13;
	Wed, 12 May 2010 21:20:04 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4CLK4LX026851;
	Wed, 12 May 2010 21:20:04 GMT
	(envelope-from brueffer@svn.freebsd.org)
Received: (from brueffer@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4CLK4RE026849;
	Wed, 12 May 2010 21:20:04 GMT
	(envelope-from brueffer@svn.freebsd.org)
Message-Id: <201005122120.o4CLK4RE026849@svn.freebsd.org>
From: Christian Brueffer 
Date: Wed, 12 May 2010 21:20:04 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r208002 - head
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 12 May 2010 21:20:05 -0000

Author: brueffer
Date: Wed May 12 21:20:04 2010
New Revision: 208002
URL: http://svn.freebsd.org/changeset/base/208002

Log:
  Note 8.0-RELEASE.
  
  PR:		143824
  Submitted by:	pluknet 

Modified:
  head/UPDATING

Modified: head/UPDATING
==============================================================================
--- head/UPDATING	Wed May 12 20:58:08 2010	(r208001)
+++ head/UPDATING	Wed May 12 21:20:04 2010	(r208002)
@@ -83,6 +83,9 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9.
 
 	The meanings correspond to the relevant IPv4 variables.
 
+20091125:
+	8.0-RELEASE.
+
 20091113:
 	The default terminal emulation for syscons(4) has been changed
 	from cons25 to xterm on all platforms except pc98.  This means

From owner-svn-src-head@FreeBSD.ORG  Wed May 12 21:24:47 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 520671065672;
	Wed, 12 May 2010 21:24:47 +0000 (UTC) (envelope-from zml@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 28C078FC24;
	Wed, 12 May 2010 21:24:47 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4CLOlic027909;
	Wed, 12 May 2010 21:24:47 GMT (envelope-from zml@svn.freebsd.org)
Received: (from zml@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4CLOk3b027904;
	Wed, 12 May 2010 21:24:46 GMT (envelope-from zml@svn.freebsd.org)
Message-Id: <201005122124.o4CLOk3b027904@svn.freebsd.org>
From: Zachary Loafman 
Date: Wed, 12 May 2010 21:24:46 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r208003 - in head/sys: kern sys
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 12 May 2010 21:24:47 -0000

Author: zml
Date: Wed May 12 21:24:46 2010
New Revision: 208003
URL: http://svn.freebsd.org/changeset/base/208003

Log:
  Add VOP_ADVLOCKPURGE so that the file system is called when purging
  locks (in the case where the VFS impl isn't using lf_*)
  
  Submitted by:       Matthew Fleming 
  Reviewed by:        zml, dfr

Modified:
  head/sys/kern/vfs_default.c
  head/sys/kern/vfs_subr.c
  head/sys/kern/vnode_if.src
  head/sys/sys/vnode.h

Modified: head/sys/kern/vfs_default.c
==============================================================================
--- head/sys/kern/vfs_default.c	Wed May 12 21:20:04 2010	(r208002)
+++ head/sys/kern/vfs_default.c	Wed May 12 21:24:46 2010	(r208003)
@@ -98,6 +98,7 @@ struct vop_vector default_vnodeops = {
 	.vop_accessx =		vop_stdaccessx,
 	.vop_advlock =		vop_stdadvlock,
 	.vop_advlockasync =	vop_stdadvlockasync,
+	.vop_advlockpurge =	vop_stdadvlockpurge,
 	.vop_bmap =		vop_stdbmap,
 	.vop_close =		VOP_NULL,
 	.vop_fsync =		VOP_NULL,
@@ -413,6 +414,16 @@ vop_stdadvlockasync(struct vop_advlockas
 	return (lf_advlockasync(ap, &(vp->v_lockf), vattr.va_size));
 }
 
+int
+vop_stdadvlockpurge(struct vop_advlockpurge_args *ap)
+{
+	struct vnode *vp;
+
+	vp = ap->a_vp;
+	lf_purgelocks(vp, &vp->v_lockf);
+	return (0);
+}
+
 /*
  * vop_stdpathconf:
  *

Modified: head/sys/kern/vfs_subr.c
==============================================================================
--- head/sys/kern/vfs_subr.c	Wed May 12 21:20:04 2010	(r208002)
+++ head/sys/kern/vfs_subr.c	Wed May 12 21:24:46 2010	(r208003)
@@ -2585,7 +2585,7 @@ vgonel(struct vnode *vp)
 	/*
 	 * Clear the advisory locks and wake up waiting threads.
 	 */
-	lf_purgelocks(vp, &(vp->v_lockf));
+	(void)VOP_ADVLOCKPURGE(vp);
 	/*
 	 * Delete from old mount point vnode list.
 	 */

Modified: head/sys/kern/vnode_if.src
==============================================================================
--- head/sys/kern/vnode_if.src	Wed May 12 21:20:04 2010	(r208002)
+++ head/sys/kern/vnode_if.src	Wed May 12 21:24:46 2010	(r208003)
@@ -453,6 +453,13 @@ vop_advlockasync {
 };
 
 
+%% advlockpurge	vp	E E E
+
+vop_advlockpurge {
+	IN struct vnode *vp;
+};
+
+
 %% reallocblks	vp	E E E
 
 vop_reallocblks {

Modified: head/sys/sys/vnode.h
==============================================================================
--- head/sys/sys/vnode.h	Wed May 12 21:20:04 2010	(r208002)
+++ head/sys/sys/vnode.h	Wed May 12 21:24:46 2010	(r208003)
@@ -692,6 +692,7 @@ int	vop_stdaccess(struct vop_access_args
 int	vop_stdaccessx(struct vop_accessx_args *ap);
 int	vop_stdadvlock(struct vop_advlock_args *ap);
 int	vop_stdadvlockasync(struct vop_advlockasync_args *ap);
+int	vop_stdadvlockpurge(struct vop_advlockpurge_args *ap);
 int	vop_stdpathconf(struct vop_pathconf_args *);
 int	vop_stdpoll(struct vop_poll_args *);
 int	vop_stdvptocnp(struct vop_vptocnp_args *ap);

From owner-svn-src-head@FreeBSD.ORG  Wed May 12 21:25:05 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5B4DD10656DF;
	Wed, 12 May 2010 21:25:05 +0000 (UTC) (envelope-from zml@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 4BF7F8FC2A;
	Wed, 12 May 2010 21:25:05 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4CLP56W028020;
	Wed, 12 May 2010 21:25:05 GMT (envelope-from zml@svn.freebsd.org)
Received: (from zml@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4CLP5OM028018;
	Wed, 12 May 2010 21:25:05 GMT (envelope-from zml@svn.freebsd.org)
Message-Id: <201005122125.o4CLP5OM028018@svn.freebsd.org>
From: Zachary Loafman 
Date: Wed, 12 May 2010 21:25:05 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r208004 - head/usr.sbin/extattr
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 12 May 2010 21:25:05 -0000

Author: zml
Date: Wed May 12 21:25:05 2010
New Revision: 208004
URL: http://svn.freebsd.org/changeset/base/208004

Log:
  extattr: Fix a signed/unsigned issue
  
  Submitted by:       Matthew Fleming 
  Reviewed by:        zml, dfr

Modified:
  head/usr.sbin/extattr/rmextattr.c

Modified: head/usr.sbin/extattr/rmextattr.c
==============================================================================
--- head/usr.sbin/extattr/rmextattr.c	Wed May 12 21:24:46 2010	(r208003)
+++ head/usr.sbin/extattr/rmextattr.c	Wed May 12 21:25:05 2010	(r208004)
@@ -231,9 +231,12 @@ main(int argc, char *argv[])
 				break;
 			if (!flag_quiet)
 				printf("%s\t", argv[arg_counter]);
-			for (i = 0; i < error; i += buf[i] + 1)
+			for (i = 0; i < error; i += ch + 1) {
+			    /* The attribute name length is unsigned. */
+			    ch = (unsigned char)buf[i];
 			    printf("%s%*.*s", i ? "\t" : "",
-				buf[i], buf[i], buf + i + 1);
+				ch, ch, buf + i + 1);
+			}
 			printf("\n");
 			continue;
 		case EAGET:

From owner-svn-src-head@FreeBSD.ORG  Wed May 12 22:26:23 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D8FA7106566B;
	Wed, 12 May 2010 22:26:23 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id BE0628FC08;
	Wed, 12 May 2010 22:26:23 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4CMQNrx041507;
	Wed, 12 May 2010 22:26:23 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4CMQNVs041504;
	Wed, 12 May 2010 22:26:23 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <201005122226.o4CMQNVs041504@svn.freebsd.org>
From: Andrew Thompson 
Date: Wed, 12 May 2010 22:26:23 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r208006 - in head/sys/dev/usb: . quirk
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 12 May 2010 22:26:24 -0000

Author: thompsa
Date: Wed May 12 22:26:23 2010
New Revision: 208006
URL: http://svn.freebsd.org/changeset/base/208006

Log:
  Add quirks for the Alcor SDCR_6362 Card Reader, Freecom HDD storage device and
  Samsung YP_U4 music player.
  
  PR:		usb/145265, usb/146104
  Submitted by:	Dmitry Luhtionov, Urankar Mikael, Peter Toth

Modified:
  head/sys/dev/usb/quirk/usb_quirk.c
  head/sys/dev/usb/usbdevs

Modified: head/sys/dev/usb/quirk/usb_quirk.c
==============================================================================
--- head/sys/dev/usb/quirk/usb_quirk.c	Wed May 12 21:50:03 2010	(r208005)
+++ head/sys/dev/usb/quirk/usb_quirk.c	Wed May 12 22:26:23 2010	(r208006)
@@ -151,6 +151,8 @@ static struct usb_quirk_entry usb_quirks
 	USB_QUIRK(AIPTEK2, SUNPLUS_TECH, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE),
 	USB_QUIRK(ALCOR, SDCR_6335, 0x0000, 0xffff, UQ_MSC_NO_TEST_UNIT_READY,
 	    UQ_MSC_NO_SYNC_CACHE),
+	USB_QUIRK(ALCOR, SDCR_6362, 0x0000, 0xffff, UQ_MSC_NO_TEST_UNIT_READY,
+	    UQ_MSC_NO_SYNC_CACHE),
 	USB_QUIRK(ALCOR, AU6390, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE),
 	USB_QUIRK(ALCOR, UMCR_9361, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
 	    UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_GETMAXLUN),
@@ -184,6 +186,7 @@ static struct usb_quirk_entry usb_quirks
 	USB_QUIRK(FEIYA, 5IN1, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
 	    UQ_MSC_FORCE_PROTO_SCSI),
 	USB_QUIRK(FREECOM, DVD, 0x0000, 0xffff, UQ_MSC_FORCE_PROTO_SCSI),
+	USB_QUIRK(FREECOM, HDD, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE),
 	USB_QUIRK(FUJIPHOTO, MASS0100, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_CBI_I,
 	    UQ_MSC_FORCE_PROTO_ATAPI, UQ_MSC_NO_RS_CLEAR_UA),
 	USB_QUIRK(GENESYS, GL641USB2IDE, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
@@ -323,6 +326,7 @@ static struct usb_quirk_entry usb_quirks
 	USB_QUIRK_VP(USB_VENDOR_SAMSUNG_TECHWIN,
 	    USB_PRODUCT_SAMSUNG_TECHWIN_DIGIMAX_410, UQ_MSC_FORCE_WIRE_BBB,
 	    UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY),
+	USB_QUIRK(SAMSUNG, YP_U4, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE),
 	USB_QUIRK(SANDISK, SDDR05A, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_CBI,
 	    UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_READ_CAP_OFFBY1,
 	    UQ_MSC_NO_GETMAXLUN),

Modified: head/sys/dev/usb/usbdevs
==============================================================================
--- head/sys/dev/usb/usbdevs	Wed May 12 21:50:03 2010	(r208005)
+++ head/sys/dev/usb/usbdevs	Wed May 12 22:26:23 2010	(r208006)
@@ -873,6 +873,7 @@ product AKS USBHASP		0x0001	USB-HASP 0.0
 product ALCOR2 KBD_HUB		0x2802	Kbd Hub
 
 product ALCOR SDCR_6335		0x6335	SD/MMC Card Reader
+product ALCOR SDCR_6362		0x6362	SD/MMC Card Reader
 product ALCOR TRANSCEND		0x6387	Transcend JetFlash Drive
 product ALCOR MA_KBD_HUB	0x9213	MacAlly Kbd Hub
 product ALCOR AU9814		0x9215	AU9814 Hub
@@ -1483,6 +1484,7 @@ product FOSSIL WRISTPDA		0x0002	Wrist PD
 
 /* Freecom products */
 product FREECOM DVD		0xfc01	DVD drive
+product FREECOM HDD		0xfc05	Classic SL Hard Drive
 
 /* Fujitsu Siemens Computers products */
 product FSC E5400		0x1009	PrismGT USB 2.0 WLAN
@@ -2591,6 +2593,8 @@ product SAGEM XG76NA		0x0062	XG-76NA
 /* Samsung products */
 product SAMSUNG ML6060		0x3008	ML-6060 laser printer
 product SAMSUNG YP_U2		0x5050	YP-U2 MP3 Player
+product SAMSUNG YP_U4		0x5092	YP-U4 MP3 Player
+
 product SAMSUNG I500		0x6601	I500 Palm USB Phone 
 product SAMSUNG2 RT2870_1	0x2018	RT2870
 

From owner-svn-src-head@FreeBSD.ORG  Wed May 12 22:28:40 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5C0EA1065674;
	Wed, 12 May 2010 22:28:40 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 4BE2C8FC0C;
	Wed, 12 May 2010 22:28:40 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4CMSe1B042028;
	Wed, 12 May 2010 22:28:40 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4CMSeNm042026;
	Wed, 12 May 2010 22:28:40 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <201005122228.o4CMSeNm042026@svn.freebsd.org>
From: Andrew Thompson 
Date: Wed, 12 May 2010 22:28:40 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r208007 - head/sys/dev/usb
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 12 May 2010 22:28:40 -0000

Author: thompsa
Date: Wed May 12 22:28:40 2010
New Revision: 208007
URL: http://svn.freebsd.org/changeset/base/208007

Log:
  Staticise usb_ref_device and usb_unref_device.
  
  Submitted by:	Hans Petter Selasky

Modified:
  head/sys/dev/usb/usb_dev.c

Modified: head/sys/dev/usb/usb_dev.c
==============================================================================
--- head/sys/dev/usb/usb_dev.c	Wed May 12 22:26:23 2010	(r208006)
+++ head/sys/dev/usb/usb_dev.c	Wed May 12 22:28:40 2010	(r208007)
@@ -182,7 +182,7 @@ usb_loc_fill(struct usb_fs_privdata* pd,
  *  0: Success, refcount incremented on the given USB device.
  *  Else: Failure.
  *------------------------------------------------------------------------*/
-usb_error_t
+static usb_error_t
 usb_ref_device(struct usb_cdev_privdata *cpd, 
     struct usb_cdev_refdata *crd, int need_uref)
 {
@@ -327,7 +327,7 @@ usb_usb_ref_device(struct usb_cdev_privd
  * This function will release the reference count by one unit for the
  * given USB device.
  *------------------------------------------------------------------------*/
-void
+static void
 usb_unref_device(struct usb_cdev_privdata *cpd,
     struct usb_cdev_refdata *crd)
 {

From owner-svn-src-head@FreeBSD.ORG  Wed May 12 22:42:35 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 865F51065676;
	Wed, 12 May 2010 22:42:35 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 74F408FC15;
	Wed, 12 May 2010 22:42:35 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4CMgZN1045071;
	Wed, 12 May 2010 22:42:35 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4CMgZFn045065;
	Wed, 12 May 2010 22:42:35 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <201005122242.o4CMgZFn045065@svn.freebsd.org>
From: Andrew Thompson 
Date: Wed, 12 May 2010 22:42:35 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r208008 - head/sys/dev/usb
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 12 May 2010 22:42:35 -0000

Author: thompsa
Date: Wed May 12 22:42:35 2010
New Revision: 208008
URL: http://svn.freebsd.org/changeset/base/208008

Log:
  If a USB device is suspended and a USB set config request is issued when the
  USB enumeration lock is locked, then the USB stack fails to resume the device
  because locking the USB enumeration lock is part of the resume procedure. To
  solve this issue a new lock is introduced which only protects the suspend and
  resume callbacks, which can be dropped inside the usbd_do_request_flags()
  function, to allow suspend and resume during so-called enumeration operations.
  
  Submitted by:	Hans Petter Selasky

Modified:
  head/sys/dev/usb/usb_device.c
  head/sys/dev/usb/usb_device.h
  head/sys/dev/usb/usb_generic.c
  head/sys/dev/usb/usb_hub.c
  head/sys/dev/usb/usb_request.c

Modified: head/sys/dev/usb/usb_device.c
==============================================================================
--- head/sys/dev/usb/usb_device.c	Wed May 12 22:28:40 2010	(r208007)
+++ head/sys/dev/usb/usb_device.c	Wed May 12 22:42:35 2010	(r208008)
@@ -1380,7 +1380,7 @@ usb_suspend_resume(struct usb_device *ud
 	}
 	DPRINTFN(4, "udev=%p do_suspend=%d\n", udev, do_suspend);
 
-	sx_assert(&udev->enum_sx, SA_LOCKED);
+	sx_assert(&udev->sr_sx, SA_LOCKED);
 
 	USB_BUS_LOCK(udev->bus);
 	/* filter the suspend events */
@@ -1495,6 +1495,7 @@ usb_alloc_device(device_t parent_dev, st
 
 	/* initialise our SX-lock */
 	sx_init_flags(&udev->enum_sx, "USB config SX lock", SX_DUPOK);
+	sx_init_flags(&udev->sr_sx, "USB suspend and resume SX lock", SX_DUPOK);
 
 	cv_init(&udev->ctrlreq_cv, "WCTRL");
 	cv_init(&udev->ref_cv, "UGONE");
@@ -2038,6 +2039,7 @@ usb_free_device(struct usb_device *udev,
 
 	sx_destroy(&udev->ctrl_sx);
 	sx_destroy(&udev->enum_sx);
+	sx_destroy(&udev->sr_sx);
 
 	cv_destroy(&udev->ctrlreq_cv);
 	cv_destroy(&udev->ref_cv);
@@ -2188,12 +2190,12 @@ usbd_set_device_strings(struct usb_devic
 #ifdef USB_VERBOSE
 	const struct usb_knowndev *kdp;
 #endif
-	uint8_t *temp_ptr;
+	char *temp_ptr;
 	size_t temp_size;
 	uint16_t vendor_id;
 	uint16_t product_id;
 
-	temp_ptr = udev->bus->scratch[0].data;
+	temp_ptr = (char *)udev->bus->scratch[0].data;
 	temp_size = sizeof(udev->bus->scratch[0].data);
 
 	vendor_id = UGETW(udd->idVendor);
@@ -2589,6 +2591,7 @@ void
 usbd_enum_lock(struct usb_device *udev)
 {
 	sx_xlock(&udev->enum_sx);
+	sx_xlock(&udev->sr_sx);
 	/* 
 	 * NEWBUS LOCK NOTE: We should check if any parent SX locks
 	 * are locked before locking Giant. Else the lock can be
@@ -2604,6 +2607,30 @@ usbd_enum_unlock(struct usb_device *udev
 {
 	mtx_unlock(&Giant);
 	sx_xunlock(&udev->enum_sx);
+	sx_xunlock(&udev->sr_sx);
+}
+
+/* The following function locks suspend and resume. */
+
+void
+usbd_sr_lock(struct usb_device *udev)
+{
+	sx_xlock(&udev->sr_sx);
+	/* 
+	 * NEWBUS LOCK NOTE: We should check if any parent SX locks
+	 * are locked before locking Giant. Else the lock can be
+	 * locked multiple times.
+	 */
+	mtx_lock(&Giant);
+}
+
+/* The following function unlocks suspend and resume. */
+
+void
+usbd_sr_unlock(struct usb_device *udev)
+{
+	mtx_unlock(&Giant);
+	sx_xunlock(&udev->sr_sx);
 }
 
 /*

Modified: head/sys/dev/usb/usb_device.h
==============================================================================
--- head/sys/dev/usb/usb_device.h	Wed May 12 22:28:40 2010	(r208007)
+++ head/sys/dev/usb/usb_device.h	Wed May 12 22:42:35 2010	(r208008)
@@ -115,6 +115,7 @@ struct usb_device {
 						 * messages */
 	struct sx ctrl_sx;
 	struct sx enum_sx;
+	struct sx sr_sx;
 	struct mtx device_mtx;
 	struct cv ctrlreq_cv;
 	struct cv ref_cv;
@@ -215,6 +216,8 @@ void	usb_set_device_state(struct usb_dev
 	    enum usb_dev_state state);
 void	usbd_enum_lock(struct usb_device *);
 void	usbd_enum_unlock(struct usb_device *);
+void	usbd_sr_lock(struct usb_device *);
+void	usbd_sr_unlock(struct usb_device *);
 uint8_t usbd_enum_is_locked(struct usb_device *);
 
 #endif					/* _USB_DEVICE_H_ */

Modified: head/sys/dev/usb/usb_generic.c
==============================================================================
--- head/sys/dev/usb/usb_generic.c	Wed May 12 22:28:40 2010	(r208007)
+++ head/sys/dev/usb/usb_generic.c	Wed May 12 22:42:35 2010	(r208008)
@@ -1735,14 +1735,34 @@ ugen_set_power_mode(struct usb_fifo *f, 
 		break;
 
 	case USB_POWER_MODE_RESUME:
-		err = usbd_req_clear_port_feature(udev->parent_hub,
-		    NULL, udev->port_no, UHF_PORT_SUSPEND);
+#if USB_HAVE_POWERD
+		/* let USB-powerd handle resume */
+		USB_BUS_LOCK(udev->bus);
+		udev->pwr_save.write_refs++;
+		udev->pwr_save.last_xfer_time = ticks;
+		USB_BUS_UNLOCK(udev->bus);
+
+		/* set new power mode */
+		usbd_set_power_mode(udev, USB_POWER_MODE_SAVE);
+
+		/* wait for resume to complete */
+		usb_pause_mtx(NULL, hz / 4);
+
+		/* clear write reference */
+		USB_BUS_LOCK(udev->bus);
+		udev->pwr_save.write_refs--;
+		USB_BUS_UNLOCK(udev->bus);
+#endif
 		mode = USB_POWER_MODE_SAVE;
 		break;
 
 	case USB_POWER_MODE_SUSPEND:
-		err = usbd_req_set_port_feature(udev->parent_hub,
-		    NULL, udev->port_no, UHF_PORT_SUSPEND);
+#if USB_HAVE_POWERD
+		/* let USB-powerd handle suspend */
+		USB_BUS_LOCK(udev->bus);
+		udev->pwr_save.last_xfer_time = ticks - (256 * hz);
+		USB_BUS_UNLOCK(udev->bus);
+#endif
 		mode = USB_POWER_MODE_SAVE;
 		break;
 

Modified: head/sys/dev/usb/usb_hub.c
==============================================================================
--- head/sys/dev/usb/usb_hub.c	Wed May 12 22:28:40 2010	(r208007)
+++ head/sys/dev/usb/usb_hub.c	Wed May 12 22:42:35 2010	(r208008)
@@ -126,6 +126,7 @@ static usb_callback_t uhub_intr_callback
 
 static void usb_dev_resume_peer(struct usb_device *udev);
 static void usb_dev_suspend_peer(struct usb_device *udev);
+static uint8_t usb_peer_should_wakeup(struct usb_device *udev);
 
 static const struct usb_config uhub_config[UHUB_N_TRANSFER] = {
 
@@ -1706,8 +1707,8 @@ usbd_transfer_power_ref(struct usb_xfer 
 		udev->pwr_save.read_refs += val;
 		if (xfer->flags_int.usb_mode == USB_MODE_HOST) {
 			/*
-			 * it is not allowed to suspend during a control
-			 * transfer
+			 * It is not allowed to suspend during a
+			 * control transfer:
 			 */
 			udev->pwr_save.write_refs += val;
 		}
@@ -1717,19 +1718,21 @@ usbd_transfer_power_ref(struct usb_xfer 
 		udev->pwr_save.write_refs += val;
 	}
 
-	if (udev->flags.self_suspended)
-		needs_explore =
-		    (udev->pwr_save.write_refs != 0) ||
-		    ((udev->pwr_save.read_refs != 0) &&
-		    (usb_peer_can_wakeup(udev) == 0));
-	else
-		needs_explore = 0;
+	if (val > 0) {
+		if (udev->flags.self_suspended)
+			needs_explore = usb_peer_should_wakeup(udev);
+		else
+			needs_explore = 0;
 
-	if (!(udev->bus->hw_power_state & power_mask[xfer_type])) {
-		DPRINTF("Adding type %u to power state\n", xfer_type);
-		udev->bus->hw_power_state |= power_mask[xfer_type];
-		needs_hw_power = 1;
+		if (!(udev->bus->hw_power_state & power_mask[xfer_type])) {
+			DPRINTF("Adding type %u to power state\n", xfer_type);
+			udev->bus->hw_power_state |= power_mask[xfer_type];
+			needs_hw_power = 1;
+		} else {
+			needs_hw_power = 0;
+		}
 	} else {
+		needs_explore = 0;
 		needs_hw_power = 0;
 	}
 
@@ -1748,6 +1751,22 @@ usbd_transfer_power_ref(struct usb_xfer 
 #endif
 
 /*------------------------------------------------------------------------*
+ *	usb_peer_should_wakeup
+ *
+ * This function returns non-zero if the current device should wake up.
+ *------------------------------------------------------------------------*/
+static uint8_t
+usb_peer_should_wakeup(struct usb_device *udev)
+{
+	return ((udev->power_mode == USB_POWER_MODE_ON) ||
+	    (udev->pwr_save.type_refs[UE_ISOCHRONOUS] != 0) ||
+	    (udev->pwr_save.write_refs != 0) ||
+	    ((udev->pwr_save.read_refs != 0) &&
+	    (udev->flags.usb_mode == USB_MODE_HOST) &&
+	    (usb_peer_can_wakeup(udev) == 0)));
+}
+
+/*------------------------------------------------------------------------*
  *	usb_bus_powerd
  *
  * This function implements the USB power daemon and is called
@@ -1763,7 +1782,6 @@ usb_bus_powerd(struct usb_bus *bus)
 	usb_ticks_t mintime;
 	usb_size_t type_refs[5];
 	uint8_t x;
-	uint8_t rem_wakeup;
 
 	limit = usb_power_timeout;
 	if (limit == 0)
@@ -1788,30 +1806,23 @@ usb_bus_powerd(struct usb_bus *bus)
 		if (udev == NULL)
 			continue;
 
-		rem_wakeup = usb_peer_can_wakeup(udev);
-
 		temp = ticks - udev->pwr_save.last_xfer_time;
 
-		if ((udev->power_mode == USB_POWER_MODE_ON) ||
-		    (udev->pwr_save.type_refs[UE_ISOCHRONOUS] != 0) ||
-		    (udev->pwr_save.write_refs != 0) ||
-		    ((udev->pwr_save.read_refs != 0) &&
-		    (rem_wakeup == 0))) {
-
+		if (usb_peer_should_wakeup(udev)) {
 			/* check if we are suspended */
 			if (udev->flags.self_suspended != 0) {
 				USB_BUS_UNLOCK(bus);
 				usb_dev_resume_peer(udev);
 				USB_BUS_LOCK(bus);
 			}
-		} else if (temp >= limit) {
-
-			/* check if we are not suspended */
-			if (udev->flags.self_suspended == 0) {
-				USB_BUS_UNLOCK(bus);
-				usb_dev_suspend_peer(udev);
-				USB_BUS_LOCK(bus);
-			}
+		} else if ((temp >= limit) &&
+		    (udev->flags.usb_mode == USB_MODE_HOST) &&
+		    (udev->flags.self_suspended == 0)) {
+			/* try to do suspend */
+
+			USB_BUS_UNLOCK(bus);
+			usb_dev_suspend_peer(udev);
+			USB_BUS_LOCK(bus);
 		}
 	}
 
@@ -1920,6 +1931,9 @@ usb_dev_resume_peer(struct usb_device *u
 	/* resume parent hub first */
 	usb_dev_resume_peer(udev->parent_hub);
 
+	/* reduce chance of instant resume failure by waiting a little bit */
+	usb_pause_mtx(NULL, USB_MS_TO_TICKS(20));
+
 	/* resume current port (Valid in Host and Device Mode) */
 	err = usbd_req_clear_port_feature(udev->parent_hub,
 	    NULL, udev->port_no, UHF_PORT_SUSPEND);
@@ -1958,12 +1972,12 @@ usb_dev_resume_peer(struct usb_device *u
 		(bus->methods->set_hw_power) (bus);
 	}
 
-	usbd_enum_lock(udev);
+	usbd_sr_lock(udev);
 
 	/* notify all sub-devices about resume */
 	err = usb_suspend_resume(udev, 0);
 
-	usbd_enum_unlock(udev);
+	usbd_sr_unlock(udev);
 
 	/* check if peer has wakeup capability */
 	if (usb_peer_can_wakeup(udev)) {
@@ -2029,12 +2043,47 @@ repeat:
 		}
 	}
 
-	usbd_enum_lock(udev);
+	USB_BUS_LOCK(udev->bus);
+	/*
+	 * Checking for suspend condition and setting suspended bit
+	 * must be atomic!
+	 */
+	err = usb_peer_should_wakeup(udev);
+	if (err == 0) {
+		/*
+		 * Set that this device is suspended. This variable
+		 * must be set before calling USB controller suspend
+		 * callbacks.
+		 */
+		udev->flags.self_suspended = 1;
+	}
+	USB_BUS_UNLOCK(udev->bus);
+
+	if (err != 0) {
+		if (udev->flags.usb_mode == USB_MODE_DEVICE) {
+			/* resume parent HUB first */
+			usb_dev_resume_peer(udev->parent_hub);
+
+			/* reduce chance of instant resume failure by waiting a little bit */
+			usb_pause_mtx(NULL, USB_MS_TO_TICKS(20));
+
+			/* resume current port (Valid in Host and Device Mode) */
+			err = usbd_req_clear_port_feature(udev->parent_hub,
+			    NULL, udev->port_no, UHF_PORT_SUSPEND);
+
+			/* resume settle time */
+			usb_pause_mtx(NULL, USB_MS_TO_TICKS(USB_PORT_RESUME_DELAY));
+		}
+		DPRINTF("Suspend was cancelled!\n");
+		return;
+	}
+
+	usbd_sr_lock(udev);
 
 	/* notify all sub-devices about suspend */
 	err = usb_suspend_resume(udev, 1);
 
-	usbd_enum_unlock(udev);
+	usbd_sr_unlock(udev);
 
 	if (usb_peer_can_wakeup(udev)) {
 		/* allow device to do remote wakeup */
@@ -2045,13 +2094,6 @@ repeat:
 			    "remote wakeup failed\n");
 		}
 	}
-	USB_BUS_LOCK(udev->bus);
-	/*
-	 * Set that this device is suspended. This variable must be set
-	 * before calling USB controller suspend callbacks.
-	 */
-	udev->flags.self_suspended = 1;
-	USB_BUS_UNLOCK(udev->bus);
 
 	if (udev->bus->methods->device_suspend != NULL) {
 		usb_timeout_t temp;

Modified: head/sys/dev/usb/usb_request.c
==============================================================================
--- head/sys/dev/usb/usb_request.c	Wed May 12 22:28:40 2010	(r208007)
+++ head/sys/dev/usb/usb_request.c	Wed May 12 22:42:35 2010	(r208008)
@@ -273,6 +273,7 @@ usbd_do_request_flags(struct usb_device 
 	usb_ticks_t max_ticks;
 	uint16_t length;
 	uint16_t temp;
+	uint8_t enum_locked;
 
 	if (timeout < 50) {
 		/* timeout is too small */
@@ -284,6 +285,8 @@ usbd_do_request_flags(struct usb_device 
 	}
 	length = UGETW(req->wLength);
 
+	enum_locked = usbd_enum_is_locked(udev);
+
 	DPRINTFN(5, "udev=%p bmRequestType=0x%02x bRequest=0x%02x "
 	    "wValue=0x%02x%02x wIndex=0x%02x%02x wLength=0x%02x%02x\n",
 	    udev, req->bmRequestType, req->bRequest,
@@ -308,12 +311,18 @@ usbd_do_request_flags(struct usb_device 
 	if (flags & USB_USER_DATA_PTR)
 		return (USB_ERR_INVAL);
 #endif
-	if (mtx) {
+	if ((mtx != NULL) && (mtx != &Giant)) {
 		mtx_unlock(mtx);
-		if (mtx != &Giant) {
-			mtx_assert(mtx, MA_NOTOWNED);
-		}
+		mtx_assert(mtx, MA_NOTOWNED);
 	}
+
+	/*
+	 * We need to allow suspend and resume at this point, else the
+	 * control transfer will timeout if the device is suspended!
+	 */
+	if (enum_locked)
+		usbd_sr_unlock(udev);
+
 	/*
 	 * Grab the default sx-lock so that serialisation
 	 * is achieved when multiple threads are involved:
@@ -536,9 +545,12 @@ usbd_do_request_flags(struct usb_device 
 done:
 	sx_xunlock(&udev->ctrl_sx);
 
-	if (mtx) {
+	if (enum_locked)
+		usbd_sr_lock(udev);
+
+	if ((mtx != NULL) && (mtx != &Giant))
 		mtx_lock(mtx);
-	}
+
 	return ((usb_error_t)err);
 }
 

From owner-svn-src-head@FreeBSD.ORG  Wed May 12 22:43:33 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id BC37E1065670;
	Wed, 12 May 2010 22:43:33 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id ABB688FC15;
	Wed, 12 May 2010 22:43:33 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4CMhXSI045334;
	Wed, 12 May 2010 22:43:33 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4CMhXaj045331;
	Wed, 12 May 2010 22:43:33 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <201005122243.o4CMhXaj045331@svn.freebsd.org>
From: Andrew Thompson 
Date: Wed, 12 May 2010 22:43:33 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r208009 - in head/sys/dev/usb: . input
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 12 May 2010 22:43:33 -0000

Author: thompsa
Date: Wed May 12 22:43:33 2010
New Revision: 208009
URL: http://svn.freebsd.org/changeset/base/208009

Log:
  Enable support for mouse panning wheels.
  
  Submitted by:	Henry Hu

Modified:
  head/sys/dev/usb/input/ums.c
  head/sys/dev/usb/usbhid.h

Modified: head/sys/dev/usb/input/ums.c
==============================================================================
--- head/sys/dev/usb/input/ums.c	Wed May 12 22:42:35 2010	(r208008)
+++ head/sys/dev/usb/input/ums.c	Wed May 12 22:43:33 2010	(r208009)
@@ -286,6 +286,12 @@ ums_intr_callback(struct usb_xfer *xfer,
 			DPRINTFN(6, "x:%d y:%d z:%d t:%d w:%d buttons:0x%08x\n",
 			    dx, dy, dz, dt, dw, buttons);
 
+			/* translate T-axis into button presses until further */
+			if (dt > 0)
+				buttons |= 1UL << 3;
+			else if (dt < 0)
+				buttons |= 1UL << 4;
+
 			sc->sc_status.button = buttons;
 			sc->sc_status.dx += dx;
 			sc->sc_status.dy += dy;
@@ -454,6 +460,12 @@ ums_hid_parse(struct ums_softc *sc, devi
 		if ((flags & MOUSE_FLAGS_MASK) == MOUSE_FLAGS) {
 			info->sc_flags |= UMS_FLAG_T_AXIS;
 		}
+	} else if (hid_locate(buf, len, HID_USAGE2(HUP_CONSUMER,
+		HUC_AC_PAN), hid_input, index, &info->sc_loc_t,
+		&flags, &info->sc_iid_t)) {
+
+		if ((flags & MOUSE_FLAGS_MASK) == MOUSE_FLAGS)
+			info->sc_flags |= UMS_FLAG_T_AXIS;
 	}
 	/* figure out the number of buttons */
 

Modified: head/sys/dev/usb/usbhid.h
==============================================================================
--- head/sys/dev/usb/usbhid.h	Wed May 12 22:42:35 2010	(r208008)
+++ head/sys/dev/usb/usbhid.h	Wed May 12 22:43:33 2010	(r208009)
@@ -156,6 +156,9 @@ struct usb_hid_descriptor {
 #define	HUD_ERASER		0x0045
 #define	HUD_TABLET_PICK		0x0046
 
+/* Usages, Consumer */
+#define	HUC_AC_PAN		0x0238
+
 #define	HID_USAGE2(p,u) (((p) << 16) | (u))
 
 #define	UHID_INPUT_REPORT 0x01

From owner-svn-src-head@FreeBSD.ORG  Wed May 12 22:44:57 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A25D7106566B;
	Wed, 12 May 2010 22:44:57 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 91FF28FC1A;
	Wed, 12 May 2010 22:44:57 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4CMivZ6045676;
	Wed, 12 May 2010 22:44:57 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4CMivJQ045674;
	Wed, 12 May 2010 22:44:57 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <201005122244.o4CMivJQ045674@svn.freebsd.org>
From: Andrew Thompson 
Date: Wed, 12 May 2010 22:44:57 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r208010 - head/sys/dev/usb
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 12 May 2010 22:44:57 -0000

Author: thompsa
Date: Wed May 12 22:44:57 2010
New Revision: 208010
URL: http://svn.freebsd.org/changeset/base/208010

Log:
  Provide more information about the device location in the USB system.
  
  Submitted by:	Hans Petter Sekasky

Modified:
  head/sys/dev/usb/usb_hub.c

Modified: head/sys/dev/usb/usb_hub.c
==============================================================================
--- head/sys/dev/usb/usb_hub.c	Wed May 12 22:43:33 2010	(r208009)
+++ head/sys/dev/usb/usb_hub.c	Wed May 12 22:44:57 2010	(r208010)
@@ -1010,8 +1010,10 @@ uhub_child_location_string(device_t pare
 		}
 		goto done;
 	}
-	snprintf(buf, buflen, "port=%u interface=%u",
-	    res.portno, res.iface_index);
+	snprintf(buf, buflen, "bus=%u hubaddr=%u port=%u devaddr=%u interface=%u",
+	    (res.udev->parent_hub != NULL) ? res.udev->parent_hub->device_index : 0,
+	    res.portno, device_get_unit(res.udev->bus->bdev),
+	    res.udev->device_index, res.iface_index);
 done:
 	mtx_unlock(&Giant);
 

From owner-svn-src-head@FreeBSD.ORG  Wed May 12 22:45:45 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2C2411065673;
	Wed, 12 May 2010 22:45:45 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 1BE9F8FC16;
	Wed, 12 May 2010 22:45:45 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4CMjjNd045884;
	Wed, 12 May 2010 22:45:45 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4CMji77045882;
	Wed, 12 May 2010 22:45:44 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <201005122245.o4CMji77045882@svn.freebsd.org>
From: Andrew Thompson 
Date: Wed, 12 May 2010 22:45:44 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r208011 - head/sys/dev/usb
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 12 May 2010 22:45:45 -0000

Author: thompsa
Date: Wed May 12 22:45:44 2010
New Revision: 208011
URL: http://svn.freebsd.org/changeset/base/208011

Log:
  Add the ASUS MyPal A730W device id.
  
  Submitted by:	Dmitry Luhtionov

Modified:
  head/sys/dev/usb/usbdevs

Modified: head/sys/dev/usb/usbdevs
==============================================================================
--- head/sys/dev/usb/usbdevs	Wed May 12 22:44:57 2010	(r208010)
+++ head/sys/dev/usb/usbdevs	Wed May 12 22:45:44 2010	(r208011)
@@ -1007,6 +1007,7 @@ product ASUS RT2870_4		0x1760	RT2870
 product ASUS RT2870_5		0x1761	RT2870
 product	ASUS USBN13		0x1784	USB-N13
 product	ASUS RT3070_1		0x1790	RT3070
+product ASUS A730W		0x4202	ASUS MyPal A730W
 product ASUS P535		0x420f	ASUS P535 PDA
 product	ASUS GMSC		0x422f	ASUS Generic Mass Storage
 product ASUS RT2570		0x1706	RT2500USB Wireless Adapter

From owner-svn-src-head@FreeBSD.ORG  Wed May 12 22:50:23 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id AA8571065670;
	Wed, 12 May 2010 22:50:23 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 783048FC1F;
	Wed, 12 May 2010 22:50:23 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4CMoN42046927;
	Wed, 12 May 2010 22:50:23 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4CMoNaP046923;
	Wed, 12 May 2010 22:50:23 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <201005122250.o4CMoNaP046923@svn.freebsd.org>
From: Andrew Thompson 
Date: Wed, 12 May 2010 22:50:23 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r208012 - in head: lib/libusbhid sys/dev/usb
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 12 May 2010 22:50:23 -0000

Author: thompsa
Date: Wed May 12 22:50:23 2010
New Revision: 208012
URL: http://svn.freebsd.org/changeset/base/208012

Log:
  Support getting signed and unsigned HID data.
  
  Submitted by:	Alex Deiter
  Reviewed by:	Hans Petter Selaksy

Modified:
  head/lib/libusbhid/data.c
  head/sys/dev/usb/usb_hid.c
  head/sys/dev/usb/usbhid.h

Modified: head/lib/libusbhid/data.c
==============================================================================
--- head/lib/libusbhid/data.c	Wed May 12 22:45:44 2010	(r208011)
+++ head/lib/libusbhid/data.c	Wed May 12 22:50:23 2010	(r208012)
@@ -63,13 +63,17 @@ hid_get_data(const void *p, const hid_it
 	data = 0;
 	for (i = 0; i <= end; i++)
 		data |= buf[offs + i] << (i*8);
+
+	/* Correctly shift down data */
 	data >>= hpos % 8;
-	data &= (1 << hsize) - 1;
-	if (h->logical_minimum < 0) {
-		/* Need to sign extend */
-		hsize = sizeof data * 8 - hsize;
-		data = (data << hsize) >> hsize;
-	}
+	hsize = 32 - hsize;
+
+	/* Mask and sign extend in one */
+	if ((h->logical_minimum < 0) || (h->logical_maximum < 0))
+		data = (int32_t)((int32_t)data << hsize) >> hsize;
+	else
+		data = (uint32_t)((uint32_t)data << hsize) >> hsize;
+
 	return (data);
 }
 

Modified: head/sys/dev/usb/usb_hid.c
==============================================================================
--- head/sys/dev/usb/usb_hid.c	Wed May 12 22:45:44 2010	(r208011)
+++ head/sys/dev/usb/usb_hid.c	Wed May 12 22:50:23 2010	(r208012)
@@ -646,8 +646,9 @@ hid_locate(const void *desc, usb_size_t 
 /*------------------------------------------------------------------------*
  *	hid_get_data
  *------------------------------------------------------------------------*/
-uint32_t
-hid_get_data(const uint8_t *buf, usb_size_t len, struct hid_location *loc)
+static uint32_t
+hid_get_data_sub(const uint8_t *buf, usb_size_t len, struct hid_location *loc,
+    int is_signed)
 {
 	uint32_t hpos = loc->pos;
 	uint32_t hsize = loc->size;
@@ -676,16 +677,31 @@ hid_get_data(const uint8_t *buf, usb_siz
 
 	/* Correctly shift down data */
 	data = (data >> (hpos % 8));
+	n = 32 - hsize;
 
 	/* Mask and sign extend in one */
-	n = 32 - hsize;
-	data = ((int32_t)data << n) >> n;
+	if (is_signed != 0)
+		data = (int32_t)((int32_t)data << n) >> n;
+	else
+		data = (uint32_t)((uint32_t)data << n) >> n;
 
 	DPRINTFN(11, "hid_get_data: loc %d/%d = %lu\n",
 	    loc->pos, loc->size, (long)data);
 	return (data);
 }
 
+int32_t
+hid_get_data(const uint8_t *buf, usb_size_t len, struct hid_location *loc)
+{
+	return (hid_get_data_sub(buf, len, loc, 1));
+}
+
+uint32_t
+hid_get_data_unsigned(const uint8_t *buf, usb_size_t len, struct hid_location *loc)
+{
+        return (hid_get_data_sub(buf, len, loc, 0));
+}
+
 /*------------------------------------------------------------------------*
  *	hid_is_collection
  *------------------------------------------------------------------------*/

Modified: head/sys/dev/usb/usbhid.h
==============================================================================
--- head/sys/dev/usb/usbhid.h	Wed May 12 22:45:44 2010	(r208011)
+++ head/sys/dev/usb/usbhid.h	Wed May 12 22:50:23 2010	(r208012)
@@ -229,7 +229,9 @@ int	hid_report_size(const void *buf, usb
 int	hid_locate(const void *desc, usb_size_t size, uint32_t usage,
 	    enum hid_kind kind, uint8_t index, struct hid_location *loc,
 	    uint32_t *flags, uint8_t *id);
-uint32_t hid_get_data(const uint8_t *buf, usb_size_t len,
+int32_t hid_get_data(const uint8_t *buf, usb_size_t len,
+	    struct hid_location *loc);
+uint32_t hid_get_data_unsigned(const uint8_t *buf, usb_size_t len,
 	    struct hid_location *loc);
 int	hid_is_collection(const void *desc, usb_size_t size, uint32_t usage);
 struct usb_hid_descriptor *hid_get_descriptor_from_usb(

From owner-svn-src-head@FreeBSD.ORG  Wed May 12 22:51:45 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5BE1D1065675;
	Wed, 12 May 2010 22:51:45 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 4B7788FC1C;
	Wed, 12 May 2010 22:51:45 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4CMpjbI047316;
	Wed, 12 May 2010 22:51:45 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4CMpjrE047314;
	Wed, 12 May 2010 22:51:45 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <201005122251.o4CMpjrE047314@svn.freebsd.org>
From: Andrew Thompson 
Date: Wed, 12 May 2010 22:51:45 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r208013 - head/sys/dev/usb/controller
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 12 May 2010 22:51:45 -0000

Author: thompsa
Date: Wed May 12 22:51:45 2010
New Revision: 208013
URL: http://svn.freebsd.org/changeset/base/208013

Log:
  Add missing ifdefs for usb power saving support.
  
  Submitted by:	Hans Petter Selasky

Modified:
  head/sys/dev/usb/controller/usb_controller.c

Modified: head/sys/dev/usb/controller/usb_controller.c
==============================================================================
--- head/sys/dev/usb/controller/usb_controller.c	Wed May 12 22:50:23 2010	(r208012)
+++ head/sys/dev/usb/controller/usb_controller.c	Wed May 12 22:51:45 2010	(r208013)
@@ -234,11 +234,12 @@ usb_bus_explore(struct usb_proc_msg *pm)
 
 		USB_BUS_UNLOCK(bus);
 
+#if USB_HAVE_POWERD
 		/*
 		 * First update the USB power state!
 		 */
 		usb_bus_powerd(bus);
-
+#endif
 		 /* Explore the Root USB HUB. */
 		(udev->hub->explore) (udev);
 		USB_BUS_LOCK(bus);
@@ -301,11 +302,13 @@ usb_power_wdog(void *arg)
 	usb_proc_rewakeup(&bus->explore_proc);	/* recover from DDB */
 #endif
 
+#if USB_HAVE_POWERD
 	USB_BUS_UNLOCK(bus);
 
 	usb_bus_power_update(bus);
 
 	USB_BUS_LOCK(bus);
+#endif
 }
 
 /*------------------------------------------------------------------------*

From owner-svn-src-head@FreeBSD.ORG  Wed May 12 22:55:46 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 40325106566C;
	Wed, 12 May 2010 22:55:46 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 256CB8FC14;
	Wed, 12 May 2010 22:55:46 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4CMtkZd048247;
	Wed, 12 May 2010 22:55:46 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4CMtkKM048245;
	Wed, 12 May 2010 22:55:46 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <201005122255.o4CMtkKM048245@svn.freebsd.org>
From: Andrew Thompson 
Date: Wed, 12 May 2010 22:55:46 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r208014 - head/sys/dev/usb/controller
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 12 May 2010 22:55:46 -0000

Author: thompsa
Date: Wed May 12 22:55:45 2010
New Revision: 208014
URL: http://svn.freebsd.org/changeset/base/208014

Log:
  Back out r203140 which was causing problems when the first and the last
  microframe slot was not in the smask. The problem was that the EHCI driver was
  then thinking that the transfer was immediately complete in some cases. Which
  could lead to freeze-like situations, which can be recovered by unplugging the
  USB device.
  
  Reported by:	Richard Kolkovich
  Submitted by:	Hans Petter Selasky

Modified:
  head/sys/dev/usb/controller/ehci.c

Modified: head/sys/dev/usb/controller/ehci.c
==============================================================================
--- head/sys/dev/usb/controller/ehci.c	Wed May 12 22:51:45 2010	(r208013)
+++ head/sys/dev/usb/controller/ehci.c	Wed May 12 22:55:45 2010	(r208014)
@@ -1352,22 +1352,32 @@ ehci_check_transfer(struct usb_xfer *xfe
 		}
 	} else if (methods == &ehci_device_isoc_hs_methods) {
 		ehci_itd_t *td;
-		uint8_t n = (xfer->nframes & 7);
 
 		/* isochronous high speed transfer */
 
 		/* check last transfer */
 		td = xfer->td_transfer_last;
 		usb_pc_cpu_invalidate(td->page_cache);
-		if (n == 0)
-			status = td->itd_status[7];
-		else
-			status = td->itd_status[n-1];
+		status = td->itd_status[0];
+		status |= td->itd_status[1];
+		status |= td->itd_status[2];
+		status |= td->itd_status[3];
+		status |= td->itd_status[4];
+		status |= td->itd_status[5];
+		status |= td->itd_status[6];
+		status |= td->itd_status[7];
 
 		/* also check first transfer */
 		td = xfer->td_transfer_first;
 		usb_pc_cpu_invalidate(td->page_cache);
 		status |= td->itd_status[0];
+		status |= td->itd_status[1];
+		status |= td->itd_status[2];
+		status |= td->itd_status[3];
+		status |= td->itd_status[4];
+		status |= td->itd_status[5];
+		status |= td->itd_status[6];
+		status |= td->itd_status[7];
 
 		/* if no transactions are active we continue */
 		if (!(status & htohc32(sc, EHCI_ITD_ACTIVE))) {
@@ -2799,14 +2809,15 @@ ehci_device_isoc_hs_enter(struct usb_xfe
 	uint8_t x;
 	uint8_t td_no;
 	uint8_t page_no;
+	uint8_t shift = usbd_xfer_get_fps_shift(xfer);
 
 #ifdef USB_DEBUG
 	uint8_t once = 1;
 
 #endif
 
-	DPRINTFN(6, "xfer=%p next=%d nframes=%d\n",
-	    xfer, xfer->endpoint->isoc_next, xfer->nframes);
+	DPRINTFN(6, "xfer=%p next=%d nframes=%d shift=%d\n",
+	    xfer, xfer->endpoint->isoc_next, xfer->nframes, (int)shift);
 
 	/* get the current frame index */
 
@@ -2820,7 +2831,7 @@ ehci_device_isoc_hs_enter(struct usb_xfe
 	    (EHCI_VIRTUAL_FRAMELIST_COUNT - 1);
 
 	if ((xfer->endpoint->is_synced == 0) ||
-	    (buf_offset < ((xfer->nframes + 7) / 8))) {
+	    (buf_offset < (((xfer->nframes << shift) + 7) / 8))) {
 		/*
 		 * If there is data underflow or the pipe queue is empty we
 		 * schedule the transfer a few frames ahead of the current
@@ -2844,7 +2855,7 @@ ehci_device_isoc_hs_enter(struct usb_xfe
 	 */
 	xfer->isoc_time_complete =
 	    usb_isoc_time_expand(&sc->sc_bus, nframes) + buf_offset +
-	    ((xfer->nframes + 7) / 8);
+	    (((xfer->nframes << shift) + 7) / 8);
 
 	/* get the real number of frames */
 

From owner-svn-src-head@FreeBSD.ORG  Wed May 12 22:57:17 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 04B131065670;
	Wed, 12 May 2010 22:57:17 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id E83688FC15;
	Wed, 12 May 2010 22:57:16 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4CMvGpe048607;
	Wed, 12 May 2010 22:57:16 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4CMvGG7048605;
	Wed, 12 May 2010 22:57:16 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <201005122257.o4CMvGG7048605@svn.freebsd.org>
From: Andrew Thompson 
Date: Wed, 12 May 2010 22:57:16 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r208015 - head/sys/dev/usb/serial
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 12 May 2010 22:57:17 -0000

Author: thompsa
Date: Wed May 12 22:57:16 2010
New Revision: 208015
URL: http://svn.freebsd.org/changeset/base/208015

Log:
  Increase the max ports to 12, 3G devices exist where the ppp endpoint is #9.
  
  Requested by:	n_hibma

Modified:
  head/sys/dev/usb/serial/u3g.c

Modified: head/sys/dev/usb/serial/u3g.c
==============================================================================
--- head/sys/dev/usb/serial/u3g.c	Wed May 12 22:55:45 2010	(r208014)
+++ head/sys/dev/usb/serial/u3g.c	Wed May 12 22:57:16 2010	(r208015)
@@ -71,7 +71,7 @@ SYSCTL_INT(_hw_usb_u3g, OID_AUTO, debug,
     &u3g_debug, 0, "Debug level");
 #endif
 
-#define	U3G_MAXPORTS		8
+#define	U3G_MAXPORTS		12
 #define	U3G_CONFIG_INDEX	0
 #define	U3G_BSIZE		2048
 

From owner-svn-src-head@FreeBSD.ORG  Wed May 12 22:59:00 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 0BA371065676;
	Wed, 12 May 2010 22:59:00 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id EEB088FC0A;
	Wed, 12 May 2010 22:58:59 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4CMwxFv049003;
	Wed, 12 May 2010 22:58:59 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4CMwxDm049000;
	Wed, 12 May 2010 22:58:59 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <201005122258.o4CMwxDm049000@svn.freebsd.org>
From: Andrew Thompson 
Date: Wed, 12 May 2010 22:58:59 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r208016 - in head/sys/dev/usb: . serial
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 12 May 2010 22:59:00 -0000

Author: thompsa
Date: Wed May 12 22:58:59 2010
New Revision: 208016
URL: http://svn.freebsd.org/changeset/base/208016

Log:
  Add new FTDI USB device ID.
  
  PR:		kern/146483
  Submitted by:	Andre Albsmeier

Modified:
  head/sys/dev/usb/serial/uftdi.c
  head/sys/dev/usb/usbdevs

Modified: head/sys/dev/usb/serial/uftdi.c
==============================================================================
--- head/sys/dev/usb/serial/uftdi.c	Wed May 12 22:57:16 2010	(r208015)
+++ head/sys/dev/usb/serial/uftdi.c	Wed May 12 22:58:59 2010	(r208016)
@@ -212,6 +212,7 @@ static struct usb_device_id uftdi_devs[]
 	UFTDI_DEV(ATMEL, STK541, 8U232AM),
 	UFTDI_DEV(DRESDENELEKTRONIK, SENSORTERMINALBOARD, 8U232AM),
 	UFTDI_DEV(DRESDENELEKTRONIK, WIRELESSHANDHELDTERMINAL, 8U232AM),
+	UFTDI_DEV(FTDI, GAMMASCOUT, 8U232AM),
 	UFTDI_DEV(FTDI, SERIAL_8U100AX, SIO),
 	UFTDI_DEV(FTDI, SERIAL_2232C, 8U232AM),
 	UFTDI_DEV(FTDI, SERIAL_2232D, 8U232AM),

Modified: head/sys/dev/usb/usbdevs
==============================================================================
--- head/sys/dev/usb/usbdevs	Wed May 12 22:57:16 2010	(r208015)
+++ head/sys/dev/usb/usbdevs	Wed May 12 22:58:59 2010	(r208016)
@@ -1501,6 +1501,7 @@ product FTDI SERIAL_4232H	0x6011	FT4232H
 product FTDI TACTRIX_OPENPORT_13M 0xcc48 OpenPort 1.3 Mitsubishi
 product FTDI TACTRIX_OPENPORT_13S 0xcc49 OpenPort 1.3 Subaru
 product FTDI TACTRIX_OPENPORT_13U 0xcc4a OpenPort 1.3 Universal
+product FTDI GAMMASCOUT		0xd678	Gamma-Scout
 product FTDI EISCOU		0xe888	Expert ISDN Control USB
 product FTDI UOPTBR		0xe889	USB-RS232 OptoBridge
 product FTDI EMCU2D		0xe88a	Expert mouseCLOCK USB II

From owner-svn-src-head@FreeBSD.ORG  Wed May 12 23:00:36 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D1D4B1065689;
	Wed, 12 May 2010 23:00:36 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id C145A8FC1C;
	Wed, 12 May 2010 23:00:36 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4CN0aKs049426;
	Wed, 12 May 2010 23:00:36 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4CN0anV049424;
	Wed, 12 May 2010 23:00:36 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <201005122300.o4CN0anV049424@svn.freebsd.org>
From: Andrew Thompson 
Date: Wed, 12 May 2010 23:00:36 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r208017 - head/sys/dev/usb/net
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 12 May 2010 23:00:36 -0000

Author: thompsa
Date: Wed May 12 23:00:36 2010
New Revision: 208017
URL: http://svn.freebsd.org/changeset/base/208017

Log:
  Fix possibly wrong bit masking.
  
  Reported by:	n_hibma
  Submitted by:	Hans Petter Selasky

Modified:
  head/sys/dev/usb/net/uhso.c

Modified: head/sys/dev/usb/net/uhso.c
==============================================================================
--- head/sys/dev/usb/net/uhso.c	Wed May 12 22:58:59 2010	(r208016)
+++ head/sys/dev/usb/net/uhso.c	Wed May 12 23:00:36 2010	(r208017)
@@ -1339,7 +1339,7 @@ uhso_ucom_cfg_set_dtr(struct ucom_softc 
 	if (onoff)
 		sc->sc_line |= UCDC_LINE_DTR;
 	else
-		sc->sc_line &= UCDC_LINE_DTR;
+		sc->sc_line &= ~UCDC_LINE_DTR;
 
 	uhso_bs_cfg(sc);
 }
@@ -1355,7 +1355,7 @@ uhso_ucom_cfg_set_rts(struct ucom_softc 
 	if (onoff)
 		sc->sc_line |= UCDC_LINE_RTS;
 	else
-		sc->sc_line &= UCDC_LINE_DTR;
+		sc->sc_line &= ~UCDC_LINE_RTS;
 
 	uhso_bs_cfg(sc);
 }

From owner-svn-src-head@FreeBSD.ORG  Wed May 12 23:40:45 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8CAB4106564A;
	Wed, 12 May 2010 23:40:45 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 7A9DD8FC18;
	Wed, 12 May 2010 23:40:45 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4CNejWN058211;
	Wed, 12 May 2010 23:40:45 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4CNejPY058210;
	Wed, 12 May 2010 23:40:45 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <201005122340.o4CNejPY058210@svn.freebsd.org>
From: Andrew Thompson 
Date: Wed, 12 May 2010 23:40:45 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r208018 - head/sys/dev/usb
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 12 May 2010 23:40:45 -0000

Author: thompsa
Date: Wed May 12 23:40:44 2010
New Revision: 208018
URL: http://svn.freebsd.org/changeset/base/208018

Log:
  Reduce diffs to p4.
  
   Add test code for delaying or failing usb control requests, disabled by
   default under ifdef USB_REQ_DEBUG.
  
  Submitted by:	Hans Petter Selasky

Modified:
  head/sys/dev/usb/usb_request.c

Modified: head/sys/dev/usb/usb_request.c
==============================================================================
--- head/sys/dev/usb/usb_request.c	Wed May 12 23:00:36 2010	(r208017)
+++ head/sys/dev/usb/usb_request.c	Wed May 12 23:40:44 2010	(r208018)
@@ -71,15 +71,122 @@
 #ifdef USB_DEBUG
 static int usb_pr_poll_delay = USB_PORT_RESET_DELAY;
 static int usb_pr_recovery_delay = USB_PORT_RESET_RECOVERY;
-static int usb_ss_delay = 0;
 
 SYSCTL_INT(_hw_usb, OID_AUTO, pr_poll_delay, CTLFLAG_RW,
     &usb_pr_poll_delay, 0, "USB port reset poll delay in ms");
 SYSCTL_INT(_hw_usb, OID_AUTO, pr_recovery_delay, CTLFLAG_RW,
     &usb_pr_recovery_delay, 0, "USB port reset recovery delay in ms");
-SYSCTL_INT(_hw_usb, OID_AUTO, ss_delay, CTLFLAG_RW,
-    &usb_ss_delay, 0, "USB status stage delay in ms");
-#endif
+
+#ifdef USB_REQ_DEBUG
+/* The following structures are used in connection to fault injection. */
+struct usb_ctrl_debug {
+	int bus_index;		/* target bus */
+	int dev_index;		/* target address */
+	int ds_fail;		/* fail data stage */
+	int ss_fail;		/* fail data stage */
+	int ds_delay;		/* data stage delay in ms */
+	int ss_delay;		/* status stage delay in ms */
+	int bmRequestType_value;
+	int bRequest_value;
+};
+
+struct usb_ctrl_debug_bits {
+	uint16_t ds_delay;
+	uint16_t ss_delay;
+	uint8_t ds_fail:1;
+	uint8_t ss_fail:1;
+	uint8_t enabled:1;
+};
+
+/* The default is to disable fault injection. */
+
+static struct usb_ctrl_debug usb_ctrl_debug = {
+	.bus_index = -1,
+	.dev_index = -1,
+	.bmRequestType_value = -1,
+	.bRequest_value = -1,
+};
+
+SYSCTL_INT(_hw_usb, OID_AUTO, ctrl_bus_fail, CTLFLAG_RW,
+    &usb_ctrl_debug.bus_index, 0, "USB controller index to fail");
+SYSCTL_INT(_hw_usb, OID_AUTO, ctrl_dev_fail, CTLFLAG_RW,
+    &usb_ctrl_debug.dev_index, 0, "USB device address to fail");
+SYSCTL_INT(_hw_usb, OID_AUTO, ctrl_ds_fail, CTLFLAG_RW,
+    &usb_ctrl_debug.ds_fail, 0, "USB fail data stage");
+SYSCTL_INT(_hw_usb, OID_AUTO, ctrl_ss_fail, CTLFLAG_RW,
+    &usb_ctrl_debug.ss_fail, 0, "USB fail status stage");
+SYSCTL_INT(_hw_usb, OID_AUTO, ctrl_ds_delay, CTLFLAG_RW,
+    &usb_ctrl_debug.ds_delay, 0, "USB data stage delay in ms");
+SYSCTL_INT(_hw_usb, OID_AUTO, ctrl_ss_delay, CTLFLAG_RW,
+    &usb_ctrl_debug.ss_delay, 0, "USB status stage delay in ms");
+SYSCTL_INT(_hw_usb, OID_AUTO, ctrl_rt_fail, CTLFLAG_RW,
+    &usb_ctrl_debug.bmRequestType_value, 0, "USB bmRequestType to fail");
+SYSCTL_INT(_hw_usb, OID_AUTO, ctrl_rv_fail, CTLFLAG_RW,
+    &usb_ctrl_debug.bRequest_value, 0, "USB bRequest to fail");
+
+/*------------------------------------------------------------------------*
+ *	usbd_get_debug_bits
+ *
+ * This function is only useful in USB host mode.
+ *------------------------------------------------------------------------*/
+static void
+usbd_get_debug_bits(struct usb_device *udev, struct usb_device_request *req,
+    struct usb_ctrl_debug_bits *dbg)
+{
+	int temp;
+
+	memset(dbg, 0, sizeof(*dbg));
+
+	/* Compute data stage delay */
+
+	temp = usb_ctrl_debug.ds_delay;
+	if (temp < 0)
+		temp = 0;
+	else if (temp > (16*1024))
+		temp = (16*1024);
+
+	dbg->ds_delay = temp;
+
+	/* Compute status stage delay */
+
+	temp = usb_ctrl_debug.ss_delay;
+	if (temp < 0)
+		temp = 0;
+	else if (temp > (16*1024))
+		temp = (16*1024);
+
+	dbg->ss_delay = temp;
+
+	/* Check if this control request should be failed */
+
+	if (usbd_get_bus_index(udev) != usb_ctrl_debug.bus_index)
+		return;
+
+	if (usbd_get_device_index(udev) != usb_ctrl_debug.dev_index)
+		return;
+
+	temp = usb_ctrl_debug.bmRequestType_value;
+
+	if ((temp != req->bmRequestType) && (temp >= 0) && (temp <= 255))
+		return;
+
+	temp = usb_ctrl_debug.bRequest_value;
+
+	if ((temp != req->bRequest) && (temp >= 0) && (temp <= 255))
+		return;
+
+	temp = usb_ctrl_debug.ds_fail;
+	if (temp)
+		dbg->ds_fail = 1;
+
+	temp = usb_ctrl_debug.ss_fail;
+	if (temp)
+		dbg->ss_fail = 1;
+
+	dbg->enabled = 1;
+}
+#endif	/* USB_REQ_DEBUG */
+#endif	/* USB_DEBUG */
 
 /*------------------------------------------------------------------------*
  *	usbd_do_request_callback
@@ -264,6 +371,9 @@ usbd_do_request_flags(struct usb_device 
     struct usb_device_request *req, void *data, uint16_t flags,
     uint16_t *actlen, usb_timeout_t timeout)
 {
+#ifdef USB_REQ_DEBUG
+	struct usb_ctrl_debug_bits dbg;
+#endif
 	usb_handle_req_t *hr_func;
 	struct usb_xfer *xfer;
 	const void *desc;
@@ -273,6 +383,7 @@ usbd_do_request_flags(struct usb_device 
 	usb_ticks_t max_ticks;
 	uint16_t length;
 	uint16_t temp;
+	uint16_t acttemp;
 	uint8_t enum_locked;
 
 	if (timeout < 50) {
@@ -327,7 +438,6 @@ usbd_do_request_flags(struct usb_device 
 	 * Grab the default sx-lock so that serialisation
 	 * is achieved when multiple threads are involved:
 	 */
-
 	sx_xlock(&udev->ctrl_sx);
 
 	hr_func = usbd_get_hr_func(udev);
@@ -391,6 +501,15 @@ usbd_do_request_flags(struct usb_device 
 		err = USB_ERR_NOMEM;
 		goto done;
 	}
+
+#ifdef USB_REQ_DEBUG
+	/* Get debug bits */
+	usbd_get_debug_bits(udev, req, &dbg);
+
+	/* Check for fault injection */
+	if (dbg.enabled)
+		flags |= USB_DELAY_STATUS_STAGE;
+#endif
 	USB_XFER_LOCK(xfer);
 
 	if (flags & USB_DELAY_STATUS_STAGE)
@@ -412,13 +531,32 @@ usbd_do_request_flags(struct usb_device 
 	usbd_copy_in(xfer->frbuffers, 0, req, sizeof(*req));
 
 	usbd_xfer_set_frame_len(xfer, 0, sizeof(*req));
-	xfer->nframes = 2;
 
 	while (1) {
 		temp = length;
-		if (temp > xfer->max_data_length) {
+		if (temp > usbd_xfer_max_len(xfer)) {
 			temp = usbd_xfer_max_len(xfer);
 		}
+#ifdef USB_REQ_DEBUG
+		if (xfer->flags.manual_status) {
+			if (usbd_xfer_frame_len(xfer, 0) != 0) {
+				/* Execute data stage separately */
+				temp = 0;
+			} else if (temp > 0) {
+				if (dbg.ds_fail) {
+					err = USB_ERR_INVAL;
+					break;
+				}
+				if (dbg.ds_delay > 0) {
+					usb_pause_mtx(
+					    xfer->xroot->xfer_mtx,
+				            USB_MS_TO_TICKS(dbg.ds_delay));
+					/* make sure we don't time out */
+					start_ticks = ticks;
+				}
+			}
+		}
+#endif
 		usbd_xfer_set_frame_len(xfer, 1, temp);
 
 		if (temp > 0) {
@@ -438,21 +576,21 @@ usbd_do_request_flags(struct usb_device 
 					usbd_copy_in(xfer->frbuffers + 1,
 					    0, data, temp);
 			}
-			xfer->nframes = 2;
+			usbd_xfer_set_frames(xfer, 2);
 		} else {
-			if (xfer->frlengths[0] == 0) {
+			if (usbd_xfer_frame_len(xfer, 0) == 0) {
 				if (xfer->flags.manual_status) {
-#ifdef USB_DEBUG
-					int temp;
-
-					temp = usb_ss_delay;
-					if (temp > 5000) {
-						temp = 5000;
+#ifdef USB_REQ_DEBUG
+					if (dbg.ss_fail) {
+						err = USB_ERR_INVAL;
+						break;
 					}
-					if (temp > 0) {
+					if (dbg.ss_delay > 0) {
 						usb_pause_mtx(
 						    xfer->xroot->xfer_mtx,
-						    USB_MS_TO_TICKS(temp));
+						    USB_MS_TO_TICKS(dbg.ss_delay));
+						/* make sure we don't time out */
+						start_ticks = ticks;
 					}
 #endif
 					xfer->flags.manual_status = 0;
@@ -460,7 +598,7 @@ usbd_do_request_flags(struct usb_device 
 					break;
 				}
 			}
-			xfer->nframes = 1;
+			usbd_xfer_set_frames(xfer, 1);
 		}
 
 		usbd_transfer_start(xfer);
@@ -475,18 +613,19 @@ usbd_do_request_flags(struct usb_device 
 		if (err) {
 			break;
 		}
-		/* subtract length of SETUP packet, if any */
 
-		if (xfer->aframes > 0) {
-			xfer->actlen -= xfer->frlengths[0];
+		/* get actual length of DATA stage */
+
+		if (xfer->aframes < 2) {
+			acttemp = 0;
 		} else {
-			xfer->actlen = 0;
+			acttemp = usbd_xfer_frame_len(xfer, 1);
 		}
 
 		/* check for short packet */
 
-		if (temp > xfer->actlen) {
-			temp = xfer->actlen;
+		if (temp > acttemp) {
+			temp = acttemp;
 			length = temp;
 		}
 		if (temp > 0) {

From owner-svn-src-head@FreeBSD.ORG  Thu May 13 00:19:04 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 24C87106566C;
	Thu, 13 May 2010 00:19:04 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 110828FC13;
	Thu, 13 May 2010 00:19:04 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4D0J3BO066796;
	Thu, 13 May 2010 00:19:03 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4D0J3p7066792;
	Thu, 13 May 2010 00:19:03 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <201005130019.o4D0J3p7066792@svn.freebsd.org>
From: Andrew Thompson 
Date: Thu, 13 May 2010 00:19:03 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r208019 - in head/sys: contrib/dev/run dev/usb/wlan
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 13 May 2010 00:19:04 -0000

Author: thompsa
Date: Thu May 13 00:19:03 2010
New Revision: 208019
URL: http://svn.freebsd.org/changeset/base/208019

Log:
  Sync run(4) driver from author's site.
  
  Submitted by:	Akinori Furukoshi
  Obtained from:	git://gitorious.org/run/run.git

Modified:
  head/sys/contrib/dev/run/rt2870.fw.uu
  head/sys/dev/usb/wlan/if_run.c
  head/sys/dev/usb/wlan/if_runreg.h
  head/sys/dev/usb/wlan/if_runvar.h

Modified: head/sys/contrib/dev/run/rt2870.fw.uu
==============================================================================
--- head/sys/contrib/dev/run/rt2870.fw.uu	Wed May 12 23:40:44 2010	(r208018)
+++ head/sys/contrib/dev/run/rt2870.fw.uu	Thu May 13 00:19:03 2010	(r208019)
@@ -1,112 +1,108 @@
-# Copyright (c) 2007, Ralink Technology Corporation 
+# Copyright (c) 2007, Ralink Technology Corporation
 # All rights reserved.
 # 
-# Redistribution.  Redistribution and use in binary form, without 
-# modification, are permitted provided that the following conditions are 
+# Redistribution.  Redistribution and use in binary form, without
+# modification, are permitted provided that the following conditions are
 # met:
-# 
-# * Redistributions must reproduce the above copyright notice and the 
-#   following disclaimer in the documentation and/or other materials 
-#   provided with the distribution. 
+#
+# * Redistributions must reproduce the above copyright notice and the
+#   following disclaimer in the documentation and/or other materials
+#   provided with the distribution.
 # * Neither the name of Ralink Technology Corporation nor the names of its
 #   suppliers may be used to endorse or promote products derived from this
-#   software without specific prior written permission. 
-# * No reverse engineering, decompilation, or disassembly of this software 
+#   software without specific prior written permission.
+# * No reverse engineering, decompilation, or disassembly of this software
 #   is permitted.
-# 
-# Limited patent license. Ralink Technology Corporation grants a world-wide, 
-# royalty-free, non-exclusive license under patents it now or hereafter 
-# owns or controls to make, have made, use, import, offer to sell and 
-# sell ("Utilize") this software, but solely to the extent that any 
-# such patent is necessary to Utilize the software alone, or in 
-# combination with an operating system licensed under an approved Open 
-# Source license as listed by the Open Source Initiative at 
-# http://opensource.org/licenses.  The patent license shall not apply to 
-# any other combinations which include this software.  No hardware per 
+#
+# Limited patent license. Ralink Technology Corporation grants a world-wide,
+# royalty-free, non-exclusive license under patents it now or hereafter
+# owns or controls to make, have made, use, import, offer to sell and
+# sell ("Utilize") this software, but solely to the extent that any
+# such patent is necessary to Utilize the software alone, or in
+# combination with an operating system licensed under an approved Open
+# Source license as listed by the Open Source Initiative at
+# http://opensource.org/licenses.  The patent license shall not apply to
+# any other combinations which include this software.  No hardware per
 # se is licensed hereunder.
-# 
-# DISCLAIMER.  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 
-# COPYRIGHT OWNER 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 
+#
+# DISCLAIMER.  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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
+# COPYRIGHT OWNER 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.
-begin 644 rt2870.fw
-M____`A`H`A`R`A!X`A)G`A)H`A*'`A*,$A*((@(620(7'P(3=P(2C3`%!B`-
-M`Q(7P2*0`8S@,.,;Y4PPX`1_0(`"?P"0$"_O\)`!C'0(\.20`:?PD`&,X##@
-M')`!@."T`A6CX+0!$)`!A."T@0F0`8QT`?`2#<@BD`04X"#G`P(29I!P$N#U
-M5I`$!.`2"IT0MS$0X%`1!%$1#5(1#5,1#5013E41?G`1J7$1UW(2'7,2/H``
-M`!)F(`(#,`,=?0*O5A(+D9`$%'2`\.20`D7?57D'`0X/]T1R57^,;OQI!P$>#_=$@E5_C&[\;D_:]6$@N1D`04
-M=(#PY)!P$_#E5O1P`P(29@(27^5'9`=@"^5'9`A@!>5'M`D(D'`1X%0/]3KE
-M1[0)".4ZM`,#Y/5&Y/VO5A(+D=($(I!P$.#^D'`1X/WM^.;U5_VO5A(+D9`$
-M%'2`\.20#][?6"CH/@]5?]KU82"Y&0
-M!!1T@/#DD'`3\.56]'`#`A)F`A)?D!`"X+1P'J/@M#`9D`4(X$0!\/V0!07@
-M5/OP1`3P[53^D`4(\.3U3O5/=3K_K5>O5A(+D9`$%'2`\.20!$`?`B(N53Y4=D!F`#`A-$@!OE2,14#_5#Y4K$5`_U
-M0N5,Q%0/]5[E1V0&<&930P^`885)0X5+0H5-7N5'9`9P4H`;Y4G$5`_U0^5+
-MQ%0/]4+E3<14#_5>Y4=D!G`UY4-4#T00]4.`*^5'M`0&4U[[=4()Y4>T!09#
-M7@1U0@GE1[0&$.5#5`]$,/5#@`;22X`"TDSD]27E0L14\/_E0U0/3_5?D'!$
-M\*/E7O"CY4KPH^5(\*/E3/"CY43PH^5"\*/E0_#28"+E1V`0),!P`Q(6*1(3
-MC,*OP@32KR+"KY`$%.!4#F`$TAB`".5.14\D_Y(8TJ^0!!3@HN22&70>\.5?
-M5`_U+>4E5?5##_OS`1Y25P!74E#(`"%272;-)M@`_E
-M7S#F!L)LTFV`!-)LPFWE1V0#<"$P2P;";-)M@!CE)7`#,$P1PDSE)7`%=24'
-M@`(5)=)LTFWE1[0)%.5$(.,+Y3ID`F`%Y3JT`P3";-)MD'!&Y2WP(&D'Y5X@
-MX`*R:"!K!^5>(.$"LFH@;0?E7B#B`K)LD'!'Y2WP=2Y`(&D$HFB`)C!H!N5&
-MHN*`'>5>(.($?P&``G\`Y494\/Z^\`1^`8`"?@#N;R3_DG.2!4_O#E0\14#Q1@%"3^8",D`V`#`A88D`(HX#!'#X`'D`(HX"!'
-M!E3^\`(6&$0!\`(6&.5&,.($?P&``G\`D`(HX%3^3_`"%ACE1V0'8`_E1V0(
-M8`GE1V0)8`,"%ACD]2>0`BG@5/SPY3H48"T48"X48#8D_&!?)/E@'R0.<&GE
-M1A,35#]U\`.$K_`@1P1^`8`"?@#O;B3_@$6B1X!!Y48PX@/3@"?#@"3E1C#B
-M#50XPY0P4`9^`'\!@`1^`'\`($<$?0&``GT`[VU.)/^2.*)'LY(Y@!GE1C#B
-M`].``<.2.:)'LY(X@`>B1[.2.)(YD`(HX%3\12?PD'"4Z
-M\"+DD`(I\#!'!*]%@`3E1?3_D`(H[_`BCU#262*/5-)8(N3U8L*OY5$48$84
-M8&(D`F`#`A<#TEEU50&0`J+@5'_PH^`@YR*0!#3@M`(;H^"T`A:CX+0"$7\@
-M$A8_D!`$X%3S\'51`8!SY5!P!75B`X!JD!(`X%0#50<`*`1I`"H^`@YCN0!#?@9")P,Y`!BG1^\)`!EO"0$@1T"O"0$RC@
-M5/#PH^!4\/"CX%3Z\)`$`>!4^?!U8@%U50+D]5&`">50<`5U8@/U4>5B8!7"
-M`>3U4<)9K6*O0!(7C>5BM`,"T@/2KR+"KS`!$N20`9;P]5'"6<(!?0*O0!(7
-MC>52%&`)!'!,=5(!=54#D`0!X$0.\)`3*.!$#_"CX$0/\*/@1`7PD!($=`/P
-MD`*BX$3`\)`0!.!$#/#D]5+U53`""\("?0&O01(7C8`"P@/DD`&6\-*O(N_T
-M8"WD_G04+O6"Y#1P]8/@M/\9=!0N]8+D-'#U@^_P=!PN]8+D-'#U@^WP(@Z^
-M!-4B(B*0<"K@,.%-PJ^0<"C@D!`<\)!P*>"0$!WPD'`JX)`0'O"0$!S@]6*0
-M$![@(.'SD!`"T"`9U3@%U3X20`D_Y)'(I`$!.`EX"1=]5>0T#`B0#T_Y!P$.!?_Y!P$>!5)T^0#_D'`9X/[O7I`"*?`P1P2O)X`$
+MY2?T_Y`"*._PY5;T<`,"$RD"$R*0#][?CF]5?]KU82"Y&0!!1T
+M@/#DD'`3\.56]'`#`A,I`A,BD'`0X/Z0WU@HZ#X/57_:]6$@N1D`04
+M=(#PY)!P$_#E5O1P`P(3*0(3(I`0`.#U5Y`0`N#U6*/@]5GE6+1P'N59M#`9
+MD`4(X$0!\/V0!07@5/OP1`3P[53^D`4(\.3U3O5/=3K_=3S_K5>O5A(+D9`$
+M%'2`\.20!$`?`B
+M(N53!5
+M)_^0D`(I\#!'!*\G@`3E)_3_D`(H[_#"%"+"
+M2\),Y402"IT3I0`4,P04+P@4#Q`3N2`3V6`3ZJ```!0UA4A#A4I"A4Q>Y4=D
+M!F`#`A0U@!OE2,14#_5#Y4K$5`_U0N5,Q%0/]5[E1V0&<&%30P^`7(5)0X5+
+M0H5-7N5'9`9P38`;Y4G$5`_U0^5+Q%0/]4+E3<14#_5>Y4=D!G`PY4-4#T00
+M]4.`)N5'9`1@!>5'M`4&0UX$=4()Y4>T!A#E0U0/1##U0X`&TDN``M),Y/4E
+MY4+$5/#_Y4-4#T_U7])@(M(5Y4\.5?5`_U
+M+>4E5?5##_OS`1Y25P!74E#(`"%272;-)M@`_E7S#F
+M!L)LTFV`!-)LPFWE1V0#<"$P2P;";-)M@!CE)7`#,$P1PDSE)7`%=24'@`(5
+M)=)LTFWE1[0)%.5$(.,+Y3ID`F`%Y3JT`P3";-)MY4>T"A/E.K0!!L)LTFV`
+M".4Z<`32;,)M(&D'Y5X@X`*R:"!K!^5>(.$"LFH@;0?E7B#B`K)L=2Y`(&D$
+MHFB`)C!H!N5&HN*`'>5>(.($?P&``G\`Y494\/Z^\`1^`8`"?@#N;R3_DG.2
+M5>(.$$?P&``G\`Y494\/Z^\`1^`8`"?@#N;R3_
+MDG&2<)`0`."0$"SPD!`#X,.4,$`4HG&2=Z)PDG;E+A,35#_U+L)WTG:0$"_E
+M+O#E1V0&<#F0`BG@5/[PY4/$5`\48`PD_F`,)`-P$\(X@`_2.(`+Y48PX@/3
+M@`'#DC@P1P6O)P(7?N4G]/\"%W[E1V0'8`_E1V0(8`GE1V0)8`,"%OV0`BG@
+M5/SPY3H48"(48"448"TD_&!))/E@%"0.<%#E1A,35#]U\`.$Y?`D_X`ZTCG"
+M.(`^Y48PX@/3@!W#@!KE1C#B#50XPY0P4`9^`'\!@`1^`'\`[D\D_Y(XPCF`
+M$^5&,.(#TX`!PY(YPCB`!,(XPCDP1P2O)X`$Y2?T_P(7?N5'9`Q@!N5'9`MP
+M>I`"*>!4_?#E.A1@(!1@(11@*R3\8$4D^6`2)`YP2N5&$Q-4/W7P`X3E\(`I
+MTCF`.N5&,.(#TX`!PY(Y@"WE1C#B#50XPY0P4`9^`'\!@`1^`'\`[D\D_Y(Y
+M@`_E1C#B`].``<.2.8`"PCDP1P2O)X`$Y2?T_Y`"*._P(N5'M`L0D`(IX%3K
+M\.4G5.M%1?4G(N20`BGP,$<$KT6`!.5%]/^0`BCO\"*/4-)9(H]4TE@BY/5B
+MPJ_E411@2!1@9B0"8`,"&-326755`9`"HN!4?_"CX"#G(Y`$-."T`ARCX+0"
+M%Z/@M`(2?R`2%Z^0$`3@5//P=5$!`AC4Y5!P!G5B`P(8U)`2`.!4`W`2?R`2
+M%Z^0`J+@5+_P=5$"`AC4Y5!P`P(8SY`"H^`PY@,"&,N0!#?@9")@`P(8RY`!
+MBG1^\)`!EO"0$@1T"O#E6+1R%>59M#40Y)`%`/"C=`CPHW0!\'0#\'\!$@TJ
+MD!,HX)!P&O"0$RG@D'`;\)`3*.!4\/"CX%3P\.59M#44Y3ST8`:CX%3S@!20
+M$RK@5/OP@!3E//20$RI@".!4\D4\\(`$X%3Z\)`$`>!4_?!U8@%U50+D]5&`
+M">50<`5U8@/U4>5B8!7"`>3U4<)9K6*O0!(9E.5BM`,"T@/2KR+"KS`!$N20
+M`9;P]5'"6<(!?0*O0!(9E.52%&`,!&`#`AF1=5(!=54#D`0!X$0.\)!P&N"0
+M$RCPD'`;X)`3*?#E//1@".4\1`&C\(`&D!,J=`7PD!($=`/PY5BT"0$!WPD'`JX)`0'O"0$!S@]6*0$![@(.'SD!``(29P(2:`(2AP(2C!(2B"("%DD"%Q\"$W<"$HTP!08@
-M#0,2%\$BD`&,X##C&^5,,.`$?T"``G\`D!`O[_"0`8QT"/#DD`&G\)`!C.`P
-MX!R0`8#@M`(5H^"T`1"0`83@M($)D`&,=`'P$@W=(I`$%.`@YP,"$F:0!D"&`(X&0@8`,"$F9U3@-U3R`BD'`1X"3_DD!4#_4Z
-MY4>T"0CE.K0#`^3U1N3]KU82"ZK2!"*0#][?CF]5?]KU82"ZJ0
-M!!1T@/#DD'`3\.56]'`#`A)F`A)?D'`0X/Z0WU@HZ#X/57_:]6$@NJ
-MD`04=(#PY)!P$_#E5O1P`P(29@(27Y`0`N"TO5A(+JI`$%'2`\.200<"7@1`'P(B+E4W`:,&`)LDTP300%
-M1L($Y4]%3F`(Y4\53W`"%4XB(L)"TR(BPDO"3.5$$@JV$J\`$T($$SX($QD0
-M$L,@$N-@$O2@```31(5(0X5*0H5,7N5'9`9@`P(31(`;Y4C$5`_U0^5*Q%0/
-M]4+E3,14#_5>Y4=D!G!F4T,/@&&%24.%2T*%35[E1V0&<%*`&^5)Q%0/]4/E
-M2\14#_5"Y4W$5`_U7N5'9`9P->5#5`]$$/5#@"OE1[0$!E->^W5"">5'M`4&
-M0UX$=4()Y4>T!A#E0U0/1##U0X`&TDN``M),Y/4EY4+$5/#_Y4-4#T_U7Y!P
-M1/"CY5[PH^5*\*/E2/"CY4SPH^5$\*/E0O"CY4/PTF`BY4=@$"3`<`,2%BD2
-M$XS"K\($TJ\BPJ^0!!3@5`Y@!-(8@`CE3D5/)/^2&-*OD`04X*+DDAET'O#E
-M7U0/]2WE)7`3,!@%Y5\@Y0LP&1GE7U0P_[\P$>4E<`5U)0R``A4ETFS2;8`/
-MY5\PY@;";-)M@`32;,)MY4=D`W`A,$L&PFS2;8`8Y25P`S!,$<),Y25P!74E
-M!X`"%272;-)MY4>T"13E1"#C"^4Z9`)@!>4ZM`,$PFS2;9!P1N4M\"!I!^5>
-M(.`"LF@@:P?E7B#A`K)J(&T'Y5X@X@*R;)!P1^4M\'4N0"!I!*)H@"8P:`;E
-M1J+B@!WE7B#B!'\!@`)_`.5&5/#^OO`$?@&``GX`[F\D_Y)SDG(@:P2B:H`F
-M,&H&Y4:BXH`=Y5X@X`1_`8`"?P#E1E3P_K[P!'X!@`)^`.YO)/^2=9)T(&T$
-MHFR`)C!L!N5&HN*`'>5>(.$$?P&``G\`Y494\/Z^\`1^`8`"?@#N;R3_DG&2
-M<)`0`."0$"_PD!`#X,.4,$`4HG&2=Z)PDG;E+A,35#_U+L)WTG:0$"_E+O#E
-M1V0&<$R0`BG@5/[PY4/$5`\48!0D_F`C)`-@`P(6&)`"*.`P1P^`!Y`"*.`@
-M1P94_O`"%AA$`?`"%ACE1C#B!'\!@`)_`)`"*.!4_D_P`A88Y4=D!V`/Y4=D
-M"&`)Y4=D"6`#`A88Y/4GD`(IX%3\\.4Z%&`M%&`N%&`V)/Q@7R3Y8!\D#G!I
-MY483$U0_=?`#A*_P($<$?@&``GX`[VXD_X!%HD>`0>5&,.(#TX`GPX`DY48P
-MX@U4.,.4,%`&?@!_`8`$?@!_`"!'!'T!@`)]`.]M3B3_DCBB1[.2.8`9Y48P
-MX@/3@`'#DCFB1[.2.(`'HD>SDCB2.9`"*.!4_$4G\)!PG.4Z\*/E1_"0<$'E
-M.O`BY)`"*?`P1P2O18`$Y47T_Y`"*._P(H]0TEDBCU326"+D]6+"K^51%&!&
-M%&!B)`)@`P(7`])9=54!D`*BX%1_\*/@(.!$#O"0$RC@1`_PH^!$#_"CX$0%\)`2!'0#
-M\)`"HN!$P/"0$`3@1`SPY/52]54P`@O"`GT!KT$2%XV``L(#Y)`!EO#2KR+O
-M]&`MY/YT%"[U@N0TX"#A\Y`0'."0<"CPD!`=X)!P*?"0$![@D'`J\#!*!Y!P).!$`?#"!=*O
-M(B(B````````````````````````````````````````````````````````
 M````````````````````````````````````````````````````````````
 M````````````````````````````````````````````````````````````
 M````````````````````````````````````````````````````````````
@@ -187,6 +135,65 @@ M```````````````````````````````````````
 M````````````````````````````````````````````````````````````
 M````````````````````````````````````````````````````````````
 M````````````````````````````````````````````````````````````
+M`````````````````````````````````````````````````````````!'"
+M>O___P(0*`(0,@(0>`(3*@(3*P(32@(33Q(32R("%[D"&/`"%$@"$X,P!08@
+M#0,2&<@BD`&,X##C&^5,,.`$?T"``G\`D!`O[_"0`8QT"/#DD`&G\)`!C.`P
+MX!R0`8#@M`(5H^"T`1"0`83@M($)D`&,=`'P$@W=(I`$%.`@YP,"$RF0#U/.20!D"&`$X+0@!G5.`W5/(.3U)R*0
+M`D7?57D'`0X/]T1R57^,;OQI!P$>#_=$@E5_C&[\;D
+M_:]6$@NJD`04=(#PY)!P$_#E5O1P`P(3*0(3(N5'9`=@'>5'9`A@%^5'9`E@
+M$>5'9`I@"^5'9`M@!>5'M`P(D'`1X%0/]3KE1[0)".4ZM`,#Y/5&Y4>T"@CE
+M.K0!`^3U1N3]KU82"ZK2!"*0"0
+M0`BG@_Y!P&>#^[UZ0`BGP,$<$KR>`
+M!.4G]/^0`BCO\.56]'`#`A,I`A,BD'`0X/Z0WXYO57_:]6$@NJD`04
+M=(#PY)!P$_#E5O1P`P(3*0(3(I!P$.#^D'`1X/WM]8*.@^#U5_VO5A(+JI`$
+M%'2`\.200$`+@]5BCX/59Y5BTO5A(+JI`$%'2`\.200<"7@1`'P
+M(B+E4W`:,&`)LDTP300%1L($Y4]%3F`(Y4\53W`"%4XB(L)"TR(P%#"0#_D'`9X/[O7I`"*?`P1P2O)X`$Y2?T_Y`"*._PPA0B
+MPDO"3.5$$@JV$Z4`%#,$%"\(%`\0$[D@$]E@$^J@```4-85(0X5*0H5,7N5'
+M9`9@`P(4-8`;Y4C$5`_U0^5*Q%0/]4+E3,14#_5>Y4=D!G!A4T,/@%R%24.%
+M2T*%35[E1V0&<$V`&^5)Q%0/]4/E2\14#_5"Y4W$5`_U7N5'9`9P,.5#5`]$
+M$/5#@";E1V0$8`7E1[0%!D->!'5"">5'M`80Y4-4#T0P]4.`!M)+@`+23.3U
+M)>5"Q%3P_^5#5`]/]5_28"+2%>5')/5@"R3+8`$$A1JPA7"
+MK\($TJ\BPJ^0!!3@5`Y@!-(8@`CE3D5/)/^2&-*OD`04X*+DDAET'O#E7U0/
+M]2WE)7`3,!@%Y5\@Y0LP&1GE7U0P_[\P$>4E<`5U)0R``A4ETFS2;8`/Y5\P
+MY@;";-)M@`32;,)MY4=D`W`A,$L&PFS2;8`8Y25P`S!,$<),Y25P!74E!X`"
+M%272;-)MY4>T"13E1"#C"^4Z9`)@!>4ZM`,$PFS2;>5'M`H3Y3JT`0;";-)M
+M@`CE.G`$TFS";2!I!^5>(.`"LF@@:P?E7B#A`K)J(&T'Y5X@X@*R;'4N0"!I
+M!*)H@"8P:`;E1J+B@!WE7B#B!'\!@`)_`.5&5/#^OO`$?@&``GX`[F\D_Y)S
+MDG(@:P2B:H`F,&H&Y4:BXH`=Y5X@X`1_`8`"?P#E1E3P_K[P!'X!@`)^`.YO
+M)/^2=9)T(&T$HFR`)N5'9`IP(C!L!N5&HN.`%^4ZM`$&Y4:BXX`TY48@Y`,P
+MY0/3@`'#@"8P;`;E1J+B@!WE7B#A!'\!@`)_`.5&5/#^OO`$?@&``GX`[F\D
+M_Y)QDG"0$`#@D!`L\)`0`^##E#!`%*)QDG>B<))VY2X3$U0_]2["=])VD!`O
+MY2[PY4=D!G`YD`(IX%3^\.5#Q%0/%&`,)/Y@#"0#`!.4G]/\"%W[E1V0,8`;E1V0+
+M<'J0`BG@5/WPY3H48"`48"$48"LD_&!%)/E@$B0.<$KE1A,35#]U\`.$Y?"`
+M*=(Y@#KE1C#B`].``<.2.8`MY48PX@U4.,.4,%`&?@!_`8`$?@!_`.Y/)/^2
+M.8`/Y48PX@/3@`'#DCF``L(Y,$<$KR>`!.4G]/^0`BCO\"+E1[0+$)`"*>!4
+MZ_#E)U3K147U)R+DD`(I\#!'!*]%@`3E1?3_D`(H[_`BCU#262*/5-)8(N3U
+M8L*OY5$48$@48&8D`F`#`AC4TEEU50&0`J+@5'_PH^`@YR.0!#3@M`(CX+0"$G\@$A>OD!`$X%3S\'51`0(8U.50<`9U8@,"&-20$@#@5`-P$G\@
+M$A>OD`*BX%2_\'51`@(8U.50<`,"&,^0`J/@,.8#`AC+D`0WX&0B8`,"&,N0
+M`8IT?O"0`9;PD!($=`KPY5BT!$#O"0X"#A\Y`0'."0<"CPD!`=X)!P
+M*?"0$![@D'`J\#!*!Y!P).!$`?#"!=*O(B(B````````````````````````
 M````````````````````````````````````````````````````````````
 M````````````````````````````````````````````````````````````
 M````````````````````````````````````````````````````````````
@@ -219,7 +226,7 @@ M```````````````````````````````````````
 M````````````````````````````````````````````````````````````
 M````````````````````````````````````````````````````````````
 M````````````````````````````````````````````````````````````
-M```````````````````````````````````````````````````````````"
-"F\``
+M```````````````````````````````````````````````````````````1
+"=X$`
 `
 end

Modified: head/sys/dev/usb/wlan/if_run.c
==============================================================================
--- head/sys/dev/usb/wlan/if_run.c	Wed May 12 23:40:44 2010	(r208018)
+++ head/sys/dev/usb/wlan/if_run.c	Thu May 13 00:19:03 2010	(r208019)
@@ -1,5 +1,3 @@
-/*	$FreeBSD$	*/
-
 /*-
  * Copyright (c) 2008,2010 Damien Bergamini 
  * ported to FreeBSD by Akinori Furukoshi 
@@ -39,7 +37,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -74,7 +71,7 @@ __FBSDID("$FreeBSD$");
 #define USB_DEBUG_VAR run_debug
 #include 
 
-#include "if_runreg.h"		/* shared with ral(4) */
+#include "if_runreg.h"
 #include "if_runvar.h"
 
 #define nitems(_a)      (sizeof((_a)) / sizeof((_a)[0]))
@@ -93,6 +90,12 @@ SYSCTL_INT(_hw_usb_run, OID_AUTO, debug,
 #define IEEE80211_HAS_ADDR4(wh) \
 	(((wh)->i_fc[1] & IEEE80211_FC1_DIR_MASK) == IEEE80211_FC1_DIR_DSTODS)
 
+/*
+ * Because of LOR in run_key_delete(), use atomic instead.
+ * '& RUN_CMDQ_MASQ' is to loop cmdq[].
+ */
+#define RUN_CMDQ_GET(c)	(atomic_fetchadd_32((c), 1) & RUN_CMDQ_MASQ)
+
 static const struct usb_device_id run_devs[] = {
     { USB_VP(USB_VENDOR_ABOCOM,		USB_PRODUCT_ABOCOM_RT2770) },
     { USB_VP(USB_VENDOR_ABOCOM,		USB_PRODUCT_ABOCOM_RT2870) },
@@ -312,6 +315,7 @@ static struct ieee80211vap *run_vap_crea
 		    const uint8_t bssid[IEEE80211_ADDR_LEN], const uint8_t
 		    mac[IEEE80211_ADDR_LEN]);
 static void	run_vap_delete(struct ieee80211vap *);
+static void	run_cmdq_cb(void *, int);
 static void	run_setup_tx_list(struct run_softc *,
 		    struct run_endpoint_queue *);
 static void	run_unsetup_tx_list(struct run_softc *,
@@ -342,23 +346,24 @@ static struct ieee80211_node *run_node_a
 static int	run_media_change(struct ifnet *);
 static int	run_newstate(struct ieee80211vap *, enum ieee80211_state, int);
 static int	run_wme_update(struct ieee80211com *);
-static void	run_wme_update_cb(void *, int);
+static void	run_wme_update_cb(void *);
 static void	run_key_update_begin(struct ieee80211vap *);
 static void	run_key_update_end(struct ieee80211vap *);
-static int	run_key_set(struct ieee80211vap *, const struct ieee80211_key *,
+static void	run_key_set_cb(void *);
+static int	run_key_set(struct ieee80211vap *, struct ieee80211_key *,
 			    const uint8_t mac[IEEE80211_ADDR_LEN]);
-static int	run_key_delete(struct ieee80211vap *,
-		    const struct ieee80211_key *);
-static void	run_ratectl_start(struct run_softc *, struct ieee80211_node *);
+static void	run_key_delete_cb(void *);
+static int	run_key_delete(struct ieee80211vap *, struct ieee80211_key *);
 static void	run_ratectl_to(void *);
 static void	run_ratectl_cb(void *, int);
+static void	run_drain_fifo(void *);
 static void	run_iter_func(void *, struct ieee80211_node *);
+static void	run_newassoc_cb(void *);
 static void	run_newassoc(struct ieee80211_node *, int);
 static void	run_rx_frame(struct run_softc *, struct mbuf *, uint32_t);
 static void	run_tx_free(struct run_endpoint_queue *pq,
 		    struct run_tx_data *, int);
-static void	run_set_tx_desc(struct run_softc *, struct run_tx_data *,
-		    uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t);
+static void	run_set_tx_desc(struct run_softc *, struct run_tx_data *);
 static int	run_tx(struct run_softc *, struct mbuf *,
 		    struct ieee80211_node *);
 static int	run_tx_mgt(struct run_softc *, struct mbuf *,
@@ -382,11 +387,10 @@ static int	run_set_chan(struct run_softc
 static void	run_set_channel(struct ieee80211com *);
 static void	run_scan_start(struct ieee80211com *);
 static void	run_scan_end(struct ieee80211com *);
-static uint8_t	run_rate2mcs(uint8_t);
 static void	run_update_beacon(struct ieee80211vap *, int);
-static void	run_update_beacon_locked(struct ieee80211vap *, int);
+static void	run_update_beacon_cb(void *);
 static void	run_updateprot(struct ieee80211com *);
-static void	run_usb_timeout_cb(void *, int);
+static void	run_usb_timeout_cb(void *);
 static void	run_reset_livelock(struct run_softc *);
 static void	run_enable_tsf_sync(struct run_softc *);
 static void	run_enable_mrr(struct run_softc *);
@@ -396,6 +400,7 @@ static void	run_set_leds(struct run_soft
 static void	run_set_bssid(struct run_softc *, const uint8_t *);
 static void	run_set_macaddr(struct run_softc *, const uint8_t *);
 static void	run_updateslot(struct ifnet *);
+static void	run_update_mcast(struct ifnet *);
 static int8_t	run_rssi2dbm(struct run_softc *, uint8_t, uint8_t);
 static void	run_update_promisc_locked(struct ifnet *);
 static void	run_update_promisc(struct ifnet *);
@@ -411,7 +416,7 @@ static void	run_stop(void *);
 static void	run_delay(struct run_softc *, unsigned int);
 
 static const struct {
-	uint32_t	reg;
+	uint16_t	reg;
 	uint32_t	val;
 } rt2870_def_mac[] = {
 	RT2870_DEF_MAC
@@ -551,6 +556,7 @@ run_attach(device_t self)
 	    MTX_NETWORK_LOCK, MTX_DEF);
 
 	iface_index = RT2860_IFACE_INDEX;
+
 	error = usbd_transfer_setup(uaa->device, &iface_index,
 	    sc->sc_xfer, run_config, RUN_N_XFER, sc, &sc->sc_mtx);
 	if (error) {
@@ -616,15 +622,15 @@ run_attach(device_t self)
 	ic->ic_ifp = ifp;
 	ic->ic_phytype = IEEE80211_T_OFDM;	/* not only, but not used */
 	ic->ic_opmode = IEEE80211_M_STA;	/* default to BSS mode */
-#if 0
-	ic->ic_state = IEEE80211_S_INIT;
-#endif
+
 	/* set device capabilities */
 	ic->ic_caps =
 	    IEEE80211_C_STA |		/* station mode supported */
 	    IEEE80211_C_MONITOR |	/* monitor mode supported */
 	    IEEE80211_C_IBSS |
 	    IEEE80211_C_HOSTAP |
+	    IEEE80211_C_WDS |		/* 4-address traffic works */
+	    IEEE80211_C_MBSS |
 	    IEEE80211_C_SHPREAMBLE |	/* short preamble supported */
 	    IEEE80211_C_SHSLOT |	/* short slot time supported */
 	    IEEE80211_C_WME |		/* WME */
@@ -671,6 +677,7 @@ run_attach(device_t self)
 	ic->ic_node_alloc = run_node_alloc;
 	ic->ic_newassoc = run_newassoc;
 	//ic->ic_updateslot = run_updateslot;
+	ic->ic_update_mcast = run_update_mcast;
 	ic->ic_wme.wme_update = run_wme_update;
 	ic->ic_raw_xmit = run_raw_xmit;
 	ic->ic_update_promisc = run_update_promisc;
@@ -684,6 +691,10 @@ run_attach(device_t self)
 	    &sc->sc_rxtap.wr_ihdr, sizeof(sc->sc_rxtap),
 		RUN_RX_RADIOTAP_PRESENT);
 
+	TASK_INIT(&sc->cmdq_task, 0, run_cmdq_cb, sc);
+	TASK_INIT(&sc->ratectl_task, 0, run_ratectl_cb, sc);
+	callout_init((struct callout *)&sc->ratectl_ch, 1);
+
 	if (bootverbose)
 		ieee80211_announce(ic);
 
@@ -713,6 +724,10 @@ run_detach(device_t self)
 
 	if (ifp) {
 		ic = ifp->if_l2com;
+		/* drain tasks */
+		usb_callout_drain(&sc->ratectl_ch);
+		ieee80211_draintask(ic, &sc->cmdq_task);
+		ieee80211_draintask(ic, &sc->ratectl_task);
 		ieee80211_ifdetach(ic);
 		if_free(ifp);
 	}
@@ -728,41 +743,92 @@ run_vap_create(struct ieee80211com *ic,
     const uint8_t bssid[IEEE80211_ADDR_LEN],
     const uint8_t mac[IEEE80211_ADDR_LEN])
 {
-	struct run_softc *sc = ic->ic_ifp->if_softc;
+	struct ifnet *ifp = ic->ic_ifp;
+	struct run_softc *sc = ifp->if_softc;
 	struct run_vap *rvp;
 	struct ieee80211vap *vap;
+	int i;
 
-	if (!TAILQ_EMPTY(&ic->ic_vaps))         /* only one at a time */
+	if(sc->rvp_cnt >= RUN_VAP_MAX){
+		if_printf(ifp, "number of VAPs maxed out\n");
 		return NULL;
-	sc->sc_rvp = rvp = (struct run_vap *) malloc(sizeof(struct run_vap),
+	}
+
+	switch (opmode) {
+	case IEEE80211_M_STA:
+		/* enable s/w bmiss handling for sta mode */
+		flags |= IEEE80211_CLONE_NOBEACONS; 
+		/* fall though */
+	case IEEE80211_M_IBSS:
+	case IEEE80211_M_MONITOR:
+	case IEEE80211_M_HOSTAP:
+	case IEEE80211_M_MBSS:
+		/* other than WDS vaps, only one at a time */
+		if (!TAILQ_EMPTY(&ic->ic_vaps))
+			return NULL;
+		break;
+	case IEEE80211_M_WDS:
+		TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next){
+			if(vap->iv_opmode != IEEE80211_M_HOSTAP)
+				continue;
+			/* WDS vap's always share the local mac address. */
+			flags &= ~IEEE80211_CLONE_BSSID;
+			break;
+		}
+		if(vap == NULL){
+			if_printf(ifp, "wds only supported in ap mode\n");
+			return NULL;
+		}
+		break;
+	default:
+		if_printf(ifp, "unknown opmode %d\n", opmode);
+		return NULL;
+	}
+
+	rvp = (struct run_vap *) malloc(sizeof(struct run_vap),
 	    M_80211_VAP, M_NOWAIT | M_ZERO);
 	if (rvp == NULL)
 		return NULL;
 	vap = &rvp->vap;
-	/* enable s/w bmiss handling for sta mode */
-	ieee80211_vap_setup(ic, vap, name, unit, opmode,
-	    flags | IEEE80211_CLONE_NOBEACONS, bssid, mac);
+	ieee80211_vap_setup(ic, vap, name, unit, opmode, flags, bssid, mac);
 
 	vap->iv_key_update_begin = run_key_update_begin;
 	vap->iv_key_update_end = run_key_update_end;
-	vap->iv_key_delete = run_key_delete;
-	vap->iv_key_set = run_key_set;
 	vap->iv_update_beacon = run_update_beacon;
+	vap->iv_max_aid = RT2870_WCID_MAX;
+	/*
+	 * To delete the right key from h/w, we need wcid.
+	 * Luckily, there is unused space in ieee80211_key{}, wk_pad,
+	 * and matching wcid will be written into there. So, cast
+	 * some spells to remove 'const' from ieee80211_key{}
+	 */
+	vap->iv_key_delete = (void *)run_key_delete;
+	vap->iv_key_set = (void *)run_key_set;
 
 	/* override state transition machine */
 	rvp->newstate = vap->iv_newstate;
 	vap->iv_newstate = run_newstate;
 
-	TASK_INIT(&rvp->ratectl_task, 0, run_ratectl_cb, rvp);
-	TASK_INIT(&sc->wme_task, 0, run_wme_update_cb, ic);
-	TASK_INIT(&sc->usb_timeout_task, 0, run_usb_timeout_cb, sc);
-	callout_init((struct callout *)&rvp->ratectl_ch, 1);
 	ieee80211_ratectl_init(vap);
 	ieee80211_ratectl_setinterval(vap, 1000 /* 1 sec */);
 
 	/* complete setup */
 	ieee80211_vap_attach(vap, run_media_change, ieee80211_media_status);
-	ic->ic_opmode = opmode;
+
+	/* make sure id is always unique */
+	for(i = 0; i < RUN_VAP_MAX; i++){
+		if((sc->rvp_bmap & 1 << i) == 0){
+			sc->rvp_bmap |= 1 << i;
+			rvp->rvp_id = i;
+			break;
+		}
+	}
+	if(sc->rvp_cnt++ == 0)
+		ic->ic_opmode = opmode;
+
+	DPRINTF("rvp_id=%d bmap=%x rvp_cnt=%d\n",
+	    rvp->rvp_id, sc->rvp_bmap, sc->rvp_cnt);
+
 	return vap;
 }
 
@@ -773,6 +839,7 @@ run_vap_delete(struct ieee80211vap *vap)
 	struct ifnet *ifp;
 	struct ieee80211com *ic;
 	struct run_softc *sc;
+	uint8_t rvp_id;
 
 	if(vap == NULL)
 		return;
@@ -783,19 +850,59 @@ run_vap_delete(struct ieee80211vap *vap)
 	sc = ifp->if_softc;
 
 	RUN_LOCK(sc);
-	sc->sc_rvp->ratectl_run = RUN_RATECTL_OFF;
-	RUN_UNLOCK(sc);
 
-	/* drain them all */
-	usb_callout_drain(&sc->sc_rvp->ratectl_ch);
-	ieee80211_draintask(ic, &sc->sc_rvp->ratectl_task);
-	ieee80211_draintask(ic, &sc->wme_task);
-	ieee80211_draintask(ic, &sc->usb_timeout_task);
+	rvp_id = rvp->rvp_id;
+	sc->ratectl_run &= ~(1 << rvp_id);
+	sc->rvp_bmap &= ~(1 << rvp_id);
+	run_set_region_4(sc, RT2860_SKEY(rvp_id, 0), 0, 128);
+	run_set_region_4(sc, RT2860_BCN_BASE(rvp_id), 0, 512);
+	--sc->rvp_cnt;
+
+	DPRINTF("vap=%p rvp_id=%d bmap=%x rvp_cnt=%d\n",
+	    vap, rvp_id, sc->rvp_bmap, sc->rvp_cnt);
+
+	RUN_UNLOCK(sc);
 
 	ieee80211_ratectl_deinit(vap);
 	ieee80211_vap_detach(vap);
 	free(rvp, M_80211_VAP);
-	sc->sc_rvp = NULL;
+}
+
+/*
+ * There are numbers of functions need to be called in context thread.
+ * Rather than creating taskqueue event for each of those functions,
+ * here is all-for-one taskqueue callback function. This function
+ * gurantees deferred functions are executed in the same order they
+ * were enqueued.
+ * '& RUN_CMDQ_MASQ' is to loop cmdq[].
+ */
+static void
+run_cmdq_cb(void *arg, int pending)
+{
+	struct run_softc *sc = arg;
+	uint8_t i;
+
+	/* call cmdq[].func locked */
+	RUN_LOCK(sc);
+	for(i = sc->cmdq_exec; sc->cmdq[i].func && pending;
+	    i = sc->cmdq_exec, pending--){
+		DPRINTFN(6, "cmdq_exec=%d pending=%d\n", i, pending);
+		if(sc->cmdq_run == RUN_CMDQ_GO){
+			/*
+			 * If arg0 is NULL, callback func needs more
+			 * than one arg. So, pass ptr to cmdq struct.
+			 */
+			if(sc->cmdq[i].arg0)
+				sc->cmdq[i].func(sc->cmdq[i].arg0);
+			else
+				sc->cmdq[i].func(&sc->cmdq[i]);
+		}
+		sc->cmdq[i].arg0 = NULL;
+		sc->cmdq[i].func = NULL;
+		sc->cmdq_exec++;
+		sc->cmdq_exec &= RUN_CMDQ_MASQ;
+	}
+	RUN_UNLOCK(sc);
 }
 
 static void
@@ -1415,6 +1522,7 @@ run_read_eeprom(struct run_softc *sc)
 	DPRINTF("EEPROM RF rev=0x%02x chains=%dT%dR\n",
 	    sc->rf_rev, sc->ntxchains, sc->nrxchains);
 
+	/* check if RF supports automatic Tx access gain control */
 	run_srom_read(sc, RT2860_EEPROM_CONFIG, &val);
 	DPRINTF("EEPROM CFG 0x%04x\n", val);
 	/* check if driver should patch the DAC issue */
@@ -1489,10 +1597,10 @@ run_read_eeprom(struct run_softc *sc)
 	for (ridx = 0; ridx < 5; ridx++) {
 		uint32_t reg;
 
-		run_srom_read(sc, RT2860_EEPROM_RPWR + ridx, &val);
-		reg = (uint32_t)val << 16;
-		run_srom_read(sc, RT2860_EEPROM_RPWR + ridx + 1, &val);
-		reg |= val;
+		run_srom_read(sc, RT2860_EEPROM_RPWR + ridx * 2, &val);
+		reg = val;
+		run_srom_read(sc, RT2860_EEPROM_RPWR + ridx * 2 + 1, &val);
+		reg |= (uint32_t)val << 16;
 
 		sc->txpow20mhz[ridx] = reg;
 		sc->txpow40mhz_2ghz[ridx] = b4inc(reg, delta_2ghz);
@@ -1575,19 +1683,21 @@ run_node_alloc(struct ieee80211vap *vap,
 static int
 run_media_change(struct ifnet *ifp)
 {
+	struct ieee80211vap *vap = ifp->if_softc;
+	struct ieee80211com *ic = vap->iv_ic;
 	const struct ieee80211_txparam *tp;
-	struct run_softc *sc = ifp->if_softc;
-	struct ieee80211com *ic = sc->sc_ifp->if_l2com;
-	struct ieee80211vap *vap = &sc->sc_rvp->vap;
+	struct run_softc *sc = ic->ic_ifp->if_softc;
+	struct run_node	*rn = (void *)vap->iv_bss;
 	uint8_t rate, ridx;
 	int error;
 
 	RUN_LOCK(sc);
 
 	error = ieee80211_media_change(ifp);
-	if (error != ENETRESET)
+	if (error != ENETRESET){
 		RUN_UNLOCK(sc);
 		return error;
+	}
 
 	tp = &vap->iv_txparms[ieee80211_chan2mode(ic->ic_curchan)];
 	if (tp->ucastrate != IEEE80211_FIXED_RATE_NONE) {
@@ -1596,13 +1706,16 @@ run_media_change(struct ifnet *ifp)
 		for (ridx = 0; ridx < RT2860_RIDX_MAX; ridx++)
 			if (rt2860_rates[ridx].rate == rate)
 				break;
-		sc->fixed_ridx = ridx;
+		rn->fix_ridx = ridx;
+		DPRINTF("rate=%d, fix_ridx=%d\n", rate, rn->fix_ridx);
 	}
 
+#if 0
 	if ((ifp->if_flags & IFF_UP) &&
 	    (ifp->if_drv_flags &  IFF_DRV_RUNNING)){
 		run_init_locked(sc);
 	}
+#endif
 
 	RUN_UNLOCK(sc);
 
@@ -1618,8 +1731,11 @@ run_newstate(struct ieee80211vap *vap, e
 	struct run_vap *rvp = RUN_VAP(vap);
 	enum ieee80211_state ostate;
 	struct ieee80211_node *ni;
+	uint32_t sta[3];
 	uint32_t tmp;
-	uint8_t wcid;
+	uint8_t ratectl;
+	uint8_t restart_ratectl = 0;
+	uint8_t bid = 1 << rvp->rvp_id;
 
 	ostate = vap->iv_state;
 	DPRINTF("%s -> %s\n",
@@ -1629,8 +1745,9 @@ run_newstate(struct ieee80211vap *vap, e
 	IEEE80211_UNLOCK(ic);
 	RUN_LOCK(sc);
 
-	sc->sc_rvp->ratectl_run = RUN_RATECTL_OFF;
-	usb_callout_stop(&rvp->ratectl_ch);
+	ratectl = sc->ratectl_run; /* remember current state */
+	sc->ratectl_run = RUN_RATECTL_OFF;
+	usb_callout_stop(&sc->ratectl_ch);
 
 	if (ostate == IEEE80211_S_RUN) {
 		/* turn link LED off */
@@ -1639,8 +1756,16 @@ run_newstate(struct ieee80211vap *vap, e
 
 	switch (nstate) {
 	case IEEE80211_S_INIT:
-		if (ostate == IEEE80211_S_RUN) {
-			/* abort TSF synchronization */
+		restart_ratectl = 1;
+
+		if (ostate != IEEE80211_S_RUN)
+			break;
+
+		ratectl &= ~bid;
+		sc->runbmap &= ~bid;
+
+		/* abort TSF synchronization if there is no vap running */
+		if(--sc->running == 0){
 			run_read(sc, RT2860_BCN_TIME_CFG, &tmp);
 			run_write(sc, RT2860_BCN_TIME_CFG,
 			    tmp & ~(RT2860_BCN_TX_EN | RT2860_TSF_TIMER_EN |
@@ -1648,8 +1773,42 @@ run_newstate(struct ieee80211vap *vap, e
 		}
 		break;
 
+
 	case IEEE80211_S_RUN:
 		ni = vap->iv_bss;
+		if(!(sc->runbmap & bid)){
+			if(sc->running++)
+				restart_ratectl = 1;
+			sc->runbmap |= bid;
+		}
+
+		switch(vap->iv_opmode){
+		case IEEE80211_M_HOSTAP:
+		case IEEE80211_M_MBSS:
+			sc->ap_running |= bid;
+			ic->ic_opmode = vap->iv_opmode;
+			run_update_beacon_cb(vap);
+			break;
+		case IEEE80211_M_IBSS:
+			sc->adhoc_running |= bid;
+			if(!sc->ap_running)
+				ic->ic_opmode = vap->iv_opmode;
+			run_update_beacon_cb(vap);
+			break;
+		case IEEE80211_M_STA:
+			sc->sta_running |= bid;
+			if(!sc->ap_running && !sc->adhoc_running)
+				ic->ic_opmode = vap->iv_opmode;
+
+			/* read statistic counters (clear on read) */
+			run_read_region_1(sc, RT2860_TX_STA_CNT0,
+			    (uint8_t *)sta, sizeof sta);
+
+			break;
+		default:
+			ic->ic_opmode = vap->iv_opmode;
+			break;
+		}
 
 		if (vap->iv_opmode != IEEE80211_M_MONITOR) {
 			run_updateslot(ic->ic_ifp);
@@ -1658,31 +1817,17 @@ run_newstate(struct ieee80211vap *vap, e
 			run_set_basicrates(sc);
 			IEEE80211_ADDR_COPY(sc->sc_bssid, ni->ni_bssid);
 			run_set_bssid(sc, ni->ni_bssid);
-		}
-
-		if (vap->iv_opmode == IEEE80211_M_STA) {
-			/* add BSS entry to the WCID table */
-			wcid = RUN_AID2WCID(ni->ni_associd);
-			run_write_region_1(sc, RT2860_WCID_ENTRY(wcid),
-			    ni->ni_macaddr, IEEE80211_ADDR_LEN);
-		}
-
-		if (vap->iv_opmode == IEEE80211_M_HOSTAP ||
-		    vap->iv_opmode == IEEE80211_M_IBSS)
-			run_update_beacon_locked(vap, 0);
-
-		if (vap->iv_opmode != IEEE80211_M_MONITOR) {
 			run_enable_tsf_sync(sc);
-		} /* else tsf */
 
-		/* enable automatic rate adaptation */
-		tp = &vap->iv_txparms[ieee80211_chan2mode(ic->ic_curchan)];
-		if (tp->ucastrate == IEEE80211_FIXED_RATE_NONE)
-			run_ratectl_start(sc, ni);
+			/* enable automatic rate adaptation */
+			tp = &vap->iv_txparms[ieee80211_chan2mode(ic->ic_curchan)];
+			if (tp->ucastrate == IEEE80211_FIXED_RATE_NONE)
+				ratectl |= bid;
+		}
 
 		/* turn link LED on */
 		run_set_leds(sc, RT2860_LED_RADIO |
-		    (IEEE80211_IS_CHAN_2GHZ(vap->iv_bss->ni_chan) ?
+		    (IEEE80211_IS_CHAN_2GHZ(ic->ic_curchan) ?
 		     RT2860_LED_LINK_2GHZ : RT2860_LED_LINK_5GHZ));
 
 		break;
@@ -1691,34 +1836,26 @@ run_newstate(struct ieee80211vap *vap, e
 		break;
 	}
 
+	/* restart amrr for running VAPs */
+	if((sc->ratectl_run = ratectl) && restart_ratectl)
+		usb_callout_reset(&sc->ratectl_ch, hz, run_ratectl_to, sc);
+
 	RUN_UNLOCK(sc);
 	IEEE80211_LOCK(ic);
 
 	return(rvp->newstate(vap, nstate, arg));
 }
 
-/* another taskqueue, so usbd_do_request() can go sleep */
-static int
-run_wme_update(struct ieee80211com *ic)
-{
-	struct run_softc *sc = ic->ic_ifp->if_softc;
-
-	ieee80211_runtask(ic, &sc->wme_task);
-
-	/* return whatever, upper layer desn't care anyway */
-	return 0;
-}
-
 /* ARGSUSED */
 static void
-run_wme_update_cb(void *arg, int pending)
+run_wme_update_cb(void *arg)
 {
 	struct ieee80211com *ic = arg;
 	struct run_softc *sc = ic->ic_ifp->if_softc;
 	struct ieee80211_wme_state *wmesp = &ic->ic_wme;
 	int aci, error = 0;
 
-	RUN_LOCK(sc);
+	RUN_LOCK_ASSERT(sc, MA_OWNED);
 
 	/* update MAC TX configuration registers */
 	for (aci = 0; aci < WME_NUM_AC; aci++) {
@@ -1761,19 +1898,39 @@ err:
 	if(error)
 		DPRINTF("WME update failed\n");
 
-	RUN_UNLOCK(sc);
 	return;
 }
 
+static int
+run_wme_update(struct ieee80211com *ic)
+{
+	struct run_softc *sc = ic->ic_ifp->if_softc;
+
+	/* sometime called wothout lock */
+	if(mtx_owned(&ic->ic_comlock.mtx)){
+		uint32_t i = RUN_CMDQ_GET(&sc->cmdq_store);
+		DPRINTF("cmdq_store=%d\n", i);
+		sc->cmdq[i].func = run_wme_update_cb;
+		sc->cmdq[i].arg0 = ic;
+		ieee80211_runtask(ic, &sc->cmdq_task);
+		return (0);
+	}
+
+	RUN_LOCK(sc);
+	run_wme_update_cb(ic);
+	RUN_UNLOCK(sc);
+
+	/* return whatever, upper layer desn't care anyway */
+	return (0);
+}
+
 static void
 run_key_update_begin(struct ieee80211vap *vap)
 {
 	/*
-	 * Because run_key_delete() needs special attention
-	 * on lock related operation, lock handling is being done
-	 * differently in run_key_set and _delete.
-	 *
-	 * So, we don't use key_update_begin and _end.
+	 * To avoid out-of-order events, both run_key_set() and
+	 * _delete() are deferred and handled by run_cmdq_cb().
+	 * So, there is nothing we need to do here.
 	 */
 }
 
@@ -1783,37 +1940,31 @@ run_key_update_end(struct ieee80211vap *
 	/* null */
 }
 
-/*
- * return 0 on error
- */
-static int
-run_key_set(struct ieee80211vap *vap, const struct ieee80211_key *k,
-		const uint8_t mac[IEEE80211_ADDR_LEN])
+static void
+run_key_set_cb(void *arg)
 {
+	struct run_cmdq *cmdq = arg;
+	struct ieee80211vap *vap = cmdq->arg1;
+	struct ieee80211_key *k = cmdq->k;
 	struct ieee80211com *ic = vap->iv_ic;
-	struct ifnet *ifp = ic->ic_ifp;
-	struct run_softc *sc = ifp->if_softc;
+	struct run_softc *sc = ic->ic_ifp->if_softc;
 	struct ieee80211_node *ni;
 	uint32_t attr;
 	uint16_t base, associd;
 	uint8_t mode, wcid, txmic, rxmic, iv[8];
-	int error = 0;
 
-	RUN_LOCK(sc);
+	RUN_LOCK_ASSERT(sc, MA_OWNED);
 
 	if(vap->iv_opmode == IEEE80211_M_HOSTAP){

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

From owner-svn-src-head@FreeBSD.ORG  Thu May 13 00:25:31 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5322A106566C;
	Thu, 13 May 2010 00:25:31 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 280308FC18;
	Thu, 13 May 2010 00:25:31 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4D0PVmB068254;
	Thu, 13 May 2010 00:25:31 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4D0PVK2068249;
	Thu, 13 May 2010 00:25:31 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <201005130025.o4D0PVK2068249@svn.freebsd.org>
From: Andrew Thompson 
Date: Thu, 13 May 2010 00:25:31 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r208020 - head/lib/libusb
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 13 May 2010 00:25:31 -0000

Author: thompsa
Date: Thu May 13 00:25:30 2010
New Revision: 208020
URL: http://svn.freebsd.org/changeset/base/208020

Log:
  Fix header file compliancy with libusb 1.0 from sourceforge.
  
  Reported by:	Xiaofan Chen
  Submitted by:	Hans Petter Selasky

Modified:
  head/lib/libusb/libusb.h
  head/lib/libusb/libusb10.c
  head/lib/libusb/libusb10_desc.c
  head/lib/libusb/libusb10_io.c

Modified: head/lib/libusb/libusb.h
==============================================================================
--- head/lib/libusb/libusb.h	Thu May 13 00:19:03 2010	(r208019)
+++ head/lib/libusb/libusb.h	Thu May 13 00:25:30 2010	(r208020)
@@ -178,7 +178,7 @@ enum libusb_debug_level {
 struct libusb_context;
 struct libusb_device;
 struct libusb_transfer;
-struct libusb20_device;
+struct libusb_device_handle;
 
 struct libusb_pollfd {
 	int	fd;
@@ -187,7 +187,7 @@ struct libusb_pollfd {
 
 typedef struct libusb_context libusb_context;
 typedef struct libusb_device libusb_device;
-typedef struct libusb20_device libusb_device_handle;
+typedef struct libusb_device_handle libusb_device_handle;
 typedef struct libusb_pollfd libusb_pollfd;
 typedef void (*libusb_pollfd_added_cb) (int fd, short events, void *user_data);
 typedef void (*libusb_pollfd_removed_cb) (int fd, void *user_data);

Modified: head/lib/libusb/libusb10.c
==============================================================================
--- head/lib/libusb/libusb10.c	Thu May 13 00:19:03 2010	(r208019)
+++ head/lib/libusb/libusb10.c	Thu May 13 00:25:30 2010	(r208020)
@@ -37,6 +37,8 @@
 #include 
 #include 
 
+#define	libusb_device_handle libusb20_device
+
 #include "libusb20.h"
 #include "libusb20_desc.h"
 #include "libusb20_int.h"

Modified: head/lib/libusb/libusb10_desc.c
==============================================================================
--- head/lib/libusb/libusb10_desc.c	Thu May 13 00:19:03 2010	(r208019)
+++ head/lib/libusb/libusb10_desc.c	Thu May 13 00:25:30 2010	(r208020)
@@ -29,6 +29,8 @@
 #include 
 #include 
 
+#define	libusb_device_handle libusb20_device
+
 #include "libusb20.h"
 #include "libusb20_desc.h"
 #include "libusb20_int.h"

Modified: head/lib/libusb/libusb10_io.c
==============================================================================
--- head/lib/libusb/libusb10_io.c	Thu May 13 00:19:03 2010	(r208019)
+++ head/lib/libusb/libusb10_io.c	Thu May 13 00:25:30 2010	(r208020)
@@ -34,6 +34,8 @@
 #include 
 #include 
 
+#define	libusb_device_handle libusb20_device
+
 #include "libusb20.h"
 #include "libusb20_desc.h"
 #include "libusb20_int.h"

From owner-svn-src-head@FreeBSD.ORG  Thu May 13 00:26:30 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5EDA5106566B;
	Thu, 13 May 2010 00:26:30 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 4D7D08FC13;
	Thu, 13 May 2010 00:26:30 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4D0QUr7068519;
	Thu, 13 May 2010 00:26:30 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4D0QUvr068517;
	Thu, 13 May 2010 00:26:30 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <201005130026.o4D0QUvr068517@svn.freebsd.org>
From: Andrew Thompson 
Date: Thu, 13 May 2010 00:26:30 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r208021 - head/lib/libusb
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 13 May 2010 00:26:30 -0000

Author: thompsa
Date: Thu May 13 00:26:30 2010
New Revision: 208021
URL: http://svn.freebsd.org/changeset/base/208021

Log:
  Fix return values for usb_find_busses() and usb_find_devices(). We should try
  to return the actual number of busses and devices.
  
  Reported by:	Mike Tancsa
  Submitted by:	Hans Petter Selaksy

Modified:
  head/lib/libusb/libusb20_compat01.c

Modified: head/lib/libusb/libusb20_compat01.c
==============================================================================
--- head/lib/libusb/libusb20_compat01.c	Thu May 13 00:25:30 2010	(r208020)
+++ head/lib/libusb/libusb20_compat01.c	Thu May 13 00:26:30 2010	(r208021)
@@ -820,7 +820,7 @@ int
 usb_find_busses(void)
 {
 	usb_busses = &usb_global_bus;
-	return (0);
+	return (1);
 }
 
 int
@@ -907,7 +907,7 @@ usb_find_devices(void)
 		LIST_ADD(usb_global_bus.devices, udev);
 	}
 
-	return (0);			/* success */
+	return (devnum - 1);			/* success */
 }
 
 struct usb_device *

From owner-svn-src-head@FreeBSD.ORG  Thu May 13 01:50:29 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id BDEE3106566C;
	Thu, 13 May 2010 01:50:29 +0000 (UTC) (envelope-from imp@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id ABE4E8FC17;
	Thu, 13 May 2010 01:50:29 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4D1oTQa086820;
	Thu, 13 May 2010 01:50:29 GMT (envelope-from imp@svn.freebsd.org)
Received: (from imp@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4D1oTFk086817;
	Thu, 13 May 2010 01:50:29 GMT (envelope-from imp@svn.freebsd.org)
Message-Id: <201005130150.o4D1oTFk086817@svn.freebsd.org>
From: Warner Losh 
Date: Thu, 13 May 2010 01:50:29 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r208022 - in head/sys/mips: adm5120 mips
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 13 May 2010 01:50:29 -0000

Author: imp
Date: Thu May 13 01:50:29 2010
New Revision: 208022
URL: http://svn.freebsd.org/changeset/base/208022

Log:
  Remove some stray ';'s
  
  Submitted by:	marc balmer

Modified:
  head/sys/mips/adm5120/if_admsw.c
  head/sys/mips/mips/elf_machdep.c

Modified: head/sys/mips/adm5120/if_admsw.c
==============================================================================
--- head/sys/mips/adm5120/if_admsw.c	Thu May 13 00:26:30 2010	(r208021)
+++ head/sys/mips/adm5120/if_admsw.c	Thu May 13 01:50:29 2010	(r208022)
@@ -528,7 +528,7 @@ admsw_attach(device_t dev)
 		ifmedia_add(&sc->sc_ifmedia[i], IFM_ETHER|IFM_AUTO, 0, NULL);
 		ifmedia_set(&sc->sc_ifmedia[i], IFM_ETHER|IFM_AUTO);
 
-		ifp = sc->sc_ifnet[i] = if_alloc(IFT_ETHER);;
+		ifp = sc->sc_ifnet[i] = if_alloc(IFT_ETHER);
 
 		/* Setup interface parameters */
 		ifp->if_softc = sc;

Modified: head/sys/mips/mips/elf_machdep.c
==============================================================================
--- head/sys/mips/mips/elf_machdep.c	Thu May 13 00:26:30 2010	(r208021)
+++ head/sys/mips/mips/elf_machdep.c	Thu May 13 01:50:29 2010	(r208022)
@@ -159,7 +159,7 @@ static int
 elf_reloc_internal(linker_file_t lf, Elf_Addr relocbase, const void *data,
     int type, int local, elf_lookup_fn lookup)
 {
-	Elf_Addr *where = (Elf_Addr *)NULL;;
+	Elf_Addr *where = (Elf_Addr *)NULL;
 	Elf_Addr addr;
 	Elf_Addr addend = (Elf_Addr)0;
 	Elf_Word rtype = (Elf_Word)0, symidx;

From owner-svn-src-head@FreeBSD.ORG  Thu May 13 02:03:00 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C44F7106564A;
	Thu, 13 May 2010 02:03:00 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id B20308FC16;
	Thu, 13 May 2010 02:03:00 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4D2305W089608;
	Thu, 13 May 2010 02:03:00 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4D2305O089605;
	Thu, 13 May 2010 02:03:00 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <201005130203.o4D2305O089605@svn.freebsd.org>
From: Andrew Thompson 
Date: Thu, 13 May 2010 02:03:00 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r208023 - head/lib/libusbhid
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 13 May 2010 02:03:00 -0000

Author: thompsa
Date: Thu May 13 02:03:00 2010
New Revision: 208023
URL: http://svn.freebsd.org/changeset/base/208023

Log:
  Use fixed width integer types for parsing the binary hid data.
  
  PR:		usb/146367
  Submitted by:	Hans Petter Selasky

Modified:
  head/lib/libusbhid/data.c
  head/lib/libusbhid/usbhid.h

Modified: head/lib/libusbhid/data.c
==============================================================================
--- head/lib/libusbhid/data.c	Thu May 13 01:50:29 2010	(r208022)
+++ head/lib/libusbhid/data.c	Thu May 13 02:03:00 2010	(r208023)
@@ -34,7 +34,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include "usbhid.h"
 
-int
+int32_t
 hid_get_data(const void *p, const hid_item_t *h)
 {
 	const uint8_t *buf;
@@ -78,12 +78,15 @@ hid_get_data(const void *p, const hid_it
 }
 
 void
-hid_set_data(void *p, const hid_item_t *h, int data)
+hid_set_data(void *p, const hid_item_t *h, int32_t data)
 {
 	uint8_t *buf;
 	uint32_t hpos;
 	uint32_t hsize;
-	int i, end, offs, mask;
+	uint32_t mask;
+	int i;
+	int end;
+	int offs;
 
 	buf = p;
 

Modified: head/lib/libusbhid/usbhid.h
==============================================================================
--- head/lib/libusbhid/usbhid.h	Thu May 13 01:50:29 2010	(r208022)
+++ head/lib/libusbhid/usbhid.h	Thu May 13 02:03:00 2010	(r208023)
@@ -29,7 +29,7 @@
  *
  */
 
-#include 
+#include 
 
 typedef struct report_desc *report_desc_t;
 
@@ -102,7 +102,7 @@ int hid_parse_usage_in_page(const char *
 int hid_parse_usage_page(const char *name);
 
 /* Extracting/insertion of data, data.c: */
-int hid_get_data(const void *p, const hid_item_t *h);
-void hid_set_data(void *p, const hid_item_t *h, int data);
+int32_t hid_get_data(const void *p, const hid_item_t *h);
+void hid_set_data(void *p, const hid_item_t *h, int32_t data);
 
 __END_DECLS

From owner-svn-src-head@FreeBSD.ORG  Thu May 13 03:13:02 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 79C33106566B;
	Thu, 13 May 2010 03:13:02 +0000 (UTC)
	(envelope-from pluknet@gmail.com)
Received: from mail-yw0-f181.google.com (mail-yw0-f181.google.com
	[209.85.211.181])
	by mx1.freebsd.org (Postfix) with ESMTP id D66378FC1D;
	Thu, 13 May 2010 03:13:01 +0000 (UTC)
Received: by ywh11 with SMTP id 11so394979ywh.7
	for ; Wed, 12 May 2010 20:13:01 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:received:received:in-reply-to
	:references:date:message-id:subject:from:to:cc:content-type
	:content-transfer-encoding;
	bh=8koAffvVL226IY4PI7gmgafiAikUpvyXUjNONKhh078=;
	b=nz1YV8EqRGKbuk9TWfmeaI+qpgDMPNp59Q737h8eq5QUrp7PKVOWJ6/odwBkEPOp+p
	4eSC389dSYVAvyqqAhGoCV1MJA71v/tDUyPK4evm4k+zxG6kRQ/1GAdFWvZvgKE940LB
	5HrWEVy9k/2AO8PhfcSRjyOFKKNoqjMf5ME5U=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:in-reply-to:references:date:message-id:subject:from:to
	:cc:content-type:content-transfer-encoding;
	b=TAfw5xxS+89hyZKoaZdAU3sqvHUrPL/gR3gkkahBiS62KlhYHXyAf/QITK5yHgrpGP
	bPuETa57OCRzXfZtX3eFjKY3HFLWL3hVuZk+lTFJt1b+HChRCx3NdwOhEnNijuGD50V3
	15WpCbSi2WCpNwHjFCvMFvL0IeWDaU7v/Ka+g=
MIME-Version: 1.0
Received: by 10.101.203.1 with SMTP id f1mr5434171anq.242.1273720380987; Wed, 
	12 May 2010 20:13:00 -0700 (PDT)
Received: by 10.100.208.9 with HTTP; Wed, 12 May 2010 20:13:00 -0700 (PDT)
In-Reply-To: <201005122120.o4CLK4RE026849@svn.freebsd.org>
References: <201005122120.o4CLK4RE026849@svn.freebsd.org>
Date: Thu, 13 May 2010 07:13:00 +0400
Message-ID: 
From: pluknet 
To: Christian Brueffer 
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r208002 - head
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 13 May 2010 03:13:02 -0000

On 13 May 2010 01:20, Christian Brueffer  wrote:
> Author: brueffer
> Date: Wed May 12 21:20:04 2010
> New Revision: 208002
> URL: http://svn.freebsd.org/changeset/base/208002
>
> Log:
> =A0Note 8.0-RELEASE.
>
> =A0PR: =A0 =A0 =A0 =A0 =A0 143824
> =A0Submitted by: pluknet 
>
> Modified:
> =A0head/UPDATING
>
> Modified: head/UPDATING
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
> --- head/UPDATING =A0 =A0 =A0 Wed May 12 20:58:08 2010 =A0 =A0 =A0 =A0(r2=
08001)
> +++ head/UPDATING =A0 =A0 =A0 Wed May 12 21:20:04 2010 =A0 =A0 =A0 =A0(r2=
08002)
> @@ -83,6 +83,9 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9.
>
> =A0 =A0 =A0 =A0The meanings correspond to the relevant IPv4 variables.
>
> +20091125:
> + =A0 =A0 =A0 8.0-RELEASE.
> +
> =A020091113:
> =A0 =A0 =A0 =A0The default terminal emulation for syscons(4) has been cha=
nged
> =A0 =A0 =A0 =A0from cons25 to xterm on all platforms except pc98. =A0This=
 means

Woops, that should have been committed directly to stable/8, not touching h=
ead.

--=20
wbr,
pluknet

From owner-svn-src-head@FreeBSD.ORG  Thu May 13 03:43:58 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 559DD106566C;
	Thu, 13 May 2010 03:43:58 +0000 (UTC)
	(envelope-from kensmith@buffalo.edu)
Received: from localmailB.acsu.buffalo.edu (localmailB.acsu.buffalo.edu
	[128.205.5.200])
	by mx1.freebsd.org (Postfix) with ESMTP id 143538FC1C;
	Thu, 13 May 2010 03:43:57 +0000 (UTC)
Received: from localmailB.acsu.buffalo.edu (localhost [127.0.0.1])
	by localhost (Postfix) with SMTP id C6D46633;
	Wed, 12 May 2010 23:37:37 -0400 (EDT)
Received: from localmailB.acsu.buffalo.edu (localhost [127.0.0.1])
	by localmailB.acsu.buffalo.edu (Postfix) with ESMTP id 1547E9D0;
	Wed, 12 May 2010 23:37:37 -0400 (EDT)
Received: from mweb2.acsu.buffalo.edu (mweb2.acsu.buffalo.edu [128.205.5.239])
	by localmailB.acsu.buffalo.edu (Prefixe) with ESMTP id 0BA019FB;
	Wed, 12 May 2010 23:37:37 -0400 (EDT)
Received: from ken-smiths-macbook-pro.local (unknown [24.114.252.231])
	by mweb2.acsu.buffalo.edu (Postfix) with ESMTP id AF5B4207AA;
	Wed, 12 May 2010 23:37:36 -0400 (EDT)
Message-ID: <4BEB73FF.8040601@buffalo.edu>
Date: Wed, 12 May 2010 23:37:35 -0400
From: Ken Smith 
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US;
	rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4
MIME-Version: 1.0
To: pluknet 
References: <201005122120.o4CLK4RE026849@svn.freebsd.org>
	
In-Reply-To: 
X-Enigmail-Version: 1.0.1
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-PM-EL-Spam-Prob: : 8%
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, Christian Brueffer 
Subject: Re: svn commit: r208002 - head
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 13 May 2010 03:43:58 -0000

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 5/12/10 11:13 PM, pluknet wrote:
> On 13 May 2010 01:20, Christian Brueffer  wrote:
>> Author: brueffer
>> Date: Wed May 12 21:20:04 2010
>> New Revision: 208002
>> URL: http://svn.freebsd.org/changeset/base/208002
>>
>> Log:
>>  Note 8.0-RELEASE.
>>
>>  PR:           143824
>>  Submitted by: pluknet 
>>
>> Modified:
>>  head/UPDATING
>>
>> Modified: head/UPDATING
>> ==============================================================================
>> --- head/UPDATING       Wed May 12 20:58:08 2010        (r208001)
>> +++ head/UPDATING       Wed May 12 21:20:04 2010        (r208002)
>> @@ -83,6 +83,9 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9.
>>
>>        The meanings correspond to the relevant IPv4 variables.
>>
>> +20091125:
>> +       8.0-RELEASE.
>> +
>>  20091113:
>>        The default terminal emulation for syscons(4) has been changed
>>        from cons25 to xterm on all platforms except pc98.  This means
> 
> Woops, that should have been committed directly to stable/8, not touching head.
> 

Why should it be added to stable/8 when no other release is noted
there?


- -- 
						Ken Smith
- - From there to here, from here to      |       kensmith@buffalo.edu
  there, funny things are everywhere.   |
                      - Theodore Geisel |
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkvrc/8ACgkQ/G14VSmup/ZrrgCeJ40cdyJV/4xY79uN9fcVBj6k
XAYAn2v3JKesJOBgp97ZbkfkRDCDYZbP
=9Aeo
-----END PGP SIGNATURE-----

From owner-svn-src-head@FreeBSD.ORG  Thu May 13 03:52:10 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B0C8A106566C;
	Thu, 13 May 2010 03:52:10 +0000 (UTC)
	(envelope-from pluknet@gmail.com)
Received: from mail-gw0-f54.google.com (mail-gw0-f54.google.com [74.125.83.54])
	by mx1.freebsd.org (Postfix) with ESMTP id 178248FC14;
	Thu, 13 May 2010 03:52:09 +0000 (UTC)
Received: by gwj16 with SMTP id 16so530282gwj.13
	for ; Wed, 12 May 2010 20:52:09 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:received:received:in-reply-to
	:references:date:message-id:subject:from:to:cc:content-type
	:content-transfer-encoding;
	bh=NyUPT/ex0cIwKW7ghlEPYUz2LOosjCyidrfmClg43MM=;
	b=dzB4SeskGrXdg+9TJqAT+wNOqz3Niq/dTkpQxGIN1h8di7Vhv6F6490LVs5c+E7Szo
	q5neT0Tmfas1+5dmOpJxnG/H+av831HyA7Y66v95V0SpGZ1xvzvrY1ou2fJm2jN4Hwa5
	8ER4x9RtbqLdk8nhGO8CGCFgRc2FU+84DlstA=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:in-reply-to:references:date:message-id:subject:from:to
	:cc:content-type:content-transfer-encoding;
	b=AiBu5AtuDazkji/NynHMZkjnr1MOoGJI06WnXwmdRqX6OoCX1SeRnWSBGxWc2h16RV
	2X2bhnJdzGrLMAokMvaMJCYQSyUOKGDlZsHo9tkJsTmYvB0ms9KNluZR0VDh48jSNJJu
	ONob1q9KWnnmFZUf6WAzF/2t3eD41VfE1vDQg=
MIME-Version: 1.0
Received: by 10.101.29.16 with SMTP id g16mr5661302anj.245.1273722728914; Wed, 
	12 May 2010 20:52:08 -0700 (PDT)
Received: by 10.100.208.9 with HTTP; Wed, 12 May 2010 20:52:08 -0700 (PDT)
In-Reply-To: <4BEB73FF.8040601@buffalo.edu>
References: <201005122120.o4CLK4RE026849@svn.freebsd.org>
	
	<4BEB73FF.8040601@buffalo.edu>
Date: Thu, 13 May 2010 07:52:08 +0400
Message-ID: 
From: pluknet 
To: Ken Smith 
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, Christian Brueffer 
Subject: Re: svn commit: r208002 - head
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 13 May 2010 03:52:10 -0000

On 13 May 2010 07:37, Ken Smith  wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 5/12/10 11:13 PM, pluknet wrote:
>> On 13 May 2010 01:20, Christian Brueffer  wrote:
>>> Author: brueffer
>>> Date: Wed May 12 21:20:04 2010
>>> New Revision: 208002
>>> URL: http://svn.freebsd.org/changeset/base/208002
>>>
>>> Log:
>>> =A0Note 8.0-RELEASE.
>>>
>>> =A0PR: =A0 =A0 =A0 =A0 =A0 143824
>>> =A0Submitted by: pluknet 
>>>
>>> Modified:
>>> =A0head/UPDATING
>>>
>>> Modified: head/UPDATING
>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D
>>> --- head/UPDATING =A0 =A0 =A0 Wed May 12 20:58:08 2010 =A0 =A0 =A0 =A0(=
r208001)
>>> +++ head/UPDATING =A0 =A0 =A0 Wed May 12 21:20:04 2010 =A0 =A0 =A0 =A0(=
r208002)
>>> @@ -83,6 +83,9 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9.
>>>
>>> =A0 =A0 =A0 =A0The meanings correspond to the relevant IPv4 variables.
>>>
>>> +20091125:
>>> + =A0 =A0 =A0 8.0-RELEASE.
>>> +
>>> =A020091113:
>>> =A0 =A0 =A0 =A0The default terminal emulation for syscons(4) has been c=
hanged
>>> =A0 =A0 =A0 =A0from cons25 to xterm on all platforms except pc98. =A0Th=
is means
>>
>> Woops, that should have been committed directly to stable/8, not touchin=
g head.
>>
>
> Why should it be added to stable/8 when no other release is noted
> there?
>

No other release is rather not *yet* noted there, I would say, since
that's the first one.
If you look at the previous stable branches, you''ll find a scheme, where e=
ach
stable branch has notes about every releases, besides from that branch only=
.
If that scheme was changed before stable/8, please correct me.

--=20
wbr,
pluknet

From owner-svn-src-head@FreeBSD.ORG  Thu May 13 03:56:58 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 400DD106566B;
	Thu, 13 May 2010 03:56:58 +0000 (UTC)
	(envelope-from brueffer@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 2E74F8FC1B;
	Thu, 13 May 2010 03:56:58 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4D3uwJu015064;
	Thu, 13 May 2010 03:56:58 GMT
	(envelope-from brueffer@svn.freebsd.org)
Received: (from brueffer@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4D3uwc3015062;
	Thu, 13 May 2010 03:56:58 GMT
	(envelope-from brueffer@svn.freebsd.org)
Message-Id: <201005130356.o4D3uwc3015062@svn.freebsd.org>
From: Christian Brueffer 
Date: Thu, 13 May 2010 03:56:58 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r208024 - head/release/doc/en_US.ISO8859-1/hardware
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 13 May 2010 03:56:58 -0000

Author: brueffer
Date: Thu May 13 03:56:57 2010
New Revision: 208024
URL: http://svn.freebsd.org/changeset/base/208024

Log:
  et.4 doesn't have a HARDWARE section. Unbreak the build by manually
  describing the supported et(4) chips.

Modified:
  head/release/doc/en_US.ISO8859-1/hardware/article.sgml

Modified: head/release/doc/en_US.ISO8859-1/hardware/article.sgml
==============================================================================
--- head/release/doc/en_US.ISO8859-1/hardware/article.sgml	Thu May 13 02:03:00 2010	(r208023)
+++ head/release/doc/en_US.ISO8859-1/hardware/article.sgml	Thu May 13 03:56:57 2010	(r208024)
@@ -842,7 +842,8 @@
 
       &hwlist.ep;
 
-      &hwlist.et;
+      Agere ET1310 Gigabit Ethernet adapters
+	(&man.et.4; driver)
 
       &hwlist.ex;
 

From owner-svn-src-head@FreeBSD.ORG  Thu May 13 04:10:06 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 473C8106566C;
	Thu, 13 May 2010 04:10:06 +0000 (UTC)
	(envelope-from kensmith@buffalo.edu)
Received: from localmailA.acsu.buffalo.edu (localmail.buffalo.edu
	[128.205.5.196])
	by mx1.freebsd.org (Postfix) with ESMTP id 046488FC14;
	Thu, 13 May 2010 04:10:05 +0000 (UTC)
Received: from localmailA.acsu.buffalo.edu (localhost [127.0.0.1])
	by localhost (Postfix) with SMTP id 4A557B4E6;
	Thu, 13 May 2010 00:02:17 -0400 (EDT)
Received: from localmailA.acsu.buffalo.edu (localhost [127.0.0.1])
	by localmailA.acsu.buffalo.edu (Postfix) with ESMTP id 7FB7EB4F4;
	Thu, 13 May 2010 00:02:16 -0400 (EDT)
Received: from mweb1.acsu.buffalo.edu (mweb1.acsu.buffalo.edu [128.205.5.238])
	by localmailA.acsu.buffalo.edu (Prefixe) with ESMTP id 76F1CB4EF;
	Thu, 13 May 2010 00:02:16 -0400 (EDT)
Received: from ken-smiths-macbook-pro.local (unknown [24.114.252.231])
	by mweb1.acsu.buffalo.edu (Postfix) with ESMTP id 208635B003A;
	Thu, 13 May 2010 00:02:16 -0400 (EDT)
Message-ID: <4BEB79C6.1050105@buffalo.edu>
Date: Thu, 13 May 2010 00:02:14 -0400
From: Ken Smith 
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US;
	rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4
MIME-Version: 1.0
To: pluknet 
References: <201005122120.o4CLK4RE026849@svn.freebsd.org>	
		
	<4BEB73FF.8040601@buffalo.edu>
	
In-Reply-To: 
X-Enigmail-Version: 1.0.1
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-PM-EL-Spam-Prob: : 8%
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, Christian Brueffer 
Subject: Re: svn commit: r208002 - head
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 13 May 2010 04:10:06 -0000

On 5/12/10 11:52 PM, pluknet wrote:
> On 13 May 2010 07:37, Ken Smith  wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> On 5/12/10 11:13 PM, pluknet wrote:
>>> On 13 May 2010 01:20, Christian Brueffer  wrote:
>>>> Author: brueffer
>>>> Date: Wed May 12 21:20:04 2010
>>>> New Revision: 208002
>>>> URL: http://svn.freebsd.org/changeset/base/208002
>>>>
>>>> Log:
>>>>  Note 8.0-RELEASE.
>>>>
>>>>  PR:           143824
>>>>  Submitted by: pluknet 
>>>>
>>>> Modified:
>>>>  head/UPDATING
>>>>
>>>> Modified: head/UPDATING
>>>> ==============================================================================
>>>> --- head/UPDATING       Wed May 12 20:58:08 2010        (r208001)
>>>> +++ head/UPDATING       Wed May 12 21:20:04 2010        (r208002)
>>>> @@ -83,6 +83,9 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9.
>>>>
>>>>        The meanings correspond to the relevant IPv4 variables.
>>>>
>>>> +20091125:
>>>> +       8.0-RELEASE.
>>>> +
>>>>  20091113:
>>>>        The default terminal emulation for syscons(4) has been changed
>>>>        from cons25 to xterm on all platforms except pc98.  This means
>>>
>>> Woops, that should have been committed directly to stable/8, not touching head.
>>>
>>
>> Why should it be added to stable/8 when no other release is noted
>> there?
>>
> 
> No other release is rather not *yet* noted there, I would say, since
> that's the first one.
> If you look at the previous stable branches, you''ll find a scheme, where each
> stable branch has notes about every releases, besides from that branch only.
> If that scheme was changed before stable/8, please correct me.
> 

Grumble.  Yes you're right.  I forgot that one gets added to
both the releng/X.Y/UPDATING and stable/X/UPDATING.  No previous
mentions of releases because that version of UPDATING had most
recently been on HEAD and that's the one that never gets the
release dates noted on it, just the branch dates.

Sorry, long day...  :-(

-- 
						Ken Smith
- From there to here, from here to      |       kensmith@buffalo.edu
  there, funny things are everywhere.   |
                      - Theodore Geisel |

From owner-svn-src-head@FreeBSD.ORG  Thu May 13 09:59:11 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 03D58106566B;
	Thu, 13 May 2010 09:59:11 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id E70FD8FC23;
	Thu, 13 May 2010 09:59:10 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4D9xAqC094722;
	Thu, 13 May 2010 09:59:10 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4D9xAtJ094720;
	Thu, 13 May 2010 09:59:10 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <201005130959.o4D9xAtJ094720@svn.freebsd.org>
From: Konstantin Belousov 
Date: Thu, 13 May 2010 09:59:10 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r208026 - head/sys/amd64/amd64
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 13 May 2010 09:59:11 -0000

Author: kib
Date: Thu May 13 09:59:10 2010
New Revision: 208026
URL: http://svn.freebsd.org/changeset/base/208026

Log:
  Do not use .extern, it is not strictly needed with gas and it is custom
  to omit it.
  
  Requested by:	bde
  MFC after:	6 days

Modified:
  head/sys/amd64/amd64/apic_vector.S

Modified: head/sys/amd64/amd64/apic_vector.S
==============================================================================
--- head/sys/amd64/amd64/apic_vector.S	Thu May 13 09:26:31 2010	(r208025)
+++ head/sys/amd64/amd64/apic_vector.S	Thu May 13 09:59:10 2010	(r208026)
@@ -41,7 +41,6 @@
 
 #include "assym.s"
 
-	.extern	doreti_iret
 /*
  * I/O Interrupt Entry Point.  Rather than having one entry point for
  * each interrupt source, we use one entry point for each 32-bit word

From owner-svn-src-head@FreeBSD.ORG  Thu May 13 12:07:56 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2C01E106566C;
	Thu, 13 May 2010 12:07:56 +0000 (UTC) (envelope-from uqs@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 16CCE8FC1E;
	Thu, 13 May 2010 12:07:56 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4DC7tX6028462;
	Thu, 13 May 2010 12:07:55 GMT (envelope-from uqs@svn.freebsd.org)
Received: (from uqs@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4DC7tcF028433;
	Thu, 13 May 2010 12:07:55 GMT (envelope-from uqs@svn.freebsd.org)
Message-Id: <201005131207.o4DC7tcF028433@svn.freebsd.org>
From: Ulrich Spoerlein 
Date: Thu, 13 May 2010 12:07:55 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r208027 - in head: lib/libarchive lib/libc/gen
	lib/libc/stdio lib/libc/stdlib lib/libc/string lib/libc/sys
	lib/libpmc lib/msun/man sbin/fsirand sbin/mksnap_ffs
	sbin/mount sbin/mount_msd...
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 13 May 2010 12:07:56 -0000

Author: uqs
Date: Thu May 13 12:07:55 2010
New Revision: 208027
URL: http://svn.freebsd.org/changeset/base/208027

Log:
  mdoc: move CAVEATS, BUGS and SECURITY CONSIDERATIONS sections to the
  bottom of the manpages and order them consistently.
  
  GNU groff doesn't care about the ordering, and doesn't even mention
  CAVEATS and SECURITY CONSIDERATIONS as common sections and where to put
  them.
  
  Found by:	mdocml lint run
  Reviewed by:	ru

Modified:
  head/lib/libarchive/cpio.5
  head/lib/libc/gen/fmtcheck.3
  head/lib/libc/stdio/fgets.3
  head/lib/libc/stdio/printf.3
  head/lib/libc/stdio/tmpnam.3
  head/lib/libc/stdio/wprintf.3
  head/lib/libc/stdlib/realpath.3
  head/lib/libc/string/strcat.3
  head/lib/libc/string/strcpy.3
  head/lib/libc/sys/access.2
  head/lib/libc/sys/execve.2
  head/lib/libc/sys/setuid.2
  head/lib/libpmc/pmc.mips.3
  head/lib/libpmc/pmc.xscale.3
  head/lib/msun/man/fenv.3
  head/sbin/fsirand/fsirand.8
  head/sbin/mksnap_ffs/mksnap_ffs.8
  head/sbin/mount/mount.8
  head/sbin/mount_msdosfs/mount_msdosfs.8
  head/sbin/mount_ntfs/mount_ntfs.8
  head/sbin/mount_reiserfs/mount_reiserfs.8
  head/sbin/mount_std/mount_std.8
  head/sbin/rcorder/rcorder.8
  head/share/man/man4/ae.4
  head/share/man/man4/ahb.4
  head/share/man/man4/amdtemp.4
  head/share/man/man4/ataraid.4
  head/share/man/man4/cpuctl.4
  head/share/man/man4/ed.4
  head/share/man/man4/ef.4
  head/share/man/man4/en.4
  head/share/man/man4/fpa.4
  head/share/man/man4/geom_fox.4
  head/share/man/man4/harp.4
  head/share/man/man4/hatm.4
  head/share/man/man4/hifn.4
  head/share/man/man4/hwpmc.4
  head/share/man/man4/inet.4
  head/share/man/man4/kbdmux.4
  head/share/man/man4/ksyms.4
  head/share/man/man4/man4.i386/cs.4
  head/share/man/man4/man4.i386/ie.4
  head/share/man/man4/man4.i386/mse.4
  head/share/man/man4/man4.i386/pnp.4
  head/share/man/man4/man4.i386/pnpbios.4
  head/share/man/man4/man4.i386/vx.4
  head/share/man/man4/man4.i386/wl.4
  head/share/man/man4/man4.powerpc/snd_ai2s.4
  head/share/man/man4/man4.powerpc/snd_davbus.4
  head/share/man/man4/man4.sparc64/clkbrd.4
  head/share/man/man4/man4.sparc64/creator.4
  head/share/man/man4/man4.sparc64/machfb.4
  head/share/man/man4/man4.sparc64/ofw_console.4
  head/share/man/man4/man4.sparc64/openfirm.4
  head/share/man/man4/man4.sparc64/openprom.4
  head/share/man/man4/natm.4
  head/share/man/man4/nve.4
  head/share/man/man4/patm.4
  head/share/man/man4/psm.4
  head/share/man/man4/splash.4
  head/share/man/man4/syscons.4
  head/share/man/man4/twa.4   (contents, props changed)
  head/share/man/man4/ucom.4
  head/share/man/man4/vkbd.4
  head/share/man/man4/wpi.4
  head/share/man/man5/make.conf.5
  head/share/man/man5/reiserfs.5
  head/share/man/man5/xfs.5
  head/share/man/man9/fail.9
  head/share/man/man9/mbpool.9
  head/sys/boot/forth/loader.conf.5
  head/tools/tools/vimage/vimage.8
  head/usr.bin/bsdiff/bsdiff/bsdiff.1
  head/usr.bin/bsdiff/bspatch/bspatch.1
  head/usr.sbin/adduser/adduser.conf.5
  head/usr.sbin/bluetooth/bthidd/bthidd.8
  head/usr.sbin/bluetooth/rfcomm_pppd/rfcomm_pppd.8
  head/usr.sbin/cpucontrol/cpucontrol.8
  head/usr.sbin/crunch/crunchgen/crunchgen.1
  head/usr.sbin/mount_portalfs/mount_portalfs.8
  head/usr.sbin/moused/moused.8
  head/usr.sbin/mtree/mtree.5
  head/usr.sbin/rtprio/rtprio.1

Modified: head/lib/libarchive/cpio.5
==============================================================================
--- head/lib/libarchive/cpio.5	Thu May 13 09:59:10 2010	(r208026)
+++ head/lib/libarchive/cpio.5	Thu May 13 12:07:55 2010	(r208027)
@@ -268,31 +268,6 @@ data, including ACLs and extended attrib
 entries in cpio archives.
 .Pp
 XXX Others? XXX
-.Sh BUGS
-The
-.Dq CRC
-format is mis-named, as it uses a simple checksum and
-not a cyclic redundancy check.
-.Pp
-The old binary format is limited to 16 bits for user id,
-group id, device, and inode numbers.
-It is limited to 4 gigabyte file sizes.
-.Pp
-The old ASCII format is limited to 18 bits for
-the user id, group id, device, and inode numbers.
-It is limited to 8 gigabyte file sizes.
-.Pp
-The new ASCII format is limited to 4 gigabyte file sizes.
-.Pp
-None of the cpio formats store user or group names,
-which are essential when moving files between systems with
-dissimilar user or group numbering.
-.Pp
-Especially when writing older cpio variants, it may be necessary
-to map actual device/inode values to synthesized values that
-fit the available fields.
-With very large filesystems, this may be necessary even for
-the newer formats.
 .Sh SEE ALSO
 .Xr cpio 1 ,
 .Xr tar 5
@@ -323,3 +298,28 @@ license.
 The character format was adopted as part of
 .St -p1003.1-88 .
 XXX when did "newc" appear?  Who invented it?  When did HP come out with their variant?  When did Sun introduce ACLs and extended attributes? XXX
+.Sh BUGS
+The
+.Dq CRC
+format is mis-named, as it uses a simple checksum and
+not a cyclic redundancy check.
+.Pp
+The old binary format is limited to 16 bits for user id,
+group id, device, and inode numbers.
+It is limited to 4 gigabyte file sizes.
+.Pp
+The old ASCII format is limited to 18 bits for
+the user id, group id, device, and inode numbers.
+It is limited to 8 gigabyte file sizes.
+.Pp
+The new ASCII format is limited to 4 gigabyte file sizes.
+.Pp
+None of the cpio formats store user or group names,
+which are essential when moving files between systems with
+dissimilar user or group numbering.
+.Pp
+Especially when writing older cpio variants, it may be necessary
+to map actual device/inode values to synthesized values that
+fit the available fields.
+With very large filesystems, this may be necessary even for
+the newer formats.

Modified: head/lib/libc/gen/fmtcheck.3
==============================================================================
--- head/lib/libc/gen/fmtcheck.3	Thu May 13 09:59:10 2010	(r208026)
+++ head/lib/libc/gen/fmtcheck.3	Thu May 13 12:07:55 2010	(r208027)
@@ -87,6 +87,12 @@ will return
 .Fa fmt_suspect .
 Otherwise, it will return
 .Fa fmt_default .
+.Sh SEE ALSO
+.Xr printf 3
+.Sh BUGS
+The
+.Fn fmtcheck
+function does not recognize positional parameters.
 .Sh SECURITY CONSIDERATIONS
 Note that the formats may be quite different as long as they accept the
 same arguments.
@@ -100,9 +106,3 @@ is not equivalent to
 .Qq Li %lx
 because
 the first requires an integer and the second requires a long.
-.Sh SEE ALSO
-.Xr printf 3
-.Sh BUGS
-The
-.Fn fmtcheck
-function does not recognize positional parameters.

Modified: head/lib/libc/stdio/fgets.3
==============================================================================
--- head/lib/libc/stdio/fgets.3	Thu May 13 09:59:10 2010	(r208026)
+++ head/lib/libc/stdio/fgets.3	Thu May 13 12:07:55 2010	(r208027)
@@ -128,6 +128,19 @@ may also fail and set
 .Va errno
 for any of the errors specified for the routine
 .Xr getchar 3 .
+.Sh SEE ALSO
+.Xr feof 3 ,
+.Xr ferror 3 ,
+.Xr fgetln 3 ,
+.Xr fgetws 3 ,
+.Xr getline 3
+.Sh STANDARDS
+The functions
+.Fn fgets
+and
+.Fn gets
+conform to
+.St -isoC-99 .
 .Sh SECURITY CONSIDERATIONS
 The
 .Fn gets
@@ -143,16 +156,3 @@ It is strongly suggested that the
 function be used in all cases.
 (See
 the FSA.)
-.Sh SEE ALSO
-.Xr feof 3 ,
-.Xr ferror 3 ,
-.Xr fgetln 3 ,
-.Xr fgetws 3 ,
-.Xr getline 3
-.Sh STANDARDS
-The functions
-.Fn fgets
-and
-.Fn gets
-conform to
-.St -isoC-99 .

Modified: head/lib/libc/stdio/printf.3
==============================================================================
--- head/lib/libc/stdio/printf.3	Thu May 13 09:59:10 2010	(r208026)
+++ head/lib/libc/stdio/printf.3	Thu May 13 12:07:55 2010	(r208027)
@@ -709,77 +709,6 @@ char *newfmt(const char *fmt, ...)
 	return (p);
 }
 .Ed
-.Sh SECURITY CONSIDERATIONS
-The
-.Fn sprintf
-and
-.Fn vsprintf
-functions are easily misused in a manner which enables malicious users
-to arbitrarily change a running program's functionality through
-a buffer overflow attack.
-Because
-.Fn sprintf
-and
-.Fn vsprintf
-assume an infinitely long string,
-callers must be careful not to overflow the actual space;
-this is often hard to assure.
-For safety, programmers should use the
-.Fn snprintf
-interface instead.
-For example:
-.Bd -literal
-void
-foo(const char *arbitrary_string, const char *and_another)
-{
-	char onstack[8];
-
-#ifdef BAD
-	/*
-	 * This first sprintf is bad behavior.  Do not use sprintf!
-	 */
-	sprintf(onstack, "%s, %s", arbitrary_string, and_another);
-#else
-	/*
-	 * The following two lines demonstrate better use of
-	 * snprintf().
-	 */
-	snprintf(onstack, sizeof(onstack), "%s, %s", arbitrary_string,
-	    and_another);
-#endif
-}
-.Ed
-.Pp
-The
-.Fn printf
-and
-.Fn sprintf
-family of functions are also easily misused in a manner
-allowing malicious users to arbitrarily change a running program's
-functionality by either causing the program
-to print potentially sensitive data
-.Dq "left on the stack" ,
-or causing it to generate a memory fault or bus error
-by dereferencing an invalid pointer.
-.Pp
-.Cm %n
-can be used to write arbitrary data to potentially carefully-selected
-addresses.
-Programmers are therefore strongly advised to never pass untrusted strings
-as the
-.Fa format
-argument, as an attacker can put format specifiers in the string
-to mangle your stack,
-leading to a possible security hole.
-This holds true even if the string was built using a function like
-.Fn snprintf ,
-as the resulting string may still contain user-supplied conversion specifiers
-for later interpolation by
-.Fn printf .
-.Pp
-Always use the proper secure idiom:
-.Pp
-.Dl "snprintf(buffer, sizeof(buffer), \*q%s\*q, string);"
 .Sh COMPATIBILITY
 Many application writers used the name
 .Va dprintf
@@ -906,3 +835,74 @@ The
 family of functions do not correctly handle multibyte characters in the
 .Fa format
 argument.
+.Sh SECURITY CONSIDERATIONS
+The
+.Fn sprintf
+and
+.Fn vsprintf
+functions are easily misused in a manner which enables malicious users
+to arbitrarily change a running program's functionality through
+a buffer overflow attack.
+Because
+.Fn sprintf
+and
+.Fn vsprintf
+assume an infinitely long string,
+callers must be careful not to overflow the actual space;
+this is often hard to assure.
+For safety, programmers should use the
+.Fn snprintf
+interface instead.
+For example:
+.Bd -literal
+void
+foo(const char *arbitrary_string, const char *and_another)
+{
+	char onstack[8];
+
+#ifdef BAD
+	/*
+	 * This first sprintf is bad behavior.  Do not use sprintf!
+	 */
+	sprintf(onstack, "%s, %s", arbitrary_string, and_another);
+#else
+	/*
+	 * The following two lines demonstrate better use of
+	 * snprintf().
+	 */
+	snprintf(onstack, sizeof(onstack), "%s, %s", arbitrary_string,
+	    and_another);
+#endif
+}
+.Ed
+.Pp
+The
+.Fn printf
+and
+.Fn sprintf
+family of functions are also easily misused in a manner
+allowing malicious users to arbitrarily change a running program's
+functionality by either causing the program
+to print potentially sensitive data
+.Dq "left on the stack" ,
+or causing it to generate a memory fault or bus error
+by dereferencing an invalid pointer.
+.Pp
+.Cm %n
+can be used to write arbitrary data to potentially carefully-selected
+addresses.
+Programmers are therefore strongly advised to never pass untrusted strings
+as the
+.Fa format
+argument, as an attacker can put format specifiers in the string
+to mangle your stack,
+leading to a possible security hole.
+This holds true even if the string was built using a function like
+.Fn snprintf ,
+as the resulting string may still contain user-supplied conversion specifiers
+for later interpolation by
+.Fn printf .
+.Pp
+Always use the proper secure idiom:
+.Pp
+.Dl "snprintf(buffer, sizeof(buffer), \*q%s\*q, string);"

Modified: head/lib/libc/stdio/tmpnam.3
==============================================================================
--- head/lib/libc/stdio/tmpnam.3	Thu May 13 09:59:10 2010	(r208026)
+++ head/lib/libc/stdio/tmpnam.3	Thu May 13 12:07:55 2010	(r208027)
@@ -217,6 +217,17 @@ for any of the errors specified for the 
 .Xr malloc 3
 or
 .Xr mktemp 3 .
+.Sh SEE ALSO
+.Xr mkstemp 3 ,
+.Xr mktemp 3
+.Sh STANDARDS
+The
+.Fn tmpfile
+and
+.Fn tmpnam
+functions
+conform to
+.St -isoC .
 .Sh SECURITY CONSIDERATIONS
 The
 .Fn tmpnam
@@ -235,14 +246,3 @@ It is strongly suggested that
 be used in place of these functions.
 (See
 the FSA.)
-.Sh SEE ALSO
-.Xr mkstemp 3 ,
-.Xr mktemp 3
-.Sh STANDARDS
-The
-.Fn tmpfile
-and
-.Fn tmpnam
-functions
-conform to
-.St -isoC .

Modified: head/lib/libc/stdio/wprintf.3
==============================================================================
--- head/lib/libc/stdio/wprintf.3	Thu May 13 09:59:10 2010	(r208026)
+++ head/lib/libc/stdio/wprintf.3	Thu May 13 12:07:55 2010	(r208027)
@@ -588,9 +588,6 @@ In no case does a non-existent or small 
 a numeric field; if the result of a conversion is wider than the field
 width, the
 field is expanded to contain the conversion result.
-.Sh SECURITY CONSIDERATIONS
-Refer to
-.Xr printf 3 .
 .Sh SEE ALSO
 .Xr btowc 3 ,
 .Xr fputws 3 ,
@@ -616,3 +613,6 @@ and
 functions
 conform to
 .St -isoC-99 .
+.Sh SECURITY CONSIDERATIONS
+Refer to
+.Xr printf 3 .

Modified: head/lib/libc/stdlib/realpath.3
==============================================================================
--- head/lib/libc/stdlib/realpath.3	Thu May 13 09:59:10 2010	(r208026)
+++ head/lib/libc/stdlib/realpath.3	Thu May 13 12:07:55 2010	(r208027)
@@ -109,6 +109,18 @@ for any of the errors specified for the 
 .Xr readlink 2
 and
 .Xr getcwd 3 .
+.Sh SEE ALSO
+.Xr getcwd 3
+.Sh STANDARDS
+The
+.Fn realpath
+function conforms to
+.St -p1003.1-2001 .
+.Sh HISTORY
+The
+.Fn realpath
+function first appeared in
+.Bx 4.4 .
 .Sh CAVEATS
 This implementation of
 .Fn realpath
@@ -121,15 +133,3 @@ under certain circumstances, return a re
 .Fa resolved_path
 when given a relative
 .Fa pathname .
-.Sh "SEE ALSO"
-.Xr getcwd 3
-.Sh STANDARDS
-The
-.Fn realpath
-function conforms to
-.St -p1003.1-2001 .
-.Sh HISTORY
-The
-.Fn realpath
-function first appeared in
-.Bx 4.4 .

Modified: head/lib/libc/string/strcat.3
==============================================================================
--- head/lib/libc/string/strcat.3	Thu May 13 09:59:10 2010	(r208026)
+++ head/lib/libc/string/strcat.3	Thu May 13 12:07:55 2010	(r208027)
@@ -80,6 +80,23 @@ and
 functions
 return the pointer
 .Fa s .
+.Sh SEE ALSO
+.Xr bcopy 3 ,
+.Xr memccpy 3 ,
+.Xr memcpy 3 ,
+.Xr memmove 3 ,
+.Xr strcpy 3 ,
+.Xr strlcat 3 ,
+.Xr strlcpy 3 ,
+.Xr wcscat 3
+.Sh STANDARDS
+The
+.Fn strcat
+and
+.Fn strncat
+functions
+conform to
+.St -isoC .
 .Sh SECURITY CONSIDERATIONS
 The
 .Fn strcat
@@ -138,20 +155,3 @@ foo(const char *arbitrary_string)
 #endif
 }
 .Ed
-.Sh SEE ALSO
-.Xr bcopy 3 ,
-.Xr memccpy 3 ,
-.Xr memcpy 3 ,
-.Xr memmove 3 ,
-.Xr strcpy 3 ,
-.Xr strlcat 3 ,
-.Xr strlcpy 3 ,
-.Xr wcscat 3
-.Sh STANDARDS
-The
-.Fn strcat
-and
-.Fn strncat
-functions
-conform to
-.St -isoC .

Modified: head/lib/libc/string/strcpy.3
==============================================================================
--- head/lib/libc/string/strcpy.3	Thu May 13 09:59:10 2010	(r208026)
+++ head/lib/libc/string/strcpy.3	Thu May 13 12:07:55 2010	(r208027)
@@ -174,16 +174,6 @@ Note that because
 .Xr strlcpy 3
 is not defined in any standards, it should
 only be used when portability is not a concern.
-.Sh SECURITY CONSIDERATIONS
-The
-.Fn strcpy
-function is easily misused in a manner which enables malicious users
-to arbitrarily change a running program's functionality through a
-buffer overflow attack.
-(See
-the FSA
-and
-.Sx EXAMPLES . )
 .Sh SEE ALSO
 .Xr bcopy 3 ,
 .Xr memccpy 3 ,
@@ -214,3 +204,13 @@ and
 .Fn stpncpy
 was added in
 .Fx 8.0 .
+.Sh SECURITY CONSIDERATIONS
+The
+.Fn strcpy
+function is easily misused in a manner which enables malicious users
+to arbitrarily change a running program's functionality through a
+buffer overflow attack.
+(See
+the FSA
+and
+.Sx EXAMPLES . )

Modified: head/lib/libc/sys/access.2
==============================================================================
--- head/lib/libc/sys/access.2	Thu May 13 09:59:10 2010	(r208026)
+++ head/lib/libc/sys/access.2	Thu May 13 12:07:55 2010	(r208027)
@@ -188,6 +188,27 @@ is neither
 .Dv AT_FDCWD
 nor a file descriptor associated with a directory.
 .El
+.Sh SEE ALSO
+.Xr chmod 2 ,
+.Xr intro 2 ,
+.Xr stat 2
+.Sh STANDARDS
+The
+.Fn access
+system call is expected to conform to
+.St -p1003.1-90 .
+The
+.Fn faccessat
+system call follows The Open Group Extended API Set 2 specification.
+.Sh HISTORY
+The
+.Fn access
+function appeared in
+.At v7 .
+The
+.Fn faccessat
+system call appeared in
+.Fx 8.0 .
 .Sh SECURITY CONSIDERATIONS
 The
 .Fn access
@@ -212,24 +233,3 @@ of the st_mode bits that the application
 e.g. in the case of AFS).
 It also allows a cheaper file existence test than
 .Xr stat 2 .
-.Sh SEE ALSO
-.Xr chmod 2 ,
-.Xr intro 2 ,
-.Xr stat 2
-.Sh STANDARDS
-The
-.Fn access
-system call is expected to conform to
-.St -p1003.1-90 .
-The
-.Fn faccessat
-system call follows The Open Group Extended API Set 2 specification.
-.Sh HISTORY
-The
-.Fn access
-function appeared in
-.At v7 .
-The
-.Fn faccessat
-system call appeared in
-.Fx 8.0 .

Modified: head/lib/libc/sys/execve.2
==============================================================================
--- head/lib/libc/sys/execve.2	Thu May 13 09:59:10 2010	(r208026)
+++ head/lib/libc/sys/execve.2	Thu May 13 12:07:55 2010	(r208027)
@@ -313,30 +313,6 @@ The
 .Fa fd
 argument is not a valid file descriptor open for executing.
 .El
-.Sh CAVEATS
-If a program is
-.Em setuid
-to a non-super-user, but is executed when
-the real
-.Em uid
-is ``root'', then the program has some of the powers
-of a super-user as well.
-.Pp
-When executing an interpreted program through
-.Fn fexecve ,
-kernel supplies
-.Pa /dev/fd/n
-as a second argument to the interpreter,
-where
-.Ar n
-is the file descriptor passed in the
-.Fa fd
-argument to
-.Fn fexecve .
-For this construction to work correctly, the
-.Xr fdescfs 5
-filesystem shall be mounted on
-.Pa /dev/fd .
 .Sh SEE ALSO
 .Xr ktrace 1 ,
 .Xr _exit 2 ,
@@ -373,3 +349,27 @@ The
 .Fn fexecve
 system call appeared in
 .Fx 8.0 .
+.Sh CAVEATS
+If a program is
+.Em setuid
+to a non-super-user, but is executed when
+the real
+.Em uid
+is ``root'', then the program has some of the powers
+of a super-user as well.
+.Pp
+When executing an interpreted program through
+.Fn fexecve ,
+kernel supplies
+.Pa /dev/fd/n
+as a second argument to the interpreter,
+where
+.Ar n
+is the file descriptor passed in the
+.Fa fd
+argument to
+.Fn fexecve .
+For this construction to work correctly, the
+.Xr fdescfs 5
+filesystem shall be mounted on
+.Pa /dev/fd .

Modified: head/lib/libc/sys/setuid.2
==============================================================================
--- head/lib/libc/sys/setuid.2	Thu May 13 09:59:10 2010	(r208026)
+++ head/lib/libc/sys/setuid.2	Thu May 13 12:07:55 2010	(r208027)
@@ -124,39 +124,6 @@ The system calls will fail if:
 The user is not the super user and the ID
 specified is not the real, effective ID, or saved ID.
 .El
-.Sh SECURITY CONSIDERATIONS
-Read and write permissions to files are determined upon a call to
-.Xr open 2 .
-Once a file descriptor is open, dropping privilege does not affect
-the process's read/write permissions, even if the user ID specified
-has no read or write permissions to the file.
-These files normally remain open in any new process executed,
-resulting in a user being able to read or modify
-potentially sensitive data.
-.Pp
-To prevent these files from remaining open after an
-.Xr exec 3
-call, be sure to set the close-on-exec flag is set:
-.Bd -literal
-void
-pseudocode(void)
-{
-	int fd;
-	/* ... */
-
-	fd = open("/path/to/sensitive/data", O_RDWR);
-	if (fd == -1)
-		err(1, "open");
-
-	/*
-	 * Set close-on-exec flag; see fcntl(2) for more information.
-	 */
-	if (fcntl(fd, F_SETFD, FD_CLOEXEC) == -1)
-		err(1, "fcntl(F_SETFD)");
-	/* ... */
-	execve(path, argv, environ);
-}
-.Ed
 .Sh SEE ALSO
 .Xr getgid 2 ,
 .Xr getuid 2 ,
@@ -191,3 +158,36 @@ and
 .Fn setgid
 functions appeared in
 .At v7 .
+.Sh SECURITY CONSIDERATIONS
+Read and write permissions to files are determined upon a call to
+.Xr open 2 .
+Once a file descriptor is open, dropping privilege does not affect
+the process's read/write permissions, even if the user ID specified
+has no read or write permissions to the file.
+These files normally remain open in any new process executed,
+resulting in a user being able to read or modify
+potentially sensitive data.
+.Pp
+To prevent these files from remaining open after an
+.Xr exec 3
+call, be sure to set the close-on-exec flag is set:
+.Bd -literal
+void
+pseudocode(void)
+{
+	int fd;
+	/* ... */
+
+	fd = open("/path/to/sensitive/data", O_RDWR);
+	if (fd == -1)
+		err(1, "open");
+
+	/*
+	 * Set close-on-exec flag; see fcntl(2) for more information.
+	 */
+	if (fcntl(fd, F_SETFD, FD_CLOEXEC) == -1)
+		err(1, "fcntl(F_SETFD)");
+	/* ... */
+	execve(path, argv, environ);
+}
+.Ed

Modified: head/lib/libpmc/pmc.mips.3
==============================================================================
--- head/lib/libpmc/pmc.mips.3	Thu May 13 09:59:10 2010	(r208026)
+++ head/lib/libpmc/pmc.mips.3	Thu May 13 12:07:55 2010	(r208027)
@@ -392,8 +392,6 @@ and the underlying hardware events used.
 .Xr pmc_cpuinfo 3 ,
 .Xr pmclog 3 ,
 .Xr hwpmc 4
-.Sh CAVEATS
-The MIPS code does not yet support sampling.
 .Sh HISTORY
 The
 .Nm pmc
@@ -408,3 +406,5 @@ library was written by
 MIPS support was added by
 .An "George Neville-Neil"
 .Aq gnn@FreeBSD.org .
+.Sh CAVEATS
+The MIPS code does not yet support sampling.

Modified: head/lib/libpmc/pmc.xscale.3
==============================================================================
--- head/lib/libpmc/pmc.xscale.3	Thu May 13 09:59:10 2010	(r208026)
+++ head/lib/libpmc/pmc.xscale.3	Thu May 13 12:07:55 2010	(r208027)
@@ -135,8 +135,6 @@ and the underlying hardware events used.
 .Xr pmc_cpuinfo 3 ,
 .Xr pmclog 3 ,
 .Xr hwpmc 4
-.Sh CAVEATS
-The Intel XScale code does not yet support sampling.
 .Sh HISTORY
 The
 .Nm pmc
@@ -154,3 +152,5 @@ library was written by
 Intel XScale support was added by
 .An "Rui Paulo"
 .Aq rpaulo@FreeBSD.org .
+.Sh CAVEATS
+The Intel XScale code does not yet support sampling.

Modified: head/lib/msun/man/fenv.3
==============================================================================
--- head/lib/msun/man/fenv.3	Thu May 13 09:59:10 2010	(r208026)
+++ head/lib/msun/man/fenv.3	Thu May 13 12:07:55 2010	(r208027)
@@ -196,18 +196,6 @@ environment.
 The macro
 .Dv FE_DFL_ENV
 expands to a pointer to the default environment.
-.Sh CAVEATS
-The FENV_ACCESS pragma can be enabled with
-.Dl "#pragma STDC FENV_ACCESS ON"
-and disabled with the
-.Dl "#pragma STDC FENV_ACCESS OFF"
-directive.
-This lexically-scoped annotation tells the compiler that the program
-may access the floating-point environment, so optimizations that would
-violate strict IEEE-754 semantics are disabled.
-If execution reaches a block of code for which
-.Dv FENV_ACCESS
-is off, the floating-point environment will become undefined.
 .Sh EXAMPLES
 The following routine computes the square root function.
 It explicitly raises an invalid exception on appropriate inputs using
@@ -274,6 +262,18 @@ It supersedes the non-standard routines 
 .In ieeefp.h
 and documented in
 .Xr fpgetround 3 .
+.Sh CAVEATS
+The FENV_ACCESS pragma can be enabled with
+.Dl "#pragma STDC FENV_ACCESS ON"
+and disabled with the
+.Dl "#pragma STDC FENV_ACCESS OFF"
+directive.
+This lexically-scoped annotation tells the compiler that the program
+may access the floating-point environment, so optimizations that would
+violate strict IEEE-754 semantics are disabled.
+If execution reaches a block of code for which
+.Dv FENV_ACCESS
+is off, the floating-point environment will become undefined.
 .Sh BUGS
 The
 .Dv FENV_ACCESS

Modified: head/sbin/fsirand/fsirand.8
==============================================================================
--- head/sbin/fsirand/fsirand.8	Thu May 13 09:59:10 2010	(r208026)
+++ head/sbin/fsirand/fsirand.8	Thu May 13 12:07:55 2010	(r208027)
@@ -88,12 +88,6 @@ is not marked as clean.
 Print the current generation numbers for all inodes instead of
 generating new ones.
 .El
-.Sh CAVEATS
-Since
-.Nm
-allocates enough memory to hold all the inodes in
-a given cylinder group it may use a large amount
-of memory for large disks with few cylinder groups.
 .Sh SEE ALSO
 .Xr fs 5 ,
 .Xr fsck 8 ,
@@ -114,3 +108,9 @@ version first appeared in
 .Fx 2.2.5 .
 .Sh AUTHORS
 .An Todd C. Miller Aq Todd.Miller@courtesan.com
+.Sh CAVEATS
+Since
+.Nm
+allocates enough memory to hold all the inodes in
+a given cylinder group it may use a large amount
+of memory for large disks with few cylinder groups.

Modified: head/sbin/mksnap_ffs/mksnap_ffs.8
==============================================================================
--- head/sbin/mksnap_ffs/mksnap_ffs.8	Thu May 13 09:59:10 2010	(r208026)
+++ head/sbin/mksnap_ffs/mksnap_ffs.8	Thu May 13 12:07:55 2010	(r208027)
@@ -71,11 +71,11 @@ mount -o ro /dev/md0 /mnt/
 .Xr chown 8 ,
 .Xr mdconfig 8 ,
 .Xr mount 8
-.Sh CAVEATS
-The disk full situation is not handled gracefully and may
-lead to a system panic when no free blocks are found.
 .Sh HISTORY
 The
 .Nm
 utility first appeared in
 .Fx 5.0 .
+.Sh CAVEATS
+The disk full situation is not handled gracefully and may
+lead to a system panic when no free blocks are found.

Modified: head/sbin/mount/mount.8
==============================================================================
--- head/sbin/mount/mount.8	Thu May 13 09:59:10 2010	(r208026)
+++ head/sbin/mount/mount.8	Thu May 13 12:07:55 2010	(r208027)
@@ -542,6 +542,11 @@ support for a particular file system mig
 .Xr umount 8 ,
 .Xr zfs 8 ,
 .Xr zpool 8
+.Sh HISTORY
+A
+.Nm
+utility appeared in
+.At v1 .
 .Sh CAVEATS
 After a successful
 .Nm ,
@@ -564,10 +569,5 @@ gets a
 signal (that causes an update of the export list)
 only when the file system is mounted via
 .Nm .
-.Sh HISTORY
-A
-.Nm
-utility appeared in
-.At v1 .
 .Sh BUGS
 It is possible for a corrupted file system to cause a crash.

Modified: head/sbin/mount_msdosfs/mount_msdosfs.8
==============================================================================
--- head/sbin/mount_msdosfs/mount_msdosfs.8	Thu May 13 09:59:10 2010	(r208026)
+++ head/sbin/mount_msdosfs/mount_msdosfs.8	Thu May 13 12:07:55 2010	(r208027)
@@ -199,12 +199,6 @@ To mount a Japanese MS-DOS file system l
 .Pp
 List of Localized MS Operating Systems:
 .Pa http://www.microsoft.com/globaldev/reference/oslocversion.mspx .
-.Sh CAVEATS
-The use of the
-.Fl 9
-flag could result in damaged file systems,
-albeit the damage is in part taken care of by
-procedures similar to the ones used in Win'95.
 .Sh HISTORY
 The
 .Nm
@@ -221,3 +215,9 @@ of the more aptly-named
 The character code conversion routine was added by
 .An Ryuichiro Imura Aq imura@ryu16.org
 at 2003.
+.Sh CAVEATS
+The use of the
+.Fl 9
+flag could result in damaged file systems,
+albeit the damage is in part taken care of by
+procedures similar to the ones used in Win'95.

Modified: head/sbin/mount_ntfs/mount_ntfs.8
==============================================================================
--- head/sbin/mount_ntfs/mount_ntfs.8	Thu May 13 09:59:10 2010	(r208026)
+++ head/sbin/mount_ntfs/mount_ntfs.8	Thu May 13 12:07:55 2010	(r208027)
@@ -149,14 +149,6 @@ The file name must not contain multibyte
 .Xr fstab 5 ,
 .Xr mount 8 ,
 .Xr mount_msdosfs 8
-.Sh CAVEATS
-This utility is primarily used for read access to an NTFS volume.
-See the
-.Sx WRITING
-section for details about writing to an NTFS volume.
-.Pp
-For a full read-write NTFS support consider sysutils/fusefs-ntfs
-port/package.
 .Sh HISTORY
 The
 .Nm
@@ -171,3 +163,11 @@ The NTFS kernel implementation,
 .Nm
 utility, and manual were written by
 .An Semen Ustimenko Aq semenu@FreeBSD.org .
+.Sh CAVEATS
+This utility is primarily used for read access to an NTFS volume.
+See the
+.Sx WRITING
+section for details about writing to an NTFS volume.
+.Pp
+For a full read-write NTFS support consider sysutils/fusefs-ntfs
+port/package.

Modified: head/sbin/mount_reiserfs/mount_reiserfs.8
==============================================================================
--- head/sbin/mount_reiserfs/mount_reiserfs.8	Thu May 13 09:59:10 2010	(r208026)
+++ head/sbin/mount_reiserfs/mount_reiserfs.8	Thu May 13 12:07:55 2010	(r208027)
@@ -66,9 +66,6 @@ To mount a ReiserFS volume located in
 .Xr unmount 2 ,
 .Xr fstab 5 ,
 .Xr mount 8
-.Sh CAVEATS
-This utility is primarily used for read access to a ReiserFS volume.
-Writing to a volume is currently unsupported.
 .Sh HISTORY
 The
 .Nm
@@ -88,3 +85,6 @@ The
 .Nm
 utility and manual were written by
 .An Jean-S\['e]bastien P\['e]dron Aq dumbbell@FreeBSD.org .
+.Sh CAVEATS
+This utility is primarily used for read access to a ReiserFS volume.
+Writing to a volume is currently unsupported.

Modified: head/sbin/mount_std/mount_std.8
==============================================================================
--- head/sbin/mount_std/mount_std.8	Thu May 13 09:59:10 2010	(r208026)
+++ head/sbin/mount_std/mount_std.8	Thu May 13 12:07:55 2010	(r208027)
@@ -142,8 +142,6 @@ loadable module for it was found.
 .Xr linprocfs 5 ,
 .Xr procfs 5 ,
 .Xr mount 8
-.Sh CAVEATS
-None of the ``standard'' file systems may be NFS-exported.
 .Sh HISTORY
 The
 .Nm
@@ -165,3 +163,5 @@ the
 .Dq linprocfs
 file system type first appeared in
 .Fx 4.0 .
+.Sh CAVEATS
+None of the ``standard'' file systems may be NFS-exported.

Modified: head/sbin/rcorder/rcorder.8
==============================================================================
--- head/sbin/rcorder/rcorder.8	Thu May 13 09:59:10 2010	(r208026)
+++ head/sbin/rcorder/rcorder.8	Thu May 13 12:07:55 2010	(r208027)
@@ -152,6 +152,19 @@ processing the stated condition.
 A set of files has a circular dependency which was detected while
 processing the stated file.
 .El
+.Sh SEE ALSO
+.Xr rc 8
+.Sh HISTORY
+The
+.Nm
+utility first appeared in
+.Nx 1.5 .
+.Sh AUTHORS
+.An -nosplit
+Written by
+.An Perry E. Metzger Aq perry@piermont.com
+and
+.An Matthew R. Green Aq mrg@eterna.com.au .
 .Sh BUGS
 The
 .Dq Li REQUIRE
@@ -171,16 +184,3 @@ script in the dependency ordering,
 not necessarily that it requires
 .Xr named 8
 to be started or enabled.
-.Sh SEE ALSO
-.Xr rc 8
-.Sh HISTORY
-The
-.Nm
-utility first appeared in
-.Nx 1.5 .
-.Sh AUTHORS
-.An -nosplit
-Written by
-.An Perry E. Metzger Aq perry@piermont.com
-and
-.An Matthew R. Green Aq mrg@eterna.com.au .

Modified: head/share/man/man4/ae.4
==============================================================================
--- head/share/man/man4/ae.4	Thu May 13 09:59:10 2010	(r208026)
+++ head/share/man/man4/ae.4	Thu May 13 12:07:55 2010	(r208027)
@@ -133,6 +133,14 @@ instead.
 .Xr ng_ether 4 ,
 .Xr vlan 4 ,
 .Xr ifconfig 8
+.Sh HISTORY
+The
+.Nm
+driver and this manual page was written by
+.An Stanislav Sedov
+.Aq stas@FreeBSD.org .
+It first appeared in
+.Fx 7.1 .
 .Sh BUGS
 The Attansic L2 FastEthernet contoller supports DMA but does not use a
 descriptor based transfer mechanism via scatter-gather DMA.
@@ -142,11 +150,3 @@ Furthermore, a lot of data alignment res
 This may introduce a high CPU load on systems with heavy network activity.
 Luckily enough this should not be a problem on modern hardware as L2 does
 not support speeds faster than 100Mbps.
-.Sh HISTORY
-The
-.Nm
-driver and this manual page was written by
-.An Stanislav Sedov
-.Aq stas@FreeBSD.org .
-It first appeared in
-.Fx 7.1 .

Modified: head/share/man/man4/ahb.4
==============================================================================
--- head/share/man/man4/ahb.4	Thu May 13 09:59:10 2010	(r208026)
+++ head/share/man/man4/ahb.4	Thu May 13 12:07:55 2010	(r208027)
@@ -70,13 +70,6 @@ Adaptec AHA-1740A
 .It
 Adaptec AHA-1742A
 .El
-.Sh CAVEATS
-The Adaptec 174X is very sensitive to SCSI bus termination and cable
-length.
-It may also have difficulties operating with some modern devices
-that, due to their speed, expose timing problems in the controller.
-There are no known mechanisms for working around device incompatibilities of
-this nature.
 .Sh SEE ALSO
 .Xr aha 4 ,
 .Xr ahc 4 ,
@@ -90,3 +83,10 @@ The
 .Nm
 driver was written by
 .An Justin T. Gibbs .
+.Sh CAVEATS
+The Adaptec 174X is very sensitive to SCSI bus termination and cable
+length.
+It may also have difficulties operating with some modern devices
+that, due to their speed, expose timing problems in the controller.
+There are no known mechanisms for working around device incompatibilities of
+this nature.

Modified: head/share/man/man4/amdtemp.4
==============================================================================
--- head/share/man/man4/amdtemp.4	Thu May 13 09:59:10 2010	(r208026)
+++ head/share/man/man4/amdtemp.4	Thu May 13 12:07:55 2010	(r208027)
@@ -64,9 +64,6 @@ located in each CPU core.
 For the K10 and K11 families, the driver creates
 .Va dev.cpu.%d.temperature
 with the temperature of each core.
-.Sh BUGS
-AMD K9 is not supported because temperature reporting has been replaced
-by Maltese.
 .Sh SEE ALSO
 .Xr sysctl 8
 .Sh HISTORY
@@ -77,3 +74,6 @@ driver first appeared in
 .Sh AUTHORS
 .An Rui Paulo Aq rpaulo@FreeBSD.org
 .An Norikatsu Shigemura Aq nork@FreeBSD.org
+.Sh BUGS
+AMD K9 is not supported because temperature reporting has been replaced
+by Maltese.

Modified: head/share/man/man4/ataraid.4
==============================================================================
--- head/share/man/man4/ataraid.4	Thu May 13 09:59:10 2010	(r208026)
+++ head/share/man/man4/ataraid.4	Thu May 13 12:07:55 2010	(r208027)
@@ -135,9 +135,6 @@ ATA RAID device nodes
 .Sh SEE ALSO
 .Xr ata 4 ,
 .Xr atacontrol 8
-.Sh CAVEATS

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

From owner-svn-src-head@FreeBSD.ORG  Thu May 13 12:08:11 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id AF8B51065687;
	Thu, 13 May 2010 12:08:11 +0000 (UTC) (envelope-from uqs@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 9ACEA8FC21;
	Thu, 13 May 2010 12:08:11 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4DC8B04028588;
	Thu, 13 May 2010 12:08:11 GMT (envelope-from uqs@svn.freebsd.org)
Received: (from uqs@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4DC8B9d028562;
	Thu, 13 May 2010 12:08:11 GMT (envelope-from uqs@svn.freebsd.org)
Message-Id: <201005131208.o4DC8B9d028562@svn.freebsd.org>
From: Ulrich Spoerlein 
Date: Thu, 13 May 2010 12:08:11 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r208028 - in head: lib/msun/man sbin/hastctl sbin/hastd
	share/man/man3 share/man/man4 share/man/man5 share/man/man9
	usr.bin/killall usr.bin/setchannel usr.bin/tar
	usr.bin/wtmpcvt usr.sb...
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 13 May 2010 12:08:11 -0000

Author: uqs
Date: Thu May 13 12:08:11 2010
New Revision: 208028
URL: http://svn.freebsd.org/changeset/base/208028

Log:
  mdoc: move remaining sections into consistent order
  
  This pertains mostly to FILES, HISTORY, EXIT STATUS and AUTHORS sections.
  
  Found by:	mdocml lint run
  Reviewed by:	ru

Modified:
  head/lib/msun/man/hypot.3
  head/sbin/hastctl/hastctl.8
  head/sbin/hastd/hast.conf.5
  head/sbin/hastd/hastd.8
  head/share/man/man3/fpgetround.3
  head/share/man/man4/cmx.4
  head/share/man/man4/uhso.4
  head/share/man/man5/boot.config.5
  head/share/man/man5/fdescfs.5
  head/share/man/man5/linsysfs.5
  head/share/man/man9/namei.9
  head/share/man/man9/uio.9
  head/usr.bin/killall/killall.1
  head/usr.bin/setchannel/setchannel.1
  head/usr.bin/tar/bsdtar.1
  head/usr.bin/wtmpcvt/wtmpcvt.1
  head/usr.sbin/bluetooth/btpand/btpand.8
  head/usr.sbin/bluetooth/sdpcontrol/sdpcontrol.8
  head/usr.sbin/mptutil/mptutil.8
  head/usr.sbin/newsyslog/newsyslog.8
  head/usr.sbin/pkg_install/updating/pkg_updating.1
  head/usr.sbin/rtadvd/rtadvd.8
  head/usr.sbin/rtsold/rtsold.8
  head/usr.sbin/sa/sa.8
  head/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.conf.5

Modified: head/lib/msun/man/hypot.3
==============================================================================
--- head/lib/msun/man/hypot.3	Thu May 13 12:07:55 2010	(r208027)
+++ head/lib/msun/man/hypot.3	Thu May 13 12:08:11 2010	(r208028)
@@ -124,14 +124,6 @@ disappear when it turns out to be irrele
 .Xr carg 3 ,
 .Xr math 3 ,
 .Xr sqrt 3
-.Sh HISTORY
-Both a
-.Fn hypot
-function and a
-.Fn cabs
-function
-appeared in
-.At v7 .
 .Sh STANDARDS
 The
 .Fn hypot ,
@@ -143,3 +135,11 @@ and
 .Fn cabsl
 functions conform to
 .St -isoC-99 .
+.Sh HISTORY
+Both a
+.Fn hypot
+function and a
+.Fn cabs
+function
+appeared in
+.At v7 .

Modified: head/sbin/hastctl/hastctl.8
==============================================================================
--- head/sbin/hastctl/hastctl.8	Thu May 13 12:07:55 2010	(r208027)
+++ head/sbin/hastctl/hastctl.8	Thu May 13 12:08:11 2010	(r208028)
@@ -153,6 +153,20 @@ Print debugging information.
 This option can be specified multiple times to raise the verbosity
 level.
 .El
+.Sh FILES
+.Bl -tag -width ".Pa /var/run/hastctl" -compact
+.It Pa /etc/hast.conf
+Configuration file for
+.Nm
+and
+.Xr hastd 8 .
+.It Pa /var/run/hastctl
+Control socket used by
+.Nm
+to communicate with the
+.Xr hastd 8
+daemon.
+.El
 .Sh EXIT STATUS
 Exit status is 0 on success, or one of the values described in
 .Xr sysexits 3
@@ -185,20 +199,6 @@ nodeB# fsck -t ufs /dev/hast/shared
 nodeB# mount -o noatime /dev/hast/shared /shared
 nodeB# application_start
 .Ed
-.Sh FILES
-.Bl -tag -width ".Pa /var/run/hastctl" -compact
-.It Pa /etc/hast.conf
-Configuration file for
-.Nm
-and
-.Xr hastd 8 .
-.It Pa /var/run/hastctl
-Control socket used by
-.Nm
-to communicate with the
-.Xr hastd 8
-daemon.
-.El
 .Sh SEE ALSO
 .Xr sysexits 3 ,
 .Xr geom 4 ,

Modified: head/sbin/hastd/hast.conf.5
==============================================================================
--- head/sbin/hastd/hast.conf.5	Thu May 13 12:07:55 2010	(r208027)
+++ head/sbin/hastd/hast.conf.5	Thu May 13 12:08:11 2010	(r208028)
@@ -224,6 +224,19 @@ the secondary node.
 When operating as a secondary node only connections from this address
 will be accepted.
 .El
+.Sh FILES
+.Bl -tag -width ".Pa /var/run/hastctl" -compact
+.It Pa /etc/hast.conf
+The default
+.Nm
+configuration file.
+.It Pa /var/run/hastctl
+Control socket used by the
+.Xr hastctl 8
+control utility to communicate with the
+.Xr hastd 8
+daemon.
+.El
 .Sh EXAMPLES
 The example configuration file can look as follows:
 .Bd -literal -offset indent
@@ -248,19 +261,6 @@ resource tank {
 	}
 }
 .Ed
-.Sh FILES
-.Bl -tag -width ".Pa /var/run/hastctl" -compact
-.It Pa /etc/hast.conf
-The default
-.Nm
-configuration file.
-.It Pa /var/run/hastctl
-Control socket used by the
-.Xr hastctl 8
-control utility to communicate with the
-.Xr hastd 8
-daemon.
-.El
 .Sh SEE ALSO
 .Xr gethostname 3 ,
 .Xr geom 4 ,

Modified: head/sbin/hastd/hastd.8
==============================================================================
--- head/sbin/hastd/hastd.8	Thu May 13 12:07:55 2010	(r208027)
+++ head/sbin/hastd/hastd.8	Thu May 13 12:08:11 2010	(r208028)
@@ -170,6 +170,23 @@ stored.
 The default location is
 .Pa /var/run/hastd.pid .
 .El
+.Sh FILES
+.Bl -tag -width ".Pa /var/run/hastctl" -compact
+.It Pa /etc/hast.conf
+The configuration file for
+.Nm
+and
+.Xr hastctl 8 .
+.It Pa /var/run/hastctl
+Control socket used by the
+.Xr hastctl 8
+control utility to communicate with
+.Nm .
+.It Pa /var/run/hastd.pid
+The default location of the
+.Nm
+PID file.
+.El
 .Sh EXIT STATUS
 Exit status is 0 on success, or one of the values described in
 .Xr sysexits 3
@@ -196,23 +213,6 @@ nodeA# hastctl role primary shared
 nodeA# newfs -U /dev/hast/shared
 nodeA# mount -o noatime /dev/hast/shared /shared
 .Ed
-.Sh FILES
-.Bl -tag -width ".Pa /var/run/hastctl" -compact
-.It Pa /etc/hast.conf
-The configuration file for
-.Nm
-and
-.Xr hastctl 8 .
-.It Pa /var/run/hastctl
-Control socket used by the
-.Xr hastctl 8
-control utility to communicate with
-.Nm .
-.It Pa /var/run/hastd.pid
-The default location of the
-.Nm
-PID file.
-.El
 .Sh SEE ALSO
 .Xr sysexits 3 ,
 .Xr geom 4 ,

Modified: head/share/man/man3/fpgetround.3
==============================================================================
--- head/share/man/man3/fpgetround.3	Thu May 13 12:07:55 2010	(r208027)
+++ head/share/man/man3/fpgetround.3	Thu May 13 12:08:11 2010	(r208028)
@@ -170,10 +170,10 @@ At present, they are implemented only on
 .Sh SEE ALSO
 .Xr fenv 3 ,
 .Xr isnan 3
+.Sh HISTORY
+These routines are based on SysV/386 routines of the same name.
 .Sh CAVEATS
 After a floating point exception and before a mask is set, the sticky
 flags must be reset.
 If another exception occurs before the sticky
 flags are reset, then a wrong exception type may be signaled.
-.Sh HISTORY
-These routines are based on SysV/386 routines of the same name.

Modified: head/share/man/man4/cmx.4
==============================================================================
--- head/share/man/man4/cmx.4	Thu May 13 12:07:55 2010	(r208027)
+++ head/share/man/man4/cmx.4	Thu May 13 12:08:11 2010	(r208028)
@@ -67,11 +67,6 @@ and
 are supported and work as expected.  An open file descriptor
 will always be ready for writing, but only ready for reading
 if the device indicates that it has data available.
-.Sh COMPATIBILITY
-Userland smartcard code written for the vendor's Linux drivers
-should work with the
-.Nm
-driver without modification.
 .Sh FILES
 .Bl -tag -width /usr/ports/security/openct -compact
 .It Pa /dev/cmx\fBn\fP
@@ -91,6 +86,11 @@ devices.
 .\".Nm
 .\"devices.
 .El
+.Sh COMPATIBILITY
+Userland smartcard code written for the vendor's Linux drivers
+should work with the
+.Nm
+driver without modification.
 .Sh SEE ALSO
 .Xr pccard 4
 .Sh HISTORY

Modified: head/share/man/man4/uhso.4
==============================================================================
--- head/share/man/man4/uhso.4	Thu May 13 12:07:55 2010	(r208027)
+++ head/share/man/man4/uhso.4	Thu May 13 12:08:11 2010	(r208028)
@@ -87,6 +87,10 @@ This behavior can be disabled by setting
 .Va hw.usb.uhso.auto_switch
 to 0 using
 .Xr sysctl 8
+.Sh FILES
+.Bl -tag -width "XXXXXX"
+.It Pa /dev/cuaU?.?
+.El
 .Sh EXAMPLES
 Establishing a packet interface connection
 .Bd -literal -offset indent
@@ -112,10 +116,6 @@ The connection can be terminated with
 .Bd -literal -offset indent
 AT_OWANCALL=1,0,1
 .Ed
-.Sh FILES
-.Bl -tag -width "XXXXXX"
-.It Pa /dev/cuaU?.?
-.El
 .Sh SEE ALSO
 .Xr ucom 4 ,
 .Xr usb 4

Modified: head/share/man/man5/boot.config.5
==============================================================================
--- head/share/man/man5/boot.config.5	Thu May 13 12:07:55 2010	(r208027)
+++ head/share/man/man5/boot.config.5	Thu May 13 12:08:11 2010	(r208028)
@@ -64,6 +64,11 @@ the other options available for
 are documented in detail in the
 .Xr boot 8
 manual page.
+.Sh FILES
+.Bl -tag -width /boot.config -compact
+.It Pa /boot.config
+parameters for the boot blocks (optional)
+.El
 .Sh EXAMPLES
 The command:
 .Bd -literal -offset indent
@@ -90,11 +95,6 @@ The command:
 .Ed
 .Pp
 will do both of the above.
-.Sh FILES
-.Bl -tag -width /boot.config -compact
-.It Pa /boot.config
-parameters for the boot blocks (optional)
-.El
 .Sh SEE ALSO
 .Xr boot 8 ,
 .Xr loader 8

Modified: head/share/man/man5/fdescfs.5
==============================================================================
--- head/share/man/man5/fdescfs.5	Thu May 13 12:07:55 2010	(r208027)
+++ head/share/man/man5/fdescfs.5	Thu May 13 12:08:11 2010	(r208028)
@@ -87,6 +87,10 @@ call other than
 and
 .Dv O_RDWR
 are ignored.
+.Sh FILES
+.Bl -tag -width /dev/stderr -compact
+.It Pa /dev/fd/#
+.El
 .Sh EXAMPLES
 To mount a  
 .Nm
@@ -94,10 +98,6 @@ volume located on
 .Pa /dev/fd :
 .Pp
 .Dl "mount -t fdescfs null /dev/fd"
-.Sh FILES
-.Bl -tag -width /dev/stderr -compact
-.It Pa /dev/fd/#
-.El
 .Sh SEE ALSO
 .Xr mount 8
 .Sh HISTORY

Modified: head/share/man/man5/linsysfs.5
==============================================================================
--- head/share/man/man5/linsysfs.5	Thu May 13 12:07:55 2010	(r208027)
+++ head/share/man/man5/linsysfs.5	Thu May 13 12:08:11 2010	(r208028)
@@ -55,14 +55,6 @@ registered driver name for these devices
 .It Pa device
 A symlink to the PCI device directory.
 .El
-.Sh EXAMPLES
-The most common usage follows:
-.Pp
-.Dl "mount -t linsysfs linsys /compat/linux/sys"
-.Pp
-where
-.Pa /compat/linux/sys
-is a mount point.
 .Sh FILES
 .Bl -tag -width ".Pa /compat/linux/sys/devices/pci0000:00" -compact
 .It Pa /compat/linux/sys
@@ -73,6 +65,14 @@ The storage host node.
 .It Pa /compat/linux/sys/devices/pci0000:00
 The PCI device hierarchy node.
 .El
+.Sh EXAMPLES
+The most common usage follows:
+.Pp
+.Dl "mount -t linsysfs linsys /compat/linux/sys"
+.Pp
+where
+.Pa /compat/linux/sys
+is a mount point.
 .Sh SEE ALSO
 .Xr nmount 2 ,
 .Xr unmount 2 ,

Modified: head/share/man/man9/namei.9
==============================================================================
--- head/share/man/man9/namei.9	Thu May 13 12:07:55 2010	(r208027)
+++ head/share/man/man9/namei.9	Thu May 13 12:08:11 2010	(r208028)
@@ -319,6 +319,10 @@ function.
 If successful,
 .Fn namei
 will return 0, otherwise it will return an error.
+.Sh FILES
+.Bl -tag
+.It Pa src/sys/kern/vfs_lookup.c
+.El
 .Sh ERRORS
 Errors which
 .Fn namei
@@ -343,10 +347,6 @@ An attempt is made to open a directory w
 .It Bq Er EROFS
 An attempt is made to modify a file or directory on a read-only file system.
 .El
-.Sh FILES
-.Bl -tag
-.It Pa src/sys/kern/vfs_lookup.c
-.El
 .Sh SEE ALSO
 .Xr uio 9 ,
 .Xr uma 9 ,

Modified: head/share/man/man9/uio.9
==============================================================================
--- head/share/man/man9/uio.9	Thu May 13 12:07:55 2010	(r208027)
+++ head/share/man/man9/uio.9	Thu May 13 12:08:11 2010	(r208028)
@@ -115,18 +115,6 @@ space.
 On success
 .Fn uiomove
 will return 0, on error it will return an appropriate errno.
-.Sh ERRORS
-.Fn uiomove
-will fail and return the following error code if:
-.Bl -tag -width Er
-.It Bq Er EFAULT
-The invoked
-.Xr copyin 9
-or
-.Xr copyout 9
-returned
-.Er EFAULT
-.El
 .Sh EXAMPLES
 The idea is that the driver maintains a private buffer for its data,
 and processes the request in chunks of maximal the size of this
@@ -167,6 +155,18 @@ fooread(dev_t dev, struct uio *uio, int 
 	return (rv);
 }
 .Ed
+.Sh ERRORS
+.Fn uiomove
+will fail and return the following error code if:
+.Bl -tag -width Er
+.It Bq Er EFAULT
+The invoked
+.Xr copyin 9
+or
+.Xr copyout 9
+returned
+.Er EFAULT
+.El
 .Sh SEE ALSO
 .Xr read 2 ,
 .Xr readv 2 ,

Modified: head/usr.bin/killall/killall.1
==============================================================================
--- head/usr.bin/killall/killall.1	Thu May 13 12:07:55 2010	(r208027)
+++ head/usr.bin/killall/killall.1	Thu May 13 12:08:11 2010	(r208028)
@@ -121,6 +121,17 @@ for this job (e.g.\&
 .Dq Li "kill -TERM -1
 or as root
 .Dq Li "echo kill -TERM -1 | su -m " ) .
+.Sh IMPLEMENTATION NOTES
+This
+.Fx
+implementation of
+.Nm
+has completely different semantics as compared to the traditional
+.Ux
+System V behavior of
+.Nm .
+The latter will kill all processes that the current user is able to
+kill, and is intended to be used by the system shutdown process only.
 .Sh EXIT STATUS
 The
 .Nm
@@ -145,17 +156,6 @@ command appeared in
 It has been modeled after the
 .Nm
 command as available on other platforms.
-.Sh IMPLEMENTATION NOTES
-This
-.Fx
-implementation of
-.Nm
-has completely different semantics as compared to the traditional
-.Ux
-System V behavior of
-.Nm .
-The latter will kill all processes that the current user is able to
-kill, and is intended to be used by the system shutdown process only.
 .Sh AUTHORS
 .An -nosplit
 The

Modified: head/usr.bin/setchannel/setchannel.1
==============================================================================
--- head/usr.bin/setchannel/setchannel.1	Thu May 13 12:07:55 2010	(r208027)
+++ head/usr.bin/setchannel/setchannel.1	Thu May 13 12:08:11 2010	(r208028)
@@ -85,13 +85,6 @@ Channel number to set.
 .It Cm freq
 Frequency in MHz (must include decimal point).
 .El
-.Sh AUTHORS
-.An -nosplit
-This program is made by
-.An John Wehle 
-.Pp
-This man page is made by
-.An Edwin Groothuis 
 .Sh SEE ALSO
 .Xr cxm 4 ,
 .Xr bktr 4 ,
@@ -102,3 +95,10 @@ The
 program first appeared in the -multimedia mailing-list in January 2004. The
 .Nm
 program first appeared in the FreeBSD Ports collection in October 2004.
+.Sh AUTHORS
+.An -nosplit
+This program is made by
+.An John Wehle 
+.Pp
+This man page is made by
+.An Edwin Groothuis 

Modified: head/usr.bin/tar/bsdtar.1
==============================================================================
--- head/usr.bin/tar/bsdtar.1	Thu May 13 12:07:55 2010	(r208027)
+++ head/usr.bin/tar/bsdtar.1	Thu May 13 12:08:11 2010	(r208028)
@@ -647,8 +647,6 @@ Note that, unlike other
 implementations, this implementation recognizes gzip compression
 automatically when reading archives.
 .El
-.Sh EXIT STATUS
-.Ex -std
 .Sh ENVIRONMENT
 The following environment variables affect the execution of
 .Nm :
@@ -672,6 +670,8 @@ See
 .Xr environ 7
 for more information.
 .El
+.Sh EXIT STATUS
+.Ex -std
 .Sh EXAMPLES
 The following creates a new archive
 called

Modified: head/usr.bin/wtmpcvt/wtmpcvt.1
==============================================================================
--- head/usr.bin/wtmpcvt/wtmpcvt.1	Thu May 13 12:07:55 2010	(r208027)
+++ head/usr.bin/wtmpcvt/wtmpcvt.1	Thu May 13 12:08:11 2010	(r208028)
@@ -55,6 +55,8 @@ The
 .Nm
 utility appeared in
 .Fx 9.0 .
+.Sh AUTHORS
+.An Ed Schouten Aq ed@FreeBSD.org
 .Sh BUGS
 The application assumes the
 .Ar input
@@ -62,5 +64,3 @@ file has the same byte order as the host
 The
 .Ar output
 file can be used on any architecture.
-.Sh AUTHORS
-.An Ed Schouten Aq ed@FreeBSD.org

Modified: head/usr.sbin/bluetooth/btpand/btpand.8
==============================================================================
--- head/usr.sbin/bluetooth/btpand/btpand.8	Thu May 13 12:07:55 2010	(r208027)
+++ head/usr.sbin/bluetooth/btpand/btpand.8	Thu May 13 12:08:11 2010	(r208028)
@@ -181,8 +181,6 @@ After
 has set up the client or server connection and opened the
 .Xr tap 4
 interface, it will create a pid file and detach.
-.Sh EXIT STATUS
-.Ex -std
 .Sh FILES
 .Bl -tag -compact
 .It Pa /dev/tap
@@ -190,6 +188,8 @@ interface, it will create a pid file and
 .It Pa /var/run/sdp
 .It Pa /var/run/tap Ns Em N Ns No .pid
 .El
+.Sh EXIT STATUS
+.Ex -std
 .Sh EXAMPLES
 .Dl ifconfig tap1 create
 .Dl btpand -a host -d mydevice -s NAP -i tap1

Modified: head/usr.sbin/bluetooth/sdpcontrol/sdpcontrol.8
==============================================================================
--- head/usr.sbin/bluetooth/sdpcontrol/sdpcontrol.8	Thu May 13 12:07:55 2010	(r208027)
+++ head/usr.sbin/bluetooth/sdpcontrol/sdpcontrol.8	Thu May 13 12:08:11 2010	(r208028)
@@ -90,6 +90,13 @@ are:
 .It Cm Browse
 .It Cm Search
 .El
+.Sh EXIT STATUS
+.Ex -std
+.Sh SEE ALSO
+.Xr bluetooth 3 ,
+.Xr sdp 3
+.Sh AUTHORS
+.An Maksim Yevmenkin Aq m_evmenkin@yahoo.com
 .Sh CAVEATS
 The
 .Nm
@@ -109,10 +116,3 @@ Protocol Descriptor List
 .It
 Bluetooth Profile Descriptor List
 .El
-.Sh EXIT STATUS
-.Ex -std
-.Sh SEE ALSO
-.Xr bluetooth 3 ,
-.Xr sdp 3
-.Sh AUTHORS
-.An Maksim Yevmenkin Aq m_evmenkin@yahoo.com

Modified: head/usr.sbin/mptutil/mptutil.8
==============================================================================
--- head/usr.sbin/mptutil/mptutil.8	Thu May 13 12:07:55 2010	(r208027)
+++ head/usr.sbin/mptutil/mptutil.8	Thu May 13 12:08:11 2010	(r208028)
@@ -348,6 +348,11 @@ as a global hot spare:
 .Dl Nm Cm add da3
 .Sh SEE ALSO
 .Xr mpt 4
+.Sh HISTORY
+The
+.Nm
+utility first appeared in
+.Fx 8.0 .
 .Sh BUGS
 .Pp
 The handling of spare drives appears to be unreliable.
@@ -379,8 +384,3 @@ configurations may not work reliably.
 .Pp
 Drive configuration commands result in an excessive flood of messages on the
 console.
-.Sh HISTORY
-The
-.Nm
-utility first appeared in
-.Fx 8.0 .

Modified: head/usr.sbin/newsyslog/newsyslog.8
==============================================================================
--- head/usr.sbin/newsyslog/newsyslog.8	Thu May 13 12:07:55 2010	(r208027)
+++ head/usr.sbin/newsyslog/newsyslog.8	Thu May 13 12:08:11 2010	(r208028)
@@ -238,6 +238,13 @@ this has been changed to a colon (``:'')
 names may contain the dot character.
 The dot (``.'') character is still
 accepted for backwards compatibility.
+.Sh SEE ALSO
+.Xr bzip2 1 ,
+.Xr gzip 1 ,
+.Xr syslog 3 ,
+.Xr newsyslog.conf 5 ,
+.Xr chown 8 ,
+.Xr syslogd 8
 .Sh HISTORY
 The
 .Nm
@@ -250,12 +257,5 @@ and first appeared in
 MIT Project Athena
 .Pp
 Copyright 1987, Massachusetts Institute of Technology
-.Sh "SEE ALSO"
-.Xr bzip2 1 ,
-.Xr gzip 1 ,
-.Xr syslog 3 ,
-.Xr newsyslog.conf 5 ,
-.Xr chown 8 ,
-.Xr syslogd 8
 .Sh BUGS
 Does not yet automatically read the logs to find security breaches.

Modified: head/usr.sbin/pkg_install/updating/pkg_updating.1
==============================================================================
--- head/usr.sbin/pkg_install/updating/pkg_updating.1	Thu May 13 12:07:55 2010	(r208027)
+++ head/usr.sbin/pkg_install/updating/pkg_updating.1	Thu May 13 12:08:11 2010	(r208028)
@@ -43,6 +43,20 @@ Defines a alternative location of the UP
 .It Fl h , -help
 Print help message.
 .El
+.Sh ENVIRONMENT
+.Bl -tag -width PKG_DBDIR
+.It Ev PKG_DBDIR
+Specifies an alternative location for the installed package database.
+.It Ev PORTSDIR
+Location of the ports tree.
+.El
+.Sh FILES
+.Bl -tag -width /var/db/pkg -compact
+.It Pa /var/db/pkg
+Default location of the installed package database.
+.It Pa /usr/ports
+The default ports directory and default location of the UPDATING file
+.El
 .Sh EXAMPLES
 Shows all entries of all installed ports:
 .Dl % pkg_updating
@@ -63,20 +77,6 @@ installed ports:
 Fetch UPDATING file from ftp mirror and show all entries of all
 installed ports:
 .Dl % pkg_updating -f ftp://ftp.freebsd.org/pub/FreeBSD/ports/packages/UPDATING
-.Sh ENVIRONMENT
-.Bl -tag -width PKG_DBDIR
-.It Ev PKG_DBDIR
-Specifies an alternative location for the installed package database.
-.It Ev PORTSDIR
-Location of the ports tree.
-.El
-.Sh FILES
-.Bl -tag -width /var/db/pkg -compact
-.It Pa /var/db/pkg
-Default location of the installed package database.
-.It Pa /usr/ports
-The default ports directory and default location of the UPDATING file
-.El
 .Sh SEE ALSO
 .Xr pkg_add 1 ,
 .Xr pkg_create 1 ,

Modified: head/usr.sbin/rtadvd/rtadvd.8
==============================================================================
--- head/usr.sbin/rtadvd/rtadvd.8	Thu May 13 12:07:55 2010	(r208027)
+++ head/usr.sbin/rtadvd/rtadvd.8	Thu May 13 12:08:11 2010	(r208028)
@@ -162,8 +162,6 @@ In this case,
 will transmit router advertisement with router lifetime 0
 to all the interfaces
 .Pq in accordance with RFC2461 6.2.5 .
-.Sh EXIT STATUS
-.Ex -std
 .Sh FILES
 .Bl -tag -width Pa -compact
 .It Pa /etc/rtadvd.conf
@@ -176,6 +174,8 @@ The file in which
 .Nm
 dumps its internal state.
 .El
+.Sh EXIT STATUS
+.Ex -std
 .Sh SEE ALSO
 .Xr rtadvd.conf 5 ,
 .Xr rtsol 8

Modified: head/usr.sbin/rtsold/rtsold.8
==============================================================================
--- head/usr.sbin/rtsold/rtsold.8	Thu May 13 12:07:55 2010	(r208027)
+++ head/usr.sbin/rtsold/rtsold.8	Thu May 13 12:08:11 2010	(r208028)
@@ -222,9 +222,6 @@ must be the absolute path from root to t
 file, and be created by the same owner who runs
 .Nm .
 .El
-.Sh EXIT STATUS
-.Ex -std
-.\"
 .Sh FILES
 .Bl -tag -width /var/run/rtsold.dump -compact
 .It Pa /var/run/rtsold.pid
@@ -234,6 +231,9 @@ the pid of the currently running
 dumps internal state on.
 .El
 .\"
+.Sh EXIT STATUS
+.Ex -std
+.\"
 .Sh SEE ALSO
 .Xr rtadvd 8 ,
 .Xr sysctl 8

Modified: head/usr.sbin/sa/sa.8
==============================================================================
--- head/usr.sbin/sa/sa.8	Thu May 13 12:07:55 2010	(r208027)
+++ head/usr.sbin/sa/sa.8	Thu May 13 12:08:11 2010	(r208028)
@@ -234,6 +234,8 @@ per-user accounting summary database
 .Xr acct 5 ,
 .Xr ac 8 ,
 .Xr accton 8
+.Sh AUTHORS
+.An Chris G. Demetriou Aq cgd@postgres.berkeley.edu
 .Sh CAVEATS
 While the behavior of the options in this version of
 .Nm
@@ -251,8 +253,6 @@ The formats of the summary files created
 are very different from the those used by the original version.
 This is not considered a problem, however, because the accounting record
 format has changed as well (since user ids are now 32 bits).
-.Sh AUTHORS
-.An Chris G. Demetriou Aq cgd@postgres.berkeley.edu
 .Sh BUGS
 The number of options to this program is absurd, especially considering
 that there is not much logic behind their lettering.

Modified: head/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.conf.5
==============================================================================
--- head/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.conf.5	Thu May 13 12:07:55 2010	(r208027)
+++ head/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.conf.5	Thu May 13 12:08:11 2010	(r208028)
@@ -456,6 +456,11 @@ openssl pkcs12 -in example.pfx -out user
 # convert CA certificate (if included in PFX file) to PEM format
 openssl pkcs12 -in example.pfx -out ca.pem -cacerts -nokeys
 .Ed
+.Sh FILES
+.Bl -tag -width ".Pa /usr/share/examples/etc/wpa_supplicant.conf" -compact
+.It Pa /etc/wpa_supplicant.conf
+.It Pa /usr/share/examples/etc/wpa_supplicant.conf
+.El
 .Sh EXAMPLES
 WPA-Personal (PSK) as a home network and WPA-Enterprise with EAP-TLS
 as a work network:
@@ -538,11 +543,6 @@ network={
         wep_key0=42FEEDDEAFBABEDEAFBEEFAA55
 }
 .Ed
-.Sh FILES
-.Bl -tag -width ".Pa /usr/share/examples/etc/wpa_supplicant.conf" -compact
-.It Pa /etc/wpa_supplicant.conf
-.It Pa /usr/share/examples/etc/wpa_supplicant.conf
-.El
 .Sh SEE ALSO
 .Xr wpa_cli 8 ,
 .Xr wpa_passphrase 8 ,

From owner-svn-src-head@FreeBSD.ORG  Thu May 13 15:31:01 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 478A1106566C;
	Thu, 13 May 2010 15:31:01 +0000 (UTC)
	(envelope-from trasz@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 360F58FC0A;
	Thu, 13 May 2010 15:31:01 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4DFV1eW073381;
	Thu, 13 May 2010 15:31:01 GMT (envelope-from trasz@svn.freebsd.org)
Received: (from trasz@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4DFV191073379;
	Thu, 13 May 2010 15:31:01 GMT (envelope-from trasz@svn.freebsd.org)
Message-Id: <201005131531.o4DFV191073379@svn.freebsd.org>
From: Edward Tomasz Napierala 
Date: Thu, 13 May 2010 15:31:01 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r208030 -
	head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 13 May 2010 15:31:01 -0000

Author: trasz
Date: Thu May 13 15:31:00 2010
New Revision: 208030
URL: http://svn.freebsd.org/changeset/base/208030

Log:
  Add missing check to prevent local users from panicing the kernel by trying
  to set malformed ACL.
  
  MFC after:	3 days

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c	Thu May 13 15:28:34 2010	(r208029)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c	Thu May 13 15:31:00 2010	(r208030)
@@ -4939,6 +4939,10 @@ zfs_freebsd_setacl(ap)
 	if (ap->a_aclp->acl_cnt * 2 + 6 > ACL_MAX_ENTRIES)
 		return (ENOSPC);
 
+	error = acl_nfs4_check(ap->a_aclp, ap->a_vp->v_type == VDIR);
+	if (error != 0)
+		return (error);
+
 	vsecattr.vsa_mask = VSA_ACE;
 	aclbsize = ap->a_aclp->acl_cnt * sizeof(ace_t);
 	vsecattr.vsa_aclentp = kmem_alloc(aclbsize, KM_SLEEP);

From owner-svn-src-head@FreeBSD.ORG  Thu May 13 16:42:01 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 61189106566C;
	Thu, 13 May 2010 16:42:01 +0000 (UTC)
	(envelope-from trasz@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 4F1158FC1C;
	Thu, 13 May 2010 16:42:01 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4DGg1Wa089223;
	Thu, 13 May 2010 16:42:01 GMT (envelope-from trasz@svn.freebsd.org)
Received: (from trasz@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4DGg1nh089221;
	Thu, 13 May 2010 16:42:01 GMT (envelope-from trasz@svn.freebsd.org)
Message-Id: <201005131642.o4DGg1nh089221@svn.freebsd.org>
From: Edward Tomasz Napierala 
Date: Thu, 13 May 2010 16:42:01 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r208033 - head/lib/libc/posix1e
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 13 May 2010 16:42:01 -0000

Author: trasz
Date: Thu May 13 16:42:01 2010
New Revision: 208033
URL: http://svn.freebsd.org/changeset/base/208033

Log:
  Make it possible to actually use NFSv4 permission bits with acl_set_perm(3)
  and acl_delete_perm(3).  It went undetected, because neither setfacl(1)
  nor Samba use this routines.  D'oh.
  
  MFC after:	1 week

Modified:
  head/lib/libc/posix1e/acl_perm.c

Modified: head/lib/libc/posix1e/acl_perm.c
==============================================================================
--- head/lib/libc/posix1e/acl_perm.c	Thu May 13 15:44:49 2010	(r208032)
+++ head/lib/libc/posix1e/acl_perm.c	Thu May 13 16:42:01 2010	(r208033)
@@ -35,6 +35,20 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
+static int
+_perm_is_invalid(acl_perm_t perm)
+{
+
+	/* Check if more than a single bit is set. */
+	if ((perm & -perm) == perm &&
+	    (perm & (ACL_POSIX1E_BITS | ACL_NFS4_PERM_BITS)) == perm)
+		return (0);
+
+	errno = EINVAL;
+
+	return (1);
+}
+
 /*
  * acl_add_perm() (23.4.1): add the permission contained in perm to the
  * permission set permset_d
@@ -43,18 +57,17 @@ int
 acl_add_perm(acl_permset_t permset_d, acl_perm_t perm)
 {
 
-	if (permset_d) {
-		switch(perm) {
-		case ACL_READ:
-		case ACL_WRITE:
-		case ACL_EXECUTE:
-			*permset_d |= perm;
-			return (0);
-		}
+	if (permset_d == NULL) {
+		errno = EINVAL;
+		return (-1);
 	}
 
-	errno = EINVAL;
-	return (-1);
+	if (_perm_is_invalid(perm))
+		return (-1);
+
+	*permset_d |= perm;
+
+	return (0);
 }
 
 /*
@@ -83,16 +96,15 @@ int
 acl_delete_perm(acl_permset_t permset_d, acl_perm_t perm)
 {
 
-	if (permset_d) {
-		switch(perm) {
-		case ACL_READ:
-		case ACL_WRITE:
-		case ACL_EXECUTE:
-			*permset_d &= ~(perm & ACL_PERM_BITS);
-			return (0);
-		}
+	if (permset_d == NULL) {
+		errno = EINVAL;
+		return (-1);
 	}
 
-	errno = EINVAL;
-	return (-1);
+	if (_perm_is_invalid(perm))
+		return (-1);
+
+	*permset_d &= ~perm;
+
+	return (0);
 }

From owner-svn-src-head@FreeBSD.ORG  Thu May 13 16:44:28 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 878991065675;
	Thu, 13 May 2010 16:44:28 +0000 (UTC)
	(envelope-from trasz@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 76B768FC17;
	Thu, 13 May 2010 16:44:28 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4DGiSOX089892;
	Thu, 13 May 2010 16:44:28 GMT (envelope-from trasz@svn.freebsd.org)
Received: (from trasz@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4DGiSXE089890;
	Thu, 13 May 2010 16:44:28 GMT (envelope-from trasz@svn.freebsd.org)
Message-Id: <201005131644.o4DGiSXE089890@svn.freebsd.org>
From: Edward Tomasz Napierala 
Date: Thu, 13 May 2010 16:44:28 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r208034 - head/lib/libc/posix1e
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 13 May 2010 16:44:28 -0000

Author: trasz
Date: Thu May 13 16:44:27 2010
New Revision: 208034
URL: http://svn.freebsd.org/changeset/base/208034

Log:
  Make branding less intrusive - in acl_set(3), in case ACL brand
  is ACL_BRAND_UNKNOWN, do what the programmer says instead of failing.
  
  MFC after:	1 week

Modified:
  head/lib/libc/posix1e/acl_branding.c

Modified: head/lib/libc/posix1e/acl_branding.c
==============================================================================
--- head/lib/libc/posix1e/acl_branding.c	Thu May 13 16:42:01 2010	(r208033)
+++ head/lib/libc/posix1e/acl_branding.c	Thu May 13 16:44:27 2010	(r208034)
@@ -129,6 +129,9 @@ _acl_type_not_valid_for_acl(const acl_t 
 		if (type == ACL_TYPE_ACCESS || type == ACL_TYPE_DEFAULT)
 			return (0);
 		break;
+
+	case ACL_BRAND_UNKNOWN:
+		return (0);
 	}
 
 	return (-1);

From owner-svn-src-head@FreeBSD.ORG  Thu May 13 16:46:23 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E72A31065674;
	Thu, 13 May 2010 16:46:23 +0000 (UTC)
	(envelope-from trasz@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id D6A168FC0A;
	Thu, 13 May 2010 16:46:23 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4DGkNQI090359;
	Thu, 13 May 2010 16:46:23 GMT (envelope-from trasz@svn.freebsd.org)
Received: (from trasz@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4DGkNbf090357;
	Thu, 13 May 2010 16:46:23 GMT (envelope-from trasz@svn.freebsd.org)
Message-Id: <201005131646.o4DGkNbf090357@svn.freebsd.org>
From: Edward Tomasz Napierala 
Date: Thu, 13 May 2010 16:46:23 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r208035 - head/bin/setfacl
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 13 May 2010 16:46:24 -0000

Author: trasz
Date: Thu May 13 16:46:23 2010
New Revision: 208035
URL: http://svn.freebsd.org/changeset/base/208035

Log:
  Update authors and history.
  
  MFC after:	1 week

Modified:
  head/bin/setfacl/setfacl.1

Modified: head/bin/setfacl/setfacl.1
==============================================================================
--- head/bin/setfacl/setfacl.1	Thu May 13 16:44:27 2010	(r208034)
+++ head/bin/setfacl/setfacl.1	Thu May 13 16:46:23 2010	(r208035)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd September 5, 2009
+.Dd May 13, 2010
 .Dt SETFACL 1
 .Os
 .Sh NAME
@@ -453,8 +453,13 @@ as part of the
 .Tn TrustedBSD
 Project and introduced in
 .Fx 5.0 .
+NFSv4 ACL support was introduced in
+.Fx 8.1 .
 .Sh AUTHORS
+.An -nosplit
 The
 .Nm
 utility was written by
 .An Chris D. Faulhaber Aq jedgar@fxp.org .
+NFSv4 ACL support was implemented by
+.An Edward Tomasz Napierala Aq trasz@FreeBSD.org .

From owner-svn-src-head@FreeBSD.ORG  Thu May 13 16:48:29 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 67C661065672;
	Thu, 13 May 2010 16:48:29 +0000 (UTC) (envelope-from zec@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 575DA8FC15;
	Thu, 13 May 2010 16:48:29 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4DGmTtc090875;
	Thu, 13 May 2010 16:48:29 GMT (envelope-from zec@svn.freebsd.org)
Received: (from zec@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4DGmTeZ090873;
	Thu, 13 May 2010 16:48:29 GMT (envelope-from zec@svn.freebsd.org)
Message-Id: <201005131648.o4DGmTeZ090873@svn.freebsd.org>
From: Marko Zec 
Date: Thu, 13 May 2010 16:48:28 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r208036 - head/sys/netgraph
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 13 May 2010 16:48:29 -0000

Author: zec
Date: Thu May 13 16:48:28 2010
New Revision: 208036
URL: http://svn.freebsd.org/changeset/base/208036

Log:
  Increase the target buffer for performing NGM_ASCII2BINARY conversion
  from 2000 bytes to 20 Kbytes, which now matches the buffer size used for
  NGM_BINARY2ASCII conversions.
  
  The aim of this change is to allow for bigger binary structures to be
  managed via netgraph ASCII messages, until we come up with an API
  improvement which would get rid of such arbitrary hardcoded limits.
  
  MFC after:	3 days

Modified:
  head/sys/netgraph/ng_base.c

Modified: head/sys/netgraph/ng_base.c
==============================================================================
--- head/sys/netgraph/ng_base.c	Thu May 13 16:46:23 2010	(r208035)
+++ head/sys/netgraph/ng_base.c	Thu May 13 16:48:28 2010	(r208036)
@@ -2763,7 +2763,7 @@ ng_generic_msg(node_p here, item_p item,
 
 	case NGM_ASCII2BINARY:
 	    {
-		int bufSize = 2000;	/* XXX hard coded constant */
+		int bufSize = 20 * 1024;	/* XXX hard coded constant */
 		const struct ng_cmdlist *c;
 		const struct ng_parse_type *argstype;
 		struct ng_mesg *ascii, *binary;

From owner-svn-src-head@FreeBSD.ORG  Thu May 13 17:39:00 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3293A106564A;
	Thu, 13 May 2010 17:39:00 +0000 (UTC)
	(envelope-from alexbestms@uni-muenster.de)
Received: from SECMAIL.UNI-MUENSTER.DE (SECMAIL.UNI-MUENSTER.DE
	[128.176.192.141])
	by mx1.freebsd.org (Postfix) with ESMTP id DD7F48FC18;
	Thu, 13 May 2010 17:38:59 +0000 (UTC)
Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com
	[209.85.161.54])
	by SECMAIL.UNI-MUENSTER.DE (Postfix) with ESMTP id 3BF3DBF405;
	Thu, 13 May 2010 19:09:05 +0200 (CEST)
Received: by fxm17 with SMTP id 17so585896fxm.13
	for ; Thu, 13 May 2010 10:09:05 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.103.135.18 with SMTP id m18mr198435mun.4.1273770544978; Thu, 
	13 May 2010 10:09:04 -0700 (PDT)
Received: by 10.103.167.8 with HTTP; Thu, 13 May 2010 10:09:04 -0700 (PDT)
In-Reply-To: <201005121547.o4CFlhtF051299@svn.freebsd.org>
References: <201005121547.o4CFlhtF051299@svn.freebsd.org>
Date: Thu, 13 May 2010 19:09:04 +0200
Message-ID: 
From: Alexander Best 
To: Christian Brueffer 
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r207964 - head/sbin/kldstat
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 13 May 2010 17:39:00 -0000

On Wed, May 12, 2010 at 5:47 PM, Christian Brueffer
 wrote:

[snip]

>
> =A0PR: =A0 =A0 =A0 =A0 =A0 146046
> =A0Submitted by: Alexander Best 
> =A0Reviewed by: =A0kan
> =A0MFC after: =A0 =A01 week

thanks. maybe you could also have a look at docs/146047 which improves
the kldstat(2) manual.

cheers

[snip]



--=20
Alexander Best

From owner-svn-src-head@FreeBSD.ORG  Thu May 13 19:03:52 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C318A1065670;
	Thu, 13 May 2010 19:03:52 +0000 (UTC)
	(envelope-from swell.k@gmail.com)
Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com
	[209.85.161.54])
	by mx1.freebsd.org (Postfix) with ESMTP id ED2E88FC19;
	Thu, 13 May 2010 19:03:51 +0000 (UTC)
Received: by fxm17 with SMTP id 17so726632fxm.13
	for ; Thu, 13 May 2010 12:03:50 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:received:received:from:to:cc:subject:references
	:date:in-reply-to:message-id:user-agent:mime-version:content-type;
	bh=rw4lEHIYM6LCtRT6r3o87Exo1GhzTEL1VY0vg+XYFA8=;
	b=tF0ETFfZTVCywYHdQi1RnDktE+ZCinUKzEZGDh0lWVL+wK46Vd+LbmF+WR4zfWM7lx
	6+3uv3MdIBBNoxYDaoxg9e3cdQCAwuoU3QDl38QVW3BV1kTE6NMT3U7XiLkncI1740FJ
	xOw+PfrWkFFqGD1tEfPXIykmjXAlSHkehjEUo=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=from:to:cc:subject:references:date:in-reply-to:message-id
	:user-agent:mime-version:content-type;
	b=Iw2vVR1L48wVOP1goZgWtXqCc0MnHAzlrHLvcFa1YYvzkMmkTEclEK0QDhYKxw/7QQ
	46eZZHdQ/6lkpZEZaFaoHZsNm41UhdHrRg3Vzciaq4IyeqUOUU2r4ljQ2/eWad0tL/x/
	yXUAuNhzVsXV6UBIHqjOd0qfz3eiOe8AtH4g8=
Received: by 10.223.24.148 with SMTP id v20mr346693fab.43.1273777430570;
	Thu, 13 May 2010 12:03:50 -0700 (PDT)
Received: from localhost (89-178-204-240.broadband.corbina.ru [89.178.204.240])
	by mx.google.com with ESMTPS id 2sm7093394faf.3.2010.05.13.12.03.49
	(version=SSLv3 cipher=RC4-MD5); Thu, 13 May 2010 12:03:50 -0700 (PDT)
From: Anonymous 
To: Tim Kientzle 
References: <201005081628.o48GSM9s067363__30886.3841965378$1273336146$gmane$org@svn.freebsd.org>
Date: Thu, 13 May 2010 23:03:48 +0400
In-Reply-To: <201005081628.o48GSM9s067363__30886.3841965378$1273336146$gmane$org@svn.freebsd.org>
	(Tim Kientzle's message of "Sat, 8 May 2010 16:28:22 +0000 (UTC)")
Message-ID: <86aas3oc8b.fsf@gmail.com>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (berkeley-unix)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r207790 - head/usr.bin/tar
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 13 May 2010 19:03:53 -0000

Tim Kientzle  writes:

> Author: kientzle
> Date: Sat May  8 16:28:22 2010
> New Revision: 207790
> URL: http://svn.freebsd.org/changeset/base/207790
>
> Log:
>   Config updates.
>
> Modified:
>   head/usr.bin/tar/config_freebsd.h

Smth broke after this commit. Hitting ^T causes ports to barf errors.

before

    x11-toolkits/wxgtk28 $ make BATCH= patch
    ===>  Extracting for wxgtk2-2.8.10_4
    => MD5 Checksum OK for wxGTK-2.8.10.tar.bz2.
    => SHA256 Checksum OK for wxGTK-2.8.10.tar.bz2.
    load: 0.05  cmd: sh 64229 [running] 0.00r 0.00u 0.00s 0% 1576k
    load: 0.05  cmd: bzip2 64231 [running] 0.19r 0.16u 0.00s 2% 4564k
    load: 0.05  cmd: bsdtar 64232 [running] 0.36r 0.00u 0.13s 1% 2420k
    load: 0.05  cmd: bzip2 64231 [running] 0.56r 0.47u 0.00s 4% 4568k
    load: 0.05  cmd: bsdtar 64232 [running] 1.82r 0.05u 0.62s 6% 2448k
    ===>  Patching for wxgtk2-2.8.10_4
    ===>  Applying FreeBSD patches for wxgtk2-2.8.10_4

after

    x11-toolkits/wxgtk28 $ make BATCH= patch
    load: 0.05  cmd: make 63587 [zio->io_cv)] 0.19r 0.03u 0.00s 0% 1268k
    ===>  Extracting for wxgtk2-2.8.10_4
    load: 0.05  cmd: awk 63621 [zio->io_cv)] 0.01r 0.00u 0.00s 0% 1492k
    => MD5 Checksum OK for wxGTK-2.8.10.tar.bz2.
    => SHA256 Checksum OK for wxGTK-2.8.10.tar.bz2.
    load: 0.05  cmd: bzip2 63631 [running] 0.13r 0.10u 0.00s 1% 4564k
    wxGTK-2.8.10/contrib/include/wx/fl/controlbar.h: Error reading stdin
    load: 0.05  cmd: bzip2 63631 [running] 0.34r 0.30u 0.00s 3% 4568k
    tar: Error exit delayed from previous errors.
    *** Error code 1

Looks like errors are related to extracting from stdin.

    $ bzip2 -dc wxGTK-2.8.10.tar.bz2 | tar xf -
    load: 0.04  cmd: bzip2 65117 [running] 0.17r 0.07u 0.00s 0% 4564k
    tar: Error reading stdin
    load: 0.04  cmd: bzip2 65117 [running] 0.33r 0.23u 0.00s 2% 4568k
    tar: Error exit delayed from previous errors.
    zsh: broken pipe  bzip2 -dc wxGTK-2.8.10.tar.bz2 |
    zsh: exit 1       tar xf -

From owner-svn-src-head@FreeBSD.ORG  Thu May 13 19:36:14 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2F68B106566B;
	Thu, 13 May 2010 19:36:14 +0000 (UTC)
	(envelope-from kmacy@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 1EEBB8FC14;
	Thu, 13 May 2010 19:36:14 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4DJaEem028827;
	Thu, 13 May 2010 19:36:14 GMT (envelope-from kmacy@svn.freebsd.org)
Received: (from kmacy@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4DJaEAN028825;
	Thu, 13 May 2010 19:36:14 GMT (envelope-from kmacy@svn.freebsd.org)
Message-Id: <201005131936.o4DJaEAN028825@svn.freebsd.org>
From: Kip Macy 
Date: Thu, 13 May 2010 19:36:13 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r208042 - head/sys/netinet6
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 13 May 2010 19:36:14 -0000

Author: kmacy
Date: Thu May 13 19:36:13 2010
New Revision: 208042
URL: http://svn.freebsd.org/changeset/base/208042

Log:
  fix compile error on some builds by doing the equivalent of
  an "extern VNET_DEFINE" without "__used"
  
  MFC after:	3 days

Modified:
  head/sys/netinet6/ip6_input.c

Modified: head/sys/netinet6/ip6_input.c
==============================================================================
--- head/sys/netinet6/ip6_input.c	Thu May 13 18:17:01 2010	(r208041)
+++ head/sys/netinet6/ip6_input.c	Thu May 13 19:36:13 2010	(r208042)
@@ -116,7 +116,7 @@ __FBSDID("$FreeBSD$");
 
 #ifdef FLOWTABLE
 #include 
-extern VNET_DEFINE(int, ip6_output_flowtable_size);
+extern int VNET_NAME(ip6_output_flowtable_size) __section(VNET_SETNAME);
 #define	V_ip6_output_flowtable_size	VNET(ip6_output_flowtable_size)
 #endif
 

From owner-svn-src-head@FreeBSD.ORG  Thu May 13 19:47:36 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9C4D1106564A;
	Thu, 13 May 2010 19:47:36 +0000 (UTC)
	(envelope-from kmacy@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 8BCED8FC15;
	Thu, 13 May 2010 19:47:36 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4DJlaYQ031343;
	Thu, 13 May 2010 19:47:36 GMT (envelope-from kmacy@svn.freebsd.org)
Received: (from kmacy@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4DJla15031341;
	Thu, 13 May 2010 19:47:36 GMT (envelope-from kmacy@svn.freebsd.org)
Message-Id: <201005131947.o4DJla15031341@svn.freebsd.org>
From: Kip Macy 
Date: Thu, 13 May 2010 19:47:36 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r208043 - head/sys/netinet6
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 13 May 2010 19:47:36 -0000

Author: kmacy
Date: Thu May 13 19:47:36 2010
New Revision: 208043
URL: http://svn.freebsd.org/changeset/base/208043

Log:
  do a proper fix
  
  Pointed out by: np@
  
  MFC after:	3 days

Modified:
  head/sys/netinet6/ip6_input.c

Modified: head/sys/netinet6/ip6_input.c
==============================================================================
--- head/sys/netinet6/ip6_input.c	Thu May 13 19:36:13 2010	(r208042)
+++ head/sys/netinet6/ip6_input.c	Thu May 13 19:47:36 2010	(r208043)
@@ -116,7 +116,7 @@ __FBSDID("$FreeBSD$");
 
 #ifdef FLOWTABLE
 #include 
-extern int VNET_NAME(ip6_output_flowtable_size) __section(VNET_SETNAME);
+VNET_DECLARE(int, ip6_output_flowtable_size);
 #define	V_ip6_output_flowtable_size	VNET(ip6_output_flowtable_size)
 #endif
 

From owner-svn-src-head@FreeBSD.ORG  Thu May 13 20:32:56 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 94E211065670;
	Thu, 13 May 2010 20:32:56 +0000 (UTC) (envelope-from mm@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 807A38FC13;
	Thu, 13 May 2010 20:32:56 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4DKWubm041442;
	Thu, 13 May 2010 20:32:56 GMT (envelope-from mm@svn.freebsd.org)
Received: (from mm@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4DKWuFI041431;
	Thu, 13 May 2010 20:32:56 GMT (envelope-from mm@svn.freebsd.org)
Message-Id: <201005132032.o4DKWuFI041431@svn.freebsd.org>
From: Martin Matuska 
Date: Thu, 13 May 2010 20:32:56 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r208047 - in head: cddl/contrib/opensolaris/cmd/zdb
	cddl/contrib/opensolaris/cmd/ztest
	cddl/contrib/opensolaris/lib/libzpool/common
	cddl/contrib/opensolaris/lib/libzpool/common/sys sys/...
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 13 May 2010 20:32:56 -0000

Author: mm
Date: Thu May 13 20:32:56 2010
New Revision: 208047
URL: http://svn.freebsd.org/changeset/base/208047

Log:
  Import OpenSolaris revision 7837:001de5627df3
  It includes the following changes:
  - parallel reads in traversal code (Bug ID 6333409)
  - faster traversal for zfs send (Bug ID 6418042)
  - traversal code cleanup (Bug ID 6725675)
  - fix for two scrub related bugs (Bug ID 6729696, 6730101)
  - fix assertion in dbuf_verify (Bug ID 6752226)
  - fix panic during zfs send with i/o errors (Bug ID 6577985)
  - replace P2CROSS with P2BOUNDARY (Bug ID 6725680)
  
  List of OpenSolaris Bug IDs:
  6333409, 6418042, 6757112, 6725668, 6725675, 6725680,
  6725698, 6729696, 6730101, 6752226, 6577985, 6755042
  
  Approved by:	pjd, delphij (mentor)
  Obtained from:	OpenSolaris (multiple Bug IDs)
  MFC after:	1 week

Modified:
  head/cddl/contrib/opensolaris/cmd/zdb/zdb.c
  head/cddl/contrib/opensolaris/cmd/ztest/ztest.c
  head/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c
  head/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h
  head/cddl/contrib/opensolaris/lib/libzpool/common/taskq.c
  head/sys/cddl/boot/zfs/zfsimpl.h
  head/sys/cddl/compat/opensolaris/sys/sysmacros.h
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scrub.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_traverse.h
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_pool.h
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/txg_impl.h
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_cache.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c

Modified: head/cddl/contrib/opensolaris/cmd/zdb/zdb.c
==============================================================================
--- head/cddl/contrib/opensolaris/cmd/zdb/zdb.c	Thu May 13 20:31:24 2010	(r208046)
+++ head/cddl/contrib/opensolaris/cmd/zdb/zdb.c	Thu May 13 20:32:56 2010	(r208047)
@@ -50,6 +50,7 @@
 #include 
 #include 
 #include 
+#include 
 #undef ZFS_MAXNAMELEN
 #undef verify
 #include 
@@ -62,8 +63,6 @@ typedef void object_viewer_t(objset_t *,
 extern void dump_intent_log(zilog_t *);
 uint64_t *zopt_object = NULL;
 int zopt_objects = 0;
-int zdb_advance = ADVANCE_PRE;
-zbookmark_t zdb_noread = { 0, 0, ZB_NO_LEVEL, 0 };
 libzfs_handle_t *g_zfs;
 boolean_t zdb_sig_user_data = B_TRUE;
 int zdb_sig_cksumalg = ZIO_CHECKSUM_SHA256;
@@ -88,8 +87,8 @@ static void
 usage(void)
 {
 	(void) fprintf(stderr,
-	    "Usage: %s [-udibcsvL] [-U cachefile_path] [-O order] "
-	    "[-B os:obj:level:blkid] [-S user:cksumalg] "
+	    "Usage: %s [-udibcsv] [-U cachefile_path] "
+	    "[-S user:cksumalg] "
 	    "dataset [object...]\n"
 	    "       %s -C [pool]\n"
 	    "       %s -l dev\n"
@@ -109,13 +108,8 @@ usage(void)
 	    "dump blkptr signatures\n");
 	(void) fprintf(stderr, "	-v verbose (applies to all others)\n");
 	(void) fprintf(stderr, "        -l dump label contents\n");
-	(void) fprintf(stderr, "	-L live pool (allows some errors)\n");
-	(void) fprintf(stderr, "	-O [!] "
-	    "visitation order\n");
 	(void) fprintf(stderr, "	-U cachefile_path -- use alternate "
 	    "cachefile\n");
-	(void) fprintf(stderr, "	-B objset:object:level:blkid -- "
-	    "simulate bad block\n");
 	(void) fprintf(stderr, "        -R read and display block from a "
 	    "device\n");
 	(void) fprintf(stderr, "        -e Pool is exported/destroyed/"
@@ -138,7 +132,7 @@ fatal(const char *fmt, ...)
 	va_end(ap);
 	(void) fprintf(stderr, "\n");
 
-	exit(1);
+	abort();
 }
 
 static void
@@ -571,7 +565,7 @@ dump_dnode(objset_t *os, uint64_t object
 }
 
 static uint64_t
-blkid2offset(dnode_phys_t *dnp, int level, uint64_t blkid)
+blkid2offset(const dnode_phys_t *dnp, int level, uint64_t blkid)
 {
 	if (level < 0)
 		return (blkid);
@@ -602,115 +596,104 @@ sprintf_blkptr_compact(char *blkbuf, blk
 	    (u_longlong_t)bp->blk_birth);
 }
 
-/* ARGSUSED */
-static int
-zdb_indirect_cb(traverse_blk_cache_t *bc, spa_t *spa, void *a)
+static void
+print_indirect(blkptr_t *bp, const zbookmark_t *zb,
+    const dnode_phys_t *dnp)
 {
-	zbookmark_t *zb = &bc->bc_bookmark;
-	blkptr_t *bp = &bc->bc_blkptr;
-	void *data = bc->bc_data;
-	dnode_phys_t *dnp = bc->bc_dnode;
-	char blkbuf[BP_SPRINTF_LEN + 80];
+	char blkbuf[BP_SPRINTF_LEN];
 	int l;
 
-	if (bc->bc_errno) {
-		(void) sprintf(blkbuf,
-		    "Error %d reading <%llu, %llu, %lld, %llu>: ",
-		    bc->bc_errno,
-		    (u_longlong_t)zb->zb_objset,
-		    (u_longlong_t)zb->zb_object,
-		    (u_longlong_t)zb->zb_level,
-		    (u_longlong_t)zb->zb_blkid);
-		goto out;
-	}
-
-	if (zb->zb_level == -1) {
-		ASSERT3U(BP_GET_TYPE(bp), ==, DMU_OT_OBJSET);
-		ASSERT3U(BP_GET_LEVEL(bp), ==, 0);
-	} else {
-		ASSERT3U(BP_GET_TYPE(bp), ==, dnp->dn_type);
-		ASSERT3U(BP_GET_LEVEL(bp), ==, zb->zb_level);
-	}
-
-	if (zb->zb_level > 0) {
-		uint64_t fill = 0;
-		blkptr_t *bpx, *bpend;
-
-		for (bpx = data, bpend = bpx + BP_GET_LSIZE(bp) / sizeof (*bpx);
-		    bpx < bpend; bpx++) {
-			if (bpx->blk_birth != 0) {
-				fill += bpx->blk_fill;
-			} else {
-				ASSERT(bpx->blk_fill == 0);
-			}
-		}
-		ASSERT3U(fill, ==, bp->blk_fill);
-	}
+	ASSERT3U(BP_GET_TYPE(bp), ==, dnp->dn_type);
+	ASSERT3U(BP_GET_LEVEL(bp), ==, zb->zb_level);
 
-	if (zb->zb_level == 0 && dnp->dn_type == DMU_OT_DNODE) {
-		uint64_t fill = 0;
-		dnode_phys_t *dnx, *dnend;
-
-		for (dnx = data, dnend = dnx + (BP_GET_LSIZE(bp)>>DNODE_SHIFT);
-		    dnx < dnend; dnx++) {
-			if (dnx->dn_type != DMU_OT_NONE)
-				fill++;
-		}
-		ASSERT3U(fill, ==, bp->blk_fill);
-	}
-
-	(void) sprintf(blkbuf, "%16llx ",
+	(void) printf("%16llx ",
 	    (u_longlong_t)blkid2offset(dnp, zb->zb_level, zb->zb_blkid));
 
 	ASSERT(zb->zb_level >= 0);
 
 	for (l = dnp->dn_nlevels - 1; l >= -1; l--) {
 		if (l == zb->zb_level) {
-			(void) sprintf(blkbuf + strlen(blkbuf), "L%llx",
-			    (u_longlong_t)zb->zb_level);
+			(void) printf("L%llx", (u_longlong_t)zb->zb_level);
 		} else {
-			(void) sprintf(blkbuf + strlen(blkbuf), " ");
+			(void) printf(" ");
 		}
 	}
 
-out:
-	if (bp->blk_birth == 0) {
-		(void) sprintf(blkbuf + strlen(blkbuf), "");
-		(void) printf("%s\n", blkbuf);
-	} else {
-		sprintf_blkptr_compact(blkbuf + strlen(blkbuf), bp,
-		    dump_opt['d'] > 5 ? 1 : 0);
-		(void) printf("%s\n", blkbuf);
+	sprintf_blkptr_compact(blkbuf, bp, dump_opt['d'] > 5 ? 1 : 0);
+	(void) printf("%s\n", blkbuf);
+}
+
+#define	SET_BOOKMARK(zb, objset, object, level, blkid)  \
+{                                                       \
+	(zb)->zb_objset = objset;                       \
+	(zb)->zb_object = object;                       \
+	(zb)->zb_level = level;                         \
+	(zb)->zb_blkid = blkid;                         \
+}
+
+static int
+visit_indirect(spa_t *spa, const dnode_phys_t *dnp,
+    blkptr_t *bp, const zbookmark_t *zb)
+{
+	int err;
+
+	if (bp->blk_birth == 0)
+		return (0);
+
+	print_indirect(bp, zb, dnp);
+
+	if (BP_GET_LEVEL(bp) > 0) {
+		uint32_t flags = ARC_WAIT;
+		int i;
+		blkptr_t *cbp;
+		int epb = BP_GET_LSIZE(bp) >> SPA_BLKPTRSHIFT;
+		arc_buf_t *buf;
+		uint64_t fill = 0;
+
+		err = arc_read_nolock(NULL, spa, bp, arc_getbuf_func, &buf,
+		    ZIO_PRIORITY_ASYNC_READ, ZIO_FLAG_CANFAIL, &flags, zb);
+		if (err)
+			return (err);
+
+		/* recursively visit blocks below this */
+		cbp = buf->b_data;
+		for (i = 0; i < epb; i++, cbp++) {
+			zbookmark_t czb;
+
+			SET_BOOKMARK(&czb, zb->zb_objset, zb->zb_object,
+			    zb->zb_level - 1,
+			    zb->zb_blkid * epb + i);
+			err = visit_indirect(spa, dnp, cbp, &czb);
+			if (err)
+				break;
+			fill += cbp->blk_fill;
+		}
+		ASSERT3U(fill, ==, bp->blk_fill);
+		(void) arc_buf_remove_ref(buf, &buf);
 	}
 
-	return (bc->bc_errno ? ERESTART : 0);
+	return (err);
 }
 
 /*ARGSUSED*/
 static void
-dump_indirect(objset_t *os, uint64_t object, void *data, size_t size)
+dump_indirect(dnode_t *dn)
 {
-	traverse_handle_t *th;
-	uint64_t objset = dmu_objset_id(os);
-	int advance = zdb_advance;
+	dnode_phys_t *dnp = dn->dn_phys;
+	int j;
+	zbookmark_t czb;
 
 	(void) printf("Indirect blocks:\n");
 
-	if (object == 0)
-		advance |= ADVANCE_DATA;
-
-	th = traverse_init(dmu_objset_spa(os), zdb_indirect_cb, NULL, advance,
-	    ZIO_FLAG_CANFAIL);
-	th->th_noread = zdb_noread;
-
-	traverse_add_dnode(th, 0, -1ULL, objset, object);
-
-	while (traverse_more(th) == EAGAIN)
-		continue;
+	SET_BOOKMARK(&czb, dmu_objset_id(&dn->dn_objset->os),
+	    dn->dn_object, dnp->dn_nlevels - 1, 0);
+	for (j = 0; j < dnp->dn_nblkptr; j++) {
+		czb.zb_blkid = j;
+		(void) visit_indirect(dmu_objset_spa(&dn->dn_objset->os), dnp,
+		    &dnp->dn_blkptr[j], &czb);
+	}
 
 	(void) printf("\n");
-
-	traverse_fini(th);
 }
 
 /*ARGSUSED*/
@@ -1093,7 +1076,7 @@ dump_object(objset_t *os, uint64_t objec
 	}
 
 	if (verbosity >= 5)
-		dump_indirect(os, object, NULL, 0);
+		dump_indirect(dn);
 
 	if (verbosity >= 5) {
 		/*
@@ -1458,18 +1441,17 @@ typedef struct zdb_blkstats {
 #define	DMU_OT_DEFERRED	DMU_OT_NONE
 #define	DMU_OT_TOTAL	DMU_OT_NUMTYPES
 
-#define	ZB_TOTAL	ZB_MAXLEVEL
+#define	ZB_TOTAL	DN_MAX_LEVELS
 
 typedef struct zdb_cb {
 	zdb_blkstats_t	zcb_type[ZB_TOTAL + 1][DMU_OT_TOTAL + 1];
 	uint64_t	zcb_errors[256];
-	traverse_blk_cache_t *zcb_cache;
 	int		zcb_readfails;
 	int		zcb_haderrors;
 } zdb_cb_t;
 
 static void
-zdb_count_block(spa_t *spa, zdb_cb_t *zcb, blkptr_t *bp, int type)
+zdb_count_block(spa_t *spa, zdb_cb_t *zcb, blkptr_t *bp, dmu_object_type_t type)
 {
 	for (int i = 0; i < 4; i++) {
 		int l = (i < 2) ? BP_GET_LEVEL(bp) : ZB_TOTAL;
@@ -1485,7 +1467,7 @@ zdb_count_block(spa_t *spa, zdb_cb_t *zc
 	if (dump_opt['S']) {
 		boolean_t print_sig;
 
-		print_sig  = !zdb_sig_user_data || (BP_GET_LEVEL(bp) == 0 &&
+		print_sig = !zdb_sig_user_data || (BP_GET_LEVEL(bp) == 0 &&
 		    BP_GET_TYPE(bp) == DMU_OT_PLAIN_FILE_CONTENTS);
 
 		if (BP_GET_CHECKSUM(bp) < zdb_sig_cksumalg)
@@ -1507,56 +1489,55 @@ zdb_count_block(spa_t *spa, zdb_cb_t *zc
 		}
 	}
 
-	if (!dump_opt['L'])
-		VERIFY(zio_wait(zio_claim(NULL, spa, spa_first_txg(spa), bp,
-		    NULL, NULL, ZIO_FLAG_MUSTSUCCEED)) == 0);
+	VERIFY(zio_wait(zio_claim(NULL, spa, spa_first_txg(spa), bp,
+	    NULL, NULL, ZIO_FLAG_MUSTSUCCEED)) == 0);
 }
 
 static int
-zdb_blkptr_cb(traverse_blk_cache_t *bc, spa_t *spa, void *arg)
+zdb_blkptr_cb(spa_t *spa, blkptr_t *bp, const zbookmark_t *zb,
+    const dnode_phys_t *dnp, void *arg)
 {
-	zbookmark_t *zb = &bc->bc_bookmark;
 	zdb_cb_t *zcb = arg;
-	blkptr_t *bp = &bc->bc_blkptr;
-	dmu_object_type_t type = BP_GET_TYPE(bp);
 	char blkbuf[BP_SPRINTF_LEN];
-	int error = 0;
 
-	ASSERT(!BP_IS_HOLE(bp));
+	if (bp == NULL)
+		return (0);
 
-	zdb_count_block(spa, zcb, bp, type);
+	zdb_count_block(spa, zcb, bp, BP_GET_TYPE(bp));
 
-	if (bc->bc_errno) {
-		if (zcb->zcb_readfails++ < 10 && dump_opt['L']) {
-			uberblock_t ub;
-			vdev_uberblock_load(NULL, spa->spa_root_vdev, &ub);
-			if (ub.ub_txg != 0)
-				spa->spa_ubsync = ub;
-			error = EAGAIN;
-		} else {
+	if (dump_opt['c'] || dump_opt['S']) {
+		int ioerr, size;
+		void *data;
+
+		size = BP_GET_LSIZE(bp);
+		data = malloc(size);
+		ioerr = zio_wait(zio_read(NULL, spa, bp, data, size,
+		    NULL, NULL, ZIO_PRIORITY_ASYNC_READ,
+		    ZIO_FLAG_CANFAIL | ZIO_FLAG_SCRUB, zb));
+		free(data);
+
+		/* We expect io errors on intent log */
+		if (ioerr && BP_GET_TYPE(bp) != DMU_OT_INTENT_LOG) {
 			zcb->zcb_haderrors = 1;
-			zcb->zcb_errors[bc->bc_errno]++;
-			error = ERESTART;
-		}
+			zcb->zcb_errors[ioerr]++;
 
-		if (dump_opt['b'] >= 3 || (dump_opt['b'] >= 2 && bc->bc_errno))
-			sprintf_blkptr(blkbuf, BP_SPRINTF_LEN, bp);
-		else
-			blkbuf[0] = '\0';
+			if (dump_opt['b'] >= 2)
+				sprintf_blkptr(blkbuf, BP_SPRINTF_LEN, bp);
+			else
+				blkbuf[0] = '\0';
 
-		if (!dump_opt['S']) {
-			(void) printf("zdb_blkptr_cb: Got error %d reading "
-			    "<%llu, %llu, %lld, %llx> %s -- %s\n",
-			    bc->bc_errno,
-			    (u_longlong_t)zb->zb_objset,
-			    (u_longlong_t)zb->zb_object,
-			    (u_longlong_t)zb->zb_level,
-			    (u_longlong_t)zb->zb_blkid,
-			    blkbuf,
-			    error == EAGAIN ? "retrying" : "skipping");
+			if (!dump_opt['S']) {
+				(void) printf("zdb_blkptr_cb: "
+				    "Got error %d reading "
+				    "<%llu, %llu, %lld, %llx> %s -- skipping\n",
+				    ioerr,
+				    (u_longlong_t)zb->zb_objset,
+				    (u_longlong_t)zb->zb_object,
+				    (u_longlong_t)zb->zb_level,
+				    (u_longlong_t)zb->zb_blkid,
+				    blkbuf);
+			}
 		}
-
-		return (error);
 	}
 
 	zcb->zcb_readfails = 0;
@@ -1566,8 +1547,8 @@ zdb_blkptr_cb(traverse_blk_cache_t *bc, 
 		(void) printf("objset %llu object %llu offset 0x%llx %s\n",
 		    (u_longlong_t)zb->zb_objset,
 		    (u_longlong_t)zb->zb_object,
-		    (u_longlong_t)blkid2offset(bc->bc_dnode,
-		    zb->zb_level, zb->zb_blkid), blkbuf);
+		    (u_longlong_t)blkid2offset(dnp, zb->zb_level, zb->zb_blkid),
+		    blkbuf);
 	}
 
 	return (0);
@@ -1576,22 +1557,12 @@ zdb_blkptr_cb(traverse_blk_cache_t *bc, 
 static int
 dump_block_stats(spa_t *spa)
 {
-	traverse_handle_t *th;
 	zdb_cb_t zcb = { 0 };
-	traverse_blk_cache_t dummy_cache = { 0 };
 	zdb_blkstats_t *zb, *tzb;
 	uint64_t alloc, space, logalloc;
 	vdev_t *rvd = spa->spa_root_vdev;
 	int leaks = 0;
-	int advance = zdb_advance;
-	int c, e, flags;
-
-	zcb.zcb_cache = &dummy_cache;
-
-	if (dump_opt['c'] || dump_opt['S'])
-		advance |= ADVANCE_DATA;
-
-	advance |= ADVANCE_PRUNE | ADVANCE_ZIL;
+	int c, e;
 
 	if (!dump_opt['S']) {
 		(void) printf("\nTraversing all blocks to %sverify"
@@ -1607,8 +1578,7 @@ dump_block_stats(spa_t *spa)
 	 * it's not part of any space map) is a double allocation,
 	 * reference to a freed block, or an unclaimed log block.
 	 */
-	if (!dump_opt['L'])
-		zdb_leak_init(spa);
+	zdb_leak_init(spa);
 
 	/*
 	 * If there's a deferred-free bplist, process that first.
@@ -1634,22 +1604,7 @@ dump_block_stats(spa_t *spa)
 		bplist_close(bpl);
 	}
 
-	/*
-	 * Now traverse the pool.  If we're reading all data to verify
-	 * checksums, do a scrubbing read so that we validate all copies.
-	 */
-	flags = ZIO_FLAG_CANFAIL;
-	if (advance & ADVANCE_DATA)
-		flags |= ZIO_FLAG_SCRUB;
-	th = traverse_init(spa, zdb_blkptr_cb, &zcb, advance, flags);
-	th->th_noread = zdb_noread;
-
-	traverse_add_pool(th, 0, spa_first_txg(spa) + TXG_CONCURRENT_STATES);
-
-	while (traverse_more(th) == EAGAIN)
-		continue;
-
-	traverse_fini(th);
+	zcb.zcb_haderrors |= traverse_pool(spa, zdb_blkptr_cb, &zcb);
 
 	if (zcb.zcb_haderrors && !dump_opt['S']) {
 		(void) printf("\nError counts:\n\n");
@@ -1665,8 +1620,7 @@ dump_block_stats(spa_t *spa)
 	/*
 	 * Report any leaked segments.
 	 */
-	if (!dump_opt['L'])
-		zdb_leak_fini(spa);
+	zdb_leak_fini(spa);
 
 	/*
 	 * If we're interested in printing out the blkptr signatures,
@@ -1676,10 +1630,6 @@ dump_block_stats(spa_t *spa)
 	if (dump_opt['S'])
 		return (zcb.zcb_haderrors ? 3 : 0);
 
-	if (dump_opt['L'])
-		(void) printf("\n\n *** Live pool traversal; "
-		    "block counts are only approximate ***\n\n");
-
 	alloc = spa_get_alloc(spa);
 	space = spa_get_space(spa);
 
@@ -2285,7 +2235,6 @@ main(int argc, char **argv)
 	int dump_all = 1;
 	int verbose = 0;
 	int error;
-	int flag, set;
 	int exported = 0;
 	char *vdev_dir = NULL;
 
@@ -2294,7 +2243,7 @@ main(int argc, char **argv)
 
 	dprintf_setup(&argc, argv);
 
-	while ((c = getopt(argc, argv, "udibcsvCLO:B:S:U:lRep:")) != -1) {
+	while ((c = getopt(argc, argv, "udibcsvCS:U:lRep:")) != -1) {
 		switch (c) {
 		case 'u':
 		case 'd':
@@ -2308,49 +2257,6 @@ main(int argc, char **argv)
 			dump_opt[c]++;
 			dump_all = 0;
 			break;
-		case 'L':
-			dump_opt[c]++;
-			break;
-		case 'O':
-			endstr = optarg;
-			if (endstr[0] == '!') {
-				endstr++;
-				set = 0;
-			} else {
-				set = 1;
-			}
-			if (strcmp(endstr, "post") == 0) {
-				flag = ADVANCE_PRE;
-				set = !set;
-			} else if (strcmp(endstr, "pre") == 0) {
-				flag = ADVANCE_PRE;
-			} else if (strcmp(endstr, "prune") == 0) {
-				flag = ADVANCE_PRUNE;
-			} else if (strcmp(endstr, "data") == 0) {
-				flag = ADVANCE_DATA;
-			} else if (strcmp(endstr, "holes") == 0) {
-				flag = ADVANCE_HOLES;
-			} else {
-				usage();
-			}
-			if (set)
-				zdb_advance |= flag;
-			else
-				zdb_advance &= ~flag;
-			break;
-		case 'B':
-			endstr = optarg - 1;
-			zdb_noread.zb_objset = strtoull(endstr + 1, &endstr, 0);
-			zdb_noread.zb_object = strtoull(endstr + 1, &endstr, 0);
-			zdb_noread.zb_level = strtol(endstr + 1, &endstr, 0);
-			zdb_noread.zb_blkid = strtoull(endstr + 1, &endstr, 16);
-			(void) printf("simulating bad block "
-			    "<%llu, %llu, %lld, %llx>\n",
-			    (u_longlong_t)zdb_noread.zb_objset,
-			    (u_longlong_t)zdb_noread.zb_object,
-			    (u_longlong_t)zdb_noread.zb_level,
-			    (u_longlong_t)zdb_noread.zb_blkid);
-			break;
 		case 'v':
 			verbose++;
 			break;
@@ -2387,21 +2293,17 @@ main(int argc, char **argv)
 		}
 	}
 
-	if (vdev_dir != NULL && exported == 0)
-		(void) fatal("-p option requires use of -e\n");
+	if (vdev_dir != NULL && exported == 0) {
+		(void) fprintf(stderr, "-p option requires use of -e\n");
+		usage();
+	}
 
 	kernel_init(FREAD);
 	g_zfs = libzfs_init();
 	ASSERT(g_zfs != NULL);
 
-	/*
-	 * Disable vdev caching.  If we don't do this, live pool traversal
-	 * won't make progress because it will never see disk updates.
-	 */
-	zfs_vdev_cache_size = 0;
-
 	for (c = 0; c < 256; c++) {
-		if (dump_all && c != 'L' && c != 'l' && c != 'R')
+		if (dump_all && c != 'l' && c != 'R')
 			dump_opt[c] = 1;
 		if (dump_opt[c])
 			dump_opt[c] += verbose;

Modified: head/cddl/contrib/opensolaris/cmd/ztest/ztest.c
==============================================================================
--- head/cddl/contrib/opensolaris/cmd/ztest/ztest.c	Thu May 13 20:31:24 2010	(r208046)
+++ head/cddl/contrib/opensolaris/cmd/ztest/ztest.c	Thu May 13 20:32:56 2010	(r208047)
@@ -77,7 +77,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -151,7 +150,6 @@ typedef struct ztest_args {
 	hrtime_t	za_start;
 	hrtime_t	za_stop;
 	hrtime_t	za_kill;
-	traverse_handle_t *za_th;
 	/*
 	 * Thread-local variables can go here to aid debugging.
 	 */
@@ -206,7 +204,6 @@ ztest_info_t ztest_info[] = {
 	{ ztest_dmu_object_alloc_free,		1,	&zopt_always	},
 	{ ztest_zap,				30,	&zopt_always	},
 	{ ztest_zap_parallel,			100,	&zopt_always	},
-	{ ztest_traverse,			1,	&zopt_often	},
 	{ ztest_dsl_prop_get_set,		1,	&zopt_sometimes	},
 	{ ztest_dmu_objset_create_destroy,	1,	&zopt_sometimes },
 	{ ztest_dmu_snapshot_create_destroy,	1,	&zopt_sometimes },
@@ -1447,152 +1444,6 @@ ztest_dmu_snapshot_create_destroy(ztest_
 	(void) rw_unlock(&ztest_shared->zs_name_lock);
 }
 
-#define	ZTEST_TRAVERSE_BLOCKS	1000
-
-static int
-ztest_blk_cb(traverse_blk_cache_t *bc, spa_t *spa, void *arg)
-{
-	ztest_args_t *za = arg;
-	zbookmark_t *zb = &bc->bc_bookmark;
-	blkptr_t *bp = &bc->bc_blkptr;
-	dnode_phys_t *dnp = bc->bc_dnode;
-	traverse_handle_t *th = za->za_th;
-	uint64_t size = BP_GET_LSIZE(bp);
-
-	/*
-	 * Level -1 indicates the objset_phys_t or something in its intent log.
-	 */
-	if (zb->zb_level == -1) {
-		if (BP_GET_TYPE(bp) == DMU_OT_OBJSET) {
-			ASSERT3U(zb->zb_object, ==, 0);
-			ASSERT3U(zb->zb_blkid, ==, 0);
-			ASSERT3U(size, ==, sizeof (objset_phys_t));
-			za->za_zil_seq = 0;
-		} else if (BP_GET_TYPE(bp) == DMU_OT_INTENT_LOG) {
-			ASSERT3U(zb->zb_object, ==, 0);
-			ASSERT3U(zb->zb_blkid, >, za->za_zil_seq);
-			za->za_zil_seq = zb->zb_blkid;
-		} else {
-			ASSERT3U(zb->zb_object, !=, 0);	/* lr_write_t */
-		}
-
-		return (0);
-	}
-
-	ASSERT(dnp != NULL);
-
-	if (bc->bc_errno)
-		return (ERESTART);
-
-	/*
-	 * Once in a while, abort the traverse.   We only do this to odd
-	 * instance numbers to ensure that even ones can run to completion.
-	 */
-	if ((za->za_instance & 1) && ztest_random(10000) == 0)
-		return (EINTR);
-
-	if (bp->blk_birth == 0) {
-		ASSERT(th->th_advance & ADVANCE_HOLES);
-		return (0);
-	}
-
-	if (zb->zb_level == 0 && !(th->th_advance & ADVANCE_DATA) &&
-	    bc == &th->th_cache[ZB_DN_CACHE][0]) {
-		ASSERT(bc->bc_data == NULL);
-		return (0);
-	}
-
-	ASSERT(bc->bc_data != NULL);
-
-	/*
-	 * This is an expensive question, so don't ask it too often.
-	 */
-	if (((za->za_random ^ th->th_callbacks) & 0xff) == 0) {
-		void *xbuf = umem_alloc(size, UMEM_NOFAIL);
-		if (arc_tryread(spa, bp, xbuf) == 0) {
-			ASSERT(bcmp(bc->bc_data, xbuf, size) == 0);
-		}
-		umem_free(xbuf, size);
-	}
-
-	if (zb->zb_level > 0) {
-		ASSERT3U(size, ==, 1ULL << dnp->dn_indblkshift);
-		return (0);
-	}
-
-	ASSERT(zb->zb_level == 0);
-	ASSERT3U(size, ==, dnp->dn_datablkszsec << DEV_BSHIFT);
-
-	return (0);
-}
-
-/*
- * Verify that live pool traversal works.
- */
-void
-ztest_traverse(ztest_args_t *za)
-{
-	spa_t *spa = za->za_spa;
-	traverse_handle_t *th = za->za_th;
-	int rc, advance;
-	uint64_t cbstart, cblimit;
-
-	if (th == NULL) {
-		advance = 0;
-
-		if (ztest_random(2) == 0)
-			advance |= ADVANCE_PRE;
-
-		if (ztest_random(2) == 0)
-			advance |= ADVANCE_PRUNE;
-
-		if (ztest_random(2) == 0)
-			advance |= ADVANCE_DATA;
-
-		if (ztest_random(2) == 0)
-			advance |= ADVANCE_HOLES;
-
-		if (ztest_random(2) == 0)
-			advance |= ADVANCE_ZIL;
-
-		th = za->za_th = traverse_init(spa, ztest_blk_cb, za, advance,
-		    ZIO_FLAG_CANFAIL);
-
-		traverse_add_pool(th, 0, -1ULL);
-	}
-
-	advance = th->th_advance;
-	cbstart = th->th_callbacks;
-	cblimit = cbstart + ((advance & ADVANCE_DATA) ? 100 : 1000);
-
-	while ((rc = traverse_more(th)) == EAGAIN && th->th_callbacks < cblimit)
-		continue;
-
-	if (zopt_verbose >= 5)
-		(void) printf("traverse %s%s%s%s %llu blocks to "
-		    "<%llu, %llu, %lld, %llx>%s\n",
-		    (advance & ADVANCE_PRE) ? "pre" : "post",
-		    (advance & ADVANCE_PRUNE) ? "|prune" : "",
-		    (advance & ADVANCE_DATA) ? "|data" : "",
-		    (advance & ADVANCE_HOLES) ? "|holes" : "",
-		    (u_longlong_t)(th->th_callbacks - cbstart),
-		    (u_longlong_t)th->th_lastcb.zb_objset,
-		    (u_longlong_t)th->th_lastcb.zb_object,
-		    (u_longlong_t)th->th_lastcb.zb_level,
-		    (u_longlong_t)th->th_lastcb.zb_blkid,
-		    rc == 0 ? " [done]" :
-		    rc == EINTR ? " [aborted]" :
-		    rc == EAGAIN ? "" :
-		    strerror(rc));
-
-	if (rc != EAGAIN) {
-		if (rc != 0 && rc != EINTR)
-			fatal(0, "traverse_more(%p) = %d", th, rc);
-		traverse_fini(th);
-		za->za_th = NULL;
-	}
-}
-
 /*
  * Verify dsl_dataset_promote handles EBUSY
  */
@@ -3067,12 +2918,12 @@ ztest_verify_blocks(char *pool)
 	isa = strdup(isa);
 	/* LINTED */
 	(void) sprintf(bin,
-	    "/usr/sbin%.*s/zdb -bc%s%s -U /tmp/zpool.cache -O %s %s",
+	    "/usr/sbin%.*s/zdb -bc%s%s -U /tmp/zpool.cache %s",
 	    isalen,
 	    isa,
 	    zopt_verbose >= 3 ? "s" : "",
 	    zopt_verbose >= 4 ? "v" : "",
-	    ztest_random(2) == 0 ? "pre" : "post", pool);
+	    pool);
 	free(isa);
 
 	if (zopt_verbose >= 5)
@@ -3438,8 +3289,6 @@ ztest_run(char *pool)
 
 	while (--t >= 0) {
 		VERIFY(thr_join(za[t].za_thread, NULL, NULL) == 0);
-		if (za[t].za_th)
-			traverse_fini(za[t].za_th);
 		if (t < zopt_datasets) {
 			zil_close(za[t].za_zilog);
 			dmu_objset_close(za[t].za_os);

Modified: head/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c
==============================================================================
--- head/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c	Thu May 13 20:31:24 2010	(r208046)
+++ head/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c	Thu May 13 20:32:56 2010	(r208047)
@@ -23,8 +23,6 @@
  * Use is subject to license terms.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include 
 #include 
 #include 
@@ -842,6 +840,8 @@ kernel_init(int mode)
 	VERIFY((random_fd = open("/dev/random", O_RDONLY)) != -1);
 	VERIFY((urandom_fd = open("/dev/urandom", O_RDONLY)) != -1);
 
+	system_taskq_init();
+
 	spa_init(mode);
 }
 

Modified: head/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h
==============================================================================
--- head/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h	Thu May 13 20:31:24 2010	(r208046)
+++ head/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h	Thu May 13 20:32:56 2010	(r208047)
@@ -334,11 +334,14 @@ typedef void (task_func_t)(void *);
 #define	TQ_NOSLEEP	KM_NOSLEEP	/* cannot block for memory; may fail */
 #define	TQ_NOQUEUE	0x02	/* Do not enqueue if can't dispatch */
 
+extern taskq_t *system_taskq;
+
 extern taskq_t	*taskq_create(const char *, int, pri_t, int, int, uint_t);
 extern taskqid_t taskq_dispatch(taskq_t *, task_func_t, void *, uint_t);
 extern void	taskq_destroy(taskq_t *);
 extern void	taskq_wait(taskq_t *);
 extern int	taskq_member(taskq_t *, void *);
+extern void	system_taskq_init(void);
 
 #define	XVA_MAPSIZE	3
 #define	XVA_MAGIC	0x78766174

Modified: head/cddl/contrib/opensolaris/lib/libzpool/common/taskq.c
==============================================================================
--- head/cddl/contrib/opensolaris/lib/libzpool/common/taskq.c	Thu May 13 20:31:24 2010	(r208046)
+++ head/cddl/contrib/opensolaris/lib/libzpool/common/taskq.c	Thu May 13 20:32:56 2010	(r208047)
@@ -19,15 +19,14 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include 
 
 int taskq_now;
+taskq_t *system_taskq;
 
 typedef struct task {
 	struct task	*task_next;
@@ -253,3 +252,10 @@ taskq_member(taskq_t *tq, void *t)
 
 	return (0);
 }
+
+void
+system_taskq_init(void)
+{
+	system_taskq = taskq_create("system_taskq", 64, minclsyspri, 4, 512,
+	    TASKQ_DYNAMIC | TASKQ_PREPOPULATE);
+}

Modified: head/sys/cddl/boot/zfs/zfsimpl.h
==============================================================================
--- head/sys/cddl/boot/zfs/zfsimpl.h	Thu May 13 20:31:24 2010	(r208046)
+++ head/sys/cddl/boot/zfs/zfsimpl.h	Thu May 13 20:32:56 2010	(r208047)
@@ -66,7 +66,7 @@
 #define	P2ROUNDUP(x, align)		(-(-(x) & -(align)))
 #define	P2END(x, align)			(-(~(x) & -(align)))
 #define	P2PHASEUP(x, align, phase)	((phase) - (((phase) - (x)) & -(align)))
-#define	P2CROSS(x, y, align)		(((x) ^ (y)) > (align) - 1)
+#define	P2BOUNDARY(off, len, align)	(((off) ^ ((off) + (len) - 1)) > (align) - 1)
 
 /*
  * General-purpose 32-bit and 64-bit bitfield encodings.

Modified: head/sys/cddl/compat/opensolaris/sys/sysmacros.h
==============================================================================
--- head/sys/cddl/compat/opensolaris/sys/sysmacros.h	Thu May 13 20:31:24 2010	(r208046)
+++ head/sys/cddl/compat/opensolaris/sys/sysmacros.h	Thu May 13 20:32:56 2010	(r208047)
@@ -43,6 +43,10 @@ extern "C" {
 #define	ABS(a)	((a) < 0 ? -(a) : (a))
 #endif
 
+#ifndef	SIGNOF
+#define	SIGNOF(a)	((a) < 0 ? -1 : (a) > 0)
+#endif
+
 /*
  * Macro for checking power of 2 address alignment.
  */
@@ -63,7 +67,7 @@ extern "C" {
 #define	P2ROUNDUP(x, align)		(-(-(x) & -(align)))
 #define	P2END(x, align)			(-(~(x) & -(align)))
 #define	P2PHASEUP(x, align, phase)	((phase) - (((phase) - (x)) & -(align)))
-#define	P2CROSS(x, y, align)		(((x) ^ (y)) > (align) - 1)
+#define	P2BOUNDARY(off, len, align)	(((off) ^ ((off) + (len) - 1)) > (align) - 1)
 /*
  * Determine whether two numbers have the same high-order bit.
  */

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c	Thu May 13 20:31:24 2010	(r208046)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c	Thu May 13 20:32:56 2010	(r208047)
@@ -308,20 +308,18 @@ dbuf_verify(dmu_buf_impl_t *db)
 		ASSERT3U(db->db.db_offset, ==, db->db_blkid * db->db.db_size);
 	}
 
-	if (db->db_level == 0) {
-		/* we can be momentarily larger in dnode_set_blksz() */
-		if (db->db_blkid != DB_BONUS_BLKID && dn) {
-			ASSERT3U(db->db.db_size, >=, dn->dn_datablksz);
-		}
-		if (db->db.db_object == DMU_META_DNODE_OBJECT) {
-			dbuf_dirty_record_t *dr = db->db_data_pending;
-			/*
-			 * it should only be modified in syncing
-			 * context, so make sure we only have
-			 * one copy of the data.
-			 */
-			ASSERT(dr == NULL || dr->dt.dl.dr_data == db->db_buf);
-		}
+	/*
+	 * We can't assert that db_size matches dn_datablksz because it
+	 * can be momentarily different when another thread is doing
+	 * dnode_set_blksz().
+	 */
+	if (db->db_level == 0 && db->db.db_object == DMU_META_DNODE_OBJECT) {
+		dbuf_dirty_record_t *dr = db->db_data_pending;
+		/*
+		 * It should only be modified in syncing context, so
+		 * make sure we only have one copy of the data.
+		 */
+		ASSERT(dr == NULL || dr->dt.dl.dr_data == db->db_buf);
 	}
 
 	/* verify db->db_blkptr */

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c	Thu May 13 20:31:24 2010	(r208046)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c	Thu May 13 20:32:56 2010	(r208047)
@@ -23,8 +23,6 @@
  * Use is subject to license terms.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include 
 #include 
 #include 
@@ -172,66 +170,59 @@ dump_dnode(struct backuparg *ba, uint64_
 	(level) * (dnp->dn_indblkshift - SPA_BLKPTRSHIFT)))
 
 static int
-backup_cb(traverse_blk_cache_t *bc, spa_t *spa, void *arg)
+backup_cb(spa_t *spa, blkptr_t *bp, const zbookmark_t *zb,
+    const dnode_phys_t *dnp, void *arg)
 {
 	struct backuparg *ba = arg;
-	uint64_t object = bc->bc_bookmark.zb_object;
-	int level = bc->bc_bookmark.zb_level;
-	uint64_t blkid = bc->bc_bookmark.zb_blkid;
-	blkptr_t *bp = bc->bc_blkptr.blk_birth ? &bc->bc_blkptr : NULL;
 	dmu_object_type_t type = bp ? BP_GET_TYPE(bp) : DMU_OT_NONE;
-	void *data = bc->bc_data;
 	int err = 0;
 
 	if (issig(JUSTLOOKING) && issig(FORREAL))
 		return (EINTR);
 
-	ASSERT(data || bp == NULL);
-
-	if (bp == NULL && object == 0) {
-		uint64_t span = BP_SPAN(bc->bc_dnode, level);
-		uint64_t dnobj = (blkid * span) >> DNODE_SHIFT;
+	if (bp == NULL && zb->zb_object == 0) {
+		uint64_t span = BP_SPAN(dnp, zb->zb_level);
+		uint64_t dnobj = (zb->zb_blkid * span) >> DNODE_SHIFT;
 		err = dump_freeobjects(ba, dnobj, span >> DNODE_SHIFT);
 	} else if (bp == NULL) {
-		uint64_t span = BP_SPAN(bc->bc_dnode, level);
-		err = dump_free(ba, object, blkid * span, span);
-	} else if (data && level == 0 && type == DMU_OT_DNODE) {
-		dnode_phys_t *blk = data;
+		uint64_t span = BP_SPAN(dnp, zb->zb_level);
+		err = dump_free(ba, zb->zb_object, zb->zb_blkid * span, span);
+	} else if (zb->zb_level > 0 || type == DMU_OT_OBJSET) {
+		return (0);
+	} else if (type == DMU_OT_DNODE) {
+		dnode_phys_t *blk;
 		int i;
 		int blksz = BP_GET_LSIZE(bp);
+		uint32_t aflags = ARC_WAIT;
+		arc_buf_t *abuf;
 
+		if (arc_read_nolock(NULL, spa, bp,
+		    arc_getbuf_func, &abuf, ZIO_PRIORITY_ASYNC_READ,
+		    ZIO_FLAG_CANFAIL, &aflags, zb) != 0)
+			return (EIO);
+
+		blk = abuf->b_data;
 		for (i = 0; i < blksz >> DNODE_SHIFT; i++) {
-			uint64_t dnobj =
-			    (blkid << (DNODE_BLOCK_SHIFT - DNODE_SHIFT)) + i;
+			uint64_t dnobj = (zb->zb_blkid <<
+			    (DNODE_BLOCK_SHIFT - DNODE_SHIFT)) + i;
 			err = dump_dnode(ba, dnobj, blk+i);
 			if (err)
 				break;
 		}
-	} else if (level == 0 &&
-	    type != DMU_OT_DNODE && type != DMU_OT_OBJSET) {
+		(void) arc_buf_remove_ref(abuf, &abuf);
+	} else { /* it's a level-0 block of a regular object */
+		uint32_t aflags = ARC_WAIT;
+		arc_buf_t *abuf;
 		int blksz = BP_GET_LSIZE(bp);
-		if (data == NULL) {
-			uint32_t aflags = ARC_WAIT;
-			arc_buf_t *abuf;
-			zbookmark_t zb;
-
-			zb.zb_objset = ba->os->os->os_dsl_dataset->ds_object;
-			zb.zb_object = object;
-			zb.zb_level = level;
-			zb.zb_blkid = blkid;
-			(void) arc_read_nolock(NULL, spa, bp,
-			    arc_getbuf_func, &abuf, ZIO_PRIORITY_ASYNC_READ,
-			    ZIO_FLAG_MUSTSUCCEED, &aflags, &zb);
-
-			if (abuf) {
-				err = dump_data(ba, type, object, blkid * blksz,
-				    blksz, abuf->b_data);
-				(void) arc_buf_remove_ref(abuf, &abuf);

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

From owner-svn-src-head@FreeBSD.ORG  Thu May 13 20:48:41 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7881B1065670;
	Thu, 13 May 2010 20:48:41 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 67B328FC15;
	Thu, 13 May 2010 20:48:41 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4DKmeZk044974;
	Thu, 13 May 2010 20:48:40 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4DKmeZe044972;
	Thu, 13 May 2010 20:48:40 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <201005132048.o4DKmeZe044972@svn.freebsd.org>
From: Andrew Thompson 
Date: Thu, 13 May 2010 20:48:40 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r208048 - head/sys/conf
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 13 May 2010 20:48:41 -0000

Author: thompsa
Date: Thu May 13 20:48:39 2010
New Revision: 208048
URL: http://svn.freebsd.org/changeset/base/208048

Log:
  Allow the USB_REQ_DEBUG to be enabled in the kernel conf.
  
  Requested by:	HPS

Modified:
  head/sys/conf/options

Modified: head/sys/conf/options
==============================================================================
--- head/sys/conf/options	Thu May 13 20:32:56 2010	(r208047)
+++ head/sys/conf/options	Thu May 13 20:48:39 2010	(r208048)
@@ -639,6 +639,7 @@ BUS_DEBUG		opt_bus.h
 
 # options for USB support
 USB_DEBUG		opt_usb.h
+USB_REQ_DEBUG		opt_usb.h
 USB_VERBOSE		opt_usb.h
 USB_EHCI_BIG_ENDIAN_DESC	opt_usb.h
 U3G_DEBUG		opt_u3g.h

From owner-svn-src-head@FreeBSD.ORG  Thu May 13 20:55:59 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 763DB106564A;
	Thu, 13 May 2010 20:55:59 +0000 (UTC) (envelope-from mm@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 640D88FC0A;
	Thu, 13 May 2010 20:55:59 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4DKtxoG046660;
	Thu, 13 May 2010 20:55:59 GMT (envelope-from mm@svn.freebsd.org)
Received: (from mm@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4DKtxrM046654;
	Thu, 13 May 2010 20:55:59 GMT (envelope-from mm@svn.freebsd.org)
Message-Id: <201005132055.o4DKtxrM046654@svn.freebsd.org>
From: Martin Matuska 
Date: Thu, 13 May 2010 20:55:58 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r208050 -
	head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 13 May 2010 20:55:59 -0000

Author: mm
Date: Thu May 13 20:55:58 2010
New Revision: 208050
URL: http://svn.freebsd.org/changeset/base/208050

Log:
  Fix ZIL-related panic on zfs rollback.
  
  OpenSolaris onnv-revision: 8746:e1d96ca6808c
  
  Approved by:	pjd, delphij (mentor)
  Obtained from:	OpenSolaris (Bug ID 6796377)
  MCF after:	1 week

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scrub.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c	Thu May 13 20:51:20 2010	(r208049)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c	Thu May 13 20:55:58 2010	(r208050)
@@ -1915,7 +1915,6 @@ dbuf_sync_leaf(dbuf_dirty_record_t *dr, 
 	dnode_t *dn = db->db_dnode;
 	objset_impl_t *os = dn->dn_objset;
 	uint64_t txg = tx->tx_txg;
-	int blksz;
 
 	ASSERT(dmu_tx_is_syncing(tx));
 
@@ -2025,23 +2024,24 @@ dbuf_sync_leaf(dbuf_dirty_record_t *dr, 
 		return;
 	}
 
-	blksz = arc_buf_size(*datap);
-
-	if (dn->dn_object != DMU_META_DNODE_OBJECT) {
+	if (dn->dn_object != DMU_META_DNODE_OBJECT &&
+	    refcount_count(&db->db_holds) > 1 &&
+	    *datap == db->db_buf) {
 		/*
-		 * If this buffer is currently "in use" (i.e., there are
-		 * active holds and db_data still references it), then make
-		 * a copy before we start the write so that any modifications
-		 * from the open txg will not leak into this write.
+		 * If this buffer is currently "in use" (i.e., there
+		 * are active holds and db_data still references it),
+		 * then make a copy before we start the write so that
+		 * any modifications from the open txg will not leak
+		 * into this write.
 		 *
-		 * NOTE: this copy does not need to be made for objects only
-		 * modified in the syncing context (e.g. DNONE_DNODE blocks).
+		 * NOTE: this copy does not need to be made for
+		 * objects only modified in the syncing context (e.g.
+		 * DNONE_DNODE blocks).
 		 */
-		if (refcount_count(&db->db_holds) > 1 && *datap == db->db_buf) {
-			arc_buf_contents_t type = DBUF_GET_BUFC_TYPE(db);
-			*datap = arc_buf_alloc(os->os_spa, blksz, db, type);
-			bcopy(db->db.db_data, (*datap)->b_data, blksz);
-		}
+		int blksz = arc_buf_size(*datap);
+		arc_buf_contents_t type = DBUF_GET_BUFC_TYPE(db);
+		*datap = arc_buf_alloc(os->os_spa, blksz, db, type);
+		bcopy(db->db.db_data, (*datap)->b_data, blksz);
 	}
 
 	ASSERT(*datap != NULL);

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c	Thu May 13 20:51:20 2010	(r208049)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c	Thu May 13 20:55:58 2010	(r208050)
@@ -19,7 +19,7 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -226,10 +226,6 @@ traverse_visitbp(struct traverse_data *t
 			return (err);
 
 		osp = buf->b_data;
-		/*
-		 * traverse_zil is just here for zdb's leak checking.
-		 * For other consumers, there will be no ZIL blocks.
-		 */
 		traverse_zil(td, &osp->os_zil_header);
 
 		for (j = 0; j < osp->os_meta_dnode.dn_nblkptr; j++) {

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c	Thu May 13 20:51:20 2010	(r208049)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c	Thu May 13 20:55:58 2010	(r208050)
@@ -1171,8 +1171,18 @@ kill_blkptr(spa_t *spa, blkptr_t *bp, co
 	if (bp == NULL)
 		return (0);
 
-	ASSERT3U(bp->blk_birth, >, ka->ds->ds_phys->ds_prev_snap_txg);
-	(void) dsl_dataset_block_kill(ka->ds, bp, ka->zio, ka->tx);
+	if ((zb->zb_level == -1ULL && zb->zb_blkid != 0) ||
+	    (zb->zb_object != 0 && dnp == NULL)) {
+		/*
+		 * It's a block in the intent log.  It has no
+		 * accounting, so just free it.
+		 */
+		VERIFY3U(0, ==, dsl_free(ka->zio, ka->tx->tx_pool,
+		    ka->tx->tx_txg, bp, NULL, NULL, ARC_NOWAIT));
+	} else {
+		ASSERT3U(bp->blk_birth, >, ka->ds->ds_phys->ds_prev_snap_txg);
+		(void) dsl_dataset_block_kill(ka->ds, bp, ka->zio, ka->tx);
+	}
 
 	return (0);
 }
@@ -1216,13 +1226,7 @@ dsl_dataset_rollback_sync(void *arg1, vo
 
 	dmu_buf_will_dirty(ds->ds_dbuf, tx);
 
-	/*
-	 * Before the roll back destroy the zil.
-	 */
 	if (ds->ds_user_ptr != NULL) {
-		zil_rollback_destroy(
-		    ((objset_impl_t *)ds->ds_user_ptr)->os_zil, tx);
-
 		/*
 		 * We need to make sure that the objset_impl_t is reopened after
 		 * we do the rollback, otherwise it will have the wrong
@@ -1255,7 +1259,10 @@ dsl_dataset_rollback_sync(void *arg1, vo
 	    ds->ds_phys->ds_deadlist_obj));
 
 	{
-		/* Free blkptrs that we gave birth to */
+		/*
+		 * Free blkptrs that we gave birth to - this covers
+		 * claimed but not played log blocks too.
+		 */
 		zio_t *zio;
 		struct killarg ka;
 

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scrub.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scrub.c	Thu May 13 20:51:20 2010	(r208049)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scrub.c	Thu May 13 20:55:58 2010	(r208050)
@@ -344,6 +344,12 @@ traverse_zil_block(zilog_t *zilog, blkpt
 	if (bp->blk_birth <= dp->dp_scrub_min_txg)
 		return;
 
+	/*
+	 * One block ("stumpy") can be allocated a long time ago; we
+	 * want to visit that one because it has been allocated
+	 * (on-disk) even if it hasn't been claimed (even though for
+	 * plain scrub there's nothing to do to it).
+	 */
 	if (claim_txg == 0 && bp->blk_birth >= spa_first_txg(dp->dp_spa))
 		return;
 
@@ -369,6 +375,11 @@ traverse_zil_record(zilog_t *zilog, lr_t
 		if (bp->blk_birth <= dp->dp_scrub_min_txg)
 			return;
 
+		/*
+		 * birth can be < claim_txg if this record's txg is
+		 * already txg sync'ed (but this log block contains
+		 * other records that are not synced)
+		 */
 		if (claim_txg == 0 || bp->blk_birth < claim_txg)
 			return;
 

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c	Thu May 13 20:51:20 2010	(r208049)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c	Thu May 13 20:55:58 2010	(r208050)
@@ -19,7 +19,7 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -478,37 +478,6 @@ zil_destroy(zilog_t *zilog, boolean_t ke
 }
 
 /*
- * zil_rollback_destroy() is only called by the rollback code.
- * We already have a syncing tx. Rollback has exclusive access to the
- * dataset, so we don't have to worry about concurrent zil access.
- * The actual freeing of any log blocks occurs in zil_sync() later in
- * this txg syncing phase.
- */
-void
-zil_rollback_destroy(zilog_t *zilog, dmu_tx_t *tx)
-{
-	const zil_header_t *zh = zilog->zl_header;
-	uint64_t txg;
-
-	if (BP_IS_HOLE(&zh->zh_log))
-		return;
-
-	txg = dmu_tx_get_txg(tx);
-	ASSERT3U(zilog->zl_destroy_txg, <, txg);
-	zilog->zl_destroy_txg = txg;
-	zilog->zl_keep_first = B_FALSE;
-
-	/*
-	 * Ensure there's no outstanding ZIL IO.  No lwbs or just the
-	 * unused one that allocated in advance is ok.
-	 */
-	ASSERT(zilog->zl_lwb_list.list_head.list_next ==
-	    zilog->zl_lwb_list.list_head.list_prev);
-	(void) zil_parse(zilog, zil_free_log_block, zil_free_log_record,
-	    tx, zh->zh_claim_txg);
-}
-
-/*
  * return true if the initial log block is not valid
  */
 static boolean_t

From owner-svn-src-head@FreeBSD.ORG  Fri May 14 00:00:20 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 22C9F1065672;
	Fri, 14 May 2010 00:00:20 +0000 (UTC)
	(envelope-from cognet@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 11C698FC16;
	Fri, 14 May 2010 00:00:20 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4E00JJR087144;
	Fri, 14 May 2010 00:00:19 GMT (envelope-from cognet@svn.freebsd.org)
Received: (from cognet@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4E00JhD087142;
	Fri, 14 May 2010 00:00:19 GMT (envelope-from cognet@svn.freebsd.org)
Message-Id: <201005140000.o4E00JhD087142@svn.freebsd.org>
From: Olivier Houchard 
Date: Fri, 14 May 2010 00:00:19 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r208052 - head/sys/arm/include
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 14 May 2010 00:00:20 -0000

Author: cognet
Date: Fri May 14 00:00:19 2010
New Revision: 208052
URL: http://svn.freebsd.org/changeset/base/208052

Log:
  Catchup with new prototype for db_printf().

Modified:
  head/sys/arm/include/disassem.h

Modified: head/sys/arm/include/disassem.h
==============================================================================
--- head/sys/arm/include/disassem.h	Thu May 13 23:28:20 2010	(r208051)
+++ head/sys/arm/include/disassem.h	Fri May 14 00:00:19 2010	(r208052)
@@ -43,7 +43,7 @@
 typedef struct {
 	u_int	(*di_readword)(u_int);
 	void	(*di_printaddr)(u_int);	
-	void	(*di_printf)(const char *, ...) __printflike(1, 2);
+	int	(*di_printf)(const char *, ...) __printflike(1, 2);
 } disasm_interface_t;
 
 /* Prototypes for callable functions */

From owner-svn-src-head@FreeBSD.ORG  Fri May 14 01:10:20 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8FEBB106566B;
	Fri, 14 May 2010 01:10:20 +0000 (UTC)
	(envelope-from brueffer@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 7EEC68FC19;
	Fri, 14 May 2010 01:10:20 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4E1AKaY002668;
	Fri, 14 May 2010 01:10:20 GMT
	(envelope-from brueffer@svn.freebsd.org)
Received: (from brueffer@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4E1AKTU002666;
	Fri, 14 May 2010 01:10:20 GMT
	(envelope-from brueffer@svn.freebsd.org)
Message-Id: <201005140110.o4E1AKTU002666@svn.freebsd.org>
From: Christian Brueffer 
Date: Fri, 14 May 2010 01:10:20 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r208053 - head/share/man/man4
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 14 May 2010 01:10:20 -0000

Author: brueffer
Date: Fri May 14 01:10:20 2010
New Revision: 208053
URL: http://svn.freebsd.org/changeset/base/208053

Log:
  Mention LSI Logic FC949E.
  
  PR:		110359
  Submitted by:	Vivek Khera 
  MFC after:	3 days

Modified:
  head/share/man/man4/mpt.4

Modified: head/share/man/man4/mpt.4
==============================================================================
--- head/share/man/man4/mpt.4	Fri May 14 00:00:19 2010	(r208052)
+++ head/share/man/man4/mpt.4	Fri May 14 01:10:20 2010	(r208053)
@@ -35,7 +35,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd August 15, 2009
+.Dd May 13, 2010
 .Dt MPT 4
 .Os
 .Sh NAME
@@ -105,6 +105,7 @@ LSI Logic FC949X
 (Dual 4Gb/s
 .Tn Fibre Channel )
 .It
+LSI Logic FC949E,
 LSI Logic FC949ES
 (Dual 4Gb/s
 .Tn Fibre Channel PCI-Express)

From owner-svn-src-head@FreeBSD.ORG  Fri May 14 01:25:31 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 505FD1065670;
	Fri, 14 May 2010 01:25:31 +0000 (UTC)
	(envelope-from brueffer@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 3F3018FC08;
	Fri, 14 May 2010 01:25:31 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4E1PVl6006140;
	Fri, 14 May 2010 01:25:31 GMT
	(envelope-from brueffer@svn.freebsd.org)
Received: (from brueffer@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4E1PVOe006138;
	Fri, 14 May 2010 01:25:31 GMT
	(envelope-from brueffer@svn.freebsd.org)
Message-Id: <201005140125.o4E1PVOe006138@svn.freebsd.org>
From: Christian Brueffer 
Date: Fri, 14 May 2010 01:25:31 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r208054 - head/usr.sbin/cron/crontab
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 14 May 2010 01:25:31 -0000

Author: brueffer
Date: Fri May 14 01:25:30 2010
New Revision: 208054
URL: http://svn.freebsd.org/changeset/base/208054

Log:
  List /var/cron/tabs in FILES and add descriptions for the other entries.
  
  PR:		145912
  Submitted by:	Julian H. Stacey 
  Obtained from:	OpenBSD
  MFC after:	1 week

Modified:
  head/usr.sbin/cron/crontab/crontab.1

Modified: head/usr.sbin/cron/crontab/crontab.1
==============================================================================
--- head/usr.sbin/cron/crontab/crontab.1	Fri May 14 01:10:20 2010	(r208053)
+++ head/usr.sbin/cron/crontab/crontab.1	Fri May 14 01:25:30 2010	(r208054)
@@ -17,7 +17,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd December 29, 1993
+.Dd May 13, 2010
 .Dt CRONTAB 1
 .Os
 .Sh NAME
@@ -114,7 +114,11 @@ from the editor, the modified crontab wi
 .Sh FILES
 .Bl -tag -width /var/cron/allow -compact
 .It Pa /var/cron/allow
+List of users allowed to use crontab
 .It Pa /var/cron/deny
+List of users prohibited from using crontab
+.It Pa /var/cron/tabs
+Directory for personal crontab files
 .El
 .Sh DIAGNOSTICS
 A fairly informative usage message appears if you run it with a bad command

From owner-svn-src-head@FreeBSD.ORG  Fri May 14 01:45:05 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 808E7106566B;
	Fri, 14 May 2010 01:45:05 +0000 (UTC)
	(envelope-from brueffer@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 6FCD48FC0A;
	Fri, 14 May 2010 01:45:05 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4E1j5Ec010608;
	Fri, 14 May 2010 01:45:05 GMT
	(envelope-from brueffer@svn.freebsd.org)
Received: (from brueffer@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4E1j5SE010606;
	Fri, 14 May 2010 01:45:05 GMT
	(envelope-from brueffer@svn.freebsd.org)
Message-Id: <201005140145.o4E1j5SE010606@svn.freebsd.org>
From: Christian Brueffer 
Date: Fri, 14 May 2010 01:45:05 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r208056 - head/usr.sbin/mtree
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 14 May 2010 01:45:05 -0000

Author: brueffer
Date: Fri May 14 01:45:05 2010
New Revision: 208056
URL: http://svn.freebsd.org/changeset/base/208056

Log:
  Wording fixes.
  
  PR:		143454
  Submitted by:	Warren Block 
  MFC after:	3 days

Modified:
  head/usr.sbin/mtree/mtree.8

Modified: head/usr.sbin/mtree/mtree.8
==============================================================================
--- head/usr.sbin/mtree/mtree.8	Fri May 14 01:43:13 2010	(r208055)
+++ head/usr.sbin/mtree/mtree.8	Fri May 14 01:45:05 2010	(r208056)
@@ -88,7 +88,7 @@ Do not complain about files that are in 
 specification.
 .It Fl i
 Indent the output 4 spaces each time a directory level is descended when
-create a specification with the
+creating a specification with the
 .Fl c
 option.
 This does not affect either the /set statements or the comment before each
@@ -126,7 +126,7 @@ instead of from the standard input.
 .Pp
 If this option is specified twice, the two specifications are compared
 to each other rather than to the file hierarchy.
-The specifications be sorted like output generated using
+The specifications will be sorted like output generated using
 .Fl c .
 The output format in this case is somewhat remniscent of
 .Xr comm 1 ,

From owner-svn-src-head@FreeBSD.ORG  Fri May 14 04:53:59 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 916FB106564A;
	Fri, 14 May 2010 04:53:59 +0000 (UTC)
	(envelope-from dougb@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 7F5D48FC0A;
	Fri, 14 May 2010 04:53:59 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4E4rwxP052667;
	Fri, 14 May 2010 04:53:58 GMT (envelope-from dougb@svn.freebsd.org)
Received: (from dougb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4E4rvDO052642;
	Fri, 14 May 2010 04:53:57 GMT (envelope-from dougb@svn.freebsd.org)
Message-Id: <201005140453.o4E4rvDO052642@svn.freebsd.org>
From: Doug Barton 
Date: Fri, 14 May 2010 04:53:57 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r208060 - in head/etc: . defaults periodic/daily
	periodic/weekly rc.d
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 14 May 2010 04:53:59 -0000

Author: dougb
Date: Fri May 14 04:53:57 2010
New Revision: 208060
URL: http://svn.freebsd.org/changeset/base/208060

Log:
  Remove trailing white space. No functional changes.

Modified:
  head/etc/defaults/rc.conf
  head/etc/devd.conf
  head/etc/network.subr
  head/etc/periodic/daily/310.accounting
  head/etc/periodic/daily/440.status-mailq
  head/etc/periodic/weekly/330.catman
  head/etc/rc.d/bluetooth
  head/etc/rc.d/bridge
  head/etc/rc.d/cleanvar
  head/etc/rc.d/defaultroute
  head/etc/rc.d/geli
  head/etc/rc.d/geli2
  head/etc/rc.d/ipfw
  head/etc/rc.d/mdconfig
  head/etc/rc.d/mdconfig2
  head/etc/rc.d/nscd
  head/etc/rc.d/rfcomm_pppd_server
  head/etc/rc.d/stf
  head/etc/rc.d/syscons
  head/etc/rc.d/ubthidhci
  head/etc/rc.firewall
  head/etc/rc.initdiskless
  head/etc/regdomain.xml
  head/etc/services

Modified: head/etc/defaults/rc.conf
==============================================================================
--- head/etc/defaults/rc.conf	Fri May 14 04:22:58 2010	(r208059)
+++ head/etc/defaults/rc.conf	Fri May 14 04:53:57 2010	(r208060)
@@ -221,7 +221,7 @@ ifconfig_lo0="inet 127.0.0.1"	# default 
 #wlandebug_wlan0="scan+auth+assoc"	# Set debug flags with wlanddebug(8)
 #ipv4_addrs_fxp0="192.168.0.1/24 192.168.1.1-5/28" # example IPv4 address entry.
 #
-#autobridge_interfaces="bridge0"	# List of bridges to check 
+#autobridge_interfaces="bridge0"	# List of bridges to check
 #autobridge_bridge0="tap* vlan0"	# Interface glob to automatically add to the bridge
 #
 # If you have any sppp(4) interfaces above, you might also want to set
@@ -662,11 +662,11 @@ jail_sysvipc_allow="NO"	# Allow SystemV 
 #jail_example_rootdir="/usr/jail/default"	# Jail's root directory
 #jail_example_hostname="default.domain.com"	# Jail's hostname
 #jail_example_interface=""			# Jail's interface variable to create IP aliases on
-#jail_example_fib="0"				# Routing table for setfib(1) 
+#jail_example_fib="0"				# Routing table for setfib(1)
 #jail_example_ip="192.0.2.10,2001:db8::17"	# Jail's primary IPv4 and IPv6 address
 #jail_example_ip_multi0="2001:db8::10"		#  and another IPv6 address
 #jail_example_exec_start="/bin/sh /etc/rc"		# command to execute in jail for starting
-#jail_example_exec_afterstart0="/bin/sh command"	# command to execute after the one for 
+#jail_example_exec_afterstart0="/bin/sh command"	# command to execute after the one for
 							# starting the jail. More than one can be
 							# specified using a trailing number
 #jail_example_exec_stop="/bin/sh /etc/rc.shutdown"	# command to execute in jail for stopping

Modified: head/etc/devd.conf
==============================================================================
--- head/etc/devd.conf	Fri May 14 04:22:58 2010	(r208059)
+++ head/etc/devd.conf	Fri May 14 04:53:57 2010	(r208060)
@@ -112,10 +112,10 @@ attach 100 {
 	action "/etc/rc.d/moused quietstart $device-name";
 };
 
-detach 100 { 
-        device-name "ums[0-9]+"; 
-        action "/etc/rc.d/moused stop $device-name"; 
-}; 
+detach 100 {
+        device-name "ums[0-9]+";
+        action "/etc/rc.d/moused stop $device-name";
+};
 
 # Firmware download into the ActiveWire board. After the firmware download is
 # done the device detaches and reappears as something new and shiny

Modified: head/etc/network.subr
==============================================================================
--- head/etc/network.subr	Fri May 14 04:22:58 2010	(r208059)
+++ head/etc/network.subr	Fri May 14 04:53:57 2010	(r208060)
@@ -478,7 +478,7 @@ ifexists()
 }
 
 # ipv4_up if
-#	add IPv4 addresses to the interface $if 
+#	add IPv4 addresses to the interface $if
 ipv4_up()
 {
 	local _if _ret
@@ -588,14 +588,14 @@ ipv6_down()
 ipv4_addrs_common()
 {
 	local _ret _if _action _cidr _cidr_addr
-	local _ipaddr _netmask _range _ipnet _iplow _iphigh _ipcount 
+	local _ipaddr _netmask _range _ipnet _iplow _iphigh _ipcount
 	_ret=1
 	_if=$1
 	_action=$2
-    
+
 	# get ipv4-addresses
 	cidr_addr=`get_if_var $_if ipv4_addrs_IF`
-    
+
 	for _cidr in ${cidr_addr}; do
 		_ipaddr=${_cidr%%/*}
 		_netmask="/"${_cidr##*/}
@@ -608,7 +608,7 @@ ipv4_addrs_common()
 		if [ "${_action}" = "-alias" ]; then
 			_netmask=""
 		fi
-        
+
 		_ipcount=${_iplow}
 		while [ "${_ipcount}" -le "${_iphigh}" ]; do
 			eval "ifconfig ${_if} ${_action} ${_ipnet}.${_ipcount}${_netmask}"

Modified: head/etc/periodic/daily/310.accounting
==============================================================================
--- head/etc/periodic/daily/310.accounting	Fri May 14 04:22:58 2010	(r208059)
+++ head/etc/periodic/daily/310.accounting	Fri May 14 04:53:57 2010	(r208060)
@@ -29,7 +29,7 @@ case "$daily_accounting_enable" in
 
 	    cd /var/account
 	    rc=0
-	
+
 	    n=$daily_accounting_save
 	    rm -f acct.$n.gz acct.$n || rc=3
 	    m=$n

Modified: head/etc/periodic/daily/440.status-mailq
==============================================================================
--- head/etc/periodic/daily/440.status-mailq	Fri May 14 04:22:58 2010	(r208059)
+++ head/etc/periodic/daily/440.status-mailq	Fri May 14 04:53:57 2010	(r208060)
@@ -59,7 +59,7 @@ case "$daily_status_mailq_enable" in
 		fi;;
 	    esac
 	fi;;
-		
+
     *)  rc=0;;
 esac
 

Modified: head/etc/periodic/weekly/330.catman
==============================================================================
--- head/etc/periodic/weekly/330.catman	Fri May 14 04:22:58 2010	(r208059)
+++ head/etc/periodic/weekly/330.catman	Fri May 14 04:53:57 2010	(r208060)
@@ -27,13 +27,13 @@ case "$weekly_catman_enable" in
 	    then
 		if [ -z "${MANPATH}" ]
 		then
-		    echo "manpath failed to find any manpath directories" 
+		    echo "manpath failed to find any manpath directories"
 		    rc=3
 		else
 		    man_locales=`/usr/bin/manpath -qL`
 		    rc=0
-         
-		    # Preformat original, non-localized manpages  
+
+		    # Preformat original, non-localized manpages
 		    echo /usr/libexec/catman.local -r "$MANPATH" |
 			su -fm man || rc=3
 

Modified: head/etc/rc.d/bluetooth
==============================================================================
--- head/etc/rc.d/bluetooth	Fri May 14 04:22:58 2010	(r208059)
+++ head/etc/rc.d/bluetooth	Fri May 14 04:53:57 2010	(r208060)
@@ -95,7 +95,7 @@ bluetooth_setup_stack()
 	hook=$1
 	shift
 
-	# Setup HCI 
+	# Setup HCI
 	ngctl mkpeer ${dev}: hci ${hook} drv \
 		> /dev/null 2>&1 || return 1
 
@@ -282,7 +282,7 @@ bluetooth_start()
 		;;
 	esac
 
-	# Be backward compatible and setup reasonable defaults 
+	# Be backward compatible and setup reasonable defaults
 	bluetooth_device_authentication_enable="0"
 	bluetooth_device_class="ff:01:0c"
 	bluetooth_device_connectable="1"
@@ -312,7 +312,7 @@ bluetooth_start()
 		bluetooth_shutdown_stack $dev
 		err 1 "Unable to setup Bluetooth stack for device ${dev}"
 	fi
-		
+
 	return 0
 }
 

Modified: head/etc/rc.d/bridge
==============================================================================
--- head/etc/rc.d/bridge	Fri May 14 04:22:58 2010	(r208059)
+++ head/etc/rc.d/bridge	Fri May 14 04:53:57 2010	(r208060)
@@ -42,7 +42,7 @@ glob_int () {
 		$2 ) true ;;
 		* ) false ;;
 	esac
-} 
+}
 
 bridge_test () {
 	bridge=$1

Modified: head/etc/rc.d/cleanvar
==============================================================================
--- head/etc/rc.d/cleanvar	Fri May 14 04:22:58 2010	(r208059)
+++ head/etc/rc.d/cleanvar	Fri May 14 04:53:57 2010	(r208060)
@@ -54,7 +54,7 @@ cleanvar_prestart()
 	rm -f /var/run/clean_var /var/spool/lock/clean_var
 }
 
-cleanvar_start () 
+cleanvar_start ()
 {
 	if [ -d /var/run -a ! -f /var/run/clean_var ]; then
 		purgedir /var/run

Modified: head/etc/rc.d/defaultroute
==============================================================================
--- head/etc/rc.d/defaultroute	Fri May 14 04:22:58 2010	(r208059)
+++ head/etc/rc.d/defaultroute	Fri May 14 04:53:57 2010	(r208060)
@@ -28,7 +28,7 @@ defaultroute_start()
 	[ -z "${dhcp_interfaces}" ] && return
 	carrier=false
 	for _if in ${dhcp_interfaces}; do
-		output=`/sbin/ifconfig ${_if}` 
+		output=`/sbin/ifconfig ${_if}`
 		nocarrier=`expr "${output}" : '.*[[:blank:]]status: \(no carrier\)'`
 		[ -z "${nocarrier}" ] && carrier=true
 	done

Modified: head/etc/rc.d/geli
==============================================================================
--- head/etc/rc.d/geli	Fri May 14 04:22:58 2010	(r208059)
+++ head/etc/rc.d/geli	Fri May 14 04:53:57 2010	(r208060)
@@ -11,7 +11,7 @@
 # 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 AUTHORS 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

Modified: head/etc/rc.d/geli2
==============================================================================
--- head/etc/rc.d/geli2	Fri May 14 04:22:58 2010	(r208059)
+++ head/etc/rc.d/geli2	Fri May 14 04:53:57 2010	(r208060)
@@ -11,7 +11,7 @@
 # 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 AUTHORS 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

Modified: head/etc/rc.d/ipfw
==============================================================================
--- head/etc/rc.d/ipfw	Fri May 14 04:22:58 2010	(r208059)
+++ head/etc/rc.d/ipfw	Fri May 14 04:53:57 2010	(r208060)
@@ -30,14 +30,14 @@ ipfw_prestart()
 		if ! checkyesno natd_enable; then
 			required_modules="$required_modules ipfw_nat"
 		fi
-	fi 
+	fi
 }
 
 ipfw_start()
 {
 	local   _firewall_type
 
-	_firewall_type=$1 
+	_firewall_type=$1
 
 	# set the firewall rules script if none was specified
 	[ -z "${firewall_script}" ] && firewall_script=/etc/rc.firewall

Modified: head/etc/rc.d/mdconfig
==============================================================================
--- head/etc/rc.d/mdconfig	Fri May 14 04:22:58 2010	(r208059)
+++ head/etc/rc.d/mdconfig	Fri May 14 04:53:57 2010	(r208060)
@@ -49,7 +49,7 @@ is_readonly()
 		*" ${_mp} "*read-only*)
 			echo "yes"
 			;;
-		
+
 		*)
 			;;
 		esac;
@@ -139,7 +139,7 @@ mdconfig_start()
 				if ! eval ${_fsck_cmd} -p ${_dev} >/dev/null; then
 					echo "Fsck failed on ${_dev}, not mounting the filesystem."
 					continue
-					
+
 				fi
 			else
 				newfs ${_newfs} ${_dev} >/dev/null
@@ -194,5 +194,5 @@ if [ -z "${_mdconfig_list}" ]; then
 		fi
 	done
 fi
-	
+
 run_rc_command "${_mdconfig_cmd}"

Modified: head/etc/rc.d/mdconfig2
==============================================================================
--- head/etc/rc.d/mdconfig2	Fri May 14 04:22:58 2010	(r208059)
+++ head/etc/rc.d/mdconfig2	Fri May 14 04:53:57 2010	(r208060)
@@ -49,7 +49,7 @@ is_readonly()
 		*" ${_mp} "*read-only*)
 			echo "yes"
 			;;
-		
+
 		*)
 			;;
 		esac;
@@ -223,5 +223,5 @@ if [ -z "${_mdconfig2_list}" ]; then
 		fi
 	done
 fi
-	
+
 run_rc_command "${_mdconfig2_cmd}"

Modified: head/etc/rc.d/nscd
==============================================================================
--- head/etc/rc.d/nscd	Fri May 14 04:22:58 2010	(r208059)
+++ head/etc/rc.d/nscd	Fri May 14 04:53:57 2010	(r208060)
@@ -34,7 +34,7 @@ _nscd_set_option() {
 
 	_nscd_opt_val=$(eval "echo \$nscd_${_optname}")
 	_cached_opt_val=$(eval "echo \$cached_${_optname}")
-	
+
 	if [ -n "$_cached_opt_val" -a "$_nscd_opt_val" != "$_defoptval" ]; then
 		warn "You should use nscd_${_optname} instead of" \
 		    "cached_${_optname}"

Modified: head/etc/rc.d/rfcomm_pppd_server
==============================================================================
--- head/etc/rc.d/rfcomm_pppd_server	Fri May 14 04:22:58 2010	(r208059)
+++ head/etc/rc.d/rfcomm_pppd_server	Fri May 14 04:53:57 2010	(r208060)
@@ -46,7 +46,7 @@ rfcomm_pppd_server_start_profile()
 		_channel=1
 	fi
 	rc_flags="${rc_flags} -C ${_channel}"
-	
+
 	# Check for RFCOMM PPP profile register SP override
 	#
 	eval _x=\$rfcomm_pppd_server_${_profile_cleaned}_register_sp
@@ -55,7 +55,7 @@ rfcomm_pppd_server_start_profile()
 			rc_flags="${rc_flags} -S"
 		fi
 	fi
-	
+
 	# Check for RFCOMM PPP profile register DUN override
 	#
 	eval _x=\$rfcomm_pppd_server_${_profile_cleaned}_register_dun

Modified: head/etc/rc.d/stf
==============================================================================
--- head/etc/rc.d/stf	Fri May 14 04:22:58 2010	(r208059)
+++ head/etc/rc.d/stf	Fri May 14 04:53:57 2010	(r208060)
@@ -49,7 +49,7 @@ stf_up()
 			esac
 			;;
 		esac
-		echo "Configuring 6to4 tunnel interface: stf0." 
+		echo "Configuring 6to4 tunnel interface: stf0."
 		ifconfig stf0 create >/dev/null 2>&1
 		ifconfig stf0 inet6 2002:${ipv4_in_hexformat}:${stf_interface_ipv6_slaid:-0}:${stf_interface_ipv6_ifid} \
 			prefixlen ${stf_prefixlen}
@@ -66,7 +66,7 @@ stf_up()
 
 stf_down()
 {
-	echo "Removing 6to4 tunnel interface: stf0." 
+	echo "Removing 6to4 tunnel interface: stf0."
 	ifconfig stf0 destroy
 	route delete -inet6 2002:e000:: -prefixlen 20 ::1
 	route delete -inet6 2002:7f00:: -prefixlen 24 ::1

Modified: head/etc/rc.d/syscons
==============================================================================
--- head/etc/rc.d/syscons	Fri May 14 04:22:58 2010	(r208059)
+++ head/etc/rc.d/syscons	Fri May 14 04:53:57 2010	(r208060)
@@ -121,7 +121,7 @@ syscons_configure_keyboard()
 syscons_setkeyboard()
 {
 	kbd=$1
-                
+
 	if [ -z "${kbd}" ]; then
 		return 1
 	fi

Modified: head/etc/rc.d/ubthidhci
==============================================================================
--- head/etc/rc.d/ubthidhci	Fri May 14 04:22:58 2010	(r208059)
+++ head/etc/rc.d/ubthidhci	Fri May 14 04:53:57 2010	(r208060)
@@ -4,8 +4,8 @@
 #
 
 # PROVIDE: ubthidhci
-# REQUIRE: DAEMON 
-# BEFORE: bluetooth 
+# REQUIRE: DAEMON
+# BEFORE: bluetooth
 # KEYWORD: nojail shutdown
 
 . /etc/rc.subr

Modified: head/etc/rc.firewall
==============================================================================
--- head/etc/rc.firewall	Fri May 14 04:22:58 2010	(r208059)
+++ head/etc/rc.firewall	Fri May 14 04:53:57 2010	(r208060)
@@ -461,7 +461,7 @@ case ${firewall_type} in
 	if [ $ipv6_available -eq 0 ]; then
 		${fwcmd} add pass udp from fe80::/10 to me 546 in
 	fi
-	# Some servers will ping the IP while trying to decide if it's 
+	# Some servers will ping the IP while trying to decide if it's
 	# still in use.
 	${fwcmd} add pass icmp from any to any icmptype 8
 	if [ $ipv6_available -eq 0 ]; then
@@ -476,11 +476,11 @@ case ${firewall_type} in
 
 	# Add permits for this workstations published services below
 	# Only IPs and nets in firewall_allowservices is allowed in.
-	# If you really wish to let anyone use services on your 
+	# If you really wish to let anyone use services on your
 	# workstation, then set "firewall_allowservices='any'" in /etc/rc.conf
 	#
 	# Note: We don't use keep-state as that would allow DoS of
-	#       our statetable. 
+	#       our statetable.
 	#       You can add 'keep-state' to the lines for slightly
 	#       better performance if you fell that DoS of your
 	#       workstation won't be a problem.

Modified: head/etc/rc.initdiskless
==============================================================================
--- head/etc/rc.initdiskless	Fri May 14 04:22:58 2010	(r208059)
+++ head/etc/rc.initdiskless	Fri May 14 04:53:57 2010	(r208060)
@@ -119,7 +119,7 @@
 #		Similar to /conf/T/M/diskless_remount above, but allows
 #		all of /conf to be remounted.  This can be used to allow
 #		multiple roots to share the same /conf.
-#		
+#
 #
 # You will almost universally want to create the following files under /conf
 #

Modified: head/etc/regdomain.xml
==============================================================================
--- head/etc/regdomain.xml	Fri May 14 04:22:58 2010	(r208059)
+++ head/etc/regdomain.xml	Fri May 14 04:53:57 2010	(r208060)
@@ -1,7 +1,7 @@
 
 
@@ -1200,7 +1200,7 @@
 
 
 
 

Modified: head/etc/services
==============================================================================
--- head/etc/services	Fri May 14 04:22:58 2010	(r208059)
+++ head/etc/services	Fri May 14 04:53:57 2010	(r208060)
@@ -1243,8 +1243,8 @@ dctp		675/tcp
 dctp		675/udp
 vpps-via	676/tcp    #VPPS Via
 vpps-via	676/udp    #VPPS Via
-vpp		677/tcp    #Virtual Presence Protocol 
-vpp		677/udp    #Virtual Presence Protocol 
+vpp		677/tcp    #Virtual Presence Protocol
+vpp		677/udp    #Virtual Presence Protocol
 ggf-ncp		678/tcp    #GNU Generation Foundation NCP
 ggf-ncp		678/udp    #GNU Generation Foundation NCP
 mrm             679/tcp
@@ -1255,8 +1255,8 @@ entrust-aams	681/tcp
 entrust-aams	681/udp
 xfr             682/tcp
 xfr             682/udp
-corba-iiop      683/tcp    #CORBA IIOP 
-corba-iiop      683/udp    #CORBA IIOP 
+corba-iiop      683/tcp    #CORBA IIOP
+corba-iiop      683/udp    #CORBA IIOP
 corba-iiop-ssl	684/tcp    #CORBA IIOP SSL
 corba-iiop-ssl	684/udp    #CORBA IIOP SSL
 mdc-portmapper	685/tcp    #MDC Port Mapper
@@ -1311,8 +1311,8 @@ cisco-tdp       711/tcp    #Cisco TDP
 cisco-tdp       711/udp    #Cisco TDP
 tbrpf           712/tcp
 tbrpf           712/udp
-iris-xpc	713/tcp    #IRIS over XPC 
-iris-xpc	713/udp    #IRIS over XPC 
+iris-xpc	713/tcp    #IRIS over XPC
+iris-xpc	713/udp    #IRIS over XPC
 iris-xpcs	714/tcp    #IRIS over XPCS
 iris-xpcs	714/udp    #IRIS over XPCS
 iris-lwz	715/tcp
@@ -1412,7 +1412,7 @@ pkix-3-ca-ra	829/tcp    #PKIX-3 CA/RA
 pkix-3-ca-ra    829/udp    #PKIX-3 CA/RA
 netconf-ssh     830/tcp    #NETCONF over SSH
 netconf-ssh     830/udp    #NETCONF over SSH
-netconf-beep    831/tcp    #NETCONF over BEEP 
+netconf-beep    831/tcp    #NETCONF over BEEP
 netconf-beep    831/udp    #NETCONF over BEEP
 netconfsoaphttp 832/tcp    #NETCONF for SOAP over HTTPS
 netconfsoaphttp 832/udp    #NETCONF for SOAP over HTTPS
@@ -1444,14 +1444,14 @@ ideafarm-chat   902/tcp
 ideafarm-chat   902/udp
 ideafarm-catch  903/tcp
 ideafarm-catch  903/udp
-kink            910/tcp    #Kerberized Internet Negotiation of Keys (KINK) 
+kink            910/tcp    #Kerberized Internet Negotiation of Keys (KINK)
 kink            910/udp    #Kerberized Internet Negotiation of Keys (KINK)
 xact-backup     911/tcp
 xact-backup     911/udp
 apex-mesh       912/tcp    #APEX relay-relay service
 apex-mesh       912/udp    #APEX relay-relay service
 apex-edge       913/tcp    #APEX endpoint-relay service
-apex-edge       913/udp    #APEX endpoint-relay service    
+apex-edge       913/udp    #APEX endpoint-relay service
 rndc		953/tcp	   # named's rndc control socket
 ftps-data	989/tcp	   # ftp protocol, data, over TLS/SSL
 ftps-data	989/udp

From owner-svn-src-head@FreeBSD.ORG  Fri May 14 14:26:49 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7295B1065670;
	Fri, 14 May 2010 14:26:49 +0000 (UTC) (envelope-from uqs@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 622318FC13;
	Fri, 14 May 2010 14:26:49 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4EEQnCa081232;
	Fri, 14 May 2010 14:26:49 GMT (envelope-from uqs@svn.freebsd.org)
Received: (from uqs@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4EEQnRt081229;
	Fri, 14 May 2010 14:26:49 GMT (envelope-from uqs@svn.freebsd.org)
Message-Id: <201005141426.o4EEQnRt081229@svn.freebsd.org>
From: Ulrich Spoerlein 
Date: Fri, 14 May 2010 14:26:49 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r208074 - head/sbin/fsirand
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 14 May 2010 14:26:49 -0000

Author: uqs
Date: Fri May 14 14:26:49 2010
New Revision: 208074
URL: http://svn.freebsd.org/changeset/base/208074

Log:
  fsirand(8): make WARNS=3 clean
  
  - Drop bogus quad_t cast for di_gen, it is a 32bit type
  - Print di_gen with leading zeros, to get consistent output
    Before this change, amd64 would print:
  
    ino 18 gen 616ca2bd
    ino 19 gen ffffffff95c2a3ff
    ino 20 gen 25c3a3d5
    ino 21 gen 8dc1472
    ino 22 gen 3797056b
    ino 23 gen 1d47853a
    ino 24 gen ffffffff82d26995
  
    After the change
  
    ino 18 gen 616ca2bd
    ino 19 gen 95c2a3ff
    ino 20 gen 25c3a3d5
    ino 21 gen 08dc1472
    ino 22 gen 3797056b
    ino 23 gen 1d47853a
    ino 24 gen 82d26995
  
  PR:		bin/139994 (sort of)
  Reviewed by:	mckusick

Modified:
  head/sbin/fsirand/Makefile
  head/sbin/fsirand/fsirand.c

Modified: head/sbin/fsirand/Makefile
==============================================================================
--- head/sbin/fsirand/Makefile	Fri May 14 13:48:11 2010	(r208073)
+++ head/sbin/fsirand/Makefile	Fri May 14 14:26:49 2010	(r208074)
@@ -2,8 +2,8 @@
 # $FreeBSD$
 
 PROG=	fsirand
-WARNS?=	0
 MAN=	fsirand.8
+WARNS?=	3
 DPADD=	${LIBUTIL}
 LDADD=	-lutil
 

Modified: head/sbin/fsirand/fsirand.c
==============================================================================
--- head/sbin/fsirand/fsirand.c	Fri May 14 13:48:11 2010	(r208073)
+++ head/sbin/fsirand/fsirand.c	Fri May 14 14:26:49 2010	(r208074)
@@ -47,6 +47,7 @@ static const char rcsid[] =
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -112,7 +113,7 @@ fsirand(char *device)
 	struct ufs1_dinode *dp1;
 	struct ufs2_dinode *dp2;
 	caddr_t inodebuf;
-	size_t ibufsize;
+	ssize_t ibufsize;
 	struct fs *sblock;
 	ino_t inumber, maxino;
 	ufs2_daddr_t sblockloc, dblk;
@@ -135,14 +136,17 @@ fsirand(char *device)
 			bsize = label.d_secsize;
 	}
 
+	dp1 = NULL;
+	dp2 = NULL;
+
 	/* Read in master superblock */
 	(void)memset(&sbuf, 0, sizeof(sbuf));
 	sblock = (struct fs *)&sbuf;
 	for (i = 0; sblock_try[i] != -1; i++) {
 		sblockloc = sblock_try[i];
 		if (lseek(devfd, sblockloc, SEEK_SET) == -1) {
-			warn("can't seek to superblock (%qd) on %s",
-			    sblockloc, device);
+			warn("can't seek to superblock (%jd) on %s",
+			    (intmax_t)sblockloc, device);
 			return (1);
 		}
 		if ((n = read(devfd, (void *)sblock, SBLOCKSIZE))!=SBLOCKSIZE) {
@@ -154,7 +158,7 @@ fsirand(char *device)
 		     (sblock->fs_magic == FS_UFS2_MAGIC &&
 		      sblock->fs_sblockloc == sblock_try[i])) &&
 		    sblock->fs_bsize <= MAXBSIZE &&
-		    sblock->fs_bsize >= sizeof(struct fs))
+		    sblock->fs_bsize >= (ssize_t)sizeof(struct fs))
 			break;
 	}
 	if (sblock_try[i] == -1) {
@@ -175,10 +179,10 @@ fsirand(char *device)
 
 	/* Make sure backup superblocks are sane. */
 	sblock = (struct fs *)&sbuftmp;
-	for (cg = 0; cg < sblock->fs_ncg; cg++) {
+	for (cg = 0; cg < (int)sblock->fs_ncg; cg++) {
 		dblk = fsbtodb(sblock, cgsblock(sblock, cg));
 		if (lseek(devfd, (off_t)dblk * bsize, SEEK_SET) < 0) {
-			warn("can't seek to %qd", (off_t)dblk * bsize);
+			warn("can't seek to %jd", (intmax_t)dblk * bsize);
 			return (1);
 		} else if ((n = write(devfd, (void *)sblock, SBLOCKSIZE)) != SBLOCKSIZE) {
 			warn("can't read backup superblock %d on %s: %s",
@@ -211,7 +215,7 @@ fsirand(char *device)
 	if (printonly && (sblock->fs_id[0] || sblock->fs_id[1])) {
 		if (sblock->fs_id[0])
 			(void)printf("%s was randomized on %s", device,
-			    ctime((const time_t *)&(sblock->fs_id[0])));
+			    ctime((void *)&(sblock->fs_id[0])));
 		(void)printf("fsid: %x %x\n", sblock->fs_id[0],
 			    sblock->fs_id[1]);
 	}
@@ -223,8 +227,8 @@ fsirand(char *device)
 		sblock->fs_id[1] = random();
 
 		if (lseek(devfd, sblockloc, SEEK_SET) == -1) {
-			warn("can't seek to superblock (%qd) on %s", sblockloc,
-			    device);
+			warn("can't seek to superblock (%jd) on %s",
+			    (intmax_t)sblockloc, device);
 			return (1);
 		}
 		if ((n = write(devfd, (void *)sblock, SBLOCKSIZE)) !=
@@ -236,12 +240,13 @@ fsirand(char *device)
 	}
 
 	/* For each cylinder group, randomize inodes and update backup sblock */
-	for (cg = 0, inumber = 0; cg < sblock->fs_ncg; cg++) {
+	for (cg = 0, inumber = 0; cg < (int)sblock->fs_ncg; cg++) {
 		/* Update superblock if appropriate */
 		if (!printonly) {
 			dblk = fsbtodb(sblock, cgsblock(sblock, cg));
 			if (lseek(devfd, (off_t)dblk * bsize, SEEK_SET) < 0) {
-				warn("can't seek to %qd", (off_t)dblk * bsize);
+				warn("can't seek to %jd",
+				    (intmax_t)dblk * bsize);
 				return (1);
 			} else if ((n = write(devfd, (void *)sblock,
 			    SBLOCKSIZE)) != SBLOCKSIZE) {
@@ -255,7 +260,7 @@ fsirand(char *device)
 		/* Read in inodes, then print or randomize generation nums */
 		dblk = fsbtodb(sblock, ino_to_fsba(sblock, inumber));
 		if (lseek(devfd, (off_t)dblk * bsize, SEEK_SET) < 0) {
-			warn("can't seek to %qd", (off_t)dblk * bsize);
+			warn("can't seek to %jd", (intmax_t)dblk * bsize);
 			return (1);
 		} else if ((n = read(devfd, inodebuf, ibufsize)) != ibufsize) {
 			warnx("can't read inodes: %s",
@@ -263,17 +268,17 @@ fsirand(char *device)
 			return (1);
 		}
 
-		for (n = 0; n < sblock->fs_ipg; n++, inumber++) {
+		for (n = 0; n < (int)sblock->fs_ipg; n++, inumber++) {
 			if (sblock->fs_magic == FS_UFS1_MAGIC)
 				dp1 = &((struct ufs1_dinode *)inodebuf)[n];
 			else
 				dp2 = &((struct ufs2_dinode *)inodebuf)[n];
 			if (inumber >= ROOTINO) {
 				if (printonly)
-					(void)printf("ino %d gen %qx\n",
+					(void)printf("ino %d gen %08x\n",
 					    inumber,
 					    sblock->fs_magic == FS_UFS1_MAGIC ?
-					    (quad_t)dp1->di_gen : dp2->di_gen);
+					    dp1->di_gen : dp2->di_gen);
 				else if (sblock->fs_magic == FS_UFS1_MAGIC) 
 					dp1->di_gen = random(); 
 				else
@@ -284,8 +289,8 @@ fsirand(char *device)
 		/* Write out modified inodes */
 		if (!printonly) {
 			if (lseek(devfd, (off_t)dblk * bsize, SEEK_SET) < 0) {
-				warn("can't seek to %qd",
-				    (off_t)dblk * bsize);
+				warn("can't seek to %jd",
+				    (intmax_t)dblk * bsize);
 				return (1);
 			} else if ((n = write(devfd, inodebuf, ibufsize)) !=
 				 ibufsize) {

From owner-svn-src-head@FreeBSD.ORG  Fri May 14 14:26:58 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9CED9106577A;
	Fri, 14 May 2010 14:26:57 +0000 (UTC) (envelope-from uqs@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 16A418FC1D;
	Fri, 14 May 2010 14:26:57 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4EEQuqa081275;
	Fri, 14 May 2010 14:26:56 GMT (envelope-from uqs@svn.freebsd.org)
Received: (from uqs@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4EEQu7B081269;
	Fri, 14 May 2010 14:26:56 GMT (envelope-from uqs@svn.freebsd.org)
Message-Id: <201005141426.o4EEQu7B081269@svn.freebsd.org>
From: Ulrich Spoerlein 
Date: Fri, 14 May 2010 14:26:56 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r208075 - in head/usr.sbin/apmd: . contrib
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 14 May 2010 14:26:58 -0000

Author: uqs
Date: Fri May 14 14:26:56 2010
New Revision: 208075
URL: http://svn.freebsd.org/changeset/base/208075

Log:
  Sync apmd(8) with DragonflyBSD, bringing WARNS to 3
  
  Reviewed by:	ed (partial, long time ago)

Modified:
  head/usr.sbin/apmd/Makefile
  head/usr.sbin/apmd/apmd.8
  head/usr.sbin/apmd/apmd.c
  head/usr.sbin/apmd/apmd.h
  head/usr.sbin/apmd/apmdlex.l
  head/usr.sbin/apmd/contrib/pccardq.c

Modified: head/usr.sbin/apmd/Makefile
==============================================================================
--- head/usr.sbin/apmd/Makefile	Fri May 14 14:26:49 2010	(r208074)
+++ head/usr.sbin/apmd/Makefile	Fri May 14 14:26:56 2010	(r208075)
@@ -5,7 +5,7 @@ MAN=	apmd.8
 MANSUBDIR= /i386
 SRCS=	apmd.c apmdlex.l apmdparse.y y.tab.h
 
-WARNS?=	0
+WARNS?=	3
 
 DPADD=	${LIBL}
 LDADD=	-ll

Modified: head/usr.sbin/apmd/apmd.8
==============================================================================
--- head/usr.sbin/apmd/apmd.8	Fri May 14 14:26:49 2010	(r208074)
+++ head/usr.sbin/apmd/apmd.8	Fri May 14 14:26:56 2010	(r208075)
@@ -99,7 +99,9 @@ monitored events.
 .Pp
 If the
 .Nm
-process receives a SIGHUP, it will reread its configuration file and
+process receives a
+.Dv SIGHUP ,
+it will reread its configuration file and
 notify the APM device driver of any changes to its configuration.
 .Pp
 The
@@ -166,7 +168,7 @@ The apm_event keyword
 .Bd -ragged -offset indent
 .Ql apm_event
 is the keyword which indicates the start of configuration for
-each events.
+each event.
 .Ed
 .It
 APM events

Modified: head/usr.sbin/apmd/apmd.c
==============================================================================
--- head/usr.sbin/apmd/apmd.c	Fri May 14 14:26:49 2010	(r208074)
+++ head/usr.sbin/apmd/apmd.c	Fri May 14 14:26:56 2010	(r208075)
@@ -52,8 +52,6 @@ static const char rcsid[] =
 
 #include "apmd.h"
 
-extern int	yyparse(void);
-
 int		debug_level = 0;
 int		verbose = 0;
 int		soft_power_state_change = 0;
@@ -116,14 +114,14 @@ event_cmd_exec_act(void *this)
 
 	switch ((pid = fork())) {
 	case -1:
-		(void) warn("cannot fork");
+		warn("cannot fork");
 		goto out;
 	case 0:
 		/* child process */
 		signal(SIGHUP, SIG_DFL);
 		signal(SIGCHLD, SIG_DFL);
 		signal(SIGTERM, SIG_DFL);
-		execl(_PATH_BSHELL, "sh", "-c", p->line, (char *)NULL);
+		execl(_PATH_BSHELL, "sh", "-c", p->line, NULL);
 		_exit(127);
 	default:
 		/* parent process */
@@ -170,7 +168,7 @@ struct event_cmd_op event_cmd_exec_ops =
  * reject commad
  */
 int
-event_cmd_reject_act(void *this)
+event_cmd_reject_act(void *this __unused)
 {
 	int rc = -1;
 
@@ -200,7 +198,7 @@ clone_event_cmd_list(struct event_cmd *p
 	for ( ;p; p = p->next) {
 		assert(p->op->clone);
 		if ((q->next = p->op->clone(p)) == NULL)
-			(void) err(1, "out of memory");
+			err(1, "out of memory");
 		q = q->next;
 	}
 	q->next = NULL;
@@ -238,7 +236,7 @@ register_battery_handlers(
 		struct battery_watch_event *we;
 		
 		if ((we = malloc(sizeof(struct battery_watch_event))) == NULL)
-			(void) err(1, "out of memory");
+			err(1, "out of memory");
 
 		we->next = battery_watch_list; /* starts at NULL */
 		battery_watch_list = we;
@@ -269,7 +267,7 @@ register_apm_event_handlers(
 				break;
 			p = events[n].cmdlist;
 			if ((q = clone_event_cmd_list(cmdlist)) == NULL)
-				(void) err(1, "out of memory");
+				err(1, "out of memory");
 			if (p) {
 				while (p->next != NULL)
 					p = p->next;
@@ -315,7 +313,7 @@ exec_event_cmd(struct event_config *ev)
 	status = exec_run_cmd(ev->cmdlist);
 	if (status && ev->rejectable) {
 		syslog(LOG_ERR, "canceled");
-		(void) event_cmd_reject_act(NULL);
+		event_cmd_reject_act(NULL);
 	}
 	return status;
 }
@@ -332,7 +330,7 @@ read_config(void)
 	int i;
 
 	if ((yyin = fopen(apmd_configfile, "r")) == NULL) {
-		(void) err(1, "cannot open config file");
+		err(1, "cannot open config file");
 	}
 
 #ifdef DEBUG
@@ -340,7 +338,7 @@ read_config(void)
 #endif
 
 	if (yyparse() != 0)
-		(void) err(1, "cannot parse config file");
+		err(1, "cannot parse config file");
 
 	fclose(yyin);
 
@@ -349,14 +347,14 @@ read_config(void)
 		if (events[i].cmdlist) {
 			u_int event_type = i;
 			if (write(apmctl_fd, &event_type, sizeof(u_int)) == -1) {
-				(void) err(1, "cannot enable event 0x%x", event_type);
+				err(1, "cannot enable event 0x%x", event_type);
 			}
 		}
 	}
 }
 
 void
-dump_config()
+dump_config(void)
 {
 	int i;
 	struct battery_watch_event *q;
@@ -392,7 +390,7 @@ dump_config()
 }
 
 void
-destroy_config()
+destroy_config(void)
 {
 	int i;
 	struct battery_watch_event *q;
@@ -402,7 +400,7 @@ destroy_config()
 		if (events[i].cmdlist) {
 			u_int event_type = i;
 			if (write(apmctl_fd, &event_type, sizeof(u_int)) == -1) {
-				(void) err(1, "cannot disable event 0x%x", event_type);
+				err(1, "cannot disable event 0x%x", event_type);
 			}
 		}
 	}
@@ -423,7 +421,7 @@ destroy_config()
 }
 
 void
-restart()
+restart(void)
 {
 	destroy_config();
 	read_config();
@@ -435,7 +433,7 @@ restart()
  * write pid file
  */
 static void
-write_pid()
+write_pid(void)
 {
 	FILE *fp = fopen(apmd_pidfile, "w");
 
@@ -454,11 +452,11 @@ void
 enque_signal(int sig)
 {
 	if (write(signal_fd[1], &sig, sizeof sig) != sizeof sig)
-		(void) err(1, "cannot process signal.");
+		err(1, "cannot process signal.");
 }
 
 void
-wait_child()
+wait_child(void)
 {
 	int status;
 	while (waitpid(-1, &status, WNOHANG) > 0)
@@ -486,7 +484,7 @@ proc_signal(int fd)
 			wait_child();
 			break;
 		default:
-			(void) warn("unexpected signal(%d) received.", sig);
+			warn("unexpected signal(%d) received.", sig);
 			break;
 		}
 	}
@@ -515,7 +513,7 @@ proc_apmevent(int fd)
 	BATTERY_DISCHARGING)
 
 void
-check_battery()
+check_battery(void)
 {
 
 	static int first_time=1, last_state;
@@ -530,7 +528,7 @@ check_battery()
 
 	if (first_time) {
 		if ( ioctl(apmnorm_fd, APMIO_GETINFO, &pw_info) < 0)
-			(void) err(1, "cannot check battery state.");
+			err(1, "cannot check battery state.");
 /*
  * This next statement isn't entirely true. The spec does not tie AC
  * line state to battery charging or not, but this is a bit lazier to do.
@@ -545,7 +543,7 @@ check_battery()
 	 * of smoothing or correction?
 	 */
 	if ( ioctl(apmnorm_fd, APMIO_GETINFO, &pw_info) < 0)
-		(void) err(1, "cannot check battery state.");
+		err(1, "cannot check battery state.");
 
 	/*
 	 * If we're not in the state now that we were in last time,
@@ -565,7 +563,7 @@ check_battery()
 		if (p -> direction == AC_POWER_STATE &&
 			!(p -> done) &&
 			((p -> type == BATTERY_PERCENT && 
-				p -> level == pw_info.ai_batt_life) ||
+				p -> level == (int)pw_info.ai_batt_life) ||
 			(p -> type == BATTERY_MINUTES &&
 				p -> level == (pw_info.ai_batt_time / 60)))) {
 			p -> done++;
@@ -621,7 +619,7 @@ event_loop(void)
 		sigprocmask(SIG_SETMASK, &osigmask, NULL);
 		if ((res=select(fdmax + 1, &rfds, 0, 0, &to)) < 0) {
 			if (errno != EINTR)
-				(void) err(1, "select");
+				err(1, "select");
 		}
 		sigprocmask(SIG_SETMASK, &sigmask, NULL);
 
@@ -666,7 +664,7 @@ main(int ac, char* av[])
 			verbose = 1;
 			break;
 		default:
-			(void) err(1, "unknown option `%c'", ch);
+			err(1, "unknown option `%c'", ch);
 		}
 	}
 
@@ -674,7 +672,7 @@ main(int ac, char* av[])
 		daemon(0, 0);
 
 #ifdef NICE_INCR
-	(void) nice(NICE_INCR);
+	nice(NICE_INCR);
 #endif
 
 	if (!daemonize)
@@ -686,29 +684,29 @@ main(int ac, char* av[])
 	syslog(LOG_NOTICE, "start");
 
 	if (pipe(signal_fd) < 0)
-		(void) err(1, "pipe");
+		err(1, "pipe");
 	if (fcntl(signal_fd[0], F_SETFL, O_NONBLOCK) < 0)
-		(void) err(1, "fcntl");
+		err(1, "fcntl");
 
 	if ((apmnorm_fd = open(APM_NORM_DEVICEFILE, O_RDWR)) == -1) {
-		(void) err(1, "cannot open device file `%s'", APM_NORM_DEVICEFILE);
+		err(1, "cannot open device file `%s'", APM_NORM_DEVICEFILE);
 	}
 
 	if (fcntl(apmnorm_fd, F_SETFD, 1) == -1) {
-		(void) err(1, "cannot set close-on-exec flag for device file '%s'", APM_NORM_DEVICEFILE);
+		err(1, "cannot set close-on-exec flag for device file '%s'", APM_NORM_DEVICEFILE);
 	}
 
 	if ((apmctl_fd = open(APM_CTL_DEVICEFILE, O_RDWR)) == -1) {
-		(void) err(1, "cannot open device file `%s'", APM_CTL_DEVICEFILE);
+		err(1, "cannot open device file `%s'", APM_CTL_DEVICEFILE);
 	}
 
 	if (fcntl(apmctl_fd, F_SETFD, 1) == -1) {
-		(void) err(1, "cannot set close-on-exec flag for device file '%s'", APM_CTL_DEVICEFILE);
- 	}
+		err(1, "cannot set close-on-exec flag for device file '%s'", APM_CTL_DEVICEFILE);
+	}
 
 	restart();
 	write_pid();
 	event_loop();
- 	exit(EXIT_SUCCESS);
+	exit(EXIT_SUCCESS);
 }
 

Modified: head/usr.sbin/apmd/apmd.h
==============================================================================
--- head/usr.sbin/apmd/apmd.h	Fri May 14 14:26:49 2010	(r208074)
+++ head/usr.sbin/apmd/apmd.h	Fri May 14 14:26:56 2010	(r208075)
@@ -106,3 +106,28 @@ extern int register_apm_event_handlers(
 	bitstr_t bit_decl(evlist, EVENT_MAX),
 	struct event_cmd *cmdlist);
 extern void free_event_cmd_list(struct event_cmd *p);
+
+extern int	yyparse(void);
+
+void	yyerror(const char *);
+int	yylex(void);
+
+struct event_cmd *event_cmd_default_clone(void *);
+int event_cmd_exec_act(void *);
+void event_cmd_exec_dump(void *, FILE *);
+struct event_cmd *event_cmd_exec_clone(void *);
+void event_cmd_exec_free(void *);
+int event_cmd_reject_act(void *);
+struct event_cmd *clone_event_cmd_list(struct event_cmd *);
+int exec_run_cmd(struct event_cmd *);
+int exec_event_cmd(struct event_config *);
+void read_config(void);
+void dump_config(void);
+void destroy_config(void);
+void restart(void);
+void enque_signal(int);
+void wait_child(void);
+int proc_signal(int);
+void proc_apmevent(int);
+void check_battery(void);
+void event_loop(void);

Modified: head/usr.sbin/apmd/apmdlex.l
==============================================================================
--- head/usr.sbin/apmd/apmdlex.l	Fri May 14 14:26:49 2010	(r208074)
+++ head/usr.sbin/apmd/apmdlex.l	Fri May 14 14:26:56 2010	(r208075)
@@ -36,6 +36,9 @@
 #include "apmd.h"
 #include "y.tab.h"
 
+/* We don't need it, avoid the warning. */
+#define YY_NO_UNPUT
+
 int lineno;
 int first_time;
 %}

Modified: head/usr.sbin/apmd/contrib/pccardq.c
==============================================================================
--- head/usr.sbin/apmd/contrib/pccardq.c	Fri May 14 14:26:49 2010	(r208074)
+++ head/usr.sbin/apmd/contrib/pccardq.c	Fri May 14 14:26:56 2010	(r208075)
@@ -20,7 +20,7 @@ const char     *tmp_dir = "/tmp";
 unsigned        slot_map = ~0;
 
 void
-usage()
+usage(void)
 {
     fprintf(stderr, "usage: %s [-a] [-n] [-s slot]\n", prog);
 }
@@ -223,7 +223,7 @@ get_slot_info(int so, int slot, char **m
     return rc;
 }
 
-const char     *
+const char *
 strstate(int state)
 {
     switch (state) {

From owner-svn-src-head@FreeBSD.ORG  Fri May 14 15:06:13 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2DEFA106579C;
	Fri, 14 May 2010 15:06:13 +0000 (UTC) (envelope-from bz@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 1E3588FC13;
	Fri, 14 May 2010 15:06:13 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4EF6DwP090037;
	Fri, 14 May 2010 15:06:13 GMT (envelope-from bz@svn.freebsd.org)
Received: (from bz@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4EF6Dnt090035;
	Fri, 14 May 2010 15:06:13 GMT (envelope-from bz@svn.freebsd.org)
Message-Id: <201005141506.o4EF6Dnt090035@svn.freebsd.org>
From: "Bjoern A. Zeeb" 
Date: Fri, 14 May 2010 15:06:12 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r208077 - head/sbin/ifconfig
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 14 May 2010 15:06:13 -0000

Author: bz
Date: Fri May 14 15:06:12 2010
New Revision: 208077
URL: http://svn.freebsd.org/changeset/base/208077

Log:
  Document the 'short preamble' capability for 802.11bg.
  
  Reviewed by:	sam
  MFC after:	4 days

Modified:
  head/sbin/ifconfig/ifconfig.8

Modified: head/sbin/ifconfig/ifconfig.8
==============================================================================
--- head/sbin/ifconfig/ifconfig.8	Fri May 14 14:34:22 2010	(r208076)
+++ head/sbin/ifconfig/ifconfig.8	Fri May 14 15:06:12 2010	(r208077)
@@ -28,7 +28,7 @@
 .\"     From: @(#)ifconfig.8	8.3 (Berkeley) 1/5/94
 .\" $FreeBSD$
 .\"
-.Dd April 28, 2010
+.Dd May 14, 2010
 .Dt IFCONFIG 8
 .Os
 .Sh NAME
@@ -1294,6 +1294,10 @@ Quality of Service (QoS).
 Indicates that the station is using QoS encapsulation for
 data frame.
 QoS encapsulation is enabled only when WME mode is enabled.
+.It Li S
+Short Preamble.
+Indicates that the station is doing short preamble to optionally
+improve throughput performance with 802.11g and 802.11b.
 .It Li T
 Transitional Security Network (TSN).
 Indicates that the station associated using TSN; see also
@@ -1368,6 +1372,10 @@ Quality of Service (QoS).
 Indicates that the station is using QoS encapsulation for
 data frame.
 QoS encapsulation is enabled only when WME mode is enabled.
+.It Li S
+Short Preamble.
+Indicates that the station is doing short preamble to optionally
+improve throughput performance with 802.11g and 802.11b.
 .It Li T
 Transitional Security Network (TSN).
 Indicates that the station associated using TSN; see also

From owner-svn-src-head@FreeBSD.ORG  Fri May 14 16:55:13 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E2FA71065679;
	Fri, 14 May 2010 16:55:13 +0000 (UTC)
	(envelope-from yongari@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id D2E3A8FC1C;
	Fri, 14 May 2010 16:55:13 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4EGtDJQ014441;
	Fri, 14 May 2010 16:55:13 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4EGtDVo014439;
	Fri, 14 May 2010 16:55:13 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <201005141655.o4EGtDVo014439@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Fri, 14 May 2010 16:55:13 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r208081 - head/sys/dev/fxp
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 14 May 2010 16:55:14 -0000

Author: yongari
Date: Fri May 14 16:55:13 2010
New Revision: 208081
URL: http://svn.freebsd.org/changeset/base/208081

Log:
  Controller updates RFA via DMA so driver needs synchronization.
  Add missing BUS_DMASYNC_POSTWRITE and BUS_DMASYNC_PREREAD.

Modified:
  head/sys/dev/fxp/if_fxp.c

Modified: head/sys/dev/fxp/if_fxp.c
==============================================================================
--- head/sys/dev/fxp/if_fxp.c	Fri May 14 15:47:51 2010	(r208080)
+++ head/sys/dev/fxp/if_fxp.c	Fri May 14 16:55:13 2010	(r208081)
@@ -1899,7 +1899,7 @@ fxp_intr_body(struct fxp_softc *sc, stru
 		rfa = (struct fxp_rfa *)(m->m_ext.ext_buf +
 		    RFA_ALIGNMENT_FUDGE);
 		bus_dmamap_sync(sc->fxp_rxmtag, rxp->rx_map,
-		    BUS_DMASYNC_POSTREAD);
+		    BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE);
 
 #ifdef DEVICE_POLLING /* loop at most count times if count >=0 */
 		if (count >= 0 && count-- == 0) {
@@ -2659,7 +2659,7 @@ fxp_add_rfabuf(struct fxp_softc *sc, str
 		le32enc(&p_rfa->link_addr, rxp->rx_addr);
 		p_rfa->rfa_control = 0;
 		bus_dmamap_sync(sc->fxp_rxmtag, p_rx->rx_map,
-		    BUS_DMASYNC_PREWRITE);
+		    BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE);
 	} else {
 		rxp->rx_next = NULL;
 		sc->fxp_desc.rx_head = rxp;

From owner-svn-src-head@FreeBSD.ORG  Fri May 14 16:56:19 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4922E106564A;
	Fri, 14 May 2010 16:56:19 +0000 (UTC)
	(envelope-from mjacob@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id F0A1B8FC1C;
	Fri, 14 May 2010 16:56:18 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4EGuIk6014705;
	Fri, 14 May 2010 16:56:18 GMT (envelope-from mjacob@svn.freebsd.org)
Received: (from mjacob@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4EGuIjM014703;
	Fri, 14 May 2010 16:56:18 GMT (envelope-from mjacob@svn.freebsd.org)
Message-Id: <201005141656.o4EGuIjM014703@svn.freebsd.org>
From: Matt Jacob 
Date: Fri, 14 May 2010 16:56:18 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r208082 - head/sys/geom/multipath
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 14 May 2010 16:56:19 -0000

Author: mjacob
Date: Fri May 14 16:56:18 2010
New Revision: 208082
URL: http://svn.freebsd.org/changeset/base/208082

Log:
  Make sure to check that the active provider pointer points to something before
  dereferencing the pointer.
  
  Sponsored by:   Pansas
  MFC after:	1 week

Modified:
  head/sys/geom/multipath/g_multipath.c

Modified: head/sys/geom/multipath/g_multipath.c
==============================================================================
--- head/sys/geom/multipath/g_multipath.c	Fri May 14 16:55:13 2010	(r208081)
+++ head/sys/geom/multipath/g_multipath.c	Fri May 14 16:56:18 2010	(r208082)
@@ -757,7 +757,7 @@ g_multipath_ctl_getactive(struct gctl_re
 		return;
 	}
 	sc = gp->softc;
-	if (sc->cp_active) {
+	if (sc->cp_active && sc->cp_active->provider) {
 		sbuf_printf(sb, "%s\n", sc->cp_active->provider->name);
 	} else {
 		sbuf_printf(sb, "none\n");

From owner-svn-src-head@FreeBSD.ORG  Fri May 14 16:58:38 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 423881065672;
	Fri, 14 May 2010 16:58:38 +0000 (UTC)
	(envelope-from yongari@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 320488FC0C;
	Fri, 14 May 2010 16:58:38 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4EGwceu015291;
	Fri, 14 May 2010 16:58:38 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4EGwcME015289;
	Fri, 14 May 2010 16:58:38 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <201005141658.o4EGwcME015289@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Fri, 14 May 2010 16:58:38 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r208083 - head/sys/dev/fxp
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 14 May 2010 16:58:38 -0000

Author: yongari
Date: Fri May 14 16:58:37 2010
New Revision: 208083
URL: http://svn.freebsd.org/changeset/base/208083

Log:
  Dont' allow dma map load deferring. fxp(4) is not able to handle
  EINPROGRESS.

Modified:
  head/sys/dev/fxp/if_fxp.c

Modified: head/sys/dev/fxp/if_fxp.c
==============================================================================
--- head/sys/dev/fxp/if_fxp.c	Fri May 14 16:56:18 2010	(r208082)
+++ head/sys/dev/fxp/if_fxp.c	Fri May 14 16:58:37 2010	(r208083)
@@ -2623,7 +2623,7 @@ fxp_new_rfabuf(struct fxp_softc *sc, str
 	/* Map the RFA into DMA memory. */
 	error = bus_dmamap_load(sc->fxp_rxmtag, sc->spare_map, rfa,
 	    MCLBYTES - RFA_ALIGNMENT_FUDGE, fxp_dma_map_addr,
-	    &rxp->rx_addr, 0);
+	    &rxp->rx_addr, BUS_DMA_NOWAIT);
 	if (error) {
 		m_freem(m);
 		return (error);

From owner-svn-src-head@FreeBSD.ORG  Fri May 14 17:39:28 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7D08C1065670;
	Fri, 14 May 2010 17:39:28 +0000 (UTC)
	(envelope-from yongari@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 6C7558FC0A;
	Fri, 14 May 2010 17:39:28 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4EHdSY5024209;
	Fri, 14 May 2010 17:39:28 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4EHdSaW024207;
	Fri, 14 May 2010 17:39:28 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <201005141739.o4EHdSaW024207@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Fri, 14 May 2010 17:39:28 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r208084 - head/sys/dev/fxp
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 14 May 2010 17:39:28 -0000

Author: yongari
Date: Fri May 14 17:39:28 2010
New Revision: 208084
URL: http://svn.freebsd.org/changeset/base/208084

Log:
  If controller received bad frames make sure to update newly added
  RFA. Also drop frames that have either CRC error or alignment
  error. Normally bad frames are not received at all. But controllers
  running in promiscuous mode will receive bad frames. 82557 will
  also receive bad frames to receive VLAN oversized frames.
  
  While I'm here mark RNR condition if driver happen to see RNR in
  RFA status and restart RU to receive frames again. Because driver
  checks all received frames in RX loop, RNR condition could be set
  in the middle of RX processing. Just relying on RNR interrupt was
  not enough.
  
  This change fixes "Memory modified after free" issue when fxp(4)
  is running as a member of if_bridge(4).
  
  Tested by:	Larry Baird  gta dot com>
  MFC after:	5 days

Modified:
  head/sys/dev/fxp/if_fxp.c

Modified: head/sys/dev/fxp/if_fxp.c
==============================================================================
--- head/sys/dev/fxp/if_fxp.c	Fri May 14 16:58:37 2010	(r208083)
+++ head/sys/dev/fxp/if_fxp.c	Fri May 14 17:39:28 2010	(r208084)
@@ -1916,6 +1916,8 @@ fxp_intr_body(struct fxp_softc *sc, stru
 		if ((status & FXP_RFA_STATUS_C) == 0)
 			break;
 
+		if ((status & FXP_RFA_STATUS_RNR) != 0)
+			rnr++;
 		/*
 		 * Advance head forward.
 		 */
@@ -1942,9 +1944,12 @@ fxp_intr_body(struct fxp_softc *sc, stru
 				total_len -= 2;
 			}
 			if (total_len < sizeof(struct ether_header) ||
-			    total_len > MCLBYTES - RFA_ALIGNMENT_FUDGE -
-				sc->rfa_size || status & FXP_RFA_STATUS_CRC) {
+			    total_len > (MCLBYTES - RFA_ALIGNMENT_FUDGE -
+			    sc->rfa_size) ||
+			    status & (FXP_RFA_STATUS_CRC |
+			    FXP_RFA_STATUS_ALIGN)) {
 				m_freem(m);
+				fxp_add_rfabuf(sc, rxp);
 				continue;
 			}
 

From owner-svn-src-head@FreeBSD.ORG  Fri May 14 19:12:08 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B1C031065781;
	Fri, 14 May 2010 19:12:06 +0000 (UTC)
	(envelope-from dougb@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id A13958FC14;
	Fri, 14 May 2010 19:12:06 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4EJC6TT044660;
	Fri, 14 May 2010 19:12:06 GMT (envelope-from dougb@svn.freebsd.org)
Received: (from dougb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4EJC6aB044658;
	Fri, 14 May 2010 19:12:06 GMT (envelope-from dougb@svn.freebsd.org)
Message-Id: <201005141912.o4EJC6aB044658@svn.freebsd.org>
From: Doug Barton 
Date: Fri, 14 May 2010 19:12:06 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r208088 - head/usr.sbin/mergemaster
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 14 May 2010 19:12:09 -0000

Author: dougb
Date: Fri May 14 19:12:06 2010
New Revision: 208088
URL: http://svn.freebsd.org/changeset/base/208088

Log:
  Hide the creation and population of the temproot

Modified:
  head/usr.sbin/mergemaster/mergemaster.sh

Modified: head/usr.sbin/mergemaster/mergemaster.sh
==============================================================================
--- head/usr.sbin/mergemaster/mergemaster.sh	Fri May 14 19:12:01 2010	(r208087)
+++ head/usr.sbin/mergemaster/mergemaster.sh	Fri May 14 19:12:06 2010	(r208088)
@@ -617,14 +617,14 @@ case "${RERUN}" in
       case "${DESTDIR}" in
       '') ;;
       *)
-        ${MM_MAKE} DESTDIR=${DESTDIR} distrib-dirs
+        ${MM_MAKE} DESTDIR=${DESTDIR} distrib-dirs >/dev/null
         ;;
       esac
       od=${TEMPROOT}/usr/obj
-      ${MM_MAKE} DESTDIR=${TEMPROOT} distrib-dirs &&
-      MAKEOBJDIRPREFIX=$od ${MM_MAKE} _obj SUBDIR_OVERRIDE=etc &&
-      MAKEOBJDIRPREFIX=$od ${MM_MAKE} everything SUBDIR_OVERRIDE=etc &&
-      MAKEOBJDIRPREFIX=$od ${MM_MAKE} DESTDIR=${TEMPROOT} distribution;} ||
+      ${MM_MAKE} DESTDIR=${TEMPROOT} distrib-dirs >/dev/null &&
+      MAKEOBJDIRPREFIX=$od ${MM_MAKE} _obj SUBDIR_OVERRIDE=etc >/dev/null &&
+      MAKEOBJDIRPREFIX=$od ${MM_MAKE} everything SUBDIR_OVERRIDE=etc >/dev/null &&
+      MAKEOBJDIRPREFIX=$od ${MM_MAKE} DESTDIR=${TEMPROOT} distribution >/dev/null;} ||
     { echo '';
      echo "  *** FATAL ERROR: Cannot 'cd' to ${SOURCEDIR} and install files to";
       echo "      the temproot environment";

From owner-svn-src-head@FreeBSD.ORG  Fri May 14 19:14:59 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6672C1065670;
	Fri, 14 May 2010 19:14:59 +0000 (UTC)
	(envelope-from dougb@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 560A88FC15;
	Fri, 14 May 2010 19:14:59 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4EJExjW045386;
	Fri, 14 May 2010 19:14:59 GMT (envelope-from dougb@svn.freebsd.org)
Received: (from dougb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4EJExNv045384;
	Fri, 14 May 2010 19:14:59 GMT (envelope-from dougb@svn.freebsd.org)
Message-Id: <201005141914.o4EJExNv045384@svn.freebsd.org>
From: Doug Barton 
Date: Fri, 14 May 2010 19:14:59 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r208089 - head/usr.bin/calendar/calendars
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 14 May 2010 19:14:59 -0000

Author: dougb
Date: Fri May 14 19:14:59 2010
New Revision: 208089
URL: http://svn.freebsd.org/changeset/base/208089

Log:
  Remove duplicate

Modified:
  head/usr.bin/calendar/calendars/calendar.history

Modified: head/usr.bin/calendar/calendars/calendar.history
==============================================================================
--- head/usr.bin/calendar/calendars/calendar.history	Fri May 14 19:12:06 2010	(r208088)
+++ head/usr.bin/calendar/calendars/calendar.history	Fri May 14 19:14:59 2010	(r208089)
@@ -80,7 +80,6 @@
 03/15	Watts, Los Angeles, riots kill two, injure 25, 1966
 03/15	Ides of March.  Gaius Julius Caesar assassinated by senators,
 	including adoptive son Marcus Junius Brutus Caepio, 44BC
-03/16	First liquid-fuel-powered rocket flight, 1926
 03/16	MyLai Massacre; 300 non-combatant villagers killed by US infantrymen
 03/16	Robert Goddard launches first liquid-fueled rocket, Auburn MA, 1926
 03/17	Vanguard I launched, 1958.  Earth proved pear-shaped

From owner-svn-src-head@FreeBSD.ORG  Fri May 14 20:00:22 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 51BA11065675;
	Fri, 14 May 2010 20:00:22 +0000 (UTC)
	(envelope-from marius@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 404A58FC22;
	Fri, 14 May 2010 20:00:22 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4EK0MPv055807;
	Fri, 14 May 2010 20:00:22 GMT (envelope-from marius@svn.freebsd.org)
Received: (from marius@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4EK0MCO055803;
	Fri, 14 May 2010 20:00:22 GMT (envelope-from marius@svn.freebsd.org)
Message-Id: <201005142000.o4EK0MCO055803@svn.freebsd.org>
From: Marius Strobl 
Date: Fri, 14 May 2010 20:00:22 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r208097 - head/sys/sparc64/pci
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 14 May 2010 20:00:22 -0000

Author: marius
Date: Fri May 14 20:00:21 2010
New Revision: 208097
URL: http://svn.freebsd.org/changeset/base/208097

Log:
  - Enable DMA write parity error interrupts on Schizo with a working
    implementation.
  - Revert the Sun Fire V890 WAR of r205254. Instead let schizo_pci_bus()
    only panic in case of fatal errors as the interrupt triggered by the
    error the firmware of these and also Sun Fire 280R with version 7
    Schizo caused may happen as late as using the HBA and not only prior
    to touching the PCI bus (in the former case the actual error still is
    fatal but we clear it before touching the PCI bus).
    While at it count and export non-fatal error interrupts via sysctl(9).
  - Remove unnecessary locking from schizo_ue().

Modified:
  head/sys/sparc64/pci/schizo.c
  head/sys/sparc64/pci/schizoreg.h
  head/sys/sparc64/pci/schizovar.h

Modified: head/sys/sparc64/pci/schizo.c
==============================================================================
--- head/sys/sparc64/pci/schizo.c	Fri May 14 19:57:18 2010	(r208096)
+++ head/sys/sparc64/pci/schizo.c	Fri May 14 20:00:21 2010	(r208097)
@@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -385,6 +386,21 @@ schizo_attach(device_t dev)
 	SCHIZO_PCI_WRITE_8(sc, STX_PCI_DIAG, reg);
 
 	/*
+	 * Enable DMA write parity error interrupts of version >= 7 (i.e.
+	 * revision >= 2.5) Schizo.
+	 */
+	if (mode == SCHIZO_MODE_SCZ && sc->sc_ver >= 7) {
+		reg = SCHIZO_PCI_READ_8(sc, SX_PCI_CFG_ICD);
+		reg |= SX_PCI_CFG_ICD_DMAW_PERR_IEN;
+#ifdef SCHIZO_DEBUG
+		device_printf(dev, "PCI CFG/ICD 0x%016llx -> 0x%016llx\n",
+		(unsigned long long)SCHIZO_PCI_READ_8(sc, SX_PCI_CFG_ICD),
+		(unsigned long long)reg);
+#endif
+		SCHIZO_PCI_WRITE_8(sc, SX_PCI_CFG_ICD, reg);
+	}
+
+	/*
 	 * On Tomatillo clear the I/O prefetch lengths (workaround for a
 	 * Jalapeno bug).
 	 */
@@ -697,14 +713,18 @@ schizo_attach(device_t dev)
 
 	ofw_bus_setup_iinfo(node, &sc->sc_pci_iinfo, sizeof(ofw_pci_intr_t));
 
-	/*
-	 * At least when booting Fire V890 from disk a Schizo comes up with
-	 * a PCI bus error residing which triggers as soon as we register
-	 * schizo_pci_bus() even when clearing it from all involved registers
-	 * beforehand (but is quiet once it has fired).  Thus we make PCI bus
-	 * errors non-fatal until we actually touch the bus.
-	 */
-	sc->sc_flags |= SCHIZO_FLAGS_ARMED;
+#define	SCHIZO_SYSCTL_ADD_UINT(name, arg, desc)				\
+	SYSCTL_ADD_UINT(device_get_sysctl_ctx(dev),			\
+	    SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO,	\
+	    (name), CTLFLAG_RD, (arg), 0, (desc))
+
+	SCHIZO_SYSCTL_ADD_UINT("dma_ce", &sc->sc_stats_dma_ce,
+	    "DMA correctable errors");
+	SCHIZO_SYSCTL_ADD_UINT("pci_non_fatal", &sc->sc_stats_pci_non_fatal,
+	    "PCI bus non-fatal errors");
+
+#undef SCHIZO_SYSCTL_ADD_UINT
+
 	device_add_child(dev, "pci", -1);
 	return (bus_generic_attach(dev));
 }
@@ -801,6 +821,11 @@ schizo_pci_bus(void *arg)
 	struct schizo_softc *sc = arg;
 	uint64_t afar, afsr, csr, iommu;
 	uint32_t status;
+	u_int fatal;
+
+	fatal = 0;
+
+	mtx_lock_spin(sc->sc_mtx);
 
 	afar = SCHIZO_PCI_READ_8(sc, STX_PCI_AFAR);
 	afsr = SCHIZO_PCI_READ_8(sc, STX_PCI_AFSR);
@@ -808,41 +833,51 @@ schizo_pci_bus(void *arg)
 	iommu = SCHIZO_PCI_READ_8(sc, STX_PCI_IOMMU);
 	status = PCIB_READ_CONFIG(sc->sc_dev, sc->sc_pci_secbus,
 	    STX_CS_DEVICE, STX_CS_FUNC, PCIR_STATUS, 2);
-	if ((sc->sc_flags & SCHIZO_FLAGS_ARMED) == 0)
-			goto clear_error;
-	if ((csr & STX_PCI_CTRL_MMU_ERR) != 0) {
-		if ((iommu & TOM_PCI_IOMMU_ERR) == 0)
-			goto clear_error;
-
-		/* These are non-fatal if target abort was signaled. */
-		if ((status & PCIM_STATUS_STABORT) != 0 &&
-		    ((iommu & TOM_PCI_IOMMU_ERRMASK) ==
-		    TOM_PCI_IOMMU_INVALID_ERR ||
-		    (iommu & TOM_PCI_IOMMU_ERR_ILLTSBTBW) != 0 ||
-		    (iommu & TOM_PCI_IOMMU_ERR_BAD_VA) != 0)) {
-			SCHIZO_PCI_WRITE_8(sc, STX_PCI_IOMMU, iommu);
-			goto clear_error;
-		}
-	}
 
-	panic("%s: PCI bus %c error AFAR %#llx AFSR %#llx PCI CSR %#llx "
-	    "IOMMU %#llx STATUS %#llx", device_get_nameunit(sc->sc_dev),
-	    'A' + sc->sc_half, (unsigned long long)afar,
-	    (unsigned long long)afsr, (unsigned long long)csr,
-	    (unsigned long long)iommu, (unsigned long long)status);
+	/*
+	 * IOMMU errors are only fatal on Tomatillo and there also only if
+	 * target abort was not signaled.
+	 */
+	if ((csr & STX_PCI_CTRL_MMU_ERR) != 0 &&
+	    (iommu & TOM_PCI_IOMMU_ERR) != 0 &&
+	    ((status & PCIM_STATUS_STABORT) == 0 ||
+	    ((iommu & TOM_PCI_IOMMU_ERRMASK) != TOM_PCI_IOMMU_INVALID_ERR &&
+	    (iommu & TOM_PCI_IOMMU_ERR_ILLTSBTBW) == 0 &&
+	    (iommu & TOM_PCI_IOMMU_ERR_BAD_VA) == 0)))
+		fatal = 1;
+	else if ((status & PCIM_STATUS_STABORT) != 0)
+		fatal = 1;
+	if ((status & (PCIM_STATUS_PERR | PCIM_STATUS_SERR |
+	    PCIM_STATUS_RMABORT | PCIM_STATUS_RTABORT |
+	    PCIM_STATUS_PERRREPORT)) != 0 ||
+	    (csr & (SCZ_PCI_CTRL_BUS_UNUS | TOM_PCI_CTRL_DTO_ERR |
+	    STX_PCI_CTRL_TTO_ERR | STX_PCI_CTRL_RTRY_ERR |
+	    SCZ_PCI_CTRL_SBH_ERR | STX_PCI_CTRL_SERR)) != 0 ||
+	    (afsr & (STX_PCI_AFSR_P_MA | STX_PCI_AFSR_P_TA |
+	    STX_PCI_AFSR_P_RTRY | STX_PCI_AFSR_P_PERR | STX_PCI_AFSR_P_TTO |
+	    STX_PCI_AFSR_P_UNUS)) != 0)
+		fatal = 1;
+	if (fatal == 0)
+		sc->sc_stats_pci_non_fatal++;
+
+	device_printf(sc->sc_dev, "PCI bus %c error AFAR %#llx AFSR %#llx "
+	    "PCI CSR %#llx IOMMU %#llx STATUS %#llx\n", 'A' + sc->sc_half,
+	    (unsigned long long)afar, (unsigned long long)afsr,
+	    (unsigned long long)csr, (unsigned long long)iommu,
+	    (unsigned long long)status);
 
- clear_error:
-	if (bootverbose)
-		device_printf(sc->sc_dev,
-		    "PCI bus %c error AFAR %#llx AFSR %#llx PCI CSR %#llx "
-		    "STATUS %#llx", 'A' + sc->sc_half,
-		    (unsigned long long)afar, (unsigned long long)afsr,
-		    (unsigned long long)csr, (unsigned long long)status);
 	/* Clear the error bits that we caught. */
 	PCIB_WRITE_CONFIG(sc->sc_dev, sc->sc_pci_secbus, STX_CS_DEVICE,
 	    STX_CS_FUNC, PCIR_STATUS, status, 2);
 	SCHIZO_PCI_WRITE_8(sc, STX_PCI_CTRL, csr);
 	SCHIZO_PCI_WRITE_8(sc, STX_PCI_AFSR, afsr);
+	SCHIZO_PCI_WRITE_8(sc, STX_PCI_IOMMU, iommu);
+
+	mtx_unlock_spin(sc->sc_mtx);
+
+	if (fatal != 0)
+		panic("%s: fatal PCI bus error",
+		    device_get_nameunit(sc->sc_dev));
 	return (FILTER_HANDLED);
 }
 
@@ -853,13 +888,11 @@ schizo_ue(void *arg)
 	uint64_t afar, afsr;
 	int i;
 
-	mtx_lock_spin(sc->sc_mtx);
 	afar = SCHIZO_CTRL_READ_8(sc, STX_CTRL_UE_AFAR);
 	for (i = 0; i < 1000; i++)
 		if (((afsr = SCHIZO_CTRL_READ_8(sc, STX_CTRL_UE_AFSR)) &
 		    STX_CTRL_CE_AFSR_ERRPNDG) == 0)
 			break;
-	mtx_unlock_spin(sc->sc_mtx);
 	panic("%s: uncorrectable DMA error AFAR %#llx AFSR %#llx",
 	    device_get_nameunit(sc->sc_dev), (unsigned long long)afar,
 	    (unsigned long long)afsr);
@@ -874,17 +907,22 @@ schizo_ce(void *arg)
 	int i;
 
 	mtx_lock_spin(sc->sc_mtx);
+
 	afar = SCHIZO_CTRL_READ_8(sc, STX_CTRL_CE_AFAR);
 	for (i = 0; i < 1000; i++)
 		if (((afsr = SCHIZO_CTRL_READ_8(sc, STX_CTRL_UE_AFSR)) &
 		    STX_CTRL_CE_AFSR_ERRPNDG) == 0)
 			break;
+	sc->sc_stats_dma_ce++;
 	device_printf(sc->sc_dev,
 	    "correctable DMA error AFAR %#llx AFSR %#llx\n",
 	    (unsigned long long)afar, (unsigned long long)afsr);
+
 	/* Clear the error bits that we caught. */
 	SCHIZO_CTRL_WRITE_8(sc, STX_CTRL_UE_AFSR, afsr);
+
 	mtx_unlock_spin(sc->sc_mtx);
+
 	return (FILTER_HANDLED);
 }
 

Modified: head/sys/sparc64/pci/schizoreg.h
==============================================================================
--- head/sys/sparc64/pci/schizoreg.h	Fri May 14 19:57:18 2010	(r208096)
+++ head/sys/sparc64/pci/schizoreg.h	Fri May 14 20:00:21 2010	(r208097)
@@ -42,6 +42,7 @@
 #define	STX_ICON			3
 
 /* PCI configuration and status registers */
+#define	SX_PCI_CFG_ICD			0x00110
 #define	STX_PCI_IOMMU			0x00200
 #define	STX_PCI_IOMMU_CTXFLUSH		0x00218
 #define	STX_PCI_IMAP_BASE		0x01000
@@ -67,6 +68,15 @@
 #define	STX_PCI_IOBIO_DIAG		0x0a808
 #define	STX_PCI_STRBUF_CTXMATCH		0x10000
 
+/* PCI configuration/idle check diagnostic registers */
+#define	SX_PCI_CFG_ICD_PCI_2_0_COMPAT	0x0000000000008000ULL
+#define	SX_PCI_CFG_ICD_DMAW_PERR_IEN	0x0000000000004000ULL
+#define	SX_PCI_CFG_ICD_IFC_NOT_IDLE	0x0000000000000010ULL
+#define	SX_PCI_CFG_ICD_MDU_NOT_IDLE	0x0000000000000008ULL
+#define	SX_PCI_CFG_ICD_MMU_NOT_IDLE	0x0000000000000004ULL
+#define	SX_PCI_CFG_ICD_PBM_NOT_IDLE	0x0000000000000002ULL
+#define	SX_PCI_CFG_ICD_STC_NOT_IDLE	0x0000000000000001ULL
+
 /* PCI IOMMU control registers */
 #define	TOM_PCI_IOMMU_ERR_BAD_VA	0x0000000010000000ULL
 #define	TOM_PCI_IOMMU_ERR_ILLTSBTBW	0x0000000008000000ULL

Modified: head/sys/sparc64/pci/schizovar.h
==============================================================================
--- head/sys/sparc64/pci/schizovar.h	Fri May 14 19:57:18 2010	(r208096)
+++ head/sys/sparc64/pci/schizovar.h	Fri May 14 20:00:21 2010	(r208097)
@@ -44,9 +44,8 @@ struct schizo_softc {
 #define	SCHIZO_MODE_XMS			2
 
 	u_int				sc_flags;
-#define	SCHIZO_FLAGS_ARMED		(1 << 0)
-#define	SCHIZO_FLAGS_BSWAR		(1 << 1)
-#define	SCHIZO_FLAGS_CDMA		(1 << 2)
+#define	SCHIZO_FLAGS_BSWAR		(1 << 0)
+#define	SCHIZO_FLAGS_CDMA		(1 << 1)
 
 	bus_addr_t			sc_cdma_clr;
 	uint32_t			sc_cdma_state;
@@ -71,6 +70,9 @@ struct schizo_softc {
 	bus_space_tag_t			sc_pci_memt;
 	bus_dma_tag_t			sc_pci_dmat;
 
+	uint32_t			sc_stats_dma_ce;
+	uint32_t			sc_stats_pci_non_fatal;
+
 	uint8_t				sc_pci_secbus;
 	uint8_t				sc_pci_subbus;
 

From owner-svn-src-head@FreeBSD.ORG  Fri May 14 20:11:30 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B53CC1065674;
	Fri, 14 May 2010 20:11:30 +0000 (UTC)
	(envelope-from marius@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 8B63E8FC12;
	Fri, 14 May 2010 20:11:30 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4EKBUj4058326;
	Fri, 14 May 2010 20:11:30 GMT (envelope-from marius@svn.freebsd.org)
Received: (from marius@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4EKBUik058323;
	Fri, 14 May 2010 20:11:30 GMT (envelope-from marius@svn.freebsd.org)
Message-Id: <201005142011.o4EKBUik058323@svn.freebsd.org>
From: Marius Strobl 
Date: Fri, 14 May 2010 20:11:30 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r208098 - head/share/man/man4
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 14 May 2010 20:11:30 -0000

Author: marius
Date: Fri May 14 20:11:30 2010
New Revision: 208098
URL: http://svn.freebsd.org/changeset/base/208098

Log:
  Document the led(4) interface to the identification LEDs.
  
  MFC after:	3 days

Modified:
  head/share/man/man4/em.4
  head/share/man/man4/igb.4

Modified: head/share/man/man4/em.4
==============================================================================
--- head/share/man/man4/em.4	Fri May 14 20:00:21 2010	(r208097)
+++ head/share/man/man4/em.4	Fri May 14 20:11:30 2010	(r208098)
@@ -31,7 +31,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd October 6, 2008
+.Dd May 14, 2010
 .Dt EM 4
 .Os
 .Sh NAME
@@ -62,6 +62,11 @@ The driver supports Transmit/Receive che
 and Jumbo Frames on all but 82542-based adapters.
 Furthermore it supports TCP segmentation offload (TSO) on all adapters but
 those based on the 82543, 82544 and 82547 controller chips.
+The identification LEDs of the adapters supported by the
+.Nm
+driver can be controlled via the
+.Xr led 4
+API for localization purposes.
 For further hardware information, see the
 .Pa README
 included with the driver.
@@ -241,10 +246,25 @@ If an issue is identified with the relea
 with a supported adapter, email the specific information related to the
 issue to
 .Aq freebsdnic@mailbox.intel.com .
+.Sh FILES
+.Bl -tag -width /dev/led/em*
+.It Pa /dev/led/em*
+identification LED device nodes
+.El
+.Sh EXAMPLES
+Make the identification LED of em0 blink:
+.Pp
+.Dl "echo f2 > /dev/led/em0"
+.Pp
+Turn the identification LED of em0 off again:
+.Pp
+.Dl "echo 0 > /dev/led/em0"
+.Pp
 .Sh SEE ALSO
 .Xr altq 4 ,
 .Xr arp 4 ,
 .Xr igb 4 ,
+.Xr led 4 ,
 .Xr netintro 4 ,
 .Xr ng_ether 4 ,
 .Xr polling 4 ,

Modified: head/share/man/man4/igb.4
==============================================================================
--- head/share/man/man4/igb.4	Fri May 14 20:00:21 2010	(r208097)
+++ head/share/man/man4/igb.4	Fri May 14 20:11:30 2010	(r208098)
@@ -31,7 +31,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd October 6, 2008
+.Dd May 14, 2010
 .Dt IGB 4
 .Os
 .Sh NAME
@@ -60,6 +60,11 @@ The driver supports Transmit/Receive che
 Frames.
 Furthermore it supports TCP segmentation offload (TSO) on all
 adapters.
+The identification LEDs of the adapters supported by the
+.Nm
+driver can be controlled via the
+.Xr led 4
+API for localization purposes.
 .Pp
 For questions related to hardware requirements, refer to the
 documentation supplied with your Intel PRO/1000 adapter.
@@ -175,10 +180,25 @@ If an issue is identified with the relea
 with a supported adapter, email the specific information related to the
 issue to
 .Aq freebsdnic@mailbox.intel.com .
+.Sh FILES
+.Bl -tag -width /dev/led/igb*
+.It Pa /dev/led/igb*
+identification LED device nodes
+.El
+.Sh EXAMPLES
+Make the identification LED of igb0 blink:
+.Pp
+.Dl "echo f2 > /dev/led/igb0"
+.Pp
+Turn the identification LED of igb0 off again:
+.Pp
+.Dl "echo 0 > /dev/led/igb0"
+.Pp
 .Sh SEE ALSO
 .Xr altq 4 ,
 .Xr arp 4 ,
 .Xr em 4 ,
+.Xr led 4 ,
 .Xr netintro 4 ,
 .Xr ng_ether 4 ,
 .Xr polling 4 ,

From owner-svn-src-head@FreeBSD.ORG  Fri May 14 20:40:37 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 79E781065672;
	Fri, 14 May 2010 20:40:37 +0000 (UTC)
	(envelope-from delphij@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 692DC8FC1A;
	Fri, 14 May 2010 20:40:37 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4EKeb3o064767;
	Fri, 14 May 2010 20:40:37 GMT (envelope-from delphij@svn.freebsd.org)
Received: (from delphij@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4EKebXT064762;
	Fri, 14 May 2010 20:40:37 GMT (envelope-from delphij@svn.freebsd.org)
Message-Id: <201005142040.o4EKebXT064762@svn.freebsd.org>
From: Xin LI 
Date: Fri, 14 May 2010 20:40:37 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r208099 - in head: . lib/liblzma
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 14 May 2010 20:40:37 -0000

Author: delphij
Date: Fri May 14 20:40:37 2010
New Revision: 208099
URL: http://svn.freebsd.org/changeset/base/208099

Log:
   - Add versioned symbols to liblzma
   - Use default SHLIB_MAJOR.
  
  Approved by:	mm
  X-MFC with:	lzma library MFC

Added:
  head/lib/liblzma/Symbol.map   (contents, props changed)
  head/lib/liblzma/Versions.def   (contents, props changed)
Modified:
  head/ObsoleteFiles.inc
  head/lib/liblzma/Makefile

Modified: head/ObsoleteFiles.inc
==============================================================================
--- head/ObsoleteFiles.inc	Fri May 14 20:11:30 2010	(r208098)
+++ head/ObsoleteFiles.inc	Fri May 14 20:40:37 2010	(r208099)
@@ -14,6 +14,11 @@
 # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last.
 #
 
+# 20100514: library version bump for versioned symbols for liblzma
+OLD_LIBS+=usr/lib/liblzma.so.0
+.if ${TARGET_ARCH} == "amd64"
+OLD_LIBS+=usr/lib32/liblzma.so.0
+.endif
 # 20100511: move GCC-specific headers to /usr/include/gcc
 .if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "i386"
 OLD_FILES+=usr/include/emmintrin.h

Modified: head/lib/liblzma/Makefile
==============================================================================
--- head/lib/liblzma/Makefile	Fri May 14 20:11:30 2010	(r208098)
+++ head/lib/liblzma/Makefile	Fri May 14 20:40:37 2010	(r208099)
@@ -1,7 +1,6 @@
 # $FreeBSD$
 
-LIB=	lzma
-SHLIB_MAJOR=	0
+LIB=		lzma
 LZMADIR=	${.CURDIR}/../../contrib/xz/src/liblzma
 
 .PATH: ${LZMADIR}/../common
@@ -122,6 +121,7 @@ SRCS+=	simple_coder.c \
 WARNS?=	3
 
 CFLAGS+=	-DHAVE_CONFIG_H \
+		-DTUKLIB_SYMBOL_PREFIX=lzma_ \
 		-I${.CURDIR} \
 		-I${LZMADIR}/api \
 		-I${LZMADIR}/common \
@@ -134,4 +134,8 @@ CFLAGS+=	-DHAVE_CONFIG_H \
 		-I${LZMADIR}/simple \
 		-I${LZMADIR}/../common
 
+VERSION_DEF=	${.CURDIR}/Versions.def
+SYMBOL_MAPS=	${.CURDIR}/Symbol.map
+CFLAGS+=	-DSYMBOL_VERSIONING
+
 .include 

Added: head/lib/liblzma/Symbol.map
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/liblzma/Symbol.map	Fri May 14 20:40:37 2010	(r208099)
@@ -0,0 +1,189 @@
+/*
+ * $FreeBSD$
+ */
+
+XZ_5.0 {
+	lzma_alone_decoder;
+	lzma_alone_encoder;
+	lzma_auto_decoder;
+	lzma_block_buffer_bound;
+	lzma_block_buffer_decode;
+	lzma_block_buffer_encode;
+	lzma_block_compressed_size;
+	lzma_block_decoder;
+	lzma_block_encoder;
+	lzma_block_header_decode;
+	lzma_block_header_encode;
+	lzma_block_header_size;
+	lzma_block_total_size;
+	lzma_block_unpadded_size;
+	lzma_check_is_supported;
+	lzma_check_size;
+	lzma_code;
+	lzma_crc32;
+	lzma_crc64;
+	lzma_easy_buffer_encode;
+	lzma_easy_decoder_memusage;
+	lzma_easy_encoder;
+	lzma_easy_encoder_memusage;
+	lzma_end;
+	lzma_filter_decoder_is_supported;
+	lzma_filter_encoder_is_supported;
+	lzma_filter_flags_decode;
+	lzma_filter_flags_encode;
+	lzma_filter_flags_size;
+	lzma_filters_copy;
+	lzma_filters_update;
+	lzma_get_check;
+	lzma_index_append;
+	lzma_index_block_count;
+	lzma_index_buffer_decode;
+	lzma_index_buffer_encode;
+	lzma_index_cat;
+	lzma_index_checks;
+	lzma_index_decoder;
+	lzma_index_dup;
+	lzma_index_encoder;
+	lzma_index_end;
+	lzma_index_file_size;
+	lzma_index_hash_append;
+	lzma_index_hash_decode;
+	lzma_index_hash_end;
+	lzma_index_hash_init;
+	lzma_index_hash_size;
+	lzma_index_init;
+	lzma_index_iter_init;
+	lzma_index_iter_locate;
+	lzma_index_iter_next;
+	lzma_index_iter_rewind;
+	lzma_index_memusage;
+	lzma_index_memused;
+	lzma_index_size;
+	lzma_index_stream_count;
+	lzma_index_stream_flags;
+	lzma_index_stream_padding;
+	lzma_index_stream_size;
+	lzma_index_total_size;
+	lzma_index_uncompressed_size;
+	lzma_lzma_preset;
+	lzma_memlimit_get;
+	lzma_memlimit_set;
+	lzma_memusage;
+	lzma_mf_is_supported;
+	lzma_mode_is_supported;
+	lzma_physmem;
+	lzma_properties_decode;
+	lzma_properties_encode;
+	lzma_properties_size;
+	lzma_raw_buffer_decode;
+	lzma_raw_buffer_encode;
+	lzma_raw_decoder;
+	lzma_raw_decoder_memusage;
+	lzma_raw_encoder;
+	lzma_raw_encoder_memusage;
+	lzma_stream_buffer_bound;
+	lzma_stream_buffer_decode;
+	lzma_stream_buffer_encode;
+	lzma_stream_decoder;
+	lzma_stream_encoder;
+	lzma_stream_flags_compare;
+	lzma_stream_footer_decode;
+	lzma_stream_footer_encode;
+	lzma_stream_header_decode;
+	lzma_stream_header_encode;
+	lzma_version_number;
+	lzma_version_string;
+	lzma_vli_decode;
+	lzma_vli_encode;
+	lzma_vli_size;
+};
+
+XZprivate_1.0 {
+	lzma_alloc;
+	lzma_alone_decoder_init;
+	lzma_block_decoder_init;
+	lzma_block_encoder_init;
+	lzma_bufcpy;
+	lzma_check_finish;
+	lzma_check_init;
+	lzma_check_update;
+	lzma_chunk_size;
+	lzma_delta_coder_init;
+	lzma_delta_coder_memusage;
+	lzma_delta_decoder_init;
+	lzma_delta_encoder_init;
+	lzma_delta_props_decode;
+	lzma_delta_props_encode;
+	lzma_easy_preset;
+	lzma_free;
+	lzma_index_encoder_init;
+	lzma_index_padding_size;
+	lzma_index_prealloc;
+	lzma_lz_decoder_init;
+	lzma_lz_decoder_memusage;
+	lzma_lz_decoder_uncompressed;
+	lzma_lz_encoder_init;
+	lzma_lz_encoder_memusage;
+	lzma_lzma2_decoder_init;
+	lzma_lzma2_decoder_memusage;
+	lzma_lzma2_encoder_init;
+	lzma_lzma2_encoder_memusage;
+	lzma_lzma2_props_decode;
+	lzma_lzma2_props_encode;
+	lzma_lzma_decoder_create;
+	lzma_lzma_decoder_init;
+	lzma_lzma_decoder_memusage;
+	lzma_lzma_decoder_memusage_nocheck;
+	lzma_lzma_encode;
+	lzma_lzma_encoder_create;
+	lzma_lzma_encoder_init;
+	lzma_lzma_encoder_memusage;
+	lzma_lzma_encoder_reset;
+	lzma_lzma_lclppb_decode;
+	lzma_lzma_lclppb_encode;
+	lzma_lzma_optimum_fast;
+	lzma_lzma_optimum_normal;
+	lzma_lzma_props_decode;
+	lzma_lzma_props_encode;
+	lzma_mf_bt2_find;
+	lzma_mf_bt2_skip;
+	lzma_mf_bt3_find;
+	lzma_mf_bt3_skip;
+	lzma_mf_bt4_find;
+	lzma_mf_bt4_skip;
+	lzma_mf_find;
+	lzma_mf_hc3_find;
+	lzma_mf_hc3_skip;
+	lzma_mf_hc4_find;
+	lzma_mf_hc4_skip;
+	lzma_next_end;
+	lzma_next_filter_init;
+	lzma_next_filter_update;
+	lzma_raw_coder_init;
+	lzma_raw_coder_memusage;
+	lzma_raw_decoder_init;
+	lzma_raw_encoder_init;
+	lzma_sha256_finish;
+	lzma_sha256_init;
+	lzma_sha256_update;
+	lzma_simple_arm_decoder_init;
+	lzma_simple_arm_encoder_init;
+	lzma_simple_armthumb_decoder_init;
+	lzma_simple_armthumb_encoder_init;
+	lzma_simple_coder_init;
+	lzma_simple_ia64_decoder_init;
+	lzma_simple_ia64_encoder_init;
+	lzma_simple_powerpc_decoder_init;
+	lzma_simple_powerpc_encoder_init;
+	lzma_simple_props_decode;
+	lzma_simple_props_encode;
+	lzma_simple_props_size;
+	lzma_simple_sparc_decoder_init;
+	lzma_simple_sparc_encoder_init;
+	lzma_simple_x86_decoder_init;
+	lzma_simple_x86_encoder_init;
+	lzma_stream_decoder_init;
+	lzma_stream_encoder_init;
+	lzma_strm_init;
+	lzma_tuklib_physmem;
+};

Added: head/lib/liblzma/Versions.def
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/liblzma/Versions.def	Fri May 14 20:40:37 2010	(r208099)
@@ -0,0 +1,9 @@
+# $FreeBSD$
+
+XZ_5.0 {
+};
+
+
+XZprivate_1.0 {
+} XZ_5.0;
+

From owner-svn-src-head@FreeBSD.ORG  Fri May 14 20:42:26 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id EA4C9106566B;
	Fri, 14 May 2010 20:42:26 +0000 (UTC)
	(envelope-from ronald-freebsd8@klop.yi.org)
Received: from smtp-out1.tiscali.nl (smtp-out1.tiscali.nl [195.241.79.176])
	by mx1.freebsd.org (Postfix) with ESMTP id A1D1B8FC1A;
	Fri, 14 May 2010 20:42:26 +0000 (UTC)
Received: from [212.123.145.58] (helo=sjakie.klop.ws)
	by smtp-out1.tiscali.nl with esmtp (Exim)
	(envelope-from )
	id 1OD1iD-0003vS-Jg; Fri, 14 May 2010 22:42:25 +0200
Received: from 212-123-145-58.ip.telfort.nl (localhost [127.0.0.1])
	by sjakie.klop.ws (Postfix) with ESMTP id 662BC146D3;
	Fri, 14 May 2010 22:42:15 +0200 (CEST)
Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes
To: "Matthew Jacob" , "Ronald Klop"
	
References: <201005112222.o4BMM1uq012874@svn.freebsd.org>
	
	<4BEAB941.1000009@feral.com>
Date: Fri, 14 May 2010 22:42:15 +0200
MIME-Version: 1.0
From: "Ronald Klop" 
Message-ID: 
In-Reply-To: <4BEAB941.1000009@feral.com>
User-Agent: Opera Mail/10.10 (FreeBSD)
Content-Transfer-Encoding: quoted-printable
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, Matt Jacob 
Subject: Re: svn commit: r207933 - head/sys/cam/scsi
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 14 May 2010 20:42:27 -0000

On Wed, 12 May 2010 16:20:49 +0200, Matthew Jacob  wrote:

>   Ow. No need to be rude :-).
>
> No, I didn't, why do you ask?

Oh never mind, I just liked the use of alphabetical characters to indicat=
e =20
disk devices and I always wondered what DOS/Windows would do if you had =20
more than 26 disks.

Cheers,

Ronald.

>> Wow, did you copy this from windows? :-)
>
> _______________________________________________
> svn-src-all@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/svn-src-all
> To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"


From owner-svn-src-head@FreeBSD.ORG  Fri May 14 20:47:13 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 624811065672;
	Fri, 14 May 2010 20:47:13 +0000 (UTC)
	(envelope-from kabaev@gmail.com)
Received: from mail-pz0-f174.google.com (mail-pz0-f174.google.com
	[209.85.222.174])
	by mx1.freebsd.org (Postfix) with ESMTP id B98D58FC1B;
	Fri, 14 May 2010 20:47:12 +0000 (UTC)
Received: by pzk4 with SMTP id 4so1638727pzk.7
	for ; Fri, 14 May 2010 13:47:12 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:received:received:date:from:to:cc:subject
	:message-id:in-reply-to:references:x-mailer:mime-version
	:content-type; bh=p3Z1NO/AdaVRkIatlFUU9wmFlCRM49YcMcLzRnj1eUE=;
	b=E76UXuaCVbtaSqU6/F1iqPZY8mMW9jh2I2STr3BkQvmhRNgFcZkapiLzkdTGYXlskJ
	Q70FJ8zQjhfWDWpJ328QwJA9biC4PoR2lAmKiU1dqBqITCPne8Z3r35LWeDfmYNBFXLi
	tIcDPRPyKf938fG+hElqL2M1nj+yxfF+CW1gU=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer
	:mime-version:content-type;
	b=Id6nQHR/jBJpNAu+IxQXlkS6RzR5LI5pOtT+DiZuFUDCDjFeYozLfLtosS7ZFVFD9k
	9cCWIFFesNkgyZxVwLQmvqCwqkHw6GqXo35Pi8zcdt+bs4UZp+aYKmr18/n1k1/7Q3B8
	U1MiEVP0SLkYJm6pix4onjN+2WJvUySfbhyAg=
Received: by 10.142.247.16 with SMTP id u16mr1127083wfh.217.1273870032028;
	Fri, 14 May 2010 13:47:12 -0700 (PDT)
Received: from kan.dnsalias.net (c-24-63-226-98.hsd1.ma.comcast.net
	[24.63.226.98])
	by mx.google.com with ESMTPS id u18sm1246594wfh.7.2010.05.14.13.47.10
	(version=SSLv3 cipher=RC4-MD5); Fri, 14 May 2010 13:47:11 -0700 (PDT)
Date: Fri, 14 May 2010 16:47:04 -0400
From: Alexander Kabaev 
To: Xin LI 
Message-ID: <20100514164704.5e9ddfb9@kan.dnsalias.net>
In-Reply-To: <201005142040.o4EKebXT064762@svn.freebsd.org>
References: <201005142040.o4EKebXT064762@svn.freebsd.org>
X-Mailer: Claws Mail 3.7.5 (GTK+ 2.18.7; amd64-portbld-freebsd9.0)
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=PGP-SHA1;
	boundary="Sig_/lVPsEOK9tII8UF/xNrPIsDS";
	protocol="application/pgp-signature"
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r208099 - in head: . lib/liblzma
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 14 May 2010 20:47:13 -0000

--Sig_/lVPsEOK9tII8UF/xNrPIsDS
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

On Fri, 14 May 2010 20:40:37 +0000 (UTC)
Xin LI  wrote:

> Author: delphij
> Date: Fri May 14 20:40:37 2010
> New Revision: 208099
> URL: http://svn.freebsd.org/changeset/base/208099
>=20
> Log:
>    - Add versioned symbols to liblzma
>    - Use default SHLIB_MAJOR.
>  =20
>   Approved by:	mm
>   X-MFC with:	lzma library MFC
>

If adding symbol versioning is all patch does, then bumping library
major version is not necessary. If you wanted so.1 for other reasons,
please ignore this email.

--=20
Alexander Kabaev

--Sig_/lVPsEOK9tII8UF/xNrPIsDS
Content-Type: application/pgp-signature; name=signature.asc
Content-Disposition: attachment; filename=signature.asc

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (FreeBSD)

iD8DBQFL7bbMQ6z1jMm+XZYRAg2rAJ9CqbeU+ZinCMqHulSCOYTLb0lndQCcDkFQ
xBrzTVoQEvmETIo4WyPU0z8=
=dkMF
-----END PGP SIGNATURE-----

--Sig_/lVPsEOK9tII8UF/xNrPIsDS--

From owner-svn-src-head@FreeBSD.ORG  Fri May 14 21:11:59 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5A81B106566B;
	Fri, 14 May 2010 21:11:59 +0000 (UTC) (envelope-from bz@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 43ED08FC08;
	Fri, 14 May 2010 21:11:59 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4ELBxEL071692;
	Fri, 14 May 2010 21:11:59 GMT (envelope-from bz@svn.freebsd.org)
Received: (from bz@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4ELBxLw071689;
	Fri, 14 May 2010 21:11:59 GMT (envelope-from bz@svn.freebsd.org)
Message-Id: <201005142111.o4ELBxLw071689@svn.freebsd.org>
From: "Bjoern A. Zeeb" 
Date: Fri, 14 May 2010 21:11:59 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r208100 - in head/sys: kern net
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 14 May 2010 21:11:59 -0000

Author: bz
Date: Fri May 14 21:11:58 2010
New Revision: 208100
URL: http://svn.freebsd.org/changeset/base/208100

Log:
  Fix an issue with the dynamic pcpu/vnet data allocators.
  
  We cannot expect that modspace is the last entry in the linker
  set and thus that modspace + possible extra space up to PAGE_SIZE
  would be contiguous.  For the moment do not support more than
  *_MODMIN space and ignore the extra space (*).
  
  (*) We know how to get it back but it'll need testing.
  
  Discussed with:	jeff, rwatson (briefly)
  Reviewed by:	jeff
  Sponsored by:	The FreeBSD Foundation
  Sponsored by:	CK Software GmbH
  MFC after:	4 days

Modified:
  head/sys/kern/subr_pcpu.c
  head/sys/net/vnet.c

Modified: head/sys/kern/subr_pcpu.c
==============================================================================
--- head/sys/kern/subr_pcpu.c	Fri May 14 20:40:37 2010	(r208099)
+++ head/sys/kern/subr_pcpu.c	Fri May 14 21:11:58 2010	(r208100)
@@ -125,7 +125,7 @@ dpcpu_startup(void *dummy __unused)
 
 	df = malloc(sizeof(*df), M_PCPU, M_WAITOK | M_ZERO);
 	df->df_start = (uintptr_t)&DPCPU_NAME(modspace);
-	df->df_len = DPCPU_MODSIZE;
+	df->df_len = DPCPU_MODMIN;
 	TAILQ_INSERT_HEAD(&dpcpu_head, df, df_link);
 	sx_init(&dpcpu_lock, "dpcpu alloc lock");
 }

Modified: head/sys/net/vnet.c
==============================================================================
--- head/sys/net/vnet.c	Fri May 14 20:40:37 2010	(r208099)
+++ head/sys/net/vnet.c	Fri May 14 21:11:58 2010	(r208100)
@@ -348,7 +348,7 @@ vnet_data_startup(void *dummy __unused)
 
 	df = malloc(sizeof(*df), M_VNET_DATA_FREE, M_WAITOK | M_ZERO);
 	df->vnd_start = (uintptr_t)&VNET_NAME(modspace);
-	df->vnd_len = VNET_MODSIZE;
+	df->vnd_len = VNET_MODMIN;
 	TAILQ_INSERT_HEAD(&vnet_data_free_head, df, vnd_link);
 	sx_init(&vnet_data_free_lock, "vnet_data alloc lock");
 }

From owner-svn-src-head@FreeBSD.ORG  Fri May 14 21:27:39 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E01031065670;
	Fri, 14 May 2010 21:27:39 +0000 (UTC)
	(envelope-from mjacob@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id D03678FC19;
	Fri, 14 May 2010 21:27:39 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4ELRdrY075155;
	Fri, 14 May 2010 21:27:39 GMT (envelope-from mjacob@svn.freebsd.org)
Received: (from mjacob@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4ELRdDS075153;
	Fri, 14 May 2010 21:27:39 GMT (envelope-from mjacob@svn.freebsd.org)
Message-Id: <201005142127.o4ELRdDS075153@svn.freebsd.org>
From: Matt Jacob 
Date: Fri, 14 May 2010 21:27:39 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r208101 - head/sys/geom/multipath
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 14 May 2010 21:27:40 -0000

Author: mjacob
Date: Fri May 14 21:27:39 2010
New Revision: 208101
URL: http://svn.freebsd.org/changeset/base/208101

Log:
  Yet another potential dereference of a dead provider.
  
  Sponsored by:   Panasas
  MFC after:	1 week

Modified:
  head/sys/geom/multipath/g_multipath.c

Modified: head/sys/geom/multipath/g_multipath.c
==============================================================================
--- head/sys/geom/multipath/g_multipath.c	Fri May 14 21:11:58 2010	(r208100)
+++ head/sys/geom/multipath/g_multipath.c	Fri May 14 21:27:39 2010	(r208101)
@@ -197,7 +197,7 @@ g_multipath_done_error(struct bio *bp)
 				break;
 			}
 		}
-		if (sc->cp_active == NULL) {
+		if (sc->cp_active == NULL || sc->cp_active->provider == NULL) {
 			printf("GEOM_MULTIPATH: out of providers for %s\n",
 			    sc->sc_name);
 			g_topology_unlock();

From owner-svn-src-head@FreeBSD.ORG  Fri May 14 22:00:38 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8FE991065673;
	Fri, 14 May 2010 22:00:38 +0000 (UTC) (envelope-from jfv@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 66FCB8FC08;
	Fri, 14 May 2010 22:00:38 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4EM0c9a082425;
	Fri, 14 May 2010 22:00:38 GMT (envelope-from jfv@svn.freebsd.org)
Received: (from jfv@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4EM0c1U082423;
	Fri, 14 May 2010 22:00:38 GMT (envelope-from jfv@svn.freebsd.org)
Message-Id: <201005142200.o4EM0c1U082423@svn.freebsd.org>
From: Jack F Vogel 
Date: Fri, 14 May 2010 22:00:38 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r208102 - head/sys/dev/ixgbe
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 14 May 2010 22:00:38 -0000

Author: jfv
Date: Fri May 14 22:00:37 2010
New Revision: 208102
URL: http://svn.freebsd.org/changeset/base/208102

Log:
   A few minor fixes:
     - add a moderation value to the Link vector
     - allow disabling HW RSC on the 82599 if LRO
       is not enabled.
     - correct error in the stats code
     - change optic type on the 82598 DA device
  
  Thanks to Andrew Boyer for the changes.

Modified:
  head/sys/dev/ixgbe/ixgbe.c

Modified: head/sys/dev/ixgbe/ixgbe.c
==============================================================================
--- head/sys/dev/ixgbe/ixgbe.c	Fri May 14 21:27:39 2010	(r208101)
+++ head/sys/dev/ixgbe/ixgbe.c	Fri May 14 22:00:37 2010	(r208102)
@@ -46,7 +46,7 @@ int             ixgbe_display_debug_stat
 /*********************************************************************
  *  Driver version
  *********************************************************************/
-char ixgbe_driver_version[] = "2.1.7";
+char ixgbe_driver_version[] = "2.1.8";
 
 /*********************************************************************
  *  PCI Device ID Table
@@ -412,7 +412,6 @@ ixgbe_attach(device_t dev)
 			break;
 		case IXGBE_DEV_ID_82598 :
 		case IXGBE_DEV_ID_82598AF_DUAL_PORT :
-		case IXGBE_DEV_ID_82598_DA_DUAL_PORT :
 		case IXGBE_DEV_ID_82598AF_SINGLE_PORT :
 		case IXGBE_DEV_ID_82598_SR_DUAL_PORT_EM :
 		case IXGBE_DEV_ID_82598EB_SFP_LOM :
@@ -425,6 +424,9 @@ ixgbe_attach(device_t dev)
 		case IXGBE_DEV_ID_82598EB_XF_LR :
 			adapter->optics = IFM_10G_LR;
 			break;
+		case IXGBE_DEV_ID_82598_DA_DUAL_PORT :
+			adapter->optics = IFM_10G_TWINAX;
+			break;
 		case IXGBE_DEV_ID_82599_SFP :
 			adapter->optics = IFM_10G_SR;
 			ixgbe_num_segs = IXGBE_82599_SCATTER;
@@ -1158,6 +1160,9 @@ ixgbe_init_locked(struct adapter *adapte
         	}
 	}
 
+	/* Set moderation on the Link interrupt */
+	IXGBE_WRITE_REG(hw, IXGBE_EITR(adapter->linkvec), IXGBE_LINK_ITR);
+
 	/* Config/Enable Link */
 	ixgbe_config_link(adapter);
 
@@ -3638,13 +3643,11 @@ ixgbe_setup_receive_ring(struct rx_ring 
 	/*
 	** Now set up the LRO interface:
 	** 82598 uses software LRO, the
-	** 82599 additionally uses a
-	** hardware assist.
-	**
-	** Disable RSC when RXCSUM is off
+	** 82599 uses a hardware assist.
 	*/
 	if ((adapter->hw.mac.type == ixgbe_mac_82599EB) &&
-	    (ifp->if_capenable & IFCAP_RXCSUM))
+	    (ifp->if_capenable & IFCAP_RXCSUM) &&
+	    (ifp->if_capenable & IFCAP_LRO))
 		ixgbe_setup_hw_rsc(rxr);
 	else if (ifp->if_capenable & IFCAP_LRO) {
 		int err = tcp_lro_init(lro);
@@ -4661,7 +4664,7 @@ ixgbe_update_stats_counters(struct adapt
 		adapter->stats.lxoffrxc += IXGBE_READ_REG(hw, IXGBE_LXOFFRXC);
 		/* 82598 only has a counter in the high register */
 		adapter->stats.gorc += IXGBE_READ_REG(hw, IXGBE_GORCH);
-		adapter->stats.gorc += IXGBE_READ_REG(hw, IXGBE_GOTCH);
+		adapter->stats.gotc += IXGBE_READ_REG(hw, IXGBE_GOTCH);
 		adapter->stats.tor += IXGBE_READ_REG(hw, IXGBE_TORH);
 	}
 

From owner-svn-src-head@FreeBSD.ORG  Fri May 14 22:18:35 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 225461065677;
	Fri, 14 May 2010 22:18:35 +0000 (UTC) (envelope-from jfv@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 12DD98FC0A;
	Fri, 14 May 2010 22:18:35 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4EMIYT9086710;
	Fri, 14 May 2010 22:18:34 GMT (envelope-from jfv@svn.freebsd.org)
Received: (from jfv@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4EMIYT2086706;
	Fri, 14 May 2010 22:18:34 GMT (envelope-from jfv@svn.freebsd.org)
Message-Id: <201005142218.o4EMIYT2086706@svn.freebsd.org>
From: Jack F Vogel 
Date: Fri, 14 May 2010 22:18:34 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r208103 - head/sys/dev/e1000
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 14 May 2010 22:18:35 -0000

Author: jfv
Date: Fri May 14 22:18:34 2010
New Revision: 208103
URL: http://svn.freebsd.org/changeset/base/208103

Log:
  Small changes preparing for MFC, need to conditionalize
  the buf_ring_free call, and lem is missing the WOL change
  put into em.

Modified:
  head/sys/dev/e1000/if_em.c
  head/sys/dev/e1000/if_igb.c
  head/sys/dev/e1000/if_lem.c

Modified: head/sys/dev/e1000/if_em.c
==============================================================================
--- head/sys/dev/e1000/if_em.c	Fri May 14 22:00:37 2010	(r208102)
+++ head/sys/dev/e1000/if_em.c	Fri May 14 22:18:34 2010	(r208103)
@@ -2948,7 +2948,9 @@ err_tx_desc:
 		em_dma_free(adapter, &txr->txdma);
 	free(adapter->rx_rings, M_DEVBUF);
 rx_fail:
+#if __FreeBSD_version >= 800000
 	buf_ring_free(txr->br, M_DEVBUF);
+#endif
 	free(adapter->tx_rings, M_DEVBUF);
 fail:
 	return (error);

Modified: head/sys/dev/e1000/if_igb.c
==============================================================================
--- head/sys/dev/e1000/if_igb.c	Fri May 14 22:00:37 2010	(r208102)
+++ head/sys/dev/e1000/if_igb.c	Fri May 14 22:18:34 2010	(r208103)
@@ -2969,7 +2969,9 @@ err_tx_desc:
 		igb_dma_free(adapter, &txr->txdma);
 	free(adapter->rx_rings, M_DEVBUF);
 rx_fail:
+#if __FreeBSD_version >= 800000
 	buf_ring_free(txr->br, M_DEVBUF);
+#endif
 	free(adapter->tx_rings, M_DEVBUF);
 tx_fail:
 	free(adapter->queues, M_DEVBUF);

Modified: head/sys/dev/e1000/if_lem.c
==============================================================================
--- head/sys/dev/e1000/if_lem.c	Fri May 14 22:00:37 2010	(r208102)
+++ head/sys/dev/e1000/if_lem.c	Fri May 14 22:18:34 2010	(r208103)
@@ -2422,10 +2422,10 @@ lem_setup_interface(device_t dev, struct
 	ifp->if_capabilities |= IFCAP_POLLING;
 #endif
 
-	/* Enable All WOL methods by default */
+	/* Enable only WOL MAGIC by default */
 	if (adapter->wol) {
 		ifp->if_capabilities |= IFCAP_WOL;
-		ifp->if_capenable |= IFCAP_WOL;
+		ifp->if_capenable |= IFCAP_WOL_MAGIC;
 	}
 		
 	/*

From owner-svn-src-head@FreeBSD.ORG  Sat May 15 04:48:10 2010
Return-Path: 
Delivered-To: svn-src-head@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 924D0106566B;
	Sat, 15 May 2010 04:48:10 +0000 (UTC) (envelope-from uqs@FreeBSD.org)
Received: from acme.spoerlein.net (acme.spoerlein.net [IPv6:2001:470:9a47::1])
	by mx1.freebsd.org (Postfix) with ESMTP id 302FD8FC1D;
	Sat, 15 May 2010 04:48:10 +0000 (UTC)
Received: from acme.spoerlein.net (localhost.spoerlein.net [IPv6:::1])
	by acme.spoerlein.net (8.14.4/8.14.4) with ESMTP id o4F4m9ZK001739
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Sat, 15 May 2010 06:48:09 +0200 (CEST)
	(envelope-from uqs@FreeBSD.org)
Received: (from uqs@localhost)
	by acme.spoerlein.net (8.14.4/8.14.4/Submit) id o4F4m9h2001738;
	Sat, 15 May 2010 06:48:09 +0200 (CEST)
	(envelope-from uqs@FreeBSD.org)
Date: Sat, 15 May 2010 06:48:09 +0200
From: Ulrich Spoerlein 
To: src-committers@FreeBSD.org, svn-src-all@FreeBSD.org,
	svn-src-head@FreeBSD.org
Message-ID: <20100515044809.GP88504@acme.spoerlein.net>
Mail-Followup-To: Ulrich Spoerlein ,
	src-committers@FreeBSD.org, svn-src-all@FreeBSD.org,
	svn-src-head@FreeBSD.org
References: <201005141426.o4EEQnRt081229@svn.freebsd.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <201005141426.o4EEQnRt081229@svn.freebsd.org>
User-Agent: Mutt/1.5.20 (2009-06-14)
Cc: 
Subject: Re: svn commit: r208074 - head/sbin/fsirand
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 15 May 2010 04:48:10 -0000

On Fri, 14.05.2010 at 14:26:49 +0000, Ulrich Spoerlein wrote:
> Author: uqs
> Date: Fri May 14 14:26:49 2010
> New Revision: 208074
> URL: http://svn.freebsd.org/changeset/base/208074
> 
> Log:
>   fsirand(8): make WARNS=3 clean
>   

Forgot to add:

X-MFC-After:            3 weeks

From owner-svn-src-head@FreeBSD.ORG  Sat May 15 08:57:17 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 76752106566B;
	Sat, 15 May 2010 08:57:17 +0000 (UTC) (envelope-from phk@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 6530F8FC12;
	Sat, 15 May 2010 08:57:17 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4F8vHcI027580;
	Sat, 15 May 2010 08:57:17 GMT (envelope-from phk@svn.freebsd.org)
Received: (from phk@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4F8vHOU027578;
	Sat, 15 May 2010 08:57:17 GMT (envelope-from phk@svn.freebsd.org)
Message-Id: <201005150857.o4F8vHOU027578@svn.freebsd.org>
From: Poul-Henning Kamp 
Date: Sat, 15 May 2010 08:57:17 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r208110 - head/usr.sbin/fifolog/lib
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 15 May 2010 08:57:17 -0000

Author: phk
Date: Sat May 15 08:57:16 2010
New Revision: 208110
URL: http://svn.freebsd.org/changeset/base/208110

Log:
  Do not attempt to render a logrecord with length byte, until we have
  decompressed all the bytes required.

Modified:
  head/usr.sbin/fifolog/lib/fifolog_reader.c

Modified: head/usr.sbin/fifolog/lib/fifolog_reader.c
==============================================================================
--- head/usr.sbin/fifolog/lib/fifolog_reader.c	Sat May 15 07:07:38 2010	(r208109)
+++ head/usr.sbin/fifolog/lib/fifolog_reader.c	Sat May 15 08:57:16 2010	(r208110)
@@ -225,6 +225,8 @@ fifolog_reader_chop(struct fifolog_reade
 		if (u & FIFOLOG_LENGTH) {
 			v = p[w];
 			w++;
+			if (p + w + v >= q)
+				return (p);
 		} else {
 			for (v = 0; p + v + w < q && p[v + w] != '\0'; v++)
 				continue;

From owner-svn-src-head@FreeBSD.ORG  Sat May 15 10:31:12 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 090861065679;
	Sat, 15 May 2010 10:31:12 +0000 (UTC) (envelope-from phk@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id D2DA38FC15;
	Sat, 15 May 2010 10:31:11 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4FAVBFj049848;
	Sat, 15 May 2010 10:31:11 GMT (envelope-from phk@svn.freebsd.org)
Received: (from phk@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4FAVBwX049846;
	Sat, 15 May 2010 10:31:11 GMT (envelope-from phk@svn.freebsd.org)
Message-Id: <201005151031.o4FAVBwX049846@svn.freebsd.org>
From: Poul-Henning Kamp 
Date: Sat, 15 May 2010 10:31:11 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r208111 - head/sys/i386/i386
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 15 May 2010 10:31:12 -0000

Author: phk
Date: Sat May 15 10:31:11 2010
New Revision: 208111
URL: http://svn.freebsd.org/changeset/base/208111

Log:
  Apply a patch that has been lingering in my inbox for far too long:
  
  On a soekris Net5501, if you do a watchdog -t 16, followed by a watchdog
  -t 0 to disable the watchdog, and then after some time (16s) re-enable
  the watchdog the box reboots immediatly. This prevents also to stop and
  restart watchdogd(8).
  
  This is because when you stop the watchdog, the timer is not stoped,
  only the hard reset is disabled. So when the timer has elapsed, the C2
  event of the timer is set.
  
  But when the hard reset is re-enabled, the event is not cleared and the
  box reboots.
  
  The attached patch stops and resets the counter when the watchdog is
  disabled and do not disable the hard reset of the timer (if the timer
  has elapsed it's too late).
  
  Submitted by:	 Patrick Lamaizière

Modified:
  head/sys/i386/i386/geode.c

Modified: head/sys/i386/i386/geode.c
==============================================================================
--- head/sys/i386/i386/geode.c	Sat May 15 08:57:16 2010	(r208110)
+++ head/sys/i386/i386/geode.c	Sat May 15 10:31:11 2010	(r208111)
@@ -208,14 +208,11 @@ geode_watchdog(void *foo __unused, u_int
 static void
 cs5536_watchdog(void *foo __unused, u_int cmd, int *error)
 {
-	u_int u, p;
+	u_int u, p, s;
 	uint16_t a;
 	uint32_t m;
 
 	a = rdmsr(0x5140000d);
-	m = rdmsr(0x51400029);
-	m &= ~(1 << 24);
-	wrmsr(0x51400029, m);
 
 	u = cmd & WD_INTERVAL;
 	if (u >= 30 && u <= 44) {
@@ -228,12 +225,24 @@ cs5536_watchdog(void *foo __unused, u_in
 		/* reset counter */
 		outw(a + 4, 0);
 		/* Arm reset mechanism */
+		m = rdmsr(0x51400029);
 		m |= (1 << 24);
 		wrmsr(0x51400029, m);
 		/* Start counter */
 		outw(a + 6, 0x8000);
 
 		*error = 0;
+	} else {
+		/* 
+		 * MFGPT_SETUP is write-once
+		 * Check if the counter has been setup
+		 */
+		s = inw(a + 6);
+		if (s & (1 << 12)) {
+			/* Stop and reset counter */
+			outw(a + 6, 0);
+			outw(a + 4, 0);
+		}
 	}
 }
 

From owner-svn-src-head@FreeBSD.ORG  Sat May 15 17:49:56 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id EF9ED106566C;
	Sat, 15 May 2010 17:49:56 +0000 (UTC)
	(envelope-from jilles@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id DED278FC08;
	Sat, 15 May 2010 17:49:56 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4FHnuVO047536;
	Sat, 15 May 2010 17:49:56 GMT (envelope-from jilles@svn.freebsd.org)
Received: (from jilles@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4FHnu0u047533;
	Sat, 15 May 2010 17:49:56 GMT (envelope-from jilles@svn.freebsd.org)
Message-Id: <201005151749.o4FHnu0u047533@svn.freebsd.org>
From: Jilles Tjoelker 
Date: Sat, 15 May 2010 17:49:56 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r208116 - head/etc
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 15 May 2010 17:49:57 -0000

Author: jilles
Date: Sat May 15 17:49:56 2010
New Revision: 208116
URL: http://svn.freebsd.org/changeset/base/208116

Log:
  Change the commented msgs examples in profile/csh.login from -f to -q.
  
  Starting something that wants input on login seems strange and can be
  dangerous. In some configurations, causing output can be bad, but it is not
  as dangerous.
  
  I do not expect this msgs invocation to be uncommented often.
  
  PR:		conf/96015
  MFC after:	4 days

Modified:
  head/etc/csh.login
  head/etc/profile

Modified: head/etc/csh.login
==============================================================================
--- head/etc/csh.login	Sat May 15 17:02:33 2010	(r208115)
+++ head/etc/csh.login	Sat May 15 17:49:56 2010	(r208116)
@@ -9,7 +9,7 @@
 # login.conf(5) and in particular the charset and lang options.
 # For full locales list check /usr/share/locale/*
 #
-# Read system messages
-# msgs -f
+# Check system messages
+# msgs -q
 # Allow terminal messages
 # mesg y

Modified: head/etc/profile
==============================================================================
--- head/etc/profile	Sat May 15 17:02:33 2010	(r208115)
+++ head/etc/profile	Sat May 15 17:49:56 2010	(r208116)
@@ -12,7 +12,7 @@
 # You should also read the setlocale(3) man page for information
 # on how to achieve more precise control of locale settings.
 #
-# Read system messages
-# msgs -f
+# Check system messages
+# msgs -q
 # Allow terminal messages
 # mesg y

From owner-svn-src-head@FreeBSD.ORG  Sat May 15 19:46:17 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2DBE31065676;
	Sat, 15 May 2010 19:46:17 +0000 (UTC)
	(envelope-from marius@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 1D0F78FC1A;
	Sat, 15 May 2010 19:46:17 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4FJkHAL073014;
	Sat, 15 May 2010 19:46:17 GMT (envelope-from marius@svn.freebsd.org)
Received: (from marius@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4FJkGft073012;
	Sat, 15 May 2010 19:46:16 GMT (envelope-from marius@svn.freebsd.org)
Message-Id: <201005151946.o4FJkGft073012@svn.freebsd.org>
From: Marius Strobl 
Date: Sat, 15 May 2010 19:46:16 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r208117 - head/sys/dev/e1000
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 15 May 2010 19:46:17 -0000

Author: marius
Date: Sat May 15 19:46:16 2010
New Revision: 208117
URL: http://svn.freebsd.org/changeset/base/208117

Log:
  Fix a mismerge in r206001.
  
  PR:		146614
  Approved by:	jfv (implicit)
  MFC afer:	3 days

Modified:
  head/sys/dev/e1000/if_em.c

Modified: head/sys/dev/e1000/if_em.c
==============================================================================
--- head/sys/dev/e1000/if_em.c	Sat May 15 17:49:56 2010	(r208116)
+++ head/sys/dev/e1000/if_em.c	Sat May 15 19:46:16 2010	(r208117)
@@ -710,6 +710,9 @@ em_detach(device_t dev)
 		ether_poll_deregister(ifp);
 #endif
 
+	if (adapter->led_dev != NULL)
+		led_destroy(adapter->led_dev);
+
 	EM_CORE_LOCK(adapter);
 	adapter->in_detach = 1;
 	em_stop(adapter);
@@ -779,9 +782,6 @@ em_resume(device_t dev)
 	struct adapter *adapter = device_get_softc(dev);
 	struct ifnet *ifp = adapter->ifp;
 
-	if (adapter->led_dev != NULL)
-		led_destroy(adapter->led_dev);
-
 	EM_CORE_LOCK(adapter);
 	em_init_locked(adapter);
 	em_init_manageability(adapter);

From owner-svn-src-head@FreeBSD.ORG  Sat May 15 20:26:10 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B5FB9106566B;
	Sat, 15 May 2010 20:26:10 +0000 (UTC)
	(envelope-from mjacob@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 9AB3B8FC0A;
	Sat, 15 May 2010 20:26:10 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4FKQAC6081992;
	Sat, 15 May 2010 20:26:10 GMT (envelope-from mjacob@svn.freebsd.org)
Received: (from mjacob@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4FKQA3T081989;
	Sat, 15 May 2010 20:26:10 GMT (envelope-from mjacob@svn.freebsd.org)
Message-Id: <201005152026.o4FKQA3T081989@svn.freebsd.org>
From: Matt Jacob 
Date: Sat, 15 May 2010 20:26:10 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r208119 - head/sys/dev/isp
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 15 May 2010 20:26:10 -0000

Author: mjacob
Date: Sat May 15 20:26:10 2010
New Revision: 208119
URL: http://svn.freebsd.org/changeset/base/208119

Log:
  Whap. Hook up some wires that were forgotten a few months ago and restore
  the zombie device timeout code and the loop down time code and the fabric
  hysteresis code.
  MFC after:	1 week
  Sponsored By:	Panasas

Modified:
  head/sys/dev/isp/isp_freebsd.c
  head/sys/dev/isp/ispvar.h

Modified: head/sys/dev/isp/isp_freebsd.c
==============================================================================
--- head/sys/dev/isp/isp_freebsd.c	Sat May 15 20:25:29 2010	(r208118)
+++ head/sys/dev/isp/isp_freebsd.c	Sat May 15 20:26:10 2010	(r208119)
@@ -49,7 +49,7 @@ __FBSDID("$FreeBSD$");
 MODULE_VERSION(isp, 1);
 MODULE_DEPEND(isp, cam, 1, 1, 1);
 int isp_announced = 0;
-int isp_fabric_hysteresis = 3;
+int isp_fabric_hysteresis = 5;
 int isp_loop_down_limit = 60;	/* default loop down limit */
 int isp_change_is_bad = 0;	/* "changed" devices are bad */
 int isp_quickboot_time = 7;	/* don't wait more than N secs for loop up */
@@ -141,9 +141,12 @@ isp_attach_chan(ispsoftc_t *isp, struct 
 		fc->path = path;
 		fc->isp = isp;
 		fc->ready = 1;
-
+		fc->gone_device_time = isp_gone_device_time;
+		fc->loop_down_limit = isp_loop_down_limit;
+		fc->hysteresis = isp_fabric_hysteresis;
 		callout_init_mtx(&fc->ldt, &isp->isp_osinfo.lock, 0);
 		callout_init_mtx(&fc->gdt, &isp->isp_osinfo.lock, 0);
+
 		/*
 		 * We start by being "loop down" if we have an initiator role
 		 */
@@ -3940,7 +3943,7 @@ isp_gdt(void *arg)
 	fcportdb_t *lp;
 	int dbidx, tgt, more_to_do = 0;
 
-	isp_prt(isp, ISP_LOGDEBUG0, "Chan %d GDT timer expired", chan);
+	isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, "Chan %d GDT timer expired @ %lu", chan, time_uptime);
 	for (dbidx = 0; dbidx < MAX_FC_TARG; dbidx++) {
 		lp = &FCPARAM(isp, chan)->portdb[dbidx];
 
@@ -3950,15 +3953,8 @@ isp_gdt(void *arg)
 		if (lp->dev_map_idx == 0 || lp->target_mode) {
 			continue;
 		}
-		/*
-		 * We can use new_portid here because it is untouched
-		 * while the state is ZOMBIE
-		 */
-		if (lp->new_portid == 0) {
-			continue;
-		}
-		lp->new_portid -= 1;
-		if (lp->new_portid != 0) {
+		if (lp->gone_timer != 0) {
+			lp->gone_timer -= 1;
 			more_to_do++;
 			continue;
 		}
@@ -3973,7 +3969,7 @@ isp_gdt(void *arg)
 		if (more_to_do) {
 			callout_reset(&fc->gdt, hz, isp_gdt, fc);
 		} else {
-			isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, "Chan %d stopping Gone Device Timer", chan);
+			isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, "Chan %d Stopping Gone Device Timer", chan);
 		}
 	}
 }
@@ -4942,7 +4938,7 @@ isp_async(ispsoftc_t *isp, ispasync_t cm
 				}
 				if (!callout_active(&fc->ldt)) {
 					callout_reset(&fc->ldt, fc->loop_down_limit * hz, isp_ldt, fc);
-					isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, "starting Loop Down Timer @ %lu", (unsigned long) time_uptime);
+					isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, "Starting Loop Down Timer @ %lu", (unsigned long) time_uptime);
 				}
 			}
 		}
@@ -4972,6 +4968,7 @@ isp_async(ispsoftc_t *isp, ispasync_t cm
 		va_end(ap);
 		fc = ISP_FC_PC(isp, bus);
 		lp->reserved = 0;
+		lp->gone_timer = 0;
 		if ((FCPARAM(isp, bus)->role & ISP_ROLE_INITIATOR) && (lp->roles & (SVC3_TGT_ROLE >> SVC3_ROLE_SHIFT))) {
 			int dbidx = lp - FCPARAM(isp, bus)->portdb;
 			int i;
@@ -5007,6 +5004,7 @@ isp_async(ispsoftc_t *isp, ispasync_t cm
 		va_end(ap);
 		fc = ISP_FC_PC(isp, bus);
 		lp->reserved = 0;
+		lp->gone_timer = 0;
 		if (isp_change_is_bad) {
 			lp->state = FC_PORTDB_STATE_NIL;
 			if (lp->dev_map_idx) {
@@ -5061,15 +5059,13 @@ isp_async(ispsoftc_t *isp, ispasync_t cm
 		 * If it isn't marked that isp_gdt is going to get rid of it,
 		 * announce that it's gone.
 		 *
-		 * We can use new_portid for the gone timer because it's
-		 * undefined while the state is ZOMBIE.
 		 */
 		if (lp->dev_map_idx && lp->reserved == 0) {
 			lp->reserved = 1;
-			lp->new_portid = ISP_FC_PC(isp, bus)->gone_device_time;
 			lp->state = FC_PORTDB_STATE_ZOMBIE;
+			lp->gone_timer = ISP_FC_PC(isp, bus)->gone_device_time;
 			if (fc->ready && !callout_active(&fc->gdt)) {
-				isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, "Chan %d starting Gone Device Timer", bus);
+				isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, "Chan %d Starting Gone Device Timer with %u seconds time now %lu", bus, lp->gone_timer, time_uptime);
 				callout_reset(&fc->gdt, hz, isp_gdt, fc);
 			}
 			tgt = lp->dev_map_idx - 1;

Modified: head/sys/dev/isp/ispvar.h
==============================================================================
--- head/sys/dev/isp/ispvar.h	Sat May 15 20:25:29 2010	(r208118)
+++ head/sys/dev/isp/ispvar.h	Sat May 15 20:26:10 2010	(r208119)
@@ -426,6 +426,7 @@ typedef struct {
 			new_portid	: 24;
 	uint64_t	node_wwn;
 	uint64_t	port_wwn;
+	uint32_t	gone_timer;
 } fcportdb_t;
 
 #define	FC_PORTDB_STATE_NIL		0

From owner-svn-src-head@FreeBSD.ORG  Sat May 15 21:18:15 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8F831106568A;
	Sat, 15 May 2010 21:18:15 +0000 (UTC)
	(envelope-from weongyo@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 7ACE78FC2C;
	Sat, 15 May 2010 21:18:15 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4FLIFe8093566;
	Sat, 15 May 2010 21:18:15 GMT (envelope-from weongyo@svn.freebsd.org)
Received: (from weongyo@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4FLIF8E093555;
	Sat, 15 May 2010 21:18:15 GMT (envelope-from weongyo@svn.freebsd.org)
Message-Id: <201005152118.o4FLIF8E093555@svn.freebsd.org>
From: Weongyo Jeong 
Date: Sat, 15 May 2010 21:18:15 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r208120 - head/sys/dev/bwn
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 15 May 2010 21:18:15 -0000

Author: weongyo
Date: Sat May 15 21:18:15 2010
New Revision: 208120
URL: http://svn.freebsd.org/changeset/base/208120

Log:
  - fixes a bug that it didn't initialize the ratectl after association;
    so ni_txrate returned 0 which is a invalid result.
  - The fourth argument of ieee80211_ratectl_tx_complete() could be not
    NULL.
  
  Reported by:	Gustau P?rez 
  Tested by:	Gustau P?rez ,
  		Ian FREISLICH 
  MFC after:	3 days

Modified:
  head/sys/dev/bwn/if_bwn.c

Modified: head/sys/dev/bwn/if_bwn.c
==============================================================================
--- head/sys/dev/bwn/if_bwn.c	Sat May 15 20:26:10 2010	(r208119)
+++ head/sys/dev/bwn/if_bwn.c	Sat May 15 21:18:15 2010	(r208120)
@@ -8329,6 +8329,7 @@ bwn_phy_reset(struct bwn_mac *mac)
 static int
 bwn_newstate(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg)
 {
+	const struct ieee80211_txparam *tp;
 	struct bwn_vap *bvp = BWN_VAP(vap);
 	struct ieee80211com *ic= vap->iv_ic;
 	struct ifnet *ifp = ic->ic_ifp;
@@ -8377,6 +8378,11 @@ bwn_newstate(struct ieee80211vap *vap, e
 		bwn_set_pretbtt(mac);
 		bwn_spu_setdelay(mac, 0);
 		bwn_set_macaddr(mac);
+
+		/* Initializes ratectl for a node. */
+		tp = &vap->iv_txparms[ieee80211_chan2mode(ic->ic_curchan)];
+		if (tp->ucastrate == IEEE80211_FIXED_RATE_NONE)
+			ieee80211_ratectl_node_init(vap->iv_bss);
 	}
 
 	BWN_UNLOCK(sc);
@@ -8994,7 +9000,7 @@ bwn_handle_txeof(struct bwn_mac *mac, co
 	struct bwn_stats *stats = &mac->mac_stats;
 	struct ieee80211_node *ni;
 	struct ieee80211vap *vap;
-	int slot;
+	int retrycnt = 0, slot;
 
 	BWN_ASSERT_LOCKED(mac->mac_sc);
 
@@ -9027,7 +9033,7 @@ bwn_handle_txeof(struct bwn_mac *mac, co
 					    status->ack ?
 					      IEEE80211_RATECTL_TX_SUCCESS :
 					      IEEE80211_RATECTL_TX_FAILURE,
-					    NULL, 0);
+					    &retrycnt, 0);
 					break;
 				}
 				slot = bwn_dma_nextslot(dr, slot);
@@ -9048,7 +9054,7 @@ bwn_handle_txeof(struct bwn_mac *mac, co
 			    status->ack ?
 			      IEEE80211_RATECTL_TX_SUCCESS :
 			      IEEE80211_RATECTL_TX_FAILURE,
-			    NULL, 0);
+			    &retrycnt, 0);
 		}
 		bwn_pio_handle_txeof(mac, status);
 	}

From owner-svn-src-head@FreeBSD.ORG  Sat May 15 23:02:55 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4A2351065670;
	Sat, 15 May 2010 23:02:55 +0000 (UTC)
	(envelope-from rpaulo@freebsd.org)
Received: from karen.lavabit.com (karen.lavabit.com [72.249.41.33])
	by mx1.freebsd.org (Postfix) with ESMTP id CED968FC0C;
	Sat, 15 May 2010 23:02:54 +0000 (UTC)
Received: from d.earth.lavabit.com (d.earth.lavabit.com [192.168.111.13])
	by karen.lavabit.com (Postfix) with ESMTP id 5B8C911BA62;
	Sat, 15 May 2010 18:02:53 -0500 (CDT)
Received: from 192.168.0.6 (24.114.252.231)
	by lavabit.com with ESMTP id MV754Q0F95ML;
	Sat, 15 May 2010 18:02:53 -0500
References: <201005152118.o4FLIF8E093555@svn.freebsd.org>
In-Reply-To: <201005152118.o4FLIF8E093555@svn.freebsd.org>
Mime-Version: 1.0 (Apple Message framework v1078)
Content-Type: text/plain; charset=us-ascii
Message-Id: <4C04B013-9922-4934-AD3B-88C283FCC968@FreeBSD.org>
Content-Transfer-Encoding: quoted-printable
From: Rui Paulo 
Date: Sat, 15 May 2010 19:02:51 -0400
To: Weongyo Jeong 
X-Mailer: Apple Mail (2.1078)
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r208120 - head/sys/dev/bwn
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 15 May 2010 23:02:55 -0000


On 15 May 2010, at 17:18, Weongyo Jeong wrote:

> Author: weongyo
> Date: Sat May 15 21:18:15 2010
> New Revision: 208120
> URL: http://svn.freebsd.org/changeset/base/208120
>=20
> Log:
>  - fixes a bug that it didn't initialize the ratectl after =
association;
>    so ni_txrate returned 0 which is a invalid result.
>  - The fourth argument of ieee80211_ratectl_tx_complete() could be not
>    NULL.
>=20


Thanks!

>  Reported by:	Gustau P?rez 
>  Tested by:	Gustau P?rez ,
>  		Ian FREISLICH 
>  MFC after:	3 days
>=20
> Modified:
>  head/sys/dev/bwn/if_bwn.c
>=20
> Modified: head/sys/dev/bwn/if_bwn.c
> =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
> --- head/sys/dev/bwn/if_bwn.c	Sat May 15 20:26:10 2010	=
(r208119)
> +++ head/sys/dev/bwn/if_bwn.c	Sat May 15 21:18:15 2010	=
(r208120)
> @@ -8329,6 +8329,7 @@ bwn_phy_reset(struct bwn_mac *mac)
> static int
> bwn_newstate(struct ieee80211vap *vap, enum ieee80211_state nstate, =
int arg)
> {
> +	const struct ieee80211_txparam *tp;
> 	struct bwn_vap *bvp =3D BWN_VAP(vap);
> 	struct ieee80211com *ic=3D vap->iv_ic;
> 	struct ifnet *ifp =3D ic->ic_ifp;
> @@ -8377,6 +8378,11 @@ bwn_newstate(struct ieee80211vap *vap, e
> 		bwn_set_pretbtt(mac);
> 		bwn_spu_setdelay(mac, 0);
> 		bwn_set_macaddr(mac);
> +
> +		/* Initializes ratectl for a node. */
> +		tp =3D =
&vap->iv_txparms[ieee80211_chan2mode(ic->ic_curchan)];
> +		if (tp->ucastrate =3D=3D IEEE80211_FIXED_RATE_NONE)
> +			ieee80211_ratectl_node_init(vap->iv_bss);
> 	}
>=20
> 	BWN_UNLOCK(sc);
> @@ -8994,7 +9000,7 @@ bwn_handle_txeof(struct bwn_mac *mac, co
> 	struct bwn_stats *stats =3D &mac->mac_stats;
> 	struct ieee80211_node *ni;
> 	struct ieee80211vap *vap;
> -	int slot;
> +	int retrycnt =3D 0, slot;
>=20
> 	BWN_ASSERT_LOCKED(mac->mac_sc);
>=20
> @@ -9027,7 +9033,7 @@ bwn_handle_txeof(struct bwn_mac *mac, co
> 					    status->ack ?
> 					      =
IEEE80211_RATECTL_TX_SUCCESS :
> 					      =
IEEE80211_RATECTL_TX_FAILURE,
> -					    NULL, 0);
> +					    &retrycnt, 0);
> 					break;
> 				}
> 				slot =3D bwn_dma_nextslot(dr, slot);
> @@ -9048,7 +9054,7 @@ bwn_handle_txeof(struct bwn_mac *mac, co
> 			    status->ack ?
> 			      IEEE80211_RATECTL_TX_SUCCESS :
> 			      IEEE80211_RATECTL_TX_FAILURE,
> -			    NULL, 0);
> +			    &retrycnt, 0);
> 		}
> 		bwn_pio_handle_txeof(mac, status);
> 	}
>=20
> =
__________________________________________________________________________=
__________
> Use the link below to report this message as spam.
> https://lavabit.com/apps/teacher?sig=3D1097658&key=3D888213324
> =
__________________________________________________________________________=
__________

--
Rui Paulo