From owner-svn-src-stable-7@FreeBSD.ORG Sun May 16 04:31:16 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D858C1065677; Sun, 16 May 2010 04:31:16 +0000 (UTC) (envelope-from jfv@FreeBSD.org) Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C83D28FC20; Sun, 16 May 2010 04:31: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 o4G4VGBu089005; Sun, 16 May 2010 04:31:16 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4G4VGQl089003; Sun, 16 May 2010 04:31:16 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <201005160431.o4G4VGQl089003@svn.freebsd.org> From: Jack F Vogel Date: Sun, 16 May 2010 04:31:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208127 - stable/7/sys/dev/e1000 X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 May 2010 04:31:17 -0000 Author: jfv Date: Sun May 16 04:31:16 2010 New Revision: 208127 URL: http://svn.freebsd.org/changeset/base/208127 Log: Change poll routine to conform to proper interface. Modified: stable/7/sys/dev/e1000/if_em.c Modified: stable/7/sys/dev/e1000/if_em.c ============================================================================== --- stable/7/sys/dev/e1000/if_em.c Sun May 16 00:43:49 2010 (r208126) +++ stable/7/sys/dev/e1000/if_em.c Sun May 16 04:31:16 2010 (r208127) @@ -1345,7 +1345,7 @@ em_init(void *arg) * Legacy polling routine: note this only works with single queue * *********************************************************************/ -static int +static void em_poll(struct ifnet *ifp, enum poll_cmd cmd, int count) { struct adapter *adapter = ifp->if_softc; @@ -1356,7 +1356,7 @@ em_poll(struct ifnet *ifp, enum poll_cmd EM_CORE_LOCK(adapter); if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) { EM_CORE_UNLOCK(adapter); - return (rx_done); + return; } if (cmd == POLL_AND_CHECK_STATUS) { @@ -1386,7 +1386,7 @@ em_poll(struct ifnet *ifp, enum poll_cmd #endif EM_TX_UNLOCK(txr); - return (rx_done); + return; } #endif /* DEVICE_POLLING */ From owner-svn-src-stable-7@FreeBSD.ORG Sun May 16 09:59:28 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8AD3E106566C; Sun, 16 May 2010 09:59:28 +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 5F42D8FC23; Sun, 16 May 2010 09:59: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 o4G9xSCM065202; Sun, 16 May 2010 09:59:28 GMT (envelope-from stefanf@svn.freebsd.org) Received: (from stefanf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4G9xSwu065200; Sun, 16 May 2010 09:59:28 GMT (envelope-from stefanf@svn.freebsd.org) Message-Id: <201005160959.o4G9xSwu065200@svn.freebsd.org> From: Stefan Farfeleder Date: Sun, 16 May 2010 09:59:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208133 - stable/7/bin/sh X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 May 2010 09:59:28 -0000 Author: stefanf Date: Sun May 16 09:59:28 2010 New Revision: 208133 URL: http://svn.freebsd.org/changeset/base/208133 Log: Merge r199631: Handle current work directories of arbitrary length. Modified: stable/7/bin/sh/cd.c Directory Properties: stable/7/bin/sh/ (props changed) Modified: stable/7/bin/sh/cd.c ============================================================================== --- stable/7/bin/sh/cd.c Sun May 16 08:03:24 2010 (r208132) +++ stable/7/bin/sh/cd.c Sun May 16 09:59:28 2010 (r208133) @@ -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-7@FreeBSD.ORG Sun May 16 10:20:54 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 82370106567F; Sun, 16 May 2010 10:20:54 +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 708C48FC16; Sun, 16 May 2010 10:20: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 o4GAKsEs070130; Sun, 16 May 2010 10:20:54 GMT (envelope-from stefanf@svn.freebsd.org) Received: (from stefanf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4GAKsrw070128; Sun, 16 May 2010 10:20:54 GMT (envelope-from stefanf@svn.freebsd.org) Message-Id: <201005161020.o4GAKsrw070128@svn.freebsd.org> From: Stefan Farfeleder Date: Sun, 16 May 2010 10:20:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208135 - stable/7/bin/sh X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 May 2010 10:20:54 -0000 Author: stefanf Date: Sun May 16 10:20:54 2010 New Revision: 208135 URL: http://svn.freebsd.org/changeset/base/208135 Log: Merge r190698: Don't let trailing empty lines overwrite the result of the last command with 0. Modified: stable/7/bin/sh/eval.c Directory Properties: stable/7/bin/sh/ (props changed) Modified: stable/7/bin/sh/eval.c ============================================================================== --- stable/7/bin/sh/eval.c Sun May 16 10:01:06 2010 (r208134) +++ stable/7/bin/sh/eval.c Sun May 16 10:20:54 2010 (r208135) @@ -166,7 +166,8 @@ evalstring(char *s) setstackmark(&smark); setinputstring(s, 1); while ((n = parsecmd(0)) != NEOF) { - evaltree(n, 0); + if (n != NULL) + evaltree(n, 0); popstackmark(&smark); } popfile(); From owner-svn-src-stable-7@FreeBSD.ORG Sun May 16 10:23:34 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2756C106566B; Sun, 16 May 2010 10:23:34 +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 155A88FC08; Sun, 16 May 2010 10:23: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 o4GANX8S070788; Sun, 16 May 2010 10:23:33 GMT (envelope-from stefanf@svn.freebsd.org) Received: (from stefanf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4GANXd3070782; Sun, 16 May 2010 10:23:33 GMT (envelope-from stefanf@svn.freebsd.org) Message-Id: <201005161023.o4GANXd3070782@svn.freebsd.org> From: Stefan Farfeleder Date: Sun, 16 May 2010 10:23:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208136 - stable/7/bin/sh X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 May 2010 10:23:34 -0000 Author: stefanf Date: Sun May 16 10:23:33 2010 New Revision: 208136 URL: http://svn.freebsd.org/changeset/base/208136 Log: Merge r193169: Fix the eval command in combination with set -e. Modified: stable/7/bin/sh/eval.c stable/7/bin/sh/eval.h stable/7/bin/sh/histedit.c stable/7/bin/sh/main.c stable/7/bin/sh/trap.c Directory Properties: stable/7/bin/sh/ (props changed) Modified: stable/7/bin/sh/eval.c ============================================================================== --- stable/7/bin/sh/eval.c Sun May 16 10:20:54 2010 (r208135) +++ stable/7/bin/sh/eval.c Sun May 16 10:23:33 2010 (r208136) @@ -83,6 +83,7 @@ MKINIT int evalskip; /* set if we are s STATIC int skipcount; /* number of levels to skip */ MKINIT int loopnest; /* current loop nesting level */ int funcnest; /* depth of function calls */ +STATIC int builtin_flags; /* evalcommand flags for builtins */ char *commandname; @@ -147,7 +148,7 @@ evalcmd(int argc, char **argv) STPUTC('\0', concat); p = grabstackstr(concat); } - evalstring(p); + evalstring(p, builtin_flags & EV_TESTED); } return exitstatus; } @@ -158,7 +159,7 @@ evalcmd(int argc, char **argv) */ void -evalstring(char *s) +evalstring(char *s, int flags) { union node *n; struct stackmark smark; @@ -167,7 +168,7 @@ evalstring(char *s) setinputstring(s, 1); while ((n = parsecmd(0)) != NEOF) { if (n != NULL) - evaltree(n, 0); + evaltree(n, flags); popstackmark(&smark); } popfile(); @@ -841,6 +842,7 @@ evalcommand(union node *cmd, int flags, commandname = argv[0]; argptr = argv + 1; optptr = NULL; /* initialize nextopt */ + builtin_flags = flags; exitstatus = (*builtinfunc[cmdentry.u.index])(argc, argv); flushall(); cmddone: Modified: stable/7/bin/sh/eval.h ============================================================================== --- stable/7/bin/sh/eval.h Sun May 16 10:20:54 2010 (r208135) +++ stable/7/bin/sh/eval.h Sun May 16 10:23:33 2010 (r208136) @@ -46,7 +46,7 @@ struct backcmd { /* result of evalbackc }; int evalcmd(int, char **); -void evalstring(char *); +void evalstring(char *, int); union node; /* BLETCH for ansi C */ void evaltree(union node *, int); void evalbackcmd(union node *, struct backcmd *); Modified: stable/7/bin/sh/histedit.c ============================================================================== --- stable/7/bin/sh/histedit.c Sun May 16 10:20:54 2010 (r208135) +++ stable/7/bin/sh/histedit.c Sun May 16 10:23:33 2010 (r208136) @@ -350,7 +350,7 @@ histcmd(int argc, char **argv) if (displayhist) { out2str(s); } - evalstring(s); + evalstring(s, 0); if (displayhist && hist) { /* * XXX what about recursive and @@ -382,7 +382,7 @@ histcmd(int argc, char **argv) fclose(efp); editcmd = stalloc(strlen(editor) + strlen(editfile) + 2); sprintf(editcmd, "%s %s", editor, editfile); - evalstring(editcmd); /* XXX - should use no JC command */ + evalstring(editcmd, 0); /* XXX - should use no JC command */ INTON; readcmdfile(editfile); /* XXX - should read back - quick tst */ unlink(editfile); Modified: stable/7/bin/sh/main.c ============================================================================== --- stable/7/bin/sh/main.c Sun May 16 10:20:54 2010 (r208135) +++ stable/7/bin/sh/main.c Sun May 16 10:23:33 2010 (r208136) @@ -178,7 +178,7 @@ state2: state3: state = 4; if (minusc) { - evalstring(minusc); + evalstring(minusc, 0); } if (sflag || minusc == NULL) { state4: /* XXX ??? - why isn't this before the "if" statement */ Modified: stable/7/bin/sh/trap.c ============================================================================== --- stable/7/bin/sh/trap.c Sun May 16 10:20:54 2010 (r208135) +++ stable/7/bin/sh/trap.c Sun May 16 10:23:33 2010 (r208136) @@ -416,7 +416,7 @@ dotrap(void) if (i == SIGCHLD) ignore_sigchld++; savestatus = exitstatus; - evalstring(trap[i]); + evalstring(trap[i], 0); exitstatus = savestatus; if (i == SIGCHLD) ignore_sigchld--; @@ -471,7 +471,7 @@ exitshell(int status) handler = &loc1; if ((p = trap[0]) != NULL && *p != '\0') { trap[0] = NULL; - evalstring(p); + evalstring(p, 0); } l1: handler = &loc2; /* probably unnecessary */ flushall(); From owner-svn-src-stable-7@FreeBSD.ORG Sun May 16 11:14:12 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 31E7E106567A; Sun, 16 May 2010 11:14:12 +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 1FD458FC1A; Sun, 16 May 2010 11:14: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 o4GBEC1j083757; Sun, 16 May 2010 11:14:12 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4GBEBxl083753; Sun, 16 May 2010 11:14:11 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201005161114.o4GBEBxl083753@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 16 May 2010 11:14:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208140 - stable/7/share/man/man3 X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 May 2010 11:14:12 -0000 Author: jilles Date: Sun May 16 11:14:11 2010 New Revision: 208140 URL: http://svn.freebsd.org/changeset/base/208140 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/7/share/man/man3/Makefile stable/7/share/man/man3/pthread_cond_timedwait.3 stable/7/share/man/man3/pthread_condattr.3 Directory Properties: stable/7/share/man/man3/ (props changed) Modified: stable/7/share/man/man3/Makefile ============================================================================== --- stable/7/share/man/man3/Makefile Sun May 16 11:06:32 2010 (r208139) +++ stable/7/share/man/man3/Makefile Sun May 16 11:14:11 2010 (r208140) @@ -248,7 +248,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/7/share/man/man3/pthread_cond_timedwait.3 ============================================================================== --- stable/7/share/man/man3/pthread_cond_timedwait.3 Sun May 16 11:06:32 2010 (r208139) +++ stable/7/share/man/man3/pthread_cond_timedwait.3 Sun May 16 11:14:11 2010 (r208140) @@ -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/7/share/man/man3/pthread_condattr.3 ============================================================================== --- stable/7/share/man/man3/pthread_condattr.3 Sun May 16 11:06:32 2010 (r208139) +++ stable/7/share/man/man3/pthread_condattr.3 Sun May 16 11:14:11 2010 (r208140) @@ -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-7@FreeBSD.ORG Sun May 16 11:17:22 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 01AA91065676; Sun, 16 May 2010 11:17:22 +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 E46198FC15; Sun, 16 May 2010 11:17: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 o4GBHL36084498; Sun, 16 May 2010 11:17:21 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4GBHLu6084496; Sun, 16 May 2010 11:17:21 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201005161117.o4GBHLu6084496@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 16 May 2010 11:17:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208141 - stable/7/share/man/man1 X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 May 2010 11:17:22 -0000 Author: jilles Date: Sun May 16 11:17:21 2010 New Revision: 208141 URL: http://svn.freebsd.org/changeset/base/208141 Log: MFC r207817: builtin(1): sh has no @ builtin command. Modified: stable/7/share/man/man1/builtin.1 Directory Properties: stable/7/share/man/man1/ (props changed) Modified: stable/7/share/man/man1/builtin.1 ============================================================================== --- stable/7/share/man/man1/builtin.1 Sun May 16 11:14:11 2010 (r208140) +++ stable/7/share/man/man1/builtin.1 Sun May 16 11:17:21 2010 (r208141) @@ -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-7@FreeBSD.ORG Sun May 16 16:33:38 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7D6E8106564A; Sun, 16 May 2010 16:33:38 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 69D838FC14; Sun, 16 May 2010 16:33:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4GGXcY8054664; Sun, 16 May 2010 16:33:38 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4GGXcNE054662; Sun, 16 May 2010 16:33:38 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201005161633.o4GGXcNE054662@svn.freebsd.org> From: Jaakko Heinonen Date: Sun, 16 May 2010 16:33:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208153 - stable/7/sbin/restore X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 May 2010 16:33:38 -0000 Author: jh Date: Sun May 16 16:33:38 2010 New Revision: 208153 URL: http://svn.freebsd.org/changeset/base/208153 Log: MFC r203157, r203816: Handle short reads when the -P option is used and remove some dead code. PR: bin/121502 Modified: stable/7/sbin/restore/tape.c Directory Properties: stable/7/sbin/restore/ (props changed) Modified: stable/7/sbin/restore/tape.c ============================================================================== --- stable/7/sbin/restore/tape.c Sun May 16 15:56:59 2010 (r208152) +++ stable/7/sbin/restore/tape.c Sun May 16 16:33:38 2010 (r208153) @@ -227,7 +227,7 @@ setup(void) volno = 1; setdumpnum(); FLUSHTAPEBUF(); - if (!pipein && !bflag) + if (!pipein && !pipecmdin && !bflag) findtapeblksize(); if (gethead(&spcl) == FAIL) { fprintf(stderr, "Tape is not a dump tape\n"); @@ -333,10 +333,6 @@ getvol(long nextvol) } if (volno == 1) return; - if (pipecmdin) { - closemt(); - goto getpipecmdhdr; - } goto gethdr; } again: @@ -400,7 +396,6 @@ again: if (pipecmdin) { char volno[sizeof("2147483647")]; -getpipecmdhdr: (void)sprintf(volno, "%d", newvol); if (setenv("RESTORE_VOLUME", volno, 1) == -1) { fprintf(stderr, "Cannot set $RESTORE_VOLUME: %s\n", @@ -1204,17 +1199,17 @@ getmore: * Check for mid-tape short read error. * If found, skip rest of buffer and start with the next. */ - if (!pipein && numtrec < ntrec && i > 0) { + if (!pipein && !pipecmdin && numtrec < ntrec && i > 0) { dprintf(stdout, "mid-media short read error.\n"); numtrec = ntrec; } /* * Handle partial block read. */ - if (pipein && i == 0 && rd > 0) + if ((pipein || pipecmdin) && i == 0 && rd > 0) i = rd; else if (i > 0 && i != ntrec * TP_BSIZE) { - if (pipein) { + if (pipein || pipecmdin) { rd += i; cnt -= i; if (cnt > 0) From owner-svn-src-stable-7@FreeBSD.ORG Mon May 17 02:20:24 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EF0271065670; Mon, 17 May 2010 02:20:24 +0000 (UTC) (envelope-from jfv@FreeBSD.org) Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DD8F48FC13; Mon, 17 May 2010 02:20: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 o4H2KOd2085956; Mon, 17 May 2010 02:20:24 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4H2KO3r085954; Mon, 17 May 2010 02:20:24 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <201005170220.o4H2KO3r085954@svn.freebsd.org> From: Jack F Vogel Date: Mon, 17 May 2010 02:20:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208181 - stable/7/sys/dev/e1000 X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2010 02:20:25 -0000 Author: jfv Date: Mon May 17 02:20:24 2010 New Revision: 208181 URL: http://svn.freebsd.org/changeset/base/208181 Log: Change lem_poll to match em Modified: stable/7/sys/dev/e1000/if_lem.c Modified: stable/7/sys/dev/e1000/if_lem.c ============================================================================== --- stable/7/sys/dev/e1000/if_lem.c Mon May 17 02:11:03 2010 (r208180) +++ stable/7/sys/dev/e1000/if_lem.c Mon May 17 02:20:24 2010 (r208181) @@ -1231,7 +1231,7 @@ lem_init(void *arg) * Legacy polling routine * *********************************************************************/ -static int +static void lem_poll(struct ifnet *ifp, enum poll_cmd cmd, int count) { struct adapter *adapter = ifp->if_softc; @@ -1240,7 +1240,7 @@ lem_poll(struct ifnet *ifp, enum poll_cm EM_CORE_LOCK(adapter); if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) { EM_CORE_UNLOCK(adapter); - return (rx_done); + return; } if (cmd == POLL_AND_CHECK_STATUS) { @@ -1262,7 +1262,7 @@ lem_poll(struct ifnet *ifp, enum poll_cm if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) lem_start_locked(ifp); EM_TX_UNLOCK(adapter); - return (rx_done); + return; } #endif /* DEVICE_POLLING */ From owner-svn-src-stable-7@FreeBSD.ORG Mon May 17 08:35:14 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 68F1A106567B; Mon, 17 May 2010 08:35:14 +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 577B28FC1D; Mon, 17 May 2010 08: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 o4H8ZEoK068772; Mon, 17 May 2010 08:35:14 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4H8ZElI068770; Mon, 17 May 2010 08:35:14 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201005170835.o4H8ZElI068770@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 17 May 2010 08:35:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208187 - stable/7/sys/fs/procfs X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2010 08:35:14 -0000 Author: kib Date: Mon May 17 08:35:14 2010 New Revision: 208187 URL: http://svn.freebsd.org/changeset/base/208187 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/7/sys/fs/procfs/procfs_ctl.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/fs/procfs/procfs_ctl.c ============================================================================== --- stable/7/sys/fs/procfs/procfs_ctl.c Mon May 17 08:15:04 2010 (r208186) +++ stable/7/sys/fs/procfs/procfs_ctl.c Mon May 17 08:35:14 2010 (r208187) @@ -233,7 +233,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 ? */ @@ -246,9 +245,10 @@ out: */ case PROCFS_CTL_STEP: error = proc_sstep(FIRST_THREAD_IN_PROC(p)); /* XXXKSE */ - PROC_UNLOCK(p); - if (error) + if (error) { + PROC_UNLOCK(p); return (error); + } break; /* @@ -257,7 +257,6 @@ out: */ case PROCFS_CTL_RUN: p->p_flag &= ~P_STOPPED_SIG; /* this uses SIGSTOP */ - PROC_UNLOCK(p); break; /* @@ -289,6 +288,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-7@FreeBSD.ORG Mon May 17 08:46:28 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 51D711065677; Mon, 17 May 2010 08:46:28 +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 407278FC0A; Mon, 17 May 2010 08:46: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 o4H8kSE8071277; Mon, 17 May 2010 08:46:28 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4H8kSpJ071275; Mon, 17 May 2010 08:46:28 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201005170846.o4H8kSpJ071275@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 17 May 2010 08:46:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208188 - stable/7/sys/fs/procfs X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2010 08:46:28 -0000 Author: kib Date: Mon May 17 08:46:27 2010 New Revision: 208188 URL: http://svn.freebsd.org/changeset/base/208188 Log: Partial MFC r207847: For detach procfs ctl command, clear P_STOPPED_TRACE process stop flag. Modified: stable/7/sys/fs/procfs/procfs_ctl.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/fs/procfs/procfs_ctl.c ============================================================================== --- stable/7/sys/fs/procfs/procfs_ctl.c Mon May 17 08:35:14 2010 (r208187) +++ stable/7/sys/fs/procfs/procfs_ctl.c Mon May 17 08:46:27 2010 (r208188) @@ -212,7 +212,7 @@ 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); From owner-svn-src-stable-7@FreeBSD.ORG Mon May 17 16:54:31 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B8C731065672; Mon, 17 May 2010 16:54:31 +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 8DC578FC14; Mon, 17 May 2010 16:54: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 o4HGsVs2081653; Mon, 17 May 2010 16:54:31 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4HGsVA3081651; Mon, 17 May 2010 16:54:31 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201005171654.o4HGsVA3081651@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 17 May 2010 16:54:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208197 - stable/7/sys/dev/fxp X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2010 16:54:31 -0000 Author: yongari Date: Mon May 17 16:54:31 2010 New Revision: 208197 URL: http://svn.freebsd.org/changeset/base/208197 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/7/sys/dev/fxp/if_fxp.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/fxp/if_fxp.c ============================================================================== --- stable/7/sys/dev/fxp/if_fxp.c Mon May 17 16:47:25 2010 (r208196) +++ stable/7/sys/dev/fxp/if_fxp.c Mon May 17 16:54:31 2010 (r208197) @@ -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-7@FreeBSD.ORG Mon May 17 16:59:36 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 631851065672; Mon, 17 May 2010 16:59:36 +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 50B9F8FC16; Mon, 17 May 2010 16:59: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 o4HGxaYl083333; Mon, 17 May 2010 16:59:36 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4HGxaYr083329; Mon, 17 May 2010 16:59:36 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201005171659.o4HGxaYr083329@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 17 May 2010 16:59:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208200 - stable/7/sys/dev/fxp X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2010 16:59:36 -0000 Author: yongari Date: Mon May 17 16:59:36 2010 New Revision: 208200 URL: http://svn.freebsd.org/changeset/base/208200 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/7/sys/dev/fxp/if_fxp.c stable/7/sys/dev/fxp/if_fxpreg.h stable/7/sys/dev/fxp/if_fxpvar.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/fxp/if_fxp.c ============================================================================== --- stable/7/sys/dev/fxp/if_fxp.c Mon May 17 16:57:55 2010 (r208199) +++ stable/7/sys/dev/fxp/if_fxp.c Mon May 17 16:59:36 2010 (r208200) @@ -262,6 +262,8 @@ static int fxp_miibus_readreg(device_t static void 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); @@ -538,39 +540,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. * @@ -2014,6 +1984,81 @@ fxp_intr_body(struct fxp_softc *sc, stru } } +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 @@ -2030,35 +2075,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 @@ -2093,24 +2114,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)); @@ -2154,6 +2158,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. */ @@ -2256,7 +2262,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); @@ -2377,6 +2385,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. */ @@ -2997,6 +3021,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/7/sys/dev/fxp/if_fxpreg.h ============================================================================== --- stable/7/sys/dev/fxp/if_fxpreg.h Mon May 17 16:57:55 2010 (r208199) +++ stable/7/sys/dev/fxp/if_fxpreg.h Mon May 17 16:59:36 2010 (r208200) @@ -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/7/sys/dev/fxp/if_fxpvar.h ============================================================================== --- stable/7/sys/dev/fxp/if_fxpvar.h Mon May 17 16:57:55 2010 (r208199) +++ stable/7/sys/dev/fxp/if_fxpvar.h Mon May 17 16:59:36 2010 (r208200) @@ -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-7@FreeBSD.ORG Mon May 17 17:04:09 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D8E801065673; Mon, 17 May 2010 17:04:09 +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 C693E8FC1B; Mon, 17 May 2010 17:04: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 o4HH49ui084464; Mon, 17 May 2010 17:04:09 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4HH49SZ084461; Mon, 17 May 2010 17:04:09 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201005171704.o4HH49SZ084461@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 17 May 2010 17:04:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208202 - stable/7/sys/dev/sge X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2010 17:04:10 -0000 Author: yongari Date: Mon May 17 17:04:09 2010 New Revision: 208202 URL: http://svn.freebsd.org/changeset/base/208202 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/7/sys/dev/sge/if_sge.c stable/7/sys/dev/sge/if_sgereg.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/sge/if_sge.c ============================================================================== --- stable/7/sys/dev/sge/if_sge.c Mon May 17 17:02:42 2010 (r208201) +++ stable/7/sys/dev/sge/if_sge.c Mon May 17 17:04:09 2010 (r208202) @@ -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/7/sys/dev/sge/if_sgereg.h ============================================================================== --- stable/7/sys/dev/sge/if_sgereg.h Mon May 17 17:02:42 2010 (r208201) +++ stable/7/sys/dev/sge/if_sgereg.h Mon May 17 17:04:09 2010 (r208202) @@ -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-7@FreeBSD.ORG Mon May 17 17:14:25 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B5EC9106566B; Mon, 17 May 2010 17:14: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 A43EF8FC25; Mon, 17 May 2010 17:14: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 o4HHEPcD086784; Mon, 17 May 2010 17:14:25 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4HHEPd2086782; Mon, 17 May 2010 17:14:25 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201005171714.o4HHEPd2086782@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 17 May 2010 17:14:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208204 - stable/7/sys/dev/sge X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2010 17:14:25 -0000 Author: yongari Date: Mon May 17 17:14:25 2010 New Revision: 208204 URL: http://svn.freebsd.org/changeset/base/208204 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/7/sys/dev/sge/if_sge.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/sge/if_sge.c ============================================================================== --- stable/7/sys/dev/sge/if_sge.c Mon May 17 17:12:35 2010 (r208203) +++ stable/7/sys/dev/sge/if_sge.c Mon May 17 17:14:25 2010 (r208204) @@ -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-7@FreeBSD.ORG Mon May 17 17:16:49 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DF485106567E; Mon, 17 May 2010 17:16:49 +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 9FF3C8FC22; Mon, 17 May 2010 17:16:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4HHGnfF087419; Mon, 17 May 2010 17:16:49 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4HHGn7j087417; Mon, 17 May 2010 17:16:49 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201005171716.o4HHGn7j087417@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 17 May 2010 17:16:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208206 - stable/7/share/man/man4 X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2010 17:16:50 -0000 Author: yongari Date: Mon May 17 17:16:49 2010 New Revision: 208206 URL: http://svn.freebsd.org/changeset/base/208206 Log: MFC r207853: Now sge(4) supports TCP segmentation offload (TSO). Modified: stable/7/share/man/man4/sge.4 Directory Properties: stable/7/share/man/man4/ (props changed) Modified: stable/7/share/man/man4/sge.4 ============================================================================== --- stable/7/share/man/man4/sge.4 Mon May 17 17:16:12 2010 (r208205) +++ stable/7/share/man/man4/sge.4 Mon May 17 17:16:49 2010 (r208206) @@ -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-7@FreeBSD.ORG Mon May 17 17:18:58 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 89741106564A; Mon, 17 May 2010 17:18: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 6DF108FC08; Mon, 17 May 2010 17:18: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 o4HHIwPa088011; Mon, 17 May 2010 17:18:58 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4HHIwLq088009; Mon, 17 May 2010 17:18:58 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201005171718.o4HHIwLq088009@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 17 May 2010 17:18:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208208 - stable/7/share/man/man4 X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2010 17:18:58 -0000 Author: yongari Date: Mon May 17 17:18:58 2010 New Revision: 208208 URL: http://svn.freebsd.org/changeset/base/208208 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/7/share/man/man4/fxp.4 Directory Properties: stable/7/share/man/man4/ (props changed) Modified: stable/7/share/man/man4/fxp.4 ============================================================================== --- stable/7/share/man/man4/fxp.4 Mon May 17 17:17:57 2010 (r208207) +++ stable/7/share/man/man4/fxp.4 Mon May 17 17:18:58 2010 (r208208) @@ -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-7@FreeBSD.ORG Tue May 18 02:18:28 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0EF4010656E0; Tue, 18 May 2010 02:18:28 +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 F14148FC1F; Tue, 18 May 2010 02:18: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 o4I2IR9H009621; Tue, 18 May 2010 02:18:27 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4I2IRlE009604; Tue, 18 May 2010 02:18:27 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201005180218.o4I2IRlE009604@svn.freebsd.org> From: Doug Barton Date: Tue, 18 May 2010 02:18:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208243 - stable/7/usr.sbin/mergemaster X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 May 2010 02:18:28 -0000 Author: dougb Date: Tue May 18 02:18:27 2010 New Revision: 208243 URL: http://svn.freebsd.org/changeset/base/208243 Log: MFC r208088: Hide the creation and population of the temproot Modified: stable/7/usr.sbin/mergemaster/mergemaster.sh Directory Properties: stable/7/usr.sbin/mergemaster/ (props changed) Modified: stable/7/usr.sbin/mergemaster/mergemaster.sh ============================================================================== --- stable/7/usr.sbin/mergemaster/mergemaster.sh Tue May 18 02:17:40 2010 (r208242) +++ stable/7/usr.sbin/mergemaster/mergemaster.sh Tue May 18 02:18:27 2010 (r208243) @@ -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-7@FreeBSD.ORG Tue May 18 02:23:04 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 84A431065670; Tue, 18 May 2010 02:23:04 +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 727E08FC0A; Tue, 18 May 2010 02:23: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 o4I2N4NI010804; Tue, 18 May 2010 02:23:04 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4I2N4MK010802; Tue, 18 May 2010 02:23:04 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201005180223.o4I2N4MK010802@svn.freebsd.org> From: Doug Barton Date: Tue, 18 May 2010 02:23:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208245 - stable/7/usr.bin/calendar/calendars X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 May 2010 02:23:04 -0000 Author: dougb Date: Tue May 18 02:23:04 2010 New Revision: 208245 URL: http://svn.freebsd.org/changeset/base/208245 Log: MFC r208089: Remove duplicate Modified: stable/7/usr.bin/calendar/calendars/calendar.history Directory Properties: stable/7/usr.bin/calendar/ (props changed) Modified: stable/7/usr.bin/calendar/calendars/calendar.history ============================================================================== --- stable/7/usr.bin/calendar/calendars/calendar.history Tue May 18 02:22:08 2010 (r208244) +++ stable/7/usr.bin/calendar/calendars/calendar.history Tue May 18 02:23:04 2010 (r208245) @@ -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-7@FreeBSD.ORG Tue May 18 17:02:36 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F2213106564A; Tue, 18 May 2010 17:02:35 +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 DFADF8FC14; Tue, 18 May 2010 17:02: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 o4IH2ZAn011839; Tue, 18 May 2010 17:02:35 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4IH2ZY4011835; Tue, 18 May 2010 17:02:35 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201005181702.o4IH2ZY4011835@svn.freebsd.org> From: Marius Strobl Date: Tue, 18 May 2010 17:02:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208267 - stable/7/sys/sparc64/pci X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 May 2010 17:02:36 -0000 Author: marius Date: Tue May 18 17:02:35 2010 New Revision: 208267 URL: http://svn.freebsd.org/changeset/base/208267 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/7/sys/sparc64/pci/schizo.c stable/7/sys/sparc64/pci/schizoreg.h stable/7/sys/sparc64/pci/schizovar.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/sparc64/pci/schizo.c ============================================================================== --- stable/7/sys/sparc64/pci/schizo.c Tue May 18 17:02:24 2010 (r208266) +++ stable/7/sys/sparc64/pci/schizo.c Tue May 18 17:02:35 2010 (r208267) @@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -386,6 +387,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). */ @@ -403,9 +419,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; @@ -685,6 +714,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)); } @@ -781,6 +822,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); @@ -788,39 +834,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); } @@ -831,13 +889,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); @@ -852,17 +908,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/7/sys/sparc64/pci/schizoreg.h ============================================================================== --- stable/7/sys/sparc64/pci/schizoreg.h Tue May 18 17:02:24 2010 (r208266) +++ stable/7/sys/sparc64/pci/schizoreg.h Tue May 18 17:02:35 2010 (r208267) @@ -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/7/sys/sparc64/pci/schizovar.h ============================================================================== --- stable/7/sys/sparc64/pci/schizovar.h Tue May 18 17:02:24 2010 (r208266) +++ stable/7/sys/sparc64/pci/schizovar.h Tue May 18 17:02:35 2010 (r208267) @@ -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-7@FreeBSD.ORG Tue May 18 17:09:22 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9F2871065676; Tue, 18 May 2010 17:09:22 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8DD478FC21; Tue, 18 May 2010 17:09: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 o4IH9Mwx013429; Tue, 18 May 2010 17:09:22 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4IH9MOk013427; Tue, 18 May 2010 17:09:22 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201005181709.o4IH9MOk013427@svn.freebsd.org> From: Marius Strobl Date: Tue, 18 May 2010 17:09:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208269 - stable/7/sys/dev/e1000 X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 May 2010 17:09:22 -0000 Author: marius Date: Tue May 18 17:09:22 2010 New Revision: 208269 URL: http://svn.freebsd.org/changeset/base/208269 Log: MFC: r208117 Fix a mismerge in r206001 (MFC'ed to stable/7 in r208105). PR: 146614 Approved by: jfv (implicit) Modified: stable/7/sys/dev/e1000/if_em.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/e1000/if_em.c ============================================================================== --- stable/7/sys/dev/e1000/if_em.c Tue May 18 17:09:20 2010 (r208268) +++ stable/7/sys/dev/e1000/if_em.c Tue May 18 17:09:22 2010 (r208269) @@ -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-7@FreeBSD.ORG Tue May 18 17:15:42 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2EC341065670; Tue, 18 May 2010 17:15: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 13BC38FC0C; Tue, 18 May 2010 17:15: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 o4IHFfUe015017; Tue, 18 May 2010 17:15:41 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4IHFfM4015014; Tue, 18 May 2010 17:15:41 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201005181715.o4IHFfM4015014@svn.freebsd.org> From: Marius Strobl Date: Tue, 18 May 2010 17:15:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208271 - stable/7/share/man/man4 X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 May 2010 17:15:42 -0000 Author: marius Date: Tue May 18 17:15:41 2010 New Revision: 208271 URL: http://svn.freebsd.org/changeset/base/208271 Log: MFC: r208098 Document the led(4) interface to the identification LEDs. Modified: stable/7/share/man/man4/em.4 stable/7/share/man/man4/igb.4 Directory Properties: stable/7/share/man/man4/ (props changed) Modified: stable/7/share/man/man4/em.4 ============================================================================== --- stable/7/share/man/man4/em.4 Tue May 18 17:15:40 2010 (r208270) +++ stable/7/share/man/man4/em.4 Tue May 18 17:15:41 2010 (r208271) @@ -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,9 +246,24 @@ 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 led 4 , .Xr netintro 4 , .Xr ng_ether 4 , .Xr polling 4 , Modified: stable/7/share/man/man4/igb.4 ============================================================================== --- stable/7/share/man/man4/igb.4 Tue May 18 17:15:40 2010 (r208270) +++ stable/7/share/man/man4/igb.4 Tue May 18 17:15:41 2010 (r208271) @@ -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-7@FreeBSD.ORG Wed May 19 10:29:37 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BB4501065670; Wed, 19 May 2010 10:29: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 AA2478FC27; Wed, 19 May 2010 10:29: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 o4JATb84046556; Wed, 19 May 2010 10:29:37 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4JATbqO046554; Wed, 19 May 2010 10:29:37 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201005191029.o4JATbqO046554@svn.freebsd.org> From: Andriy Gapon Date: Wed, 19 May 2010 10:29:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208296 - stable/7/sys/kern X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2010 10:29:37 -0000 Author: avg Date: Wed May 19 10:29:37 2010 New Revision: 208296 URL: http://svn.freebsd.org/changeset/base/208296 Log: MFC r207359,207362: kern_ntptime: abstract time error check into a function Modified: stable/7/sys/kern/kern_ntptime.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/kern/kern_ntptime.c ============================================================================== --- stable/7/sys/kern/kern_ntptime.c Wed May 19 10:15:37 2010 (r208295) +++ stable/7/sys/kern/kern_ntptime.c Wed May 19 10:29:37 2010 (r208296) @@ -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-7@FreeBSD.ORG Wed May 19 10:35:55 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 986F6106564A; Wed, 19 May 2010 10:35:55 +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 6E06B8FC08; Wed, 19 May 2010 10:35: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 o4JAZt8U048111; Wed, 19 May 2010 10:35:55 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4JAZtoO048109; Wed, 19 May 2010 10:35:55 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201005191035.o4JAZtoO048109@svn.freebsd.org> From: Andriy Gapon Date: Wed, 19 May 2010 10:35:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208298 - stable/7/sys/kern X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2010 10:35:55 -0000 Author: avg Date: Wed May 19 10:35:53 2010 New Revision: 208298 URL: http://svn.freebsd.org/changeset/base/208298 Log: MFC r207360: periodically save system time to hardware time-of-day clock Modified: stable/7/sys/kern/kern_ntptime.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/kern/kern_ntptime.c ============================================================================== --- stable/7/sys/kern/kern_ntptime.c Wed May 19 10:34:15 2010 (r208297) +++ stable/7/sys/kern/kern_ntptime.c Wed May 19 10:35:53 2010 (r208298) @@ -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-7@FreeBSD.ORG Wed May 19 15:50:17 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9FF751065676; Wed, 19 May 2010 15:50: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 8E3E08FC21; Wed, 19 May 2010 15:50: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 o4JFoH8d017494; Wed, 19 May 2010 15:50:17 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4JFoHU4017492; Wed, 19 May 2010 15:50:17 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201005191550.o4JFoHU4017492@svn.freebsd.org> From: Andriy Gapon Date: Wed, 19 May 2010 15:50:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208301 - stable/7/sys/kern X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2010 15:50:17 -0000 Author: avg Date: Wed May 19 15:50:17 2010 New Revision: 208301 URL: http://svn.freebsd.org/changeset/base/208301 Log: kern_ntptime: fix two problems with r208298 (MFC of r207360) This is a direct commit to fix previous improperly done MFC. - sys/clock.h include is needed for resettodr() - there is no callout_schedule in 7, so callout_reset has to be used Modified: stable/7/sys/kern/kern_ntptime.c Modified: stable/7/sys/kern/kern_ntptime.c ============================================================================== --- stable/7/sys/kern/kern_ntptime.c Wed May 19 15:06:09 2010 (r208300) +++ stable/7/sys/kern/kern_ntptime.c Wed May 19 15:50:17 2010 (r208301) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -986,7 +987,8 @@ periodic_resettodr(void *arg __unused) mtx_unlock(&Giant); } if (resettodr_period > 0) - callout_schedule(&resettodr_callout, resettodr_period * hz); + callout_reset(&resettodr_callout, resettodr_period * hz, + periodic_resettodr, NULL); } static void From owner-svn-src-stable-7@FreeBSD.ORG Wed May 19 19:45:17 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9B10C1065670; Wed, 19 May 2010 19:45:17 +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 8B5CA8FC0A; Wed, 19 May 2010 19:45: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 o4JJjHet070018; Wed, 19 May 2010 19:45:17 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4JJjH8L070016; Wed, 19 May 2010 19:45:17 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201005191945.o4JJjH8L070016@svn.freebsd.org> From: John Baldwin Date: Wed, 19 May 2010 19:45:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208310 - stable/7/sys/dev/ciss X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2010 19:45:17 -0000 Author: jhb Date: Wed May 19 19:45:17 2010 New Revision: 208310 URL: http://svn.freebsd.org/changeset/base/208310 Log: MFC 200637,207335: - Don't panic due to unlocking an unowned mutex if we fail during attach. - 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/7/sys/dev/ciss/ciss.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/ciss/ciss.c ============================================================================== --- stable/7/sys/dev/ciss/ciss.c Wed May 19 19:44:00 2010 (r208309) +++ stable/7/sys/dev/ciss/ciss.c Wed May 19 19:45:17 2010 (r208310) @@ -394,6 +394,8 @@ 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); /* * Work out adapter type. @@ -428,8 +430,6 @@ ciss_attach(device_t dev) ciss_initq_busy(sc); ciss_initq_complete(sc); ciss_initq_notify(sc); - mtx_init(&sc->ciss_mtx, "cissmtx", NULL, MTX_DEF); - callout_init_mtx(&sc->ciss_periodic, &sc->ciss_mtx, 0); /* * Initalize device sysctls. @@ -494,8 +494,11 @@ ciss_attach(device_t dev) error = 0; out: - if (error != 0) + if (error != 0) { + /* ciss_free() expects the mutex to be held */ + mtx_lock(&sc->ciss_mtx); ciss_free(sc); + } return(error); } From owner-svn-src-stable-7@FreeBSD.ORG Wed May 19 21:02:02 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5EBC21065674; Wed, 19 May 2010 21:02:02 +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 4F17C8FC1E; Wed, 19 May 2010 21:02: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 o4JL22oA087285; Wed, 19 May 2010 21:02:02 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4JL22RL087283; Wed, 19 May 2010 21:02:02 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201005192102.o4JL22RL087283@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 19 May 2010 21:02:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208315 - stable/7/sys/dev/fxp X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2010 21:02:02 -0000 Author: yongari Date: Wed May 19 21:02:02 2010 New Revision: 208315 URL: http://svn.freebsd.org/changeset/base/208315 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/7/sys/dev/fxp/if_fxp.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/fxp/if_fxp.c ============================================================================== --- stable/7/sys/dev/fxp/if_fxp.c Wed May 19 20:56:18 2010 (r208314) +++ stable/7/sys/dev/fxp/if_fxp.c Wed May 19 21:02:02 2010 (r208315) @@ -1895,7 +1895,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) { @@ -2617,7 +2617,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); @@ -2653,7 +2653,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-7@FreeBSD.ORG Wed May 19 21:12:11 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 617281065670; Wed, 19 May 2010 21:12:11 +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 386A08FC0C; Wed, 19 May 2010 21:12: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 o4JLCB7h089602; Wed, 19 May 2010 21:12:11 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4JLCBeI089600; Wed, 19 May 2010 21:12:11 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201005192112.o4JLCBeI089600@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 19 May 2010 21:12:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208317 - stable/7/sys/dev/fxp X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2010 21:12:11 -0000 Author: yongari Date: Wed May 19 21:12:10 2010 New Revision: 208317 URL: http://svn.freebsd.org/changeset/base/208317 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/7/sys/dev/fxp/if_fxp.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/fxp/if_fxp.c ============================================================================== --- stable/7/sys/dev/fxp/if_fxp.c Wed May 19 21:08:38 2010 (r208316) +++ stable/7/sys/dev/fxp/if_fxp.c Wed May 19 21:12:10 2010 (r208317) @@ -1912,6 +1912,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. */ @@ -1938,9 +1940,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-7@FreeBSD.ORG Thu May 20 00:31:51 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EF5C01065677; Thu, 20 May 2010 00:31:51 +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 DE0218FC21; Thu, 20 May 2010 00:31: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 o4K0VpZL034487; Thu, 20 May 2010 00:31:51 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4K0Vprx034485; Thu, 20 May 2010 00:31:51 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201005200031.o4K0Vprx034485@svn.freebsd.org> From: Xin LI Date: Thu, 20 May 2010 00:31:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208326 - stable/7/usr.bin/rpcgen X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 May 2010 00:31:52 -0000 Author: delphij Date: Thu May 20 00:31:51 2010 New Revision: 208326 URL: http://svn.freebsd.org/changeset/base/208326 Log: MFC r207733: Plug memory leak. Modified: stable/7/usr.bin/rpcgen/rpc_cout.c Directory Properties: stable/7/usr.bin/rpcgen/ (props changed) Modified: stable/7/usr.bin/rpcgen/rpc_cout.c ============================================================================== --- stable/7/usr.bin/rpcgen/rpc_cout.c Thu May 20 00:31:09 2010 (r208325) +++ stable/7/usr.bin/rpcgen/rpc_cout.c Thu May 20 00:31:51 2010 (r208326) @@ -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-7@FreeBSD.ORG Thu May 20 08:43:31 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8CC8E1065674; Thu, 20 May 2010 08:43:31 +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 7C5108FC0C; Thu, 20 May 2010 08:43: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 o4K8hVPs043051; Thu, 20 May 2010 08:43:31 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4K8hV42043049; Thu, 20 May 2010 08:43:31 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201005200843.o4K8hV42043049@svn.freebsd.org> From: Marius Strobl Date: Thu, 20 May 2010 08:43:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208339 - stable/7/sys/modules/cas X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 May 2010 08:43:31 -0000 Author: marius Date: Thu May 20 08:43:31 2010 New Revision: 208339 URL: http://svn.freebsd.org/changeset/base/208339 Log: MFC: r208143 Add the ofw_bus_if.h dependency introduced with r207585 (MFC'ed to stable/7 in r208087). Modified: stable/7/sys/modules/cas/Makefile Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/modules/cas/Makefile ============================================================================== --- stable/7/sys/modules/cas/Makefile Thu May 20 08:43:29 2010 (r208338) +++ stable/7/sys/modules/cas/Makefile Thu May 20 08:43:31 2010 (r208339) @@ -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-7@FreeBSD.ORG Thu May 20 19:45:11 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9835C1065673; Thu, 20 May 2010 19:45:11 +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 839D38FC1B; Thu, 20 May 2010 19:45: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 o4KJjBaj091470; Thu, 20 May 2010 19:45:11 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4KJjBNm091467; Thu, 20 May 2010 19:45:11 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201005201945.o4KJjBNm091467@svn.freebsd.org> From: Xin LI Date: Thu, 20 May 2010 19:45:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208361 - in stable/7: contrib/cpio contrib/cpio/doc contrib/cpio/lib contrib/cpio/src gnu/usr.bin/cpio X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 May 2010 19:45:11 -0000 Author: delphij Date: Thu May 20 19:45:11 2010 New Revision: 208361 URL: http://svn.freebsd.org/changeset/base/208361 Log: MFC r180407 (peter): Merge gnu cpio 2.6 -> 2.8 changes. Added: stable/7/contrib/cpio/doc/version.texi - copied unchanged from r180407, head/contrib/cpio/doc/version.texi stable/7/contrib/cpio/lib/argp-pin.c - copied unchanged from r180407, head/contrib/cpio/lib/argp-pin.c stable/7/contrib/cpio/lib/fatal.c - copied unchanged from r180407, head/contrib/cpio/lib/fatal.c stable/7/contrib/cpio/lib/hash.c - copied unchanged from r180407, head/contrib/cpio/lib/hash.c stable/7/contrib/cpio/lib/hash.h - copied unchanged from r180407, head/contrib/cpio/lib/hash.h stable/7/contrib/cpio/lib/intprops.h - copied unchanged from r180407, head/contrib/cpio/lib/intprops.h stable/7/contrib/cpio/lib/inttostr.c - copied unchanged from r180407, head/contrib/cpio/lib/inttostr.c stable/7/contrib/cpio/lib/inttostr.h - copied unchanged from r180407, head/contrib/cpio/lib/inttostr.h stable/7/contrib/cpio/lib/paxerror.c - copied unchanged from r180407, head/contrib/cpio/lib/paxerror.c stable/7/contrib/cpio/lib/paxexit.c - copied unchanged from r180407, head/contrib/cpio/lib/paxexit.c stable/7/contrib/cpio/lib/paxlib.h - copied unchanged from r180407, head/contrib/cpio/lib/paxlib.h stable/7/contrib/cpio/lib/paxnames.c - copied unchanged from r180407, head/contrib/cpio/lib/paxnames.c stable/7/contrib/cpio/lib/quote.c - copied unchanged from r180407, head/contrib/cpio/lib/quote.c stable/7/contrib/cpio/lib/quote.h - copied unchanged from r180407, head/contrib/cpio/lib/quote.h stable/7/contrib/cpio/lib/quotearg.c - copied unchanged from r180407, head/contrib/cpio/lib/quotearg.c stable/7/contrib/cpio/lib/quotearg.h - copied unchanged from r180407, head/contrib/cpio/lib/quotearg.h stable/7/contrib/cpio/lib/rmt-command.h - copied unchanged from r180407, head/contrib/cpio/lib/rmt-command.h stable/7/contrib/cpio/lib/system-ioctl.h - copied unchanged from r180407, head/contrib/cpio/lib/system-ioctl.h stable/7/contrib/cpio/lib/umaxtostr.c - copied unchanged from r180407, head/contrib/cpio/lib/umaxtostr.c stable/7/contrib/cpio/lib/utimens.c - copied unchanged from r180407, head/contrib/cpio/lib/utimens.c stable/7/contrib/cpio/lib/utimens.h - copied unchanged from r180407, head/contrib/cpio/lib/utimens.h stable/7/contrib/cpio/lib/xstrndup.c - copied unchanged from r180407, head/contrib/cpio/lib/xstrndup.c stable/7/contrib/cpio/lib/xstrndup.h - copied unchanged from r180407, head/contrib/cpio/lib/xstrndup.h Deleted: stable/7/contrib/cpio/lib/exit.h stable/7/contrib/cpio/lib/localedir.h stable/7/contrib/cpio/lib/mempcpy.h stable/7/contrib/cpio/lib/strcase.h stable/7/contrib/cpio/lib/strchrnul.h stable/7/contrib/cpio/lib/strndup.h Modified: stable/7/contrib/cpio/ABOUT-NLS stable/7/contrib/cpio/COPYING stable/7/contrib/cpio/ChangeLog stable/7/contrib/cpio/INSTALL stable/7/contrib/cpio/NEWS stable/7/contrib/cpio/THANKS stable/7/contrib/cpio/TODO stable/7/contrib/cpio/doc/cpio.texi stable/7/contrib/cpio/lib/alloca_.h stable/7/contrib/cpio/lib/argp-ba.c stable/7/contrib/cpio/lib/argp-eexst.c stable/7/contrib/cpio/lib/argp-fmtstream.c stable/7/contrib/cpio/lib/argp-fmtstream.h stable/7/contrib/cpio/lib/argp-fs-xinl.c stable/7/contrib/cpio/lib/argp-help.c stable/7/contrib/cpio/lib/argp-namefrob.h stable/7/contrib/cpio/lib/argp-parse.c stable/7/contrib/cpio/lib/argp-pv.c stable/7/contrib/cpio/lib/argp-pvh.c stable/7/contrib/cpio/lib/argp-xinl.c stable/7/contrib/cpio/lib/argp.h stable/7/contrib/cpio/lib/basename.c stable/7/contrib/cpio/lib/dirname.c stable/7/contrib/cpio/lib/dirname.h stable/7/contrib/cpio/lib/error.c stable/7/contrib/cpio/lib/error.h stable/7/contrib/cpio/lib/exitfail.c stable/7/contrib/cpio/lib/exitfail.h stable/7/contrib/cpio/lib/full-write.c stable/7/contrib/cpio/lib/full-write.h stable/7/contrib/cpio/lib/getopt.c stable/7/contrib/cpio/lib/getopt1.c stable/7/contrib/cpio/lib/getopt_.h stable/7/contrib/cpio/lib/getopt_int.h stable/7/contrib/cpio/lib/gettext.h stable/7/contrib/cpio/lib/mempcpy.c stable/7/contrib/cpio/lib/rmt.h stable/7/contrib/cpio/lib/rtapelib.c stable/7/contrib/cpio/lib/safe-read.c stable/7/contrib/cpio/lib/safe-read.h stable/7/contrib/cpio/lib/safe-write.c stable/7/contrib/cpio/lib/safe-write.h stable/7/contrib/cpio/lib/savedir.c stable/7/contrib/cpio/lib/savedir.h stable/7/contrib/cpio/lib/strchrnul.c stable/7/contrib/cpio/lib/stripslash.c stable/7/contrib/cpio/lib/strndup.c stable/7/contrib/cpio/lib/strnlen.c stable/7/contrib/cpio/lib/system.h stable/7/contrib/cpio/lib/unlocked-io.h stable/7/contrib/cpio/lib/xalloc-die.c stable/7/contrib/cpio/lib/xalloc.h stable/7/contrib/cpio/lib/xmalloc.c stable/7/contrib/cpio/src/copyin.c stable/7/contrib/cpio/src/copyout.c stable/7/contrib/cpio/src/copypass.c stable/7/contrib/cpio/src/cpio.h stable/7/contrib/cpio/src/cpiohdr.h stable/7/contrib/cpio/src/defer.c stable/7/contrib/cpio/src/defer.h stable/7/contrib/cpio/src/dstring.c stable/7/contrib/cpio/src/dstring.h stable/7/contrib/cpio/src/extern.h stable/7/contrib/cpio/src/filemode.c stable/7/contrib/cpio/src/filetypes.h stable/7/contrib/cpio/src/global.c stable/7/contrib/cpio/src/idcache.c stable/7/contrib/cpio/src/main.c stable/7/contrib/cpio/src/makepath.c stable/7/contrib/cpio/src/tar.c stable/7/contrib/cpio/src/tar.h stable/7/contrib/cpio/src/tarhdr.h stable/7/contrib/cpio/src/userspec.c stable/7/contrib/cpio/src/util.c stable/7/gnu/usr.bin/cpio/Makefile stable/7/gnu/usr.bin/cpio/config.h Directory Properties: stable/7/contrib/cpio/ (props changed) stable/7/gnu/usr.bin/cpio/ (props changed) Modified: stable/7/contrib/cpio/ABOUT-NLS ============================================================================== --- stable/7/contrib/cpio/ABOUT-NLS Thu May 20 18:47:34 2010 (r208360) +++ stable/7/contrib/cpio/ABOUT-NLS Thu May 20 19:45:11 2010 (r208361) @@ -1,10 +1,11 @@ -Notes on the Free Translation Project -************************************* +1 Notes on the Free Translation Project +*************************************** Free software is going international! The Free Translation Project is a way to get maintainers of free software, translators, and users all -together, so that will gradually become able to speak many languages. -A few packages already provide translations for their messages. +together, so that free software will gradually become able to speak many +languages. A few packages already provide translations for their +messages. If you found this `ABOUT-NLS' file inside a distribution, you may assume that the distributed package does use GNU `gettext' internally, @@ -15,15 +16,15 @@ this package with messages translated. Installers will find here some useful hints. These notes also explain how users should proceed for getting the programs to use the available translations. They tell how people wanting to contribute and -work at translations should contact the appropriate team. +work on translations can contact the appropriate team. When reporting bugs in the `intl/' directory or bugs which may be related to internationalization, you should tell about the version of `gettext' which is used. The information can be found in the `intl/VERSION' file, in internationalized packages. -Quick configuration advice -========================== +1.1 Quick configuration advice +============================== If you want to exploit the full power of internationalization, you should configure it using @@ -45,8 +46,8 @@ to change to GNU `gettext' as soon as po you have installed a recent copy of the GNU gettext package with the included `libintl'. -INSTALL Matters -=============== +1.2 INSTALL Matters +=================== Some packages are "localizable" when properly installed; the programs they contain can be made to speak your own native language. Most such @@ -55,27 +56,27 @@ internationalization, predating GNU `get By default, this package will be installed to allow translation of messages. It will automatically detect whether the system already -provides the GNU `gettext' functions. If not, the GNU `gettext' own -library will be used. This library is wholly contained within this -package, usually in the `intl/' subdirectory, so prior installation of -the GNU `gettext' package is _not_ required. Installers may use -special options at configuration time for changing the default -behaviour. The commands: +provides the GNU `gettext' functions. If not, the included GNU +`gettext' library will be used. This library is wholly contained +within this package, usually in the `intl/' subdirectory, so prior +installation of the GNU `gettext' package is _not_ required. +Installers may use special options at configuration time for changing +the default behaviour. The commands: ./configure --with-included-gettext ./configure --disable-nls -will respectively bypass any pre-existing `gettext' to use the +will, respectively, bypass any pre-existing `gettext' to use the internationalizing routines provided within this package, or else, _totally_ disable translation of messages. When you already have GNU `gettext' installed on your system and run configure without an option for your new package, `configure' will probably detect the previously built and installed `libintl.a' file and -will decide to use this. This might be not what is desirable. You -should use the more recent version of the GNU `gettext' library. I.e. -if the file `intl/VERSION' shows that the library which comes with this -package is more recent, you should use +will decide to use this. This might not be desirable. You should use +the more recent version of the GNU `gettext' library. I.e. if the file +`intl/VERSION' shows that the library which comes with this package is +more recent, you should use ./configure --with-included-gettext @@ -86,7 +87,7 @@ and therefore it will not be used. The emulation of `gettext' on top of `catgets' could not provide all the extensions of the GNU `gettext' library. - Internationalized packages have usually many `po/LL.po' files, where + Internationalized packages usually have many `po/LL.po' files, where LL gives an ISO 639 two-letter code identifying the language. Unless translations have been forbidden at `configure' time by using the `--disable-nls' switch, all available translations are installed @@ -95,8 +96,8 @@ may be set, prior to configuration, to l `LINGUAS' should then contain a space separated list of two-letter codes, stating which languages are allowed. -Using This Package -================== +1.3 Using This Package +====================== As a user, if your language has been installed for this package, you only have to set the `LANG' environment variable to the appropriate @@ -117,8 +118,8 @@ country code serves to distinguish the d language and `CC' denoting the country, is the one use on systems based on GNU libc. On other systems, some variations of this scheme are used, such as `LL' or `LL_CC.ENCODING'. You can get the list of -locales supported by your system for your country by running the command -`locale -a | grep '^LL''. +locales supported by your system for your language by running the +command `locale -a | grep '^LL''. Not all programs have translations for all languages. By default, an English message is shown in place of a nonexistent translation. If you @@ -131,14 +132,21 @@ system libraries. For example, some Swe read translations in German than English for when Swedish is not available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'. + Special advice for Norwegian users: The language code for Norwegian +bokma*l changed from `no' to `nb' recently (in 2003). During the +transition period, while some message catalogs for this language are +installed under `nb' and some older ones under `no', it's recommended +for Norwegian users to set `LANGUAGE' to `nb:no' so that both newer and +older translations are used. + In the `LANGUAGE' environment variable, but not in the `LANG' environment variable, `LL_CC' combinations can be abbreviated as `LL' to denote the language's main dialect. For example, `de' is equivalent to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT' (Portuguese as spoken in Portugal) in this context. -Translating Teams -================= +1.4 Translating Teams +===================== For the Free Translation Project to be a success, we need interested people who like their own language and write it well, and who are also @@ -164,509 +172,897 @@ get started, please write to `translatio coordinator for all translator teams. The English team is special. It works at improving and uniformizing -the terminology in use. Proven linguistic skill are praised more than -programming skill, here. +the terminology in use. Proven linguistic skills are praised more than +programming skills, here. -Available Packages -================== +1.5 Available Packages +====================== Languages are not equally supported in all packages. The following -matrix shows the current state of internationalization, as of November -2003. The matrix shows, in regard of each package, for which languages +matrix shows the current state of internationalization, as of October +2006. The matrix shows, in regard of each package, for which languages PO files have been submitted to translation coordination, with a translation percentage of at least 50%. - Ready PO files am az be bg ca cs da de el en en_GB eo es - +-------------------------------------------+ - a2ps | [] [] [] [] | - aegis | () | - ant-phone | () | - anubis | | - ap-utils | | - bash | [] [] [] [] | - batchelor | | - bfd | [] [] | - binutils | [] [] | - bison | [] [] [] | - bluez-pin | [] [] | - clisp | [] [] [] | - clisp | | - coreutils | [] [] [] [] | - cpio | [] [] [] | - darkstat | [] () [] | - diffutils | [] [] [] [] [] [] [] | - e2fsprogs | [] [] | - enscript | [] [] [] [] | - error | [] [] [] [] [] | - fetchmail | [] () [] [] [] [] | - fileutils | [] [] [] | - findutils | [] [] [] [] [] [] [] | - flex | [] [] [] [] | - fslint | | - gas | [] | - gawk | [] [] [] [] | - gbiff | [] | - gcal | [] | - gcc | [] [] | - gettext | [] [] [] [] [] | - gettext-examples | [] [] [] | - gettext-runtime | [] [] [] [] [] | - gettext-tools | [] [] [] | - gimp-print | [] [] [] [] [] | - gliv | | - glunarclock | [] [] [] | - gnubiff | [] | - gnucash | [] () [] [] | - gnucash-glossary | [] () [] | - gnupg | [] () [] [] [] [] | - gpe-aerial | [] | - gpe-beam | [] [] | - gpe-calendar | [] [] | - gpe-clock | [] [] | - gpe-conf | [] [] | - gpe-contacts | [] [] | - gpe-edit | [] | - gpe-go | [] | - gpe-login | [] [] | - gpe-ownerinfo | [] [] | - gpe-sketchbook | [] [] | - gpe-su | [] [] | - gpe-taskmanager | [] [] | - gpe-timesheet | [] | - gpe-today | [] [] | - gpe-todo | [] [] | - gphoto2 | [] [] [] [] | - gprof | [] [] [] | - gpsdrive | () () () | - gramadoir | [] | - grep | [] [] [] [] [] [] | - gretl | [] | - gtick | () | - hello | [] [] [] [] [] [] | - id-utils | [] [] | - indent | [] [] [] [] | - jpilot | [] [] [] | - jtag | | - jwhois | [] | - kbd | [] [] [] [] [] | - latrine | () | - ld | [] [] | - libc | [] [] [] [] [] [] | - libgpewidget | [] [] | - libiconv | [] [] [] [] [] | - lifelines | [] () | - lilypond | [] | - lingoteach | | - lingoteach_lessons | () () | - lynx | [] [] [] [] | - m4 | [] [] [] [] | - mailutils | [] [] | - make | [] [] [] | - man-db | [] () [] [] () | - minicom | [] [] [] | - mysecretdiary | [] [] [] | - nano | [] () [] [] [] | - nano_1_0 | [] () [] [] [] | - opcodes | [] | - parted | [] [] [] [] [] | - ptx | [] [] [] [] [] | - python | | - radius | | - recode | [] [] [] [] [] [] [] | - screem | | - scrollkeeper | [] [] [] [] [] [] | - sed | [] [] [] [] [] | - sh-utils | [] [] [] | - shared-mime-info | | - sharutils | [] [] [] [] [] [] | - sketch | [] () [] | - soundtracker | [] [] [] | - sp | [] | - tar | [] [] [] [] | - texinfo | [] [] [] | - textutils | [] [] [] [] | - tin | () () | - tuxpaint | [] [] [] [] [] [] [] | - util-linux | [] [] [] [] [] | - vorbis-tools | [] [] [] [] | - wastesedge | () | - wdiff | [] [] [] [] | - wget | [] [] [] [] [] [] | - xchat | [] [] [] [] | - xfree86_xkb_xml | [] | - xpad | [] | - +-------------------------------------------+ - am az be bg ca cs da de el en en_GB eo es - 0 1 8 3 37 37 54 73 15 1 5 12 62 - - et fa fi fr ga gl he hr hu id is it ja - +----------------------------------------+ - a2ps | [] [] [] () | - aegis | | - ant-phone | | - anubis | [] | - ap-utils | [] | - bash | [] [] | - batchelor | [] | - bfd | [] | - binutils | [] [] | - bison | [] [] [] [] | - bluez-pin | [] [] [] [] [] | - clisp | [] | - clisp | | - coreutils | [] [] [] [] [] [] | - cpio | [] [] [] | - darkstat | () [] [] [] | - diffutils | [] [] [] [] [] [] [] | - e2fsprogs | | - enscript | [] [] | - error | [] [] [] [] | - fetchmail | [] | - fileutils | [] [] [] [] [] [] | - findutils | [] [] [] [] [] [] [] [] [] [] | - flex | [] [] | - fslint | | - gas | [] | - gawk | [] [] [] | - gbiff | | - gcal | [] | - gcc | [] | - gettext | [] [] | - gettext-examples | [] [] | - gettext-runtime | [] [] [] [] | - gettext-tools | [] [] | - gimp-print | [] [] | - gliv | () | - glunarclock | [] [] [] [] [] | - gnubiff | | - gnucash | () [] | - gnucash-glossary | [] | - gnupg | [] [] [] [] [] [] [] | - gpe-aerial | [] | - gpe-beam | [] | - gpe-calendar | [] [] [] | - gpe-clock | [] | - gpe-conf | [] | - gpe-contacts | [] [] | - gpe-edit | [] [] | - gpe-go | [] | - gpe-login | [] [] | - gpe-ownerinfo | [] [] [] | - gpe-sketchbook | [] | - gpe-su | [] | - gpe-taskmanager | [] | - gpe-timesheet | [] [] [] | - gpe-today | [] [] | - gpe-todo | [] [] | - gphoto2 | [] [] [] | - gprof | [] [] | - gpsdrive | () [] () () | - gramadoir | [] | - grep | [] [] [] [] [] [] [] [] [] [] [] | - gretl | [] | - gtick | [] [] | - hello | [] [] [] [] [] [] [] [] [] [] [] [] | - id-utils | [] [] [] [] | - indent | [] [] [] [] [] [] [] [] [] | - jpilot | [] () | - jtag | | - jwhois | [] [] [] [] | - kbd | [] | - latrine | | - ld | [] | - libc | [] [] [] [] [] | - libgpewidget | [] [] [] [] | - libiconv | [] [] [] [] [] [] [] [] [] | - lifelines | () | - lilypond | [] | - lingoteach | [] [] | - lingoteach_lessons | | - lynx | [] [] [] [] | - m4 | [] [] [] [] | - mailutils | | - make | [] [] [] [] [] | - man-db | () () | - minicom | [] [] [] [] | - mysecretdiary | [] [] | - nano | [] [] [] [] | - nano_1_0 | [] [] [] [] | - opcodes | [] | - parted | [] [] [] | - ptx | [] [] [] [] [] [] [] | - python | | - radius | | - recode | [] [] [] [] [] [] | - screem | | - scrollkeeper | [] | - sed | [] [] [] [] [] [] [] [] [] | - sh-utils | [] [] [] [] [] [] [] | - shared-mime-info | [] | - sharutils | [] [] [] [] [] | - sketch | [] | - soundtracker | [] [] [] [] | - sp | [] () | - tar | [] [] [] [] [] [] [] [] [] | - texinfo | [] [] [] [] | - textutils | [] [] [] [] [] | - tin | [] () | - tuxpaint | [] [] [] [] [] [] [] [] | - util-linux | [] [] [] [] () [] | - vorbis-tools | [] | - wastesedge | () | - wdiff | [] [] [] [] [] [] | - wget | [] [] [] [] [] [] [] | - xchat | [] [] [] | - xfree86_xkb_xml | | - xpad | [] | - +----------------------------------------+ - et fa fi fr ga gl he hr hu id is it ja - 21 1 24 84 24 24 8 10 38 31 1 22 33 - - ko lg lt lv ms nb nl nn no pl pt pt_BR ro - +-------------------------------------------+ - a2ps | () [] [] () () [] [] | - aegis | () () | - ant-phone | [] [] | - anubis | [] [] [] [] [] | - ap-utils | [] () [] | - bash | [] [] | - batchelor | [] | - bfd | [] | - binutils | | - bison | [] [] [] [] | - bluez-pin | [] [] [] | - clisp | [] | - clisp | | - coreutils | [] | - cpio | [] [] [] [] [] | - darkstat | [] [] [] [] | - diffutils | [] [] [] [] | - e2fsprogs | [] | - enscript | [] [] [] | - error | [] [] [] | - fetchmail | [] [] () | - fileutils | [] | - findutils | [] [] [] [] [] | - flex | [] [] [] [] | - fslint | [] [] | - gas | | - gawk | [] [] [] | - gbiff | [] [] | - gcal | | - gcc | | - gettext | [] [] [] | - gettext-examples | [] [] | - gettext-runtime | [] [] [] | - gettext-tools | [] [] [] | - gimp-print | [] | - gliv | [] [] [] | - glunarclock | [] [] [] | - gnubiff | | - gnucash | [] [] () | - gnucash-glossary | [] [] | - gnupg | [] | - gpe-aerial | [] [] [] | - gpe-beam | [] [] [] | - gpe-calendar | [] [] [] | - gpe-clock | [] [] [] | - gpe-conf | [] [] [] | - gpe-contacts | [] [] [] | - gpe-edit | [] [] [] | - gpe-go | [] [] | - gpe-login | [] [] [] | - gpe-ownerinfo | [] [] [] | - gpe-sketchbook | [] [] [] | - gpe-su | [] [] [] | - gpe-taskmanager | [] [] [] | - gpe-timesheet | [] [] [] | - gpe-today | [] [] [] | - gpe-todo | [] [] [] | - gphoto2 | [] | - gprof | [] [] | - gpsdrive | () () () [] | - gramadoir | [] | - grep | [] [] [] [] | - gretl | | - gtick | [] [] | - hello | [] [] [] [] [] [] [] [] [] [] | - id-utils | [] [] [] | - indent | [] [] [] | - jpilot | () () | - jtag | | - jwhois | [] [] [] [] | - kbd | [] [] [] | - latrine | [] | - ld | | - libc | [] [] [] [] [] | - libgpewidget | [] [] [] | - libiconv | [] [] [] [] | - lifelines | | - lilypond | | - lingoteach | | - lingoteach_lessons | | - lynx | [] [] | - m4 | [] [] [] [] | - mailutils | [] | - make | [] [] [] [] | - man-db | [] | - minicom | [] [] [] | - mysecretdiary | [] [] [] | - nano | [] [] [] [] | - nano_1_0 | [] [] [] [] [] | - opcodes | [] [] | - parted | [] [] [] [] | - ptx | [] [] [] [] [] [] [] | - python | | - radius | [] | - recode | [] [] [] | - screem | | - scrollkeeper | [] [] [] [] | - sed | [] [] [] | - sh-utils | [] | - shared-mime-info | [] | - sharutils | [] | - sketch | [] [] | - soundtracker | | - sp | | - tar | [] [] [] [] [] [] | - texinfo | [] [] [] | - textutils | [] [] | - tin | | - tuxpaint | [] [] [] [] [] [] [] [] [] | - util-linux | [] [] | - vorbis-tools | [] [] | - wastesedge | | - wdiff | [] [] [] [] | - wget | [] [] | - xchat | [] [] | - xfree86_xkb_xml | [] | - xpad | [] [] | - +-------------------------------------------+ - ko lg lt lv ms nb nl nn no pl pt pt_BR ro - 11 0 1 2 12 10 60 4 4 38 23 34 74 - - ru sk sl sr sv ta tr uk vi wa zh_CN zh_TW - +-------------------------------------------+ - a2ps | [] [] [] [] [] | 16 - aegis | () | 0 - ant-phone | | 2 - anubis | [] [] [] | 9 - ap-utils | () | 3 - bash | [] | 9 - batchelor | | 2 - bfd | [] [] | 6 - binutils | [] [] [] | 7 - bison | [] [] [] | 14 - bluez-pin | [] [] [] | 13 - clisp | | 5 - clisp | | 0 - coreutils | [] [] [] [] [] | 16 - cpio | [] [] [] | 14 - darkstat | [] [] [] () () | 12 - diffutils | [] [] [] [] | 22 - e2fsprogs | [] [] | 5 - enscript | [] [] [] | 12 - error | [] [] [] | 15 - fetchmail | [] [] [] | 11 - fileutils | [] [] [] [] [] [] | 16 - findutils | [] [] [] [] [] [] [] | 29 - flex | [] [] [] | 13 - fslint | | 2 - gas | [] | 3 - gawk | [] [] | 12 - gbiff | | 3 - gcal | [] [] | 4 - gcc | [] | 4 - gettext | [] [] [] [] [] [] | 16 - gettext-examples | [] [] | 9 - gettext-runtime | [] [] [] [] [] [] [] [] [] | 21 - gettext-tools | [] [] [] [] [] [] | 14 - gimp-print | [] [] | 10 - gliv | | 3 - glunarclock | [] [] [] [] | 15 - gnubiff | | 1 - gnucash | [] [] [] | 9 - gnucash-glossary | [] [] [] | 8 - gnupg | [] [] [] [] | 17 - gpe-aerial | [] [] | 7 - gpe-beam | [] [] | 8 - gpe-calendar | [] [] [] [] [] | 13 - gpe-clock | [] [] [] | 9 - gpe-conf | [] [] [] | 9 - gpe-contacts | [] [] [] [] | 11 - gpe-edit | [] [] [] [] [] | 11 - gpe-go | [] | 5 - gpe-login | [] [] [] [] [] | 12 - gpe-ownerinfo | [] [] [] [] | 12 - gpe-sketchbook | [] [] [] | 9 - gpe-su | [] [] [] | 9 - gpe-taskmanager | [] [] [] | 9 - gpe-timesheet | [] [] [] [] | 11 - gpe-today | [] [] [] [] [] | 12 - gpe-todo | [] [] [] [] [] | 12 - gphoto2 | [] [] [] | 11 - gprof | [] [] | 9 - gpsdrive | [] [] | 4 - gramadoir | | 3 - grep | [] [] [] [] [] | 26 - gretl | | 2 - gtick | [] | 5 - hello | [] [] [] [] [] | 33 - id-utils | [] [] [] | 12 - indent | [] [] [] [] [] | 21 - jpilot | [] [] [] [] [] | 9 - jtag | [] | 1 - jwhois | () () [] [] | 11 - kbd | [] [] | 11 - latrine | | 1 - ld | [] [] | 5 - libc | [] [] [] [] | 20 - libgpewidget | [] [] [] | 12 - libiconv | [] [] [] [] [] [] [] [] [] | 27 - lifelines | [] | 2 - lilypond | [] | 3 - lingoteach | | 2 - lingoteach_lessons | () | 0 - lynx | [] [] [] [] | 14 - m4 | [] [] [] | 15 - mailutils | [] | 4 - make | [] [] [] [] | 16 - man-db | [] | 5 - minicom | [] | 11 - mysecretdiary | [] [] | 10 - nano | [] [] [] [] [] | 17 - nano_1_0 | [] [] [] [] | 17 - opcodes | [] [] | 6 - parted | [] [] [] | 15 - ptx | [] [] [] | 22 - python | | 0 - radius | [] | 2 - recode | [] [] [] [] | 20 - screem | [] [] | 2 - scrollkeeper | [] [] [] [] | 15 - sed | [] [] [] [] [] [] | 23 - sh-utils | [] [] [] | 14 - shared-mime-info | [] [] | 4 - sharutils | [] [] [] [] [] | 17 - sketch | [] | 6 - soundtracker | [] [] | 9 - sp | [] | 3 - tar | [] [] [] [] [] | 24 - texinfo | [] [] [] [] | 14 - textutils | [] [] [] [] [] | 16 - tin | | 1 - tuxpaint | [] [] [] [] [] | 29 - util-linux | [] [] [] | 15 - vorbis-tools | [] | 8 - wastesedge | | 0 - wdiff | [] [] [] [] | 18 - wget | [] [] [] [] [] [] [] [] | 23 - xchat | [] [] [] [] [] | 14 - xfree86_xkb_xml | [] [] [] [] | 6 - xpad | | 4 - +-------------------------------------------+ - 51 teams ru sk sl sr sv ta tr uk vi wa zh_CN zh_TW - 117 domains 58 41 16 16 78 0 53 12 1 10 21 22 1230 + Ready PO files af am ar az be bg bs ca cs cy da de el en en_GB eo + +----------------------------------------------------+ + GNUnet | [] | + a2ps | [] [] [] [] [] | + aegis | () | + ant-phone | () | + anubis | [] | + ap-utils | | + aspell | [] [] [] [] [] | + bash | [] [] [] | + batchelor | [] | + bfd | | + bibshelf | [] | + binutils | [] | + bison | [] [] | + bison-runtime | | + bluez-pin | [] [] [] [] [] | + cflow | [] | + clisp | [] [] | + console-tools | [] [] | + coreutils | [] [] [] | + cpio | | + cpplib | [] [] [] | + cryptonit | [] | + darkstat | [] () [] | + dialog | [] [] [] [] [] [] | + diffutils | [] [] [] [] [] [] | + doodle | [] | + e2fsprogs | [] [] | + enscript | [] [] [] [] | + error | [] [] [] [] | + fetchmail | [] [] () [] | + fileutils | [] [] | + findutils | [] [] [] | + flex | [] [] [] | + fslint | [] | + gas | | + gawk | [] [] [] | + gbiff | [] | + gcal | [] | + gcc | [] | + gettext-examples | [] [] [] [] [] | + gettext-runtime | [] [] [] [] [] | + gettext-tools | [] [] | + gimp-print | [] [] [] [] | + gip | [] | + gliv | [] | + glunarclock | [] | + gmult | [] [] | + gnubiff | () | + gnucash | () () [] | + gnucash-glossary | [] () | + gnuedu | | + gnulib | [] [] [] [] [] [] | + gnunet-gtk | | + gnutls | | + gpe-aerial | [] [] | + gpe-beam | [] [] | + gpe-calendar | | + gpe-clock | [] [] | + gpe-conf | [] [] | + gpe-contacts | | + gpe-edit | [] | + gpe-filemanager | | + gpe-go | [] | + gpe-login | [] [] | + gpe-ownerinfo | [] [] | + gpe-package | | + gpe-sketchbook | [] [] | + gpe-su | [] [] | + gpe-taskmanager | [] [] | + gpe-timesheet | [] | + gpe-today | [] [] | + gpe-todo | | + gphoto2 | [] [] [] [] | + gprof | [] [] | + gpsdrive | () () | + gramadoir | [] [] | + grep | [] [] [] [] [] [] | + gretl | | + gsasl | | + gss | | + gst-plugins | [] [] [] [] | + gst-plugins-base | [] [] [] | + gst-plugins-good | [] [] [] [] [] [] [] | + gstreamer | [] [] [] [] [] [] [] | + gtick | () | + gtkam | [] [] [] | + gtkorphan | [] [] | + gtkspell | [] [] [] [] | + gutenprint | [] | + hello | [] [] [] [] [] | + id-utils | [] [] | + impost | | + indent | [] [] [] | + iso_3166 | [] [] | + iso_3166_2 | | + iso_4217 | [] | + iso_639 | [] [] | + jpilot | [] | + jtag | | + jwhois | | + kbd | [] [] [] [] | + keytouch | | + keytouch-editor | | + keytouch-keyboa... | | + latrine | () | + ld | [] | + leafpad | [] [] [] [] [] | + libc | [] [] [] [] [] | + libexif | [] | + libextractor | [] | + libgpewidget | [] [] [] | + libgpg-error | [] | + libgphoto2 | [] [] | + libgphoto2_port | [] [] | + libgsasl | | + libiconv | [] [] | + libidn | [] [] | + lifelines | [] () | + lilypond | [] | + lingoteach | | + lynx | [] [] [] [] | + m4 | [] [] [] [] | + mailutils | [] | + make | [] [] | + man-db | [] () [] [] | + minicom | [] [] [] | + mysecretdiary | [] [] | + nano | [] [] [] | + nano_1_0 | [] () [] [] | + opcodes | [] | + parted | | + pilot-qof | [] | + psmisc | [] | + pwdutils | | + python | | + qof | | + radius | [] | + recode | [] [] [] [] [] [] | + rpm | [] [] | + screem | | + scrollkeeper | [] [] [] [] [] [] [] [] | + sed | [] [] [] | + sh-utils | [] [] | + shared-mime-info | [] [] [] [] | + sharutils | [] [] [] [] [] [] | + shishi | | + silky | | + skencil | [] () | + sketch | [] () | + solfege | | + soundtracker | [] [] | + sp | [] | + stardict | [] | + system-tools-ba... | [] [] [] [] [] [] [] [] [] | + tar | [] | + texinfo | [] [] [] | + textutils | [] [] [] | + tin | () () | + tp-robot | [] | + tuxpaint | [] [] [] [] [] | + unicode-han-tra... | | + unicode-transla... | | + util-linux | [] [] [] [] | + vorbis-tools | [] [] [] [] | + wastesedge | () | + wdiff | [] [] [] [] | + wget | [] [] | + xchat | [] [] [] [] [] [] | + xkeyboard-config | | + xpad | [] [] | + +----------------------------------------------------+ + af am ar az be bg bs ca cs cy da de el en en_GB eo + 10 0 1 2 9 22 1 42 41 2 60 95 16 1 17 16 + + es et eu fa fi fr ga gl gu he hi hr hu id is it + +--------------------------------------------------+ + GNUnet | | + a2ps | [] [] [] () | + aegis | | + ant-phone | [] | + anubis | [] | + ap-utils | [] [] | + aspell | [] [] [] | + bash | [] [] [] | + batchelor | [] [] | + bfd | [] | + bibshelf | [] [] [] | + binutils | [] [] [] | + bison | [] [] [] [] [] [] | + bison-runtime | [] [] [] [] [] | + bluez-pin | [] [] [] [] [] | + cflow | [] | + clisp | [] [] | + console-tools | | + coreutils | [] [] [] [] [] [] | + cpio | [] [] [] | + cpplib | [] [] | + cryptonit | [] | + darkstat | [] () [] [] [] | + dialog | [] [] [] [] [] [] [] [] | + diffutils | [] [] [] [] [] [] [] [] [] | + doodle | [] [] | + e2fsprogs | [] [] [] | + enscript | [] [] [] | + error | [] [] [] [] [] | + fetchmail | [] | + fileutils | [] [] [] [] [] [] | + findutils | [] [] [] [] | + flex | [] [] [] | + fslint | [] | + gas | [] [] | + gawk | [] [] [] [] | + gbiff | [] | + gcal | [] [] | + gcc | [] | + gettext-examples | [] [] [] [] [] [] | + gettext-runtime | [] [] [] [] [] [] | + gettext-tools | [] [] [] | + gimp-print | [] [] | + gip | [] [] [] | + gliv | () | + glunarclock | [] [] [] | + gmult | [] [] [] | + gnubiff | () () | + gnucash | () () () | + gnucash-glossary | [] [] | + gnuedu | [] | + gnulib | [] [] [] [] [] [] [] [] | + gnunet-gtk | | + gnutls | | + gpe-aerial | [] [] | + gpe-beam | [] [] | + gpe-calendar | | + gpe-clock | [] [] [] [] | + gpe-conf | [] | + gpe-contacts | [] [] | + gpe-edit | [] [] [] [] | + gpe-filemanager | [] | + gpe-go | [] [] [] | + gpe-login | [] [] [] | + gpe-ownerinfo | [] [] [] [] [] | + gpe-package | [] | + gpe-sketchbook | [] [] | + gpe-su | [] [] [] [] | + gpe-taskmanager | [] [] [] | + gpe-timesheet | [] [] [] [] | + gpe-today | [] [] [] [] | + gpe-todo | [] | + gphoto2 | [] [] [] [] [] | + gprof | [] [] [] [] | + gpsdrive | () () [] () | + gramadoir | [] [] | + grep | [] [] [] [] [] [] [] [] [] [] [] [] | + gretl | [] [] [] | + gsasl | [] [] | + gss | [] | + gst-plugins | [] [] [] | + gst-plugins-base | [] [] | + gst-plugins-good | [] [] [] | + gstreamer | [] [] [] | + gtick | [] | + gtkam | [] [] [] [] | + gtkorphan | [] [] | + gtkspell | [] [] [] [] [] [] | + gutenprint | [] | + hello | [] [] [] [] [] [] [] [] [] [] [] [] [] | + id-utils | [] [] [] [] [] | + impost | [] [] | + indent | [] [] [] [] [] [] [] [] [] [] | + iso_3166 | [] [] [] | + iso_3166_2 | [] | + iso_4217 | [] [] [] [] | + iso_639 | [] [] [] [] [] | + jpilot | [] [] | + jtag | [] | + jwhois | [] [] [] [] [] | + kbd | [] [] | + keytouch | [] | + keytouch-editor | [] | + keytouch-keyboa... | [] | + latrine | [] [] [] | + ld | [] [] | + leafpad | [] [] [] [] [] [] | + libc | [] [] [] [] [] | + libexif | [] | + libextractor | [] | + libgpewidget | [] [] [] [] [] | + libgpg-error | | + libgphoto2 | [] [] [] | + libgphoto2_port | [] [] | + libgsasl | [] [] | + libiconv | [] [] | + libidn | [] [] | + lifelines | () | + lilypond | [] | + lingoteach | [] [] [] | + lynx | [] [] [] | + m4 | [] [] [] [] | + mailutils | [] [] | + make | [] [] [] [] [] [] [] [] | + man-db | () | + minicom | [] [] [] [] | + mysecretdiary | [] [] [] | + nano | [] [] [] [] [] [] | + nano_1_0 | [] [] [] [] [] | + opcodes | [] [] [] [] | + parted | [] [] [] [] | + pilot-qof | | + psmisc | [] [] [] | + pwdutils | | + python | | + qof | [] | + radius | [] [] | + recode | [] [] [] [] [] [] [] [] | + rpm | [] [] | + screem | | + scrollkeeper | [] [] [] | + sed | [] [] [] [] [] | + sh-utils | [] [] [] [] [] [] [] | + shared-mime-info | [] [] [] [] [] [] | + sharutils | [] [] [] [] [] [] [] [] | + shishi | | + silky | [] | + skencil | [] [] | + sketch | [] [] | + solfege | [] | + soundtracker | [] [] [] | + sp | [] | + stardict | [] | + system-tools-ba... | [] [] [] [] [] [] [] [] | + tar | [] [] [] [] [] [] [] | + texinfo | [] [] | + textutils | [] [] [] [] [] | + tin | [] () | + tp-robot | [] [] [] [] | + tuxpaint | [] [] | + unicode-han-tra... | | + unicode-transla... | [] [] | + util-linux | [] [] [] [] [] [] [] | + vorbis-tools | [] [] | + wastesedge | () | + wdiff | [] [] [] [] [] [] [] [] | + wget | [] [] [] [] [] [] [] [] | *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-7@FreeBSD.ORG Thu May 20 23:06:53 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A1BC106566B; Thu, 20 May 2010 23:06:53 +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 886038FC0C; Thu, 20 May 2010 23:06: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 o4KN6raE036233; Thu, 20 May 2010 23:06:53 GMT (envelope-from gordon@svn.freebsd.org) Received: (from gordon@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4KN6rTt036231; Thu, 20 May 2010 23:06:53 GMT (envelope-from gordon@svn.freebsd.org) Message-Id: <201005202306.o4KN6rTt036231@svn.freebsd.org> From: Gordon Tetlow Date: Thu, 20 May 2010 23:06:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208366 - stable/7/lib/libc/gen X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 May 2010 23:06:53 -0000 Author: gordon Date: Thu May 20 23:06:53 2010 New Revision: 208366 URL: http://svn.freebsd.org/changeset/base/208366 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/7/lib/libc/gen/glob.c Directory Properties: stable/7/lib/libc/ (props changed) stable/7/lib/libc/stdtime/ (props changed) Modified: stable/7/lib/libc/gen/glob.c ============================================================================== --- stable/7/lib/libc/gen/glob.c Thu May 20 22:12:36 2010 (r208365) +++ stable/7/lib/libc/gen/glob.c Thu May 20 23:06:53 2010 (r208366) @@ -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-7@FreeBSD.ORG Fri May 21 04:48:40 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7AE1C1065672; Fri, 21 May 2010 04:48:40 +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 69C0C8FC14; Fri, 21 May 2010 04:48: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 o4L4meuF011511; Fri, 21 May 2010 04:48:40 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4L4meog011509; Fri, 21 May 2010 04:48:40 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201005210448.o4L4meog011509@svn.freebsd.org> From: "Kenneth D. Merry" Date: Fri, 21 May 2010 04:48:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208368 - stable/7/sys/netinet X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 May 2010 04:48:40 -0000 Author: ken Date: Fri May 21 04:48:40 2010 New Revision: 208368 URL: http://svn.freebsd.org/changeset/base/208368 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/7/sys/netinet/tcp_output.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/netinet/tcp_output.c ============================================================================== --- stable/7/sys/netinet/tcp_output.c Fri May 21 04:47:22 2010 (r208367) +++ stable/7/sys/netinet/tcp_output.c Fri May 21 04:48:40 2010 (r208368) @@ -995,7 +995,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-7@FreeBSD.ORG Fri May 21 16:03:57 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D76E2106566B; Fri, 21 May 2010 16:03:57 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ACA398FC0C; Fri, 21 May 2010 16:03: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 o4LG3vHx063073; Fri, 21 May 2010 16:03:57 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4LG3v4p063070; Fri, 21 May 2010 16:03:57 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201005211603.o4LG3v4p063070@svn.freebsd.org> From: Jaakko Heinonen Date: Fri, 21 May 2010 16:03:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208381 - stable/7/usr.bin/systat X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 May 2010 16:03:58 -0000 Author: jh Date: Fri May 21 16:03:57 2010 New Revision: 208381 URL: http://svn.freebsd.org/changeset/base/208381 Log: MFC r197956: - Catch SIGHUP to perform cleanup before exiting. - Exit if getch() returns with an error other than EINTR. Otherwise systat(1) may get stuck in an infinite loop if it doesn't receive SIGHUP when terminal closes. - Remove attempt to clear stdio error indicators. getch() doesn't use stdio, making it useless. - Remove unneeded masking of getch() return value. PR: bin/107171 Modified: stable/7/usr.bin/systat/keyboard.c stable/7/usr.bin/systat/main.c Directory Properties: stable/7/usr.bin/systat/ (props changed) Modified: stable/7/usr.bin/systat/keyboard.c ============================================================================== --- stable/7/usr.bin/systat/keyboard.c Fri May 21 16:01:57 2010 (r208380) +++ stable/7/usr.bin/systat/keyboard.c Fri May 21 16:03:57 2010 (r208381) @@ -39,8 +39,10 @@ __FBSDID("$FreeBSD$"); static const char sccsid[] = "@(#)keyboard.c 8.1 (Berkeley) 6/6/93"; #endif +#include #include #include +#include #include #include "systat.h" @@ -57,10 +59,11 @@ keyboard() move(CMDLINE, 0); do { refresh(); - ch = getch() & 0177; - if (ch == 0177 && ferror(stdin)) { - clearerr(stdin); - continue; + ch = getch(); + if (ch == ERR) { + if (errno == EINTR) + continue; + exit(1); } if (ch >= 'A' && ch <= 'Z') ch += 'a' - 'A'; Modified: stable/7/usr.bin/systat/main.c ============================================================================== --- stable/7/usr.bin/systat/main.c Fri May 21 16:01:57 2010 (r208380) +++ stable/7/usr.bin/systat/main.c Fri May 21 16:03:57 2010 (r208381) @@ -133,6 +133,7 @@ main(int argc, char **argv) exit(1); } } + signal(SIGHUP, die); signal(SIGINT, die); signal(SIGQUIT, die); signal(SIGTERM, die); From owner-svn-src-stable-7@FreeBSD.ORG Fri May 21 16:07:42 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 454E61065679; Fri, 21 May 2010 16:07:42 +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 1AEA68FC1D; Fri, 21 May 2010 16:07: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 o4LG7fnK064002; Fri, 21 May 2010 16:07:42 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4LG7f6R064000; Fri, 21 May 2010 16:07:41 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201005211607.o4LG7f6R064000@svn.freebsd.org> From: John Baldwin Date: Fri, 21 May 2010 16:07:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208383 - stable/7/sys/net X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 May 2010 16:07:42 -0000 Author: jhb Date: Fri May 21 16:07:41 2010 New Revision: 208383 URL: http://svn.freebsd.org/changeset/base/208383 Log: MFC 208212: Ignore failures from removing multicast addresses from the parent (trunk) interface when tearing down a vlan interface. Modified: stable/7/sys/net/if_vlan.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/net/if_vlan.c ============================================================================== --- stable/7/sys/net/if_vlan.c Fri May 21 16:07:20 2010 (r208382) +++ stable/7/sys/net/if_vlan.c Fri May 21 16:07:41 2010 (r208383) @@ -185,8 +185,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); @@ -1077,25 +1077,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(); @@ -1124,9 +1121,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); } @@ -1172,8 +1175,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-7@FreeBSD.ORG Fri May 21 16:17:46 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9DE9E1065670; Fri, 21 May 2010 16:17:46 +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 8CCF58FC1E; Fri, 21 May 2010 16:17: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 o4LGHkok066317; Fri, 21 May 2010 16:17:46 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4LGHkNK066315; Fri, 21 May 2010 16:17:46 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201005211617.o4LGHkNK066315@svn.freebsd.org> From: John Baldwin Date: Fri, 21 May 2010 16:17:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208385 - stable/7/etc X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 May 2010 16:17:46 -0000 Author: jhb Date: Fri May 21 16:17:46 2010 New Revision: 208385 URL: http://svn.freebsd.org/changeset/base/208385 Log: MFC 208213: Prevent unloading a kld for a driver that has subinterfaces (vlan 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/7/etc/network.subr Directory Properties: stable/7/etc/ (props changed) Modified: stable/7/etc/network.subr ============================================================================== --- stable/7/etc/network.subr Fri May 21 16:17:08 2010 (r208384) +++ stable/7/etc/network.subr Fri May 21 16:17:46 2010 (r208385) @@ -485,7 +485,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=' ' @@ -549,10 +549,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-7@FreeBSD.ORG Fri May 21 16:25:17 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 33BD21065672; Fri, 21 May 2010 16:25:17 +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 080A98FC14; Fri, 21 May 2010 16:25: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 o4LGPGAq068037; Fri, 21 May 2010 16:25:16 GMT (envelope-from stefanf@svn.freebsd.org) Received: (from stefanf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4LGPGlJ068034; Fri, 21 May 2010 16:25:16 GMT (envelope-from stefanf@svn.freebsd.org) Message-Id: <201005211625.o4LGPGlJ068034@svn.freebsd.org> From: Stefan Farfeleder Date: Fri, 21 May 2010 16:25:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208386 - stable/7/tools/regression/bin/sh/builtins X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 May 2010 16:25:17 -0000 Author: stefanf Date: Fri May 21 16:25:16 2010 New Revision: 208386 URL: http://svn.freebsd.org/changeset/base/208386 Log: Merge r199628 and r199632: Tests for the cd command. Added: stable/7/tools/regression/bin/sh/builtins/cd1.0 - copied, changed from r176522, head/tools/regression/bin/sh/builtins/cd1.0 stable/7/tools/regression/bin/sh/builtins/cd2.0 - copied unchanged from r199632, head/tools/regression/bin/sh/builtins/cd2.0 Modified: Directory Properties: stable/7/tools/regression/bin/sh/ (props changed) Copied and modified: stable/7/tools/regression/bin/sh/builtins/cd1.0 (from r176522, head/tools/regression/bin/sh/builtins/cd1.0) ============================================================================== --- head/tools/regression/bin/sh/builtins/cd1.0 Sun Feb 24 16:52:02 2008 (r176522, copy source) +++ stable/7/tools/regression/bin/sh/builtins/cd1.0 Fri May 21 16:25:16 2010 (r208386) @@ -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/7/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/7/tools/regression/bin/sh/builtins/cd2.0 Fri May 21 16:25:16 2010 (r208386, 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-7@FreeBSD.ORG Fri May 21 16:32:15 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 95C731065670; Fri, 21 May 2010 16:32:15 +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 7ADC38FC1A; Fri, 21 May 2010 16:32: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 o4LGWFsM069597; Fri, 21 May 2010 16:32:15 GMT (envelope-from stefanf@svn.freebsd.org) Received: (from stefanf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4LGWFh6069592; Fri, 21 May 2010 16:32:15 GMT (envelope-from stefanf@svn.freebsd.org) Message-Id: <201005211632.o4LGWFh6069592@svn.freebsd.org> From: Stefan Farfeleder Date: Fri, 21 May 2010 16:32:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208387 - in stable/7/tools/regression/bin/sh: builtins set-e X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 May 2010 16:32:15 -0000 Author: stefanf Date: Fri May 21 16:32:14 2010 New Revision: 208387 URL: http://svn.freebsd.org/changeset/base/208387 Log: Merge r193178 and r194897: Tests for the eval command. Added: stable/7/tools/regression/bin/sh/builtins/eval1.0 - copied unchanged from r193178, head/tools/regression/bin/sh/builtins/eval1.0 stable/7/tools/regression/bin/sh/builtins/eval2.0 - copied unchanged from r194897, head/tools/regression/bin/sh/builtins/eval2.0 stable/7/tools/regression/bin/sh/set-e/eval1.0 - copied unchanged from r193178, head/tools/regression/bin/sh/set-e/eval1.0 stable/7/tools/regression/bin/sh/set-e/eval2.1 - copied unchanged from r193178, head/tools/regression/bin/sh/set-e/eval2.1 Modified: stable/7/tools/regression/bin/sh/set-e/not2.0 Directory Properties: stable/7/tools/regression/bin/sh/ (props changed) Copied: stable/7/tools/regression/bin/sh/builtins/eval1.0 (from r193178, head/tools/regression/bin/sh/builtins/eval1.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/tools/regression/bin/sh/builtins/eval1.0 Fri May 21 16:32:14 2010 (r208387, copy of r193178, head/tools/regression/bin/sh/builtins/eval1.0) @@ -0,0 +1,9 @@ +# $FreeBSD$ +set -e + +eval +eval "" "" +eval "true" +! eval "false + +" Copied: stable/7/tools/regression/bin/sh/builtins/eval2.0 (from r194897, head/tools/regression/bin/sh/builtins/eval2.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/tools/regression/bin/sh/builtins/eval2.0 Fri May 21 16:32:14 2010 (r208387, copy of r194897, head/tools/regression/bin/sh/builtins/eval2.0) @@ -0,0 +1,7 @@ +# $FreeBSD$ + +eval ' +false + +' && exit 1 +exit 0 Copied: stable/7/tools/regression/bin/sh/set-e/eval1.0 (from r193178, head/tools/regression/bin/sh/set-e/eval1.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/tools/regression/bin/sh/set-e/eval1.0 Fri May 21 16:32:14 2010 (r208387, copy of r193178, head/tools/regression/bin/sh/set-e/eval1.0) @@ -0,0 +1,3 @@ +# $FreeBSD$ +set -e +eval false || true Copied: stable/7/tools/regression/bin/sh/set-e/eval2.1 (from r193178, head/tools/regression/bin/sh/set-e/eval2.1) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/tools/regression/bin/sh/set-e/eval2.1 Fri May 21 16:32:14 2010 (r208387, copy of r193178, head/tools/regression/bin/sh/set-e/eval2.1) @@ -0,0 +1,4 @@ +# $FreeBSD$ +set -e +eval false +exit 0 Modified: stable/7/tools/regression/bin/sh/set-e/not2.0 ============================================================================== --- stable/7/tools/regression/bin/sh/set-e/not2.0 Fri May 21 16:25:16 2010 (r208386) +++ stable/7/tools/regression/bin/sh/set-e/not2.0 Fri May 21 16:32:14 2010 (r208387) @@ -1,3 +1,4 @@ # $FreeBSD$ set -e ! false +! eval false