From owner-svn-src-stable-8@FreeBSD.ORG Sun May 16 10:01:07 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 01B161065673; Sun, 16 May 2010 10:01:07 +0000 (UTC) (envelope-from stefanf@FreeBSD.org) Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CA6318FC0C; Sun, 16 May 2010 10:01: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 o4GA16j3065690; Sun, 16 May 2010 10:01:06 GMT (envelope-from stefanf@svn.freebsd.org) Received: (from stefanf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4GA16ud065688; Sun, 16 May 2010 10:01:06 GMT (envelope-from stefanf@svn.freebsd.org) Message-Id: <201005161001.o4GA16ud065688@svn.freebsd.org> From: Stefan Farfeleder Date: Sun, 16 May 2010 10:01:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208134 - stable/8/bin/sh X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 May 2010 10:01:07 -0000 Author: stefanf Date: Sun May 16 10:01:06 2010 New Revision: 208134 URL: http://svn.freebsd.org/changeset/base/208134 Log: Merge r199631: Handle current work directories of arbitrary length. Modified: stable/8/bin/sh/cd.c Directory Properties: stable/8/bin/sh/ (props changed) Modified: stable/8/bin/sh/cd.c ============================================================================== --- stable/8/bin/sh/cd.c Sun May 16 09:59:28 2010 (r208133) +++ stable/8/bin/sh/cd.c Sun May 16 10:01:06 2010 (r208134) @@ -70,7 +70,7 @@ STATIC int docd(char *, int, int); STATIC char *getcomponent(void); STATIC char *findcwd(char *); STATIC void updatepwd(char *); -STATIC char *getpwd2(char *, size_t); +STATIC char *getpwd2(void); STATIC char *curdir = NULL; /* current working directory */ STATIC char *prevdir; /* previous working directory */ @@ -263,10 +263,8 @@ findcwd(char *dir) * any more because we traversed a symbolic link or something * we couldn't stat(). */ - if (dir == NULL || curdir == NULL) { - p = stalloc(PATH_MAX); - return getpwd2(p, PATH_MAX); - } + if (dir == NULL || curdir == NULL) + return getpwd2(); cdcomppath = stalloc(strlen(dir) + 1); scopy(dir, cdcomppath); STARTSTACKSTR(new); @@ -313,7 +311,7 @@ updatepwd(char *dir) int pwdcmd(int argc, char **argv) { - char buf[PATH_MAX]; + char *p; int ch, phys; optreset = 1; optind = 1; opterr = 0; /* initialize getopt */ @@ -341,9 +339,9 @@ pwdcmd(int argc, char **argv) out1str(curdir); out1c('\n'); } else { - if (getcwd(buf, sizeof(buf)) == NULL) + if ((p = getpwd2()) == NULL) error(".: %s", strerror(errno)); - out1str(buf); + out1str(p); out1c('\n'); } @@ -356,36 +354,45 @@ pwdcmd(int argc, char **argv) char * getpwd(void) { - char buf[PATH_MAX]; char *p; if (curdir) return curdir; - p = getpwd2(buf, sizeof(buf)); + p = getpwd2(); if (p != NULL) curdir = savestr(p); return curdir; } +#define MAXPWD 256 + /* * Return the current directory. */ STATIC char * -getpwd2(char *buf, size_t size) +getpwd2(void) { - if (getcwd(buf, size) == NULL) { - char *pwd = getenv("PWD"); - struct stat stdot, stpwd; - - if (pwd && *pwd == '/' && stat(".", &stdot) != -1 && - stat(pwd, &stpwd) != -1 && - stdot.st_dev == stpwd.st_dev && - stdot.st_ino == stpwd.st_ino) { + struct stat stdot, stpwd; + char *pwd; + int i; + + for (i = MAXPWD;; i *= 2) { + pwd = stalloc(i); + if (getcwd(pwd, i) != NULL) return pwd; - } - return NULL; + stunalloc(pwd); + if (errno != ERANGE) + break; + } + + pwd = getenv("PWD"); + if (pwd && *pwd == '/' && stat(".", &stdot) != -1 && + stat(pwd, &stpwd) != -1 && + stdot.st_dev == stpwd.st_dev && + stdot.st_ino == stpwd.st_ino) { + return pwd; } - return buf; + return NULL; } From owner-svn-src-stable-8@FreeBSD.ORG Sun May 16 11:03:47 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A9E2B1065670; Sun, 16 May 2010 11:03:46 +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 975408FC08; Sun, 16 May 2010 11:03: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 o4GB3kHE081396; Sun, 16 May 2010 11:03:46 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4GB3k2N081392; Sun, 16 May 2010 11:03:46 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201005161103.o4GB3k2N081392@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 16 May 2010 11:03:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208138 - stable/8/share/man/man3 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 May 2010 11:03:47 -0000 Author: jilles Date: Sun May 16 11:03:46 2010 New Revision: 208138 URL: http://svn.freebsd.org/changeset/base/208138 Log: MFC r207816: 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. Modified: stable/8/share/man/man3/Makefile stable/8/share/man/man3/pthread_cond_timedwait.3 stable/8/share/man/man3/pthread_condattr.3 Directory Properties: stable/8/share/man/man3/ (props changed) Modified: stable/8/share/man/man3/Makefile ============================================================================== --- stable/8/share/man/man3/Makefile Sun May 16 10:51:45 2010 (r208137) +++ stable/8/share/man/man3/Makefile Sun May 16 11:03:46 2010 (r208138) @@ -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: stable/8/share/man/man3/pthread_cond_timedwait.3 ============================================================================== --- stable/8/share/man/man3/pthread_cond_timedwait.3 Sun May 16 10:51:45 2010 (r208137) +++ stable/8/share/man/man3/pthread_cond_timedwait.3 Sun May 16 11:03:46 2010 (r208138) @@ -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: stable/8/share/man/man3/pthread_condattr.3 ============================================================================== --- stable/8/share/man/man3/pthread_condattr.3 Sun May 16 10:51:45 2010 (r208137) +++ stable/8/share/man/man3/pthread_condattr.3 Sun May 16 11:03:46 2010 (r208138) @@ -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-stable-8@FreeBSD.ORG Sun May 16 11:06:33 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 18675106564A; Sun, 16 May 2010 11:06:33 +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 0731D8FC12; Sun, 16 May 2010 11:06: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 o4GB6WgS082035; Sun, 16 May 2010 11:06:32 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4GB6WMr082033; Sun, 16 May 2010 11:06:32 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201005161106.o4GB6WMr082033@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 16 May 2010 11:06:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208139 - stable/8/share/man/man1 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 May 2010 11:06:33 -0000 Author: jilles Date: Sun May 16 11:06:32 2010 New Revision: 208139 URL: http://svn.freebsd.org/changeset/base/208139 Log: MFC r207817: builtin(1): sh has no @ builtin command. Modified: stable/8/share/man/man1/builtin.1 Directory Properties: stable/8/share/man/man1/ (props changed) Modified: stable/8/share/man/man1/builtin.1 ============================================================================== --- stable/8/share/man/man1/builtin.1 Sun May 16 11:03:46 2010 (r208138) +++ stable/8/share/man/man1/builtin.1 Sun May 16 11:06:32 2010 (r208139) @@ -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-stable-8@FreeBSD.ORG Sun May 16 14:51:37 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4E7EB106564A; Sun, 16 May 2010 14:51:37 +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 3BAB48FC0A; Sun, 16 May 2010 14:51: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 o4GEpaT6031745; Sun, 16 May 2010 14:51:36 GMT (envelope-from zec@svn.freebsd.org) Received: (from zec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4GEpatq031738; Sun, 16 May 2010 14:51:36 GMT (envelope-from zec@svn.freebsd.org) Message-Id: <201005161451.o4GEpatq031738@svn.freebsd.org> From: Marko Zec Date: Sun, 16 May 2010 14:51:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208145 - in stable/8: share/man/man4 sys/netgraph X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 May 2010 14:51:37 -0000 Author: zec Date: Sun May 16 14:51:36 2010 New Revision: 208145 URL: http://svn.freebsd.org/changeset/base/208145 Log: MFC r207680: Add an optional "persistent" flag to ng_hub and ng_bridge, which if set, disables automatic node shutdown when the last hook gets disconnected. Reviewed by: julian Modified: stable/8/share/man/man4/ng_bridge.4 stable/8/share/man/man4/ng_hub.4 stable/8/sys/netgraph/ng_bridge.c stable/8/sys/netgraph/ng_bridge.h stable/8/sys/netgraph/ng_hub.c stable/8/sys/netgraph/ng_hub.h Directory Properties: stable/8/share/man/man4/ (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/share/man/man4/ng_bridge.4 ============================================================================== --- stable/8/share/man/man4/ng_bridge.4 Sun May 16 14:31:53 2010 (r208144) +++ stable/8/share/man/man4/ng_bridge.4 Sun May 16 14:51:36 2010 (r208145) @@ -34,7 +34,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 31, 2000 +.Dd May 5, 2010 .Dt NG_BRIDGE 4 .Os .Sh NAME @@ -181,11 +181,17 @@ but also atomically clears the statistic .It Dv NGM_BRIDGE_GET_TABLE Returns the current host mapping table used to direct packets, in a .Dv "struct ng_bridge_host_ary" . +.It Dv NGM_BRIDGE_SET_PERSISTENT +This command sets the persistent flag on the node, and takes no arguments. .El .Sh SHUTDOWN This node shuts down upon receipt of a .Dv NGM_SHUTDOWN -control message, or when all hooks have been disconnected. +control message, or when all hooks have been disconnected. Setting the +persistent flag via a +.Dv NGM_BRIDGE_SET_PERSISTENT +control message disables automatic node shutdown when the last hook gets +disconnected. .Sh FILES .Bl -tag -width XXXXXXXX -compact .It Pa /usr/share/examples/netgraph/ether.bridge Modified: stable/8/share/man/man4/ng_hub.4 ============================================================================== --- stable/8/share/man/man4/ng_hub.4 Sun May 16 14:31:53 2010 (r208144) +++ stable/8/share/man/man4/ng_hub.4 Sun May 16 14:51:36 2010 (r208145) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 17, 2004 +.Dd May 5, 2010 .Dt NG_HUB 4 .Os .Sh NAME @@ -45,11 +45,20 @@ A node accepts any request to connect, regardless of the hook name, as long as the name is unique. .Sh CONTROL MESSAGES -This node type supports only the generic control messages. +This node type supports the generic control messages, plus the +following: +.Bl -tag -width foo +.It Dv NGM_HUB_SET_PERSISTENT +This command sets the persistent flag on the node, and takes no arguments. +.El .Sh SHUTDOWN This node shuts down upon receipt of a .Dv NGM_SHUTDOWN -control message, or when all hooks have been disconnected. +control message, or when all hooks have been disconnected. Setting the +persistent flag via a +.Dv NGM_HUB_SET_PERSISTENT +control message disables automatic node shutdown when the last hook gets +disconnected. .Sh SEE ALSO .Xr netgraph 4 , .Xr ng_bridge 4 , Modified: stable/8/sys/netgraph/ng_bridge.c ============================================================================== --- stable/8/sys/netgraph/ng_bridge.c Sun May 16 14:31:53 2010 (r208144) +++ stable/8/sys/netgraph/ng_bridge.c Sun May 16 14:51:36 2010 (r208145) @@ -83,7 +83,7 @@ #include #ifdef NG_SEPARATE_MALLOC -MALLOC_DEFINE(M_NETGRAPH_BRIDGE, "netgraph_bridge", "netgraph bridge node "); +MALLOC_DEFINE(M_NETGRAPH_BRIDGE, "netgraph_bridge", "netgraph bridge node"); #else #define M_NETGRAPH_BRIDGE M_NETGRAPH #endif @@ -105,6 +105,7 @@ struct ng_bridge_private { u_int numBuckets; /* num buckets in table */ u_int hashMask; /* numBuckets - 1 */ int numLinks; /* num connected links */ + int persistent; /* can exist w/o hooks */ struct callout timer; /* one second periodic timer */ }; typedef struct ng_bridge_private *priv_p; @@ -270,6 +271,13 @@ static const struct ng_cmdlist ng_bridge NULL, &ng_bridge_host_ary_type }, + { + NGM_BRIDGE_COOKIE, + NGM_BRIDGE_SET_PERSISTENT, + "setpersistent", + NULL, + NULL + }, { 0 } }; @@ -494,6 +502,11 @@ ng_bridge_rcvmsg(node_p node, item_p ite } break; } + case NGM_BRIDGE_SET_PERSISTENT: + { + priv->persistent = 1; + break; + } default: error = EINVAL; break; @@ -799,7 +812,8 @@ ng_bridge_disconnect(hook_p hook) /* If no more hooks, go away */ if ((NG_NODE_NUMHOOKS(NG_HOOK_NODE(hook)) == 0) - && (NG_NODE_IS_VALID(NG_HOOK_NODE(hook)))) { + && (NG_NODE_IS_VALID(NG_HOOK_NODE(hook))) + && !priv->persistent) { ng_rmnode_self(NG_HOOK_NODE(hook)); } return (0); Modified: stable/8/sys/netgraph/ng_bridge.h ============================================================================== --- stable/8/sys/netgraph/ng_bridge.h Sun May 16 14:31:53 2010 (r208144) +++ stable/8/sys/netgraph/ng_bridge.h Sun May 16 14:51:36 2010 (r208145) @@ -149,6 +149,7 @@ enum { NGM_BRIDGE_CLR_STATS, /* clear link stats */ NGM_BRIDGE_GETCLR_STATS, /* atomically get & clear link stats */ NGM_BRIDGE_GET_TABLE, /* get link table */ + NGM_BRIDGE_SET_PERSISTENT, /* set persistent mode */ }; #endif /* _NETGRAPH_NG_BRIDGE_H_ */ Modified: stable/8/sys/netgraph/ng_hub.c ============================================================================== --- stable/8/sys/netgraph/ng_hub.c Sun May 16 14:31:53 2010 (r208144) +++ stable/8/sys/netgraph/ng_hub.c Sun May 16 14:51:36 2010 (r208145) @@ -36,16 +36,46 @@ #include #include +#ifdef NG_SEPARATE_MALLOC +MALLOC_DEFINE(M_NETGRAPH_HUB, "netgraph_hub", "netgraph hub node"); +#else +#define M_NETGRAPH_HUB M_NETGRAPH +#endif + +/* Per-node private data */ +struct ng_hub_private { + int persistent; /* can exist w/o hooks */ +}; +typedef struct ng_hub_private *priv_p; + +/* Netgraph node methods */ static ng_constructor_t ng_hub_constructor; +static ng_rcvmsg_t ng_hub_rcvmsg; +static ng_shutdown_t ng_hub_shutdown; static ng_rcvdata_t ng_hub_rcvdata; static ng_disconnect_t ng_hub_disconnect; +/* List of commands and how to convert arguments to/from ASCII */ +static const struct ng_cmdlist ng_hub_cmdlist[] = { + { + NGM_HUB_COOKIE, + NGM_HUB_SET_PERSISTENT, + "setpersistent", + NULL, + NULL + }, + { 0 } +}; + static struct ng_type ng_hub_typestruct = { .version = NG_ABI_VERSION, .name = NG_HUB_NODE_TYPE, .constructor = ng_hub_constructor, + .rcvmsg = ng_hub_rcvmsg, + .shutdown = ng_hub_shutdown, .rcvdata = ng_hub_rcvdata, .disconnect = ng_hub_disconnect, + .cmdlist = ng_hub_cmdlist, }; NETGRAPH_INIT(hub, &ng_hub_typestruct); @@ -53,10 +83,39 @@ NETGRAPH_INIT(hub, &ng_hub_typestruct); static int ng_hub_constructor(node_p node) { + priv_p priv; + + /* Allocate and initialize private info */ + priv = malloc(sizeof(*priv), M_NETGRAPH_HUB, M_NOWAIT | M_ZERO); + if (priv == NULL) + return (ENOMEM); + NG_NODE_SET_PRIVATE(node, priv); return (0); } +/* + * Receive a control message + */ +static int +ng_hub_rcvmsg(node_p node, item_p item, hook_p lasthook) +{ + const priv_p priv = NG_NODE_PRIVATE(node); + int error = 0; + struct ng_mesg *msg; + + NGI_GET_MSG(item, msg); + if (msg->header.typecookie == NGM_HUB_COOKIE && + msg->header.cmd == NGM_HUB_SET_PERSISTENT) { + priv->persistent = 1; + } else { + error = EINVAL; + } + + NG_FREE_MSG(msg); + return (error); +} + static int ng_hub_rcvdata(hook_p hook, item_p item) { @@ -89,12 +148,25 @@ ng_hub_rcvdata(hook_p hook, item_p item) return (error); } +/* + * Shutdown node + */ +static int +ng_hub_shutdown(node_p node) +{ + const priv_p priv = NG_NODE_PRIVATE(node); + + free(priv, M_NETGRAPH_HUB); + return (0); +} + static int ng_hub_disconnect(hook_p hook) { + const priv_p priv = NG_NODE_PRIVATE(NG_HOOK_NODE(hook)); if (NG_NODE_NUMHOOKS(NG_HOOK_NODE(hook)) == 0 && - NG_NODE_IS_VALID(NG_HOOK_NODE(hook))) + NG_NODE_IS_VALID(NG_HOOK_NODE(hook)) && !priv->persistent) ng_rmnode_self(NG_HOOK_NODE(hook)); return (0); } Modified: stable/8/sys/netgraph/ng_hub.h ============================================================================== --- stable/8/sys/netgraph/ng_hub.h Sun May 16 14:31:53 2010 (r208144) +++ stable/8/sys/netgraph/ng_hub.h Sun May 16 14:51:36 2010 (r208145) @@ -33,4 +33,9 @@ #define NG_HUB_NODE_TYPE "hub" #define NGM_HUB_COOKIE 1082189597 +/* Netgraph control messages */ +enum { + NGM_HUB_SET_PERSISTENT = 1, /* set persistent mode */ +}; + #endif /* _NETGRAPH_NG_HUB_H_ */ From owner-svn-src-stable-8@FreeBSD.ORG Sun May 16 14:53:43 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 918B2106566C; Sun, 16 May 2010 14:53:43 +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 7FFAE8FC1A; Sun, 16 May 2010 14:53: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 o4GErhvY032251; Sun, 16 May 2010 14:53:43 GMT (envelope-from zec@svn.freebsd.org) Received: (from zec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4GErhEt032249; Sun, 16 May 2010 14:53:43 GMT (envelope-from zec@svn.freebsd.org) Message-Id: <201005161453.o4GErhEt032249@svn.freebsd.org> From: Marko Zec Date: Sun, 16 May 2010 14:53:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208146 - stable/8/sys/netgraph X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 May 2010 14:53:43 -0000 Author: zec Date: Sun May 16 14:53:43 2010 New Revision: 208146 URL: http://svn.freebsd.org/changeset/base/208146 Log: MFC r208036: 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. Modified: stable/8/sys/netgraph/ng_base.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/netgraph/ng_base.c ============================================================================== --- stable/8/sys/netgraph/ng_base.c Sun May 16 14:51:36 2010 (r208145) +++ stable/8/sys/netgraph/ng_base.c Sun May 16 14:53:43 2010 (r208146) @@ -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-stable-8@FreeBSD.ORG Sun May 16 16:42:53 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9038A106566C; Sun, 16 May 2010 16:42:53 +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 7DFF48FC0A; Sun, 16 May 2010 16:42: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 o4GGgrA3056776; Sun, 16 May 2010 16:42:53 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4GGgrGD056771; Sun, 16 May 2010 16:42:53 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201005161642.o4GGgrGD056771@svn.freebsd.org> From: Randall Stewart Date: Sun, 16 May 2010 16:42:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208154 - stable/8/sys/netinet X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 May 2010 16:42:53 -0000 Author: rrs Date: Sun May 16 16:42:52 2010 New Revision: 208154 URL: http://svn.freebsd.org/changeset/base/208154 Log: MFC of 207924: 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 succeed Modified: stable/8/sys/netinet/sctp_constants.h stable/8/sys/netinet/sctp_input.c stable/8/sys/netinet/sctp_pcb.c stable/8/sys/netinet/sctp_usrreq.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/netinet/sctp_constants.h ============================================================================== --- stable/8/sys/netinet/sctp_constants.h Sun May 16 16:33:38 2010 (r208153) +++ stable/8/sys/netinet/sctp_constants.h Sun May 16 16:42:52 2010 (r208154) @@ -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: stable/8/sys/netinet/sctp_input.c ============================================================================== --- stable/8/sys/netinet/sctp_input.c Sun May 16 16:33:38 2010 (r208153) +++ stable/8/sys/netinet/sctp_input.c Sun May 16 16:42:52 2010 (r208154) @@ -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: stable/8/sys/netinet/sctp_pcb.c ============================================================================== --- stable/8/sys/netinet/sctp_pcb.c Sun May 16 16:33:38 2010 (r208153) +++ stable/8/sys/netinet/sctp_pcb.c Sun May 16 16:42:52 2010 (r208154) @@ -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: stable/8/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/8/sys/netinet/sctp_usrreq.c Sun May 16 16:33:38 2010 (r208153) +++ stable/8/sys/netinet/sctp_usrreq.c Sun May 16 16:42:52 2010 (r208154) @@ -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-stable-8@FreeBSD.ORG Sun May 16 16:45:51 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 536681065670; Sun, 16 May 2010 16:45:51 +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 41A568FC17; Sun, 16 May 2010 16:45: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 o4GGjnL7057506; Sun, 16 May 2010 16:45:49 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4GGjnID057504; Sun, 16 May 2010 16:45:49 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201005161645.o4GGjnID057504@svn.freebsd.org> From: Randall Stewart Date: Sun, 16 May 2010 16:45:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208155 - stable/8/sys/netinet X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 May 2010 16:45:51 -0000 Author: rrs Date: Sun May 16 16:45:49 2010 New Revision: 208155 URL: http://svn.freebsd.org/changeset/base/208155 Log: MFC of 207963 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. Modified: stable/8/sys/netinet/sctp_indata.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/netinet/sctp_indata.c ============================================================================== --- stable/8/sys/netinet/sctp_indata.c Sun May 16 16:42:52 2010 (r208154) +++ stable/8/sys/netinet/sctp_indata.c Sun May 16 16:45:49 2010 (r208155) @@ -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-stable-8@FreeBSD.ORG Sun May 16 16:50:34 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 34E52106564A; Sun, 16 May 2010 16:50:34 +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 086188FC16; Sun, 16 May 2010 16:50:34 +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 o4GGoXxq058578; Sun, 16 May 2010 16:50:33 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4GGoXhs058575; Sun, 16 May 2010 16:50:33 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201005161650.o4GGoXhs058575@svn.freebsd.org> From: Randall Stewart Date: Sun, 16 May 2010 16:50:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208156 - stable/8/sys/netinet X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 May 2010 16:50:34 -0000 Author: rrs Date: Sun May 16 16:50:33 2010 New Revision: 208156 URL: http://svn.freebsd.org/changeset/base/208156 Log: MFC 207966 (for Michael) Get rid of unused constants. Modified: stable/8/sys/netinet/sctp_constants.h stable/8/sys/netinet/sctp_indata.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/netinet/sctp_constants.h ============================================================================== --- stable/8/sys/netinet/sctp_constants.h Sun May 16 16:45:49 2010 (r208155) +++ stable/8/sys/netinet/sctp_constants.h Sun May 16 16:50:33 2010 (r208156) @@ -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: stable/8/sys/netinet/sctp_indata.c ============================================================================== --- stable/8/sys/netinet/sctp_indata.c Sun May 16 16:45:49 2010 (r208155) +++ stable/8/sys/netinet/sctp_indata.c Sun May 16 16:50:33 2010 (r208156) @@ -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-stable-8@FreeBSD.ORG Sun May 16 16:51:44 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DC83C1065673; Sun, 16 May 2010 16:51:44 +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 923B18FC1B; Sun, 16 May 2010 16:51: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 o4GGpiLx058898; Sun, 16 May 2010 16:51:44 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4GGpiaL058895; Sun, 16 May 2010 16:51:44 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201005161651.o4GGpiaL058895@svn.freebsd.org> From: Randall Stewart Date: Sun, 16 May 2010 16:51:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208157 - stable/8/sys/netinet X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 May 2010 16:51:45 -0000 Author: rrs Date: Sun May 16 16:51:44 2010 New Revision: 208157 URL: http://svn.freebsd.org/changeset/base/208157 Log: MFC 207983 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) Modified: stable/8/sys/netinet/sctp_indata.c stable/8/sys/netinet/sctp_output.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/netinet/sctp_indata.c ============================================================================== --- stable/8/sys/netinet/sctp_indata.c Sun May 16 16:50:33 2010 (r208156) +++ stable/8/sys/netinet/sctp_indata.c Sun May 16 16:51:44 2010 (r208157) @@ -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: stable/8/sys/netinet/sctp_output.c ============================================================================== --- stable/8/sys/netinet/sctp_output.c Sun May 16 16:50:33 2010 (r208156) +++ stable/8/sys/netinet/sctp_output.c Sun May 16 16:51:44 2010 (r208157) @@ -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-stable-8@FreeBSD.ORG Sun May 16 16:52:57 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 302F81065675; Sun, 16 May 2010 16:52:57 +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 1EFE28FC0A; Sun, 16 May 2010 16:52: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 o4GGqv84059214; Sun, 16 May 2010 16:52:57 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4GGqulW059212; Sun, 16 May 2010 16:52:56 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201005161652.o4GGqulW059212@svn.freebsd.org> From: Randall Stewart Date: Sun, 16 May 2010 16:52:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208158 - stable/8/sys/netinet X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 May 2010 16:52:57 -0000 Author: rrs Date: Sun May 16 16:52:56 2010 New Revision: 208158 URL: http://svn.freebsd.org/changeset/base/208158 Log: MFC 207985 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. Modified: stable/8/sys/netinet/sctp_output.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/netinet/sctp_output.c ============================================================================== --- stable/8/sys/netinet/sctp_output.c Sun May 16 16:51:44 2010 (r208157) +++ stable/8/sys/netinet/sctp_output.c Sun May 16 16:52:56 2010 (r208158) @@ -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-stable-8@FreeBSD.ORG Sun May 16 22:52:52 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4501E106564A; Sun, 16 May 2010 22:52:52 +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 31E148FC0C; Sun, 16 May 2010 22:52: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 o4GMqpxK039104; Sun, 16 May 2010 22:52:51 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4GMqpvm039101; Sun, 16 May 2010 22:52:51 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201005162252.o4GMqpvm039101@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 16 May 2010 22:52:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208174 - in stable/8: bin/sh tools/regression/bin/sh/expansion X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 May 2010 22:52:52 -0000 Author: jilles Date: Sun May 16 22:52:51 2010 New Revision: 208174 URL: http://svn.freebsd.org/changeset/base/208174 Log: MFC r207944: 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: stable/8/tools/regression/bin/sh/expansion/pathname2.0 - copied unchanged from r207944, head/tools/regression/bin/sh/expansion/pathname2.0 Modified: stable/8/bin/sh/expand.c Directory Properties: stable/8/bin/sh/ (props changed) stable/8/tools/regression/bin/sh/ (props changed) Modified: stable/8/bin/sh/expand.c ============================================================================== --- stable/8/bin/sh/expand.c Sun May 16 22:21:33 2010 (r208173) +++ stable/8/bin/sh/expand.c Sun May 16 22:52:51 2010 (r208174) @@ -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. @@ -1142,10 +1144,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 == '[') { @@ -1170,12 +1173,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 */ @@ -1221,7 +1226,8 @@ expmeta(char *enddir, char *name) atend = 1; } else { atend = 0; - *endname++ = '\0'; + *endname = '\0'; + endname += esc + 1; } matchdot = 0; p = start; @@ -1249,7 +1255,7 @@ expmeta(char *enddir, char *name) } closedir(dirp); if (! atend) - endname[-1] = '/'; + endname[-esc - 1] = esc ? CTLESC : '/'; } Copied: stable/8/tools/regression/bin/sh/expansion/pathname2.0 (from r207944, head/tools/regression/bin/sh/expansion/pathname2.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/bin/sh/expansion/pathname2.0 Sun May 16 22:52:51 2010 (r208174, copy of r207944, head/tools/regression/bin/sh/expansion/pathname2.0) @@ -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-stable-8@FreeBSD.ORG Mon May 17 01:18:13 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D6BBC1065673; Mon, 17 May 2010 01:18:13 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C520B8FC1F; Mon, 17 May 2010 01:18: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 o4H1IDii072098; Mon, 17 May 2010 01:18:13 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4H1IDeI072097; Mon, 17 May 2010 01:18:13 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201005170118.o4H1IDeI072097@svn.freebsd.org> From: Rick Macklem Date: Mon, 17 May 2010 01:18:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208176 - stable/8/usr.sbin/mountd X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2010 01:18:13 -0000 Author: rmacklem Date: Mon May 17 01:18:12 2010 New Revision: 208176 URL: http://svn.freebsd.org/changeset/base/208176 Log: MFC: r207689 If the "-alldirs" export option was used for the V4: line, mountd would crash in check_options() since dp == NULL for the V4: line. This patch moves the check for options allowed on the V4: line to ahead of where dp is used to avoid this crash. Modified: stable/8/usr.sbin/mountd/mountd.c Directory Properties: stable/8/usr.sbin/mountd/ (props changed) Modified: stable/8/usr.sbin/mountd/mountd.c ============================================================================== --- stable/8/usr.sbin/mountd/mountd.c Sun May 16 23:45:10 2010 (r208175) +++ stable/8/usr.sbin/mountd/mountd.c Mon May 17 01:18:12 2010 (r208176) @@ -2881,16 +2881,16 @@ check_options(dp) syslog(LOG_ERR, "-mask and /masklen are mutually exclusive"); return (1); } - if ((opt_flags & OP_ALLDIRS) && dp->dp_left) { - syslog(LOG_ERR, "-alldirs has multiple directories"); - return (1); - } if (v4root_phase > 0 && (opt_flags & ~(OP_SEC | OP_MASK | OP_NET | OP_HAVEMASK | OP_MASKLEN)) != 0) { syslog(LOG_ERR,"only -sec,-net,-mask options allowed on V4:"); return (1); } + if ((opt_flags & OP_ALLDIRS) && dp->dp_left) { + syslog(LOG_ERR, "-alldirs has multiple directories"); + return (1); + } return (0); } From owner-svn-src-stable-8@FreeBSD.ORG Mon May 17 01:41:12 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 37CDC1065674; Mon, 17 May 2010 01:41:12 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0CC7E8FC20; Mon, 17 May 2010 01:41: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 o4H1fBus077111; Mon, 17 May 2010 01:41:11 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4H1fBZC077109; Mon, 17 May 2010 01:41:11 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201005170141.o4H1fBZC077109@svn.freebsd.org> From: Rick Macklem Date: Mon, 17 May 2010 01:41:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208177 - stable/8/sys/fs/nfs X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2010 01:41:12 -0000 Author: rmacklem Date: Mon May 17 01:41:11 2010 New Revision: 208177 URL: http://svn.freebsd.org/changeset/base/208177 Log: MFC: r207764 Patch the experimental NFS client so that it works for NFSv2 by adding the necessary mapping from NFSv3 procedure numbers to NFSv2 procedure numbers when doing NFSv2 RPCs. Modified: stable/8/sys/fs/nfs/nfs_commonkrpc.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/fs/nfs/nfs_commonkrpc.c ============================================================================== --- stable/8/sys/fs/nfs/nfs_commonkrpc.c Mon May 17 01:18:12 2010 (r208176) +++ stable/8/sys/fs/nfs/nfs_commonkrpc.c Mon May 17 01:41:11 2010 (r208177) @@ -97,14 +97,37 @@ static void nfs_up(struct nfsmount *, st int, int); static int nfs_msg(struct thread *, const char *, const char *, int); -extern int nfsv2_procid[]; - struct nfs_cached_auth { int ca_refs; /* refcount, including 1 from the cache */ uid_t ca_uid; /* uid that corresponds to this auth */ AUTH *ca_auth; /* RPC auth handle */ }; +static int nfsv2_procid[NFS_V3NPROCS] = { + NFSV2PROC_NULL, + NFSV2PROC_GETATTR, + NFSV2PROC_SETATTR, + NFSV2PROC_LOOKUP, + NFSV2PROC_NOOP, + NFSV2PROC_READLINK, + NFSV2PROC_READ, + NFSV2PROC_WRITE, + NFSV2PROC_CREATE, + NFSV2PROC_MKDIR, + NFSV2PROC_SYMLINK, + NFSV2PROC_CREATE, + NFSV2PROC_REMOVE, + NFSV2PROC_RMDIR, + NFSV2PROC_RENAME, + NFSV2PROC_LINK, + NFSV2PROC_READDIR, + NFSV2PROC_NOOP, + NFSV2PROC_STATFS, + NFSV2PROC_NOOP, + NFSV2PROC_NOOP, + NFSV2PROC_NOOP, +}; + /* * Initialize sockets and congestion for a new NFS connection. * We do not free the sockaddr if error. @@ -533,6 +556,15 @@ newnfs_request(struct nfsrv_descript *nd if (nmp != NULL) { NFSINCRGLOBAL(newnfsstats.rpcrequests); + + /* Map the procnum to the old NFSv2 one, as required. */ + if ((nd->nd_flag & ND_NFSV2) != 0) { + if (nd->nd_procnum < NFS_V3NPROCS) + procnum = nfsv2_procid[nd->nd_procnum]; + else + procnum = NFSV2PROC_NOOP; + } + /* * Now only used for the R_DONTRECOVER case, but until that is * supported within the krpc code, I need to keep a queue of From owner-svn-src-stable-8@FreeBSD.ORG Mon May 17 02:01:22 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7647C1065678; Mon, 17 May 2010 02:01:22 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 64A7F8FC21; Mon, 17 May 2010 02:01: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 o4H21Mrw081665; Mon, 17 May 2010 02:01:22 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4H21Mpa081662; Mon, 17 May 2010 02:01:22 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201005170201.o4H21Mpa081662@svn.freebsd.org> From: Rick Macklem Date: Mon, 17 May 2010 02:01:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208179 - stable/8/sys/fs/nfs X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2010 02:01:22 -0000 Author: rmacklem Date: Mon May 17 02:01:22 2010 New Revision: 208179 URL: http://svn.freebsd.org/changeset/base/208179 Log: MFC: r207785 Fix typos in macros. Modified: stable/8/sys/fs/nfs/nfskpiport.h stable/8/sys/fs/nfs/nfsport.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/fs/nfs/nfskpiport.h ============================================================================== --- stable/8/sys/fs/nfs/nfskpiport.h Mon May 17 01:49:52 2010 (r208178) +++ stable/8/sys/fs/nfs/nfskpiport.h Mon May 17 02:01:22 2010 (r208179) @@ -27,7 +27,7 @@ */ #ifndef _NFS_NFSKPIPORT_H_ -#define _NFSKPIPORT_NFS_H_ +#define _NFS_NFSKPIPORT_H_ /* * These definitions are needed since the generic code is now using Darwin8 * KPI stuff. (I know, seems a bit silly, but I want the code to build on @@ -70,4 +70,4 @@ typedef struct mbuf * mbuf_t; #define uio_iov_len(p) ((p)->uio_iov->iov_len) #define uio_iov_len_add(p, v) ((p)->uio_iov->iov_len += (v)) -#endif /* _NFSKPIPORT_NFS_H */ +#endif /* _NFS_NFSKPIPORT_H */ Modified: stable/8/sys/fs/nfs/nfsport.h ============================================================================== --- stable/8/sys/fs/nfs/nfsport.h Mon May 17 01:49:52 2010 (r208178) +++ stable/8/sys/fs/nfs/nfsport.h Mon May 17 02:01:22 2010 (r208179) @@ -33,7 +33,7 @@ */ #ifndef _NFS_NFSPORT_H_ -#define _NFSPORT_NFS_H_ +#define _NFS_NFSPORT_H_ /* * In general, I'm not fond of #includes in .h files, but this seems @@ -922,4 +922,4 @@ struct nfsreq { #endif /* _KERNEL */ -#endif /* _NFSPORT_NFS_H */ +#endif /* _NFS_NFSPORT_H */ From owner-svn-src-stable-8@FreeBSD.ORG Mon May 17 08:11:23 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D3A401065670; Mon, 17 May 2010 08:11:23 +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 C22E08FC0C; Mon, 17 May 2010 08:11: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 o4H8BNws063416; Mon, 17 May 2010 08:11:23 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4H8BNjN063414; Mon, 17 May 2010 08:11:23 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201005170811.o4H8BNjN063414@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 17 May 2010 08:11:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208185 - stable/8/sys/fs/procfs X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2010 08:11:23 -0000 Author: kib Date: Mon May 17 08:11:23 2010 New Revision: 208185 URL: http://svn.freebsd.org/changeset/base/208185 Log: MFC r207847: 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. Modified: stable/8/sys/fs/procfs/procfs_ctl.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/fs/procfs/procfs_ctl.c ============================================================================== --- stable/8/sys/fs/procfs/procfs_ctl.c Mon May 17 07:06:54 2010 (r208184) +++ stable/8/sys/fs/procfs/procfs_ctl.c Mon May 17 08:11:23 2010 (r208185) @@ -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-stable-8@FreeBSD.ORG Mon May 17 08:15:04 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AB0DA1065670; Mon, 17 May 2010 08:15:04 +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 9981D8FC12; Mon, 17 May 2010 08:15: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 o4H8F4Ja064271; Mon, 17 May 2010 08:15:04 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4H8F4AM064269; Mon, 17 May 2010 08:15:04 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201005170815.o4H8F4AM064269@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 17 May 2010 08:15:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208186 - stable/8/sys/fs/procfs X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2010 08:15:04 -0000 Author: kib Date: Mon May 17 08:15:04 2010 New Revision: 208186 URL: http://svn.freebsd.org/changeset/base/208186 Log: MFC r207848: The thread_unsuspend() requires both process mutex and process spinlock locked. Postpone the process unlock till the thread_unsuspend() is called. Modified: stable/8/sys/fs/procfs/procfs_ctl.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/fs/procfs/procfs_ctl.c ============================================================================== --- stable/8/sys/fs/procfs/procfs_ctl.c Mon May 17 08:11:23 2010 (r208185) +++ stable/8/sys/fs/procfs/procfs_ctl.c Mon May 17 08:15:04 2010 (r208186) @@ -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-stable-8@FreeBSD.ORG Mon May 17 14:20:26 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7EA221065676; Mon, 17 May 2010 14:20:26 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6D4348FC08; Mon, 17 May 2010 14: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 o4HEKQed047603; Mon, 17 May 2010 14:20:26 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4HEKQHa047601; Mon, 17 May 2010 14:20:26 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <201005171420.o4HEKQHa047601@svn.freebsd.org> From: Ken Smith Date: Mon, 17 May 2010 14:20:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208192 - stable/8/sys/conf X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2010 14:20:26 -0000 Author: kensmith Date: Mon May 17 14:20:26 2010 New Revision: 208192 URL: http://svn.freebsd.org/changeset/base/208192 Log: Since sometimes developer activity the week before a code freeze starts causes the stable branch to be a little less reliable than normal mark the stable/8 branch as 8.1-PRERELEASE to warn users. Modified: stable/8/sys/conf/newvers.sh Modified: stable/8/sys/conf/newvers.sh ============================================================================== --- stable/8/sys/conf/newvers.sh Mon May 17 14:00:46 2010 (r208191) +++ stable/8/sys/conf/newvers.sh Mon May 17 14:20:26 2010 (r208192) @@ -31,8 +31,8 @@ # $FreeBSD$ TYPE="FreeBSD" -REVISION="8.0" -BRANCH="STABLE" +REVISION="8.1" +BRANCH="PRERELEASE" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-stable-8@FreeBSD.ORG Mon May 17 14:27:41 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4FBE3106567F; Mon, 17 May 2010 14:27:41 +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 341EC8FC14; Mon, 17 May 2010 14:27: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 o4HERfmM049265; Mon, 17 May 2010 14:27:41 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4HERfpS049262; Mon, 17 May 2010 14:27:41 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201005171427.o4HERfpS049262@svn.freebsd.org> From: Martin Matuska Date: Mon, 17 May 2010 14:27:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208193 - stable/8/lib/libpam/modules/pam_krb5 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2010 14:27:41 -0000 Author: mm Date: Mon May 17 14:27:40 2010 New Revision: 208193 URL: http://svn.freebsd.org/changeset/base/208193 Log: MFC r207553, r207555, r207651: Implement the no_user_check option to pam_krb5. This option is available in the Linux implementation of pam_krb5 and allows to authorize a user not known to the local system. Ccache is not used as we don't have a secure uid/gid for the cache file. Usable for authentication of external kerberos users (e.g Active Directory) via PAM from applications like Cyrus saslauthd, PHP or perl. PR: bin/146186 Approved by: deplhij (mentor) Modified: stable/8/lib/libpam/modules/pam_krb5/pam_krb5.8 stable/8/lib/libpam/modules/pam_krb5/pam_krb5.c Directory Properties: stable/8/lib/libpam/ (props changed) Modified: stable/8/lib/libpam/modules/pam_krb5/pam_krb5.8 ============================================================================== --- stable/8/lib/libpam/modules/pam_krb5/pam_krb5.8 Mon May 17 14:20:26 2010 (r208192) +++ stable/8/lib/libpam/modules/pam_krb5/pam_krb5.8 Mon May 17 14:27:40 2010 (r208193) @@ -1,7 +1,7 @@ .\" .\" $Id: pam_krb5.5,v 1.5 2000/01/05 00:59:56 fcusack Exp $ .\" $FreeBSD$ -.Dd January 15, 1999 +.Dd May 3, 2010 .Dt PAM_KRB5 8 .Os .Sh NAME @@ -108,6 +108,10 @@ and .Ql %p , to designate the current process ID; can be used in .Ar name . +.It Cm no_user_check +Do not verify if a user exists on the local system. This option implies the +.Cm no_ccache +option because there is no secure local uid/gid for the cache file. .El .Ss Kerberos 5 Account Management Module The Kerberos 5 account management component Modified: stable/8/lib/libpam/modules/pam_krb5/pam_krb5.c ============================================================================== --- stable/8/lib/libpam/modules/pam_krb5/pam_krb5.c Mon May 17 14:20:26 2010 (r208192) +++ stable/8/lib/libpam/modules/pam_krb5/pam_krb5.c Mon May 17 14:27:40 2010 (r208193) @@ -89,6 +89,7 @@ static void compat_free_data_contents(kr #define PAM_OPT_DEBUG "debug" #define PAM_OPT_FORWARDABLE "forwardable" #define PAM_OPT_NO_CCACHE "no_ccache" +#define PAM_OPT_NO_USER_CHECK "no_user_check" #define PAM_OPT_REUSE_CCACHE "reuse_ccache" /* @@ -194,34 +195,39 @@ pam_sm_authenticate(pam_handle_t *pamh, PAM_LOG("Got password"); - /* Verify the local user exists (AFTER getting the password) */ - if (strchr(user, '@')) { - /* get a local account name for this principal */ - krbret = krb5_aname_to_localname(pam_context, princ, - sizeof(luser), luser); - if (krbret != 0) { - PAM_VERBOSE_ERROR("Kerberos 5 error"); - PAM_LOG("Error krb5_aname_to_localname(): %s", - krb5_get_err_text(pam_context, krbret)); - retval = PAM_USER_UNKNOWN; - goto cleanup2; + if (openpam_get_option(pamh, PAM_OPT_NO_USER_CHECK)) + PAM_LOG("Skipping local user check"); + else { + + /* Verify the local user exists (AFTER getting the password) */ + if (strchr(user, '@')) { + /* get a local account name for this principal */ + krbret = krb5_aname_to_localname(pam_context, princ, + sizeof(luser), luser); + if (krbret != 0) { + PAM_VERBOSE_ERROR("Kerberos 5 error"); + PAM_LOG("Error krb5_aname_to_localname(): %s", + krb5_get_err_text(pam_context, krbret)); + retval = PAM_USER_UNKNOWN; + goto cleanup2; + } + + retval = pam_set_item(pamh, PAM_USER, luser); + if (retval != PAM_SUCCESS) + goto cleanup2; + + PAM_LOG("PAM_USER Redone"); } - retval = pam_set_item(pamh, PAM_USER, luser); - if (retval != PAM_SUCCESS) + pwd = getpwnam(user); + if (pwd == NULL) { + retval = PAM_USER_UNKNOWN; goto cleanup2; + } - PAM_LOG("PAM_USER Redone"); - } - - pwd = getpwnam(user); - if (pwd == NULL) { - retval = PAM_USER_UNKNOWN; - goto cleanup2; + PAM_LOG("Done getpwnam()"); } - PAM_LOG("Done getpwnam()"); - /* Get a TGT */ memset(&creds, 0, sizeof(krb5_creds)); krbret = krb5_get_init_creds_password(pam_context, &creds, princ, @@ -366,7 +372,8 @@ pam_sm_setcred(pam_handle_t *pamh, int f return (PAM_SERVICE_ERR); /* If a persistent cache isn't desired, stop now. */ - if (openpam_get_option(pamh, PAM_OPT_NO_CCACHE)) + if (openpam_get_option(pamh, PAM_OPT_NO_CCACHE) || + openpam_get_option(pamh, PAM_OPT_NO_USER_CHECK)) return (PAM_SUCCESS); PAM_LOG("Establishing credentials"); From owner-svn-src-stable-8@FreeBSD.ORG Mon May 17 15:31:24 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 675A2106564A; Mon, 17 May 2010 15:31:24 +0000 (UTC) (envelope-from vanhu@FreeBSD.org) Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 55ED78FC18; Mon, 17 May 2010 15:31: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 o4HFVO2E063301; Mon, 17 May 2010 15:31:24 GMT (envelope-from vanhu@svn.freebsd.org) Received: (from vanhu@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4HFVOIV063299; Mon, 17 May 2010 15:31:24 GMT (envelope-from vanhu@svn.freebsd.org) Message-Id: <201005171531.o4HFVOIV063299@svn.freebsd.org> From: VANHULLEBUS Yvan Date: Mon, 17 May 2010 15:31:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208194 - stable/8/sys/netipsec X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2010 15:31:24 -0000 Author: vanhu Date: Mon May 17 15:31:24 2010 New Revision: 208194 URL: http://svn.freebsd.org/changeset/base/208194 Log: MFC: Locks SPTREE when setting some SP entries to state DEAD. This can prevent kernel panics when updating SPs while there is some traffic for them. Obtained from: NETASQ Modified: stable/8/sys/netipsec/key.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/netipsec/key.c ============================================================================== --- stable/8/sys/netipsec/key.c Mon May 17 14:27:40 2010 (r208193) +++ stable/8/sys/netipsec/key.c Mon May 17 15:31:24 2010 (r208194) @@ -1882,7 +1882,9 @@ key_spdadd(so, m, mhp) newsp = key_getsp(&spidx); if (mhp->msg->sadb_msg_type == SADB_X_SPDUPDATE) { if (newsp) { + SPTREE_LOCK(); newsp->state = IPSEC_SPSTATE_DEAD; + SPTREE_UNLOCK(); KEY_FREESP(&newsp); } } else { @@ -2127,7 +2129,9 @@ key_spddelete(so, m, mhp) /* save policy id to buffer to be returned. */ xpl0->sadb_x_policy_id = sp->id; + SPTREE_LOCK(); sp->state = IPSEC_SPSTATE_DEAD; + SPTREE_UNLOCK(); KEY_FREESP(&sp); { @@ -2194,7 +2198,9 @@ key_spddelete2(so, m, mhp) return key_senderror(so, m, EINVAL); } + SPTREE_LOCK(); sp->state = IPSEC_SPSTATE_DEAD; + SPTREE_UNLOCK(); KEY_FREESP(&sp); { From owner-svn-src-stable-8@FreeBSD.ORG Mon May 17 16:47:25 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E847F1065675; Mon, 17 May 2010 16:47:25 +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 BD0D18FC13; Mon, 17 May 2010 16:47: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 o4HGlP68080075; Mon, 17 May 2010 16:47:25 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4HGlPj6080073; Mon, 17 May 2010 16:47:25 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201005171647.o4HGlPj6080073@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 17 May 2010 16:47:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208196 - stable/8/sys/dev/fxp X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2010 16:47:26 -0000 Author: yongari Date: Mon May 17 16:47:25 2010 New Revision: 208196 URL: http://svn.freebsd.org/changeset/base/208196 Log: MFC r207750: 8255x configure command requires number of bytes of configuration table. The default size of the configuration table was 22 bytes. To use extended feature of 82550/82551 the configuration table size was expanded to 32 bytes. The added configuration for 82550/82551 specifies VLAN hardware tagging and IPSec configuration as well as TCO. To make configuration easier fxp(4) used a configuration template and the template was copied to configuration table. After that, some parameters of the configuration table was changed depending on controller type and operation mode. However the size of template was 22 bytes so some configuration parameters were not properly initialized on 82550/82551. Fix this by increasing the template size. For 82557, 82558 and 82559 the size of the configuration is still 22 bytes. Modified: stable/8/sys/dev/fxp/if_fxp.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/dev/fxp/if_fxp.c ============================================================================== --- stable/8/sys/dev/fxp/if_fxp.c Mon May 17 16:04:09 2010 (r208195) +++ stable/8/sys/dev/fxp/if_fxp.c Mon May 17 16:47:25 2010 (r208196) @@ -106,9 +106,8 @@ static int tx_threshold = 64; /* * The configuration byte map has several undefined fields which - * must be one or must be zero. Set up a template for these bits - * only, (assuming a 82557 chip) leaving the actual configuration - * to fxp_init. + * must be one or must be zero. Set up a template for these bits. + * The actual configuration is performed in fxp_init. * * See struct fxp_cb_config for the bit definitions. */ @@ -137,7 +136,17 @@ static u_char fxp_cb_config_template[] = 0xf0, /* 18 */ 0x0, /* 19 */ 0x3f, /* 20 */ - 0x5 /* 21 */ + 0x5, /* 21 */ + 0x0, /* 22 */ + 0x0, /* 23 */ + 0x0, /* 24 */ + 0x0, /* 25 */ + 0x0, /* 26 */ + 0x0, /* 27 */ + 0x0, /* 28 */ + 0x0, /* 29 */ + 0x0, /* 30 */ + 0x0 /* 31 */ }; /* From owner-svn-src-stable-8@FreeBSD.ORG Mon May 17 16:57:55 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B99D81065675; Mon, 17 May 2010 16:57:55 +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 A6EC68FC13; Mon, 17 May 2010 16:57: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 o4HGvtBW082753; Mon, 17 May 2010 16:57:55 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4HGvtxS082749; Mon, 17 May 2010 16:57:55 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201005171657.o4HGvtxS082749@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 17 May 2010 16:57:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208199 - stable/8/sys/dev/fxp X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2010 16:57:55 -0000 Author: yongari Date: Mon May 17 16:57:55 2010 New Revision: 208199 URL: http://svn.freebsd.org/changeset/base/208199 Log: MFC r207832: 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: stable/8/sys/dev/fxp/if_fxp.c stable/8/sys/dev/fxp/if_fxpreg.h stable/8/sys/dev/fxp/if_fxpvar.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/dev/fxp/if_fxp.c ============================================================================== --- stable/8/sys/dev/fxp/if_fxp.c Mon May 17 16:55:26 2010 (r208198) +++ stable/8/sys/dev/fxp/if_fxp.c Mon May 17 16:57:55 2010 (r208199) @@ -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: stable/8/sys/dev/fxp/if_fxpreg.h ============================================================================== --- stable/8/sys/dev/fxp/if_fxpreg.h Mon May 17 16:55:26 2010 (r208198) +++ stable/8/sys/dev/fxp/if_fxpreg.h Mon May 17 16:57:55 2010 (r208199) @@ -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: stable/8/sys/dev/fxp/if_fxpvar.h ============================================================================== --- stable/8/sys/dev/fxp/if_fxpvar.h Mon May 17 16:55:26 2010 (r208198) +++ stable/8/sys/dev/fxp/if_fxpvar.h Mon May 17 16:57:55 2010 (r208199) @@ -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-stable-8@FreeBSD.ORG Mon May 17 17:02:42 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 859DF1065672; Mon, 17 May 2010 17:02:42 +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 7398F8FC1C; Mon, 17 May 2010 17:02: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 o4HH2grS084121; Mon, 17 May 2010 17:02:42 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4HH2gOR084118; Mon, 17 May 2010 17:02:42 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201005171702.o4HH2gOR084118@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 17 May 2010 17:02:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208201 - stable/8/sys/dev/sge X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2010 17:02:42 -0000 Author: yongari Date: Mon May 17 17:02:42 2010 New Revision: 208201 URL: http://svn.freebsd.org/changeset/base/208201 Log: MFC r207851: 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: stable/8/sys/dev/sge/if_sge.c stable/8/sys/dev/sge/if_sgereg.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/dev/sge/if_sge.c ============================================================================== --- stable/8/sys/dev/sge/if_sge.c Mon May 17 16:59:36 2010 (r208200) +++ stable/8/sys/dev/sge/if_sge.c Mon May 17 17:02:42 2010 (r208201) @@ -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: stable/8/sys/dev/sge/if_sgereg.h ============================================================================== --- stable/8/sys/dev/sge/if_sgereg.h Mon May 17 16:59:36 2010 (r208200) +++ stable/8/sys/dev/sge/if_sgereg.h Mon May 17 17:02:42 2010 (r208201) @@ -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-stable-8@FreeBSD.ORG Mon May 17 17:12:35 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 98AEE106566B; Mon, 17 May 2010 17:12:35 +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 86AB38FC18; Mon, 17 May 2010 17:12: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 o4HHCZLl086347; Mon, 17 May 2010 17:12:35 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4HHCZrP086345; Mon, 17 May 2010 17:12:35 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201005171712.o4HHCZrP086345@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 17 May 2010 17:12:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208203 - stable/8/sys/dev/sge X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2010 17:12:35 -0000 Author: yongari Date: Mon May 17 17:12:35 2010 New Revision: 208203 URL: http://svn.freebsd.org/changeset/base/208203 Log: MFC r207852: 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: stable/8/sys/dev/sge/if_sge.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/dev/sge/if_sge.c ============================================================================== --- stable/8/sys/dev/sge/if_sge.c Mon May 17 17:04:09 2010 (r208202) +++ stable/8/sys/dev/sge/if_sge.c Mon May 17 17:12:35 2010 (r208203) @@ -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-stable-8@FreeBSD.ORG Mon May 17 17:16:13 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F2A03106566B; Mon, 17 May 2010 17:16:12 +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 E14138FC0C; Mon, 17 May 2010 17:16: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 o4HHGCdU087240; Mon, 17 May 2010 17:16:12 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4HHGCbP087238; Mon, 17 May 2010 17:16:12 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201005171716.o4HHGCbP087238@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 17 May 2010 17:16:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208205 - stable/8/share/man/man4 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2010 17:16:13 -0000 Author: yongari Date: Mon May 17 17:16:12 2010 New Revision: 208205 URL: http://svn.freebsd.org/changeset/base/208205 Log: MFC r207853: Now sge(4) supports TCP segmentation offload (TSO). Modified: stable/8/share/man/man4/sge.4 Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/sge.4 ============================================================================== --- stable/8/share/man/man4/sge.4 Mon May 17 17:14:25 2010 (r208204) +++ stable/8/share/man/man4/sge.4 Mon May 17 17:16:12 2010 (r208205) @@ -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-stable-8@FreeBSD.ORG Mon May 17 17:17:58 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3CE49106566B; Mon, 17 May 2010 17:17:58 +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 224018FC16; Mon, 17 May 2010 17:17: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 o4HHHwI3087730; Mon, 17 May 2010 17:17:58 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4HHHwtN087728; Mon, 17 May 2010 17:17:58 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201005171717.o4HHHwtN087728@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 17 May 2010 17:17:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208207 - stable/8/share/man/man4 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2010 17:17:58 -0000 Author: yongari Date: Mon May 17 17:17:57 2010 New Revision: 208207 URL: http://svn.freebsd.org/changeset/base/208207 Log: MFC r207971: Document undocumented tunables and sysctl variables. While here use actual string to specify width as well as using Cm to set command argument. Modified: stable/8/share/man/man4/fxp.4 Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/fxp.4 ============================================================================== --- stable/8/share/man/man4/fxp.4 Mon May 17 17:16:49 2010 (r208206) +++ stable/8/share/man/man4/fxp.4 Mon May 17 17:17:57 2010 (r208207) @@ -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-stable-8@FreeBSD.ORG Mon May 17 17:56:27 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D35BA106566C; Mon, 17 May 2010 17:56:27 +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 C171C8FC17; Mon, 17 May 2010 17:56: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 o4HHuRKH096219; Mon, 17 May 2010 17:56:27 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4HHuR85096217; Mon, 17 May 2010 17:56:27 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201005171756.o4HHuR85096217@svn.freebsd.org> From: Edward Tomasz Napierala Date: Mon, 17 May 2010 17:56:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208209 - stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2010 17:56:28 -0000 Author: trasz Date: Mon May 17 17:56:27 2010 New Revision: 208209 URL: http://svn.freebsd.org/changeset/base/208209 Log: MFC r208030: Add missing check to prevent local users from panicing the kernel by trying to set malformed ACL. Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Mon May 17 17:18:58 2010 (r208208) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Mon May 17 17:56:27 2010 (r208209) @@ -4936,6 +4936,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-stable-8@FreeBSD.ORG Mon May 17 23:41:06 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 98D6F1065670; Mon, 17 May 2010 23:41:06 +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 85D6F8FC0C; Mon, 17 May 2010 23:41: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 o4HNf6h9073161; Mon, 17 May 2010 23:41:06 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4HNf6po073159; Mon, 17 May 2010 23:41:06 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201005172341.o4HNf6po073159@svn.freebsd.org> From: Andrew Thompson Date: Mon, 17 May 2010 23:41:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208214 - in stable/8/sys: contrib/dev/run modules/runfw X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2010 23:41:06 -0000 Author: thompsa Date: Mon May 17 23:41:06 2010 New Revision: 208214 URL: http://svn.freebsd.org/changeset/base/208214 Log: MFC r203148 Uuencode the rt2870 firmware into ascii like the other firmware blobs. Added: stable/8/sys/contrib/dev/run/rt2870.fw.uu - copied unchanged from r203148, head/sys/contrib/dev/run/rt2870.fw.uu Deleted: stable/8/sys/contrib/dev/run/run-rt2870 Modified: stable/8/sys/modules/runfw/Makefile Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Copied: stable/8/sys/contrib/dev/run/rt2870.fw.uu (from r203148, head/sys/contrib/dev/run/rt2870.fw.uu) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/sys/contrib/dev/run/rt2870.fw.uu Mon May 17 23:41:06 2010 (r208214, copy of r203148, head/sys/contrib/dev/run/rt2870.fw.uu) @@ -0,0 +1,225 @@ +# 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 +# met: +# +# * 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 +# 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 +# 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 +# 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!``(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```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````" +"F\`` +` +end Modified: stable/8/sys/modules/runfw/Makefile ============================================================================== --- stable/8/sys/modules/runfw/Makefile Mon May 17 19:51:34 2010 (r208213) +++ stable/8/sys/modules/runfw/Makefile Mon May 17 23:41:06 2010 (r208214) @@ -1,8 +1,11 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../contrib/dev/run - KMOD= runfw -FIRMWS= run-rt2870:runfw:1 +FIRMWS= runfw:runfw:1 + +CLEANFILES= runfw + +runfw: ${.CURDIR}/../../contrib/dev/run/rt2870.fw.uu + uudecode -p ${.CURDIR}/../../contrib/dev/run/rt2870.fw.uu > ${.TARGET} .include From owner-svn-src-stable-8@FreeBSD.ORG Mon May 17 23:41:51 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 622EF1065677; Mon, 17 May 2010 23:41:51 +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 4FBCA8FC13; Mon, 17 May 2010 23:41: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 o4HNfp45073367; Mon, 17 May 2010 23:41:51 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4HNfp4p073366; Mon, 17 May 2010 23:41:51 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201005172341.o4HNfp4p073366@svn.freebsd.org> From: Andrew Thompson Date: Mon, 17 May 2010 23:41:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208215 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci geom/sched X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2010 23:41:51 -0000 Author: thompsa Date: Mon May 17 23:41:51 2010 New Revision: 208215 URL: http://svn.freebsd.org/changeset/base/208215 Log: MFC r206544 The Quanta Q101 modem has a different type of cdrom driver disk, add the product id and use a standard scsi eject. Modified: Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) From owner-svn-src-stable-8@FreeBSD.ORG Mon May 17 23:42:30 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 45BFB1065673; Mon, 17 May 2010 23:42: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 333F28FC0C; Mon, 17 May 2010 23:42: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 o4HNgUaw073561; Mon, 17 May 2010 23:42:30 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4HNgU03073560; Mon, 17 May 2010 23:42:30 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201005172342.o4HNgU03073560@svn.freebsd.org> From: Andrew Thompson Date: Mon, 17 May 2010 23:42:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208216 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci geom/sched X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2010 23:42:30 -0000 Author: thompsa Date: Mon May 17 23:42:29 2010 New Revision: 208216 URL: http://svn.freebsd.org/changeset/base/208216 Log: MFC r206595 Eliminate duplicate comment Modified: Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) From owner-svn-src-stable-8@FreeBSD.ORG Mon May 17 23:43:07 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 800A31065670; Mon, 17 May 2010 23:43:07 +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 6EC568FC15; Mon, 17 May 2010 23:43: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 o4HNh7XT073744; Mon, 17 May 2010 23:43:07 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4HNh7d9073742; Mon, 17 May 2010 23:43:07 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201005172343.o4HNh7d9073742@svn.freebsd.org> From: Andrew Thompson Date: Mon, 17 May 2010 23:43:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208217 - stable/8/sys/dev/usb/input X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2010 23:43:07 -0000 Author: thompsa Date: Mon May 17 23:43:07 2010 New Revision: 208217 URL: http://svn.freebsd.org/changeset/base/208217 Log: MFC r206638 Use the UIPROTO_BOOT_KEYBOARD #define from usb.h rather than a local (almost identically named) local #define. Modified: stable/8/sys/dev/usb/input/ukbd.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/dev/usb/input/ukbd.c ============================================================================== --- stable/8/sys/dev/usb/input/ukbd.c Mon May 17 23:42:29 2010 (r208216) +++ stable/8/sys/dev/usb/input/ukbd.c Mon May 17 23:43:07 2010 (r208217) @@ -109,8 +109,6 @@ TUNABLE_INT("hw.usb.ukbd.debug", &ukbd_d TUNABLE_INT("hw.usb.ukbd.no_leds", &ukbd_no_leds); #endif -#define UPROTO_BOOT_KEYBOARD 1 - #define UKBD_EMULATE_ATSCANCODE 1 #define UKBD_DRIVER_NAME "ukbd" #define UKBD_NMOD 8 /* units */ @@ -777,7 +775,7 @@ ukbd_probe(device_t dev) return (ENXIO); if ((uaa->info.bInterfaceSubClass == UISUBCLASS_BOOT) && - (uaa->info.bInterfaceProtocol == UPROTO_BOOT_KEYBOARD)) { + (uaa->info.bInterfaceProtocol == UIPROTO_BOOT_KEYBOARD)) { if (usb_test_quirk(uaa, UQ_KBD_IGNORE)) return (ENXIO); else From owner-svn-src-stable-8@FreeBSD.ORG Mon May 17 23:43:42 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 30BE61065678; Mon, 17 May 2010 23:43:42 +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 1F7358FC0A; Mon, 17 May 2010 23:43: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 o4HNhgID073932; Mon, 17 May 2010 23:43:42 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4HNhgoF073930; Mon, 17 May 2010 23:43:42 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201005172343.o4HNhgoF073930@svn.freebsd.org> From: Andrew Thompson Date: Mon, 17 May 2010 23:43:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208218 - stable/8/sys/modules/usb/usb X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2010 23:43:42 -0000 Author: thompsa Date: Mon May 17 23:43:41 2010 New Revision: 208218 URL: http://svn.freebsd.org/changeset/base/208218 Log: MFC r207404 usb_controller.c requires opt_ddb.h Modified: stable/8/sys/modules/usb/usb/Makefile Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/modules/usb/usb/Makefile ============================================================================== --- stable/8/sys/modules/usb/usb/Makefile Mon May 17 23:43:07 2010 (r208217) +++ stable/8/sys/modules/usb/usb/Makefile Mon May 17 23:43:41 2010 (r208218) @@ -31,7 +31,7 @@ S= ${.CURDIR}/../../.. KMOD= usb SRCS= bus_if.h device_if.h usb_if.h usb_if.c vnode_if.h \ - opt_usb.h opt_bus.h \ + opt_usb.h opt_bus.h opt_ddb.h \ usbdevs.h usbdevs_data.h \ usb_busdma.c usb_controller.c usb_compat_linux.c usb_core.c usb_debug.c \ usb_dev.c usb_device.c usb_dynamic.c usb_error.c usb_generic.c \ From owner-svn-src-stable-8@FreeBSD.ORG Mon May 17 23:44:18 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B150B1065675; Mon, 17 May 2010 23:44:18 +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 9FE748FC12; Mon, 17 May 2010 23:44: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 o4HNiIOQ074138; Mon, 17 May 2010 23:44:18 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4HNiIK3074135; Mon, 17 May 2010 23:44:18 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201005172344.o4HNiIK3074135@svn.freebsd.org> From: Andrew Thompson Date: Mon, 17 May 2010 23:44:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208219 - in stable/8/sys/dev/usb: . quirk X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2010 23:44:18 -0000 Author: thompsa Date: Mon May 17 23:44:18 2010 New Revision: 208219 URL: http://svn.freebsd.org/changeset/base/208219 Log: MFC r208006 Add quirks for the Alcor SDCR_6362 Card Reader, Freecom HDD storage device and Samsung YP_U4 music player. PR: usb/145265, usb/146104 Modified: stable/8/sys/dev/usb/quirk/usb_quirk.c stable/8/sys/dev/usb/usbdevs Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- stable/8/sys/dev/usb/quirk/usb_quirk.c Mon May 17 23:43:41 2010 (r208218) +++ stable/8/sys/dev/usb/quirk/usb_quirk.c Mon May 17 23:44:18 2010 (r208219) @@ -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: stable/8/sys/dev/usb/usbdevs ============================================================================== --- stable/8/sys/dev/usb/usbdevs Mon May 17 23:43:41 2010 (r208218) +++ stable/8/sys/dev/usb/usbdevs Mon May 17 23:44:18 2010 (r208219) @@ -880,6 +880,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 @@ -1490,6 +1491,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 @@ -2598,6 +2600,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-stable-8@FreeBSD.ORG Mon May 17 23:44:53 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 280CC1065670; Mon, 17 May 2010 23:44:53 +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 16F3A8FC12; Mon, 17 May 2010 23:44: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 o4HNiqQR074328; Mon, 17 May 2010 23:44:52 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4HNiqu5074326; Mon, 17 May 2010 23:44:52 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201005172344.o4HNiqu5074326@svn.freebsd.org> From: Andrew Thompson Date: Mon, 17 May 2010 23:44:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208220 - stable/8/sys/dev/usb X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2010 23:44:53 -0000 Author: thompsa Date: Mon May 17 23:44:52 2010 New Revision: 208220 URL: http://svn.freebsd.org/changeset/base/208220 Log: MFC r208007 Staticise usb_ref_device and usb_unref_device. Modified: stable/8/sys/dev/usb/usb_dev.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/dev/usb/usb_dev.c ============================================================================== --- stable/8/sys/dev/usb/usb_dev.c Mon May 17 23:44:18 2010 (r208219) +++ stable/8/sys/dev/usb/usb_dev.c Mon May 17 23:44:52 2010 (r208220) @@ -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-stable-8@FreeBSD.ORG Mon May 17 23:45:32 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 323DB1065680; Mon, 17 May 2010 23:45:32 +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 202E68FC13; Mon, 17 May 2010 23:45: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 o4HNjWRr074530; Mon, 17 May 2010 23:45:32 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4HNjW2r074524; Mon, 17 May 2010 23:45:32 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201005172345.o4HNjW2r074524@svn.freebsd.org> From: Andrew Thompson Date: Mon, 17 May 2010 23:45:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208221 - stable/8/sys/dev/usb X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2010 23:45:32 -0000 Author: thompsa Date: Mon May 17 23:45:31 2010 New Revision: 208221 URL: http://svn.freebsd.org/changeset/base/208221 Log: MFC r208008 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. Modified: stable/8/sys/dev/usb/usb_device.c stable/8/sys/dev/usb/usb_device.h stable/8/sys/dev/usb/usb_generic.c stable/8/sys/dev/usb/usb_hub.c stable/8/sys/dev/usb/usb_request.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/dev/usb/usb_device.c ============================================================================== --- stable/8/sys/dev/usb/usb_device.c Mon May 17 23:44:52 2010 (r208220) +++ stable/8/sys/dev/usb/usb_device.c Mon May 17 23:45:31 2010 (r208221) @@ -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: stable/8/sys/dev/usb/usb_device.h ============================================================================== --- stable/8/sys/dev/usb/usb_device.h Mon May 17 23:44:52 2010 (r208220) +++ stable/8/sys/dev/usb/usb_device.h Mon May 17 23:45:31 2010 (r208221) @@ -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: stable/8/sys/dev/usb/usb_generic.c ============================================================================== --- stable/8/sys/dev/usb/usb_generic.c Mon May 17 23:44:52 2010 (r208220) +++ stable/8/sys/dev/usb/usb_generic.c Mon May 17 23:45:31 2010 (r208221) @@ -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: stable/8/sys/dev/usb/usb_hub.c ============================================================================== --- stable/8/sys/dev/usb/usb_hub.c Mon May 17 23:44:52 2010 (r208220) +++ stable/8/sys/dev/usb/usb_hub.c Mon May 17 23:45:31 2010 (r208221) @@ -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: stable/8/sys/dev/usb/usb_request.c ============================================================================== --- stable/8/sys/dev/usb/usb_request.c Mon May 17 23:44:52 2010 (r208220) +++ stable/8/sys/dev/usb/usb_request.c Mon May 17 23:45:31 2010 (r208221) @@ -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-stable-8@FreeBSD.ORG Mon May 17 23:46:08 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C349C1065673; Mon, 17 May 2010 23:46:08 +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 989FB8FC23; Mon, 17 May 2010 23:46:08 +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 o4HNk8q7074710; Mon, 17 May 2010 23:46:08 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4HNk8FC074707; Mon, 17 May 2010 23:46:08 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201005172346.o4HNk8FC074707@svn.freebsd.org> From: Andrew Thompson Date: Mon, 17 May 2010 23:46:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208222 - in stable/8/sys/dev/usb: . input X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2010 23:46:08 -0000 Author: thompsa Date: Mon May 17 23:46:08 2010 New Revision: 208222 URL: http://svn.freebsd.org/changeset/base/208222 Log: MFC r208009 Enable support for mouse panning wheels. Modified: stable/8/sys/dev/usb/input/ums.c stable/8/sys/dev/usb/usbhid.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/dev/usb/input/ums.c ============================================================================== --- stable/8/sys/dev/usb/input/ums.c Mon May 17 23:45:31 2010 (r208221) +++ stable/8/sys/dev/usb/input/ums.c Mon May 17 23:46:08 2010 (r208222) @@ -293,6 +293,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; @@ -461,6 +467,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: stable/8/sys/dev/usb/usbhid.h ============================================================================== --- stable/8/sys/dev/usb/usbhid.h Mon May 17 23:45:31 2010 (r208221) +++ stable/8/sys/dev/usb/usbhid.h Mon May 17 23:46:08 2010 (r208222) @@ -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-stable-8@FreeBSD.ORG Mon May 17 23:46:45 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C7A21065675; Mon, 17 May 2010 23:46: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 6B7878FC13; Mon, 17 May 2010 23:46: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 o4HNkjqx074914; Mon, 17 May 2010 23:46:45 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4HNkjRK074912; Mon, 17 May 2010 23:46:45 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201005172346.o4HNkjRK074912@svn.freebsd.org> From: Andrew Thompson Date: Mon, 17 May 2010 23:46:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208223 - stable/8/sys/dev/usb X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2010 23:46:45 -0000 Author: thompsa Date: Mon May 17 23:46:45 2010 New Revision: 208223 URL: http://svn.freebsd.org/changeset/base/208223 Log: MFC r208010 Provide more information about the device location in the USB system. Modified: stable/8/sys/dev/usb/usb_hub.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/dev/usb/usb_hub.c ============================================================================== --- stable/8/sys/dev/usb/usb_hub.c Mon May 17 23:46:08 2010 (r208222) +++ stable/8/sys/dev/usb/usb_hub.c Mon May 17 23:46:45 2010 (r208223) @@ -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-stable-8@FreeBSD.ORG Mon May 17 23:47:24 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 937FC1065676; Mon, 17 May 2010 23:47:24 +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 8289E8FC14; Mon, 17 May 2010 23:47: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 o4HNlOGF075138; Mon, 17 May 2010 23:47:24 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4HNlOBd075136; Mon, 17 May 2010 23:47:24 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201005172347.o4HNlOBd075136@svn.freebsd.org> From: Andrew Thompson Date: Mon, 17 May 2010 23:47:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208224 - stable/8/sys/dev/usb X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2010 23:47:24 -0000 Author: thompsa Date: Mon May 17 23:47:24 2010 New Revision: 208224 URL: http://svn.freebsd.org/changeset/base/208224 Log: MFC r208011 Add the ASUS MyPal A730W device id. Modified: stable/8/sys/dev/usb/usbdevs Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/dev/usb/usbdevs ============================================================================== --- stable/8/sys/dev/usb/usbdevs Mon May 17 23:46:45 2010 (r208223) +++ stable/8/sys/dev/usb/usbdevs Mon May 17 23:47:24 2010 (r208224) @@ -1014,6 +1014,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-stable-8@FreeBSD.ORG Mon May 17 23:48:03 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 77559106567B; Mon, 17 May 2010 23:48:03 +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 6602E8FC0C; Mon, 17 May 2010 23:48:03 +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 o4HNm3sL075317; Mon, 17 May 2010 23:48:03 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4HNm3La075315; Mon, 17 May 2010 23:48:03 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201005172348.o4HNm3La075315@svn.freebsd.org> From: Andrew Thompson Date: Mon, 17 May 2010 23:48:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208225 - stable/8/sys/dev/usb/controller X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2010 23:48:03 -0000 Author: thompsa Date: Mon May 17 23:48:03 2010 New Revision: 208225 URL: http://svn.freebsd.org/changeset/base/208225 Log: MFC r208013 Add missing ifdefs for usb power saving support. Modified: stable/8/sys/dev/usb/controller/usb_controller.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/dev/usb/controller/usb_controller.c ============================================================================== --- stable/8/sys/dev/usb/controller/usb_controller.c Mon May 17 23:47:24 2010 (r208224) +++ stable/8/sys/dev/usb/controller/usb_controller.c Mon May 17 23:48:03 2010 (r208225) @@ -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-stable-8@FreeBSD.ORG Mon May 17 23:48:52 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F339E1065676; Mon, 17 May 2010 23:48:51 +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 E1DC08FC0C; Mon, 17 May 2010 23:48: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 o4HNmpXt075530; Mon, 17 May 2010 23:48:51 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4HNmpvE075528; Mon, 17 May 2010 23:48:51 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201005172348.o4HNmpvE075528@svn.freebsd.org> From: Andrew Thompson Date: Mon, 17 May 2010 23:48:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208226 - stable/8/sys/dev/usb/controller X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2010 23:48:52 -0000 Author: thompsa Date: Mon May 17 23:48:51 2010 New Revision: 208226 URL: http://svn.freebsd.org/changeset/base/208226 Log: MFC r208014 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. Modified: stable/8/sys/dev/usb/controller/ehci.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/dev/usb/controller/ehci.c ============================================================================== --- stable/8/sys/dev/usb/controller/ehci.c Mon May 17 23:48:03 2010 (r208225) +++ stable/8/sys/dev/usb/controller/ehci.c Mon May 17 23:48:51 2010 (r208226) @@ -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-stable-8@FreeBSD.ORG Mon May 17 23:49:32 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 32489106566C; Mon, 17 May 2010 23:49:32 +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 211A08FC19; Mon, 17 May 2010 23:49: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 o4HNnWMN075741; Mon, 17 May 2010 23:49:32 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4HNnW4L075739; Mon, 17 May 2010 23:49:32 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201005172349.o4HNnW4L075739@svn.freebsd.org> From: Andrew Thompson Date: Mon, 17 May 2010 23:49:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208227 - stable/8/sys/dev/usb/serial X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2010 23:49:32 -0000 Author: thompsa Date: Mon May 17 23:49:31 2010 New Revision: 208227 URL: http://svn.freebsd.org/changeset/base/208227 Log: MFC r208015 Increase the max ports to 12, 3G devices exist where the ppp endpoint is #9. Modified: stable/8/sys/dev/usb/serial/u3g.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/dev/usb/serial/u3g.c ============================================================================== --- stable/8/sys/dev/usb/serial/u3g.c Mon May 17 23:48:51 2010 (r208226) +++ stable/8/sys/dev/usb/serial/u3g.c Mon May 17 23:49:31 2010 (r208227) @@ -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-stable-8@FreeBSD.ORG Mon May 17 23:50:10 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 86AE0106564A; Mon, 17 May 2010 23:50:10 +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 5BEF88FC22; Mon, 17 May 2010 23:50: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 o4HNoAYF075953; Mon, 17 May 2010 23:50:10 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4HNoAix075950; Mon, 17 May 2010 23:50:10 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201005172350.o4HNoAix075950@svn.freebsd.org> From: Andrew Thompson Date: Mon, 17 May 2010 23:50:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208228 - in stable/8/sys/dev/usb: . serial X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2010 23:50:10 -0000 Author: thompsa Date: Mon May 17 23:50:10 2010 New Revision: 208228 URL: http://svn.freebsd.org/changeset/base/208228 Log: MFC r208016 Add new FTDI USB device ID. Modified: stable/8/sys/dev/usb/serial/uftdi.c stable/8/sys/dev/usb/usbdevs Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/dev/usb/serial/uftdi.c ============================================================================== --- stable/8/sys/dev/usb/serial/uftdi.c Mon May 17 23:49:31 2010 (r208227) +++ stable/8/sys/dev/usb/serial/uftdi.c Mon May 17 23:50:10 2010 (r208228) @@ -219,6 +219,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: stable/8/sys/dev/usb/usbdevs ============================================================================== --- stable/8/sys/dev/usb/usbdevs Mon May 17 23:49:31 2010 (r208227) +++ stable/8/sys/dev/usb/usbdevs Mon May 17 23:50:10 2010 (r208228) @@ -1508,6 +1508,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-stable-8@FreeBSD.ORG Mon May 17 23:50:47 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 088F61065680; Mon, 17 May 2010 23:50:47 +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 EB8898FC25; Mon, 17 May 2010 23:50: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 o4HNokvb076129; Mon, 17 May 2010 23:50:46 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4HNoksn076127; Mon, 17 May 2010 23:50:46 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201005172350.o4HNoksn076127@svn.freebsd.org> From: Andrew Thompson Date: Mon, 17 May 2010 23:50:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208229 - stable/8/sys/dev/usb/net X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2010 23:50:47 -0000 Author: thompsa Date: Mon May 17 23:50:46 2010 New Revision: 208229 URL: http://svn.freebsd.org/changeset/base/208229 Log: MFC r208017 Fix possibly wrong bit masking. Modified: stable/8/sys/dev/usb/net/uhso.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/dev/usb/net/uhso.c ============================================================================== --- stable/8/sys/dev/usb/net/uhso.c Mon May 17 23:50:10 2010 (r208228) +++ stable/8/sys/dev/usb/net/uhso.c Mon May 17 23:50:46 2010 (r208229) @@ -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-stable-8@FreeBSD.ORG Mon May 17 23:51:20 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC1BD1065687; Mon, 17 May 2010 23:51:20 +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 BA2628FC12; Mon, 17 May 2010 23: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 o4HNpKJm076315; Mon, 17 May 2010 23:51:20 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4HNpKjD076313; Mon, 17 May 2010 23:51:20 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201005172351.o4HNpKjD076313@svn.freebsd.org> From: Andrew Thompson Date: Mon, 17 May 2010 23:51:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208230 - stable/8/sys/dev/usb X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2010 23:51:21 -0000 Author: thompsa Date: Mon May 17 23:51:20 2010 New Revision: 208230 URL: http://svn.freebsd.org/changeset/base/208230 Log: MFC r208018 Reduce diffs to p4. Add test code for delaying or failing usb control requests, disabled by default under ifdef USB_REQ_DEBUG. Modified: stable/8/sys/dev/usb/usb_request.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/dev/usb/usb_request.c ============================================================================== --- stable/8/sys/dev/usb/usb_request.c Mon May 17 23:50:46 2010 (r208229) +++ stable/8/sys/dev/usb/usb_request.c Mon May 17 23:51:20 2010 (r208230) @@ -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-stable-8@FreeBSD.ORG Mon May 17 23:51:58 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E3CFF1065701; Mon, 17 May 2010 23:51: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 D07488FC25; Mon, 17 May 2010 23: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 o4HNpv93076493; Mon, 17 May 2010 23:51:57 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4HNpvGB076489; Mon, 17 May 2010 23:51:57 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201005172351.o4HNpvGB076489@svn.freebsd.org> From: Andrew Thompson Date: Mon, 17 May 2010 23:51:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208231 - in stable/8/sys: contrib/dev/run dev/usb/wlan X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2010 23:51:58 -0000 Author: thompsa Date: Mon May 17 23:51:57 2010 New Revision: 208231 URL: http://svn.freebsd.org/changeset/base/208231 Log: MFC r208019 Sync run(4) driver from author's site. Modified: stable/8/sys/contrib/dev/run/rt2870.fw.uu stable/8/sys/dev/usb/wlan/if_run.c stable/8/sys/dev/usb/wlan/if_runreg.h stable/8/sys/dev/usb/wlan/if_runvar.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/contrib/dev/run/rt2870.fw.uu ============================================================================== --- stable/8/sys/contrib/dev/run/rt2870.fw.uu Mon May 17 23:51:20 2010 (r208230) +++ stable/8/sys/contrib/dev/run/rt2870.fw.uu Mon May 17 23:51:57 2010 (r208231) @@ -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: stable/8/sys/dev/usb/wlan/if_run.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_run.c Mon May 17 23:51:20 2010 (r208230) +++ stable/8/sys/dev/usb/wlan/if_run.c Mon May 17 23:51:57 2010 (r208231) @@ -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-stable-8@FreeBSD.ORG Mon May 17 23:52:33 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 99FF9106566B; Mon, 17 May 2010 23:52: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 88F6E8FC0C; Mon, 17 May 2010 23:52: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 o4HNqXaw076675; Mon, 17 May 2010 23:52:33 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4HNqXiV076673; Mon, 17 May 2010 23:52:33 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201005172352.o4HNqXiV076673@svn.freebsd.org> From: Andrew Thompson Date: Mon, 17 May 2010 23:52:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208232 - stable/8/sys/conf X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2010 23:52:33 -0000 Author: thompsa Date: Mon May 17 23:52:33 2010 New Revision: 208232 URL: http://svn.freebsd.org/changeset/base/208232 Log: MFC r208048 Allow the USB_REQ_DEBUG to be enabled in the kernel conf. Modified: stable/8/sys/conf/options Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/conf/options ============================================================================== --- stable/8/sys/conf/options Mon May 17 23:51:57 2010 (r208231) +++ stable/8/sys/conf/options Mon May 17 23:52:33 2010 (r208232) @@ -636,6 +636,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-stable-8@FreeBSD.ORG Mon May 17 23:55:24 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4150A106564A; Mon, 17 May 2010 23:55:24 +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 166E78FC14; Mon, 17 May 2010 23:55: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 o4HNtN2O077370; Mon, 17 May 2010 23:55:23 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4HNtNc0077365; Mon, 17 May 2010 23:55:23 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201005172355.o4HNtNc0077365@svn.freebsd.org> From: Andrew Thompson Date: Mon, 17 May 2010 23:55:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208233 - stable/8/lib/libusb X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2010 23:55:24 -0000 Author: thompsa Date: Mon May 17 23:55:23 2010 New Revision: 208233 URL: http://svn.freebsd.org/changeset/base/208233 Log: MFC r208020 Fix header file compliancy with libusb 1.0 from sourceforge. Modified: stable/8/lib/libusb/libusb.h stable/8/lib/libusb/libusb10.c stable/8/lib/libusb/libusb10_desc.c stable/8/lib/libusb/libusb10_io.c Directory Properties: stable/8/lib/libusb/ (props changed) stable/8/lib/libusb/usb.h (props changed) Modified: stable/8/lib/libusb/libusb.h ============================================================================== --- stable/8/lib/libusb/libusb.h Mon May 17 23:52:33 2010 (r208232) +++ stable/8/lib/libusb/libusb.h Mon May 17 23:55:23 2010 (r208233) @@ -185,7 +185,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; @@ -194,7 +194,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: stable/8/lib/libusb/libusb10.c ============================================================================== --- stable/8/lib/libusb/libusb10.c Mon May 17 23:52:33 2010 (r208232) +++ stable/8/lib/libusb/libusb10.c Mon May 17 23:55:23 2010 (r208233) @@ -37,6 +37,8 @@ #include #include +#define libusb_device_handle libusb20_device + #include "libusb20.h" #include "libusb20_desc.h" #include "libusb20_int.h" Modified: stable/8/lib/libusb/libusb10_desc.c ============================================================================== --- stable/8/lib/libusb/libusb10_desc.c Mon May 17 23:52:33 2010 (r208232) +++ stable/8/lib/libusb/libusb10_desc.c Mon May 17 23:55:23 2010 (r208233) @@ -29,6 +29,8 @@ #include #include +#define libusb_device_handle libusb20_device + #include "libusb20.h" #include "libusb20_desc.h" #include "libusb20_int.h" Modified: stable/8/lib/libusb/libusb10_io.c ============================================================================== --- stable/8/lib/libusb/libusb10_io.c Mon May 17 23:52:33 2010 (r208232) +++ stable/8/lib/libusb/libusb10_io.c Mon May 17 23:55:23 2010 (r208233) @@ -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-stable-8@FreeBSD.ORG Mon May 17 23:56:17 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5DF881065690; Mon, 17 May 2010 23:56: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 4CE588FC25; Mon, 17 May 2010 23:56: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 o4HNuH13077654; Mon, 17 May 2010 23:56:17 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4HNuHIs077652; Mon, 17 May 2010 23:56:17 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201005172356.o4HNuHIs077652@svn.freebsd.org> From: Andrew Thompson Date: Mon, 17 May 2010 23:56:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208235 - stable/8/lib/libusb X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2010 23:56:17 -0000 Author: thompsa Date: Mon May 17 23:56:17 2010 New Revision: 208235 URL: http://svn.freebsd.org/changeset/base/208235 Log: MFC r208021 Fix return values for usb_find_busses() and usb_find_devices(). We should try to return the actual number of busses and devices. Modified: stable/8/lib/libusb/libusb20_compat01.c Directory Properties: stable/8/lib/libusb/ (props changed) stable/8/lib/libusb/usb.h (props changed) Modified: stable/8/lib/libusb/libusb20_compat01.c ============================================================================== --- stable/8/lib/libusb/libusb20_compat01.c Mon May 17 23:55:38 2010 (r208234) +++ stable/8/lib/libusb/libusb20_compat01.c Mon May 17 23:56:17 2010 (r208235) @@ -820,7 +820,7 @@ int usb_find_busses(void) { usb_busses = &usb_global_bus; - return (0); + return (1); } int @@ -904,7 +904,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-stable-8@FreeBSD.ORG Mon May 17 23:57:34 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A8E67106564A; Mon, 17 May 2010 23:57:34 +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 97AA38FC15; Mon, 17 May 2010 23:57:34 +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 o4HNvYRl077966; Mon, 17 May 2010 23:57:34 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4HNvYvY077964; Mon, 17 May 2010 23:57:34 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201005172357.o4HNvYvY077964@svn.freebsd.org> From: Andrew Thompson Date: Mon, 17 May 2010 23:57:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208236 - stable/8/lib/libusbhid X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2010 23:57:34 -0000 Author: thompsa Date: Mon May 17 23:57:34 2010 New Revision: 208236 URL: http://svn.freebsd.org/changeset/base/208236 Log: MFC r208012 Support getting signed and unsigned HID data. Modified: stable/8/lib/libusbhid/data.c Directory Properties: stable/8/lib/libusbhid/ (props changed) Modified: stable/8/lib/libusbhid/data.c ============================================================================== --- stable/8/lib/libusbhid/data.c Mon May 17 23:56:17 2010 (r208235) +++ stable/8/lib/libusbhid/data.c Mon May 17 23:57:34 2010 (r208236) @@ -53,13 +53,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); } From owner-svn-src-stable-8@FreeBSD.ORG Mon May 17 23:59:15 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3472F1065676; Mon, 17 May 2010 23:59:15 +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 234468FC13; Mon, 17 May 2010 23:59: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 o4HNxFvv078377; Mon, 17 May 2010 23:59:15 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4HNxFDi078375; Mon, 17 May 2010 23:59:15 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201005172359.o4HNxFDi078375@svn.freebsd.org> From: Andrew Thompson Date: Mon, 17 May 2010 23:59:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208237 - stable/8/lib/libusb X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2010 23:59:15 -0000 Author: thompsa Date: Mon May 17 23:59:14 2010 New Revision: 208237 URL: http://svn.freebsd.org/changeset/base/208237 Log: MFC r203773 Within libusb 0.1 API, bus number is always faked to 0. Device numbers, however, are possitive and seem to be reverse sorted in the list. Conform device numbering and bring a result that is consistent with the libusb 0.1 API. It is now possible to distinguish a device based on its (bus, dev) numbers. Modified: stable/8/lib/libusb/libusb20_compat01.c Directory Properties: stable/8/lib/libusb/ (props changed) stable/8/lib/libusb/usb.h (props changed) Modified: stable/8/lib/libusb/libusb20_compat01.c ============================================================================== --- stable/8/lib/libusb/libusb20_compat01.c Mon May 17 23:57:34 2010 (r208236) +++ stable/8/lib/libusb/libusb20_compat01.c Mon May 17 23:59:14 2010 (r208237) @@ -829,6 +829,7 @@ usb_find_devices(void) struct libusb20_device *pdev; struct usb_device *udev; struct LIBUSB20_DEVICE_DESC_DECODED *ddesc; + int devnum; int err; /* cleanup after last device search */ @@ -855,6 +856,7 @@ usb_find_devices(void) } /* iterate all devices */ + devnum = 1; pdev = NULL; while ((pdev = libusb20_be_device_foreach(usb_backend, pdev))) { udev = malloc(sizeof(*udev)); @@ -891,6 +893,7 @@ usb_find_devices(void) /* truncate number of configurations */ udev->descriptor.bNumConfigurations = USB_MAXCONFIG; } + udev->devnum = devnum++; /* link together the two structures */ udev->dev = pdev; pdev->privLuData = udev; From owner-svn-src-stable-8@FreeBSD.ORG Tue May 18 00:32:03 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3BD56106566B; Tue, 18 May 2010 00:32:03 +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 1FF9E8FC08; Tue, 18 May 2010 00:32:03 +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 o4I0W2J6085906; Tue, 18 May 2010 00:32:02 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4I0W2i7085904; Tue, 18 May 2010 00:32:02 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201005180032.o4I0W2i7085904@svn.freebsd.org> From: Xin LI Date: Tue, 18 May 2010 00:32:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208238 - stable/8/sys/boot/forth X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 May 2010 00:32:03 -0000 Author: delphij Date: Tue May 18 00:32:02 2010 New Revision: 208238 URL: http://svn.freebsd.org/changeset/base/208238 Log: MFC r207630 Remove if_ar, if_ray, if_sr, if_ppp, if_sl to reflect the current modules available, they were removed due to NEEDSGIANT. While I'm there, add if_et which was missed quite a while ago. Modified: stable/8/sys/boot/forth/loader.conf Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/boot/forth/loader.conf ============================================================================== --- stable/8/sys/boot/forth/loader.conf Mon May 17 23:59:14 2010 (r208237) +++ stable/8/sys/boot/forth/loader.conf Tue May 18 00:32:02 2010 (r208238) @@ -196,8 +196,6 @@ if_epair_load="NO" # Virtual b-t-b Ethe if_faith_load="NO" # IPv6-to-IPv4 TCP relay capturing interface if_gif_load="NO" # generic tunnel interface if_gre_load="NO" # encapsulating network device -if_ppp_load="NO" # Kernel ppp -if_sl_load="NO" # SLIP if_stf_load="NO" # 6to4 tunnel interface if_tap_load="NO" # Ethernet tunnel software network interface if_tun_load="NO" # Tunnel driver (user process ppp) @@ -216,7 +214,6 @@ if_age_load="NO" # Attansic/Atheros L1 if_alc_load="NO" # Atheros AR8131/AR8132 Ethernet if_ale_load="NO" # Atheros AR8121/AR8113/AR8114 Ethernet if_an_load="NO" # Aironet 4500/4800 802.11 wireless NICs -if_ar_load="NO" # Digi SYNC/570i if_ath_load="NO" # Atheros IEEE 802.11 wireless NICs if_aue_load="NO" # ADMtek AN986 Pegasus USB Ethernet if_awi_load="NO" # AMD PCnetMobile IEEE 802.11 wireless NICs @@ -236,6 +233,7 @@ if_ed_load="NO" # National Semiconduct if_em_load="NO" # Intel(R) PRO/1000 Gigabit Ethernet if_en_load="NO" # Midway-based ATM interfaces if_ep_load="NO" # 3Com Etherlink III (3c5x9) +if_et_load="NO" # Agere ET1310 10/100/Gigabit Ethernet if_ex_load="NO" # Intel EtherExpress Pro/10 Ethernet if_fe_load="NO" # Fujitsu MB86960A/MB86965A based Ethernet # adapters @@ -264,17 +262,15 @@ if_nve_load="NO" # NVIDIA nForce MCP Ne if_nxge_load="NO" # Neterion Xframe 10Gb Ethernet if_pcn_load="NO" # AMD PCnet PCI if_ral_load="NO" # Ralink Technology wireless -if_ray_load="NO" # Raytheon Raylink/Webgear Aviator PCCard if_re_load="NO" # RealTek 8139C+/8169/8169S/8110S if_rl_load="NO" # RealTek 8129/8139 if_rue_load="NO" # RealTek RTL8150 USB to Fast Ethernet if_sbni_load="NO" # Granch SBNI12 leased line adapters if_sf_load="NO" # Adaptec Duralink PCI (AIC-6915 "starfire") -if_sge_load="NO" # Silicon Integrated Systems SiS190/191 +if_sge_load="NO" # Silicon Integrated Systems SiS 190/191 if_sis_load="NO" # Silicon Integrated Systems SiS 900/7016 if_sk_load="NO" # SysKonnect SK-984x series PCI Gigabit Ethernet if_sn_load="NO" # SMC 91Cxx -if_sr_load="NO" # synchronous RISCom/N2 / WANic 400/405 if_ste_load="NO" # Sundance Technologies ST201 Fast Ethernet if_stge_load="NO" # Sundance/Tamarack TC9021 Gigabit Ethernet if_ti_load="NO" # Alteon Networks Tigon 1 and Tigon 2 From owner-svn-src-stable-8@FreeBSD.ORG Tue May 18 00:37:33 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D5FC106567B; Tue, 18 May 2010 00:37:33 +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 227D18FC14; Tue, 18 May 2010 00:37: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 o4I0bXrN087170; Tue, 18 May 2010 00:37:33 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4I0bXQM087169; Tue, 18 May 2010 00:37:33 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201005180037.o4I0bXQM087169@svn.freebsd.org> From: Xin LI Date: Tue, 18 May 2010 00:37:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208239 - stable/8/lib X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 May 2010 00:37:33 -0000 Author: delphij Date: Tue May 18 00:37:32 2010 New Revision: 208239 URL: http://svn.freebsd.org/changeset/base/208239 Log: Adjust svn:mergeinfo for revision 204546. This commit moves mergeinfo to lib/ and removes mergeinfo on individual file. Modified: Directory Properties: stable/8/lib/ (props changed) stable/8/lib/Makefile (props changed) From owner-svn-src-stable-8@FreeBSD.ORG Tue May 18 00:46:16 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 85ED2106564A; Tue, 18 May 2010 00:46:16 +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 742938FC0A; Tue, 18 May 2010 00:46: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 o4I0kG46089187; Tue, 18 May 2010 00:46:16 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4I0kGtd089185; Tue, 18 May 2010 00:46:16 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201005180046.o4I0kGtd089185@svn.freebsd.org> From: Martin Matuska Date: Tue, 18 May 2010 00:46:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208240 - stable/8/lib X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 May 2010 00:46:16 -0000 Author: mm Date: Tue May 18 00:46:15 2010 New Revision: 208240 URL: http://svn.freebsd.org/changeset/base/208240 Log: MFC r204738, r205113 (imp): MFC r204738: Remove stale references to libkrb5. Rejigger the SUBDIR setting a smidge: we now set all the libraries that depend on something else, and then SUBDIR+= the rest. MFC r205113: Make this conform to the other top-level Makefile subdir listings with one file per line. Approved by: delphij (mentor) Modified: stable/8/lib/Makefile Directory Properties: stable/8/lib/ (props changed) Modified: stable/8/lib/Makefile ============================================================================== --- stable/8/lib/Makefile Tue May 18 00:37:32 2010 (r208239) +++ stable/8/lib/Makefile Tue May 18 00:46:15 2010 (r208240) @@ -9,8 +9,8 @@ # csu must be built before all shared libaries for ELF. # libc must be built before all other shared libraries. # libbsm must be built before ibauditd. -# libcom_err must be built before libkrb5 and libpam. -# libcrypt must be built before libkrb5 and libpam. +# libcom_err must be built before libpam. +# libcrypt must be built before libpam. # libkvm must be built before libdevstat. # msun must be built before libg++ and libstdc++. # libmd must be built before libatm, libopie, libradius, and libtacplus. @@ -26,21 +26,84 @@ # libgssapi must be built before librpcsec_gss # # Otherwise, the SUBDIR list should be in alphabetical order. +# +# Except it appears bind needs to be compiled last -SUBDIR= ${_csu} libc libbsm libauditd libcom_err libcrypt libelf libkvm msun \ +SUBDIR_ORDERED= ${_csu} \ + libc \ + libbsm \ + libauditd \ + libcom_err \ + libcrypt \ + libelf \ + libkvm \ + msun \ libmd \ - ncurses ${_libnetgraph} libradius librpcsvc libsbuf \ - libtacplus libutil ${_libypclnt} libalias libarchive ${_libatm} \ - libbegemot ${_libbluetooth} ${_libbsnmp} libbz2 \ - libcalendar libcam libcompat libdevinfo libdevstat libdisk \ - libdwarf libedit libexpat libfetch libftpio libgeom ${_libgpib} \ - ${_libgssapi} ${_librpcsec_gss} libipsec \ - ${_libipx} libjail libkiconv libmagic libmemstat ${_libmilter} \ - ${_libmp} ${_libncp} ${_libngatm} libopie libpam libpcap \ - ${_libpmc} libproc librt ${_libsdp} ${_libsm} ${_libsmb} \ + ncurses \ + ${_libnetgraph} \ + libradius \ + librpcsvc \ + libsbuf \ + libtacplus \ + libutil \ + ${_libypclnt} + +SUBDIR= ${SUBDIR_ORDERED} \ + libalias \ + libarchive \ + ${_libatm} \ + libbegemot \ + ${_libbluetooth} \ + ${_libbsnmp} \ + libbz2 \ + libcalendar \ + libcam \ + libcompat \ + libdevinfo \ + libdevstat \ + libdisk \ + libdwarf \ + libedit \ + libexpat \ + libfetch \ + libftpio \ + libgeom \ + ${_libgpib} \ + ${_libgssapi} \ + ${_librpcsec_gss} \ + libipsec \ + ${_libipx} \ + libjail \ + libkiconv \ + libmagic \ + libmemstat \ + ${_libmilter} \ + ${_libmp} \ + ${_libncp} \ + ${_libngatm} \ + libopie \ + libpam \ + libpcap \ + ${_libpmc} \ + libproc \ + librt \ + ${_libsdp} \ + ${_libsm} \ + ${_libsmb} \ ${_libsmdb} \ - ${_libsmutil} libstand ${_libtelnet} ${_libthr} libthread_db libufs \ - libugidfw ${_libusbhid} ${_libusb} ${_libvgl} libwrap liby libz \ + ${_libsmutil} \ + libstand \ + ${_libtelnet} \ + ${_libthr} \ + libthread_db \ + libufs \ + libugidfw \ + ${_libusbhid} \ + ${_libusb} \ + ${_libvgl} \ + libwrap \ + liby \ + libz \ ${_bind} .if exists(${.CURDIR}/csu/${MACHINE_ARCH}-elf) From owner-svn-src-stable-8@FreeBSD.ORG Tue May 18 02:17:40 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B222F1065673; Tue, 18 May 2010 02:17:40 +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 A00E98FC18; Tue, 18 May 2010 02:17: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 o4I2Hee9009385; Tue, 18 May 2010 02:17:40 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4I2He8g009383; Tue, 18 May 2010 02:17:40 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201005180217.o4I2He8g009383@svn.freebsd.org> From: Doug Barton Date: Tue, 18 May 2010 02:17:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208242 - stable/8/usr.sbin/mergemaster X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 May 2010 02:17:40 -0000 Author: dougb Date: Tue May 18 02:17:40 2010 New Revision: 208242 URL: http://svn.freebsd.org/changeset/base/208242 Log: MFC r208088: Hide the creation and population of the temproot Modified: stable/8/usr.sbin/mergemaster/mergemaster.sh Directory Properties: stable/8/usr.sbin/mergemaster/ (props changed) Modified: stable/8/usr.sbin/mergemaster/mergemaster.sh ============================================================================== --- stable/8/usr.sbin/mergemaster/mergemaster.sh Tue May 18 01:45:28 2010 (r208241) +++ stable/8/usr.sbin/mergemaster/mergemaster.sh Tue May 18 02:17:40 2010 (r208242) @@ -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-stable-8@FreeBSD.ORG Tue May 18 02:22:09 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 380661065674; Tue, 18 May 2010 02:22:09 +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 2619C8FC1C; Tue, 18 May 2010 02:22:09 +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 o4I2M9Rw010543; Tue, 18 May 2010 02:22:09 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4I2M95P010541; Tue, 18 May 2010 02:22:09 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201005180222.o4I2M95P010541@svn.freebsd.org> From: Doug Barton Date: Tue, 18 May 2010 02:22:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208244 - stable/8/usr.bin/calendar/calendars X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 May 2010 02:22:09 -0000 Author: dougb Date: Tue May 18 02:22:08 2010 New Revision: 208244 URL: http://svn.freebsd.org/changeset/base/208244 Log: MFC r208089: Remove duplicate Modified: stable/8/usr.bin/calendar/calendars/calendar.history Directory Properties: stable/8/usr.bin/calendar/ (props changed) Modified: stable/8/usr.bin/calendar/calendars/calendar.history ============================================================================== --- stable/8/usr.bin/calendar/calendars/calendar.history Tue May 18 02:18:27 2010 (r208243) +++ stable/8/usr.bin/calendar/calendars/calendar.history Tue May 18 02:22:08 2010 (r208244) @@ -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-stable-8@FreeBSD.ORG Tue May 18 03:16:02 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BBA531065674; Tue, 18 May 2010 03:16:02 +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 A91BF8FC13; Tue, 18 May 2010 03:16: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 o4I3G2FF023033; Tue, 18 May 2010 03:16:02 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4I3G2nY023030; Tue, 18 May 2010 03:16:02 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201005180316.o4I3G2nY023030@svn.freebsd.org> From: Andrew Thompson Date: Tue, 18 May 2010 03:16:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208248 - stable/8/lib/libusbhid X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 May 2010 03:16:02 -0000 Author: thompsa Date: Tue May 18 03:16:02 2010 New Revision: 208248 URL: http://svn.freebsd.org/changeset/base/208248 Log: MFC r208023 Use fixed width integer types for parsing the binary hid data. Modified: stable/8/lib/libusbhid/data.c stable/8/lib/libusbhid/usbhid.h Directory Properties: stable/8/lib/libusbhid/ (props changed) Modified: stable/8/lib/libusbhid/data.c ============================================================================== --- stable/8/lib/libusbhid/data.c Tue May 18 02:31:37 2010 (r208247) +++ stable/8/lib/libusbhid/data.c Tue May 18 03:16:02 2010 (r208248) @@ -33,7 +33,7 @@ __FBSDID("$FreeBSD$"); #include #include "usbhid.h" -int +int32_t hid_get_data(const void *p, const hid_item_t *h) { const unsigned char *buf; @@ -68,12 +68,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) { unsigned char *buf; unsigned int hpos; unsigned int hsize; - int i, end, offs, mask; + uint32_t mask; + int i; + int end; + int offs; buf = p; hpos = h->pos; /* bit position of data */ Modified: stable/8/lib/libusbhid/usbhid.h ============================================================================== --- stable/8/lib/libusbhid/usbhid.h Tue May 18 02:31:37 2010 (r208247) +++ stable/8/lib/libusbhid/usbhid.h Tue May 18 03:16:02 2010 (r208248) @@ -30,6 +30,7 @@ */ #include +#include typedef struct report_desc *report_desc_t; @@ -105,7 +106,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-stable-8@FreeBSD.ORG Tue May 18 04:20:36 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2AEFC106566C; Tue, 18 May 2010 04:20:36 +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 F35598FC17; Tue, 18 May 2010 04:20: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 o4I4KZ7M037208; Tue, 18 May 2010 04:20:35 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4I4KZjE037205; Tue, 18 May 2010 04:20:35 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201005180420.o4I4KZjE037205@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Tue, 18 May 2010 04:20:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208251 - in stable/8/sys: kern net X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 May 2010 04:20:36 -0000 Author: bz Date: Tue May 18 04:20:35 2010 New Revision: 208251 URL: http://svn.freebsd.org/changeset/base/208251 Log: MFC r208100: 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. Discussed with: jeff, rwatson (briefly) Reviewed by: jeff Sponsored by: The FreeBSD Foundation Sponsored by: CK Software GmbH Modified: stable/8/sys/kern/subr_pcpu.c stable/8/sys/net/vnet.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/kern/subr_pcpu.c ============================================================================== --- stable/8/sys/kern/subr_pcpu.c Tue May 18 04:08:58 2010 (r208250) +++ stable/8/sys/kern/subr_pcpu.c Tue May 18 04:20:35 2010 (r208251) @@ -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: stable/8/sys/net/vnet.c ============================================================================== --- stable/8/sys/net/vnet.c Tue May 18 04:08:58 2010 (r208250) +++ stable/8/sys/net/vnet.c Tue May 18 04:20:35 2010 (r208251) @@ -357,7 +357,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-stable-8@FreeBSD.ORG Tue May 18 04:21:50 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7D323106564A; Tue, 18 May 2010 04:21:50 +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 6B4A98FC1A; Tue, 18 May 2010 04:21: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 o4I4Lolw037506; Tue, 18 May 2010 04:21:50 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4I4LoxN037504; Tue, 18 May 2010 04:21:50 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201005180421.o4I4LoxN037504@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Tue, 18 May 2010 04:21:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208252 - stable/8/sbin/ifconfig X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 May 2010 04:21:50 -0000 Author: bz Date: Tue May 18 04:21:50 2010 New Revision: 208252 URL: http://svn.freebsd.org/changeset/base/208252 Log: MFC r208077: Document the 'short preamble' capability for 802.11bg. Reviewed by: sam Modified: stable/8/sbin/ifconfig/ifconfig.8 Directory Properties: stable/8/sbin/ifconfig/ (props changed) Modified: stable/8/sbin/ifconfig/ifconfig.8 ============================================================================== --- stable/8/sbin/ifconfig/ifconfig.8 Tue May 18 04:20:35 2010 (r208251) +++ stable/8/sbin/ifconfig/ifconfig.8 Tue May 18 04:21:50 2010 (r208252) @@ -28,7 +28,7 @@ .\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94 .\" $FreeBSD$ .\" -.Dd February 20, 2010 +.Dd May 14, 2010 .Dt IFCONFIG 8 .Os .Sh NAME @@ -1278,6 +1278,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 @@ -1352,6 +1356,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-stable-8@FreeBSD.ORG Tue May 18 07:45:28 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3D44C1065670; Tue, 18 May 2010 07:45:28 +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 299678FC15; Tue, 18 May 2010 07:45: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 o4I7jS7k082306; Tue, 18 May 2010 07:45:28 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4I7jSF5082301; Tue, 18 May 2010 07:45:28 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201005180745.o4I7jSF5082301@svn.freebsd.org> From: Martin Matuska Date: Tue, 18 May 2010 07:45:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208255 - in stable/8: cddl/contrib/opensolaris/cmd/zfs sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 May 2010 07:45:28 -0000 Author: mm Date: Tue May 18 07:45:27 2010 New Revision: 208255 URL: http://svn.freebsd.org/changeset/base/208255 Log: MFC r207626, r207627: MFC r207626: Speed up ZFS list operation with objset prefetching. MFC r207627: Enable "zfs list" to list explicitly requested snapshots. OpenSolaris onnv revisions: 8415:8809e849f63e, 10474:0e96dd3b905a (partial) PR: kern/146297 Approved by: pjd, delphij (mentor) Obtained from: OpenSolaris (Bug ID 6386929, 6758338, 6755389, 6847118) Modified: stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_objset.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Directory Properties: stable/8/cddl/contrib/opensolaris/ (props changed) stable/8/cddl/contrib/opensolaris/cmd/zdb/ (props changed) stable/8/cddl/contrib/opensolaris/cmd/zfs/ (props changed) stable/8/cddl/contrib/opensolaris/lib/libzfs/ (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c ============================================================================== --- stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Tue May 18 05:18:21 2010 (r208254) +++ stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Tue May 18 07:45:27 2010 (r208255) @@ -1790,7 +1790,7 @@ zfs_do_list(int argc, char **argv) boolean_t scripted = B_FALSE; static char default_fields[] = "name,used,available,referenced,mountpoint"; - int types = ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME; + int types = ZFS_TYPE_DATASET; boolean_t types_specified = B_FALSE; char *fields = NULL; list_cbdata_t cb = { 0 }; Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c Tue May 18 05:18:21 2010 (r208254) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c Tue May 18 07:45:27 2010 (r208255) @@ -1213,6 +1213,39 @@ dmu_objset_find_spa(spa_t *spa, const ch return (err); } +/* ARGSUSED */ +int +dmu_objset_prefetch(char *name, void *arg) +{ + dsl_dataset_t *ds; + + if (dsl_dataset_hold(name, FTAG, &ds)) + return (0); + + if (!BP_IS_HOLE(&ds->ds_phys->ds_bp)) { + mutex_enter(&ds->ds_opening_lock); + if (!dsl_dataset_get_user_ptr(ds)) { + uint32_t aflags = ARC_NOWAIT | ARC_PREFETCH; + zbookmark_t zb; + + zb.zb_objset = ds->ds_object; + zb.zb_object = 0; + zb.zb_level = -1; + zb.zb_blkid = 0; + + (void) arc_read_nolock(NULL, dsl_dataset_get_spa(ds), + &ds->ds_phys->ds_bp, NULL, NULL, + ZIO_PRIORITY_ASYNC_READ, + ZIO_FLAG_CANFAIL | ZIO_FLAG_SPECULATIVE, + &aflags, &zb); + } + mutex_exit(&ds->ds_opening_lock); + } + + dsl_dataset_rele(ds, FTAG); + return (0); +} + void dmu_objset_set_user(objset_t *os, void *user_ptr) { Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_objset.h ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_objset.h Tue May 18 05:18:21 2010 (r208254) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_objset.h Tue May 18 07:45:27 2010 (r208255) @@ -26,8 +26,6 @@ #ifndef _SYS_DMU_OBJSET_H #define _SYS_DMU_OBJSET_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include #include #include @@ -118,6 +116,7 @@ int dmu_objset_find(char *name, int func int flags); int dmu_objset_find_spa(spa_t *spa, const char *name, int func(spa_t *, uint64_t, const char *, void *), void *arg, int flags); +int dmu_objset_prefetch(char *name, void *arg); void dmu_objset_byteswap(void *buf, size_t size); int dmu_objset_evict_dbufs(objset_t *os); Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Tue May 18 05:18:21 2010 (r208254) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Tue May 18 07:45:27 2010 (r208255) @@ -1349,6 +1349,14 @@ zfs_ioc_dataset_list_next(zfs_cmd_t *zc) (void) strlcat(zc->zc_name, "/", sizeof (zc->zc_name)); p = zc->zc_name + strlen(zc->zc_name); + if (zc->zc_cookie == 0) { + uint64_t cookie = 0; + int len = sizeof (zc->zc_name) - (p - zc->zc_name); + + while (dmu_dir_list_next(os, len, p, NULL, &cookie) == 0) + dmu_objset_prefetch(p, NULL); + } + do { error = dmu_dir_list_next(os, sizeof (zc->zc_name) - (p - zc->zc_name), p, @@ -1387,6 +1395,9 @@ zfs_ioc_snapshot_list_next(zfs_cmd_t *zc objset_t *os; int error; + if (zc->zc_cookie == 0) + dmu_objset_find(zc->zc_name, dmu_objset_prefetch, + NULL, DS_FIND_SNAPSHOTS); error = dmu_objset_open(zc->zc_name, DMU_OST_ANY, DS_MODE_USER | DS_MODE_READONLY, &os); if (error) From owner-svn-src-stable-8@FreeBSD.ORG Tue May 18 09:59:10 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5DDF3106564A; Tue, 18 May 2010 09:59:10 +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 4A7C28FC14; Tue, 18 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 o4I9xA5N012278; Tue, 18 May 2010 09:59:10 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4I9xAsu012265; Tue, 18 May 2010 09:59:10 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201005180959.o4I9xAsu012265@svn.freebsd.org> From: Martin Matuska Date: Tue, 18 May 2010 09:59:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208258 - in stable/8: contrib/top etc/mtree lib lib/liblzma lib/libusb share/mk usr.bin usr.bin/less usr.bin/lzmainfo usr.bin/xz usr.bin/xzdec X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 May 2010 09:59:10 -0000 Author: mm Date: Tue May 18 09:59:09 2010 New Revision: 208258 URL: http://svn.freebsd.org/changeset/base/208258 Log: MFC r207842, r207844, r208099: MFC r207842: Import of liblzma, xz, xzdec, lzmainfo from vendor branch Add support for xz and lzma to lesspipe.sh (xzless, lzless) MFC r207844: Add two public headers missing in r207842 Adjust CFLAGS for lzmainfo, xz, xzdec MFC r208099: Add versioned symbols to liblzma Use default SHLIB_MAJOR. Approved by: delphij (mentor) Added: - copied from r207842, head/contrib/xz/ - copied from r207842, head/lib/liblzma/ stable/8/lib/liblzma/Symbol.map - copied unchanged from r208099, head/lib/liblzma/Symbol.map stable/8/lib/liblzma/Versions.def - copied unchanged from r208099, head/lib/liblzma/Versions.def stable/8/usr.bin/lzmainfo/ - copied from r207842, head/usr.bin/lzmainfo/ stable/8/usr.bin/xz/ - copied from r207842, head/usr.bin/xz/ stable/8/usr.bin/xzdec/ - copied from r207842, head/usr.bin/xzdec/ Directory Properties: stable/8/contrib/xz/ (props changed) stable/8/lib/liblzma/ (props changed) Modified: stable/8/etc/mtree/BSD.include.dist stable/8/lib/Makefile stable/8/lib/liblzma/Makefile stable/8/share/mk/bsd.libnames.mk stable/8/usr.bin/Makefile stable/8/usr.bin/less/Makefile stable/8/usr.bin/less/lesspipe.sh stable/8/usr.bin/lzmainfo/Makefile stable/8/usr.bin/xz/Makefile stable/8/usr.bin/xzdec/Makefile Directory Properties: stable/8/contrib/ (props changed) stable/8/contrib/bind9/ (props changed) stable/8/contrib/bsnmp/ (props changed) stable/8/contrib/bzip2/ (props changed) stable/8/contrib/csup/ (props changed) stable/8/contrib/ee/ (props changed) stable/8/contrib/expat/ (props changed) stable/8/contrib/file/ (props changed) stable/8/contrib/gcc/ (props changed) stable/8/contrib/gdb/ (props changed) stable/8/contrib/gdtoa/ (props changed) stable/8/contrib/groff/ (props changed) stable/8/contrib/less/ (props changed) stable/8/contrib/libpcap/ (props changed) stable/8/contrib/ncurses/ (props changed) stable/8/contrib/netcat/ (props changed) stable/8/contrib/ntp/ (props changed) stable/8/contrib/one-true-awk/ (props changed) stable/8/contrib/openbsm/ (props changed) stable/8/contrib/openpam/ (props changed) stable/8/contrib/pf/ (props changed) stable/8/contrib/sendmail/ (props changed) stable/8/contrib/tcp_wrappers/ (props changed) stable/8/contrib/tcpdump/ (props changed) stable/8/contrib/tcsh/ (props changed) stable/8/contrib/telnet/ (props changed) stable/8/contrib/top/ (props changed) stable/8/contrib/top/install-sh (props changed) stable/8/contrib/traceroute/ (props changed) stable/8/contrib/wpa/ (props changed) stable/8/etc/ (props changed) stable/8/lib/ (props changed) stable/8/lib/bind/ (props changed) stable/8/lib/csu/ (props changed) stable/8/lib/libarchive/ (props changed) stable/8/lib/libbluetooth/ (props changed) stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) stable/8/lib/libc_r/ (props changed) stable/8/lib/libdevinfo/ (props changed) stable/8/lib/libdisk/ (props changed) stable/8/lib/libelf/ (props changed) stable/8/lib/libexpat/ (props changed) stable/8/lib/libfetch/ (props changed) stable/8/lib/libgpib/ (props changed) stable/8/lib/libgssapi/ (props changed) stable/8/lib/libjail/ (props changed) stable/8/lib/libkse/ (props changed) stable/8/lib/libkvm/ (props changed) stable/8/lib/libpam/ (props changed) stable/8/lib/libpmc/ (props changed) stable/8/lib/libradius/ (props changed) stable/8/lib/librpcsec_gss/ (props changed) stable/8/lib/libsm/ (props changed) stable/8/lib/libstand/ (props changed) stable/8/lib/libtacplus/ (props changed) stable/8/lib/libthr/ (props changed) stable/8/lib/libufs/ (props changed) stable/8/lib/libusb/ (props changed) stable/8/lib/libusb/usb.h (props changed) stable/8/lib/libusbhid/ (props changed) stable/8/lib/libutil/ (props changed) stable/8/lib/libz/ (props changed) stable/8/lib/libz/contrib/ (props changed) stable/8/lib/msun/ (props changed) stable/8/share/mk/ (props changed) stable/8/usr.bin/ (props changed) stable/8/usr.bin/awk/ (props changed) stable/8/usr.bin/biff/ (props changed) stable/8/usr.bin/calendar/ (props changed) stable/8/usr.bin/catman/ (props changed) stable/8/usr.bin/comm/ (props changed) stable/8/usr.bin/cpio/ (props changed) stable/8/usr.bin/csup/ (props changed) stable/8/usr.bin/fetch/ (props changed) stable/8/usr.bin/find/ (props changed) stable/8/usr.bin/finger/ (props changed) stable/8/usr.bin/fstat/ (props changed) stable/8/usr.bin/gcore/ (props changed) stable/8/usr.bin/gzip/ (props changed) stable/8/usr.bin/hexdump/ (props changed) stable/8/usr.bin/indent/ (props changed) stable/8/usr.bin/kdump/ (props changed) stable/8/usr.bin/locale/ (props changed) stable/8/usr.bin/look/ (props changed) stable/8/usr.bin/makewhatis/ (props changed) stable/8/usr.bin/minigzip/ (props changed) stable/8/usr.bin/netstat/ (props changed) stable/8/usr.bin/pathchk/ (props changed) stable/8/usr.bin/perror/ (props changed) stable/8/usr.bin/procstat/ (props changed) stable/8/usr.bin/script/ (props changed) stable/8/usr.bin/sockstat/ (props changed) stable/8/usr.bin/stat/ (props changed) stable/8/usr.bin/systat/ (props changed) stable/8/usr.bin/tftp/ (props changed) stable/8/usr.bin/touch/ (props changed) stable/8/usr.bin/truss/ (props changed) stable/8/usr.bin/unifdef/ (props changed) stable/8/usr.bin/uniq/ (props changed) stable/8/usr.bin/unzip/ (props changed) stable/8/usr.bin/vmstat/ (props changed) stable/8/usr.bin/w/ (props changed) stable/8/usr.bin/whois/ (props changed) stable/8/usr.bin/xlint/ (props changed) Modified: stable/8/etc/mtree/BSD.include.dist ============================================================================== --- stable/8/etc/mtree/BSD.include.dist Tue May 18 09:15:26 2010 (r208257) +++ stable/8/etc/mtree/BSD.include.dist Tue May 18 09:59:09 2010 (r208258) @@ -205,6 +205,8 @@ .. lwres .. + lzma + .. machine pc .. Modified: stable/8/lib/Makefile ============================================================================== --- stable/8/lib/Makefile Tue May 18 09:15:26 2010 (r208257) +++ stable/8/lib/Makefile Tue May 18 09:59:09 2010 (r208258) @@ -75,6 +75,7 @@ SUBDIR= ${SUBDIR_ORDERED} \ ${_libipx} \ libjail \ libkiconv \ + liblzma \ libmagic \ libmemstat \ ${_libmilter} \ Modified: stable/8/lib/liblzma/Makefile ============================================================================== --- head/lib/liblzma/Makefile Mon May 10 06:59:50 2010 (r207842) +++ stable/8/lib/liblzma/Makefile Tue May 18 09:59:09 2010 (r208258) @@ -1,7 +1,6 @@ # $FreeBSD$ -LIB= lzma -SHLIB_MAJOR= 0 +LIB= lzma LZMADIR= ${.CURDIR}/../../contrib/xz/src/liblzma .PATH: ${LZMADIR}/../common @@ -19,6 +18,8 @@ LZMAINCS+= base.h \ container.h \ delta.h \ filter.h \ + hardware.h \ + index.h \ index_hash.h \ lzma.h \ stream_flags.h \ @@ -120,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 \ @@ -132,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 Copied: stable/8/lib/liblzma/Symbol.map (from r208099, head/lib/liblzma/Symbol.map) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/lib/liblzma/Symbol.map Tue May 18 09:59:09 2010 (r208258, copy of r208099, head/lib/liblzma/Symbol.map) @@ -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; +}; Copied: stable/8/lib/liblzma/Versions.def (from r208099, head/lib/liblzma/Versions.def) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/lib/liblzma/Versions.def Tue May 18 09:59:09 2010 (r208258, copy of r208099, head/lib/liblzma/Versions.def) @@ -0,0 +1,9 @@ +# $FreeBSD$ + +XZ_5.0 { +}; + + +XZprivate_1.0 { +} XZ_5.0; + Modified: stable/8/share/mk/bsd.libnames.mk ============================================================================== --- stable/8/share/mk/bsd.libnames.mk Tue May 18 09:15:26 2010 (r208257) +++ stable/8/share/mk/bsd.libnames.mk Tue May 18 09:59:09 2010 (r208258) @@ -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: stable/8/usr.bin/Makefile ============================================================================== --- stable/8/usr.bin/Makefile Tue May 18 09:15:26 2010 (r208257) +++ stable/8/usr.bin/Makefile Tue May 18 09:59:09 2010 (r208258) @@ -114,6 +114,7 @@ SUBDIR= alias \ look \ lorder \ lsvfs \ + lzmainfo \ m4 \ ${_mail} \ ${_make} \ @@ -228,6 +229,8 @@ SUBDIR= alias \ xinstall \ ${_xlint} \ ${_xstr} \ + xz \ + xzdec \ ${_yacc} \ yes \ ${_ypcat} \ Modified: stable/8/usr.bin/less/Makefile ============================================================================== --- stable/8/usr.bin/less/Makefile Tue May 18 09:15:26 2010 (r208257) +++ stable/8/usr.bin/less/Makefile Tue May 18 09:59:09 2010 (r208258) @@ -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: stable/8/usr.bin/less/lesspipe.sh ============================================================================== --- stable/8/usr.bin/less/lesspipe.sh Tue May 18 09:15:26 2010 (r208257) +++ stable/8/usr.bin/less/lesspipe.sh Tue May 18 09:59:09 2010 (r208258) @@ -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 Modified: stable/8/usr.bin/lzmainfo/Makefile ============================================================================== --- head/usr.bin/lzmainfo/Makefile Mon May 10 06:59:50 2010 (r207842) +++ stable/8/usr.bin/lzmainfo/Makefile Tue May 18 09:59:09 2010 (r208258) @@ -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: stable/8/usr.bin/xz/Makefile ============================================================================== --- head/usr.bin/xz/Makefile Mon May 10 06:59:50 2010 (r207842) +++ stable/8/usr.bin/xz/Makefile Tue May 18 09:59:09 2010 (r208258) @@ -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: stable/8/usr.bin/xzdec/Makefile ============================================================================== --- head/usr.bin/xzdec/Makefile Mon May 10 06:59:50 2010 (r207842) +++ stable/8/usr.bin/xzdec/Makefile Tue May 18 09:59:09 2010 (r208258) @@ -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-stable-8@FreeBSD.ORG Tue May 18 10:02:46 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2431C1065672; Tue, 18 May 2010 10:02:46 +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 136C48FC0A; Tue, 18 May 2010 10:02: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 o4IA2jFU013156; Tue, 18 May 2010 10:02:45 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4IA2j4m013154; Tue, 18 May 2010 10:02:45 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201005181002.o4IA2j4m013154@svn.freebsd.org> From: Martin Matuska Date: Tue, 18 May 2010 10:02:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208259 - stable/8/sys/sys X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 May 2010 10:02:46 -0000 Author: mm Date: Tue May 18 10:02:45 2010 New Revision: 208259 URL: http://svn.freebsd.org/changeset/base/208259 Log: Bump __FreeBSD_version for liblzma addition. Approved by: delphij (mentor) Modified: stable/8/sys/sys/param.h Modified: stable/8/sys/sys/param.h ============================================================================== --- stable/8/sys/sys/param.h Tue May 18 09:59:09 2010 (r208258) +++ stable/8/sys/sys/param.h Tue May 18 10:02:45 2010 (r208259) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 800504 /* Master, propagated to newvers */ +#define __FreeBSD_version 800505 /* Master, propagated to newvers */ #ifndef LOCORE #include From owner-svn-src-stable-8@FreeBSD.ORG Tue May 18 10:24:23 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 75B861065674; Tue, 18 May 2010 10:24:23 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6310C8FC0A; Tue, 18 May 2010 10:24: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 o4IAONSD018196; Tue, 18 May 2010 10:24:23 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4IAONxH018158; Tue, 18 May 2010 10:24:23 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201005181024.o4IAONxH018158@svn.freebsd.org> From: Attilio Rao Date: Tue, 18 May 2010 10:24:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208261 - in stable/8/sys: arm/include ddb kern sys X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 May 2010 10:24:23 -0000 Author: attilio Date: Tue May 18 10:24:23 2010 New Revision: 208261 URL: http://svn.freebsd.org/changeset/base/208261 Log: MFC r207922, r207925, r207929, r208052: - Change the db_printf return value in order to catch up with printf - Make witness_list_locks() and witness_display_spinlock() accept callbacks for printf-like functions in order to queue the output on the correct channel. Modified: stable/8/sys/arm/include/disassem.h stable/8/sys/ddb/db_output.c stable/8/sys/ddb/ddb.h stable/8/sys/kern/kern_mutex.c stable/8/sys/kern/subr_pcpu.c stable/8/sys/kern/subr_witness.c stable/8/sys/sys/lock.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/arm/include/disassem.h ============================================================================== --- stable/8/sys/arm/include/disassem.h Tue May 18 10:21:49 2010 (r208260) +++ stable/8/sys/arm/include/disassem.h Tue May 18 10:24:23 2010 (r208261) @@ -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 */ Modified: stable/8/sys/ddb/db_output.c ============================================================================== --- stable/8/sys/ddb/db_output.c Tue May 18 10:21:49 2010 (r208260) +++ stable/8/sys/ddb/db_output.c Tue May 18 10:24:23 2010 (r208261) @@ -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: stable/8/sys/ddb/ddb.h ============================================================================== --- stable/8/sys/ddb/ddb.h Tue May 18 10:21:49 2010 (r208260) +++ stable/8/sys/ddb/ddb.h Tue May 18 10:24:23 2010 (r208261) @@ -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: stable/8/sys/kern/kern_mutex.c ============================================================================== --- stable/8/sys/kern/kern_mutex.c Tue May 18 10:21:49 2010 (r208260) +++ stable/8/sys/kern/kern_mutex.c Tue May 18 10:24:23 2010 (r208261) @@ -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: stable/8/sys/kern/subr_pcpu.c ============================================================================== --- stable/8/sys/kern/subr_pcpu.c Tue May 18 10:21:49 2010 (r208260) +++ stable/8/sys/kern/subr_pcpu.c Tue May 18 10:24:23 2010 (r208261) @@ -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: stable/8/sys/kern/subr_witness.c ============================================================================== --- stable/8/sys/kern/subr_witness.c Tue May 18 10:21:49 2010 (r208260) +++ stable/8/sys/kern/subr_witness.c Tue May 18 10:24:23 2010 (r208261) @@ -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); @@ -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 @@ -905,7 +906,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; @@ -935,7 +936,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; @@ -950,7 +951,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; @@ -1594,7 +1595,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); @@ -1643,7 +1644,7 @@ witness_warn(int flags, struct lock_obje printf(" locks held:\n"); } n++; - witness_list_lock(lock1); + witness_list_lock(lock1, printf); } /* @@ -1674,7 +1675,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) @@ -2060,16 +2061,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); } @@ -2098,7 +2100,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; @@ -2106,7 +2109,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); @@ -2120,7 +2123,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; @@ -2130,7 +2134,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 @@ -2303,7 +2307,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 @@ -2319,7 +2323,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: stable/8/sys/sys/lock.h ============================================================================== --- stable/8/sys/sys/lock.h Tue May 18 10:21:49 2010 (r208260) +++ stable/8/sys/sys/lock.h Tue May 18 10:24:23 2010 (r208261) @@ -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,17 +205,19 @@ 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); 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-stable-8@FreeBSD.ORG Tue May 18 10:32:20 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7F1201065673; Tue, 18 May 2010 10:32:20 +0000 (UTC) (envelope-from kaiw@FreeBSD.org) Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6CC088FC0C; Tue, 18 May 2010 10:32: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 o4IAWKHt019979; Tue, 18 May 2010 10:32:20 GMT (envelope-from kaiw@svn.freebsd.org) Received: (from kaiw@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4IAWK50019971; Tue, 18 May 2010 10:32:20 GMT (envelope-from kaiw@svn.freebsd.org) Message-Id: <201005181032.o4IAWK50019971@svn.freebsd.org> From: Kai Wang Date: Tue, 18 May 2010 10:32:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208262 - in stable/8: lib/libusbhid usr.sbin/bluetooth/bthidd X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 May 2010 10:32:20 -0000 Author: kaiw Date: Tue May 18 10:32:20 2010 New Revision: 208262 URL: http://svn.freebsd.org/changeset/base/208262 Log: MFC r205728 Merge improvements from kernel HID parser to the userland usbhid(3) parser. This merge does not change any API and should not break any native or thirdparty applications. Changes include: * Merge multiple report ID support and other improvements from kernel HID parser. * Ignore rid argument in hid_start_parser, parse all the report items since we now support multiple report ID. * Skip report ID byte in hid_get_data() and set report ID byte in hid_set_data(), if report ID is non-zero. * Reimplement hid_get_report_id: instead get report id from uhid device (which is always 0), try parsing the report descriptor and return the first report ID encountered. MFC r207812 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. Modified: stable/8/lib/libusbhid/data.c stable/8/lib/libusbhid/descr.c stable/8/lib/libusbhid/parse.c stable/8/lib/libusbhid/usage.c stable/8/lib/libusbhid/usbhid.h stable/8/lib/libusbhid/usbvar.h stable/8/usr.sbin/bluetooth/bthidd/hid.c Directory Properties: stable/8/lib/libusbhid/ (props changed) stable/8/usr.sbin/bluetooth/ (props changed) Modified: stable/8/lib/libusbhid/data.c ============================================================================== --- stable/8/lib/libusbhid/data.c Tue May 18 10:24:23 2010 (r208261) +++ stable/8/lib/libusbhid/data.c Tue May 18 10:32:20 2010 (r208262) @@ -29,6 +29,7 @@ #include __FBSDID("$FreeBSD$"); +#include #include #include #include "usbhid.h" @@ -36,18 +37,27 @@ __FBSDID("$FreeBSD$"); int32_t hid_get_data(const void *p, const hid_item_t *h) { - const unsigned char *buf; - unsigned int hpos; - unsigned int hsize; - int data; + const uint8_t *buf; + uint32_t hpos; + uint32_t hsize; + uint32_t data; int i, end, offs; buf = p; + + /* Skip report ID byte. */ + if (h->report_ID > 0) + buf++; + hpos = h->pos; /* bit position of data */ hsize = h->report_size; /* bit length of data */ + /* Range check and limit */ if (hsize == 0) return (0); + if (hsize > 32) + hsize = 32; + offs = hpos / 8; end = (hpos + hsize) / 8 - offs; data = 0; @@ -70,15 +80,20 @@ hid_get_data(const void *p, const hid_it void hid_set_data(void *p, const hid_item_t *h, int32_t data) { - unsigned char *buf; - unsigned int hpos; - unsigned int hsize; + uint8_t *buf; + uint32_t hpos; + uint32_t hsize; uint32_t mask; int i; int end; int offs; buf = p; + + /* Set report ID byte. */ + if (h->report_ID > 0) + *buf++ = h->report_ID & 0xff; + hpos = h->pos; /* bit position of data */ hsize = h->report_size; /* bit length of data */ @@ -97,5 +112,5 @@ hid_set_data(void *p, const hid_item_t * for (i = 0; i <= end; i++) buf[offs + i] = (buf[offs + i] & (mask >> (i*8))) | - ((data >> (i*8)) & 0xff); + ((data >> (i*8)) & 0xff); } Modified: stable/8/lib/libusbhid/descr.c ============================================================================== --- stable/8/lib/libusbhid/descr.c Tue May 18 10:24:23 2010 (r208261) +++ stable/8/lib/libusbhid/descr.c Tue May 18 10:32:20 2010 (r208262) @@ -38,7 +38,6 @@ __FBSDID("$FreeBSD$"); #include #include #include - #include #include "usbhid.h" @@ -59,9 +58,30 @@ hid_set_immed(int fd, int enable) int hid_get_report_id(int fd) { + report_desc_t rep; + hid_data_t d; + hid_item_t h; + int kindset; int temp = -1; int ret; + if ((rep = hid_get_report_desc(fd)) == NULL) + goto use_ioctl; + kindset = 1 << hid_input | 1 << hid_output | 1 << hid_feature; + for (d = hid_start_parse(rep, kindset, 0); hid_get_item(d, &h); ) { + /* Return the first report ID we met. */ + if (h.report_ID != 0) { + temp = h.report_ID; + break; + } + } + hid_end_parse(d); + hid_dispose_report_desc(rep); + + if (temp > 0) + return (temp); + +use_ioctl: ret = ioctl(fd, USB_GET_REPORT_ID, &temp); #ifdef HID_COMPAT7 if (ret < 0) Modified: stable/8/lib/libusbhid/parse.c ============================================================================== --- stable/8/lib/libusbhid/parse.c Tue May 18 10:24:23 2010 (r208261) +++ stable/8/lib/libusbhid/parse.c Tue May 18 10:32:20 2010 (r208262) @@ -40,42 +40,43 @@ __FBSDID("$FreeBSD$"); #include "usbhid.h" #include "usbvar.h" -#define MAXUSAGE 100 -struct hid_data { - u_char *start; - u_char *end; - u_char *p; - hid_item_t cur; - unsigned int usages[MAXUSAGE]; - int nusage; - int minset; - int logminsize; - int multi; - int multimax; - int kindset; - int reportid; - - /* - * The start of collection item has no report ID set, so save - * it until we know the ID. - */ - hid_item_t savedcoll; - u_char hassavedcoll; - /* - * Absolute data position (bits) for input/output/feature. - * Assumes that hid_input, hid_output and hid_feature have - * values 0, 1 and 2. - */ - unsigned int kindpos[3]; +#define MAXUSAGE 100 +#define MAXPUSH 4 +#define MAXID 64 + +struct hid_pos_data { + int32_t rid; + uint32_t pos; }; -static int min(int x, int y) { return x < y ? x : y; } - -static int hid_get_item_raw(hid_data_t s, hid_item_t *h); +struct hid_data { + const uint8_t *start; + const uint8_t *end; + const uint8_t *p; + struct hid_item cur[MAXPUSH]; + struct hid_pos_data last_pos[MAXID]; + int32_t usages_min[MAXUSAGE]; + int32_t usages_max[MAXUSAGE]; + int32_t usage_last; /* last seen usage */ + uint32_t loc_size; /* last seen size */ + uint32_t loc_count; /* last seen count */ + uint8_t kindset; /* we have 5 kinds so 8 bits are enough */ + uint8_t pushlevel; /* current pushlevel */ + uint8_t ncount; /* end usage item count */ + uint8_t icount; /* current usage item count */ + uint8_t nusage; /* end "usages_min/max" index */ + uint8_t iusage; /* current "usages_min/max" index */ + uint8_t ousage; /* current "usages_min/max" offset */ + uint8_t susage; /* usage set flags */ +}; +/*------------------------------------------------------------------------* + * hid_clear_local + *------------------------------------------------------------------------*/ static void hid_clear_local(hid_item_t *c) { + c->usage = 0; c->usage_minimum = 0; c->usage_maximum = 0; @@ -88,8 +89,61 @@ hid_clear_local(hid_item_t *c) c->set_delimiter = 0; } +static void +hid_switch_rid(struct hid_data *s, struct hid_item *c, int32_t next_rID) +{ + uint8_t i; + + /* check for same report ID - optimise */ + + if (c->report_ID == next_rID) + return; + + /* save current position for current rID */ + + if (c->report_ID == 0) { + i = 0; + } else { + for (i = 1; i != MAXID; i++) { + if (s->last_pos[i].rid == c->report_ID) + break; + if (s->last_pos[i].rid == 0) + break; + } + } + if (i != MAXID) { + s->last_pos[i].rid = c->report_ID; + s->last_pos[i].pos = c->pos; + } + + /* store next report ID */ + + c->report_ID = next_rID; + + /* lookup last position for next rID */ + + if (next_rID == 0) { + i = 0; + } else { + for (i = 1; i != MAXID; i++) { + if (s->last_pos[i].rid == next_rID) + break; + if (s->last_pos[i].rid == 0) + break; + } + } + if (i != MAXID) { + s->last_pos[i].rid = next_rID; + c->pos = s->last_pos[i].pos; + } else + c->pos = 0; /* Out of RID entries. */ +} + +/*------------------------------------------------------------------------* + * hid_start_parse + *------------------------------------------------------------------------*/ hid_data_t -hid_start_parse(report_desc_t d, int kindset, int id) +hid_start_parse(report_desc_t d, int kindset, int id __unused) { struct hid_data *s; @@ -98,213 +152,207 @@ hid_start_parse(report_desc_t d, int kin s->start = s->p = d->data; s->end = d->data + d->size; s->kindset = kindset; - s->reportid = id; - s->hassavedcoll = 0; return (s); } +/*------------------------------------------------------------------------* + * hid_end_parse + *------------------------------------------------------------------------*/ void hid_end_parse(hid_data_t s) { - while (s->cur.next) { - hid_item_t *hi = s->cur.next->next; - free(s->cur.next); - s->cur.next = hi; - } + + if (s == NULL) + return; + free(s); } -int -hid_get_item(hid_data_t s, hid_item_t *h) +/*------------------------------------------------------------------------* + * get byte from HID descriptor + *------------------------------------------------------------------------*/ +static uint8_t +hid_get_byte(struct hid_data *s, const uint16_t wSize) { - int r; + const uint8_t *ptr; + uint8_t retval; - for (;;) { - r = hid_get_item_raw(s, h); - if (r <= 0) - break; - if (h->report_ID == s->reportid || s->reportid == -1) - break; - } - return (r); -} + ptr = s->p; + + /* check if end is reached */ + if (ptr == s->end) + return (0); -#define REPORT_SAVED_COLL \ - do { \ - if (s->hassavedcoll) { \ - *h = s->savedcoll; \ - h->report_ID = c->report_ID; \ - s->hassavedcoll = 0; \ - return (1); \ - } \ - } while(/*LINTED*/ 0) + /* read out a byte */ + retval = *ptr; -static int -hid_get_item_raw(hid_data_t s, hid_item_t *h) + /* check if data pointer can be advanced by "wSize" bytes */ + if ((s->end - ptr) < wSize) + ptr = s->end; + else + ptr += wSize; + + /* update pointer */ + s->p = ptr; + + return (retval); +} + +/*------------------------------------------------------------------------* + * hid_get_item + *------------------------------------------------------------------------*/ +int +hid_get_item(hid_data_t s, hid_item_t *h) { hid_item_t *c; - unsigned int bTag = 0, bType = 0, bSize; - unsigned char *data; - int dval; - unsigned char *p; - hid_item_t *hi; - hid_item_t nc; - int i; - hid_kind_t retkind; + unsigned int bTag, bType, bSize; + uint32_t oldpos; + int32_t mask; + int32_t dval; - c = &s->cur; + if (s == NULL) + return (0); + + c = &s->cur[s->pushlevel]; top: - if (s->multimax) { - REPORT_SAVED_COLL; - if (c->logical_minimum >= c->logical_maximum) { - if (s->logminsize == 1) - c->logical_minimum =(int8_t)c->logical_minimum; - else if (s->logminsize == 2) - c->logical_minimum =(int16_t)c->logical_minimum; + /* check if there is an array of items */ + if (s->icount < s->ncount) { + /* get current usage */ + if (s->iusage < s->nusage) { + dval = s->usages_min[s->iusage] + s->ousage; + c->usage = dval; + s->usage_last = dval; + if (dval == s->usages_max[s->iusage]) { + s->iusage ++; + s->ousage = 0; + } else { + s->ousage ++; + } + } else { + /* Using last usage */ + dval = s->usage_last; } - if (s->multi < s->multimax) { - c->usage = s->usages[min(s->multi, s->nusage-1)]; - s->multi++; + s->icount ++; + /* + * Only copy HID item, increment position and return + * if correct kindset! + */ + if (s->kindset & (1 << c->kind)) { *h = *c; - /* - * 'multimax' is only non-zero if the current - * item kind is input/output/feature - */ - h->pos = s->kindpos[c->kind]; - s->kindpos[c->kind] += c->report_size; - h->next = 0; + c->pos += c->report_size * c->report_count; return (1); - } else { - c->report_count = s->multimax; - s->multimax = 0; - s->nusage = 0; - hid_clear_local(c); } } - for (;;) { - p = s->p; - if (p >= s->end) - return (0); - bSize = *p++; + /* reset state variables */ + s->icount = 0; + s->ncount = 0; + s->iusage = 0; + s->nusage = 0; + s->susage = 0; + s->ousage = 0; + hid_clear_local(c); + + /* get next item */ + while (s->p != s->end) { + + bSize = hid_get_byte(s, 1); if (bSize == 0xfe) { /* long item */ - bSize = *p++; - bSize |= *p++ << 8; - bTag = *p++; - data = p; - p += bSize; + bSize = hid_get_byte(s, 1); + bSize |= hid_get_byte(s, 1) << 8; + bTag = hid_get_byte(s, 1); + bType = 0xff; /* XXX what should it be */ } else { /* short item */ bTag = bSize >> 4; bType = (bSize >> 2) & 3; bSize &= 3; - if (bSize == 3) bSize = 4; - data = p; - p += bSize; + if (bSize == 3) + bSize = 4; } - s->p = p; - /* - * The spec is unclear if the data is signed or unsigned. - */ + switch(bSize) { case 0: dval = 0; + mask = 0; break; case 1: - dval = *data++; + dval = (int8_t)hid_get_byte(s, 1); + mask = 0xFF; break; case 2: - dval = *data++; - dval |= *data++ << 8; + dval = hid_get_byte(s, 1); + dval |= hid_get_byte(s, 1) << 8; + dval = (int16_t)dval; + mask = 0xFFFF; break; case 4: - dval = *data++; - dval |= *data++ << 8; - dval |= *data++ << 16; - dval |= *data++ << 24; + dval = hid_get_byte(s, 1); + dval |= hid_get_byte(s, 1) << 8; + dval |= hid_get_byte(s, 1) << 16; + dval |= hid_get_byte(s, 1) << 24; + mask = 0xFFFFFFFF; break; default: - return (-1); + dval = hid_get_byte(s, bSize); + continue; } switch (bType) { - case 0: /* Main */ + case 0: /* Main */ switch (bTag) { - case 8: /* Input */ - retkind = hid_input; - ret: - if (!(s->kindset & (1 << retkind))) { - /* Drop the items of this kind */ - s->nusage = 0; - continue; - } - c->kind = retkind; + case 8: /* Input */ + c->kind = hid_input; c->flags = dval; + ret: + c->report_count = s->loc_count; + c->report_size = s->loc_size; + if (c->flags & HIO_VARIABLE) { - s->multimax = c->report_count; - s->multi = 0; + /* range check usage count */ + if (c->report_count > 255) { + s->ncount = 255; + } else + s->ncount = c->report_count; + + /* + * The "top" loop will return + * one and one item: + */ c->report_count = 1; - if (s->minset) { - for (i = c->usage_minimum; - i <= c->usage_maximum; - i++) { - s->usages[s->nusage] = i; - if (s->nusage < MAXUSAGE-1) - s->nusage++; - } - c->usage_minimum = 0; - c->usage_maximum = 0; - s->minset = 0; - } - goto top; } else { - if (s->minset) - c->usage = c->usage_minimum; - *h = *c; - h->next = 0; - h->pos = s->kindpos[c->kind]; - s->kindpos[c->kind] += - c->report_size * c->report_count; - hid_clear_local(c); - s->minset = 0; - return (1); + s->ncount = 1; } - case 9: /* Output */ - retkind = hid_output; + goto top; + + case 9: /* Output */ + c->kind = hid_output; + c->flags = dval; goto ret; case 10: /* Collection */ c->kind = hid_collection; c->collection = dval; c->collevel++; - nc = *c; - hid_clear_local(c); - /*c->report_ID = NO_REPORT_ID;*/ - s->nusage = 0; - if (s->hassavedcoll) { - *h = s->savedcoll; - h->report_ID = nc.report_ID; - s->savedcoll = nc; - return (1); - } else { - s->hassavedcoll = 1; - s->savedcoll = nc; - } - break; + c->usage = s->usage_last; + *h = *c; + return (1); case 11: /* Feature */ - retkind = hid_feature; + c->kind = hid_feature; + c->flags = dval; goto ret; case 12: /* End collection */ - REPORT_SAVED_COLL; c->kind = hid_endcollection; + if (c->collevel == 0) { + /* Invalid end collection. */ + return (0); + } c->collevel--; *h = *c; - /*hid_clear_local(c);*/ - s->nusage = 0; return (1); default: - return (-2); + break; } break; @@ -315,13 +363,12 @@ hid_get_item_raw(hid_data_t s, hid_item_ break; case 1: c->logical_minimum = dval; - s->logminsize = bSize; break; case 2: c->logical_maximum = dval; break; case 3: - c->physical_maximum = dval; + c->physical_minimum = dval; break; case 4: c->physical_maximum = dval; @@ -333,45 +380,97 @@ hid_get_item_raw(hid_data_t s, hid_item_ c->unit = dval; break; case 7: - c->report_size = dval; + /* mask because value is unsigned */ + s->loc_size = dval & mask; break; case 8: - c->report_ID = dval; - s->kindpos[hid_input] = - s->kindpos[hid_output] = - s->kindpos[hid_feature] = 0; + hid_switch_rid(s, c, dval); break; case 9: - c->report_count = dval; + /* mask because value is unsigned */ + s->loc_count = dval & mask; break; - case 10: /* Push */ - hi = malloc(sizeof *hi); - *hi = s->cur; - c->next = hi; - break; - case 11: /* Pop */ - hi = c->next; - s->cur = *hi; - free(hi); + case 10: /* Push */ + s->pushlevel ++; + if (s->pushlevel < MAXPUSH) { + s->cur[s->pushlevel] = *c; + /* store size and count */ + c->report_size = s->loc_size; + c->report_count = s->loc_count; + /* update current item pointer */ + c = &s->cur[s->pushlevel]; + } + break; + case 11: /* Pop */ + s->pushlevel --; + if (s->pushlevel < MAXPUSH) { + /* preserve position */ + oldpos = c->pos; + c = &s->cur[s->pushlevel]; + /* restore size and count */ + s->loc_size = c->report_size; + s->loc_count = c->report_count; + /* set default item location */ + c->pos = oldpos; + c->report_size = 0; + c->report_count = 0; + } break; default: - return (-3); + break; } break; case 2: /* Local */ switch (bTag) { case 0: - c->usage = c->_usage_page | dval; - if (s->nusage < MAXUSAGE) - s->usages[s->nusage++] = c->usage; + if (bSize != 4) + dval = (dval & mask) | c->_usage_page; + + /* set last usage, in case of a collection */ + s->usage_last = dval; + + if (s->nusage < MAXUSAGE) { + s->usages_min[s->nusage] = dval; + s->usages_max[s->nusage] = dval; + s->nusage ++; + } /* else XXX */ + + /* clear any pending usage sets */ + s->susage = 0; break; case 1: - s->minset = 1; - c->usage_minimum = c->_usage_page | dval; - break; + s->susage |= 1; + + if (bSize != 4) + dval = (dval & mask) | c->_usage_page; + c->usage_minimum = dval; + + goto check_set; case 2: - c->usage_maximum = c->_usage_page | dval; + s->susage |= 2; + + if (bSize != 4) + dval = (dval & mask) | c->_usage_page; + c->usage_maximum = dval; + + check_set: + if (s->susage != 3) + break; + + /* sanity check */ + if ((s->nusage < MAXUSAGE) && + (c->usage_minimum <= c->usage_maximum)) { + /* add usage range */ + s->usages_min[s->nusage] = + c->usage_minimum; + s->usages_max[s->nusage] = + c->usage_maximum; + s->nusage ++; + } + /* else XXX */ + + s->susage = 0; break; case 3: c->designator_index = dval; @@ -395,40 +494,63 @@ hid_get_item_raw(hid_data_t s, hid_item_ c->set_delimiter = dval; break; default: - return (-4); + break; } break; default: - return (-5); + break; } } + return (0); } int hid_report_size(report_desc_t r, enum hid_kind k, int id) { struct hid_data *d; - hid_item_t h; - int size; + struct hid_item h; + uint32_t temp; + uint32_t hpos; + uint32_t lpos; + + hpos = 0; + lpos = 0xFFFFFFFF; memset(&h, 0, sizeof h); - size = 0; - for (d = hid_start_parse(r, 1<kindpos[k]; + /* compute minimum */ + if (lpos > h.pos) + lpos = h.pos; + /* compute end position */ + temp = h.pos + (h.report_size * h.report_count); + /* compute maximum */ + if (hpos < temp) + hpos = temp; } } hid_end_parse(d); - return ((size + 7) / 8); + + /* safety check - can happen in case of currupt descriptors */ + if (lpos > hpos) + temp = 0; + else + temp = hpos - lpos; + + if (id) + temp += 8; + + /* return length in bytes rounded up */ + return ((temp + 7) / 8); } int hid_locate(report_desc_t desc, unsigned int u, enum hid_kind k, hid_item_t *h, int id) { - hid_data_t d; + struct hid_data *d; - for (d = hid_start_parse(desc, 1<kind == k && !(h->flags & HIO_CONST) && h->usage == u) { hid_end_parse(d); return (1); Modified: stable/8/lib/libusbhid/usage.c ============================================================================== --- stable/8/lib/libusbhid/usage.c Tue May 18 10:24:23 2010 (r208261) +++ stable/8/lib/libusbhid/usage.c Tue May 18 10:32:20 2010 (r208262) @@ -29,6 +29,7 @@ #include __FBSDID("$FreeBSD$"); +#include #include #include #include Modified: stable/8/lib/libusbhid/usbhid.h ============================================================================== --- stable/8/lib/libusbhid/usbhid.h Tue May 18 10:24:23 2010 (r208261) +++ stable/8/lib/libusbhid/usbhid.h Tue May 18 10:32:20 2010 (r208262) @@ -29,7 +29,7 @@ * */ -#include +#include #include typedef struct report_desc *report_desc_t; @@ -37,45 +37,41 @@ typedef struct report_desc *report_desc_ typedef struct hid_data *hid_data_t; typedef enum hid_kind { - hid_input = 0, - hid_output = 1, - hid_feature = 2, - hid_collection, - hid_endcollection + hid_input, hid_output, hid_feature, hid_collection, hid_endcollection } hid_kind_t; typedef struct hid_item { /* Global */ - unsigned int _usage_page; - int logical_minimum; - int logical_maximum; - int physical_minimum; - int physical_maximum; - int unit_exponent; - int unit; - int report_size; - int report_ID; + uint32_t _usage_page; + int32_t logical_minimum; + int32_t logical_maximum; + int32_t physical_minimum; + int32_t physical_maximum; + int32_t unit_exponent; + int32_t unit; + int32_t report_size; + int32_t report_ID; #define NO_REPORT_ID 0 - int report_count; + int32_t report_count; /* Local */ - unsigned int usage; - int usage_minimum; - int usage_maximum; - int designator_index; - int designator_minimum; - int designator_maximum; - int string_index; - int string_minimum; - int string_maximum; - int set_delimiter; + uint32_t usage; + int32_t usage_minimum; + int32_t usage_maximum; + int32_t designator_index; + int32_t designator_minimum; + int32_t designator_maximum; + int32_t string_index; + int32_t string_minimum; + int32_t string_maximum; + int32_t set_delimiter; /* Misc */ - int collection; - int collevel; + int32_t collection; + int collevel; enum hid_kind kind; - unsigned int flags; - /* Absolute data position (bits) */ - unsigned int pos; - /* */ + uint32_t flags; + /* Location */ + uint32_t pos; + /* unused */ struct hid_item *next; } hid_item_t; @@ -96,7 +92,8 @@ hid_data_t hid_start_parse(report_desc_t void hid_end_parse(hid_data_t s); int hid_get_item(hid_data_t s, hid_item_t *h); int hid_report_size(report_desc_t d, enum hid_kind k, int id); -int hid_locate(report_desc_t d, unsigned int usage, enum hid_kind k, hid_item_t *h, int id); +int hid_locate(report_desc_t d, unsigned int usage, enum hid_kind k, + hid_item_t *h, int id); /* Conversion to/from usage names, usage.c: */ const char *hid_usage_page(int i); Modified: stable/8/lib/libusbhid/usbvar.h ============================================================================== --- stable/8/lib/libusbhid/usbvar.h Tue May 18 10:24:23 2010 (r208261) +++ stable/8/lib/libusbhid/usbvar.h Tue May 18 10:32:20 2010 (r208262) @@ -30,8 +30,8 @@ */ struct report_desc { - unsigned int size; - unsigned char data[1]; + uint32_t size; + uint8_t data[1]; }; /* internal backwards compatibility functions */ Modified: stable/8/usr.sbin/bluetooth/bthidd/hid.c ============================================================================== --- stable/8/usr.sbin/bluetooth/bthidd/hid.c Tue May 18 10:24:23 2010 (r208261) +++ stable/8/usr.sbin/bluetooth/bthidd/hid.c Tue May 18 10:32:20 2010 (r208262) @@ -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-stable-8@FreeBSD.ORG Tue May 18 17:02:24 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D745E106566C; Tue, 18 May 2010 17:02:24 +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 C4B628FC20; Tue, 18 May 2010 17:02: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 o4IH2OmN011737; Tue, 18 May 2010 17:02:24 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4IH2Oeg011733; Tue, 18 May 2010 17:02:24 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201005181702.o4IH2Oeg011733@svn.freebsd.org> From: Marius Strobl Date: Tue, 18 May 2010 17:02:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208266 - stable/8/sys/sparc64/pci X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 May 2010 17:02:25 -0000 Author: marius Date: Tue May 18 17:02:24 2010 New Revision: 208266 URL: http://svn.freebsd.org/changeset/base/208266 Log: MFC: r205254, r208097 - Add quirk handling for Sun Fire V1280. The firmware of these machines provides no ino-bitmap properties so forge them using the default set of controller interrupts and let schizo_setup_intr() take care of the children, hoping for non-fancy routing. - Enable DMA write parity error interrupts on Schizo with a working implementation. - Let schizo_pci_bus() only panic in case of fatal errors as the interrupt triggered by the error the firmware of Sun Fire V890 as well as 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: stable/8/sys/sparc64/pci/schizo.c stable/8/sys/sparc64/pci/schizoreg.h stable/8/sys/sparc64/pci/schizovar.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/sparc64/pci/schizo.c ============================================================================== --- stable/8/sys/sparc64/pci/schizo.c Tue May 18 17:01:07 2010 (r208265) +++ stable/8/sys/sparc64/pci/schizo.c Tue May 18 17:02:24 2010 (r208266) @@ -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). */ @@ -402,9 +418,22 @@ schizo_attach(device_t dev) */ i = OF_getprop(node, "ino-bitmap", (void *)prop_array, sizeof(prop_array)); - if (i == -1) - panic("%s: could not get ino-bitmap", __func__); - ino_bitmap = ((uint64_t)prop_array[1] << 32) | prop_array[0]; + if (i != -1) + ino_bitmap = ((uint64_t)prop_array[1] << 32) | prop_array[0]; + else { + /* + * If the ino-bitmap property is missing, just provide the + * default set of interrupts for this controller and let + * schizo_setup_intr() take care of child interrupts. + */ + if (sc->sc_half == 0) + ino_bitmap = (1ULL << STX_UE_INO) | + (1ULL << STX_CE_INO) | + (1ULL << STX_PCIERR_A_INO) | + (1ULL << STX_BUS_INO); + else + ino_bitmap = 1ULL << STX_PCIERR_B_INO; + } for (i = 0; i <= STX_MAX_INO; i++) { if ((ino_bitmap & (1ULL << i)) == 0) continue; @@ -684,6 +713,18 @@ schizo_attach(device_t dev) ofw_bus_setup_iinfo(node, &sc->sc_pci_iinfo, sizeof(ofw_pci_intr_t)); +#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)); } @@ -780,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); @@ -787,39 +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 ((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); } @@ -830,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); @@ -851,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: stable/8/sys/sparc64/pci/schizoreg.h ============================================================================== --- stable/8/sys/sparc64/pci/schizoreg.h Tue May 18 17:01:07 2010 (r208265) +++ stable/8/sys/sparc64/pci/schizoreg.h Tue May 18 17:02:24 2010 (r208266) @@ -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: stable/8/sys/sparc64/pci/schizovar.h ============================================================================== --- stable/8/sys/sparc64/pci/schizovar.h Tue May 18 17:01:07 2010 (r208265) +++ stable/8/sys/sparc64/pci/schizovar.h Tue May 18 17:02:24 2010 (r208266) @@ -70,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-stable-8@FreeBSD.ORG Tue May 18 17:09:20 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B8751106566C; Tue, 18 May 2010 17:09:20 +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 A6ED88FC20; Tue, 18 May 2010 17:09: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 o4IH9KLN013395; Tue, 18 May 2010 17:09:20 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4IH9KnB013393; Tue, 18 May 2010 17:09:20 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201005181709.o4IH9KnB013393@svn.freebsd.org> From: Marius Strobl Date: Tue, 18 May 2010 17:09:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208268 - stable/8/sys/dev/e1000 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 May 2010 17:09:20 -0000 Author: marius Date: Tue May 18 17:09:20 2010 New Revision: 208268 URL: http://svn.freebsd.org/changeset/base/208268 Log: MFC: r208117 Fix a mismerge in r206001 (MFC'ed to stable/8 in r206211). PR: 146614 Approved by: jfv (implicit) Modified: stable/8/sys/dev/e1000/if_em.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/dev/e1000/if_em.c ============================================================================== --- stable/8/sys/dev/e1000/if_em.c Tue May 18 17:02:35 2010 (r208267) +++ stable/8/sys/dev/e1000/if_em.c Tue May 18 17:09:20 2010 (r208268) @@ -705,6 +705,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); @@ -774,9 +777,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-stable-8@FreeBSD.ORG Tue May 18 17:15:41 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 039D8106564A; Tue, 18 May 2010 17:15:41 +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 DC59D8FC08; Tue, 18 May 2010 17: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 o4IHFeow014981; Tue, 18 May 2010 17:15:40 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4IHFeG0014978; Tue, 18 May 2010 17:15:40 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201005181715.o4IHFeG0014978@svn.freebsd.org> From: Marius Strobl Date: Tue, 18 May 2010 17:15:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208270 - stable/8/share/man/man4 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 May 2010 17:15:41 -0000 Author: marius Date: Tue May 18 17:15:40 2010 New Revision: 208270 URL: http://svn.freebsd.org/changeset/base/208270 Log: MFC: r208098 Document the led(4) interface to the identification LEDs. Modified: stable/8/share/man/man4/em.4 stable/8/share/man/man4/igb.4 Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/em.4 ============================================================================== --- stable/8/share/man/man4/em.4 Tue May 18 17:09:22 2010 (r208269) +++ stable/8/share/man/man4/em.4 Tue May 18 17:15:40 2010 (r208270) @@ -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: stable/8/share/man/man4/igb.4 ============================================================================== --- stable/8/share/man/man4/igb.4 Tue May 18 17:09:22 2010 (r208269) +++ stable/8/share/man/man4/igb.4 Tue May 18 17:15:40 2010 (r208270) @@ -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-stable-8@FreeBSD.ORG Tue May 18 17:43:54 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D6BC1065675; Tue, 18 May 2010 17:43:54 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3B9E08FC14; Tue, 18 May 2010 17:43:54 +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 o4IHhrQv021498; Tue, 18 May 2010 17:43:53 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4IHhrqF021496; Tue, 18 May 2010 17:43:53 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201005181743.o4IHhrqF021496@svn.freebsd.org> From: Bernhard Schmidt Date: Tue, 18 May 2010 17:43:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208272 - stable/8/sys/dev/ipw X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 May 2010 17:43:54 -0000 Author: bschmidt Date: Tue May 18 17:43:53 2010 New Revision: 208272 URL: http://svn.freebsd.org/changeset/base/208272 Log: MFC r207926: Enable 5.5 and 11Mbit TX rates. Reviewed by: sam Approved by: rpaulo (mentor) Modified: stable/8/sys/dev/ipw/if_ipw.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/dev/ipw/if_ipw.c ============================================================================== --- stable/8/sys/dev/ipw/if_ipw.c Tue May 18 17:15:41 2010 (r208271) +++ stable/8/sys/dev/ipw/if_ipw.c Tue May 18 17:43:53 2010 (r208272) @@ -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-stable-8@FreeBSD.ORG Tue May 18 18:19:07 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 27F98106564A; Tue, 18 May 2010 18:19:07 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 15BBA8FC1E; Tue, 18 May 2010 18:19: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 o4IIJ6Ts029606; Tue, 18 May 2010 18:19:06 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4IIJ6SI029603; Tue, 18 May 2010 18:19:06 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201005181819.o4IIJ6SI029603@svn.freebsd.org> From: Bruce Cran Date: Tue, 18 May 2010 18:19:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208274 - stable/8/usr.sbin/sade X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 May 2010 18:19:07 -0000 Author: brucec Date: Tue May 18 18:19:06 2010 New Revision: 208274 URL: http://svn.freebsd.org/changeset/base/208274 Log: MFC r207006: Remove the reference to DD mode, and replace "Wizard" mode with "Expert" mode. Also, make sure the "Q = Finish" text is visible. Reword the boot manager screen to try and avoid confusion, and make the order of the menu items match that in sysinstall. PR: bin/142916 Submitted by: Jeremy Chadwick Approved by: rrs (mentor) Modified: stable/8/usr.sbin/sade/disks.c stable/8/usr.sbin/sade/menus.c Directory Properties: stable/8/usr.sbin/sade/ (props changed) Modified: stable/8/usr.sbin/sade/disks.c ============================================================================== --- stable/8/usr.sbin/sade/disks.c Tue May 18 18:14:12 2010 (r208273) +++ stable/8/usr.sbin/sade/disks.c Tue May 18 18:19:06 2010 (r208274) @@ -202,10 +202,9 @@ static void print_command_summary(void) { mvprintw(14, 0, "The following commands are supported (in upper or lower case):"); - mvprintw(16, 0, "A = Use Entire Disk G = set Drive Geometry C = Create Slice F = `DD' mode"); - mvprintw(17, 0, "D = Delete Slice Z = Toggle Size Units S = Set Bootable | = Wizard m."); - mvprintw(18, 0, "T = Change Type U = Undo All Changes Q = Finish"); - mvprintw(18, 47, "W = Write Changes"); + mvprintw(16, 0, "A = Use Entire Disk G = set Drive Geometry C = Create Slice"); + mvprintw(17, 0, "D = Delete Slice Z = Toggle Size Units S = Set Bootable | = Expert m."); + mvprintw(18, 0, "T = Change Type U = Undo All Changes W = Write Changes Q = Finish"); mvprintw(21, 0, "Use F1 or ? to get more help, arrow keys to select."); move(0, 0); } Modified: stable/8/usr.sbin/sade/menus.c ============================================================================== --- stable/8/usr.sbin/sade/menus.c Tue May 18 18:14:12 2010 (r208273) +++ stable/8/usr.sbin/sade/menus.c Tue May 18 18:19:06 2010 (r208274) @@ -92,24 +92,23 @@ DMenu MenuIPLType = { DMenu MenuMBRType = { DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS, "overwrite me", /* will be disk specific label */ - "FreeBSD comes with a boot selector that allows you to easily\n" + "FreeBSD comes with a boot manager that allows you to easily\n" "select between FreeBSD and any other operating systems on your machine\n" "at boot time. If you have more than one drive and want to boot\n" - "from the second one, the boot selector will also make it possible\n" + "from the second one, the boot manager will also make it possible\n" "to do so (limitations in the PC BIOS usually prevent this otherwise).\n" - "If you do not want a boot selector, or wish to replace an existing\n" - "one, select \"standard\". If you would prefer your Master Boot\n" - "Record to remain untouched then select \"None\".\n\n" - " NOTE: PC-DOS users will almost certainly require \"None\"!", - "Press F1 to read about drive setup", + "If you have other operating systems installed and would like a choice when\n" + "booting, choose \"BootMgr\". If you would prefer to keep your existing\n" + "boot manager, select \"None\".\n\n", + "", "drives", - { { "BootMgr", "Install the FreeBSD Boot Manager", - dmenuRadioCheck, dmenuSetValue, NULL, &BootMgr, 0, 0, 0, 0 }, - { "Standard", "Install a standard MBR (no boot manager)", + { { "Standard", "Install a standard MBR (non-interactive boot manager)", dmenuRadioCheck, dmenuSetValue, NULL, &BootMgr, '(', '*', ')', 1 }, - { "None", "Leave the Master Boot Record untouched", + { "BootMgr", "Install the FreeBSD boot manager", + dmenuRadioCheck, dmenuSetValue, NULL, &BootMgr, '(', '*', ')', 0 }, + { "None", "Do not install a boot manager", dmenuRadioCheck, dmenuSetValue, NULL, &BootMgr, '(', '*', ')', 2 }, - { NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0 } }, + { NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0 } } }; #endif /* PC98 */ #endif /* __i386__ */ From owner-svn-src-stable-8@FreeBSD.ORG Tue May 18 18:20:12 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 274EA1065679; Tue, 18 May 2010 18:20:12 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0BE208FC1B; Tue, 18 May 2010 18:20: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 o4IIKBHk029897; Tue, 18 May 2010 18:20:11 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4IIKBgD029894; Tue, 18 May 2010 18:20:11 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201005181820.o4IIKBgD029894@svn.freebsd.org> From: Bruce Cran Date: Tue, 18 May 2010 18:20:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208275 - stable/8/usr.sbin/sysinstall X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 May 2010 18:20:12 -0000 Author: brucec Date: Tue May 18 18:20:11 2010 New Revision: 208275 URL: http://svn.freebsd.org/changeset/base/208275 Log: MFC r207005: Make the "Q = Finish" text visible when running sysinstall as a normal application. Reword the boot manager screen to try and avoid confusion. Approved by: rrs (mentor) Modified: stable/8/usr.sbin/sysinstall/disks.c stable/8/usr.sbin/sysinstall/menus.c Directory Properties: stable/8/usr.sbin/sysinstall/ (props changed) Modified: stable/8/usr.sbin/sysinstall/disks.c ============================================================================== --- stable/8/usr.sbin/sysinstall/disks.c Tue May 18 18:19:06 2010 (r208274) +++ stable/8/usr.sbin/sysinstall/disks.c Tue May 18 18:20:11 2010 (r208275) @@ -207,9 +207,12 @@ print_command_summary(void) mvprintw(14, 0, "The following commands are supported (in upper or lower case):"); mvprintw(16, 0, "A = Use Entire Disk G = set Drive Geometry C = Create Slice"); mvprintw(17, 0, "D = Delete Slice Z = Toggle Size Units S = Set Bootable | = Expert m."); - mvprintw(18, 0, "T = Change Type U = Undo All Changes Q = Finish"); + mvprintw(18, 0, "T = Change Type U = Undo All Changes"); + if (!RunningAsInit) - mvprintw(18, 47, "W = Write Changes"); + mvprintw(18, 47, "W = Write Changes Q = Finish"); + else + mvprintw(18, 47, "Q = Finish"); mvprintw(21, 0, "Use F1 or ? to get more help, arrow keys to select."); move(0, 0); } Modified: stable/8/usr.sbin/sysinstall/menus.c ============================================================================== --- stable/8/usr.sbin/sysinstall/menus.c Tue May 18 18:19:06 2010 (r208274) +++ stable/8/usr.sbin/sysinstall/menus.c Tue May 18 18:20:11 2010 (r208275) @@ -1179,20 +1179,16 @@ DMenu MenuMBRType = { "at boot time. If you have more than one drive and want to boot\n" "from the second one, the boot manager will also make it possible\n" "to do so (limitations in the PC BIOS usually prevent this otherwise).\n" - "If you will only have FreeBSD on the machine the boot manager is\n" - "not needed and it slows down the boot while offering you the choice\n" - "of which operating system to boot. If you do not want a boot\n" - "manager, or wish to replace an existing one, select \"standard\".\n" - "If you would prefer your Master Boot Record remain untouched then\n" - "select \"None\".\n\n" - " NOTE: PC-DOS users will almost certainly require \"None\"!", - "Press F1 to read about drive setup", + "If you have other operating systems installed and would like a choice when\n" + "booting, choose \"BootMgr\". If you would prefer to keep your existing\n" + "boot manager, select \"None\".\n\n", + "", "drives", - { { "Standard", "Install a standard MBR (no boot manager)", + { { "Standard", "Install a standard MBR (non-interactive boot manager)", dmenuRadioCheck, dmenuSetValue, NULL, &BootMgr, '(', '*', ')', 1 }, { "BootMgr", "Install the FreeBSD Boot Manager", dmenuRadioCheck, dmenuSetValue, NULL, &BootMgr, '(', '*', ')', 0 }, - { "None", "Leave the Master Boot Record untouched", + { "None", "Do not install a boot manager", dmenuRadioCheck, dmenuSetValue, NULL, &BootMgr, '(', '*', ')', 2 }, { NULL } }, }; From owner-svn-src-stable-8@FreeBSD.ORG Wed May 19 06:49:52 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D5A721065691; Wed, 19 May 2010 06:49:52 +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 BDCBB8FC1C; Wed, 19 May 2010 06:49: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 o4J6nqA4096777; Wed, 19 May 2010 06:49:52 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4J6nqlg096762; Wed, 19 May 2010 06:49:52 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201005190649.o4J6nqlg096762@svn.freebsd.org> From: Martin Matuska Date: Wed, 19 May 2010 06:49:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208288 - in stable/8: cddl/contrib/opensolaris/cmd/zpool cddl/contrib/opensolaris/cmd/ztest cddl/contrib/opensolaris/lib/libzfs/common sys/cddl/contrib/opensolaris/uts/common/fs/zfs sy... X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2010 06:49:53 -0000 Author: mm Date: Wed May 19 06:49:52 2010 New Revision: 208288 URL: http://svn.freebsd.org/changeset/base/208288 Log: MFC r207670, r208130, r208131: MFC r207670: Introduce hardforce export option (-F) for "zpool export". When exporting with this flag, zpool.cache remains untouched. OpenSolaris onnv revision: 8211:32722be6ad3b MFC r208130: Fix perfomance problem with ZFS prefetch caching [1] Add statistics for ZFS prefetch (sysctl kstat.zfs.misc.zfetchstats) OpenSolaris onnv revision: 10474:0e96dd3b905a (partial) MFC r208131: Fix deadlock between zfs_dirent_lock and zfs_rmdir OpenSolaris onnv revision: 11321:506b7043a14c Reported by: jhell@dataix.net (private e-mail) [1] Approved by: pjd, delphij (mentor) Obtained from: OpenSolaris (Bug ID: 6775357, 6859997, 6868951, 6847615) Modified: stable/8/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c stable/8/cddl/contrib/opensolaris/cmd/ztest/ztest.c stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_zfetch.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_zfetch.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_dir.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Directory Properties: stable/8/cddl/contrib/opensolaris/ (props changed) stable/8/cddl/contrib/opensolaris/cmd/zdb/ (props changed) stable/8/cddl/contrib/opensolaris/cmd/zfs/ (props changed) stable/8/cddl/contrib/opensolaris/lib/libzfs/ (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c ============================================================================== --- stable/8/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Wed May 19 06:18:01 2010 (r208287) +++ stable/8/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Wed May 19 06:49:52 2010 (r208288) @@ -879,17 +879,21 @@ int zpool_do_export(int argc, char **argv) { boolean_t force = B_FALSE; + boolean_t hardforce = B_FALSE; int c; zpool_handle_t *zhp; int ret; int i; /* check options */ - while ((c = getopt(argc, argv, "f")) != -1) { + while ((c = getopt(argc, argv, "fF")) != -1) { switch (c) { case 'f': force = B_TRUE; break; + case 'F': + hardforce = B_TRUE; + break; case '?': (void) fprintf(stderr, gettext("invalid option '%c'\n"), optopt); @@ -919,8 +923,12 @@ zpool_do_export(int argc, char **argv) continue; } - if (zpool_export(zhp, force) != 0) + if (hardforce) { + if (zpool_export_force(zhp) != 0) + ret = 1; + } else if (zpool_export(zhp, force) != 0) { ret = 1; + } zpool_close(zhp); } Modified: stable/8/cddl/contrib/opensolaris/cmd/ztest/ztest.c ============================================================================== --- stable/8/cddl/contrib/opensolaris/cmd/ztest/ztest.c Wed May 19 06:18:01 2010 (r208287) +++ stable/8/cddl/contrib/opensolaris/cmd/ztest/ztest.c Wed May 19 06:49:52 2010 (r208288) @@ -3145,7 +3145,7 @@ ztest_spa_import_export(char *oldname, c /* * Export it. */ - error = spa_export(oldname, &config, B_FALSE); + error = spa_export(oldname, &config, B_FALSE, B_FALSE); if (error) fatal(0, "spa_export('%s') = %d", oldname, error); Modified: stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h ============================================================================== --- stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h Wed May 19 06:18:01 2010 (r208287) +++ stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h Wed May 19 06:49:52 2010 (r208288) @@ -289,6 +289,7 @@ extern int zpool_get_errlog(zpool_handle * Import and export functions */ extern int zpool_export(zpool_handle_t *, boolean_t); +extern int zpool_export_force(zpool_handle_t *); extern int zpool_import(libzfs_handle_t *, nvlist_t *, const char *, char *altroot); extern int zpool_import_props(libzfs_handle_t *, nvlist_t *, const char *, Modified: stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c ============================================================================== --- stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Wed May 19 06:18:01 2010 (r208287) +++ stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Wed May 19 06:49:52 2010 (r208288) @@ -1096,7 +1096,7 @@ zpool_add(zpool_handle_t *zhp, nvlist_t * mounted datasets in the pool. */ int -zpool_export(zpool_handle_t *zhp, boolean_t force) +zpool_export_common(zpool_handle_t *zhp, boolean_t force, boolean_t hardforce) { zfs_cmd_t zc = { 0 }; char msg[1024]; @@ -1109,6 +1109,7 @@ zpool_export(zpool_handle_t *zhp, boolea (void) strlcpy(zc.zc_name, zhp->zpool_name, sizeof (zc.zc_name)); zc.zc_cookie = force; + zc.zc_guid = hardforce; if (zfs_ioctl(zhp->zpool_hdl, ZFS_IOC_POOL_EXPORT, &zc) != 0) { switch (errno) { @@ -1129,6 +1130,18 @@ zpool_export(zpool_handle_t *zhp, boolea return (0); } +int +zpool_export(zpool_handle_t *zhp, boolean_t force) +{ + return (zpool_export_common(zhp, force, B_FALSE)); +} + +int +zpool_export_force(zpool_handle_t *zhp) +{ + return (zpool_export_common(zhp, B_TRUE, B_TRUE)); +} + /* * zpool_import() is a contracted interface. Should be kept the same * if possible. Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Wed May 19 06:18:01 2010 (r208287) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Wed May 19 06:49:52 2010 (r208288) @@ -1192,6 +1192,7 @@ dmu_init(void) { dbuf_init(); dnode_init(); + zfetch_init(); arc_init(); l2arc_init(); } @@ -1200,6 +1201,7 @@ void dmu_fini(void) { arc_fini(); + zfetch_fini(); dnode_fini(); dbuf_fini(); l2arc_fini(); Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_zfetch.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_zfetch.c Wed May 19 06:18:01 2010 (r208287) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_zfetch.c Wed May 19 06:49:52 2010 (r208288) @@ -19,18 +19,17 @@ * CDDL HEADER END */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include #include #include #include #include #include +#include /* * I'm against tune-ables, but these should probably exist as tweakable globals @@ -77,6 +76,41 @@ static zstream_t *dmu_zfetch_stream_recl static void dmu_zfetch_stream_remove(zfetch_t *, zstream_t *); static int dmu_zfetch_streams_equal(zstream_t *, zstream_t *); +typedef struct zfetch_stats { + kstat_named_t zfetchstat_hits; + kstat_named_t zfetchstat_misses; + kstat_named_t zfetchstat_colinear_hits; + kstat_named_t zfetchstat_colinear_misses; + kstat_named_t zfetchstat_stride_hits; + kstat_named_t zfetchstat_stride_misses; + kstat_named_t zfetchstat_reclaim_successes; + kstat_named_t zfetchstat_reclaim_failures; + kstat_named_t zfetchstat_stream_resets; + kstat_named_t zfetchstat_stream_noresets; + kstat_named_t zfetchstat_bogus_streams; +} zfetch_stats_t; + +static zfetch_stats_t zfetch_stats = { + { "hits", KSTAT_DATA_UINT64 }, + { "misses", KSTAT_DATA_UINT64 }, + { "colinear_hits", KSTAT_DATA_UINT64 }, + { "colinear_misses", KSTAT_DATA_UINT64 }, + { "stride_hits", KSTAT_DATA_UINT64 }, + { "stride_misses", KSTAT_DATA_UINT64 }, + { "reclaim_successes", KSTAT_DATA_UINT64 }, + { "reclaim_failures", KSTAT_DATA_UINT64 }, + { "streams_resets", KSTAT_DATA_UINT64 }, + { "streams_noresets", KSTAT_DATA_UINT64 }, + { "bogus_streams", KSTAT_DATA_UINT64 }, +}; + +#define ZFETCHSTAT_INCR(stat, val) \ + atomic_add_64(&zfetch_stats.stat.value.ui64, (val)); + +#define ZFETCHSTAT_BUMP(stat) ZFETCHSTAT_INCR(stat, 1); + +kstat_t *zfetch_ksp; + /* * Given a zfetch structure and a zstream structure, determine whether the * blocks to be read are part of a co-linear pair of existing prefetch @@ -213,6 +247,29 @@ dmu_zfetch_dofetch(zfetch_t *zf, zstream zs->zst_last = LBOLT; } +void +zfetch_init(void) +{ + + zfetch_ksp = kstat_create("zfs", 0, "zfetchstats", "misc", + KSTAT_TYPE_NAMED, sizeof (zfetch_stats) / sizeof (kstat_named_t), + KSTAT_FLAG_VIRTUAL); + + if (zfetch_ksp != NULL) { + zfetch_ksp->ks_data = &zfetch_stats; + kstat_install(zfetch_ksp); + } +} + +void +zfetch_fini(void) +{ + if (zfetch_ksp != NULL) { + kstat_delete(zfetch_ksp); + zfetch_ksp = NULL; + } +} + /* * This takes a pointer to a zfetch structure and a dnode. It performs the * necessary setup for the zfetch structure, grokking data from the @@ -283,7 +340,7 @@ dmu_zfetch_fetchsz(dnode_t *dn, uint64_t } /* - * given a zfetch and a zsearch structure, see if there is an associated zstream + * given a zfetch and a zstream structure, see if there is an associated zstream * for this block read. If so, it starts a prefetch for the stream it * located and returns true, otherwise it returns false */ @@ -315,6 +372,7 @@ top: */ if (zs->zst_len == 0) { /* bogus stream */ + ZFETCHSTAT_BUMP(zfetchstat_bogus_streams); continue; } @@ -324,9 +382,14 @@ top: */ if (zh->zst_offset >= zs->zst_offset && zh->zst_offset < zs->zst_offset + zs->zst_len) { - /* already fetched */ - rc = 1; - goto out; + if (prefetched) { + /* already fetched */ + ZFETCHSTAT_BUMP(zfetchstat_stride_hits); + rc = 1; + goto out; + } else { + ZFETCHSTAT_BUMP(zfetchstat_stride_misses); + } } /* @@ -439,6 +502,7 @@ top: if (reset) { zstream_t *remove = zs; + ZFETCHSTAT_BUMP(zfetchstat_stream_resets); rc = 0; mutex_exit(&zs->zst_lock); rw_exit(&zf->zf_rwlock); @@ -457,6 +521,7 @@ top: } } } else { + ZFETCHSTAT_BUMP(zfetchstat_stream_noresets); rc = 1; dmu_zfetch_dofetch(zf, zs); mutex_exit(&zs->zst_lock); @@ -513,13 +578,12 @@ dmu_zfetch_stream_insert(zfetch_t *zf, z zs_next = list_next(&zf->zf_stream, zs_walk); if (dmu_zfetch_streams_equal(zs_walk, zs)) { - return (0); + return (0); } } list_insert_head(&zf->zf_stream, zs); zf->zf_stream_cnt++; - return (1); } @@ -623,8 +687,15 @@ dmu_zfetch(zfetch_t *zf, uint64_t offset P2ALIGN(offset, blksz)) >> blkshft; fetched = dmu_zfetch_find(zf, &zst, prefetched); - if (!fetched) { - fetched = dmu_zfetch_colinear(zf, &zst); + if (fetched) { + ZFETCHSTAT_BUMP(zfetchstat_hits); + } else { + ZFETCHSTAT_BUMP(zfetchstat_misses); + if (fetched = dmu_zfetch_colinear(zf, &zst)) { + ZFETCHSTAT_BUMP(zfetchstat_colinear_hits); + } else { + ZFETCHSTAT_BUMP(zfetchstat_colinear_misses); + } } if (!fetched) { @@ -634,11 +705,14 @@ dmu_zfetch(zfetch_t *zf, uint64_t offset * we still couldn't find a stream, drop the lock, and allocate * one if possible. Otherwise, give up and go home. */ - if (newstream == NULL) { + if (newstream) { + ZFETCHSTAT_BUMP(zfetchstat_reclaim_successes); + } else { uint64_t maxblocks; uint32_t max_streams; uint32_t cur_streams; + ZFETCHSTAT_BUMP(zfetchstat_reclaim_failures); cur_streams = zf->zf_stream_cnt; maxblocks = zf->zf_dnode->dn_maxblkid; @@ -651,7 +725,6 @@ dmu_zfetch(zfetch_t *zf, uint64_t offset if (cur_streams >= max_streams) { return; } - newstream = kmem_zalloc(sizeof (zstream_t), KM_SLEEP); } Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Wed May 19 06:18:01 2010 (r208287) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Wed May 19 06:49:52 2010 (r208288) @@ -2564,11 +2564,12 @@ spa_tryimport(nvlist_t *tryconfig) * The act of destroying or exporting a pool is very simple. We make sure there * is no more pending I/O and any references to the pool are gone. Then, we * update the pool state and sync all the labels to disk, removing the - * configuration from the cache afterwards. + * configuration from the cache afterwards. If the 'hardforce' flag is set, then + * we don't sync the labels or remove the configuration cache. */ static int spa_export_common(char *pool, int new_state, nvlist_t **oldconfig, - boolean_t force) + boolean_t force, boolean_t hardforce) { spa_t *spa; @@ -2636,7 +2637,7 @@ spa_export_common(char *pool, int new_st * so mark them all dirty. spa_unload() will do the * final sync that pushes these changes out. */ - if (new_state != POOL_STATE_UNINITIALIZED) { + if (new_state != POOL_STATE_UNINITIALIZED && !hardforce) { spa_config_enter(spa, SCL_ALL, FTAG, RW_WRITER); spa->spa_state = new_state; spa->spa_final_txg = spa_last_synced_txg(spa) + 1; @@ -2656,7 +2657,8 @@ spa_export_common(char *pool, int new_st VERIFY(nvlist_dup(spa->spa_config, oldconfig, 0) == 0); if (new_state != POOL_STATE_UNINITIALIZED) { - spa_config_sync(spa, B_TRUE, B_TRUE); + if (!hardforce) + spa_config_sync(spa, B_TRUE, B_TRUE); spa_remove(spa); } mutex_exit(&spa_namespace_lock); @@ -2670,16 +2672,19 @@ spa_export_common(char *pool, int new_st int spa_destroy(char *pool) { - return (spa_export_common(pool, POOL_STATE_DESTROYED, NULL, B_FALSE)); + return (spa_export_common(pool, POOL_STATE_DESTROYED, NULL, + B_FALSE, B_FALSE)); } /* * Export a storage pool. */ int -spa_export(char *pool, nvlist_t **oldconfig, boolean_t force) +spa_export(char *pool, nvlist_t **oldconfig, boolean_t force, + boolean_t hardforce) { - return (spa_export_common(pool, POOL_STATE_EXPORTED, oldconfig, force)); + return (spa_export_common(pool, POOL_STATE_EXPORTED, oldconfig, + force, hardforce)); } /* @@ -2690,7 +2695,7 @@ int spa_reset(char *pool) { return (spa_export_common(pool, POOL_STATE_UNINITIALIZED, NULL, - B_FALSE)); + B_FALSE, B_FALSE)); } /* Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_zfetch.h ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_zfetch.h Wed May 19 06:18:01 2010 (r208287) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_zfetch.h Wed May 19 06:49:52 2010 (r208288) @@ -19,15 +19,13 @@ * CDDL HEADER END */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ #ifndef _DFETCH_H #define _DFETCH_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include #ifdef __cplusplus @@ -63,6 +61,9 @@ typedef struct zfetch { uint64_t zf_alloc_fail; /* # of failed attempts to alloc strm */ } zfetch_t; +void zfetch_init(void); +void zfetch_fini(void); + void dmu_zfetch_init(zfetch_t *, struct dnode *); void dmu_zfetch_rele(zfetch_t *); void dmu_zfetch(zfetch_t *, uint64_t, uint64_t, int); Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h Wed May 19 06:18:01 2010 (r208287) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h Wed May 19 06:49:52 2010 (r208288) @@ -333,7 +333,8 @@ extern int spa_import(const char *pool, extern int spa_import_faulted(const char *, nvlist_t *, nvlist_t *); extern nvlist_t *spa_tryimport(nvlist_t *tryconfig); extern int spa_destroy(char *pool); -extern int spa_export(char *pool, nvlist_t **oldconfig, boolean_t force); +extern int spa_export(char *pool, nvlist_t **oldconfig, boolean_t force, + boolean_t hardforce); extern int spa_reset(char *pool); extern void spa_async_request(spa_t *spa, int flag); extern void spa_async_unrequest(spa_t *spa, int flag); Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_dir.h ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_dir.h Wed May 19 06:18:01 2010 (r208287) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_dir.h Wed May 19 06:49:52 2010 (r208288) @@ -44,6 +44,7 @@ extern "C" { #define ZRENAMING 0x0010 /* znode is being renamed */ #define ZCILOOK 0x0020 /* case-insensitive lookup requested */ #define ZCIEXACT 0x0040 /* c-i requires c-s match (rename) */ +#define ZHAVELOCK 0x0080 /* z_name_lock is already held */ /* mknode flags */ #define IS_ROOT_NODE 0x01 /* create a root node */ Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h Wed May 19 06:18:01 2010 (r208287) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h Wed May 19 06:49:52 2010 (r208288) @@ -174,6 +174,7 @@ typedef struct znode_phys { typedef struct zfs_dirlock { char *dl_name; /* directory entry being locked */ uint32_t dl_sharecnt; /* 0 if exclusive, > 0 if shared */ + uint8_t dl_namelock; /* 1 if z_name_lock is NOT held */ uint16_t dl_namesize; /* set if dl_name was allocated */ kcondvar_t dl_cv; /* wait for entry to be unlocked */ struct znode *dl_dzp; /* directory znode */ Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c Wed May 19 06:18:01 2010 (r208287) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c Wed May 19 06:49:52 2010 (r208288) @@ -114,6 +114,8 @@ zfs_match_find(zfsvfs_t *zfsvfs, znode_t * ZCIEXACT: On a purely case-insensitive file system, * this lookup should be case-sensitive. * ZRENAMING: we are locking for renaming, force narrow locks + * ZHAVELOCK: Don't grab the z_name_lock for this call. The + * current thread already holds it. * * Output arguments: * zpp - pointer to the znode for the entry (NULL if there isn't one) @@ -208,13 +210,20 @@ zfs_dirent_lock(zfs_dirlock_t **dlpp, zn /* * Wait until there are no locks on this name. + * + * Don't grab the the lock if it is already held. However, cannot + * have both ZSHARED and ZHAVELOCK together. */ - rw_enter(&dzp->z_name_lock, RW_READER); + ASSERT(!(flag & ZSHARED) || !(flag & ZHAVELOCK)); + if (!(flag & ZHAVELOCK)) + rw_enter(&dzp->z_name_lock, RW_READER); + mutex_enter(&dzp->z_lock); for (;;) { if (dzp->z_unlinked) { mutex_exit(&dzp->z_lock); - rw_exit(&dzp->z_name_lock); + if (!(flag & ZHAVELOCK)) + rw_exit(&dzp->z_name_lock); return (ENOENT); } for (dl = dzp->z_dirlocks; dl != NULL; dl = dl->dl_next) { @@ -224,7 +233,8 @@ zfs_dirent_lock(zfs_dirlock_t **dlpp, zn } if (error != 0) { mutex_exit(&dzp->z_lock); - rw_exit(&dzp->z_name_lock); + if (!(flag & ZHAVELOCK)) + rw_exit(&dzp->z_name_lock); return (ENOENT); } if (dl == NULL) { @@ -235,6 +245,7 @@ zfs_dirent_lock(zfs_dirlock_t **dlpp, zn cv_init(&dl->dl_cv, NULL, CV_DEFAULT, NULL); dl->dl_name = name; dl->dl_sharecnt = 0; + dl->dl_namelock = 0; dl->dl_namesize = 0; dl->dl_dzp = dzp; dl->dl_next = dzp->z_dirlocks; @@ -246,6 +257,12 @@ zfs_dirent_lock(zfs_dirlock_t **dlpp, zn cv_wait(&dl->dl_cv, &dzp->z_lock); } + /* + * If the z_name_lock was NOT held for this dirlock record it. + */ + if (flag & ZHAVELOCK) + dl->dl_namelock = 1; + if ((flag & ZSHARED) && ++dl->dl_sharecnt > 1 && dl->dl_namesize == 0) { /* * We're the second shared reference to dl. Make a copy of @@ -325,7 +342,10 @@ zfs_dirent_unlock(zfs_dirlock_t *dl) zfs_dirlock_t **prev_dl, *cur_dl; mutex_enter(&dzp->z_lock); - rw_exit(&dzp->z_name_lock); + + if (!dl->dl_namelock) + rw_exit(&dzp->z_name_lock); + if (dl->dl_sharecnt > 1) { dl->dl_sharecnt--; mutex_exit(&dzp->z_lock); Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Wed May 19 06:18:01 2010 (r208287) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Wed May 19 06:49:52 2010 (r208288) @@ -882,9 +882,10 @@ zfs_ioc_pool_export(zfs_cmd_t *zc) { int error; boolean_t force = (boolean_t)zc->zc_cookie; + boolean_t hardforce = (boolean_t)zc->zc_guid; zfs_log_history(zc); - error = spa_export(zc->zc_name, NULL, force); + error = spa_export(zc->zc_name, NULL, force, hardforce); return (error); } Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Wed May 19 06:18:01 2010 (r208287) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Wed May 19 06:49:52 2010 (r208288) @@ -3208,6 +3208,15 @@ top: } } + /* + * If the source and destination directories are the same, we should + * grab the z_name_lock of that directory only once. + */ + if (sdzp == tdzp) { + zflg |= ZHAVELOCK; + rw_enter(&sdzp->z_name_lock, RW_READER); + } + if (cmp < 0) { serr = zfs_dirent_lock(&sdl, sdzp, snm, &szp, ZEXISTS | zflg, NULL, NULL); @@ -3230,6 +3239,10 @@ top: if (tzp) VN_RELE(ZTOV(tzp)); } + + if (sdzp == tdzp) + rw_exit(&sdzp->z_name_lock); + if (strcmp(snm, ".") == 0 || strcmp(snm, "..") == 0) serr = EINVAL; ZFS_EXIT(zfsvfs); @@ -3238,6 +3251,10 @@ top: if (terr) { zfs_dirent_unlock(sdl); VN_RELE(ZTOV(szp)); + + if (sdzp == tdzp) + rw_exit(&sdzp->z_name_lock); + if (strcmp(tnm, "..") == 0) terr = EINVAL; ZFS_EXIT(zfsvfs); @@ -3320,6 +3337,10 @@ top: zfs_rename_unlock(&zl); zfs_dirent_unlock(sdl); zfs_dirent_unlock(tdl); + + if (sdzp == tdzp) + rw_exit(&sdzp->z_name_lock); + VN_RELE(ZTOV(szp)); if (tzp) VN_RELE(ZTOV(tzp)); @@ -3367,6 +3388,9 @@ out: zfs_dirent_unlock(sdl); zfs_dirent_unlock(tdl); + if (sdzp == tdzp) + rw_exit(&sdzp->z_name_lock); + VN_RELE(ZTOV(szp)); if (tzp) VN_RELE(ZTOV(tzp)); From owner-svn-src-stable-8@FreeBSD.ORG Wed May 19 09:30:42 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4C24B1065676; Wed, 19 May 2010 09:30:42 +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 3A56C8FC08; Wed, 19 May 2010 09:30: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 o4J9UgMI032366; Wed, 19 May 2010 09:30:42 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4J9Ug33032365; Wed, 19 May 2010 09:30:42 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201005190930.o4J9Ug33032365@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 19 May 2010 09:30:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208292 - stable/8/sys/amd64/amd64 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2010 09:30:42 -0000 Author: kib Date: Wed May 19 09:30:41 2010 New Revision: 208292 URL: http://svn.freebsd.org/changeset/base/208292 Log: MFC r207957: Remove unneeded overrides of the segment registers. Modified: stable/8/sys/amd64/amd64/trap.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/amd64/amd64/trap.c ============================================================================== --- stable/8/sys/amd64/amd64/trap.c Wed May 19 08:57:53 2010 (r208291) +++ stable/8/sys/amd64/amd64/trap.c Wed May 19 09:30:41 2010 (r208292) @@ -485,22 +485,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-stable-8@FreeBSD.ORG Wed May 19 09:32:59 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8A7E7106566C; Wed, 19 May 2010 09:32:59 +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 5FB818FC14; Wed, 19 May 2010 09:32: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 o4J9Wxkf032954; Wed, 19 May 2010 09:32:59 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4J9WxCg032951; Wed, 19 May 2010 09:32:59 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201005190932.o4J9WxCg032951@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 19 May 2010 09:32:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208294 - stable/8/sys/amd64/amd64 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2010 09:32:59 -0000 Author: kib Date: Wed May 19 09:32:59 2010 New Revision: 208294 URL: http://svn.freebsd.org/changeset/base/208294 Log: MFC r207958: Route all returns from the interrupts and faults through the doreti_iret labeled iretq instruction. MFC r208026: Do not use .extern. Modified: stable/8/sys/amd64/amd64/apic_vector.S stable/8/sys/amd64/amd64/exception.S Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/amd64/amd64/apic_vector.S ============================================================================== --- stable/8/sys/amd64/amd64/apic_vector.S Wed May 19 09:32:11 2010 (r208293) +++ stable/8/sys/amd64/amd64/apic_vector.S Wed May 19 09:32:59 2010 (r208294) @@ -81,7 +81,7 @@ IDTVEC(spuriousint) /* No EOI cycle used here */ - iretq + jmp doreti_iret ISR_VEC(1, apic_isr1) ISR_VEC(2, apic_isr2) @@ -135,7 +135,7 @@ IDTVEC(invltlb) incl smp_tlb_wait popq %rax - iretq + jmp doreti_iret /* * Single page TLB shootdown @@ -155,7 +155,7 @@ IDTVEC(invlpg) incl smp_tlb_wait popq %rax - iretq + jmp doreti_iret /* * Page range TLB shootdown. @@ -181,7 +181,7 @@ IDTVEC(invlrng) popq %rdx popq %rax - iretq + jmp doreti_iret /* * Invalidate cache. @@ -200,7 +200,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 +247,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: stable/8/sys/amd64/amd64/exception.S ============================================================================== --- stable/8/sys/amd64/amd64/exception.S Wed May 19 09:32:11 2010 (r208293) +++ stable/8/sys/amd64/amd64/exception.S Wed May 19 09:32:59 2010 (r208294) @@ -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-stable-8@FreeBSD.ORG Wed May 19 10:15:37 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B63441065670; Wed, 19 May 2010 10:15:37 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8B5F38FC15; Wed, 19 May 2010 10:15: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 o4JAFbuX042350; Wed, 19 May 2010 10:15:37 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4JAFb8s042348; Wed, 19 May 2010 10:15:37 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201005191015.o4JAFb8s042348@svn.freebsd.org> From: Andriy Gapon Date: Wed, 19 May 2010 10:15:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208295 - stable/8/sys/kern X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2010 10:15:37 -0000 Author: avg Date: Wed May 19 10:15:37 2010 New Revision: 208295 URL: http://svn.freebsd.org/changeset/base/208295 Log: MFC r207359,207362: kern_ntptime: abstract time error check into a function Modified: stable/8/sys/kern/kern_ntptime.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/kern/kern_ntptime.c ============================================================================== --- stable/8/sys/kern/kern_ntptime.c Wed May 19 09:32:59 2010 (r208294) +++ stable/8/sys/kern/kern_ntptime.c Wed May 19 10:15:37 2010 (r208295) @@ -198,22 +198,11 @@ static long pps_errcnt; /* calibration static void ntp_init(void); static void hardupdate(long offset); static void ntp_gettime1(struct ntptimeval *ntvp); +static int ntp_is_time_error(void); -static void -ntp_gettime1(struct ntptimeval *ntvp) +static int +ntp_is_time_error(void) { - struct timespec atv; /* nanosecond time */ - - GIANT_REQUIRED; - - nanotime(&atv); - ntvp->time.tv_sec = atv.tv_sec; - ntvp->time.tv_nsec = atv.tv_nsec; - ntvp->maxerror = time_maxerror; - ntvp->esterror = time_esterror; - ntvp->tai = time_tai; - ntvp->time_state = time_state; - /* * Status word error decode. If any of these conditions occur, * an error is returned, instead of the status word. Most @@ -243,6 +232,27 @@ ntp_gettime1(struct ntptimeval *ntvp) */ (time_status & STA_PPSFREQ && time_status & (STA_PPSWANDER | STA_PPSERROR))) + return (1); + + return (0); +} + +static void +ntp_gettime1(struct ntptimeval *ntvp) +{ + struct timespec atv; /* nanosecond time */ + + GIANT_REQUIRED; + + nanotime(&atv); + ntvp->time.tv_sec = atv.tv_sec; + ntvp->time.tv_nsec = atv.tv_nsec; + ntvp->maxerror = time_maxerror; + ntvp->esterror = time_esterror; + ntvp->tai = time_tai; + ntvp->time_state = time_state; + + if (ntp_is_time_error()) ntvp->time_state = TIME_ERROR; } @@ -442,21 +452,11 @@ ntp_adjtime(struct thread *td, struct nt if (error) goto done2; - /* - * Status word error decode. See comments in - * ntp_gettime() routine. - */ - if ((time_status & (STA_UNSYNC | STA_CLOCKERR)) || - (time_status & (STA_PPSFREQ | STA_PPSTIME) && - !(time_status & STA_PPSSIGNAL)) || - (time_status & STA_PPSTIME && - time_status & STA_PPSJITTER) || - (time_status & STA_PPSFREQ && - time_status & (STA_PPSWANDER | STA_PPSERROR))) { + if (ntp_is_time_error()) td->td_retval[0] = TIME_ERROR; - } else { + else td->td_retval[0] = time_state; - } + done2: mtx_unlock(&Giant); return (error); From owner-svn-src-stable-8@FreeBSD.ORG Wed May 19 10:34:17 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7E82C106566B; Wed, 19 May 2010 10:34:17 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 53CDD8FC12; Wed, 19 May 2010 10:34: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 o4JAYFfO047699; Wed, 19 May 2010 10:34:15 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4JAYFT0047697; Wed, 19 May 2010 10:34:15 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201005191034.o4JAYFT0047697@svn.freebsd.org> From: Andriy Gapon Date: Wed, 19 May 2010 10:34:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208297 - stable/8/sys/kern X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2010 10:34:17 -0000 Author: avg Date: Wed May 19 10:34:15 2010 New Revision: 208297 URL: http://svn.freebsd.org/changeset/base/208297 Log: MFC r207360: periodically save system time to hardware time-of-day clock Modified: stable/8/sys/kern/kern_ntptime.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/kern/kern_ntptime.c ============================================================================== --- stable/8/sys/kern/kern_ntptime.c Wed May 19 10:29:37 2010 (r208296) +++ stable/8/sys/kern/kern_ntptime.c Wed May 19 10:34:15 2010 (r208297) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -972,3 +973,67 @@ kern_adjtime(struct thread *td, struct t return (0); } +static struct callout resettodr_callout; +static int resettodr_period = 1800; + +static void +periodic_resettodr(void *arg __unused) +{ + + if (!ntp_is_time_error()) { + mtx_lock(&Giant); + resettodr(); + mtx_unlock(&Giant); + } + if (resettodr_period > 0) + callout_schedule(&resettodr_callout, resettodr_period * hz); +} + +static void +shutdown_resettodr(void *arg __unused, int howto __unused) +{ + + callout_drain(&resettodr_callout); + if (resettodr_period > 0 && !ntp_is_time_error()) { + mtx_lock(&Giant); + resettodr(); + mtx_unlock(&Giant); + } +} + +static int +sysctl_resettodr_period(SYSCTL_HANDLER_ARGS) +{ + int error; + + error = sysctl_handle_int(oidp, oidp->oid_arg1, oidp->oid_arg2, req); + if (error || !req->newptr) + return (error); + if (resettodr_period == 0) + callout_stop(&resettodr_callout); + else + callout_reset(&resettodr_callout, resettodr_period * hz, + periodic_resettodr, NULL); + return (0); +} + +SYSCTL_PROC(_machdep, OID_AUTO, rtc_save_period, CTLTYPE_INT|CTLFLAG_RW, + &resettodr_period, 1800, sysctl_resettodr_period, "I", + "Save system time to RTC with this period (in seconds)"); +TUNABLE_INT("machdep.rtc_save_period", &resettodr_period); + +static void +start_periodic_resettodr(void *arg __unused) +{ + + EVENTHANDLER_REGISTER(shutdown_pre_sync, shutdown_resettodr, NULL, + SHUTDOWN_PRI_FIRST); + callout_init(&resettodr_callout, 1); + if (resettodr_period == 0) + return; + callout_reset(&resettodr_callout, resettodr_period * hz, + periodic_resettodr, NULL); +} + +SYSINIT(periodic_resettodr, SI_SUB_RUN_SCHEDULER, SI_ORDER_ANY - 1, + start_periodic_resettodr, NULL); From owner-svn-src-stable-8@FreeBSD.ORG Wed May 19 14:50:07 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A37D7106566C; Wed, 19 May 2010 14:50:07 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9057F8FC14; Wed, 19 May 2010 14:50: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 o4JEo7Oa004105; Wed, 19 May 2010 14:50:07 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4JEo7mK004095; Wed, 19 May 2010 14:50:07 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201005191450.o4JEo7mK004095@svn.freebsd.org> From: Alexander Motin Date: Wed, 19 May 2010 14:50:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208299 - in stable/8: share/man/man4 sys/arm/mv sys/conf sys/dev/mvs sys/modules sys/modules/mvs X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2010 14:50:07 -0000 Author: mav Date: Wed May 19 14:50:07 2010 New Revision: 208299 URL: http://svn.freebsd.org/changeset/base/208299 Log: MFC r207536, r207696, r208183: Import mvs(4) - Marvell 88SX50XX/88SX60XX/88SX70XX/SoC SATA controllers driver for CAM ATA subsystem. This driver supports same hardware as atamarvell, ataadaptec and atamvsata drivers from ata(4), but provides many additional features, such as NCQ, PMP, etc. Added: stable/8/share/man/man4/mvs.4 - copied unchanged from r207536, head/share/man/man4/mvs.4 stable/8/sys/dev/mvs/ - copied from r207536, head/sys/dev/mvs/ stable/8/sys/modules/mvs/ - copied from r207536, head/sys/modules/mvs/ Modified: stable/8/share/man/man4/Makefile stable/8/sys/arm/mv/files.mv stable/8/sys/conf/NOTES stable/8/sys/conf/files stable/8/sys/conf/kmod.mk stable/8/sys/dev/mvs/mvs.c stable/8/sys/modules/Makefile stable/8/sys/modules/mvs/Makefile Directory Properties: stable/8/share/man/man4/ (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/share/man/man4/Makefile ============================================================================== --- stable/8/share/man/man4/Makefile Wed May 19 10:35:53 2010 (r208298) +++ stable/8/share/man/man4/Makefile Wed May 19 14:50:07 2010 (r208299) @@ -218,6 +218,7 @@ MAN= aac.4 \ msk.4 \ mtio.4 \ multicast.4 \ + mvs.4 \ mwl.4 \ mwlfw.4 \ mxge.4 \ Copied: stable/8/share/man/man4/mvs.4 (from r207536, head/share/man/man4/mvs.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/share/man/man4/mvs.4 Wed May 19 14:50:07 2010 (r208299, copy of r207536, head/share/man/man4/mvs.4) @@ -0,0 +1,176 @@ +.\" Copyright (c) 2009 Alexander Motin +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. The name of the author may not be used to endorse or promote products +.\" derived from this software without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd April 27, 2010 +.Dt MVS 4 +.Os +.Sh NAME +.Nm mvs +.Nd Marvell Serial ATA Host Controller driver +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device pci" +.Cd "device scbus" +.Cd "device mvs" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +mvs_load="YES" +.Ed +.Pp +The following tunables are settable from the +.Xr loader 8 : +.Bl -ohang +.It Va hint.mvs. Ns Ar X Ns Va .msi +controls Message Signaled Interrupts (MSI) usage by the specified controller. +.It Va hint.mvs. Ns Ar X Ns Va .ccc +controls Command Completion Coalescing (CCC) usage by the specified controller. +Non-zero value enables CCC and defines maximum time (in us), request can wait +for interrupt. +CCC reduces number of context switches on systems with many parallel requests, +but it can decrease disk performance on some workloads due to additional +command latency. +.It Va hint.mvs. Ns Ar X Ns Va .cccc +defines number of completed commands for CCC, which trigger interrupt without +waiting for specified coalescing timeout. +.It Va hint.mvs. Ns Ar X Ns Va .pm_level +controls SATA interface Power Management for the specified channel, +allowing some power to be saved at the cost of additional command +latency. +Possible values: +.Bl -tag -compact +.It 0 +interface Power Management is disabled (default); +.It 1 +device is allowed to initiate PM state change, host is passive; +.It 4 +driver initiates PARTIAL PM state transition 1ms after port becomes idle; +.It 5 +driver initiates SLUMBER PM state transition 125ms after port becomes idle. +.El +.Pp +Note that interface Power Management is not compatible with +device presence detection. +A manual bus reset is needed on device hot-plug. +.It Va hint.mvs. Ns Ar X Ns Va .sata_rev +setting to nonzero value limits maximum SATA revision (speed). +Values 1, 2 and 3 are respectively 1.5, 3 and 6Gbps. +.El +.Sh DESCRIPTION +This driver provides the +.Xr CAM 4 +subsystem with native access to the +.Tn SATA +ports of several generations (Gen-I/II/IIe) of Marvell SATA controllers. +Each SATA port found is represented to CAM as a separate bus with one +target, or, if HBA supports Port Multipliers (Gen-II/IIe), 16 targets. +Most of the bus-management details are handled by the SATA-specific +transport of CAM. +Connected ATA disks are handled by the ATA protocol disk peripheral driver +.Xr ada 4 . +ATAPI devices are handled by the SCSI protocol peripheral drivers +.Xr cd 4 , +.Xr da 4 , +.Xr sa 4 , +etc. +.Pp +Driver features include support for Serial ATA and ATAPI devices, +Port Multipliers (including FIS-based switching, when supported), +hardware command queues (up to 31 command per port), +Native Command Queuing, SATA interface Power Management, device hot-plug +and Message Signaled Interrupts. +.Pp +Same hardware is also supported by atamarvell and ataadaptec drivers from +.Xr ata 4 +subsystem. +If both drivers are loaded at the same time, this one will be +given precedence as the more functional of the two. +.Sh HARDWARE +The +.Nm +driver supports the following controllers: +.Bl -tag -compact +.It Gen-I (SATA 1.5Gbps): +.Bl -bullet -compact +.It +88SX5040 +.It +88SX5041 +.It +88SX5080 +.It +88SX5081 +.El +.It Gen-II (SATA 3Gbps, NCQ, PMP): +.Bl -bullet -compact +.It +88SX6040 +.It +88SX6041 (including Adaptec 1420SA) +.It +88SX6080 +.It +88SX6081 +.El +.It Gen-IIe (SATA 3Gbps, NCQ, PMP with FBS): +.Bl -bullet -compact +.It +88SX6042 +.It +88SX7042 (including Adaptec 1430SA) +.It +88F5182 SoC +.It +88F6281 SoC +.It +MV78100 SoC +.El +.El +Note, that this hardware supports command queueing and FIS-based switching +only for ATA DMA commands. ATAPI and non-DMA ATA commands executed one by one +for each port. +.Pp +.Sh SEE ALSO +.Xr ada 4 , +.Xr ata 4 , +.Xr cam 4 , +.Xr cd 4 , +.Xr da 4 , +.Xr sa 4 +.Sh HISTORY +The +.Nm +driver first appeared in +.Fx 9.0 . +.Sh AUTHORS +.An Alexander Motin Aq mav@FreeBSD.org . Modified: stable/8/sys/arm/mv/files.mv ============================================================================== --- stable/8/sys/arm/mv/files.mv Wed May 19 10:35:53 2010 (r208298) +++ stable/8/sys/arm/mv/files.mv Wed May 19 14:50:07 2010 (r208299) @@ -30,6 +30,7 @@ arm/mv/timer.c standard arm/mv/twsi.c optional iicbus dev/mge/if_mge.c optional mge +dev/mvs/mvs_soc.c optional mvs dev/uart/uart_bus_mbus.c optional uart dev/uart/uart_cpu_mv.c optional uart dev/uart/uart_dev_ns8250.c optional uart Modified: stable/8/sys/conf/NOTES ============================================================================== --- stable/8/sys/conf/NOTES Wed May 19 10:35:53 2010 (r208298) +++ stable/8/sys/conf/NOTES Wed May 19 14:50:07 2010 (r208299) @@ -1651,12 +1651,14 @@ device twe # 3ware ATA RAID # Serial ATA host controllers: # # ahci: Advanced Host Controller Interface (AHCI) compatible +# mvs: Marvell 88SX50XX/88SX60XX/88SX70XX/SoC controllers # siis: SiliconImage SiI3124/SiI3132/SiI3531 controllers # # These drivers are part of cam(4) subsystem. They supersede less featured # ata(4) subsystem drivers, supporting same hardware. device ahci +device mvs device siis # Modified: stable/8/sys/conf/files ============================================================================== --- stable/8/sys/conf/files Wed May 19 10:35:53 2010 (r208298) +++ stable/8/sys/conf/files Wed May 19 14:50:07 2010 (r208299) @@ -1279,6 +1279,9 @@ dev/mpt/mpt_pci.c optional mpt pci dev/mpt/mpt_raid.c optional mpt dev/mpt/mpt_user.c optional mpt dev/msk/if_msk.c optional msk inet +dev/mvs/mvs.c optional mvs +dev/mvs/mvs_if.m optional mvs +dev/mvs/mvs_pci.c optional mvs pci dev/mwl/if_mwl.c optional mwl dev/mwl/if_mwl_pci.c optional mwl pci dev/mwl/mwlhal.c optional mwl Modified: stable/8/sys/conf/kmod.mk ============================================================================== --- stable/8/sys/conf/kmod.mk Wed May 19 10:35:53 2010 (r208298) +++ stable/8/sys/conf/kmod.mk Wed May 19 14:50:07 2010 (r208299) @@ -324,7 +324,7 @@ MFILES?= dev/acpica/acpi_if.m dev/acpi_s dev/agp/agp_if.m dev/ata/ata_if.m dev/eisa/eisa_if.m \ dev/iicbus/iicbb_if.m dev/iicbus/iicbus_if.m \ dev/mmc/mmcbr_if.m dev/mmc/mmcbus_if.m \ - dev/mii/miibus_if.m dev/ofw/ofw_bus_if.m \ + dev/mii/miibus_if.m dev/mvs/mvs_if.m dev/ofw/ofw_bus_if.m \ dev/pccard/card_if.m dev/pccard/power_if.m dev/pci/pci_if.m \ dev/pci/pcib_if.m dev/ppbus/ppbus_if.m dev/smbus/smbus_if.m \ dev/sound/pcm/ac97_if.m dev/sound/pcm/channel_if.m \ Modified: stable/8/sys/dev/mvs/mvs.c ============================================================================== --- head/sys/dev/mvs/mvs.c Sun May 2 19:28:30 2010 (r207536) +++ stable/8/sys/dev/mvs/mvs.c Wed May 19 14:50:07 2010 (r208299) @@ -2168,6 +2168,6 @@ mvspoll(struct cam_sim *sim) arg.arg = ch->dev; arg.cause = 2; /* XXX */ - mvs_ch_intr(arg.arg); + mvs_ch_intr(&arg); } Modified: stable/8/sys/modules/Makefile ============================================================================== --- stable/8/sys/modules/Makefile Wed May 19 10:35:53 2010 (r208298) +++ stable/8/sys/modules/Makefile Wed May 19 14:50:07 2010 (r208299) @@ -186,6 +186,7 @@ SUBDIR= ${_3dfx} \ msdosfs_iconv \ ${_mse} \ msk \ + mvs \ mwl \ mxge \ my \ Modified: stable/8/sys/modules/mvs/Makefile ============================================================================== --- head/sys/modules/mvs/Makefile Sun May 2 19:28:30 2010 (r207536) +++ stable/8/sys/modules/mvs/Makefile Wed May 19 14:50:07 2010 (r208299) @@ -3,7 +3,7 @@ .PATH: ${.CURDIR}/../../dev/mvs KMOD= mvs -SRCS= mvs.c mvs_pci.c mvs.h mvs_if.h device_if.h bus_if.h pci_if.h opt_cam.h +SRCS= mvs.c mvs_pci.c mvs.h mvs_if.c mvs_if.h device_if.h bus_if.h pci_if.h opt_cam.h MFILES= kern/bus_if.m kern/device_if.m dev/pci/pci_if.m dev/mvs/mvs_if.m From owner-svn-src-stable-8@FreeBSD.ORG Wed May 19 19:43:50 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3A4E6106566B; Wed, 19 May 2010 19:43:50 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2A3F18FC16; Wed, 19 May 2010 19:43: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 o4JJhn0O069618; Wed, 19 May 2010 19:43:49 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4JJhnYT069616; Wed, 19 May 2010 19:43:49 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201005191943.o4JJhnYT069616@svn.freebsd.org> From: John Baldwin Date: Wed, 19 May 2010 19:43:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208308 - stable/8/sys/dev/ciss X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2010 19:43:50 -0000 Author: jhb Date: Wed May 19 19:43:49 2010 New Revision: 208308 URL: http://svn.freebsd.org/changeset/base/208308 Log: MFC 207335: Initialize the callout structure earlier in attach before calling any routines that can fail since ciss_free() always tries to stop and drain the callout. Modified: stable/8/sys/dev/ciss/ciss.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/dev/ciss/ciss.c ============================================================================== --- stable/8/sys/dev/ciss/ciss.c Wed May 19 19:03:19 2010 (r208307) +++ stable/8/sys/dev/ciss/ciss.c Wed May 19 19:43:49 2010 (r208308) @@ -417,6 +417,7 @@ ciss_attach(device_t dev) sc = device_get_softc(dev); sc->ciss_dev = dev; mtx_init(&sc->ciss_mtx, "cissmtx", NULL, MTX_DEF); + callout_init_mtx(&sc->ciss_periodic, &sc->ciss_mtx, 0); /* * Do PCI-specific init. @@ -429,7 +430,6 @@ ciss_attach(device_t dev) */ ciss_initq_free(sc); ciss_initq_notify(sc); - callout_init_mtx(&sc->ciss_periodic, &sc->ciss_mtx, 0); /* * Initalize device sysctls. From owner-svn-src-stable-8@FreeBSD.ORG Wed May 19 20:53:21 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D571D106566C; Wed, 19 May 2010 20:53:21 +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 8FF028FC0A; Wed, 19 May 2010 20:53: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 o4JKrL0K085284; Wed, 19 May 2010 20:53:21 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4JKrLAK085281; Wed, 19 May 2010 20:53:21 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201005192053.o4JKrLAK085281@svn.freebsd.org> From: Jilles Tjoelker Date: Wed, 19 May 2010 20:53:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208313 - stable/8/etc X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2010 20:53:21 -0000 Author: jilles Date: Wed May 19 20:53:21 2010 New Revision: 208313 URL: http://svn.freebsd.org/changeset/base/208313 Log: MFC r208116: 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 Modified: stable/8/etc/csh.login stable/8/etc/profile Directory Properties: stable/8/etc/ (props changed) Modified: stable/8/etc/csh.login ============================================================================== --- stable/8/etc/csh.login Wed May 19 20:00:15 2010 (r208312) +++ stable/8/etc/csh.login Wed May 19 20:53:21 2010 (r208313) @@ -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: stable/8/etc/profile ============================================================================== --- stable/8/etc/profile Wed May 19 20:00:15 2010 (r208312) +++ stable/8/etc/profile Wed May 19 20:53:21 2010 (r208313) @@ -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-stable-8@FreeBSD.ORG Wed May 19 20:56:19 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0873F106566B; Wed, 19 May 2010 20:56:19 +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 D37DB8FC14; Wed, 19 May 2010 20: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 o4JKuIaM085965; Wed, 19 May 2010 20:56:18 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4JKuIOo085963; Wed, 19 May 2010 20:56:18 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201005192056.o4JKuIOo085963@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 19 May 2010 20:56:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208314 - stable/8/sys/dev/fxp X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2010 20:56:19 -0000 Author: yongari Date: Wed May 19 20:56:18 2010 New Revision: 208314 URL: http://svn.freebsd.org/changeset/base/208314 Log: MFC r208081,208083: r208081: Controller updates RFA via DMA so driver needs synchronization. Add missing BUS_DMASYNC_POSTWRITE and BUS_DMASYNC_PREREAD. r208083: Dont' allow dma map load deferring. fxp(4) is not able to handle EINPROGRESS. Modified: stable/8/sys/dev/fxp/if_fxp.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/dev/fxp/if_fxp.c ============================================================================== --- stable/8/sys/dev/fxp/if_fxp.c Wed May 19 20:53:21 2010 (r208313) +++ stable/8/sys/dev/fxp/if_fxp.c Wed May 19 20:56:18 2010 (r208314) @@ -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) { @@ -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); @@ -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-stable-8@FreeBSD.ORG Wed May 19 21:08:39 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5A490106564A; Wed, 19 May 2010 21:08:39 +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 314EF8FC14; Wed, 19 May 2010 21: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 o4JL8dP9088759; Wed, 19 May 2010 21:08:39 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4JL8dZ4088757; Wed, 19 May 2010 21:08:39 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201005192108.o4JL8dZ4088757@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 19 May 2010 21:08:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208316 - stable/8/sys/dev/fxp X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2010 21:08:39 -0000 Author: yongari Date: Wed May 19 21:08:38 2010 New Revision: 208316 URL: http://svn.freebsd.org/changeset/base/208316 Log: MFC r208084: 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> Modified: stable/8/sys/dev/fxp/if_fxp.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/dev/fxp/if_fxp.c ============================================================================== --- stable/8/sys/dev/fxp/if_fxp.c Wed May 19 21:02:02 2010 (r208315) +++ stable/8/sys/dev/fxp/if_fxp.c Wed May 19 21:08:38 2010 (r208316) @@ -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-stable-8@FreeBSD.ORG Wed May 19 22:03:46 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 741E01065670; Wed, 19 May 2010 22:03:46 +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 6425B8FC0A; Wed, 19 May 2010 22:03: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 o4JM3kk6001526; Wed, 19 May 2010 22:03:46 GMT (envelope-from gordon@svn.freebsd.org) Received: (from gordon@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4JM3kUV001525; Wed, 19 May 2010 22:03:46 GMT (envelope-from gordon@svn.freebsd.org) Message-Id: <201005192203.o4JM3kUV001525@svn.freebsd.org> From: Gordon Tetlow Date: Wed, 19 May 2010 22:03:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208318 - stable/8/lib/libc/gen X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2010 22:03:46 -0000 Author: gordon Date: Wed May 19 22:03:45 2010 New Revision: 208318 URL: http://svn.freebsd.org/changeset/base/208318 Log: MFC r207981: 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. Approved by: mentor (wes@) Modified: stable/8/lib/libc/gen/glob.c Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) Modified: stable/8/lib/libc/gen/glob.c ============================================================================== --- stable/8/lib/libc/gen/glob.c Wed May 19 21:12:10 2010 (r208317) +++ stable/8/lib/libc/gen/glob.c Wed May 19 22:03:45 2010 (r208318) @@ -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-stable-8@FreeBSD.ORG Thu May 20 00:05:33 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C3C8D1065674; Thu, 20 May 2010 00:05: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 A81448FC08; Thu, 20 May 2010 00:05: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 o4K05XTc028541; Thu, 20 May 2010 00:05:33 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4K05XqB028538; Thu, 20 May 2010 00:05:33 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201005200005.o4K05XqB028538@svn.freebsd.org> From: Andrew Thompson Date: Thu, 20 May 2010 00:05:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208321 - stable/8/sys/dev/usb X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 May 2010 00:05:34 -0000 Author: thompsa Date: Thu May 20 00:05:33 2010 New Revision: 208321 URL: http://svn.freebsd.org/changeset/base/208321 Log: MFC r208012 Support getting signed and unsigned HID data. Submitted by: Alex Deiter Modified: stable/8/sys/dev/usb/usb_hid.c stable/8/sys/dev/usb/usbhid.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/dev/usb/usb_hid.c ============================================================================== --- stable/8/sys/dev/usb/usb_hid.c Wed May 19 23:56:26 2010 (r208320) +++ stable/8/sys/dev/usb/usb_hid.c Thu May 20 00:05:33 2010 (r208321) @@ -653,8 +653,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; @@ -683,16 +684,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: stable/8/sys/dev/usb/usbhid.h ============================================================================== --- stable/8/sys/dev/usb/usbhid.h Wed May 19 23:56:26 2010 (r208320) +++ stable/8/sys/dev/usb/usbhid.h Thu May 20 00:05:33 2010 (r208321) @@ -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-stable-8@FreeBSD.ORG Thu May 20 00:31:09 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 61572106566C; Thu, 20 May 2010 00:31:09 +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 4FE028FC15; Thu, 20 May 2010 00:31:09 +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 o4K0V9sd034275; Thu, 20 May 2010 00:31:09 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4K0V9EV034273; Thu, 20 May 2010 00:31:09 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201005200031.o4K0V9EV034273@svn.freebsd.org> From: Xin LI Date: Thu, 20 May 2010 00:31:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208325 - stable/8/usr.bin/rpcgen X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 May 2010 00:31:09 -0000 Author: delphij Date: Thu May 20 00:31:09 2010 New Revision: 208325 URL: http://svn.freebsd.org/changeset/base/208325 Log: MFC r207733: Plug memory leak. Modified: stable/8/usr.bin/rpcgen/rpc_cout.c Directory Properties: stable/8/usr.bin/rpcgen/ (props changed) Modified: stable/8/usr.bin/rpcgen/rpc_cout.c ============================================================================== --- stable/8/usr.bin/rpcgen/rpc_cout.c Thu May 20 00:13:01 2010 (r208324) +++ stable/8/usr.bin/rpcgen/rpc_cout.c Thu May 20 00:31:09 2010 (r208325) @@ -489,6 +489,7 @@ inline_struct(definition *def, int flag) } size = 0; i = 0; + free(sizestr); sizestr = NULL; print_stat(indent + 1, &dl->decl); } From owner-svn-src-stable-8@FreeBSD.ORG Thu May 20 06:51:48 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 77BCF1065673; Thu, 20 May 2010 06:51:48 +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 63B108FC1D; Thu, 20 May 2010 06:51: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 o4K6pmgu018357; Thu, 20 May 2010 06:51:48 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4K6pmax018346; Thu, 20 May 2010 06:51:48 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201005200651.o4K6pmax018346@svn.freebsd.org> From: Martin Matuska Date: Thu, 20 May 2010 06:51:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208334 - in stable/8: cddl/contrib/opensolaris/cmd/zdb cddl/contrib/opensolaris/cmd/ztest cddl/contrib/opensolaris/lib/libzpool/common cddl/contrib/opensolaris/lib/libzpool/common/sys ... X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 May 2010 06:51:48 -0000 Author: mm Date: Thu May 20 06:51:48 2010 New Revision: 208334 URL: http://svn.freebsd.org/changeset/base/208334 Log: MFC r208047: 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) Modified: stable/8/cddl/contrib/opensolaris/cmd/zdb/zdb.c stable/8/cddl/contrib/opensolaris/cmd/ztest/ztest.c stable/8/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c stable/8/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h stable/8/cddl/contrib/opensolaris/lib/libzpool/common/taskq.c stable/8/sys/cddl/boot/zfs/zfsimpl.h stable/8/sys/cddl/compat/opensolaris/sys/sysmacros.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scrub.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_traverse.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_pool.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/txg_impl.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_cache.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Directory Properties: stable/8/cddl/contrib/opensolaris/ (props changed) stable/8/cddl/contrib/opensolaris/cmd/zdb/ (props changed) stable/8/cddl/contrib/opensolaris/cmd/zfs/ (props changed) stable/8/cddl/contrib/opensolaris/lib/libzfs/ (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/cddl/contrib/opensolaris/cmd/zdb/zdb.c ============================================================================== --- stable/8/cddl/contrib/opensolaris/cmd/zdb/zdb.c Thu May 20 06:51:01 2010 (r208333) +++ stable/8/cddl/contrib/opensolaris/cmd/zdb/zdb.c Thu May 20 06:51:48 2010 (r208334) @@ -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: stable/8/cddl/contrib/opensolaris/cmd/ztest/ztest.c ============================================================================== --- stable/8/cddl/contrib/opensolaris/cmd/ztest/ztest.c Thu May 20 06:51:01 2010 (r208333) +++ stable/8/cddl/contrib/opensolaris/cmd/ztest/ztest.c Thu May 20 06:51:48 2010 (r208334) @@ -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: stable/8/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c ============================================================================== --- stable/8/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c Thu May 20 06:51:01 2010 (r208333) +++ stable/8/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c Thu May 20 06:51:48 2010 (r208334) @@ -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: stable/8/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h ============================================================================== --- stable/8/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h Thu May 20 06:51:01 2010 (r208333) +++ stable/8/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h Thu May 20 06:51:48 2010 (r208334) @@ -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: stable/8/cddl/contrib/opensolaris/lib/libzpool/common/taskq.c ============================================================================== --- stable/8/cddl/contrib/opensolaris/lib/libzpool/common/taskq.c Thu May 20 06:51:01 2010 (r208333) +++ stable/8/cddl/contrib/opensolaris/lib/libzpool/common/taskq.c Thu May 20 06:51:48 2010 (r208334) @@ -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: stable/8/sys/cddl/boot/zfs/zfsimpl.h ============================================================================== --- stable/8/sys/cddl/boot/zfs/zfsimpl.h Thu May 20 06:51:01 2010 (r208333) +++ stable/8/sys/cddl/boot/zfs/zfsimpl.h Thu May 20 06:51:48 2010 (r208334) @@ -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: stable/8/sys/cddl/compat/opensolaris/sys/sysmacros.h ============================================================================== --- stable/8/sys/cddl/compat/opensolaris/sys/sysmacros.h Thu May 20 06:51:01 2010 (r208333) +++ stable/8/sys/cddl/compat/opensolaris/sys/sysmacros.h Thu May 20 06:51:48 2010 (r208334) @@ -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: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Thu May 20 06:51:01 2010 (r208333) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Thu May 20 06:51:48 2010 (r208334) @@ -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: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Thu May 20 06:51:01 2010 (r208333) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Thu May 20 06:51:48 2010 (r208334) @@ -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-stable-8@FreeBSD.ORG Thu May 20 08:03:08 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F12871065672; Thu, 20 May 2010 08:03:08 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C716E8FC15; Thu, 20 May 2010 08:03:08 +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 o4K838DC033966; Thu, 20 May 2010 08:03:08 GMT (envelope-from maxim@svn.freebsd.org) Received: (from maxim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4K8381Q033965; Thu, 20 May 2010 08:03:08 GMT (envelope-from maxim@svn.freebsd.org) Message-Id: <201005200803.o4K8381Q033965@svn.freebsd.org> From: Maxim Konovalov Date: Thu, 20 May 2010 08:03:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208335 - stable/8/sbin/ping6 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 May 2010 08:03:09 -0000 Author: maxim Date: Thu May 20 08:03:08 2010 New Revision: 208335 URL: http://svn.freebsd.org/changeset/base/208335 Log: MFC r206889: add do-not-fragment option support to ping6(8). Modified: stable/8/sbin/ping6/ping6.8 stable/8/sbin/ping6/ping6.c Directory Properties: stable/8/sbin/ping6/ (props changed) Modified: stable/8/sbin/ping6/ping6.8 ============================================================================== --- stable/8/sbin/ping6/ping6.8 Thu May 20 06:51:48 2010 (r208334) +++ stable/8/sbin/ping6/ping6.8 Thu May 20 08:03:08 2010 (r208335) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 27, 2008 +.Dd April 20, 2010 .Dt PING6 8 .Os .Sh NAME @@ -40,9 +40,9 @@ packets to network hosts .Sh SYNOPSIS .Nm .\" without ipsec, or new ipsec -.Op Fl dfHmnNoqrRtvwW +.Op Fl DdfHmnNoqrRtvwW .\" old ipsec -.\" .Op Fl AdEfmnNqRtvwW +.\" .Op Fl ADdEfmnNqRtvwW .Bk -words .Op Fl a Ar addrtype .Ek @@ -141,6 +141,8 @@ Stop after sending .Ar count .Tn ECHO_RESPONSE packets. +.It Fl D +Disable IPv6 fragmentation. .It Fl d Set the .Dv SO_DEBUG Modified: stable/8/sbin/ping6/ping6.c ============================================================================== --- stable/8/sbin/ping6/ping6.c Thu May 20 06:51:48 2010 (r208334) +++ stable/8/sbin/ping6/ping6.c Thu May 20 08:03:08 2010 (r208335) @@ -191,6 +191,7 @@ struct tv32 { #define F_ONCE 0x200000 #define F_AUDIBLE 0x400000 #define F_MISSED 0x800000 +#define F_DONTFRAG 0x1000000 #define F_NOUSERDATA (F_NODEADDR | F_FQDN | F_FQDNOLD | F_SUPTYPES) u_int options; @@ -349,7 +350,7 @@ main(argc, argv) #endif /*IPSEC_POLICY_IPSEC*/ #endif while ((ch = getopt(argc, argv, - "a:b:c:dfHg:h:I:i:l:mnNop:qrRS:s:tvwW" ADDOPTS)) != -1) { + "a:b:c:DdfHg:h:I:i:l:mnNop:qrRS:s:tvwW" ADDOPTS)) != -1) { #undef ADDOPTS switch (ch) { case 'a': @@ -415,6 +416,9 @@ main(argc, argv) errx(1, "illegal number of packets -- %s", optarg); break; + case 'D': + options |= F_DONTFRAG; + break; case 'd': options |= F_SO_DEBUG; break; @@ -742,7 +746,11 @@ main(argc, argv) for (i = 0; i < sizeof(nonce); i += sizeof(u_int32_t)) *((u_int32_t *)&nonce[i]) = arc4random(); #endif - + optval = 1; + if (options & F_DONTFRAG) + if (setsockopt(s, IPPROTO_IPV6, IPV6_DONTFRAG, + &optval, sizeof(optval)) == -1) + err(1, "IPV6_DONTFRAG"); hold = 1; if (options & F_SO_DEBUG) @@ -2780,7 +2788,7 @@ usage() "A" #endif "usage: ping6 [-" - "d" + "Dd" #if defined(IPSEC) && !defined(IPSEC_POLICY_IPSEC) "E" #endif From owner-svn-src-stable-8@FreeBSD.ORG Thu May 20 08:43:29 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EF24D1065672; Thu, 20 May 2010 08:43:29 +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 DE9278FC21; Thu, 20 May 2010 08:43: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 o4K8hTuD042991; Thu, 20 May 2010 08:43:29 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4K8hTD3042989; Thu, 20 May 2010 08:43:29 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201005200843.o4K8hTD3042989@svn.freebsd.org> From: Marius Strobl Date: Thu, 20 May 2010 08:43:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208338 - stable/8/sys/modules/cas X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 May 2010 08:43:30 -0000 Author: marius Date: Thu May 20 08:43:29 2010 New Revision: 208338 URL: http://svn.freebsd.org/changeset/base/208338 Log: MFC: r208143 Add the ofw_bus_if.h dependency introduced with r207585 (MFC'ed to stable/8 in r208086). Modified: stable/8/sys/modules/cas/Makefile Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/modules/cas/Makefile ============================================================================== --- stable/8/sys/modules/cas/Makefile Thu May 20 08:15:06 2010 (r208337) +++ stable/8/sys/modules/cas/Makefile Thu May 20 08:43:29 2010 (r208338) @@ -3,6 +3,10 @@ .PATH: ${.CURDIR}/../../dev/cas KMOD= if_cas -SRCS= bus_if.h device_if.h if_cas.c miibus_if.h pci_if.h +SRCS= bus_if.h device_if.h if_cas.c miibus_if.h pci_if.h ${ofw_bus_if} + +.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "sparc64" +ofw_bus_if= ofw_bus_if.h +.endif .include From owner-svn-src-stable-8@FreeBSD.ORG Thu May 20 09:35:31 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 982251065688; Thu, 20 May 2010 09:35:31 +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 856138FC21; Thu, 20 May 2010 09:35: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 o4K9ZVvp054659; Thu, 20 May 2010 09:35:31 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4K9ZVlY054653; Thu, 20 May 2010 09:35:31 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201005200935.o4K9ZVlY054653@svn.freebsd.org> From: Martin Matuska Date: Thu, 20 May 2010 09:35:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208343 - stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 May 2010 09:35:31 -0000 Author: mm Date: Thu May 20 09:35:31 2010 New Revision: 208343 URL: http://svn.freebsd.org/changeset/base/208343 Log: MFC r208050: Fix ZIL-related panic on zfs rollback. OpenSolaris onnv-revision: 8746:e1d96ca6808c Approved by: pjd, delphij (mentor) Obtained from: OpenSolaris (Bug ID 6796377) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scrub.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Thu May 20 09:00:11 2010 (r208342) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Thu May 20 09:35:31 2010 (r208343) @@ -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: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c Thu May 20 09:00:11 2010 (r208342) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c Thu May 20 09:35:31 2010 (r208343) @@ -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: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Thu May 20 09:00:11 2010 (r208342) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Thu May 20 09:35:31 2010 (r208343) @@ -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: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scrub.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scrub.c Thu May 20 09:00:11 2010 (r208342) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scrub.c Thu May 20 09:35:31 2010 (r208343) @@ -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: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c Thu May 20 09:00:11 2010 (r208342) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c Thu May 20 09:35:31 2010 (r208343) @@ -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-stable-8@FreeBSD.ORG Thu May 20 09:38:15 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6F1141065677; Thu, 20 May 2010 09:38:15 +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 5D7F38FC15; Thu, 20 May 2010 09:38: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 o4K9cFF0055291; Thu, 20 May 2010 09:38:15 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4K9cFTF055286; Thu, 20 May 2010 09:38:15 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201005200938.o4K9cFTF055286@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 20 May 2010 09:38:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208344 - in stable/8/sys: fs/devfs kern sys X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 May 2010 09:38:15 -0000 Author: kib Date: Thu May 20 09:38:15 2010 New Revision: 208344 URL: http://svn.freebsd.org/changeset/base/208344 Log: MFC r207729: Add MAKEDEV_NOWAIT flag for make_dev_credf(9). Modified: stable/8/sys/fs/devfs/devfs_devs.c stable/8/sys/fs/devfs/devfs_int.h stable/8/sys/kern/kern_conf.c stable/8/sys/sys/conf.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/fs/devfs/devfs_devs.c ============================================================================== --- stable/8/sys/fs/devfs/devfs_devs.c Thu May 20 09:35:31 2010 (r208343) +++ stable/8/sys/fs/devfs/devfs_devs.c Thu May 20 09:38:15 2010 (r208344) @@ -112,17 +112,21 @@ SYSCTL_INT(_debug_sizeof, OID_AUTO, cdev 0, sizeof(struct cdev_priv), "sizeof(struct cdev_priv)"); struct cdev * -devfs_alloc(void) +devfs_alloc(int flags) { struct cdev_priv *cdp; struct cdev *cdev; struct timespec ts; - cdp = malloc(sizeof *cdp, M_CDEVP, M_USE_RESERVE | M_ZERO | M_WAITOK); + cdp = malloc(sizeof *cdp, M_CDEVP, M_USE_RESERVE | M_ZERO | + ((flags & MAKEDEV_NOWAIT) ? M_NOWAIT : M_WAITOK)); + if (cdp == NULL) + return (NULL); cdp->cdp_dirents = &cdp->cdp_dirent0; cdp->cdp_dirent0 = NULL; cdp->cdp_maxdirent = 0; + cdp->cdp_inode = 0; cdev = &cdp->cdp_c; @@ -130,6 +134,7 @@ devfs_alloc(void) LIST_INIT(&cdev->si_children); vfs_timestamp(&ts); cdev->si_atime = cdev->si_mtime = cdev->si_ctime = ts; + cdev->si_cred = NULL; return (cdev); } Modified: stable/8/sys/fs/devfs/devfs_int.h ============================================================================== --- stable/8/sys/fs/devfs/devfs_int.h Thu May 20 09:35:31 2010 (r208343) +++ stable/8/sys/fs/devfs/devfs_int.h Thu May 20 09:38:15 2010 (r208344) @@ -70,7 +70,7 @@ struct cdev_priv { #define cdev2priv(c) member2struct(cdev_priv, cdp_c, c) -struct cdev *devfs_alloc(void); +struct cdev *devfs_alloc(int); void devfs_free(struct cdev *); void devfs_create(struct cdev *dev); void devfs_destroy(struct cdev *dev); Modified: stable/8/sys/kern/kern_conf.c ============================================================================== --- stable/8/sys/kern/kern_conf.c Thu May 20 09:35:31 2010 (r208343) +++ stable/8/sys/kern/kern_conf.c Thu May 20 09:38:15 2010 (r208344) @@ -508,7 +508,7 @@ giant_mmap_single(struct cdev *dev, vm_o } static void -notify(struct cdev *dev, const char *ev) +notify(struct cdev *dev, const char *ev, int flags) { static const char prefix[] = "cdev="; char *data; @@ -517,7 +517,8 @@ notify(struct cdev *dev, const char *ev) if (cold) return; namelen = strlen(dev->si_name); - data = malloc(namelen + sizeof(prefix), M_TEMP, M_NOWAIT); + data = malloc(namelen + sizeof(prefix), M_TEMP, + (flags & MAKEDEV_NOWAIT) ? M_NOWAIT : M_WAITOK); if (data == NULL) return; memcpy(data, prefix, sizeof(prefix) - 1); @@ -527,17 +528,17 @@ notify(struct cdev *dev, const char *ev) } static void -notify_create(struct cdev *dev) +notify_create(struct cdev *dev, int flags) { - notify(dev, "CREATE"); + notify(dev, "CREATE", flags); } static void notify_destroy(struct cdev *dev) { - notify(dev, "DESTROY"); + notify(dev, "DESTROY", MAKEDEV_WAITOK); } static struct cdev * @@ -575,24 +576,27 @@ fini_cdevsw(struct cdevsw *devsw) devsw->d_flags &= ~D_INIT; } -static void -prep_cdevsw(struct cdevsw *devsw) +static int +prep_cdevsw(struct cdevsw *devsw, int flags) { struct cdevsw *dsw2; mtx_assert(&devmtx, MA_OWNED); if (devsw->d_flags & D_INIT) - return; + return (1); if (devsw->d_flags & D_NEEDGIANT) { dev_unlock(); - dsw2 = malloc(sizeof *dsw2, M_DEVT, M_WAITOK); + dsw2 = malloc(sizeof *dsw2, M_DEVT, + (flags & MAKEDEV_NOWAIT) ? M_NOWAIT : M_WAITOK); dev_lock(); + if (dsw2 == NULL && !(devsw->d_flags & D_INIT)) + return (0); } else dsw2 = NULL; if (devsw->d_flags & D_INIT) { if (dsw2 != NULL) cdevsw_free_devlocked(dsw2); - return; + return (1); } if (devsw->d_version != D_VERSION_01 && @@ -653,6 +657,7 @@ prep_cdevsw(struct cdevsw *devsw) if (dsw2 != NULL) cdevsw_free_devlocked(dsw2); + return (1); } static struct cdev * @@ -663,9 +668,15 @@ make_dev_credv(int flags, struct cdevsw struct cdev *dev; int i; - dev = devfs_alloc(); + dev = devfs_alloc(flags); + if (dev == NULL) + return (NULL); dev_lock(); - prep_cdevsw(devsw); + if (!prep_cdevsw(devsw, flags)) { + dev_unlock(); + devfs_free(dev); + return (NULL); + } dev = newdev(devsw, unit, dev); if (flags & MAKEDEV_REF) dev_refl(dev); @@ -692,8 +703,6 @@ make_dev_credv(int flags, struct cdevsw dev->si_flags |= SI_NAMED; if (cr != NULL) dev->si_cred = crhold(cr); - else - dev->si_cred = NULL; dev->si_uid = uid; dev->si_gid = gid; dev->si_mode = mode; @@ -702,7 +711,7 @@ make_dev_credv(int flags, struct cdevsw clean_unrhdrl(devfs_inos); dev_unlock_and_free(); - notify_create(dev); + notify_create(dev, flags); return (dev); } @@ -777,7 +786,7 @@ make_dev_alias(struct cdev *pdev, const int i; KASSERT(pdev != NULL, ("NULL pdev")); - dev = devfs_alloc(); + dev = devfs_alloc(MAKEDEV_WAITOK); dev_lock(); dev->si_flags |= SI_ALIAS; dev->si_flags |= SI_NAMED; @@ -794,7 +803,7 @@ make_dev_alias(struct cdev *pdev, const clean_unrhdrl(devfs_inos); dev_unlock(); - notify_create(dev); + notify_create(dev, MAKEDEV_WAITOK); return (dev); } @@ -979,9 +988,9 @@ clone_create(struct clonedevs **cdp, str * the end of the list. */ unit = *up; - ndev = devfs_alloc(); + ndev = devfs_alloc(MAKEDEV_WAITOK); dev_lock(); - prep_cdevsw(csw); + prep_cdevsw(csw, MAKEDEV_WAITOK); low = extra; de = dl = NULL; cd = *cdp; Modified: stable/8/sys/sys/conf.h ============================================================================== --- stable/8/sys/sys/conf.h Thu May 20 09:35:31 2010 (r208343) +++ stable/8/sys/sys/conf.h Thu May 20 09:38:15 2010 (r208344) @@ -271,8 +271,10 @@ struct cdev *make_dev(struct cdevsw *_de struct cdev *make_dev_cred(struct cdevsw *_devsw, int _unit, struct ucred *_cr, uid_t _uid, gid_t _gid, int _perms, const char *_fmt, ...) __printflike(7, 8); -#define MAKEDEV_REF 0x1 -#define MAKEDEV_WHTOUT 0x2 +#define MAKEDEV_REF 0x1 +#define MAKEDEV_WHTOUT 0x2 +#define MAKEDEV_NOWAIT 0x4 +#define MAKEDEV_WAITOK 0x8 struct cdev *make_dev_credf(int _flags, struct cdevsw *_devsw, int _unit, struct ucred *_cr, uid_t _uid, gid_t _gid, int _mode, From owner-svn-src-stable-8@FreeBSD.ORG Thu May 20 09:39:01 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B62BC1065677; Thu, 20 May 2010 09:39:01 +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 A5C388FC08; Thu, 20 May 2010 09:39: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 o4K9d1bF055503; Thu, 20 May 2010 09:39:01 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4K9d1n4055500; Thu, 20 May 2010 09:39:01 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201005200939.o4K9d1n4055500@svn.freebsd.org> From: Martin Matuska Date: Thu, 20 May 2010 09:39:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208345 - in stable/8: . rescue/rescue X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 May 2010 09:39:01 -0000 Author: mm Date: Thu May 20 09:39:01 2010 New Revision: 208345 URL: http://svn.freebsd.org/changeset/base/208345 Log: Add xz to rescue. Approved by: delphij (mentor) Modified: stable/8/Makefile.inc1 stable/8/rescue/rescue/Makefile Modified: stable/8/Makefile.inc1 ============================================================================== --- stable/8/Makefile.inc1 Thu May 20 09:38:15 2010 (r208344) +++ stable/8/Makefile.inc1 Thu May 20 09:39:01 2010 (r208345) @@ -1094,7 +1094,7 @@ _prebuild_libs= ${_kerberos5_lib_libasn1 lib/libbz2 lib/libcom_err lib/libcrypt \ lib/libexpat \ ${_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: stable/8/rescue/rescue/Makefile ============================================================================== --- stable/8/rescue/rescue/Makefile Thu May 20 09:38:15 2010 (r208344) +++ stable/8/rescue/rescue/Makefile Thu May 20 09:39:01 2010 (r208345) @@ -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" From owner-svn-src-stable-8@FreeBSD.ORG Thu May 20 09:41:13 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E10831065674; Thu, 20 May 2010 09:41:13 +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 D07A98FC0A; Thu, 20 May 2010 09:41: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 o4K9fD5Y056041; Thu, 20 May 2010 09:41:13 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4K9fDlc056039; Thu, 20 May 2010 09:41:13 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201005200941.o4K9fDlc056039@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 20 May 2010 09:41:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208346 - stable/8/share/man/man9 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 May 2010 09:41:14 -0000 Author: kib Date: Thu May 20 09:41:13 2010 New Revision: 208346 URL: http://svn.freebsd.org/changeset/base/208346 Log: MFC r207730: Document MAKEDEV_NOWAIT flag for make_dev_credf(9). Modified: stable/8/share/man/man9/make_dev.9 Directory Properties: stable/8/share/man/man9/ (props changed) Modified: stable/8/share/man/man9/make_dev.9 ============================================================================== --- stable/8/share/man/man9/make_dev.9 Thu May 20 09:39:01 2010 (r208345) +++ stable/8/share/man/man9/make_dev.9 Thu May 20 09:41:13 2010 (r208346) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 28, 2008 +.Dd May 6, 2010 .Os .Dt MAKE_DEV 9 .Sh NAME @@ -133,9 +133,18 @@ The following values are currently accep .Pp .Bd -literal -offset indent -compact MAKEDEV_REF reference the created device +MAKEDEV_NOWAIT do not sleep, may return NULL +MAKEDEV_WAITOK allow the function to sleep to satisfy malloc .Ed .Pp The +.Dv MAKEDEV_WAITOK +flag is assumed if none of +.Dv MAKEDEV_WAITOK , +.Dv MAKEDEV_NOWAIT +is specified. +.Pp +The .Xr dev_clone 9 event handler shall specify .Dv MAKEDEV_REF From owner-svn-src-stable-8@FreeBSD.ORG Thu May 20 16:21:19 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C5BEF1065675; Thu, 20 May 2010 16:21:19 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9B4898FC08; Thu, 20 May 2010 16:21: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 o4KGLJIn045609; Thu, 20 May 2010 16:21:19 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4KGLJ71045607; Thu, 20 May 2010 16:21:19 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201005201621.o4KGLJ71045607@svn.freebsd.org> From: Alan Cox Date: Thu, 20 May 2010 16:21:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208352 - stable/8/sys/vm X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 May 2010 16:21:19 -0000 Author: alc Date: Thu May 20 16:21:19 2010 New Revision: 208352 URL: http://svn.freebsd.org/changeset/base/208352 Log: MFC r207306 Change vm_object_madvise() so that it checks whether the page is invalid or unmanaged before acquiring the page queues lock. Neither of these tests require that lock. Moreover, a better way of testing if the page is unmanaged is to test the type of vm object. This avoids a pointless vm_page_lookup(). Modified: stable/8/sys/vm/vm_object.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/vm/vm_object.c ============================================================================== --- stable/8/sys/vm/vm_object.c Thu May 20 15:45:04 2010 (r208351) +++ stable/8/sys/vm/vm_object.c Thu May 20 16:21:19 2010 (r208352) @@ -1162,7 +1162,8 @@ shadowlookup: (tobject->flags & OBJ_ONEMAPPING) == 0) { goto unlock_tobject; } - } + } else if (tobject->type == OBJT_PHYS) + goto unlock_tobject; m = vm_page_lookup(tobject, tpindex); if (m == NULL && advise == MADV_WILLNEED) { /* @@ -1189,18 +1190,13 @@ shadowlookup: VM_OBJECT_UNLOCK(tobject); tobject = backing_object; goto shadowlookup; - } + } else if (m->valid != VM_PAGE_BITS_ALL) + goto unlock_tobject; /* - * If the page is busy or not in a normal active state, - * we skip it. If the page is not managed there are no - * page queues to mess with. Things can break if we mess - * with pages in any of the below states. + * If the page is not in a normal state, skip it. */ vm_page_lock_queues(); - if (m->hold_count || - m->wire_count || - (m->flags & PG_UNMANAGED) || - m->valid != VM_PAGE_BITS_ALL) { + if (m->hold_count != 0 || m->wire_count != 0) { vm_page_unlock_queues(); goto unlock_tobject; } From owner-svn-src-stable-8@FreeBSD.ORG Thu May 20 18:45:08 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 36D5E106572A; Thu, 20 May 2010 18:45:08 +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 0BB8A8FC23; Thu, 20 May 2010 18:45:08 +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 o4KIj7Ze077995; Thu, 20 May 2010 18:45:07 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4KIj7kx077993; Thu, 20 May 2010 18:45:07 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201005201845.o4KIj7kx077993@svn.freebsd.org> From: Edward Tomasz Napierala Date: Thu, 20 May 2010 18:45:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208358 - stable/8/lib/libc/posix1e X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 May 2010 18:45:08 -0000 Author: trasz Date: Thu May 20 18:45:07 2010 New Revision: 208358 URL: http://svn.freebsd.org/changeset/base/208358 Log: MFC r208033: 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. Modified: stable/8/lib/libc/posix1e/acl_perm.c Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) Modified: stable/8/lib/libc/posix1e/acl_perm.c ============================================================================== --- stable/8/lib/libc/posix1e/acl_perm.c Thu May 20 18:39:33 2010 (r208357) +++ stable/8/lib/libc/posix1e/acl_perm.c Thu May 20 18:45:07 2010 (r208358) @@ -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-stable-8@FreeBSD.ORG Thu May 20 18:46:11 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA4951065673; Thu, 20 May 2010 18:46:11 +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 A95028FC2A; Thu, 20 May 2010 18:46: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 o4KIkBeO078275; Thu, 20 May 2010 18:46:11 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4KIkB0t078273; Thu, 20 May 2010 18:46:11 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201005201846.o4KIkB0t078273@svn.freebsd.org> From: Edward Tomasz Napierala Date: Thu, 20 May 2010 18:46:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208359 - stable/8/lib/libc/posix1e X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 May 2010 18:46:11 -0000 Author: trasz Date: Thu May 20 18:46:11 2010 New Revision: 208359 URL: http://svn.freebsd.org/changeset/base/208359 Log: MFC r208034: Make branding less intrusive - in acl_set(3), in case ACL brand is ACL_BRAND_UNKNOWN, do what the programmer says instead of failing. Modified: stable/8/lib/libc/posix1e/acl_branding.c Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) Modified: stable/8/lib/libc/posix1e/acl_branding.c ============================================================================== --- stable/8/lib/libc/posix1e/acl_branding.c Thu May 20 18:45:07 2010 (r208358) +++ stable/8/lib/libc/posix1e/acl_branding.c Thu May 20 18:46:11 2010 (r208359) @@ -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-stable-8@FreeBSD.ORG Thu May 20 18:47:34 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 88F361065670; Thu, 20 May 2010 18:47:34 +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 783A08FC0C; Thu, 20 May 2010 18:47:34 +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 o4KIlYZX078649; Thu, 20 May 2010 18:47:34 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4KIlYHe078647; Thu, 20 May 2010 18:47:34 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201005201847.o4KIlYHe078647@svn.freebsd.org> From: Edward Tomasz Napierala Date: Thu, 20 May 2010 18:47:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208360 - stable/8/bin/setfacl X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 May 2010 18:47:34 -0000 Author: trasz Date: Thu May 20 18:47:34 2010 New Revision: 208360 URL: http://svn.freebsd.org/changeset/base/208360 Log: MFC r208035: Update authors and history. Modified: stable/8/bin/setfacl/setfacl.1 Directory Properties: stable/8/bin/setfacl/ (props changed) Modified: stable/8/bin/setfacl/setfacl.1 ============================================================================== --- stable/8/bin/setfacl/setfacl.1 Thu May 20 18:46:11 2010 (r208359) +++ stable/8/bin/setfacl/setfacl.1 Thu May 20 18:47:34 2010 (r208360) @@ -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-stable-8@FreeBSD.ORG Thu May 20 22:12:36 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DB1D41065673; Thu, 20 May 2010 22:12:36 +0000 (UTC) (envelope-from nork@FreeBSD.org) Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C94658FC14; Thu, 20 May 2010 22:12: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 o4KMCaZs024270; Thu, 20 May 2010 22:12:36 GMT (envelope-from nork@svn.freebsd.org) Received: (from nork@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4KMCa74024268; Thu, 20 May 2010 22:12:36 GMT (envelope-from nork@svn.freebsd.org) Message-Id: <201005202212.o4KMCa74024268@svn.freebsd.org> From: Norikatsu Shigemura Date: Thu, 20 May 2010 22:12:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208365 - stable/8/usr.sbin/mergemaster X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 May 2010 22:12:37 -0000 Author: nork Date: Thu May 20 22:12:36 2010 New Revision: 208365 URL: http://svn.freebsd.org/changeset/base/208365 Log: MFC r207612: Add support run services_mkdb(8). Approved by: dougb, imp (mentor) Reviewed by: ume Modified: stable/8/usr.sbin/mergemaster/mergemaster.sh Directory Properties: stable/8/usr.sbin/mergemaster/ (props changed) Modified: stable/8/usr.sbin/mergemaster/mergemaster.sh ============================================================================== --- stable/8/usr.sbin/mergemaster/mergemaster.sh Thu May 20 21:07:58 2010 (r208364) +++ stable/8/usr.sbin/mergemaster/mergemaster.sh Thu May 20 22:12:36 2010 (r208365) @@ -851,6 +851,9 @@ mm_install () { /etc/login.conf) NEED_CAP_MKDB=yes ;; + /etc/services) + NEED_SERVICES_MKDB=yes + ;; /etc/master.passwd) do_install_and_rm 600 "${1}" "${DESTDIR}${INSTALL_DIR}" NEED_PWD_MKDB=yes @@ -1280,6 +1283,17 @@ case "${NEED_CAP_MKDB}" in ;; esac +case "${NEED_SERVICES_MKDB}" in +'') ;; +*) + echo '' + echo "*** You installed a services file, so make sure that you run" + echo " '/usr/sbin/services_mkdb -q -o ${DESTDIR}/var/db/services.db ${DESTDIR}/etc/services'" + echo " to rebuild your services database" + run_it_now "/usr/sbin/services_mkdb -q -o ${DESTDIR}/var/db/services.db ${DESTDIR}/etc/services" + ;; +esac + case "${NEED_PWD_MKDB}" in '') ;; *) From owner-svn-src-stable-8@FreeBSD.ORG Fri May 21 04:47:23 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 560D71065672; Fri, 21 May 2010 04:47:23 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 44B6C8FC22; Fri, 21 May 2010 04:47: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 o4L4lN28011181; Fri, 21 May 2010 04:47:23 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4L4lN5M011179; Fri, 21 May 2010 04:47:23 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201005210447.o4L4lN5M011179@svn.freebsd.org> From: "Kenneth D. Merry" Date: Fri, 21 May 2010 04:47:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208367 - stable/8/sys/netinet X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 May 2010 04:47:23 -0000 Author: ken Date: Fri May 21 04:47:22 2010 New Revision: 208367 URL: http://svn.freebsd.org/changeset/base/208367 Log: MFC r206844: Don't clear other flags (e.g. CSUM_TCP) when setting CSUM_TSO. This was causing TSO to break for the Xen netfront driver. Reviewed by: gibbs, rwatson Modified: stable/8/sys/netinet/tcp_output.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/netinet/tcp_output.c ============================================================================== --- stable/8/sys/netinet/tcp_output.c Thu May 20 23:06:53 2010 (r208366) +++ stable/8/sys/netinet/tcp_output.c Fri May 21 04:47:22 2010 (r208367) @@ -1051,7 +1051,7 @@ send: * XXX: Fixme: This is currently not the case for IPv6. */ if (tso) { - m->m_pkthdr.csum_flags = CSUM_TSO; + m->m_pkthdr.csum_flags |= CSUM_TSO; m->m_pkthdr.tso_segsz = tp->t_maxopd - optlen; } From owner-svn-src-stable-8@FreeBSD.ORG Fri May 21 16:01:57 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B3C59106567B; Fri, 21 May 2010 16:01:57 +0000 (UTC) (envelope-from stefanf@FreeBSD.org) Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 888DD8FC20; Fri, 21 May 2010 16:01: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 o4LG1vYN062600; Fri, 21 May 2010 16:01:57 GMT (envelope-from stefanf@svn.freebsd.org) Received: (from stefanf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4LG1vB6062597; Fri, 21 May 2010 16:01:57 GMT (envelope-from stefanf@svn.freebsd.org) Message-Id: <201005211601.o4LG1vB6062597@svn.freebsd.org> From: Stefan Farfeleder Date: Fri, 21 May 2010 16:01:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208380 - stable/8/tools/regression/bin/sh/builtins X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 May 2010 16:01:57 -0000 Author: stefanf Date: Fri May 21 16:01:57 2010 New Revision: 208380 URL: http://svn.freebsd.org/changeset/base/208380 Log: Merge r199628 and r199632: Tests for the cd command. Added: stable/8/tools/regression/bin/sh/builtins/cd2.0 - copied unchanged from r199632, head/tools/regression/bin/sh/builtins/cd2.0 Modified: stable/8/tools/regression/bin/sh/builtins/cd1.0 Directory Properties: stable/8/tools/regression/bin/sh/ (props changed) Modified: stable/8/tools/regression/bin/sh/builtins/cd1.0 ============================================================================== --- stable/8/tools/regression/bin/sh/builtins/cd1.0 Fri May 21 15:57:24 2010 (r208379) +++ stable/8/tools/regression/bin/sh/builtins/cd1.0 Fri May 21 16:01:57 2010 (r208380) @@ -1,17 +1,27 @@ # $FreeBSD$ set -e -PDIR=${TMPDIR:-/tmp} -cd ${PDIR} -TMPDIR=$(mktemp -d sh-test.XXXXXX) -chmod 0 ${TMPDIR} +P=${TMPDIR:-/tmp} +cd $P +T=$(mktemp -d sh-test.XXXXXX) -cd -L ${TMPDIR} 2>/dev/null && exit 1 -[ "${PWD}" = "${PDIR}" ] -[ "$(pwd)" = "${PDIR}" ] -cd -P ${TMPDIR} 2>/dev/null && exit 1 -[ "${PWD}" = "${PDIR}" ] -[ "$(pwd)" = "${PDIR}" ] +chmod 0 $T +cd -L $T 2>/dev/null && exit 1 +[ "$PWD" = "$P" ] +[ "$(pwd)" = "$P" ] +cd -P $T 2>/dev/null && exit 1 +[ "$PWD" = "$P" ] +[ "$(pwd)" = "$P" ] -chmod 755 ${TMPDIR} -rmdir ${TMPDIR} +chmod 755 $T +cd $T +mkdir -p 1/2/3 +ln -s 1/2 link1 +ln -s 2/3 1/link2 +(cd -L 1/../1 && [ "$(pwd -L)" = "$P/$T/1" ]) +(cd -L link1 && [ "$(pwd -L)" = "$P/$T/link1" ]) +(cd -L link1 && [ "$(pwd -P)" = "$P/$T/1/2" ]) +(cd -P link1 && [ "$(pwd -L)" = "$P/$T/1/2" ]) +(cd -P link1 && [ "$(pwd -P)" = "$P/$T/1/2" ]) + +rm -rf ${P}/${T} Copied: stable/8/tools/regression/bin/sh/builtins/cd2.0 (from r199632, head/tools/regression/bin/sh/builtins/cd2.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/bin/sh/builtins/cd2.0 Fri May 21 16:01:57 2010 (r208380, copy of r199632, head/tools/regression/bin/sh/builtins/cd2.0) @@ -0,0 +1,15 @@ +# $FreeBSD$ +set -e + +T=$(mktemp -d ${TMPDIR:-/tmp}/sh-test.XXXXXX) +cd $T +D=$T +for i in 0 1 2 3 4 5 6 7 8 9; do + for j in 0 1 2 3 4 5 6 7 8 9; do + mkdir veryverylongdirectoryname + cd veryverylongdirectoryname + D=$D/veryverylongdirectoryname + done +done +[ $(pwd | wc -c) -eq $((${#D} + 1)) ] # +\n +rm -rf ${T} From owner-svn-src-stable-8@FreeBSD.ORG Fri May 21 16:07:20 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA606106564A; Fri, 21 May 2010 16:07:20 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AFDC68FC08; Fri, 21 May 2010 16:07: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 o4LG7K7g063871; Fri, 21 May 2010 16:07:20 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4LG7KxO063869; Fri, 21 May 2010 16:07:20 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201005211607.o4LG7KxO063869@svn.freebsd.org> From: John Baldwin Date: Fri, 21 May 2010 16:07:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208382 - stable/8/sys/net X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 May 2010 16:07:21 -0000 Author: jhb Date: Fri May 21 16:07:20 2010 New Revision: 208382 URL: http://svn.freebsd.org/changeset/base/208382 Log: MFC 208212: Ignore failures from removing multicast addresses from the parent (trunk) interface when tearing down a vlan interface. Modified: stable/8/sys/net/if_vlan.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/net/if_vlan.c ============================================================================== --- stable/8/sys/net/if_vlan.c Fri May 21 16:03:57 2010 (r208381) +++ stable/8/sys/net/if_vlan.c Fri May 21 16:07:20 2010 (r208382) @@ -186,8 +186,8 @@ static int vlan_setflag(struct ifnet *if int (*func)(struct ifnet *, int)); static int vlan_setflags(struct ifnet *ifp, int status); static int vlan_setmulti(struct ifnet *ifp); -static int vlan_unconfig(struct ifnet *ifp); -static int vlan_unconfig_locked(struct ifnet *ifp); +static void vlan_unconfig(struct ifnet *ifp); +static void vlan_unconfig_locked(struct ifnet *ifp); static int vlan_config(struct ifvlan *ifv, struct ifnet *p, uint16_t tag); static void vlan_link_state(struct ifnet *ifp, int link); static void vlan_capabilities(struct ifvlan *ifv); @@ -1081,25 +1081,22 @@ done: return (error); } -static int +static void vlan_unconfig(struct ifnet *ifp) { - int ret; VLAN_LOCK(); - ret = vlan_unconfig_locked(ifp); + vlan_unconfig_locked(ifp); VLAN_UNLOCK(); - return (ret); } -static int +static void vlan_unconfig_locked(struct ifnet *ifp) { struct ifvlantrunk *trunk; struct vlan_mc_entry *mc; struct ifvlan *ifv; struct ifnet *parent; - int error; VLAN_LOCK_ASSERT(); @@ -1128,9 +1125,15 @@ vlan_unconfig_locked(struct ifnet *ifp) while ((mc = SLIST_FIRST(&ifv->vlan_mc_listhead)) != NULL) { bcopy((char *)&mc->mc_addr, LLADDR(&sdl), ETHER_ADDR_LEN); - error = if_delmulti(parent, (struct sockaddr *)&sdl); - if (error) - return (error); + + /* + * This may fail if the parent interface is + * being detached. Regardless, we should do a + * best effort to free this interface as much + * as possible as all callers expect vlan + * destruction to succeed. + */ + (void)if_delmulti(parent, (struct sockaddr *)&sdl); SLIST_REMOVE_HEAD(&ifv->vlan_mc_listhead, mc_entries); free(mc, M_VLAN); } @@ -1176,8 +1179,6 @@ vlan_unconfig_locked(struct ifnet *ifp) */ if (parent != NULL) EVENTHANDLER_INVOKE(vlan_unconfig, parent, ifv->ifv_tag); - - return (0); } /* Handle a reference counted flag that should be set on the parent as well */ From owner-svn-src-stable-8@FreeBSD.ORG Fri May 21 16:17:10 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C20C1065673; Fri, 21 May 2010 16:17:10 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5AF3C8FC23; Fri, 21 May 2010 16:17: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 o4LGH8Dw066153; Fri, 21 May 2010 16:17:08 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4LGH8fK066151; Fri, 21 May 2010 16:17:08 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201005211617.o4LGH8fK066151@svn.freebsd.org> From: John Baldwin Date: Fri, 21 May 2010 16:17:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208384 - stable/8/etc X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 May 2010 16:17:10 -0000 Author: jhb Date: Fri May 21 16:17:08 2010 New Revision: 208384 URL: http://svn.freebsd.org/changeset/base/208384 Log: MFC 208213: Prevent unloading a kld for a driver that has subinterfaces (vlan and/or wlan interfaces) from being automatically reloaded via devd shutdown event handlers. - Revert part of my previous changes to call ifn_stop on subinterfaces when an interface is detached. It is better to destroy the interfaces first so that an 'ifconfig foo0.blah down' doesn't result in ifconfig auto-loading if_foo.ko. The ifconfig command will not be invoked if foo0.blah is gone when ifn_stop() is called. Furthermore, it is not necessary to explicitly invoke ifn_stop() after the subinterface is destroyed as devd will already do that. - Pass -n to ifconfig when destroying interfaces so that destroying a cloned interface does not kldload any drivers. Modified: stable/8/etc/network.subr Directory Properties: stable/8/etc/ (props changed) Modified: stable/8/etc/network.subr ============================================================================== --- stable/8/etc/network.subr Fri May 21 16:07:41 2010 (r208383) +++ stable/8/etc/network.subr Fri May 21 16:17:08 2010 (r208384) @@ -516,7 +516,7 @@ clone_down() _prefix= _list= for ifn in ${cloned_interfaces}; do - ifconfig ${ifn} destroy + ifconfig -n ${ifn} destroy if [ $? -eq 0 ]; then _list="${_list}${_prefix}${ifn}" [ -z "$_prefix" ] && _prefix=' ' @@ -599,10 +599,7 @@ childif_destroy() if ! ifexists $child; then continue fi - if autoif $child; then - ifn_stop $child - fi - ifconfig $child destroy && cfg=0 + ifconfig -n $child destroy && cfg=0 done child_vlans=`get_if_var $ifn vlans_IF` @@ -613,10 +610,7 @@ childif_destroy() if ! ifexists $child; then continue fi - if autoif $child; then - ifn_stop $child - fi - ifconfig $child destroy && cfg=0 + ifconfig -n $child destroy && cfg=0 done return ${cfg} From owner-svn-src-stable-8@FreeBSD.ORG Fri May 21 19:09:42 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A3F52106566B; Fri, 21 May 2010 19:09:42 +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 8DF798FC08; Fri, 21 May 2010 19:09: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 o4LJ9gxg009067; Fri, 21 May 2010 19:09:42 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4LJ9gwr009016; Fri, 21 May 2010 19:09:42 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201005211909.o4LJ9gwr009016@svn.freebsd.org> From: Marius Strobl Date: Fri, 21 May 2010 19:09:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208395 - in stable/8/tools/regression/usr.bin/sed: . regress.multitest.out X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 May 2010 19:09:42 -0000 Author: marius Date: Fri May 21 19:09:41 2010 New Revision: 208395 URL: http://svn.freebsd.org/changeset/base/208395 Log: MFC: r197352 The transition to Subversion allows us to rename files without repo-copy hacks. Remove the test-number prefix from the name of the output files, so that new test cases can be easily added. Added: stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.1 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/1.1 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.10 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/1.10 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.11 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/1.11 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.12 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/1.12 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.13 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/1.13 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.14 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/1.14 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.15 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/1.15 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.16 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/1.16 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.17 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/1.17 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.18 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/1.18 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.2 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/1.2 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.3 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/1.3 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.4 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/1.4 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.4.1 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/1.4.1 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.5 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/1.5 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.6 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/1.6 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.7 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/1.7 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.8 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/1.8 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.9 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/1.9 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.1 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/2.1 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.10 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/2.10 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.11 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/2.11 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.12 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/2.12 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.13 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/2.13 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.14 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/2.14 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.15 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/2.15 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.16 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/2.16 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.17 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/2.17 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.18 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/2.18 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.19 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/2.19 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.2 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/2.2 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.20 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/2.20 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.21 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/2.21 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.22 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/2.22 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.3 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/2.3 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.4 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/2.4 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.5 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/2.5 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.6 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/2.6 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.7 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/2.7 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.8 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/2.8 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.9 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/2.9 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/3.1 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/3.1 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/3.2 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/3.2 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/3.3 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/3.3 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/3.4 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/3.4 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/4.1 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/4.1 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/4.2 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/4.2 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/4.3 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/4.3 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/4.4 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/4.4 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/4.5 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/4.5 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/4.6 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/4.6 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/4.7 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/4.7 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/4.8 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/4.8 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/5.1 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/5.1 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/5.2 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/5.2 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/5.3 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/5.3 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/5.4 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/5.4 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/5.5 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/5.5 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/5.6 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/5.6 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/5.7 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/5.7 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/5.8 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/5.8 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/6.1 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/6.1 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/6.2 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/6.2 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/6.3 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/6.3 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/6.4 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/6.4 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/6.5 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/6.5 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/6.6 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/6.6 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/7.1 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/7.1 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/7.2 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/7.2 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/7.3 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/7.3 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/7.4 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/7.4 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/7.5 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/7.5 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/7.6 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/7.6 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/7.7 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/7.7 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/7.8 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/7.8 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/8.1 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/8.1 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/8.10 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/8.10 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/8.11 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/8.11 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/8.12 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/8.12 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/8.13 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/8.13 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/8.14 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/8.14 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/8.15 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/8.15 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/8.16 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/8.16 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/8.17 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/8.17 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/8.2 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/8.2 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/8.3 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/8.3 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/8.4 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/8.4 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/8.5 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/8.5 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/8.6 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/8.6 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/8.7 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/8.7 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/8.8 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/8.8 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/8.9 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/8.9 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/9.1 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/9.1 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/9.10 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/9.10 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/9.11 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/9.11 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/9.12 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/9.12 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/9.13 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/9.13 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/9.14 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/9.14 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/9.15 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/9.15 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/9.16 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/9.16 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/9.17 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/9.17 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/9.18 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/9.18 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/9.19 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/9.19 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/9.2 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/9.2 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/9.20 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/9.20 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/9.21 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/9.21 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/9.22 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/9.22 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/9.23 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/9.23 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/9.24 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/9.24 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/9.25 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/9.25 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/9.26 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/9.26 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/9.27 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/9.27 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/9.28 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/9.28 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/9.29 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/9.29 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/9.3 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/9.3 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/9.30 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/9.30 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/9.31 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/9.31 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/9.4 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/9.4 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/9.5 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/9.5 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/9.6 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/9.6 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/9.7 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/9.7 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/9.8 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/9.8 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/9.9 - copied unchanged from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/9.9 Deleted: stable/8/tools/regression/usr.bin/sed/regress.multitest.out/100_9.10 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/101_9.11 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/102_9.12 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/103_9.13 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/104_9.14 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/105_9.15 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/106_9.16 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/107_9.17 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/108_9.18 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/109_9.19 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/10_1.9 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/110_9.20 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/111_9.21 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/112_9.22 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/113_9.23 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/114_9.24 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/115_9.25 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/116_9.26 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/117_9.27 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/118_9.28 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/119_9.29 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/11_1.10 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/120_9.30 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/121_9.31 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/12_1.11 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/13_1.12 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/14_1.13 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/15_1.14 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/16_1.15 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/17_1.16 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/18_1.17 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/19_1.18 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1_1.1 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/20_2.1 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/21_2.2 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/22_2.3 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/23_2.4 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/24_2.5 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/25_2.6 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/26_2.7 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/27_2.8 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/28_2.9 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/29_2.10 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2_1.2 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/30_2.11 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/31_2.12 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/32_2.13 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/33_2.14 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/34_2.15 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/35_2.16 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/36_2.17 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/37_2.18 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/38_2.19 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/39_2.20 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/3_1.3 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/40_2.21 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/40_3.1 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/41_2.22 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/41_3.2 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/42_3.3 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/43_3.4 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/44_4.1 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/45_4.2 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/46_4.3 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/47_4.4 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/48_4.5 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/49_4.6 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/4_1.4 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/50_4.7 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/51_4.8 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/52_5.1 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/53_5.2 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/54_5.3 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/55_5.4 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/56_5.5 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/57_5.6 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/58_5.7 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/59_5.8 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/5_1.4.1 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/60_6.1 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/61_6.2 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/62_6.3 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/63_6.4 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/64_6.5 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/65_6.6 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/66_7.1 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/67_7.2 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/68_7.3 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/69_7.4 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/6_1.5 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/70_7.5 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/71_7.6 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/72_7.7 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/73_7.8 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/74_8.1 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/75_8.2 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/76_8.3 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/77_8.4 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/78_8.5 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/79_8.6 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/7_1.6 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/80_8.7 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/81_8.8 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/82_8.9 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/83_8.10 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/84_8.11 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/85_8.12 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/86_8.13 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/87_8.14 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/88_8.15 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/89_8.16 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/8_1.7 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/90_8.17 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/91_9.1 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/92_9.2 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/93_9.3 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/94_9.4 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/95_9.5 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/96_9.6 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/97_9.7 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/98_9.8 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/99_9.9 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/9_1.8 Modified: stable/8/tools/regression/usr.bin/sed/multitest.t Directory Properties: stable/8/tools/regression/usr.bin/sed/ (props changed) Modified: stable/8/tools/regression/usr.bin/sed/multitest.t ============================================================================== --- stable/8/tools/regression/usr.bin/sed/multitest.t Fri May 21 19:08:24 2010 (r208394) +++ stable/8/tools/regression/usr.bin/sed/multitest.t Fri May 21 19:09:41 2010 (r208395) @@ -37,11 +37,9 @@ # # The directory regress.test.out contains the expected test results # -# These are the regression tests created during the development of the -# BSD sed. The reference file naming scheme used in this script can't -# handle gracefully the insertion of new tests between existing ones. -# Therefore, either use the new m4-based regress.t framework, or add -# tests after the last existing test. +# These are the regression tests mostly created during the development +# of the BSD sed. Each test should have a unique mark name, which is +# used for naming the corresponding file in regress.multitest.out. main() { @@ -88,11 +86,11 @@ result() else TODO='' fi - if ! [ -r $REGRESS/${MARK}_${TESTNAME} ] ; then - echo "Seeding $REGRESS/${MARK}_${TESTNAME} with current result" 1>&2 - cp current.out $REGRESS/${MARK}_${TESTNAME} + if ! [ -r $REGRESS/${TESTNAME} ] ; then + echo "Seeding $REGRESS/${TESTNAME} with current result" 1>&2 + cp current.out $REGRESS/${TESTNAME} fi - if diff -c $REGRESS/${MARK}_${TESTNAME} current.out ; then + if diff -c $REGRESS/${TESTNAME} current.out ; then echo "ok $MARK $TESTNAME # $TODO$COMMENT" else echo "not ok $MARK $TESTNAME # $TODO$COMMENT" Copied: stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.1 (from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/1.1) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.1 Fri May 21 19:09:41 2010 (r208395, copy of r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/1.1) @@ -0,0 +1,28 @@ +e1_l1_1 +e1_l1_1 +e1_l1_2 +e1_l1_2 +e1_l1_3 +e1_l1_3 +e1_l1_4 +e1_l1_4 +e1_l1_5 +e1_l1_5 +e1_l1_6 +e1_l1_6 +e1_l1_7 +e1_l1_7 +e1_l1_8 +e1_l1_8 +e1_l1_9 +e1_l1_9 +e1_l1_10 +e1_l1_10 +e1_l1_11 +e1_l1_11 +e1_l1_12 +e1_l1_12 +e1_l1_13 +e1_l1_13 +e1_l1_14 +e1_l1_14 Copied: stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.10 (from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/1.10) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.10 Fri May 21 19:09:41 2010 (r208395, copy of r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/1.10) @@ -0,0 +1,14 @@ +s1_l1_1 +s1_l1_2 +s1_l1_3 +s1_l1_4 +s1_l1_5 +s1_l1_6 +s1_l1_7 +s1_l1_8 +s1_l1_9 +s1_l1_10 +s1_l1_11 +s1_l1_12 +s1_l1_13 +s1_l1_14 Copied: stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.11 (from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/1.11) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.11 Fri May 21 19:09:41 2010 (r208395, copy of r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/1.11) @@ -0,0 +1,14 @@ +e1_l1_1 +e1_l1_2 +e1_l1_3 +e1_l1_4 +e1_l1_5 +e1_l1_6 +e1_l1_7 +e1_l1_8 +e1_l1_9 +e1_l1_10 +e1_l1_11 +e1_l1_12 +e1_l1_13 +e1_l1_14 Copied: stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.12 (from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/1.12) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.12 Fri May 21 19:09:41 2010 (r208395, copy of r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/1.12) @@ -0,0 +1,14 @@ +e1_l1_1 +e1_l1_2 +e1_l1_3 +e1_l1_4 +e1_l1_5 +e1_l1_6 +e1_l1_7 +e1_l1_8 +e1_l1_9 +e1_l1_10 +e1_l1_11 +e1_l1_12 +e1_l1_13 +e1_l1_14 Copied: stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.13 (from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/1.13) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.13 Fri May 21 19:09:41 2010 (r208395, copy of r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/1.13) @@ -0,0 +1,42 @@ +e1_l1_1 +e2_e1_l1_1 +e2_e1_l1_1 +e1_l1_2 +e2_e1_l1_2 +e2_e1_l1_2 +e1_l1_3 +e2_e1_l1_3 +e2_e1_l1_3 +e1_l1_4 +e2_e1_l1_4 +e2_e1_l1_4 +e1_l1_5 +e2_e1_l1_5 +e2_e1_l1_5 +e1_l1_6 +e2_e1_l1_6 +e2_e1_l1_6 +e1_l1_7 +e2_e1_l1_7 +e2_e1_l1_7 +e1_l1_8 +e2_e1_l1_8 +e2_e1_l1_8 +e1_l1_9 +e2_e1_l1_9 +e2_e1_l1_9 +e1_l1_10 +e2_e1_l1_10 +e2_e1_l1_10 +e1_l1_11 +e2_e1_l1_11 +e2_e1_l1_11 +e1_l1_12 +e2_e1_l1_12 +e2_e1_l1_12 +e1_l1_13 +e2_e1_l1_13 +e2_e1_l1_13 +e1_l1_14 +e2_e1_l1_14 +e2_e1_l1_14 Copied: stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.14 (from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/1.14) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.14 Fri May 21 19:09:41 2010 (r208395, copy of r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/1.14) @@ -0,0 +1,42 @@ +s1_l1_1 +s2_s1_l1_1 +s2_s1_l1_1 +s1_l1_2 +s2_s1_l1_2 +s2_s1_l1_2 +s1_l1_3 +s2_s1_l1_3 +s2_s1_l1_3 +s1_l1_4 +s2_s1_l1_4 +s2_s1_l1_4 +s1_l1_5 +s2_s1_l1_5 +s2_s1_l1_5 +s1_l1_6 +s2_s1_l1_6 +s2_s1_l1_6 +s1_l1_7 +s2_s1_l1_7 +s2_s1_l1_7 +s1_l1_8 +s2_s1_l1_8 +s2_s1_l1_8 +s1_l1_9 +s2_s1_l1_9 +s2_s1_l1_9 +s1_l1_10 +s2_s1_l1_10 +s2_s1_l1_10 +s1_l1_11 +s2_s1_l1_11 +s2_s1_l1_11 +s1_l1_12 +s2_s1_l1_12 +s2_s1_l1_12 +s1_l1_13 +s2_s1_l1_13 +s2_s1_l1_13 +s1_l1_14 +s2_s1_l1_14 +s2_s1_l1_14 Copied: stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.15 (from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/1.15) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.15 Fri May 21 19:09:41 2010 (r208395, copy of r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/1.15) @@ -0,0 +1,42 @@ +e1_l1_1 +s1_e1_l1_1 +s1_e1_l1_1 +e1_l1_2 +s1_e1_l1_2 +s1_e1_l1_2 +e1_l1_3 +s1_e1_l1_3 +s1_e1_l1_3 +e1_l1_4 +s1_e1_l1_4 +s1_e1_l1_4 +e1_l1_5 +s1_e1_l1_5 +s1_e1_l1_5 +e1_l1_6 +s1_e1_l1_6 +s1_e1_l1_6 +e1_l1_7 +s1_e1_l1_7 +s1_e1_l1_7 +e1_l1_8 +s1_e1_l1_8 +s1_e1_l1_8 +e1_l1_9 +s1_e1_l1_9 +s1_e1_l1_9 +e1_l1_10 +s1_e1_l1_10 +s1_e1_l1_10 +e1_l1_11 +s1_e1_l1_11 +s1_e1_l1_11 +e1_l1_12 +s1_e1_l1_12 +s1_e1_l1_12 +e1_l1_13 +s1_e1_l1_13 +s1_e1_l1_13 +e1_l1_14 +s1_e1_l1_14 +s1_e1_l1_14 Copied: stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.16 (from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/1.16) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.16 Fri May 21 19:09:41 2010 (r208395, copy of r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/1.16) @@ -0,0 +1,56 @@ +e1_l1_1 +e1_l1_1 +e1_l1_2 +e1_l1_2 +e1_l1_3 +e1_l1_3 +e1_l1_4 +e1_l1_4 +e1_l1_5 +e1_l1_5 +e1_l1_6 +e1_l1_6 +e1_l1_7 +e1_l1_7 +e1_l1_8 +e1_l1_8 +e1_l1_9 +e1_l1_9 +e1_l1_10 +e1_l1_10 +e1_l1_11 +e1_l1_11 +e1_l1_12 +e1_l1_12 +e1_l1_13 +e1_l1_13 +e1_l1_14 +e1_l1_14 +e1_l1_1 +e1_l1_1 +e1_l1_2 +e1_l1_2 +e1_l1_3 +e1_l1_3 +e1_l1_4 +e1_l1_4 +e1_l1_5 +e1_l1_5 +e1_l1_6 +e1_l1_6 +e1_l1_7 +e1_l1_7 +e1_l1_8 +e1_l1_8 +e1_l1_9 +e1_l1_9 +e1_l1_10 +e1_l1_10 +e1_l1_11 +e1_l1_11 +e1_l1_12 +e1_l1_12 +e1_l1_13 +e1_l1_13 +e1_l1_14 +e1_l1_14 Copied: stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.17 (from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/1.17) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.17 Fri May 21 19:09:41 2010 (r208395, copy of r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/1.17) @@ -0,0 +1,28 @@ +l1_1 +l1_1 +l1_2 +l1_2 +l1_3 +l1_3 +l1_4 +l1_4 +l1_5 +l1_5 +l1_6 +l1_6 +l1_7 +l1_7 +l1_8 +l1_8 +l1_9 +l1_9 +l1_10 +l1_10 +l1_11 +l1_11 +l1_12 +l1_12 +l1_13 +l1_13 +l1_14 +l1_14 Copied: stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.18 (from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/1.18) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.18 Fri May 21 19:09:41 2010 (r208395, copy of r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/1.18) @@ -0,0 +1,14 @@ +l1_1 +l1_2 +l1_3 +l1_4 +l1_5 +l1_6 +l1_7 +l1_8 +l1_9 +l1_10 +l1_11 +l1_12 +l1_13 +l1_14 Copied: stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.2 (from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/1.2) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.2 Fri May 21 19:09:41 2010 (r208395, copy of r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/1.2) @@ -0,0 +1,14 @@ +e1_l1_1 +e1_l1_2 +e1_l1_3 +e1_l1_4 +e1_l1_5 +e1_l1_6 +e1_l1_7 +e1_l1_8 +e1_l1_9 +e1_l1_10 +e1_l1_11 +e1_l1_12 +e1_l1_13 +e1_l1_14 Copied: stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.3 (from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/1.3) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.3 Fri May 21 19:09:41 2010 (r208395, copy of r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/1.3) @@ -0,0 +1,28 @@ +e1_l1_1 +e1_l1_1 +e1_l1_2 +e1_l1_2 +e1_l1_3 +e1_l1_3 +e1_l1_4 +e1_l1_4 +e1_l1_5 +e1_l1_5 +e1_l1_6 +e1_l1_6 +e1_l1_7 +e1_l1_7 +e1_l1_8 +e1_l1_8 +e1_l1_9 +e1_l1_9 +e1_l1_10 +e1_l1_10 +e1_l1_11 +e1_l1_11 +e1_l1_12 +e1_l1_12 +e1_l1_13 +e1_l1_13 +e1_l1_14 +e1_l1_14 Copied: stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.4 (from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/1.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.4 Fri May 21 19:09:41 2010 (r208395, copy of r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/1.4) @@ -0,0 +1,14 @@ +e1_l1_1 +e1_l1_2 +e1_l1_3 +e1_l1_4 +e1_l1_5 +e1_l1_6 +e1_l1_7 +e1_l1_8 +e1_l1_9 +e1_l1_10 +e1_l1_11 +e1_l1_12 +e1_l1_13 +e1_l1_14 Copied: stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.4.1 (from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/1.4.1) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.4.1 Fri May 21 19:09:41 2010 (r208395, copy of r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/1.4.1) @@ -0,0 +1,14 @@ +l1_1 +l1_2 +l1_3 +l1_4 +l1_5 +l1_6 +l1_7 +l1_8 +l1_9 +l1_10 +l1_11 +l1_12 +l1_13 +l1_14 Copied: stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.5 (from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/1.5) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.5 Fri May 21 19:09:41 2010 (r208395, copy of r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/1.5) @@ -0,0 +1,28 @@ +s1_l1_1 +s1_l1_1 +s1_l1_2 +s1_l1_2 +s1_l1_3 +s1_l1_3 +s1_l1_4 +s1_l1_4 +s1_l1_5 +s1_l1_5 +s1_l1_6 +s1_l1_6 +s1_l1_7 +s1_l1_7 +s1_l1_8 +s1_l1_8 +s1_l1_9 +s1_l1_9 +s1_l1_10 +s1_l1_10 +s1_l1_11 +s1_l1_11 +s1_l1_12 +s1_l1_12 +s1_l1_13 +s1_l1_13 +s1_l1_14 +s1_l1_14 Copied: stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.6 (from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/1.6) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.6 Fri May 21 19:09:41 2010 (r208395, copy of r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/1.6) @@ -0,0 +1,28 @@ +s1_l1_1 +s1_l1_1 +s1_l1_2 +s1_l1_2 +s1_l1_3 +s1_l1_3 +s1_l1_4 +s1_l1_4 +s1_l1_5 +s1_l1_5 +s1_l1_6 +s1_l1_6 +s1_l1_7 +s1_l1_7 +s1_l1_8 +s1_l1_8 +s1_l1_9 +s1_l1_9 +s1_l1_10 +s1_l1_10 +s1_l1_11 +s1_l1_11 +s1_l1_12 +s1_l1_12 +s1_l1_13 +s1_l1_13 +s1_l1_14 +s1_l1_14 Copied: stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.7 (from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/1.7) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.7 Fri May 21 19:09:41 2010 (r208395, copy of r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/1.7) @@ -0,0 +1,28 @@ +e1_l1_1 +e1_l1_1 +e1_l1_2 +e1_l1_2 +e1_l1_3 +e1_l1_3 +e1_l1_4 +e1_l1_4 +e1_l1_5 +e1_l1_5 +e1_l1_6 +e1_l1_6 +e1_l1_7 +e1_l1_7 +e1_l1_8 +e1_l1_8 +e1_l1_9 +e1_l1_9 +e1_l1_10 +e1_l1_10 +e1_l1_11 +e1_l1_11 +e1_l1_12 +e1_l1_12 +e1_l1_13 +e1_l1_13 +e1_l1_14 +e1_l1_14 Copied: stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.8 (from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/1.8) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.8 Fri May 21 19:09:41 2010 (r208395, copy of r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/1.8) @@ -0,0 +1,28 @@ +e1_l1_1 +e1_l1_1 +e1_l1_2 +e1_l1_2 +e1_l1_3 +e1_l1_3 +e1_l1_4 +e1_l1_4 +e1_l1_5 +e1_l1_5 +e1_l1_6 +e1_l1_6 +e1_l1_7 +e1_l1_7 +e1_l1_8 +e1_l1_8 +e1_l1_9 +e1_l1_9 +e1_l1_10 +e1_l1_10 +e1_l1_11 +e1_l1_11 +e1_l1_12 +e1_l1_12 +e1_l1_13 +e1_l1_13 +e1_l1_14 +e1_l1_14 Copied: stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.9 (from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/1.9) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.9 Fri May 21 19:09:41 2010 (r208395, copy of r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/1.9) @@ -0,0 +1,14 @@ +s1_l1_1 +s1_l1_2 +s1_l1_3 +s1_l1_4 +s1_l1_5 +s1_l1_6 +s1_l1_7 +s1_l1_8 +s1_l1_9 +s1_l1_10 +s1_l1_11 +s1_l1_12 +s1_l1_13 +s1_l1_14 Copied: stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.1 (from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/2.1) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.1 Fri May 21 19:09:41 2010 (r208395, copy of r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/2.1) @@ -0,0 +1 @@ +l1_4 Copied: stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.10 (from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/2.10) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.10 Fri May 21 19:09:41 2010 (r208395, copy of r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/2.10) @@ -0,0 +1 @@ +l1_7 Copied: stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.11 (from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/2.11) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.11 Fri May 21 19:09:41 2010 (r208395, copy of r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/2.11) @@ -0,0 +1 @@ +l1_7 Copied: stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.12 (from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/2.12) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.12 Fri May 21 19:09:41 2010 (r208395, copy of r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/2.12) @@ -0,0 +1,4 @@ +l1_1 +l1_2 +l1_3 +l1_4 Copied: stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.13 (from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/2.13) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.13 Fri May 21 19:09:41 2010 (r208395, copy of r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/2.13) @@ -0,0 +1,23 @@ +l1_1 +l1_2 +l1_3 +l1_4 +l1_5 +l1_6 +l1_7 +l1_8 +l1_9 +l1_10 +l1_11 +l1_12 +l1_13 +l1_14 +l2_1 +l2_2 +l2_3 +l2_4 +l2_5 +l2_6 +l2_7 +l2_8 +l2_9 Copied: stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.14 (from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/2.14) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.14 Fri May 21 19:09:41 2010 (r208395, copy of r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/2.14) @@ -0,0 +1,23 @@ +l1_1 +l1_2 +l1_3 +l1_4 +l1_5 +l1_6 +l1_7 +l1_8 +l1_9 +l1_10 +l1_11 +l1_12 +l1_13 +l1_14 +l2_1 +l2_2 +l2_3 +l2_4 +l2_5 +l2_6 +l2_7 +l2_8 +l2_9 Copied: stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.15 (from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/2.15) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.15 Fri May 21 19:09:41 2010 (r208395, copy of r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/2.15) @@ -0,0 +1,20 @@ +l1_4 +l1_5 +l1_6 +l1_7 +l1_8 +l1_9 +l1_10 +l1_11 +l1_12 +l1_13 +l1_14 +l2_1 +l2_2 +l2_3 +l2_4 +l2_5 +l2_6 +l2_7 +l2_8 +l2_9 Copied: stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.16 (from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/2.16) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.16 Fri May 21 19:09:41 2010 (r208395, copy of r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/2.16) @@ -0,0 +1,17 @@ +l1_4 +l1_5 +l1_6 +l1_7 +l1_8 +l1_9 +l1_10 +l1_11 +l1_12 +l1_13 +l1_14 +l2_1 +l2_2 +l2_3 +l2_4 +l2_5 +l2_6 Copied: stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.17 (from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/2.17) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.17 Fri May 21 19:09:41 2010 (r208395, copy of r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/2.17) @@ -0,0 +1,17 @@ +l1_4 +l1_5 +l1_6 +l1_7 +l1_8 +l1_9 +l1_10 +l1_14 +l2_1 +l2_2 +l2_3 +l2_4 +l2_5 +l2_6 +l2_7 +l2_8 +l2_9 Copied: stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.18 (from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/2.18) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.18 Fri May 21 19:09:41 2010 (r208395, copy of r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/2.18) @@ -0,0 +1,7 @@ +l2_3 +l2_4 +l2_5 +l2_6 +l2_7 +l2_8 +l2_9 Copied: stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.19 (from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/2.19) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.19 Fri May 21 19:09:41 2010 (r208395, copy of r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/2.19) @@ -0,0 +1 @@ +l1_12 Copied: stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.2 (from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/2.2) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.2 Fri May 21 19:09:41 2010 (r208395, copy of r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/2.2) @@ -0,0 +1 @@ +l2_6 Copied: stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.20 (from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/2.20) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.20 Fri May 21 19:09:41 2010 (r208395, copy of r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/2.20) @@ -0,0 +1 @@ +l1_7 Copied: stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.21 (from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/2.21) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.21 Fri May 21 19:09:41 2010 (r208395, copy of r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/2.21) @@ -0,0 +1,5 @@ +l1_13 +l1_14 +l2_1 +l2_2 +l2_3 Copied: stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.22 (from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/2.22) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.22 Fri May 21 19:09:41 2010 (r208395, copy of r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/2.22) @@ -0,0 +1,3 @@ +l1_6 +l1_7 +l1_8 Copied: stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.3 (from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/2.3) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.3 Fri May 21 19:09:41 2010 (r208395, copy of r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/2.3) @@ -0,0 +1 @@ +l1_14 Copied: stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.4 (from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/2.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.4 Fri May 21 19:09:41 2010 (r208395, copy of r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/2.4) @@ -0,0 +1 @@ +l2_9 Copied: stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.5 (from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/2.5) ============================================================================== Copied: stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.6 (from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/2.6) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.6 Fri May 21 19:09:41 2010 (r208395, copy of r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/2.6) @@ -0,0 +1 @@ +l2_9 Copied: stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.7 (from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/2.7) ============================================================================== Copied: stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.8 (from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/2.8) ============================================================================== Copied: stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.9 (from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/2.9) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.9 Fri May 21 19:09:41 2010 (r208395, copy of r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/2.9) @@ -0,0 +1 @@ +l1_7 Copied: stable/8/tools/regression/usr.bin/sed/regress.multitest.out/3.1 (from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/3.1) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/usr.bin/sed/regress.multitest.out/3.1 Fri May 21 19:09:41 2010 (r208395, copy of r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/3.1) @@ -0,0 +1,14 @@ +l1_1 +l1_2 +l1_3 +^l1T4$ +^l1T5$ +^l1T6$ +^l1T7$ +^l1T8$ +^l1T9$ +^l1T10$ +^l1T11$ +^l1T12$ +l1_13 +l1_14 Copied: stable/8/tools/regression/usr.bin/sed/regress.multitest.out/3.2 (from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/3.2) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/usr.bin/sed/regress.multitest.out/3.2 Fri May 21 19:09:41 2010 (r208395, copy of r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/3.2) @@ -0,0 +1,14 @@ +l1_1 +l1_2 +l1_3 +^l1_4 +^l1_5 +^l1_6$ +^l1_7$ +^l1T8$ +^l1_9$ +^l1_10$ +^l1_11 +^l1_12 +l1_13 +l1_14 Copied: stable/8/tools/regression/usr.bin/sed/regress.multitest.out/3.3 (from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/3.3) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/usr.bin/sed/regress.multitest.out/3.3 Fri May 21 19:09:41 2010 (r208395, copy of r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/3.3) @@ -0,0 +1,14 @@ +^l1T1$ +^l1T2$ +^l1T3$ +l1_4 +l1_5 +l1_6 +l1_7 +l1_8 +l1_9 +l1_10 +l1_11 +l1_12 +^l1T13$ +^l1T14$ Copied: stable/8/tools/regression/usr.bin/sed/regress.multitest.out/3.4 (from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/3.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/usr.bin/sed/regress.multitest.out/3.4 Fri May 21 19:09:41 2010 (r208395, copy of r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/3.4) @@ -0,0 +1,14 @@ +^l1_1 +^l1_2 +^l1_3 +l1_4 +l1_5 +l1_6 +l1_7 +l1_8 +l1_9 +l1_10 +l1_11 +l1_12 +^l1_13 +^l1_14 Copied: stable/8/tools/regression/usr.bin/sed/regress.multitest.out/4.1 (from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/4.1) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/usr.bin/sed/regress.multitest.out/4.1 Fri May 21 19:09:41 2010 (r208395, copy of r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/4.1) @@ -0,0 +1,47 @@ +before_il1_1 +after_ibefore_il1_1 +before_il1_2 +after_ibefore_il1_2 +before_il1_3 +after_ibefore_il1_3 +before_il1_4 +after_ibefore_il1_4 +before_il1_5 +after_ibefore_il1_5 +before_il1_6 +after_ibefore_il1_6 +before_il1_7 +after_ibefore_il1_7 +before_il1_8 +after_ibefore_il1_8 +before_il1_9 +after_ibefore_il1_9 +before_il1_10 +after_ibefore_il1_10 +before_il1_11 +after_ibefore_il1_11 +before_il1_12 +after_ibefore_il1_12 +before_il1_13 +after_ibefore_il1_13 +before_il1_14 +after_ibefore_il1_14 +before_il2_1 +after_ibefore_il2_1 +before_il2_2 +after_ibefore_il2_2 +before_il2_3 +after_ibefore_il2_3 +before_il2_4 +after_ibefore_il2_4 +before_il2_5 +after_ibefore_il2_5 +before_il2_6 +inserted +after_ibefore_il2_6 +before_il2_7 +after_ibefore_il2_7 +before_il2_8 +after_ibefore_il2_8 +before_il2_9 +after_ibefore_il2_9 Copied: stable/8/tools/regression/usr.bin/sed/regress.multitest.out/4.2 (from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/4.2) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/usr.bin/sed/regress.multitest.out/4.2 Fri May 21 19:09:41 2010 (r208395, copy of r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/4.2) @@ -0,0 +1,54 @@ +before_al1_1 +after_abefore_al1_1 +before_al1_2 +after_abefore_al1_2 +before_al1_3 +after_abefore_al1_3 +before_al1_4 +after_abefore_al1_4 +before_a5-12l1_5 +after_abefore_a5-12l1_5 +appended +before_a5-12l1_6 +after_abefore_a5-12l1_6 +appended +before_a5-12l1_7 +after_abefore_a5-12l1_7 +appended +before_a5-12l1_8 +after_abefore_a5-12l1_8 +appended +before_a5-12l1_9 +after_abefore_a5-12l1_9 +appended +before_a5-12l1_10 +after_abefore_a5-12l1_10 +appended +before_a5-12l1_11 +after_abefore_a5-12l1_11 +appended +before_a5-12l1_12 +after_abefore_a5-12l1_12 +appended +before_al1_13 +after_abefore_al1_13 +before_al1_14 +after_abefore_al1_14 +before_al2_1 +after_abefore_al2_1 +before_al2_2 +after_abefore_al2_2 +before_al2_3 +after_abefore_al2_3 +before_al2_4 +after_abefore_al2_4 +before_al2_5 +after_abefore_al2_5 +before_al2_6 +after_abefore_al2_6 +before_al2_7 +after_abefore_al2_7 +before_al2_8 +after_abefore_al2_8 +before_al2_9 +after_abefore_al2_9 Copied: stable/8/tools/regression/usr.bin/sed/regress.multitest.out/4.3 (from r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/4.3) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/usr.bin/sed/regress.multitest.out/4.3 Fri May 21 19:09:41 2010 (r208395, copy of r197352, head/tools/regression/usr.bin/sed/regress.multitest.out/4.3) @@ -0,0 +1,56 @@ +^l1_1 +^l1_1$ +appended +^l1_2 +^l1_2$ +appended +^l1_3 +^l1_3$ +appended +^l1_4 +^l1_4$ +appended +^l1_5 +^l1_5$ +appended +^l1_6 +^l1_6$ +appended +^l1_7 +^l1_7$ +appended +^l1_8 +appended +^l1_8 +l1_9$ +^l1_10 +appended +^l1_10 +l1_11$ +^l1_12 +^l1_12$ +appended +^l1_13 +^l1_13$ +appended +^l1_14 +^l1_14$ +appended +^l2_1 +^l2_1$ +^l2_2 +^l2_2$ +^l2_3 +^l2_3$ +^l2_4 +^l2_4$ +^l2_5 +^l2_5$ +^l2_6 +^l2_6$ +^l2_7 +^l2_7$ +^l2_8 +^l2_8$ +^l2_9 +^l2_9$ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-8@FreeBSD.ORG Fri May 21 19:17:32 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 684BE1065674; Fri, 21 May 2010 19:17:32 +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 539478FC18; Fri, 21 May 2010 19:17: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 o4LJHWAv011442; Fri, 21 May 2010 19:17:32 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4LJHVRZ011441; Fri, 21 May 2010 19:17:31 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201005211917.o4LJHVRZ011441@svn.freebsd.org> From: Marius Strobl Date: Fri, 21 May 2010 19:17:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208396 - stable/8/tools/regression/usr.bin/sed/regress.multitest.out X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 May 2010 19:17:32 -0000 Author: marius Date: Fri May 21 19:17:31 2010 New Revision: 208396 URL: http://svn.freebsd.org/changeset/base/208396 Log: MFC: r197509 Wipe out mergeinfo. Modified: Directory Properties: stable/8/tools/regression/usr.bin/sed/regress.multitest.out/ (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.1 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.10 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.11 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.12 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.13 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.14 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.15 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.16 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.17 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.18 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.2 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.3 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.4 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.4.1 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.5 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.6 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.7 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.8 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/1.9 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.1 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.10 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.11 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.12 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.13 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.14 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.15 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.16 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.17 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.18 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.19 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.2 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.20 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.21 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.22 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.3 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.4 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.5 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.6 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.7 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.8 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/2.9 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/3.1 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/3.2 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/3.3 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/3.4 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/4.1 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/4.2 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/4.3 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/4.4 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/4.5 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/4.6 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/4.7 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/4.8 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/5.1 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/5.2 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/5.3 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/5.4 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/5.5 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/5.6 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/5.7 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/5.8 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/6.1 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/6.2 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/6.3 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/6.4 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/6.5 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/6.6 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/7.1 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/7.2 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/7.3 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/7.4 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/7.5 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/7.6 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/7.7 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/7.8 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/8.1 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/8.10 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/8.11 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/8.12 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/8.13 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/8.14 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/8.15 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/8.16 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/8.17 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/8.2 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/8.3 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/8.4 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/8.5 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/8.6 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/8.7 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/8.8 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/8.9 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/9.1 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/9.10 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/9.11 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/9.12 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/9.13 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/9.14 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/9.15 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/9.16 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/9.17 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/9.18 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/9.19 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/9.2 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/9.20 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/9.21 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/9.22 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/9.23 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/9.24 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/9.25 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/9.26 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/9.27 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/9.28 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/9.29 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/9.3 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/9.30 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/9.31 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/9.4 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/9.5 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/9.6 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/9.7 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/9.8 (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/9.9 (props changed) From owner-svn-src-stable-8@FreeBSD.ORG Fri May 21 19:21:48 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 297701065670; Fri, 21 May 2010 19:21:48 +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 16C308FC1B; Fri, 21 May 2010 19:21: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 o4LJLlfn012730; Fri, 21 May 2010 19:21:47 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4LJLlS0012727; Fri, 21 May 2010 19:21:47 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201005211921.o4LJLlS0012727@svn.freebsd.org> From: Marius Strobl Date: Fri, 21 May 2010 19:21:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208397 - in stable/8: tools/regression/usr.bin/sed usr.bin/sed X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 May 2010 19:21:48 -0000 Author: marius Date: Fri May 21 19:21:47 2010 New Revision: 208397 URL: http://svn.freebsd.org/changeset/base/208397 Log: MFC: r197356 Allow [ to be used as a delimiter. Pointed by: Marius Strobl Obtained from: Apple Modified: stable/8/tools/regression/usr.bin/sed/multitest.t stable/8/usr.bin/sed/compile.c Directory Properties: stable/8/tools/regression/usr.bin/sed/ (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/ (props changed) stable/8/usr.bin/sed/ (props changed) Modified: stable/8/tools/regression/usr.bin/sed/multitest.t ============================================================================== --- stable/8/tools/regression/usr.bin/sed/multitest.t Fri May 21 19:17:31 2010 (r208396) +++ stable/8/tools/regression/usr.bin/sed/multitest.t Fri May 21 19:21:47 2010 (r208397) @@ -432,6 +432,15 @@ u2/g' lines1 # POSIX does not say that this should work, # but it does for GNU, BSD, and SunOS mark '8.17' ; $SED -e 's/[/]/Q/' lines1 + + COMMENT='[ as an s delimiter and its escapes' + mark '8.18' ; $SED -e 's[_[X[' lines1 + # This is a matter of interpretation + # POSIX 1003.1, 2004 says "Within the BRE and the replacement, + # the BRE delimiter itself can be used as a *literal* character + # if it is preceded by a backslash + mark '8.19' ; sed 's/l/[/' lines1 | $SED -e 's[\[.[X[' + mark '8.20' ; sed 's/l/[/' lines1 | $SED -e 's[\[.[X\[[' } test_error() Modified: stable/8/usr.bin/sed/compile.c ============================================================================== --- stable/8/usr.bin/sed/compile.c Fri May 21 19:17:31 2010 (r208396) +++ stable/8/usr.bin/sed/compile.c Fri May 21 19:21:47 2010 (r208397) @@ -387,7 +387,7 @@ compile_delimited(char *p, char *d) errx(1, "%lu: %s: newline can not be used as a string delimiter", linenum, fname); while (*p) { - if (*p == '[') { + if (*p == '[' && *p != c) { if ((d = compile_ccl(&p, d)) == NULL) errx(1, "%lu: %s: unbalanced brackets ([])", linenum, fname); continue; From owner-svn-src-stable-8@FreeBSD.ORG Fri May 21 19:22:51 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0CFCD106566B; Fri, 21 May 2010 19:22:51 +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 EF4138FC1D; Fri, 21 May 2010 19:22: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 o4LJMotv013099; Fri, 21 May 2010 19:22:50 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4LJMoIm013097; Fri, 21 May 2010 19:22:50 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201005211922.o4LJMoIm013097@svn.freebsd.org> From: Marius Strobl Date: Fri, 21 May 2010 19:22:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208398 - stable/8/tools/regression/usr.bin/sed X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 May 2010 19:22:51 -0000 Author: marius Date: Fri May 21 19:22:50 2010 New Revision: 208398 URL: http://svn.freebsd.org/changeset/base/208398 Log: MFC: r197357 Describe how other systems treat this case. Modified: stable/8/tools/regression/usr.bin/sed/multitest.t Directory Properties: stable/8/tools/regression/usr.bin/sed/ (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/ (props changed) Modified: stable/8/tools/regression/usr.bin/sed/multitest.t ============================================================================== --- stable/8/tools/regression/usr.bin/sed/multitest.t Fri May 21 19:21:47 2010 (r208397) +++ stable/8/tools/regression/usr.bin/sed/multitest.t Fri May 21 19:22:50 2010 (r208398) @@ -438,7 +438,11 @@ u2/g' lines1 # This is a matter of interpretation # POSIX 1003.1, 2004 says "Within the BRE and the replacement, # the BRE delimiter itself can be used as a *literal* character - # if it is preceded by a backslash + # if it is preceded by a backslash" + # SunOS 5.1 /usr/bin/sed and Mac OS X follow the literal POSIX + # interpretation. + # GNU sed version 4.1.5 treats \[ as the beginning of a character + # set specification (both with --posix and without). mark '8.19' ; sed 's/l/[/' lines1 | $SED -e 's[\[.[X[' mark '8.20' ; sed 's/l/[/' lines1 | $SED -e 's[\[.[X\[[' } From owner-svn-src-stable-8@FreeBSD.ORG Fri May 21 19:33:40 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C3E4D1065670; Fri, 21 May 2010 19:33:40 +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 98B338FC13; Fri, 21 May 2010 19:33: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 o4LJXe7t016054; Fri, 21 May 2010 19:33:40 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4LJXeOh016053; Fri, 21 May 2010 19:33:40 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201005211933.o4LJXeOh016053@svn.freebsd.org> From: Marius Strobl Date: Fri, 21 May 2010 19:33:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208399 - stable/8/tools/regression/usr.bin/sed X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 May 2010 19:33:40 -0000 Author: marius Date: Fri May 21 19:33:40 2010 New Revision: 208399 URL: http://svn.freebsd.org/changeset/base/208399 Log: Try to move the mergeinfo up one directory to the level of the Makefile. Modified: Directory Properties: stable/8/tools/regression/usr.bin/sed/ (props changed) From owner-svn-src-stable-8@FreeBSD.ORG Fri May 21 19:35:14 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CE83F1065678; Fri, 21 May 2010 19:35:14 +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 A1CF88FC1B; Fri, 21 May 2010 19:35: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 o4LJZEft016472; Fri, 21 May 2010 19:35:14 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4LJZEDn016469; Fri, 21 May 2010 19:35:14 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201005211935.o4LJZEDn016469@svn.freebsd.org> From: Marius Strobl Date: Fri, 21 May 2010 19:35:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208400 - stable/8/tools/regression/usr.bin/sed/regress.multitest.out X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 May 2010 19:35:15 -0000 Author: marius Date: Fri May 21 19:35:14 2010 New Revision: 208400 URL: http://svn.freebsd.org/changeset/base/208400 Log: MFC: r197360 Add correct test results. Added: stable/8/tools/regression/usr.bin/sed/regress.multitest.out/8.18 - copied unchanged from r197360, head/tools/regression/usr.bin/sed/regress.multitest.out/8.18 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/8.19 - copied unchanged from r197360, head/tools/regression/usr.bin/sed/regress.multitest.out/8.19 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/8.20 - copied unchanged from r197360, head/tools/regression/usr.bin/sed/regress.multitest.out/8.20 Modified: Directory Properties: stable/8/tools/regression/usr.bin/sed/ (props changed) stable/8/tools/regression/usr.bin/sed/regress.multitest.out/ (props changed) Copied: stable/8/tools/regression/usr.bin/sed/regress.multitest.out/8.18 (from r197360, head/tools/regression/usr.bin/sed/regress.multitest.out/8.18) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/usr.bin/sed/regress.multitest.out/8.18 Fri May 21 19:35:14 2010 (r208400, copy of r197360, head/tools/regression/usr.bin/sed/regress.multitest.out/8.18) @@ -0,0 +1,14 @@ +l1X1 +l1X2 +l1X3 +l1X4 +l1X5 +l1X6 +l1X7 +l1X8 +l1X9 +l1X10 +l1X11 +l1X12 +l1X13 +l1X14 Copied: stable/8/tools/regression/usr.bin/sed/regress.multitest.out/8.19 (from r197360, head/tools/regression/usr.bin/sed/regress.multitest.out/8.19) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/usr.bin/sed/regress.multitest.out/8.19 Fri May 21 19:35:14 2010 (r208400, copy of r197360, head/tools/regression/usr.bin/sed/regress.multitest.out/8.19) @@ -0,0 +1,14 @@ +X_1 +X_2 +X_3 +X_4 +X_5 +X_6 +X_7 +X_8 +X_9 +X_10 +X_11 +X_12 +X_13 +X_14 Copied: stable/8/tools/regression/usr.bin/sed/regress.multitest.out/8.20 (from r197360, head/tools/regression/usr.bin/sed/regress.multitest.out/8.20) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/usr.bin/sed/regress.multitest.out/8.20 Fri May 21 19:35:14 2010 (r208400, copy of r197360, head/tools/regression/usr.bin/sed/regress.multitest.out/8.20) @@ -0,0 +1,14 @@ +X[_1 +X[_2 +X[_3 +X[_4 +X[_5 +X[_6 +X[_7 +X[_8 +X[_9 +X[_10 +X[_11 +X[_12 +X[_13 +X[_14 From owner-svn-src-stable-8@FreeBSD.ORG Fri May 21 19:40:27 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1D9B106566B; Fri, 21 May 2010 19:40:27 +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 A61468FC19; Fri, 21 May 2010 19:40: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 o4LJeRZt017649; Fri, 21 May 2010 19:40:27 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4LJeR7u017648; Fri, 21 May 2010 19:40:27 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201005211940.o4LJeR7u017648@svn.freebsd.org> From: Marius Strobl Date: Fri, 21 May 2010 19:40:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208401 - stable/8/tools/regression/usr.bin/sed/regress.multitest.out X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 May 2010 19:40:27 -0000 Author: marius Date: Fri May 21 19:40:27 2010 New Revision: 208401 URL: http://svn.freebsd.org/changeset/base/208401 Log: Manually remove the mergeinfo from this directory, r208399 hasn't work as expected for some reason. Modified: Directory Properties: stable/8/tools/regression/usr.bin/sed/regress.multitest.out/ (props changed) From owner-svn-src-stable-8@FreeBSD.ORG Fri May 21 19:44:23 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 64FC71065678; Fri, 21 May 2010 19:44:23 +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 516D98FC1A; Fri, 21 May 2010 19:44: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 o4LJiNJr018605; Fri, 21 May 2010 19:44:23 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4LJiNhX018603; Fri, 21 May 2010 19:44:23 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201005211944.o4LJiNhX018603@svn.freebsd.org> From: Marius Strobl Date: Fri, 21 May 2010 19:44:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208402 - in stable/8: tools/regression/usr.bin/sed tools/regression/usr.bin/sed/regress.multitest.out usr.bin/sed X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 May 2010 19:44:23 -0000 Author: marius Date: Fri May 21 19:44:23 2010 New Revision: 208402 URL: http://svn.freebsd.org/changeset/base/208402 Log: MFC: r197361 Follow POSIX (IEEE Std 1003.1, 2004 Edition) in the implementation of the y (translate) command. "If a backslash character is immediately followed by a backslash character in string1 or string2, the two backslash characters shall be counted as a single literal backslash character" Pointed by: Marius Strobl Obtained from: Mac OS X Added: stable/8/tools/regression/usr.bin/sed/regress.multitest.out/8.21 - copied unchanged from r197361, head/tools/regression/usr.bin/sed/regress.multitest.out/8.21 Modified: stable/8/tools/regression/usr.bin/sed/multitest.t stable/8/usr.bin/sed/compile.c Directory Properties: stable/8/tools/regression/usr.bin/sed/ (props changed) stable/8/usr.bin/sed/ (props changed) Modified: stable/8/tools/regression/usr.bin/sed/multitest.t ============================================================================== --- stable/8/tools/regression/usr.bin/sed/multitest.t Fri May 21 19:40:27 2010 (r208401) +++ stable/8/tools/regression/usr.bin/sed/multitest.t Fri May 21 19:44:23 2010 (r208402) @@ -445,6 +445,10 @@ u2/g' lines1 # set specification (both with --posix and without). mark '8.19' ; sed 's/l/[/' lines1 | $SED -e 's[\[.[X[' mark '8.20' ; sed 's/l/[/' lines1 | $SED -e 's[\[.[X\[[' + COMMENT='\ in y command' + mark '8.21' + echo 'a\b(c' | + $SED 'y%ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"%abcdefghijklmnopqrstuvwxyz,------%' } test_error() Copied: stable/8/tools/regression/usr.bin/sed/regress.multitest.out/8.21 (from r197361, head/tools/regression/usr.bin/sed/regress.multitest.out/8.21) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/usr.bin/sed/regress.multitest.out/8.21 Fri May 21 19:44:23 2010 (r208402, copy of r197361, head/tools/regression/usr.bin/sed/regress.multitest.out/8.21) @@ -0,0 +1 @@ +a-b-c Modified: stable/8/usr.bin/sed/compile.c ============================================================================== --- stable/8/usr.bin/sed/compile.c Fri May 21 19:40:27 2010 (r208401) +++ stable/8/usr.bin/sed/compile.c Fri May 21 19:44:23 2010 (r208402) @@ -66,7 +66,7 @@ static struct labhash { static char *compile_addr(char *, struct s_addr *); static char *compile_ccl(char **, char *); -static char *compile_delimited(char *, char *); +static char *compile_delimited(char *, char *, int); static char *compile_flags(char *, struct s_subst *); static regex_t *compile_re(char *, int); static char *compile_subst(char *, struct s_subst *); @@ -320,7 +320,7 @@ nonsel: /* Now parse the command */ linenum, fname); if ((cmd->u.s = calloc(1, sizeof(struct s_subst))) == NULL) err(1, "malloc"); - p = compile_delimited(p, re); + p = compile_delimited(p, re, 0); if (p == NULL) errx(1, "%lu: %s: unterminated substitute pattern", linenum, fname); @@ -373,7 +373,7 @@ nonsel: /* Now parse the command */ * with the processed string. */ static char * -compile_delimited(char *p, char *d) +compile_delimited(char *p, char *d, int is_tr) { char c; @@ -399,9 +399,12 @@ compile_delimited(char *p, char *d) *d++ = '\n'; p += 2; continue; - } else if (*p == '\\' && p[1] == '\\') - *d++ = *p++; - else if (*p == c) { + } else if (*p == '\\' && p[1] == '\\') { + if (is_tr) + p++; + else + *d++ = *p++; + } else if (*p == c) { *d = '\0'; return (p + 1); } @@ -654,11 +657,11 @@ compile_tr(char *p, struct s_tr **py) errx(1, "%lu: %s: transform pattern can not be delimited by newline or backslash", linenum, fname); - p = compile_delimited(p, old); + p = compile_delimited(p, old, 1); if (p == NULL) errx(1, "%lu: %s: unterminated transform source string", linenum, fname); - p = compile_delimited(p - 1, new); + p = compile_delimited(p - 1, new, 1); if (p == NULL) errx(1, "%lu: %s: unterminated transform target string", linenum, fname); @@ -781,7 +784,7 @@ compile_addr(char *p, struct s_addr *a) ++p; /* FALLTHROUGH */ case '/': /* Context address */ - p = compile_delimited(p, re); + p = compile_delimited(p, re, 0); if (p == NULL) errx(1, "%lu: %s: unterminated regular expression", linenum, fname); /* Check for case insensitive regexp flag */ From owner-svn-src-stable-8@FreeBSD.ORG Fri May 21 19:45:55 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4FA4A1065675; Fri, 21 May 2010 19:45:55 +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 340C68FC16; Fri, 21 May 2010 19:45: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 o4LJjtJH018996; Fri, 21 May 2010 19:45:55 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4LJjt8T018991; Fri, 21 May 2010 19:45:55 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201005211945.o4LJjt8T018991@svn.freebsd.org> From: Marius Strobl Date: Fri, 21 May 2010 19:45:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208403 - in stable/8: tools/regression/usr.bin/sed tools/regression/usr.bin/sed/regress.multitest.out usr.bin/sed X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 May 2010 19:45:55 -0000 Author: marius Date: Fri May 21 19:45:54 2010 New Revision: 208403 URL: http://svn.freebsd.org/changeset/base/208403 Log: MFC: r197362 IEEE Std 1003.1, 2004 Edition states: "The escape sequence '\n' shall match a embedded in the pattern space." It is unclear whether this also applies to a \n embedded in a character class. Disable the existing handling of \n in a character class following Mac OS X, GNU sed version 4.1.5 with --posix, and SunOS 5.10 /usr/bin/sed. Pointed by: Marius Strobl Obtained from: Mac OS X Added: stable/8/tools/regression/usr.bin/sed/regress.multitest.out/8.22 - copied unchanged from r197362, head/tools/regression/usr.bin/sed/regress.multitest.out/8.22 stable/8/tools/regression/usr.bin/sed/regress.multitest.out/8.23 - copied unchanged from r197362, head/tools/regression/usr.bin/sed/regress.multitest.out/8.23 Modified: stable/8/tools/regression/usr.bin/sed/multitest.t stable/8/usr.bin/sed/compile.c Directory Properties: stable/8/tools/regression/usr.bin/sed/ (props changed) stable/8/usr.bin/sed/ (props changed) Modified: stable/8/tools/regression/usr.bin/sed/multitest.t ============================================================================== --- stable/8/tools/regression/usr.bin/sed/multitest.t Fri May 21 19:44:23 2010 (r208402) +++ stable/8/tools/regression/usr.bin/sed/multitest.t Fri May 21 19:45:54 2010 (r208403) @@ -449,6 +449,9 @@ u2/g' lines1 mark '8.21' echo 'a\b(c' | $SED 'y%ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"%abcdefghijklmnopqrstuvwxyz,------%' + COMMENT='\n in a character class and a BRE' + mark '8.22' ; (echo 1; echo 2) | $SED -n '1{;N;s/[\n]/X/;p;}' + mark '8.23' ; (echo 1; echo 2) | $SED -n '1{;N;s/\n/X/;p;}' } test_error() Copied: stable/8/tools/regression/usr.bin/sed/regress.multitest.out/8.22 (from r197362, head/tools/regression/usr.bin/sed/regress.multitest.out/8.22) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/usr.bin/sed/regress.multitest.out/8.22 Fri May 21 19:45:54 2010 (r208403, copy of r197362, head/tools/regression/usr.bin/sed/regress.multitest.out/8.22) @@ -0,0 +1,2 @@ +1 +2 Copied: stable/8/tools/regression/usr.bin/sed/regress.multitest.out/8.23 (from r197362, head/tools/regression/usr.bin/sed/regress.multitest.out/8.23) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/usr.bin/sed/regress.multitest.out/8.23 Fri May 21 19:45:54 2010 (r208403, copy of r197362, head/tools/regression/usr.bin/sed/regress.multitest.out/8.23) @@ -0,0 +1 @@ +1X2 Modified: stable/8/usr.bin/sed/compile.c ============================================================================== --- stable/8/usr.bin/sed/compile.c Fri May 21 19:44:23 2010 (r208402) +++ stable/8/usr.bin/sed/compile.c Fri May 21 19:45:54 2010 (r208403) @@ -432,8 +432,7 @@ compile_ccl(char **sp, char *t) for (c = *s; (*t = *s) != ']' || c != d; s++, t++) if ((c = *s) == '\0') return NULL; - } else if (*s == '\\' && s[1] == 'n') - *t = '\n', s++; + } return (*s == ']') ? *sp = ++s, ++t : NULL; } From owner-svn-src-stable-8@FreeBSD.ORG Fri May 21 19:47:53 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 37A201065676; Fri, 21 May 2010 19:47:53 +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 25D178FC1A; Fri, 21 May 2010 19:47: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 o4LJlrLR019500; Fri, 21 May 2010 19:47:53 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4LJlrob019498; Fri, 21 May 2010 19:47:53 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201005211947.o4LJlrob019498@svn.freebsd.org> From: Marius Strobl Date: Fri, 21 May 2010 19:47:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208404 - stable/8/tools/regression/usr.bin/sed X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 May 2010 19:47:53 -0000 Author: marius Date: Fri May 21 19:47:52 2010 New Revision: 208404 URL: http://svn.freebsd.org/changeset/base/208404 Log: MFC: r201490 There are actually 129 tests here. Modified: stable/8/tools/regression/usr.bin/sed/multitest.t Directory Properties: stable/8/tools/regression/usr.bin/sed/ (props changed) Modified: stable/8/tools/regression/usr.bin/sed/multitest.t ============================================================================== --- stable/8/tools/regression/usr.bin/sed/multitest.t Fri May 21 19:45:54 2010 (r208403) +++ stable/8/tools/regression/usr.bin/sed/multitest.t Fri May 21 19:47:52 2010 (r208404) @@ -50,7 +50,7 @@ main() awk 'END { for (i = 1; i < 15; i++) print "l1_" i}' lines1 awk 'END { for (i = 1; i < 10; i++) print "l2_" i}' lines2 - echo "1..121" + echo "1..129" exec 4>&1 5>&2 tests From owner-svn-src-stable-8@FreeBSD.ORG Fri May 21 23:08:54 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 435861065672; Fri, 21 May 2010 23:08:54 +0000 (UTC) (envelope-from randi@FreeBSD.org) Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 31C078FC20; Fri, 21 May 2010 23:08:54 +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 o4LN8sNo063835; Fri, 21 May 2010 23:08:54 GMT (envelope-from randi@svn.freebsd.org) Received: (from randi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4LN8sRF063833; Fri, 21 May 2010 23:08:54 GMT (envelope-from randi@svn.freebsd.org) Message-Id: <201005212308.o4LN8sRF063833@svn.freebsd.org> From: Randi Harper Date: Fri, 21 May 2010 23:08:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208406 - stable/8/usr.sbin/sysinstall X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 May 2010 23:08:54 -0000 Author: randi Date: Fri May 21 23:08:53 2010 New Revision: 208406 URL: http://svn.freebsd.org/changeset/base/208406 Log: MFC r198317,206995: Introduce 'netDev=ANY' support for scripted (install.cfg) installs, which results in the first ethernet interface with physical link being selected. Approved by: cperciva (mentor) Modified: stable/8/usr.sbin/sysinstall/tcpip.c Directory Properties: stable/8/usr.sbin/sysinstall/ (props changed) Modified: stable/8/usr.sbin/sysinstall/tcpip.c ============================================================================== --- stable/8/usr.sbin/sysinstall/tcpip.c Fri May 21 20:46:01 2010 (r208405) +++ stable/8/usr.sbin/sysinstall/tcpip.c Fri May 21 23:08:53 2010 (r208406) @@ -40,10 +40,17 @@ #include "sysinstall.h" #include #include +#include #include +#include + #include +#include +#include + #include #include +#include /* The help file for the TCP/IP setup screen */ #define TCP_HELPFILE "tcp" @@ -636,6 +643,53 @@ netHook(dialogMenuItem *self) return devs ? DITEM_LEAVE_MENU : DITEM_FAILURE; } +static char * +tcpDeviceScan(void) +{ + int s; + struct ifmediareq ifmr; + struct ifaddrs *ifap, *ifa; + struct if_data *ifd; + char *network_dev; + + if ((s = socket(AF_LOCAL, SOCK_DGRAM, 0)) < 0) + return (NULL); + + if (getifaddrs(&ifap) < 0) + return (NULL); + + for (ifa = ifap; ifa != NULL; ifa = ifa->ifa_next) { + memset(&ifmr, 0, sizeof(ifmr)); + strlcpy(ifmr.ifm_name, ifa->ifa_name, sizeof(ifmr.ifm_name)); + + if (ioctl(s, SIOCGIFMEDIA, (caddr_t)&ifmr) < 0) + continue; /* some devices don't support this */ + + if ((ifmr.ifm_status & IFM_AVALID) == 0) + continue; /* not active */ + + if (IFM_TYPE(ifmr.ifm_active) != IFM_ETHER) + continue; /* not an ethernet device */ + + if (ifmr.ifm_status & IFM_ACTIVE) { + network_dev = strdup(ifa->ifa_name); + freeifaddrs(ifap); + + if (!variable_get(VAR_NONINTERACTIVE)) + msgConfirm("Using interface %s", network_dev); + + msgDebug("tcpDeviceScan found %s", network_dev); + return (network_dev); + } + } + + close(s); + + freeifaddrs(ifap); + + return (NULL); +} + /* Get a network device */ Device * tcpDeviceSelect(void) @@ -647,27 +701,38 @@ tcpDeviceSelect(void) rval = NULL; - if (variable_get(VAR_NONINTERACTIVE) && variable_get(VAR_NETWORK_DEVICE)) { + if (variable_get(VAR_NETWORK_DEVICE)) { network_dev = variable_get(VAR_NETWORK_DEVICE); + /* + * netDev can be set to several types of values. + * If netDev is set to ANY, scan all network devices + * looking for a valid link, and go with the first + * device found. netDev can also be specified as a + * comma delimited list, with each network device + * tried in order. netDev can also be set to a single + * network device. + */ + if (!strcmp(network_dev, "ANY")) + network_dev = strdup(tcpDeviceScan()); + while ((dev = strsep(&network_dev, ",")) != NULL) { devs = deviceFind(dev, DEVICE_TYPE_NETWORK); cnt = deviceCount(devs); + if (cnt) { - if (DITEM_STATUS(tcpOpenDialog(devs[0]) == DITEM_SUCCESS)) - return(devs[0]); + if (DITEM_STATUS(tcpOpenDialog(devs[0])) == DITEM_SUCCESS) + return (devs[0]); } } - } - devs = deviceFind(variable_get(VAR_NETWORK_DEVICE), DEVICE_TYPE_NETWORK); - cnt = deviceCount(devs); + if (!variable_get(VAR_NONINTERACTIVE)) + msgConfirm("No network devices available!"); - if (!cnt) { - msgConfirm("No network devices available!"); - return NULL; + return (NULL); } - else if ((!RunningAsInit) && (variable_check("NETWORK_CONFIGURED=NO") != TRUE)) { + + if ((!RunningAsInit) && (variable_check("NETWORK_CONFIGURED=NO") != TRUE)) { if (!msgYesNo("Running multi-user, assume that the network is already configured?")) return devs[0]; } From owner-svn-src-stable-8@FreeBSD.ORG Sat May 22 01:01:59 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C09AA106564A; Sat, 22 May 2010 01:01:59 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AF1A58FC1F; Sat, 22 May 2010 01:01: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 o4M11xmW095914; Sat, 22 May 2010 01:01:59 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4M11xKW095912; Sat, 22 May 2010 01:01:59 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201005220101.o4M11xKW095912@svn.freebsd.org> From: Rick Macklem Date: Sat, 22 May 2010 01:01:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208408 - stable/8/sys/fs/nfsclient X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 May 2010 01:01:59 -0000 Author: rmacklem Date: Sat May 22 01:01:59 2010 New Revision: 208408 URL: http://svn.freebsd.org/changeset/base/208408 Log: MFC: r208234 Add a sanity check for a negative args.fhsize to the experimental NFS client. Modified: stable/8/sys/fs/nfsclient/nfs_clvfsops.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/fs/nfsclient/nfs_clvfsops.c ============================================================================== --- stable/8/sys/fs/nfsclient/nfs_clvfsops.c Sat May 22 00:43:14 2010 (r208407) +++ stable/8/sys/fs/nfsclient/nfs_clvfsops.c Sat May 22 01:01:59 2010 (r208408) @@ -951,7 +951,7 @@ nfs_mount(struct mount *mp) if (vfs_getopt(mp->mnt_optnew, "fh", (void **)&args.fh, &args.fhsize) == 0) { - if (args.fhsize > NFSX_FHMAX) { + if (args.fhsize < 0 || args.fhsize > NFSX_FHMAX) { vfs_mount_error(mp, "Bad file handle"); error = EINVAL; goto out; From owner-svn-src-stable-8@FreeBSD.ORG Sat May 22 18:40:56 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E116C106566B; Sat, 22 May 2010 18:40:55 +0000 (UTC) (envelope-from simon@FreeBSD.org) Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CA7868FC1B; Sat, 22 May 2010 18:40: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 o4MIetLX037794; Sat, 22 May 2010 18:40:55 GMT (envelope-from simon@svn.freebsd.org) Received: (from simon@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4MIetjM037784; Sat, 22 May 2010 18:40:55 GMT (envelope-from simon@svn.freebsd.org) Message-Id: <201005221840.o4MIetjM037784@svn.freebsd.org> From: "Simon L. Nielsen" Date: Sat, 22 May 2010 18:40:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208419 - in stable/8: crypto/openssl crypto/openssl/apps crypto/openssl/crypto crypto/openssl/crypto/aes crypto/openssl/crypto/aes/asm crypto/openssl/crypto/asn1 crypto/openssl/crypto/... X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 May 2010 18:40:56 -0000 Author: simon Date: Sat May 22 18:40:54 2010 New Revision: 208419 URL: http://svn.freebsd.org/changeset/base/208419 Log: Merge OpenSSL 0.9.8n from head into stable/8. Approved by: re (kib) Added: stable/8/crypto/openssl/engines/alpha.opt - copied unchanged from r208415, head/crypto/openssl/engines/alpha.opt stable/8/crypto/openssl/engines/ia64.opt - copied unchanged from r208415, head/crypto/openssl/engines/ia64.opt stable/8/crypto/openssl/ssl/t1_reneg.c - copied unchanged from r208415, head/crypto/openssl/ssl/t1_reneg.c Deleted: stable/8/crypto/openssl/apps/genpkey.c stable/8/crypto/openssl/apps/pkey.c stable/8/crypto/openssl/apps/pkeyparam.c stable/8/crypto/openssl/apps/pkeyutl.c stable/8/crypto/openssl/apps/ts.c stable/8/crypto/openssl/apps/tsget stable/8/crypto/openssl/crypto/aes/aes_x86core.c stable/8/crypto/openssl/crypto/aes/asm/aes-armv4.pl stable/8/crypto/openssl/crypto/aes/asm/aes-ppc.pl stable/8/crypto/openssl/crypto/aes/asm/aes-s390x.pl stable/8/crypto/openssl/crypto/aes/asm/aes-sparcv9.pl stable/8/crypto/openssl/crypto/asn1/ameth_lib.c stable/8/crypto/openssl/crypto/asn1/asn1_locl.h stable/8/crypto/openssl/crypto/asn1/bio_asn1.c stable/8/crypto/openssl/crypto/asn1/bio_ndef.c stable/8/crypto/openssl/crypto/asn1/x_nx509.c stable/8/crypto/openssl/crypto/bn/asm/alpha-mont.pl stable/8/crypto/openssl/crypto/bn/asm/armv4-mont.pl stable/8/crypto/openssl/crypto/bn/asm/mips3-mont.pl stable/8/crypto/openssl/crypto/bn/asm/ppc-mont.pl stable/8/crypto/openssl/crypto/bn/asm/ppc64-mont.pl stable/8/crypto/openssl/crypto/bn/asm/s390x-mont.pl stable/8/crypto/openssl/crypto/bn/asm/s390x.S stable/8/crypto/openssl/crypto/bn/asm/sparcv9-mont.pl stable/8/crypto/openssl/crypto/bn/asm/sparcv9a-mont.pl stable/8/crypto/openssl/crypto/bn/asm/via-mont.pl stable/8/crypto/openssl/crypto/bn/asm/x86-mont.pl stable/8/crypto/openssl/crypto/camellia/asm/ stable/8/crypto/openssl/crypto/ppccpuid.pl stable/8/crypto/openssl/crypto/s390xcpuid.S stable/8/crypto/openssl/crypto/sparcv9cap.c stable/8/crypto/openssl/engines/axp.opt Modified: stable/8/crypto/openssl/CHANGES stable/8/crypto/openssl/Configure stable/8/crypto/openssl/FAQ stable/8/crypto/openssl/Makefile stable/8/crypto/openssl/Makefile.org stable/8/crypto/openssl/NEWS stable/8/crypto/openssl/README stable/8/crypto/openssl/apps/CA.sh stable/8/crypto/openssl/apps/Makefile stable/8/crypto/openssl/apps/apps.c stable/8/crypto/openssl/apps/ca.c stable/8/crypto/openssl/apps/dsa.c stable/8/crypto/openssl/apps/dsaparam.c stable/8/crypto/openssl/apps/enc.c stable/8/crypto/openssl/apps/gendsa.c stable/8/crypto/openssl/apps/genrsa.c stable/8/crypto/openssl/apps/openssl.c stable/8/crypto/openssl/apps/pkcs12.c stable/8/crypto/openssl/apps/req.c stable/8/crypto/openssl/apps/s_apps.h stable/8/crypto/openssl/apps/s_cb.c stable/8/crypto/openssl/apps/s_client.c stable/8/crypto/openssl/apps/s_server.c stable/8/crypto/openssl/apps/s_socket.c stable/8/crypto/openssl/apps/speed.c stable/8/crypto/openssl/apps/x509.c stable/8/crypto/openssl/config stable/8/crypto/openssl/crypto/aes/aes_cfb.c stable/8/crypto/openssl/crypto/aes/asm/aes-x86_64.pl stable/8/crypto/openssl/crypto/asn1/a_mbstr.c stable/8/crypto/openssl/crypto/asn1/a_object.c stable/8/crypto/openssl/crypto/asn1/asn1.h stable/8/crypto/openssl/crypto/asn1/asn1_err.c stable/8/crypto/openssl/crypto/asn1/asn1_gen.c stable/8/crypto/openssl/crypto/asn1/asn1_par.c stable/8/crypto/openssl/crypto/asn1/t_x509.c stable/8/crypto/openssl/crypto/bio/bio.h stable/8/crypto/openssl/crypto/bio/bss_dgram.c stable/8/crypto/openssl/crypto/bio/bss_file.c stable/8/crypto/openssl/crypto/bn/asm/ppc.pl stable/8/crypto/openssl/crypto/bn/asm/x86_64-gcc.c stable/8/crypto/openssl/crypto/bn/bn_div.c stable/8/crypto/openssl/crypto/bn/bn_exp.c stable/8/crypto/openssl/crypto/bn/bn_gf2m.c stable/8/crypto/openssl/crypto/bn/bn_mul.c stable/8/crypto/openssl/crypto/bn/bntest.c stable/8/crypto/openssl/crypto/camellia/Makefile stable/8/crypto/openssl/crypto/cast/c_cfb64.c stable/8/crypto/openssl/crypto/cast/c_ecb.c stable/8/crypto/openssl/crypto/cast/c_enc.c stable/8/crypto/openssl/crypto/cast/c_ofb64.c stable/8/crypto/openssl/crypto/cast/cast.h stable/8/crypto/openssl/crypto/cms/cms_ess.c stable/8/crypto/openssl/crypto/cms/cms_lib.c stable/8/crypto/openssl/crypto/comp/c_zlib.c stable/8/crypto/openssl/crypto/cryptlib.c stable/8/crypto/openssl/crypto/dsa/Makefile stable/8/crypto/openssl/crypto/dsa/dsa_asn1.c stable/8/crypto/openssl/crypto/dsa/dsa_lib.c stable/8/crypto/openssl/crypto/dso/dso_dlfcn.c stable/8/crypto/openssl/crypto/ec/ec2_smpl.c stable/8/crypto/openssl/crypto/ecdsa/Makefile stable/8/crypto/openssl/crypto/ecdsa/ecs_ossl.c stable/8/crypto/openssl/crypto/ecdsa/ecs_sign.c stable/8/crypto/openssl/crypto/engine/Makefile stable/8/crypto/openssl/crypto/engine/eng_all.c stable/8/crypto/openssl/crypto/engine/eng_cnf.c stable/8/crypto/openssl/crypto/engine/eng_cryptodev.c stable/8/crypto/openssl/crypto/engine/eng_ctrl.c stable/8/crypto/openssl/crypto/engine/eng_err.c stable/8/crypto/openssl/crypto/engine/eng_table.c stable/8/crypto/openssl/crypto/engine/engine.h stable/8/crypto/openssl/crypto/err/Makefile stable/8/crypto/openssl/crypto/err/err_all.c stable/8/crypto/openssl/crypto/evp/c_allc.c stable/8/crypto/openssl/crypto/evp/c_alld.c stable/8/crypto/openssl/crypto/evp/digest.c stable/8/crypto/openssl/crypto/evp/evp_lib.c stable/8/crypto/openssl/crypto/evp/evp_locl.h stable/8/crypto/openssl/crypto/evp/names.c stable/8/crypto/openssl/crypto/lhash/lhash.c stable/8/crypto/openssl/crypto/md32_common.h stable/8/crypto/openssl/crypto/md5/asm/md5-x86_64.pl stable/8/crypto/openssl/crypto/o_init.c stable/8/crypto/openssl/crypto/o_str.c stable/8/crypto/openssl/crypto/objects/obj_dat.c stable/8/crypto/openssl/crypto/objects/obj_dat.h stable/8/crypto/openssl/crypto/objects/obj_mac.h stable/8/crypto/openssl/crypto/objects/obj_mac.num stable/8/crypto/openssl/crypto/objects/objects.txt stable/8/crypto/openssl/crypto/ocsp/ocsp_prn.c stable/8/crypto/openssl/crypto/opensslv.h stable/8/crypto/openssl/crypto/pem/pem_seal.c stable/8/crypto/openssl/crypto/perlasm/x86_64-xlate.pl stable/8/crypto/openssl/crypto/pkcs12/p12_attr.c stable/8/crypto/openssl/crypto/pkcs12/p12_key.c stable/8/crypto/openssl/crypto/pkcs12/p12_utl.c stable/8/crypto/openssl/crypto/pkcs12/pkcs12.h stable/8/crypto/openssl/crypto/pkcs7/pk7_mime.c stable/8/crypto/openssl/crypto/rand/rand_win.c stable/8/crypto/openssl/crypto/rand/randfile.c stable/8/crypto/openssl/crypto/rsa/rsa.h stable/8/crypto/openssl/crypto/rsa/rsa_eay.c stable/8/crypto/openssl/crypto/rsa/rsa_eng.c stable/8/crypto/openssl/crypto/rsa/rsa_oaep.c stable/8/crypto/openssl/crypto/rsa/rsa_pss.c stable/8/crypto/openssl/crypto/rsa/rsa_sign.c stable/8/crypto/openssl/crypto/sha/sha512.c stable/8/crypto/openssl/crypto/stack/safestack.h stable/8/crypto/openssl/crypto/symhacks.h stable/8/crypto/openssl/crypto/ui/ui_openssl.c stable/8/crypto/openssl/crypto/x509/by_dir.c stable/8/crypto/openssl/crypto/x509/x509.h stable/8/crypto/openssl/crypto/x509/x509_lu.c stable/8/crypto/openssl/crypto/x509/x509_vfy.c stable/8/crypto/openssl/crypto/x509/x509_vfy.h stable/8/crypto/openssl/crypto/x509/x509_vpm.c stable/8/crypto/openssl/crypto/x509v3/pcy_tree.c stable/8/crypto/openssl/crypto/x509v3/v3_alt.c stable/8/crypto/openssl/crypto/x509v3/v3_ocsp.c stable/8/crypto/openssl/demos/x509/mkcert.c stable/8/crypto/openssl/demos/x509/mkreq.c stable/8/crypto/openssl/doc/apps/enc.pod stable/8/crypto/openssl/doc/apps/verify.pod stable/8/crypto/openssl/doc/crypto/ASN1_generate_nconf.pod stable/8/crypto/openssl/doc/crypto/EVP_DigestInit.pod stable/8/crypto/openssl/doc/crypto/PKCS12_parse.pod stable/8/crypto/openssl/doc/crypto/bn_internal.pod stable/8/crypto/openssl/doc/crypto/d2i_X509.pod stable/8/crypto/openssl/doc/crypto/d2i_X509_CRL.pod stable/8/crypto/openssl/doc/crypto/d2i_X509_REQ.pod stable/8/crypto/openssl/doc/crypto/hmac.pod stable/8/crypto/openssl/doc/crypto/pem.pod stable/8/crypto/openssl/doc/ssl/SSL_CIPHER_get_name.pod stable/8/crypto/openssl/doc/ssl/SSL_CTX_set_options.pod stable/8/crypto/openssl/engines/Makefile stable/8/crypto/openssl/engines/e_capi.c stable/8/crypto/openssl/engines/e_capi_err.c stable/8/crypto/openssl/engines/e_capi_err.h stable/8/crypto/openssl/engines/e_chil.c stable/8/crypto/openssl/engines/e_ubsec.c stable/8/crypto/openssl/fips/Makefile stable/8/crypto/openssl/fips/aes/fips_aesavs.c stable/8/crypto/openssl/fips/des/fips_desmovs.c stable/8/crypto/openssl/fips/dsa/fips_dsa_key.c stable/8/crypto/openssl/fips/dsa/fips_dsa_sign.c stable/8/crypto/openssl/fips/dsa/fips_dsatest.c stable/8/crypto/openssl/fips/dsa/fips_dssvs.c stable/8/crypto/openssl/fips/fips_locl.h stable/8/crypto/openssl/fips/fips_test_suite.c stable/8/crypto/openssl/fips/fips_utl.h stable/8/crypto/openssl/fips/fipsalgtest.pl stable/8/crypto/openssl/fips/fipsld stable/8/crypto/openssl/fips/hmac/fips_hmac.c stable/8/crypto/openssl/fips/hmac/fips_hmac_selftest.c stable/8/crypto/openssl/fips/rand/fips_rand.c stable/8/crypto/openssl/fips/rand/fips_rngvs.c stable/8/crypto/openssl/fips/rsa/fips_rsagtest.c stable/8/crypto/openssl/fips/rsa/fips_rsastest.c stable/8/crypto/openssl/fips/rsa/fips_rsavtest.c stable/8/crypto/openssl/fips/sha/Makefile stable/8/crypto/openssl/fips/sha/fips_sha1_selftest.c stable/8/crypto/openssl/openssl.spec stable/8/crypto/openssl/ssl/Makefile stable/8/crypto/openssl/ssl/d1_both.c stable/8/crypto/openssl/ssl/d1_clnt.c stable/8/crypto/openssl/ssl/d1_enc.c stable/8/crypto/openssl/ssl/d1_lib.c stable/8/crypto/openssl/ssl/d1_pkt.c stable/8/crypto/openssl/ssl/d1_srvr.c stable/8/crypto/openssl/ssl/dtls1.h stable/8/crypto/openssl/ssl/kssl.c stable/8/crypto/openssl/ssl/s23_clnt.c stable/8/crypto/openssl/ssl/s23_srvr.c stable/8/crypto/openssl/ssl/s2_srvr.c stable/8/crypto/openssl/ssl/s3_both.c stable/8/crypto/openssl/ssl/s3_clnt.c stable/8/crypto/openssl/ssl/s3_lib.c stable/8/crypto/openssl/ssl/s3_pkt.c stable/8/crypto/openssl/ssl/s3_srvr.c stable/8/crypto/openssl/ssl/ssl.h stable/8/crypto/openssl/ssl/ssl3.h stable/8/crypto/openssl/ssl/ssl_algs.c stable/8/crypto/openssl/ssl/ssl_asn1.c stable/8/crypto/openssl/ssl/ssl_cert.c stable/8/crypto/openssl/ssl/ssl_ciph.c stable/8/crypto/openssl/ssl/ssl_err.c stable/8/crypto/openssl/ssl/ssl_lib.c stable/8/crypto/openssl/ssl/ssl_locl.h stable/8/crypto/openssl/ssl/ssl_rsa.c stable/8/crypto/openssl/ssl/ssl_sess.c stable/8/crypto/openssl/ssl/ssl_stat.c stable/8/crypto/openssl/ssl/ssl_txt.c stable/8/crypto/openssl/ssl/t1_enc.c stable/8/crypto/openssl/ssl/t1_lib.c stable/8/crypto/openssl/ssl/tls1.h stable/8/crypto/openssl/test/Makefile stable/8/crypto/openssl/test/cms-test.pl stable/8/crypto/openssl/util/domd stable/8/crypto/openssl/util/libeay.num stable/8/crypto/openssl/util/mk1mf.pl stable/8/crypto/openssl/util/mkdef.pl stable/8/crypto/openssl/util/mkerr.pl stable/8/crypto/openssl/util/pl/Mingw32.pl stable/8/crypto/openssl/util/pl/VC-32.pl stable/8/crypto/openssl/util/pod2man.pl stable/8/crypto/openssl/util/shlib_wrap.sh stable/8/secure/lib/libcrypto/Makefile.inc stable/8/secure/lib/libcrypto/Makefile.man stable/8/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 stable/8/secure/lib/libcrypto/man/ASN1_STRING_length.3 stable/8/secure/lib/libcrypto/man/ASN1_STRING_new.3 stable/8/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 stable/8/secure/lib/libcrypto/man/ASN1_generate_nconf.3 stable/8/secure/lib/libcrypto/man/BIO_ctrl.3 stable/8/secure/lib/libcrypto/man/BIO_f_base64.3 stable/8/secure/lib/libcrypto/man/BIO_f_buffer.3 stable/8/secure/lib/libcrypto/man/BIO_f_cipher.3 stable/8/secure/lib/libcrypto/man/BIO_f_md.3 stable/8/secure/lib/libcrypto/man/BIO_f_null.3 stable/8/secure/lib/libcrypto/man/BIO_f_ssl.3 stable/8/secure/lib/libcrypto/man/BIO_find_type.3 stable/8/secure/lib/libcrypto/man/BIO_new.3 stable/8/secure/lib/libcrypto/man/BIO_push.3 stable/8/secure/lib/libcrypto/man/BIO_read.3 stable/8/secure/lib/libcrypto/man/BIO_s_accept.3 stable/8/secure/lib/libcrypto/man/BIO_s_bio.3 stable/8/secure/lib/libcrypto/man/BIO_s_connect.3 stable/8/secure/lib/libcrypto/man/BIO_s_fd.3 stable/8/secure/lib/libcrypto/man/BIO_s_file.3 stable/8/secure/lib/libcrypto/man/BIO_s_mem.3 stable/8/secure/lib/libcrypto/man/BIO_s_null.3 stable/8/secure/lib/libcrypto/man/BIO_s_socket.3 stable/8/secure/lib/libcrypto/man/BIO_set_callback.3 stable/8/secure/lib/libcrypto/man/BIO_should_retry.3 stable/8/secure/lib/libcrypto/man/BN_BLINDING_new.3 stable/8/secure/lib/libcrypto/man/BN_CTX_new.3 stable/8/secure/lib/libcrypto/man/BN_CTX_start.3 stable/8/secure/lib/libcrypto/man/BN_add.3 stable/8/secure/lib/libcrypto/man/BN_add_word.3 stable/8/secure/lib/libcrypto/man/BN_bn2bin.3 stable/8/secure/lib/libcrypto/man/BN_cmp.3 stable/8/secure/lib/libcrypto/man/BN_copy.3 stable/8/secure/lib/libcrypto/man/BN_generate_prime.3 stable/8/secure/lib/libcrypto/man/BN_mod_inverse.3 stable/8/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 stable/8/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 stable/8/secure/lib/libcrypto/man/BN_new.3 stable/8/secure/lib/libcrypto/man/BN_num_bytes.3 stable/8/secure/lib/libcrypto/man/BN_rand.3 stable/8/secure/lib/libcrypto/man/BN_set_bit.3 stable/8/secure/lib/libcrypto/man/BN_swap.3 stable/8/secure/lib/libcrypto/man/BN_zero.3 stable/8/secure/lib/libcrypto/man/CONF_modules_free.3 stable/8/secure/lib/libcrypto/man/CONF_modules_load_file.3 stable/8/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 stable/8/secure/lib/libcrypto/man/DH_generate_key.3 stable/8/secure/lib/libcrypto/man/DH_generate_parameters.3 stable/8/secure/lib/libcrypto/man/DH_get_ex_new_index.3 stable/8/secure/lib/libcrypto/man/DH_new.3 stable/8/secure/lib/libcrypto/man/DH_set_method.3 stable/8/secure/lib/libcrypto/man/DH_size.3 stable/8/secure/lib/libcrypto/man/DSA_SIG_new.3 stable/8/secure/lib/libcrypto/man/DSA_do_sign.3 stable/8/secure/lib/libcrypto/man/DSA_dup_DH.3 stable/8/secure/lib/libcrypto/man/DSA_generate_key.3 stable/8/secure/lib/libcrypto/man/DSA_generate_parameters.3 stable/8/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 stable/8/secure/lib/libcrypto/man/DSA_new.3 stable/8/secure/lib/libcrypto/man/DSA_set_method.3 stable/8/secure/lib/libcrypto/man/DSA_sign.3 stable/8/secure/lib/libcrypto/man/DSA_size.3 stable/8/secure/lib/libcrypto/man/ERR_GET_LIB.3 stable/8/secure/lib/libcrypto/man/ERR_clear_error.3 stable/8/secure/lib/libcrypto/man/ERR_error_string.3 stable/8/secure/lib/libcrypto/man/ERR_get_error.3 stable/8/secure/lib/libcrypto/man/ERR_load_crypto_strings.3 stable/8/secure/lib/libcrypto/man/ERR_load_strings.3 stable/8/secure/lib/libcrypto/man/ERR_print_errors.3 stable/8/secure/lib/libcrypto/man/ERR_put_error.3 stable/8/secure/lib/libcrypto/man/ERR_remove_state.3 stable/8/secure/lib/libcrypto/man/ERR_set_mark.3 stable/8/secure/lib/libcrypto/man/EVP_BytesToKey.3 stable/8/secure/lib/libcrypto/man/EVP_DigestInit.3 stable/8/secure/lib/libcrypto/man/EVP_EncryptInit.3 stable/8/secure/lib/libcrypto/man/EVP_OpenInit.3 stable/8/secure/lib/libcrypto/man/EVP_PKEY_new.3 stable/8/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 stable/8/secure/lib/libcrypto/man/EVP_SealInit.3 stable/8/secure/lib/libcrypto/man/EVP_SignInit.3 stable/8/secure/lib/libcrypto/man/EVP_VerifyInit.3 stable/8/secure/lib/libcrypto/man/OBJ_nid2obj.3 stable/8/secure/lib/libcrypto/man/OPENSSL_Applink.3 stable/8/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 stable/8/secure/lib/libcrypto/man/OPENSSL_config.3 stable/8/secure/lib/libcrypto/man/OPENSSL_ia32cap.3 stable/8/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 stable/8/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 stable/8/secure/lib/libcrypto/man/PKCS12_create.3 stable/8/secure/lib/libcrypto/man/PKCS12_parse.3 stable/8/secure/lib/libcrypto/man/PKCS7_decrypt.3 stable/8/secure/lib/libcrypto/man/PKCS7_encrypt.3 stable/8/secure/lib/libcrypto/man/PKCS7_sign.3 stable/8/secure/lib/libcrypto/man/PKCS7_verify.3 stable/8/secure/lib/libcrypto/man/RAND_add.3 stable/8/secure/lib/libcrypto/man/RAND_bytes.3 stable/8/secure/lib/libcrypto/man/RAND_cleanup.3 stable/8/secure/lib/libcrypto/man/RAND_egd.3 stable/8/secure/lib/libcrypto/man/RAND_load_file.3 stable/8/secure/lib/libcrypto/man/RAND_set_rand_method.3 stable/8/secure/lib/libcrypto/man/RSA_blinding_on.3 stable/8/secure/lib/libcrypto/man/RSA_check_key.3 stable/8/secure/lib/libcrypto/man/RSA_generate_key.3 stable/8/secure/lib/libcrypto/man/RSA_get_ex_new_index.3 stable/8/secure/lib/libcrypto/man/RSA_new.3 stable/8/secure/lib/libcrypto/man/RSA_padding_add_PKCS1_type_1.3 stable/8/secure/lib/libcrypto/man/RSA_print.3 stable/8/secure/lib/libcrypto/man/RSA_private_encrypt.3 stable/8/secure/lib/libcrypto/man/RSA_public_encrypt.3 stable/8/secure/lib/libcrypto/man/RSA_set_method.3 stable/8/secure/lib/libcrypto/man/RSA_sign.3 stable/8/secure/lib/libcrypto/man/RSA_sign_ASN1_OCTET_STRING.3 stable/8/secure/lib/libcrypto/man/RSA_size.3 stable/8/secure/lib/libcrypto/man/SMIME_read_PKCS7.3 stable/8/secure/lib/libcrypto/man/SMIME_write_PKCS7.3 stable/8/secure/lib/libcrypto/man/X509_NAME_ENTRY_get_object.3 stable/8/secure/lib/libcrypto/man/X509_NAME_add_entry_by_txt.3 stable/8/secure/lib/libcrypto/man/X509_NAME_get_index_by_NID.3 stable/8/secure/lib/libcrypto/man/X509_NAME_print_ex.3 stable/8/secure/lib/libcrypto/man/X509_new.3 stable/8/secure/lib/libcrypto/man/bio.3 stable/8/secure/lib/libcrypto/man/blowfish.3 stable/8/secure/lib/libcrypto/man/bn.3 stable/8/secure/lib/libcrypto/man/bn_internal.3 stable/8/secure/lib/libcrypto/man/buffer.3 stable/8/secure/lib/libcrypto/man/crypto.3 stable/8/secure/lib/libcrypto/man/d2i_ASN1_OBJECT.3 stable/8/secure/lib/libcrypto/man/d2i_DHparams.3 stable/8/secure/lib/libcrypto/man/d2i_DSAPublicKey.3 stable/8/secure/lib/libcrypto/man/d2i_PKCS8PrivateKey.3 stable/8/secure/lib/libcrypto/man/d2i_RSAPublicKey.3 stable/8/secure/lib/libcrypto/man/d2i_X509.3 stable/8/secure/lib/libcrypto/man/d2i_X509_ALGOR.3 stable/8/secure/lib/libcrypto/man/d2i_X509_CRL.3 stable/8/secure/lib/libcrypto/man/d2i_X509_NAME.3 stable/8/secure/lib/libcrypto/man/d2i_X509_REQ.3 stable/8/secure/lib/libcrypto/man/d2i_X509_SIG.3 stable/8/secure/lib/libcrypto/man/des.3 stable/8/secure/lib/libcrypto/man/dh.3 stable/8/secure/lib/libcrypto/man/dsa.3 stable/8/secure/lib/libcrypto/man/ecdsa.3 stable/8/secure/lib/libcrypto/man/engine.3 stable/8/secure/lib/libcrypto/man/err.3 stable/8/secure/lib/libcrypto/man/evp.3 stable/8/secure/lib/libcrypto/man/hmac.3 stable/8/secure/lib/libcrypto/man/lh_stats.3 stable/8/secure/lib/libcrypto/man/lhash.3 stable/8/secure/lib/libcrypto/man/md5.3 stable/8/secure/lib/libcrypto/man/mdc2.3 stable/8/secure/lib/libcrypto/man/pem.3 stable/8/secure/lib/libcrypto/man/rand.3 stable/8/secure/lib/libcrypto/man/rc4.3 stable/8/secure/lib/libcrypto/man/ripemd.3 stable/8/secure/lib/libcrypto/man/rsa.3 stable/8/secure/lib/libcrypto/man/sha.3 stable/8/secure/lib/libcrypto/man/threads.3 stable/8/secure/lib/libcrypto/man/ui.3 stable/8/secure/lib/libcrypto/man/ui_compat.3 stable/8/secure/lib/libcrypto/man/x509.3 stable/8/secure/lib/libssl/Makefile stable/8/secure/lib/libssl/Makefile.man stable/8/secure/lib/libssl/man/SSL_CIPHER_get_name.3 stable/8/secure/lib/libssl/man/SSL_COMP_add_compression_method.3 stable/8/secure/lib/libssl/man/SSL_CTX_add_extra_chain_cert.3 stable/8/secure/lib/libssl/man/SSL_CTX_add_session.3 stable/8/secure/lib/libssl/man/SSL_CTX_ctrl.3 stable/8/secure/lib/libssl/man/SSL_CTX_flush_sessions.3 stable/8/secure/lib/libssl/man/SSL_CTX_free.3 stable/8/secure/lib/libssl/man/SSL_CTX_get_ex_new_index.3 stable/8/secure/lib/libssl/man/SSL_CTX_get_verify_mode.3 stable/8/secure/lib/libssl/man/SSL_CTX_load_verify_locations.3 stable/8/secure/lib/libssl/man/SSL_CTX_new.3 stable/8/secure/lib/libssl/man/SSL_CTX_sess_number.3 stable/8/secure/lib/libssl/man/SSL_CTX_sess_set_cache_size.3 stable/8/secure/lib/libssl/man/SSL_CTX_sess_set_get_cb.3 stable/8/secure/lib/libssl/man/SSL_CTX_sessions.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_cert_store.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_cert_verify_callback.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_cipher_list.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_client_CA_list.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_client_cert_cb.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_default_passwd_cb.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_generate_session_id.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_info_callback.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_max_cert_list.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_mode.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_msg_callback.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_options.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_quiet_shutdown.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_session_cache_mode.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_session_id_context.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_ssl_version.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_timeout.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_tmp_dh_callback.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_tmp_rsa_callback.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_verify.3 stable/8/secure/lib/libssl/man/SSL_CTX_use_certificate.3 stable/8/secure/lib/libssl/man/SSL_SESSION_free.3 stable/8/secure/lib/libssl/man/SSL_SESSION_get_ex_new_index.3 stable/8/secure/lib/libssl/man/SSL_SESSION_get_time.3 stable/8/secure/lib/libssl/man/SSL_accept.3 stable/8/secure/lib/libssl/man/SSL_alert_type_string.3 stable/8/secure/lib/libssl/man/SSL_clear.3 stable/8/secure/lib/libssl/man/SSL_connect.3 stable/8/secure/lib/libssl/man/SSL_do_handshake.3 stable/8/secure/lib/libssl/man/SSL_free.3 stable/8/secure/lib/libssl/man/SSL_get_SSL_CTX.3 stable/8/secure/lib/libssl/man/SSL_get_ciphers.3 stable/8/secure/lib/libssl/man/SSL_get_client_CA_list.3 stable/8/secure/lib/libssl/man/SSL_get_current_cipher.3 stable/8/secure/lib/libssl/man/SSL_get_default_timeout.3 stable/8/secure/lib/libssl/man/SSL_get_error.3 stable/8/secure/lib/libssl/man/SSL_get_ex_data_X509_STORE_CTX_idx.3 stable/8/secure/lib/libssl/man/SSL_get_ex_new_index.3 stable/8/secure/lib/libssl/man/SSL_get_fd.3 stable/8/secure/lib/libssl/man/SSL_get_peer_cert_chain.3 stable/8/secure/lib/libssl/man/SSL_get_peer_certificate.3 stable/8/secure/lib/libssl/man/SSL_get_rbio.3 stable/8/secure/lib/libssl/man/SSL_get_session.3 stable/8/secure/lib/libssl/man/SSL_get_verify_result.3 stable/8/secure/lib/libssl/man/SSL_get_version.3 stable/8/secure/lib/libssl/man/SSL_library_init.3 stable/8/secure/lib/libssl/man/SSL_load_client_CA_file.3 stable/8/secure/lib/libssl/man/SSL_new.3 stable/8/secure/lib/libssl/man/SSL_pending.3 stable/8/secure/lib/libssl/man/SSL_read.3 stable/8/secure/lib/libssl/man/SSL_rstate_string.3 stable/8/secure/lib/libssl/man/SSL_session_reused.3 stable/8/secure/lib/libssl/man/SSL_set_bio.3 stable/8/secure/lib/libssl/man/SSL_set_connect_state.3 stable/8/secure/lib/libssl/man/SSL_set_fd.3 stable/8/secure/lib/libssl/man/SSL_set_session.3 stable/8/secure/lib/libssl/man/SSL_set_shutdown.3 stable/8/secure/lib/libssl/man/SSL_set_verify_result.3 stable/8/secure/lib/libssl/man/SSL_shutdown.3 stable/8/secure/lib/libssl/man/SSL_state_string.3 stable/8/secure/lib/libssl/man/SSL_want.3 stable/8/secure/lib/libssl/man/SSL_write.3 stable/8/secure/lib/libssl/man/d2i_SSL_SESSION.3 stable/8/secure/lib/libssl/man/ssl.3 stable/8/secure/usr.bin/openssl/man/CA.pl.1 stable/8/secure/usr.bin/openssl/man/asn1parse.1 stable/8/secure/usr.bin/openssl/man/ca.1 stable/8/secure/usr.bin/openssl/man/ciphers.1 stable/8/secure/usr.bin/openssl/man/crl.1 stable/8/secure/usr.bin/openssl/man/crl2pkcs7.1 stable/8/secure/usr.bin/openssl/man/dgst.1 stable/8/secure/usr.bin/openssl/man/dhparam.1 stable/8/secure/usr.bin/openssl/man/dsa.1 stable/8/secure/usr.bin/openssl/man/dsaparam.1 stable/8/secure/usr.bin/openssl/man/ec.1 stable/8/secure/usr.bin/openssl/man/ecparam.1 stable/8/secure/usr.bin/openssl/man/enc.1 stable/8/secure/usr.bin/openssl/man/errstr.1 stable/8/secure/usr.bin/openssl/man/gendsa.1 stable/8/secure/usr.bin/openssl/man/genrsa.1 stable/8/secure/usr.bin/openssl/man/nseq.1 stable/8/secure/usr.bin/openssl/man/ocsp.1 stable/8/secure/usr.bin/openssl/man/openssl.1 stable/8/secure/usr.bin/openssl/man/passwd.1 stable/8/secure/usr.bin/openssl/man/pkcs12.1 stable/8/secure/usr.bin/openssl/man/pkcs7.1 stable/8/secure/usr.bin/openssl/man/pkcs8.1 stable/8/secure/usr.bin/openssl/man/rand.1 stable/8/secure/usr.bin/openssl/man/req.1 stable/8/secure/usr.bin/openssl/man/rsa.1 stable/8/secure/usr.bin/openssl/man/rsautl.1 stable/8/secure/usr.bin/openssl/man/s_client.1 stable/8/secure/usr.bin/openssl/man/s_server.1 stable/8/secure/usr.bin/openssl/man/s_time.1 stable/8/secure/usr.bin/openssl/man/sess_id.1 stable/8/secure/usr.bin/openssl/man/smime.1 stable/8/secure/usr.bin/openssl/man/speed.1 stable/8/secure/usr.bin/openssl/man/spkac.1 stable/8/secure/usr.bin/openssl/man/verify.1 stable/8/secure/usr.bin/openssl/man/version.1 stable/8/secure/usr.bin/openssl/man/x509.1 stable/8/secure/usr.bin/openssl/man/x509v3_config.1 Directory Properties: stable/8/crypto/openssl/ (props changed) stable/8/secure/lib/libcrypto/ (props changed) stable/8/secure/lib/libssl/ (props changed) stable/8/secure/usr.bin/openssl/ (props changed) Modified: stable/8/crypto/openssl/CHANGES ============================================================================== --- stable/8/crypto/openssl/CHANGES Sat May 22 16:55:35 2010 (r208418) +++ stable/8/crypto/openssl/CHANGES Sat May 22 18:40:54 2010 (r208419) @@ -2,6 +2,191 @@ OpenSSL CHANGES _______________ + Changes between 0.9.8m and 0.9.8n [24 Mar 2010] + + *) When rejecting SSL/TLS records due to an incorrect version number, never + update s->server with a new major version number. As of + - OpenSSL 0.9.8m if 'short' is a 16-bit type, + - OpenSSL 0.9.8f if 'short' is longer than 16 bits, + the previous behavior could result in a read attempt at NULL when + receiving specific incorrect SSL/TLS records once record payload + protection is active. (CVE-2010-0740) + [Bodo Moeller, Adam Langley ] + + *) Fix for CVE-2010-0433 where some kerberos enabled versions of OpenSSL + could be crashed if the relevant tables were not present (e.g. chrooted). + [Tomas Hoger ] + + Changes between 0.9.8l and 0.9.8m [25 Feb 2010] + + *) Always check bn_wexpend() return values for failure. (CVE-2009-3245) + [Martin Olsson, Neel Mehta] + + *) Fix X509_STORE locking: Every 'objs' access requires a lock (to + accommodate for stack sorting, always a write lock!). + [Bodo Moeller] + + *) On some versions of WIN32 Heap32Next is very slow. This can cause + excessive delays in the RAND_poll(): over a minute. As a workaround + include a time check in the inner Heap32Next loop too. + [Steve Henson] + + *) The code that handled flushing of data in SSL/TLS originally used the + BIO_CTRL_INFO ctrl to see if any data was pending first. This caused + the problem outlined in PR#1949. The fix suggested there however can + trigger problems with buggy BIO_CTRL_WPENDING (e.g. some versions + of Apache). So instead simplify the code to flush unconditionally. + This should be fine since flushing with no data to flush is a no op. + [Steve Henson] + + *) Handle TLS versions 2.0 and later properly and correctly use the + highest version of TLS/SSL supported. Although TLS >= 2.0 is some way + off ancient servers have a habit of sticking around for a while... + [Steve Henson] + + *) Modify compression code so it frees up structures without using the + ex_data callbacks. This works around a problem where some applications + call CRYPTO_cleanup_all_ex_data() before application exit (e.g. when + restarting) then use compression (e.g. SSL with compression) later. + This results in significant per-connection memory leaks and + has caused some security issues including CVE-2008-1678 and + CVE-2009-4355. + [Steve Henson] + + *) Constify crypto/cast (i.e., ): a CAST_KEY doesn't + change when encrypting or decrypting. + [Bodo Moeller] + + *) Add option SSL_OP_LEGACY_SERVER_CONNECT which will allow clients to + connect and renegotiate with servers which do not support RI. + Until RI is more widely deployed this option is enabled by default. + [Steve Henson] + + *) Add "missing" ssl ctrls to clear options and mode. + [Steve Henson] + + *) If client attempts to renegotiate and doesn't support RI respond with + a no_renegotiation alert as required by RFC5746. Some renegotiating + TLS clients will continue a connection gracefully when they receive + the alert. Unfortunately OpenSSL mishandled this alert and would hang + waiting for a server hello which it will never receive. Now we treat a + received no_renegotiation alert as a fatal error. This is because + applications requesting a renegotiation might well expect it to succeed + and would have no code in place to handle the server denying it so the + only safe thing to do is to terminate the connection. + [Steve Henson] + + *) Add ctrl macro SSL_get_secure_renegotiation_support() which returns 1 if + peer supports secure renegotiation and 0 otherwise. Print out peer + renegotiation support in s_client/s_server. + [Steve Henson] + + *) Replace the highly broken and deprecated SPKAC certification method with + the updated NID creation version. This should correctly handle UTF8. + [Steve Henson] + + *) Implement RFC5746. Re-enable renegotiation but require the extension + as needed. Unfortunately, SSL3_FLAGS_ALLOW_UNSAFE_LEGACY_RENEGOTIATION + turns out to be a bad idea. It has been replaced by + SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION which can be set with + SSL_CTX_set_options(). This is really not recommended unless you + know what you are doing. + [Eric Rescorla , Ben Laurie, Steve Henson] + + *) Fixes to stateless session resumption handling. Use initial_ctx when + issuing and attempting to decrypt tickets in case it has changed during + servername handling. Use a non-zero length session ID when attempting + stateless session resumption: this makes it possible to determine if + a resumption has occurred immediately after receiving server hello + (several places in OpenSSL subtly assume this) instead of later in + the handshake. + [Steve Henson] + + *) The functions ENGINE_ctrl(), OPENSSL_isservice(), + CMS_get1_RecipientRequest() and RAND_bytes() can return <=0 on error + fixes for a few places where the return code is not checked + correctly. + [Julia Lawall ] + + *) Add --strict-warnings option to Configure script to include devteam + warnings in other configurations. + [Steve Henson] + + *) Add support for --libdir option and LIBDIR variable in makefiles. This + makes it possible to install openssl libraries in locations which + have names other than "lib", for example "/usr/lib64" which some + systems need. + [Steve Henson, based on patch from Jeremy Utley] + + *) Don't allow the use of leading 0x80 in OIDs. This is a violation of + X690 8.9.12 and can produce some misleading textual output of OIDs. + [Steve Henson, reported by Dan Kaminsky] + + *) Delete MD2 from algorithm tables. This follows the recommendation in + several standards that it is not used in new applications due to + several cryptographic weaknesses. For binary compatibility reasons + the MD2 API is still compiled in by default. + [Steve Henson] + + *) Add compression id to {d2i,i2d}_SSL_SESSION so it is correctly saved + and restored. + [Steve Henson] + + *) Rename uni2asc and asc2uni functions to OPENSSL_uni2asc and + OPENSSL_asc2uni conditionally on Netware platforms to avoid a name + clash. + [Guenter ] + + *) Fix the server certificate chain building code to use X509_verify_cert(), + it used to have an ad-hoc builder which was unable to cope with anything + other than a simple chain. + [David Woodhouse , Steve Henson] + + *) Don't check self signed certificate signatures in X509_verify_cert() + by default (a flag can override this): it just wastes time without + adding any security. As a useful side effect self signed root CAs + with non-FIPS digests are now usable in FIPS mode. + [Steve Henson] + + *) In dtls1_process_out_of_seq_message() the check if the current message + is already buffered was missing. For every new message was memory + allocated, allowing an attacker to perform an denial of service attack + with sending out of seq handshake messages until there is no memory + left. Additionally every future messege was buffered, even if the + sequence number made no sense and would be part of another handshake. + So only messages with sequence numbers less than 10 in advance will be + buffered. (CVE-2009-1378) + [Robin Seggelmann, discovered by Daniel Mentz] + + *) Records are buffered if they arrive with a future epoch to be + processed after finishing the corresponding handshake. There is + currently no limitation to this buffer allowing an attacker to perform + a DOS attack with sending records with future epochs until there is no + memory left. This patch adds the pqueue_size() function to detemine + the size of a buffer and limits the record buffer to 100 entries. + (CVE-2009-1377) + [Robin Seggelmann, discovered by Daniel Mentz] + + *) Keep a copy of frag->msg_header.frag_len so it can be used after the + parent structure is freed. (CVE-2009-1379) + [Daniel Mentz] + + *) Handle non-blocking I/O properly in SSL_shutdown() call. + [Darryl Miles ] + + *) Add 2.5.4.* OIDs + [Ilya O. ] + + Changes between 0.9.8k and 0.9.8l [5 Nov 2009] + + *) Disable renegotiation completely - this fixes a severe security + problem (CVE-2009-3555) at the cost of breaking all + renegotiation. Renegotiation can be re-enabled by setting + SSL3_FLAGS_ALLOW_UNSAFE_LEGACY_RENEGOTIATION in s3->flags at + run-time. This is really not recommended unless you know what + you're doing. + [Ben Laurie] + Changes between 0.9.8j and 0.9.8k [25 Mar 2009] *) Don't set val to NULL when freeing up structures, it is freed up by @@ -86,6 +271,10 @@ Changes between 0.9.8h and 0.9.8i [15 Sep 2008] + *) Fix NULL pointer dereference if a DTLS server received + ChangeCipherSpec as first record (CVE-2009-1386). + [PR #1679] + *) Fix a state transitition in s3_srvr.c and d1_srvr.c (was using SSL3_ST_CW_CLNT_HELLO_B, should be ..._ST_SW_SRVR_...). [Nagendra Modadugu] @@ -1489,19 +1678,6 @@ differing sizes. [Richard Levitte] - Changes between 0.9.7m and 0.9.7n [xx XXX xxxx] - - *) In the SSL/TLS server implementation, be strict about session ID - context matching (which matters if an application uses a single - external cache for different purposes). Previously, - out-of-context reuse was forbidden only if SSL_VERIFY_PEER was - set. This did ensure strict client verification, but meant that, - with applications using a single external cache for quite - different requirements, clients could circumvent ciphersuite - restrictions for a given session ID context by starting a session - in a different context. - [Bodo Moeller] - Changes between 0.9.7l and 0.9.7m [23 Feb 2007] *) Cleanse PEM buffers before freeing them since they may contain Modified: stable/8/crypto/openssl/Configure ============================================================================== --- stable/8/crypto/openssl/Configure Sat May 22 16:55:35 2010 (r208418) +++ stable/8/crypto/openssl/Configure Sat May 22 18:40:54 2010 (r208419) @@ -106,6 +106,8 @@ my $usage="Usage: Configure [no- my $gcc_devteam_warn = "-Wall -pedantic -DPEDANTIC -Wno-long-long -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Werror -DCRYPTO_MDEBUG_ALL -DCRYPTO_MDEBUG_ABORT -DREF_CHECK -DOPENSSL_NO_DEPRECATED"; +my $strict_warnings = 0; + my $x86_gcc_des="DES_PTR DES_RISC1 DES_UNROLL"; # MD2_CHAR slags pentium pros @@ -159,14 +161,15 @@ my %table=( "debug-ben", "gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -O2 -pedantic -Wall -Wshadow -Werror -pipe::(unknown):::::bn86-elf.o co86-elf.o", "debug-ben-openbsd","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DOPENSSL_OPENBSD_DEV_CRYPTO -DOPENSSL_NO_ASM -O2 -pedantic -Wall -Wshadow -Werror -pipe::(unknown)::::", "debug-ben-openbsd-debug","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DOPENSSL_OPENBSD_DEV_CRYPTO -DOPENSSL_NO_ASM -g3 -O2 -pedantic -Wall -Wshadow -Werror -pipe::(unknown)::::", -"debug-ben-debug", "gcc:$gcc_devteam_warn -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DDEBUG_SAFESTACK -g3 -O2 -pipe::(unknown)::::::", +"debug-ben-debug", "gcc:$gcc_devteam_warn -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DDEBUG_SAFESTACK -ggdb3 -O2 -pipe::(unknown)::::::", +"debug-ben-debug-noopt", "gcc:$gcc_devteam_warn -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DDEBUG_SAFESTACK -ggdb3 -pipe::(unknown)::::::", "debug-ben-strict", "gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DCONST_STRICT -O2 -Wall -Wshadow -Werror -Wpointer-arith -Wcast-qual -Wwrite-strings -pipe::(unknown)::::::", "debug-rse","cc:-DTERMIOS -DL_ENDIAN -pipe -O -g -ggdb3 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}", "debug-bodo", "gcc:-DL_ENDIAN -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBIO_PAIR_DEBUG -DPEDANTIC -g -march=i486 -pedantic -Wshadow -Wall -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -Wundef -Wconversion -pipe::-D_REENTRANT:::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}", "debug-ulf", "gcc:-DTERMIOS -DL_ENDIAN -march=i486 -Wall -DBN_DEBUG -DBN_DEBUG_RAND -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DOPENSSL_NO_ASM -g -Wformat -Wshadow -Wmissing-prototypes -Wmissing-declarations:::CYGWIN32:::${no_asm}:win32:cygwin-shared:::.dll", -"debug-steve64", "gcc:$gcc_devteam_warn -m64 -DL_ENDIAN -DTERMIO -DCONF_DEBUG -DDEBUG_SAFESTACK -g -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK BF_PTR2 DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"debug-steve64", "gcc:$gcc_devteam_warn -m64 -DL_ENDIAN -DTERMIO -DCONF_DEBUG -DDEBUG_SAFESTACK -g -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "debug-steve32", "gcc:$gcc_devteam_warn -m32 -DL_ENDIAN -DCONF_DEBUG -DDEBUG_SAFESTACK -g -pipe::-D_REENTRANT::-rdynamic -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC:-m32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"debug-steve-opt", "gcc:$gcc_devteam_warn -m64 -O3 -DL_ENDIAN -DTERMIO -DCONF_DEBUG -DDEBUG_SAFESTACK -g -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK BF_PTR2 DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"debug-steve-opt", "gcc:$gcc_devteam_warn -m64 -O3 -DL_ENDIAN -DTERMIO -DCONF_DEBUG -DDEBUG_SAFESTACK -g -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "debug-steve", "gcc:-DL_ENDIAN -DREF_CHECK -DCONF_DEBUG -DDEBUG_SAFESTACK -DCRYPTO_MDEBUG_ALL -DPEDANTIC -m32 -g -pedantic -Wno-long-long -Wall -Werror -Wshadow -pipe::-D_REENTRANT::-rdynamic -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared", "debug-steve-linux-pseudo64", "gcc:-DL_ENDIAN -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DDEBUG_SAFESTACK -DCRYPTO_MDEBUG_ALL -DOPENSSL_NO_ASM -g -mcpu=i486 -Wall -Werror -Wshadow -pipe::-D_REENTRANT::-rdynamic -ldl:SIXTY_FOUR_BIT:${no_asm}:dlfcn:linux-shared", "debug-levitte-linux-elf","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_DEBUG -DBN_DEBUG_RAND -DCRYPTO_MDEBUG -DENGINE_CONF_DEBUG -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -Wshadow -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -Wundef -Wconversion -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", @@ -178,6 +181,9 @@ my %table=( "debug-linux-ppro","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -mcpu=pentiumpro -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn", "debug-linux-elf","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -march=i486 -Wall::-D_REENTRANT::-lefence -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "debug-linux-elf-noefence","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -march=i486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"debug-linux-generic32","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DTERMIO -g -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"debug-linux-generic64","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DTERMIO -g -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"debug-linux-x86_64","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -m64 -DL_ENDIAN -DTERMIO -g -Wall -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "dist", "cc:-O::(unknown)::::::", # Basic configs that should work on any (32 and less bit) box @@ -203,11 +209,11 @@ my %table=( # actually recommend to consider using gcc shared build even with vendor # compiler:-) # -"solaris64-x86_64-gcc","gcc:-m64 -O3 -Wall -DL_ENDIAN -DMD32_REG_T=int::-D_REENTRANT::-lsocket -lnsl -ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK BF_PTR2 DES_INT DES_UNROLL:${x86_64_asm}:dlfcn:solaris-shared:-fPIC:-m64 -shared -static-libgcc:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"solaris64-x86_64-gcc","gcc:-m64 -O3 -Wall -DL_ENDIAN -DMD32_REG_T=int::-D_REENTRANT::-lsocket -lnsl -ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:dlfcn:solaris-shared:-fPIC:-m64 -shared -static-libgcc:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", #### Solaris x86 with Sun C setups "solaris-x86-cc","cc:-fast -O -Xa::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_UNROLL BF_PTR:${no_asm}:dlfcn:solaris-shared:-KPIC:-G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"solaris64-x86_64-cc","cc:-fast -xarch=amd64 -xstrconst -Xa -DL_ENDIAN::-D_REENTRANT::-lsocket -lnsl -ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK BF_PTR2 DES_INT DES_UNROLL:${x86_64_asm}:dlfcn:solaris-shared:-KPIC:-xarch=amd64 -G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"solaris64-x86_64-cc","cc:-fast -xarch=amd64 -xstrconst -Xa -DL_ENDIAN::-D_REENTRANT::-lsocket -lnsl -ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:dlfcn:solaris-shared:-KPIC:-xarch=amd64 -G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", #### SPARC Solaris with GNU C setups "solaris-sparcv7-gcc","gcc:-O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${no_asm}:dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", @@ -337,7 +343,7 @@ my %table=( "linux-ia64", "gcc:-DL_ENDIAN -DTERMIO -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "linux-ia64-ecc","ecc:-DL_ENDIAN -DTERMIO -O2 -Wall -no_cpprt::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "linux-ia64-icc","icc:-DL_ENDIAN -DTERMIO -O2 -Wall -no_cpprt::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"linux-x86_64", "gcc:-m64 -DL_ENDIAN -DTERMIO -O3 -Wall -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK BF_PTR2 DES_INT DES_UNROLL:${x86_64_asm}:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"linux-x86_64", "gcc:-m64 -DL_ENDIAN -DTERMIO -O3 -Wall -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", #### SPARC Linux setups # Ray Miller has patiently # assisted with debugging of following two configs. @@ -390,7 +396,8 @@ my %table=( # QNX "qnx4", "cc:-DL_ENDIAN -DTERMIO::(unknown):::${x86_gcc_des} ${x86_gcc_opts}:", -"qnx6", "cc:-DL_ENDIAN -DTERMIOS::(unknown)::-lsocket:${x86_gcc_des} ${x86_gcc_opts}:", +"QNX6", "gcc:-DTERMIOS::::-lsocket::${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"QNX6-i386", "gcc:-DL_ENDIAN -DTERMIOS -O2 -Wall::::-lsocket:${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", #### SCO/Caldera targets. # @@ -520,7 +527,7 @@ my %table=( "darwin64-ppc-cc","cc:-arch ppc64 -O3 -DB_ENDIAN::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::osx_ppc64.o::::::::::dlfcn:darwin-shared:-fPIC -fno-common:-arch ppc64 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib", "darwin-i386-cc","cc:-arch i386 -O3 -fomit-frame-pointer -DL_ENDIAN::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${no_asm}:dlfcn:darwin-shared:-fPIC -fno-common:-arch i386 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib", "debug-darwin-i386-cc","cc:-arch i386 -g3 -DL_ENDIAN::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${no_asm}:dlfcn:darwin-shared:-fPIC -fno-common:-arch i386 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib", -"darwin64-x86_64-cc","cc:-arch x86_64 -O3 -fomit-frame-pointer -DL_ENDIAN -DMD32_REG_T=int -Wall::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK BF_PTR2 DES_INT DES_UNROLL:${no_asm}:dlfcn:darwin-shared:-fPIC -fno-common:-arch x86_64 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib", +"darwin64-x86_64-cc","cc:-arch x86_64 -O3 -fomit-frame-pointer -DL_ENDIAN -DMD32_REG_T=int -Wall::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL:${no_asm}:dlfcn:darwin-shared:-fPIC -fno-common:-arch x86_64 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib", "debug-darwin-ppc-cc","cc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DB_ENDIAN -g -Wall -O::-D_REENTRANT:MACOSX::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::osx_ppc32.o::::::::::dlfcn:darwin-shared:-fPIC -fno-common:-dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib", ##### A/UX @@ -581,9 +588,11 @@ my $idx_ranlib = $idx++; my $idx_arflags = $idx++; my $prefix=""; +my $libdir=""; my $openssldir=""; my $exe_ext=""; -my $install_prefix=""; +my $install_prefix= "$ENV{'INSTALL_PREFIX'}"; +my $cross_compile_prefix=""; my $fipslibdir="/usr/local/ssl/fips-1.0/lib/"; my $nofipscanistercheck=0; my $fipsdso=0; @@ -747,6 +756,10 @@ PROCESS_ARGS: { exit(&test_sanity()); } + elsif (/^--strict-warnings/) + { + $strict_warnings = 1; + } elsif (/^reconfigure/ || /^reconf/) { if (open(IN,"<$Makefile")) @@ -816,6 +829,10 @@ PROCESS_ARGS: { $prefix=$1; } + elsif (/^--libdir=(.*)$/) + { + $libdir=$1; + } elsif (/^--openssldir=(.*)$/) { $openssldir=$1; @@ -979,7 +996,8 @@ my $shared_target = $fields[$idx_shared_ my $shared_cflag = $fields[$idx_shared_cflag]; my $shared_ldflag = $fields[$idx_shared_ldflag]; my $shared_extension = $fields[$idx_shared_extension]; -my $ranlib = $fields[$idx_ranlib]; +my $ranlib = $ENV{'RANLIB'} || $fields[$idx_ranlib]; +my $ar = $ENV{'AR'} || "ar"; my $arflags = $fields[$idx_arflags]; if ($fips) @@ -1079,9 +1097,14 @@ if ($openssldir eq "" and $prefix eq "") } $prefix=$openssldir if $prefix eq ""; +$libdir="lib" if $libdir eq ""; + $default_ranlib= &which("ranlib") or $default_ranlib="true"; $perl=$ENV{'PERL'} or $perl=&which("perl5") or $perl=&which("perl") or $perl="perl"; +my $make = $ENV{'MAKE'} || "make"; + +$cross_compile_prefix=$ENV{'CROSS_COMPILE'} if $cross_compile_prefix eq ""; chop $openssldir if $openssldir =~ /\/$/; chop $prefix if $prefix =~ /.\/$/; @@ -1434,6 +1457,16 @@ if ($shlib_version_number =~ /(^[0-9]*)\ $shlib_minor=$2; } +if ($strict_warnings) + { + my $wopt; + die "ERROR --strict-warnings requires gcc" unless ($cc =~ /gcc$/); + foreach $wopt (split /\s+/, $gcc_devteam_warn) + { + $cflags .= " $wopt" unless ($cflags =~ /$wopt/) + } + } + open(IN,'$Makefile.new") || die "unable to create $Makefile.new:$!\n"; @@ -1463,11 +1496,22 @@ while () s/^SHLIB_EXT=.*/SHLIB_EXT=$shared_extension/; s/^INSTALLTOP=.*$/INSTALLTOP=$prefix/; s/^OPENSSLDIR=.*$/OPENSSLDIR=$openssldir/; + s/^LIBDIR=.*$/LIBDIR=$libdir/; s/^INSTALL_PREFIX=.*$/INSTALL_PREFIX=$install_prefix/; s/^PLATFORM=.*$/PLATFORM=$target/; s/^OPTIONS=.*$/OPTIONS=$options/; s/^CONFIGURE_ARGS=.*$/CONFIGURE_ARGS=$argvstring/; - s/^CC=.*$/CC= $cc/; + if ($cross_compile_prefix) + { + s/^CC=.*$/CROSS_COMPILE= $cross_compile_prefix\nCC= \$\(CROSS_COMPILE\)$cc/; + s/^AR=\s*/AR= \$\(CROSS_COMPILE\)/; + s/^RANLIB=\s*/RANLIB= \$\(CROSS_COMPILE\)/; + } + else { + s/^CC=.*$/CC= $cc/; + s/^AR=\s*ar/AR= $ar/; + s/^RANLIB=.*/RANLIB= $ranlib/; + } s/^MAKEDEPPROG=.*$/MAKEDEPPROG= $cc/ if $cc eq "gcc"; s/^CFLAG=.*$/CFLAG= $cflags/; s/^DEPFLAG=.*$/DEPFLAG=$depflags/; @@ -1486,7 +1530,6 @@ while () s/^SHA1_ASM_OBJ=.*$/SHA1_ASM_OBJ= $sha1_obj/; s/^RMD160_ASM_OBJ=.*$/RMD160_ASM_OBJ= $rmd160_obj/; s/^PROCESSOR=.*/PROCESSOR= $processor/; - s/^RANLIB=.*/RANLIB= $ranlib/; s/^ARFLAGS=.*/ARFLAGS= $arflags/; s/^PERL=.*/PERL= $perl/; s/^KRB5_INCLUDES=.*/KRB5_INCLUDES=$withargs{"krb5-include"}/; @@ -1643,9 +1686,20 @@ print OUT "#define OPENSSL_CPUID_OBJ\n\n while () { if (/^#define\s+OPENSSLDIR/) - { print OUT "#define OPENSSLDIR \"$openssldir\"\n"; } + { + my $foo = $openssldir; + $foo =~ s/\\/\\\\/g; + print OUT "#define OPENSSLDIR \"$foo\"\n"; + } elsif (/^#define\s+ENGINESDIR/) - { print OUT "#define ENGINESDIR \"$prefix/lib/engines\"\n"; } + { + # $foo is to become "$prefix/lib$multilib/engines"; + # as Makefile.org and engines/Makefile are adapted for + # $multilib suffix. + my $foo = "$prefix/lib/engines"; + $foo =~ s/\\/\\\\/g; + print OUT "#define ENGINESDIR \"$foo\"\n"; + } elsif (/^#((define)|(undef))\s+OPENSSL_EXPORT_VAR_AS_FUNCTION/) { printf OUT "#undef OPENSSL_EXPORT_VAR_AS_FUNCTION\n" if $export_var_as_fn; @@ -1750,7 +1804,7 @@ if($IsMK1MF) { EOF close(OUT); } else { - my $make_command = "make PERL=\'$perl\'"; + my $make_command = "$make PERL=\'$perl\'"; my $make_targets = ""; $make_targets .= " links" if $symlink; $make_targets .= " depend" if $depflags ne $default_depflags && $make_depend; Modified: stable/8/crypto/openssl/FAQ ============================================================================== --- stable/8/crypto/openssl/FAQ Sat May 22 16:55:35 2010 (r208418) +++ stable/8/crypto/openssl/FAQ Sat May 22 18:40:54 2010 (r208419) @@ -78,7 +78,7 @@ OpenSSL - Frequently Asked Questions * Which is the current version of OpenSSL? The current version is available from . -OpenSSL 0.9.8k was released on Mar 25th, 2009. +OpenSSL 0.9.8n was released on Mar 24th, 2010. In addition to the current stable release, you can also access daily snapshots of the OpenSSL development version at