From owner-svn-src-stable-8@FreeBSD.ORG Sun Jan 8 01:09:00 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 84A15106566B; Sun, 8 Jan 2012 01:09:00 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7268A8FC14; Sun, 8 Jan 2012 01:09:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q08190Ol064266; Sun, 8 Jan 2012 01:09:00 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q08190J0064264; Sun, 8 Jan 2012 01:09:00 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201201080109.q08190J0064264@svn.freebsd.org> From: Rick Macklem Date: Sun, 8 Jan 2012 01:09:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229801 - stable/8/sys/fs/nfsserver X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jan 2012 01:09:00 -0000 Author: rmacklem Date: Sun Jan 8 01:09:00 2012 New Revision: 229801 URL: http://svn.freebsd.org/changeset/base/229801 Log: MFC: r228260 This patch adds a sysctl to the NFSv4 server which optionally disables the check for a UTF-8 compliant file name. Enabling this sysctl results in an NFSv4 server that is non-RFC3530 compliant, therefore it is not enabled by default. However, enabling this sysctl results in NFSv3 compatible behaviour and fixes the problem reported by "dan at sunsaturn.com" to freebsd-current@ on Nov. 14, 2011 under the subject "NFSV4 readlink_stat". Modified: stable/8/sys/fs/nfsserver/nfs_nfsdsubs.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/fs/nfsserver/nfs_nfsdsubs.c ============================================================================== --- stable/8/sys/fs/nfsserver/nfs_nfsdsubs.c Sun Jan 8 00:55:22 2012 (r229800) +++ stable/8/sys/fs/nfsserver/nfs_nfsdsubs.c Sun Jan 8 01:09:00 2012 (r229801) @@ -56,6 +56,13 @@ static nfstype newnfsv2_type[9] = { NFNO extern nfstype nfsv34_type[9]; #endif /* !APPLEKEXT */ +SYSCTL_DECL(_vfs_nfsd); + +static int disable_checkutf8 = 0; +SYSCTL_INT(_vfs_nfsd, OID_AUTO, disable_checkutf8, CTLFLAG_RW, + &disable_checkutf8, 0, + "Disable the NFSv4 check for a UTF8 compliant name"); + static char nfsrv_hexdigit(char, int *); /* @@ -1963,7 +1970,8 @@ nfsrv_parsename(struct nfsrv_descript *n error = 0; goto nfsmout; } - if (nfsrv_checkutf8((u_int8_t *)bufp, outlen)) { + if (disable_checkutf8 == 0 && + nfsrv_checkutf8((u_int8_t *)bufp, outlen)) { nd->nd_repstat = NFSERR_INVAL; error = 0; goto nfsmout; From owner-svn-src-stable-8@FreeBSD.ORG Sun Jan 8 16:47:38 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA635106564A; Sun, 8 Jan 2012 16:47:38 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8AE478FC0C; Sun, 8 Jan 2012 16:47:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q08GlcHZ098526; Sun, 8 Jan 2012 16:47:38 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q08GlcYb098524; Sun, 8 Jan 2012 16:47:38 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201201081647.q08GlcYb098524@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 8 Jan 2012 16:47:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229813 - stable/8/sys/kern X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jan 2012 16:47:38 -0000 Author: kib Date: Sun Jan 8 16:47:37 2012 New Revision: 229813 URL: http://svn.freebsd.org/changeset/base/229813 Log: MFC r229185: Avoid double-unlock or double unreference for ndp->ni_dvp when the vnode dp lock upgrade right after the 'success' label fails. Modified: stable/8/sys/kern/vfs_lookup.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/kern/vfs_lookup.c ============================================================================== --- stable/8/sys/kern/vfs_lookup.c Sun Jan 8 13:54:08 2012 (r229812) +++ stable/8/sys/kern/vfs_lookup.c Sun Jan 8 16:47:37 2012 (r229813) @@ -470,12 +470,14 @@ lookup(struct nameidata *ndp) int dvfslocked; /* VFS Giant state for parent */ int tvfslocked; int lkflags_save; + int ni_dvp_unlocked; /* * Setup: break out flag bits into variables. */ dvfslocked = (ndp->ni_cnd.cn_flags & GIANTHELD) != 0; vfslocked = 0; + ni_dvp_unlocked = 0; ndp->ni_cnd.cn_flags &= ~GIANTHELD; wantparent = cnp->cn_flags & (LOCKPARENT | WANTPARENT); KASSERT(cnp->cn_nameiop == LOOKUP || wantparent, @@ -812,8 +814,10 @@ unionlookup: /* * Symlink code always expects an unlocked dvp. */ - if (ndp->ni_dvp != ndp->ni_vp) + if (ndp->ni_dvp != ndp->ni_vp) { VOP_UNLOCK(ndp->ni_dvp, 0); + ni_dvp_unlocked = 1; + } goto success; } @@ -860,14 +864,17 @@ nextname: VREF(ndp->ni_startdir); } if (!wantparent) { + ni_dvp_unlocked = 2; if (ndp->ni_dvp != dp) vput(ndp->ni_dvp); else vrele(ndp->ni_dvp); VFS_UNLOCK_GIANT(dvfslocked); dvfslocked = 0; - } else if ((cnp->cn_flags & LOCKPARENT) == 0 && ndp->ni_dvp != dp) + } else if ((cnp->cn_flags & LOCKPARENT) == 0 && ndp->ni_dvp != dp) { VOP_UNLOCK(ndp->ni_dvp, 0); + ni_dvp_unlocked = 1; + } if (cnp->cn_flags & AUDITVNODE1) AUDIT_ARG_VNODE1(dp); @@ -896,10 +903,12 @@ success: return (0); bad2: - if (dp != ndp->ni_dvp) - vput(ndp->ni_dvp); - else - vrele(ndp->ni_dvp); + if (ni_dvp_unlocked != 2) { + if (dp != ndp->ni_dvp && !ni_dvp_unlocked) + vput(ndp->ni_dvp); + else + vrele(ndp->ni_dvp); + } bad: if (!dpunlocked) vput(dp); From owner-svn-src-stable-8@FreeBSD.ORG Sun Jan 8 21:01:22 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 34F0E106567A; Sun, 8 Jan 2012 21:01:22 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1FB148FC0A; Sun, 8 Jan 2012 21:01:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q08L1M1N007400; Sun, 8 Jan 2012 21:01:22 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q08L1Lv0007397; Sun, 8 Jan 2012 21:01:21 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201201082101.q08L1Lv0007397@svn.freebsd.org> From: Eitan Adler Date: Sun, 8 Jan 2012 21:01:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229824 - in stable/8: include lib/libc/gen X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jan 2012 21:01:22 -0000 Author: eadler (ports committer) Date: Sun Jan 8 21:01:21 2012 New Revision: 229824 URL: http://svn.freebsd.org/changeset/base/229824 Log: MFC r228754: - Add restrict keyword to glob(3) PR: kern/161958 Approved by: jilles Modified: stable/8/include/glob.h stable/8/lib/libc/gen/glob.c Directory Properties: stable/8/include/ (props changed) stable/8/lib/libc/ (props changed) Modified: stable/8/include/glob.h ============================================================================== --- stable/8/include/glob.h Sun Jan 8 21:00:37 2012 (r229823) +++ stable/8/include/glob.h Sun Jan 8 21:01:21 2012 (r229824) @@ -102,7 +102,8 @@ typedef struct { #endif /* __BSD_VISIBLE */ __BEGIN_DECLS -int glob(const char *, int, int (*)(const char *, int), glob_t *); +int glob(const char * __restrict, int, + int (*)(const char *, int), glob_t * __restrict); void globfree(glob_t *); __END_DECLS Modified: stable/8/lib/libc/gen/glob.c ============================================================================== --- stable/8/lib/libc/gen/glob.c Sun Jan 8 21:00:37 2012 (r229823) +++ stable/8/lib/libc/gen/glob.c Sun Jan 8 21:01:21 2012 (r229824) @@ -163,7 +163,8 @@ static void qprintf(const char *, Char #endif int -glob(const char *pattern, int flags, int (*errfunc)(const char *, int), glob_t *pglob) +glob(const char * __restrict pattern, int flags, + int (*errfunc)(const char *, int), glob_t * __restrict pglob) { const char *patnext; size_t limit; From owner-svn-src-stable-8@FreeBSD.ORG Sun Jan 8 23:30:23 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AB0E11065672; Sun, 8 Jan 2012 23:30:23 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 94FC28FC1B; Sun, 8 Jan 2012 23:30:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q08NUNiN012592; Sun, 8 Jan 2012 23:30:23 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q08NUNrb012590; Sun, 8 Jan 2012 23:30:23 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201201082330.q08NUNrb012590@svn.freebsd.org> From: Rick Macklem Date: Sun, 8 Jan 2012 23:30:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229830 - stable/8/sys/fs/nfsserver X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jan 2012 23:30:23 -0000 Author: rmacklem Date: Sun Jan 8 23:30:23 2012 New Revision: 229830 URL: http://svn.freebsd.org/changeset/base/229830 Log: MFC: r228560 Patch the new NFS server in a manner analagous to r228520 for the old NFS server, so that it correctly handles a count == 0 argument for Commit. Modified: stable/8/sys/fs/nfsserver/nfs_nfsdport.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- stable/8/sys/fs/nfsserver/nfs_nfsdport.c Sun Jan 8 23:11:03 2012 (r229829) +++ stable/8/sys/fs/nfsserver/nfs_nfsdport.c Sun Jan 8 23:30:23 2012 (r229830) @@ -1249,7 +1249,13 @@ nfsvno_fsync(struct vnode *vp, u_int64_t { int error = 0; - if (cnt > MAX_COMMIT_COUNT) { + /* + * RFC 1813 3.3.21: if count is 0, a flush from offset to the end of + * file is done. At this time VOP_FSYNC does not accept offset and + * byte count parameters so call VOP_FSYNC the whole file for now. + * The same is true for NFSv4: RFC 3530 Sec. 14.2.3. + */ + if (cnt == 0 || cnt > MAX_COMMIT_COUNT) { /* * Give up and do the whole thing */ From owner-svn-src-stable-8@FreeBSD.ORG Mon Jan 9 01:59:50 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 68048106566C; Mon, 9 Jan 2012 01:59:50 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 528E58FC1A; Mon, 9 Jan 2012 01:59:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q091xo24017317; Mon, 9 Jan 2012 01:59:50 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q091xoLq017315; Mon, 9 Jan 2012 01:59:50 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201201090159.q091xoLq017315@svn.freebsd.org> From: Glen Barber Date: Mon, 9 Jan 2012 01:59:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229834 - stable/8/sys/conf X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2012 01:59:50 -0000 Author: gjb (doc committer) Date: Mon Jan 9 01:59:50 2012 New Revision: 229834 URL: http://svn.freebsd.org/changeset/base/229834 Log: MFC r229353: - Trivial standardization to a few comments in kern.pre.mk. Modified: stable/8/sys/conf/kern.pre.mk Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/conf/kern.pre.mk ============================================================================== --- stable/8/sys/conf/kern.pre.mk Mon Jan 9 01:59:17 2012 (r229833) +++ stable/8/sys/conf/kern.pre.mk Mon Jan 9 01:59:50 2012 (r229834) @@ -73,10 +73,10 @@ INCLUDES+= -I$S/dev/ath -I$S/dev/ath/ath # ... and the same for the NgATM stuff INCLUDES+= -I$S/contrib/ngatm -# .. and the same for twa +# ... and the same for twa INCLUDES+= -I$S/dev/twa -# ... and XFS +# ... and the same for XFS INCLUDES+= -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs # ... and the same for cxgb and cxgbe From owner-svn-src-stable-8@FreeBSD.ORG Mon Jan 9 03:03:43 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA3FF106566B; Mon, 9 Jan 2012 03:03:43 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A9C6F8FC08; Mon, 9 Jan 2012 03:03:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q0933hQb019615; Mon, 9 Jan 2012 03:03:43 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q0933hR8019613; Mon, 9 Jan 2012 03:03:43 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201201090303.q0933hR8019613@svn.freebsd.org> From: Eitan Adler Date: Mon, 9 Jan 2012 03:03:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229836 - stable/8/sys/kern X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2012 03:03:44 -0000 Author: eadler (ports committer) Date: Mon Jan 9 03:03:43 2012 New Revision: 229836 URL: http://svn.freebsd.org/changeset/base/229836 Log: MFC r228233: - Fix typos s/(more|less) then|\1 than/ Approved by: brucec Modified: stable/8/sys/kern/subr_blist.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/kern/subr_blist.c ============================================================================== --- stable/8/sys/kern/subr_blist.c Mon Jan 9 02:00:31 2012 (r229835) +++ stable/8/sys/kern/subr_blist.c Mon Jan 9 03:03:43 2012 (r229836) @@ -29,7 +29,7 @@ * * This module implements a general bitmap allocator/deallocator. The * allocator eats around 2 bits per 'block'. The module does not - * try to interpret the meaning of a 'block' other then to return + * try to interpret the meaning of a 'block' other than to return * SWAPBLK_NONE on an allocation failure. * * A radix tree is used to maintain the bitmap. Two radix constants are @@ -57,7 +57,7 @@ * the memory subsystem. In contrast, the rlist code may allocate memory * on an rlist_free() call. The non-blocking features of the blist code * are used to great advantage in the swap code (vm/nswap_pager.c). The - * rlist code uses a little less overall memory then the blist code (but + * rlist code uses a little less overall memory than the blist code (but * due to swap interleaving not all that much less), but the blist code * scales much, much better. * @@ -72,7 +72,7 @@ * to cover the number of blocks requested at creation time even if it * must be encompassed in larger root-node radix. * - * NOTE: the allocator cannot currently allocate more then + * NOTE: the allocator cannot currently allocate more than * BLIST_BMAP_RADIX blocks per call. It will panic with 'allocation too * large' if you try. This is an area that could use improvement. The * radix is large enough that this restriction does not effect the swap @@ -152,7 +152,7 @@ static MALLOC_DEFINE(M_SWAP, "SWAP", "Sw * blist_create() - create a blist capable of handling up to the specified * number of blocks * - * blocks - must be greater then 0 + * blocks - must be greater than 0 * flags - malloc flags * * The smallest blist consists of a single leaf node capable of @@ -841,7 +841,7 @@ blst_meta_fill( * * Initialize our meta structures and bitmaps and calculate the exact * amount of space required to manage 'count' blocks - this space may - * be considerably less then the calculated radix due to the large + * be considerably less than the calculated radix due to the large * RADIX values we use. */ From owner-svn-src-stable-8@FreeBSD.ORG Mon Jan 9 04:55:55 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A3A1B106566B; Mon, 9 Jan 2012 04:55:55 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 904B88FC08; Mon, 9 Jan 2012 04:55:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q094ttwV023391; Mon, 9 Jan 2012 04:55:55 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q094ttdo023386; Mon, 9 Jan 2012 04:55:55 GMT (envelope-from das@svn.freebsd.org) Message-Id: <201201090455.q094ttdo023386@svn.freebsd.org> From: David Schultz Date: Mon, 9 Jan 2012 04:55:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229840 - stable/8/lib/msun/src X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2012 04:55:55 -0000 Author: das Date: Mon Jan 9 04:55:55 2012 New Revision: 229840 URL: http://svn.freebsd.org/changeset/base/229840 Log: MFC various fma{,f,l} improvements: r226245 - refactoring r226371 - fix double-rounding bug r226373 - new math_private.h macros r226601 - fix nit in r226371 Modified: stable/8/lib/msun/src/math_private.h stable/8/lib/msun/src/s_fma.c stable/8/lib/msun/src/s_fmaf.c stable/8/lib/msun/src/s_fmal.c Directory Properties: stable/8/lib/msun/ (props changed) Modified: stable/8/lib/msun/src/math_private.h ============================================================================== --- stable/8/lib/msun/src/math_private.h Mon Jan 9 04:55:52 2012 (r229839) +++ stable/8/lib/msun/src/math_private.h Mon Jan 9 04:55:55 2012 (r229840) @@ -58,6 +58,10 @@ typedef union u_int32_t msw; u_int32_t lsw; } parts; + struct + { + u_int64_t w; + } xparts; } ieee_double_shape_type; #endif @@ -72,6 +76,10 @@ typedef union u_int32_t lsw; u_int32_t msw; } parts; + struct + { + u_int64_t w; + } xparts; } ieee_double_shape_type; #endif @@ -86,6 +94,14 @@ do { \ (ix1) = ew_u.parts.lsw; \ } while (0) +/* Get a 64-bit int from a double. */ +#define EXTRACT_WORD64(ix,d) \ +do { \ + ieee_double_shape_type ew_u; \ + ew_u.value = (d); \ + (ix) = ew_u.xparts.w; \ +} while (0) + /* Get the more significant 32 bit int from a double. */ #define GET_HIGH_WORD(i,d) \ @@ -114,6 +130,14 @@ do { \ (d) = iw_u.value; \ } while (0) +/* Set a double from a 64-bit int. */ +#define INSERT_WORD64(d,ix) \ +do { \ + ieee_double_shape_type iw_u; \ + iw_u.xparts.w = (ix); \ + (d) = iw_u.value; \ +} while (0) + /* Set the more significant 32 bits of a double from an int. */ #define SET_HIGH_WORD(d,v) \ Modified: stable/8/lib/msun/src/s_fma.c ============================================================================== --- stable/8/lib/msun/src/s_fma.c Mon Jan 9 04:55:52 2012 (r229839) +++ stable/8/lib/msun/src/s_fma.c Mon Jan 9 04:55:55 2012 (r229840) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2005 David Schultz + * Copyright (c) 2005-2011 David Schultz * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,6 +31,132 @@ __FBSDID("$FreeBSD$"); #include #include +#include "math_private.h" + +/* + * A struct dd represents a floating-point number with twice the precision + * of a double. We maintain the invariant that "hi" stores the 53 high-order + * bits of the result. + */ +struct dd { + double hi; + double lo; +}; + +/* + * Compute a+b exactly, returning the exact result in a struct dd. We assume + * that both a and b are finite, but make no assumptions about their relative + * magnitudes. + */ +static inline struct dd +dd_add(double a, double b) +{ + struct dd ret; + double s; + + ret.hi = a + b; + s = ret.hi - a; + ret.lo = (a - (ret.hi - s)) + (b - s); + return (ret); +} + +/* + * Compute a+b, with a small tweak: The least significant bit of the + * result is adjusted into a sticky bit summarizing all the bits that + * were lost to rounding. This adjustment negates the effects of double + * rounding when the result is added to another number with a higher + * exponent. For an explanation of round and sticky bits, see any reference + * on FPU design, e.g., + * + * J. Coonen. An Implementation Guide to a Proposed Standard for + * Floating-Point Arithmetic. Computer, vol. 13, no. 1, Jan 1980. + */ +static inline double +add_adjusted(double a, double b) +{ + struct dd sum; + uint64_t hibits, lobits; + + sum = dd_add(a, b); + if (sum.lo != 0) { + EXTRACT_WORD64(hibits, sum.hi); + if ((hibits & 1) == 0) { + /* hibits += (int)copysign(1.0, sum.hi * sum.lo) */ + EXTRACT_WORD64(lobits, sum.lo); + hibits += 1 - ((hibits ^ lobits) >> 62); + INSERT_WORD64(sum.hi, hibits); + } + } + return (sum.hi); +} + +/* + * Compute ldexp(a+b, scale) with a single rounding error. It is assumed + * that the result will be subnormal, and care is taken to ensure that + * double rounding does not occur. + */ +static inline double +add_and_denormalize(double a, double b, int scale) +{ + struct dd sum; + uint64_t hibits, lobits; + int bits_lost; + + sum = dd_add(a, b); + + /* + * If we are losing at least two bits of accuracy to denormalization, + * then the first lost bit becomes a round bit, and we adjust the + * lowest bit of sum.hi to make it a sticky bit summarizing all the + * bits in sum.lo. With the sticky bit adjusted, the hardware will + * break any ties in the correct direction. + * + * If we are losing only one bit to denormalization, however, we must + * break the ties manually. + */ + if (sum.lo != 0) { + EXTRACT_WORD64(hibits, sum.hi); + bits_lost = -((int)(hibits >> 52) & 0x7ff) - scale + 1; + if (bits_lost != 1 ^ (int)(hibits & 1)) { + /* hibits += (int)copysign(1.0, sum.hi * sum.lo) */ + EXTRACT_WORD64(lobits, sum.lo); + hibits += 1 - (((hibits ^ lobits) >> 62) & 2); + INSERT_WORD64(sum.hi, hibits); + } + } + return (ldexp(sum.hi, scale)); +} + +/* + * Compute a*b exactly, returning the exact result in a struct dd. We assume + * that both a and b are normalized, so no underflow or overflow will occur. + * The current rounding mode must be round-to-nearest. + */ +static inline struct dd +dd_mul(double a, double b) +{ + static const double split = 0x1p27 + 1.0; + struct dd ret; + double ha, hb, la, lb, p, q; + + p = a * split; + ha = a - p; + ha += p; + la = a - ha; + + p = b * split; + hb = b - p; + hb += p; + lb = b - hb; + + p = ha * hb; + q = ha * lb + la * hb; + + ret.hi = p + q; + ret.lo = p - ret.hi + q + la * lb; + return (ret); +} + /* * Fused multiply-add: Compute x * y + z with a single rounding error. * @@ -48,14 +174,11 @@ __FBSDID("$FreeBSD$"); * Hardware instructions should be used on architectures that support it, * since this implementation will likely be several times slower. */ -#if LDBL_MANT_DIG != 113 double fma(double x, double y, double z) { - static const double split = 0x1p27 + 1.0; - double xs, ys, zs; - double c, cc, hx, hy, p, q, tx, ty; - double r, rr, s; + double xs, ys, zs, adj; + struct dd xy, r; int oround; int ex, ey, ez; int spread; @@ -85,41 +208,6 @@ fma(double x, double y, double z) * will overflow, so we handle these cases specially. Rounding * modes other than FE_TONEAREST are painful. */ - if (spread > DBL_MANT_DIG * 2) { - fenv_t env; - feraiseexcept(FE_INEXACT); - switch(oround) { - case FE_TONEAREST: - return (x * y); - case FE_TOWARDZERO: - if (x > 0.0 ^ y < 0.0 ^ z < 0.0) - return (x * y); - feholdexcept(&env); - r = x * y; - if (!fetestexcept(FE_INEXACT)) - r = nextafter(r, 0); - feupdateenv(&env); - return (r); - case FE_DOWNWARD: - if (z > 0.0) - return (x * y); - feholdexcept(&env); - r = x * y; - if (!fetestexcept(FE_INEXACT)) - r = nextafter(r, -INFINITY); - feupdateenv(&env); - return (r); - default: /* FE_UPWARD */ - if (z < 0.0) - return (x * y); - feholdexcept(&env); - r = x * y; - if (!fetestexcept(FE_INEXACT)) - r = nextafter(r, INFINITY); - feupdateenv(&env); - return (r); - } - } if (spread < -DBL_MANT_DIG) { feraiseexcept(FE_INEXACT); if (!isnormal(z)) @@ -144,63 +232,52 @@ fma(double x, double y, double z) return (z); } } + if (spread <= DBL_MANT_DIG * 2) + zs = ldexp(zs, -spread); + else + zs = copysign(DBL_MIN, zs); - /* - * Use Dekker's algorithm to perform the multiplication and - * subsequent addition in twice the machine precision. - * Arrange so that x * y = c + cc, and x * y + z = r + rr. - */ fesetround(FE_TONEAREST); - p = xs * split; - hx = xs - p; - hx += p; - tx = xs - hx; - - p = ys * split; - hy = ys - p; - hy += p; - ty = ys - hy; - - p = hx * hy; - q = hx * ty + tx * hy; - c = p + q; - cc = p - c + q + tx * ty; - - zs = ldexp(zs, -spread); - r = c + zs; - s = r - c; - rr = (c - (r - s)) + (zs - s) + cc; + /* + * Basic approach for round-to-nearest: + * + * (xy.hi, xy.lo) = x * y (exact) + * (r.hi, r.lo) = xy.hi + z (exact) + * adj = xy.lo + r.lo (inexact; low bit is sticky) + * result = r.hi + adj (correctly rounded) + */ + xy = dd_mul(xs, ys); + r = dd_add(xy.hi, zs); spread = ex + ey; - if (spread + ilogb(r) > -1023) { + + if (r.hi == 0.0) { + /* + * When the addends cancel to 0, ensure that the result has + * the correct sign. + */ fesetround(oround); - r = r + rr; - } else { + volatile double vzs = zs; /* XXX gcc CSE bug workaround */ + return (xy.hi + vzs + ldexp(xy.lo, spread)); + } + + if (oround != FE_TONEAREST) { /* - * The result is subnormal, so we round before scaling to - * avoid double rounding. + * There is no need to worry about double rounding in directed + * rounding modes. */ - p = ldexp(copysign(0x1p-1022, r), -spread); - c = r + p; - s = c - r; - cc = (r - (c - s)) + (p - s) + rr; fesetround(oround); - r = (c + cc) - p; + adj = r.lo + xy.lo; + return (ldexp(r.hi + adj, spread)); } - return (ldexp(r, spread)); -} -#else /* LDBL_MANT_DIG == 113 */ -/* - * 113 bits of precision is more than twice the precision of a double, - * so it is enough to represent the intermediate product exactly. - */ -double -fma(double x, double y, double z) -{ - return ((long double)x * y + z); + + adj = add_adjusted(r.lo, xy.lo); + if (spread + ilogb(r.hi) > -1023) + return (ldexp(r.hi + adj, spread)); + else + return (add_and_denormalize(r.hi, adj, spread)); } -#endif /* LDBL_MANT_DIG != 113 */ #if (LDBL_MANT_DIG == 53) __weak_reference(fma, fmal); Modified: stable/8/lib/msun/src/s_fmaf.c ============================================================================== --- stable/8/lib/msun/src/s_fmaf.c Mon Jan 9 04:55:52 2012 (r229839) +++ stable/8/lib/msun/src/s_fmaf.c Mon Jan 9 04:55:55 2012 (r229840) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2005 David Schultz + * Copyright (c) 2005-2011 David Schultz * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -27,23 +27,43 @@ #include __FBSDID("$FreeBSD$"); +#include + #include "math.h" +#include "math_private.h" /* * Fused multiply-add: Compute x * y + z with a single rounding error. * * A double has more than twice as much precision than a float, so - * direct double-precision arithmetic suffices. - * - * XXX We are relying on the compiler to convert from double to float - * using the current rounding mode and with the appropriate - * side-effects. But on at least one platform (gcc 3.4.2/sparc64), - * this appears to be too much to ask for. The precision - * reduction should be done manually. + * direct double-precision arithmetic suffices, except where double + * rounding occurs. */ float fmaf(float x, float y, float z) { + double xy, result; + uint32_t hr, lr; + + xy = (double)x * y; + result = xy + z; + EXTRACT_WORDS(hr, lr, result); + /* Common case: The double precision result is fine. */ + if ((lr & 0x1fffffff) != 0x10000000 || /* not a halfway case */ + (hr & 0x7ff00000) == 0x7ff00000 || /* NaN */ + result - xy == z || /* exact */ + fegetround() != FE_TONEAREST) /* not round-to-nearest */ + return (result); - return ((double)x * y + z); + /* + * If result is inexact, and exactly halfway between two float values, + * we need to adjust the low-order bit in the direction of the error. + */ + fesetround(FE_TOWARDZERO); + volatile double vxy = xy; /* XXX work around gcc CSE bug */ + double adjusted_result = vxy + z; + fesetround(FE_TONEAREST); + if (result == adjusted_result) + SET_LOW_WORD(adjusted_result, lr + 1); + return (adjusted_result); } Modified: stable/8/lib/msun/src/s_fmal.c ============================================================================== --- stable/8/lib/msun/src/s_fmal.c Mon Jan 9 04:55:52 2012 (r229839) +++ stable/8/lib/msun/src/s_fmal.c Mon Jan 9 04:55:55 2012 (r229840) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2005 David Schultz + * Copyright (c) 2005-2011 David Schultz * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,6 +31,128 @@ __FBSDID("$FreeBSD$"); #include #include +#include "fpmath.h" + +/* + * A struct dd represents a floating-point number with twice the precision + * of a long double. We maintain the invariant that "hi" stores the high-order + * bits of the result. + */ +struct dd { + long double hi; + long double lo; +}; + +/* + * Compute a+b exactly, returning the exact result in a struct dd. We assume + * that both a and b are finite, but make no assumptions about their relative + * magnitudes. + */ +static inline struct dd +dd_add(long double a, long double b) +{ + struct dd ret; + long double s; + + ret.hi = a + b; + s = ret.hi - a; + ret.lo = (a - (ret.hi - s)) + (b - s); + return (ret); +} + +/* + * Compute a+b, with a small tweak: The least significant bit of the + * result is adjusted into a sticky bit summarizing all the bits that + * were lost to rounding. This adjustment negates the effects of double + * rounding when the result is added to another number with a higher + * exponent. For an explanation of round and sticky bits, see any reference + * on FPU design, e.g., + * + * J. Coonen. An Implementation Guide to a Proposed Standard for + * Floating-Point Arithmetic. Computer, vol. 13, no. 1, Jan 1980. + */ +static inline long double +add_adjusted(long double a, long double b) +{ + struct dd sum; + union IEEEl2bits u; + + sum = dd_add(a, b); + if (sum.lo != 0) { + u.e = sum.hi; + if ((u.bits.manl & 1) == 0) + sum.hi = nextafterl(sum.hi, INFINITY * sum.lo); + } + return (sum.hi); +} + +/* + * Compute ldexp(a+b, scale) with a single rounding error. It is assumed + * that the result will be subnormal, and care is taken to ensure that + * double rounding does not occur. + */ +static inline long double +add_and_denormalize(long double a, long double b, int scale) +{ + struct dd sum; + int bits_lost; + union IEEEl2bits u; + + sum = dd_add(a, b); + + /* + * If we are losing at least two bits of accuracy to denormalization, + * then the first lost bit becomes a round bit, and we adjust the + * lowest bit of sum.hi to make it a sticky bit summarizing all the + * bits in sum.lo. With the sticky bit adjusted, the hardware will + * break any ties in the correct direction. + * + * If we are losing only one bit to denormalization, however, we must + * break the ties manually. + */ + if (sum.lo != 0) { + u.e = sum.hi; + bits_lost = -u.bits.exp - scale + 1; + if (bits_lost != 1 ^ (int)(u.bits.manl & 1)) + sum.hi = nextafterl(sum.hi, INFINITY * sum.lo); + } + return (ldexp(sum.hi, scale)); +} + +/* + * Compute a*b exactly, returning the exact result in a struct dd. We assume + * that both a and b are normalized, so no underflow or overflow will occur. + * The current rounding mode must be round-to-nearest. + */ +static inline struct dd +dd_mul(long double a, long double b) +{ +#if LDBL_MANT_DIG == 64 + static const long double split = 0x1p32L + 1.0; +#elif LDBL_MANT_DIG == 113 + static const long double split = 0x1p57L + 1.0; +#endif + struct dd ret; + long double ha, hb, la, lb, p, q; + + p = a * split; + ha = a - p; + ha += p; + la = a - ha; + + p = b * split; + hb = b - p; + hb += p; + lb = b - hb; + + p = ha * hb; + q = ha * lb + la * hb; + + ret.hi = p + q; + ret.lo = p - ret.hi + q + la * lb; + return (ret); +} + /* * Fused multiply-add: Compute x * y + z with a single rounding error. * @@ -43,14 +165,8 @@ __FBSDID("$FreeBSD$"); long double fmal(long double x, long double y, long double z) { -#if LDBL_MANT_DIG == 64 - static const long double split = 0x1p32L + 1.0; -#elif LDBL_MANT_DIG == 113 - static const long double split = 0x1p57L + 1.0; -#endif - long double xs, ys, zs; - long double c, cc, hx, hy, p, q, tx, ty; - long double r, rr, s; + long double xs, ys, zs, adj; + struct dd xy, r; int oround; int ex, ey, ez; int spread; @@ -80,41 +196,6 @@ fmal(long double x, long double y, long * will overflow, so we handle these cases specially. Rounding * modes other than FE_TONEAREST are painful. */ - if (spread > LDBL_MANT_DIG * 2) { - fenv_t env; - feraiseexcept(FE_INEXACT); - switch(oround) { - case FE_TONEAREST: - return (x * y); - case FE_TOWARDZERO: - if (x > 0.0 ^ y < 0.0 ^ z < 0.0) - return (x * y); - feholdexcept(&env); - r = x * y; - if (!fetestexcept(FE_INEXACT)) - r = nextafterl(r, 0); - feupdateenv(&env); - return (r); - case FE_DOWNWARD: - if (z > 0.0) - return (x * y); - feholdexcept(&env); - r = x * y; - if (!fetestexcept(FE_INEXACT)) - r = nextafterl(r, -INFINITY); - feupdateenv(&env); - return (r); - default: /* FE_UPWARD */ - if (z < 0.0) - return (x * y); - feholdexcept(&env); - r = x * y; - if (!fetestexcept(FE_INEXACT)) - r = nextafterl(r, INFINITY); - feupdateenv(&env); - return (r); - } - } if (spread < -LDBL_MANT_DIG) { feraiseexcept(FE_INEXACT); if (!isnormal(z)) @@ -139,49 +220,49 @@ fmal(long double x, long double y, long return (z); } } + if (spread <= LDBL_MANT_DIG * 2) + zs = ldexpl(zs, -spread); + else + zs = copysignl(LDBL_MIN, zs); - /* - * Use Dekker's algorithm to perform the multiplication and - * subsequent addition in twice the machine precision. - * Arrange so that x * y = c + cc, and x * y + z = r + rr. - */ fesetround(FE_TONEAREST); - p = xs * split; - hx = xs - p; - hx += p; - tx = xs - hx; - - p = ys * split; - hy = ys - p; - hy += p; - ty = ys - hy; - - p = hx * hy; - q = hx * ty + tx * hy; - c = p + q; - cc = p - c + q + tx * ty; - - zs = ldexpl(zs, -spread); - r = c + zs; - s = r - c; - rr = (c - (r - s)) + (zs - s) + cc; + /* + * Basic approach for round-to-nearest: + * + * (xy.hi, xy.lo) = x * y (exact) + * (r.hi, r.lo) = xy.hi + z (exact) + * adj = xy.lo + r.lo (inexact; low bit is sticky) + * result = r.hi + adj (correctly rounded) + */ + xy = dd_mul(xs, ys); + r = dd_add(xy.hi, zs); spread = ex + ey; - if (spread + ilogbl(r) > -16383) { + + if (r.hi == 0.0) { + /* + * When the addends cancel to 0, ensure that the result has + * the correct sign. + */ fesetround(oround); - r = r + rr; - } else { + volatile long double vzs = zs; /* XXX gcc CSE bug workaround */ + return (xy.hi + vzs + ldexpl(xy.lo, spread)); + } + + if (oround != FE_TONEAREST) { /* - * The result is subnormal, so we round before scaling to - * avoid double rounding. + * There is no need to worry about double rounding in directed + * rounding modes. */ - p = ldexpl(copysignl(0x1p-16382L, r), -spread); - c = r + p; - s = c - r; - cc = (r - (c - s)) + (p - s) + rr; fesetround(oround); - r = (c + cc) - p; + adj = r.lo + xy.lo; + return (ldexpl(r.hi + adj, spread)); } - return (ldexpl(r, spread)); + + adj = add_adjusted(r.lo, xy.lo); + if (spread + ilogbl(r.hi) > -16383) + return (ldexpl(r.hi + adj, spread)); + else + return (add_and_denormalize(r.hi, adj, spread)); } From owner-svn-src-stable-8@FreeBSD.ORG Mon Jan 9 04:57:10 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4C8C41065673; Mon, 9 Jan 2012 04:57:10 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 20A968FC19; Mon, 9 Jan 2012 04:57:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q094v9vr023530; Mon, 9 Jan 2012 04:57:09 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q094v9ue023527; Mon, 9 Jan 2012 04:57:09 GMT (envelope-from das@svn.freebsd.org) Message-Id: <201201090457.q094v9ue023527@svn.freebsd.org> From: David Schultz Date: Mon, 9 Jan 2012 04:57:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229842 - in stable/8/lib/msun: amd64 i387 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2012 04:57:10 -0000 Author: das Date: Mon Jan 9 04:57:09 2012 New Revision: 229842 URL: http://svn.freebsd.org/changeset/base/229842 Log: MFC r226594: Bugfix: feenableexcept() and fedisableexcept() should just return the old exception mask, not mask | ~FE_ALL_EXCEPT. Modified: stable/8/lib/msun/amd64/fenv.c stable/8/lib/msun/i387/fenv.c Directory Properties: stable/8/lib/msun/ (props changed) Modified: stable/8/lib/msun/amd64/fenv.c ============================================================================== --- stable/8/lib/msun/amd64/fenv.c Mon Jan 9 04:57:06 2012 (r229841) +++ stable/8/lib/msun/amd64/fenv.c Mon Jan 9 04:57:09 2012 (r229842) @@ -120,12 +120,12 @@ __feenableexcept(int mask) mask &= FE_ALL_EXCEPT; __fnstcw(&control); __stmxcsr(&mxcsr); - omask = (control | mxcsr >> _SSE_EMASK_SHIFT) & FE_ALL_EXCEPT; + omask = ~(control | mxcsr >> _SSE_EMASK_SHIFT) & FE_ALL_EXCEPT; control &= ~mask; __fldcw(control); mxcsr &= ~(mask << _SSE_EMASK_SHIFT); __ldmxcsr(mxcsr); - return (~omask); + return (omask); } int @@ -137,12 +137,12 @@ __fedisableexcept(int mask) mask &= FE_ALL_EXCEPT; __fnstcw(&control); __stmxcsr(&mxcsr); - omask = (control | mxcsr >> _SSE_EMASK_SHIFT) & FE_ALL_EXCEPT; + omask = ~(control | mxcsr >> _SSE_EMASK_SHIFT) & FE_ALL_EXCEPT; control |= mask; __fldcw(control); mxcsr |= mask << _SSE_EMASK_SHIFT; __ldmxcsr(mxcsr); - return (~omask); + return (omask); } __weak_reference(__feenableexcept, feenableexcept); Modified: stable/8/lib/msun/i387/fenv.c ============================================================================== --- stable/8/lib/msun/i387/fenv.c Mon Jan 9 04:57:06 2012 (r229841) +++ stable/8/lib/msun/i387/fenv.c Mon Jan 9 04:57:09 2012 (r229842) @@ -177,14 +177,14 @@ __feenableexcept(int mask) __stmxcsr(&mxcsr); else mxcsr = 0; - omask = (control | mxcsr >> _SSE_EMASK_SHIFT) & FE_ALL_EXCEPT; + omask = ~(control | mxcsr >> _SSE_EMASK_SHIFT) & FE_ALL_EXCEPT; control &= ~mask; __fldcw(control); if (__HAS_SSE()) { mxcsr &= ~(mask << _SSE_EMASK_SHIFT); __ldmxcsr(mxcsr); } - return (~omask); + return (omask); } int @@ -199,14 +199,14 @@ __fedisableexcept(int mask) __stmxcsr(&mxcsr); else mxcsr = 0; - omask = (control | mxcsr >> _SSE_EMASK_SHIFT) & FE_ALL_EXCEPT; + omask = ~(control | mxcsr >> _SSE_EMASK_SHIFT) & FE_ALL_EXCEPT; control |= mask; __fldcw(control); if (__HAS_SSE()) { mxcsr |= mask << _SSE_EMASK_SHIFT; __ldmxcsr(mxcsr); } - return (~omask); + return (omask); } __weak_reference(__feenableexcept, feenableexcept); From owner-svn-src-stable-8@FreeBSD.ORG Mon Jan 9 04:58:02 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C7E9610656D1; Mon, 9 Jan 2012 04:58:02 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9CD3E8FC0A; Mon, 9 Jan 2012 04:58:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q094w2gS023655; Mon, 9 Jan 2012 04:58:02 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q094w2fK023652; Mon, 9 Jan 2012 04:58:02 GMT (envelope-from das@svn.freebsd.org) Message-Id: <201201090458.q094w2fK023652@svn.freebsd.org> From: David Schultz Date: Mon, 9 Jan 2012 04:58:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229844 - stable/8/lib/msun/src X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2012 04:58:02 -0000 Author: das Date: Mon Jan 9 04:58:02 2012 New Revision: 229844 URL: http://svn.freebsd.org/changeset/base/229844 Log: MFC r226595: Per IEEE754r, pow(1, y) is 1 even if y is NaN, and pow(-1, +-Inf) is 1. Modified: stable/8/lib/msun/src/e_pow.c stable/8/lib/msun/src/e_powf.c Directory Properties: stable/8/lib/msun/ (props changed) Modified: stable/8/lib/msun/src/e_pow.c ============================================================================== --- stable/8/lib/msun/src/e_pow.c Mon Jan 9 04:57:59 2012 (r229843) +++ stable/8/lib/msun/src/e_pow.c Mon Jan 9 04:58:02 2012 (r229844) @@ -109,6 +109,9 @@ __ieee754_pow(double x, double y) /* y==zero: x**0 = 1 */ if((iy|ly)==0) return one; + /* x==1: 1**y = 1, even if y is NaN */ + if (hx==0x3ff00000 && lx == 0) return one; + /* y!=zero: result is NaN if either arg is NaN */ if(ix > 0x7ff00000 || ((ix==0x7ff00000)&&(lx!=0)) || iy > 0x7ff00000 || ((iy==0x7ff00000)&&(ly!=0))) @@ -138,7 +141,7 @@ __ieee754_pow(double x, double y) if(ly==0) { if (iy==0x7ff00000) { /* y is +-inf */ if(((ix-0x3ff00000)|lx)==0) - return y - y; /* inf**+-1 is NaN */ + return one; /* (-1)**+-inf is NaN */ else if (ix >= 0x3ff00000)/* (|x|>1)**+-inf = inf,0 */ return (hy>=0)? y: zero; else /* (|x|<1)**-,+inf = inf,0 */ Modified: stable/8/lib/msun/src/e_powf.c ============================================================================== --- stable/8/lib/msun/src/e_powf.c Mon Jan 9 04:57:59 2012 (r229843) +++ stable/8/lib/msun/src/e_powf.c Mon Jan 9 04:58:02 2012 (r229844) @@ -67,6 +67,9 @@ __ieee754_powf(float x, float y) /* y==zero: x**0 = 1 */ if(iy==0) return one; + /* x==1: 1**y = 1, even if y is NaN */ + if (hx==0x3f800000) return one; + /* y!=zero: result is NaN if either arg is NaN */ if(ix > 0x7f800000 || iy > 0x7f800000) @@ -90,7 +93,7 @@ __ieee754_powf(float x, float y) /* special value of y */ if (iy==0x7f800000) { /* y is +-inf */ if (ix==0x3f800000) - return y - y; /* inf**+-1 is NaN */ + return one; /* (-1)**+-inf is NaN */ else if (ix > 0x3f800000)/* (|x|>1)**+-inf = inf,0 */ return (hy>=0)? y: zero; else /* (|x|<1)**-,+inf = inf,0 */ From owner-svn-src-stable-8@FreeBSD.ORG Mon Jan 9 04:59:48 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 15992106566C; Mon, 9 Jan 2012 04:59:48 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 038AE8FC0A; Mon, 9 Jan 2012 04:59:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q094xlm9023807; Mon, 9 Jan 2012 04:59:47 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q094xlMY023804; Mon, 9 Jan 2012 04:59:47 GMT (envelope-from das@svn.freebsd.org) Message-Id: <201201090459.q094xlMY023804@svn.freebsd.org> From: David Schultz Date: Mon, 9 Jan 2012 04:59:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229846 - stable/8/lib/libc/stdio X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2012 04:59:48 -0000 Author: das Date: Mon Jan 9 04:59:47 2012 New Revision: 229846 URL: http://svn.freebsd.org/changeset/base/229846 Log: MFC r226604: Add support for the 'x' mode option in fopen() as specified in the C1X draft standard. The option is equivalent to O_EXCL. Also merge doc improvements r197045 and r207942. Modified: stable/8/lib/libc/stdio/flags.c stable/8/lib/libc/stdio/fopen.3 Directory Properties: stable/8/lib/libc/ (props changed) Modified: stable/8/lib/libc/stdio/flags.c ============================================================================== --- stable/8/lib/libc/stdio/flags.c Mon Jan 9 04:59:44 2012 (r229845) +++ stable/8/lib/libc/stdio/flags.c Mon Jan 9 04:59:47 2012 (r229846) @@ -80,11 +80,30 @@ __sflags(mode, optr) return (0); } - /* [rwa]\+ or [rwa]b\+ means read and write */ - if (*mode == '+' || (*mode == 'b' && mode[1] == '+')) { + /* 'b' (binary) is ignored */ + if (*mode == 'b') + mode++; + + /* [rwa][b]\+ means read and write */ + if (*mode == '+') { + mode++; ret = __SRW; m = O_RDWR; } + + /* 'b' (binary) can appear here, too -- and is ignored again */ + if (*mode == 'b') + mode++; + + /* 'x' means exclusive (fail if the file exists) */ + if (*mode == 'x') { + if (m == O_RDONLY) { + errno = EINVAL; + return (0); + } + o |= O_EXCL; + } + *optr = m | o; return (ret); } Modified: stable/8/lib/libc/stdio/fopen.3 ============================================================================== --- stable/8/lib/libc/stdio/fopen.3 Mon Jan 9 04:59:44 2012 (r229845) +++ stable/8/lib/libc/stdio/fopen.3 Mon Jan 9 04:59:47 2012 (r229846) @@ -32,7 +32,7 @@ .\" @(#)fopen.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd January 26, 2003 +.Dd October 17, 2011 .Dt FOPEN 3 .Os .Sh NAME @@ -60,51 +60,57 @@ and associates a stream with it. .Pp The argument .Fa mode -points to a string beginning with one of the following -sequences (Additional characters may follow these sequences.): +points to a string beginning with one of the following letters: .Bl -tag -width indent .It Dq Li r -Open text file for reading. -The stream is positioned at the beginning of the file. -.It Dq Li r+ -Open for reading and writing. +Open for reading. The stream is positioned at the beginning of the file. +Fail if the file does not exist. .It Dq Li w -Truncate to zero length or create text file for writing. -The stream is positioned at the beginning of the file. -.It Dq Li w+ -Open for reading and writing. -The file is created if it does not exist, otherwise it is truncated. +Open for writing. The stream is positioned at the beginning of the file. +Create the file if it does not exist. .It Dq Li a Open for writing. -The file is created if it does not exist. -The stream is positioned at the end of the file. -Subsequent writes to the file will always end up at the then current -end of file, irrespective of any intervening -.Xr fseek 3 -or similar. -.It Dq Li a+ -Open for reading and writing. -The file is created if it does not exist. The stream is positioned at the end of the file. Subsequent writes to the file will always end up at the then current end of file, irrespective of any intervening .Xr fseek 3 or similar. +Create the file if it does not exist. .El .Pp +An optional +.Dq Li + +following +.Dq Li r , +.Dq Li w , +or +.Dq Li a +opens the file for both reading and writing. +An optional +.Dq Li x +following +.Dq Li w +or +.Dq Li w+ +causes the +.Fn fopen +call to fail if the file already exists. +.Pp The .Fa mode -string can also include the letter ``b'' either as a third character or -as a character between the characters in any of the two-character strings -described above. +string can also include the letter +.Dq Li b +after either the +.Dq Li + +or the first letter. This is strictly for compatibility with .St -isoC and has no effect; the ``b'' is ignored. .Pp Any created files will have mode -.Pf \\*q Dv S_IRUSR +.Do Dv S_IRUSR \&| .Dv S_IWUSR \&| @@ -114,7 +120,7 @@ Any created files will have mode \&| .Dv S_IROTH \&| -.Dv S_IWOTH Ns \\*q +.Dv S_IWOTH Dc .Pq Li 0666 , as modified by the process' umask value (see @@ -135,6 +141,9 @@ function associates a stream with the ex .Fa fildes . The mode of the stream must be compatible with the mode of the file descriptor. +The +.Dq Li x +mode option is ignored. When the stream is closed via .Xr fclose 3 , .Fa fildes @@ -165,29 +174,12 @@ attempts to re-open the file associated with a new mode. The new mode must be compatible with the mode that the stream was originally opened with: -.Bl -bullet -offset indent -.It -Streams originally opened with mode -.Dq Li r -can only be reopened with that same mode. -.It -Streams originally opened with mode -.Dq Li a -can be reopened with the same mode, or mode -.Dq Li w . -.It -Streams originally opened with mode -.Dq Li w -can be reopened with the same mode, or mode -.Dq Li a . -.It -Streams originally opened with mode -.Dq Li r+ , -.Dq Li w+ , -or -.Dq Li a+ -can be reopened with any mode. -.El +Streams open for reading can only be re-opened for reading, +streams open for writing can only be re-opened for writing, +and streams open for reading and writing can be re-opened in any mode. +The +.Dq Li x +mode option is not meaningful in this context. .Pp The primary use of the .Fn freopen From owner-svn-src-stable-8@FreeBSD.ORG Mon Jan 9 13:48:28 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4DEED106564A; Mon, 9 Jan 2012 13:48:28 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 234CE8FC17; Mon, 9 Jan 2012 13:48:28 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) by cyrus.watson.org (Postfix) with ESMTPSA id D05B646B09; Mon, 9 Jan 2012 08:48:27 -0500 (EST) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 3D61EB993; Mon, 9 Jan 2012 08:48:27 -0500 (EST) From: John Baldwin To: Hans Petter Selasky Date: Mon, 9 Jan 2012 08:10:48 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p10; KDE/4.5.5; amd64; ; ) References: <201201062254.q06Ms3jf012102@svn.freebsd.org> In-Reply-To: <201201062254.q06Ms3jf012102@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201201090810.48587.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 09 Jan 2012 08:48:27 -0500 (EST) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r229741 - stable/8/sys/dev/usb/controller X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2012 13:48:28 -0000 On Friday, January 06, 2012 5:54:03 pm Hans Petter Selasky wrote: > Author: hselasky > Date: Fri Jan 6 22:54:03 2012 > New Revision: 229741 > URL: http://svn.freebsd.org/changeset/base/229741 > > Log: > Fix build of ehci_mbus.c by applying patches similar > to ones in r228483. This file was missed by a recent > MFC because the file is named differently in 10-current. > > Pointy hat: hselasky @ > Reported by: jhb Thanks for fixing this! It would be nice if the tinderbox would build the same set of things as 'make universe' so that this sort of thing could be caught earlier. Specifically, on embededded targets there isn't really a LINT. Instead, one has to build the various kernel configs for different systems. -- John Baldwin From owner-svn-src-stable-8@FreeBSD.ORG Mon Jan 9 18:32:45 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9305E106566B; Mon, 9 Jan 2012 18:32:45 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7FFD78FC14; Mon, 9 Jan 2012 18:32:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q09IWjvL052588; Mon, 9 Jan 2012 18:32:45 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q09IWjc1052584; Mon, 9 Jan 2012 18:32:45 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201201091832.q09IWjc1052584@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 9 Jan 2012 18:32:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229859 - in stable/8/sys: conf dev/bce X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2012 18:32:45 -0000 Author: yongari Date: Mon Jan 9 18:32:45 2012 New Revision: 229859 URL: http://svn.freebsd.org/changeset/base/229859 Log: MFC r210522,213489,218423,218527: r210522: Fix an apparent typo. r213489: Add the capability to read the complete contents of the NVRAM via sysctl dev.bce..nvram_dump Add the capability to write the complete contents of the NVRAM via sysctl dev.bce..nvram_write These are only available if the kernel option BCE_DEBUG is enabled. The nvram_write sysctl also requires the kernel option BCE_NVRAM_WRITE_SUPPORT to be enabled. These are to be used at your own caution. Since the MAC addresses are stored in the NVRAM, if you dump one NIC and restore it on another NIC the destination NIC's MAC addresses will not be preserved. A tool can be made using these sysctl's to manage the on-chip firmware. r218423: - Added systcls for header splitting, RX/TX buffer count, interrupt coalescing, strict RX MTU, verbose output, and shared memory debug. - Added additional debug counters (VLAN tags and split header frames). - Updated debug counters to 64 bit definitions. - Updated l2fhdr bit definitions. - Combined RX buffer sizing into a single function. - Added buffer size and interrupt coalescing settings to adapter info printout. r218527: - Added error checking to nvram read functions. - Minor style updates. Modified: stable/8/sys/conf/options stable/8/sys/dev/bce/if_bce.c stable/8/sys/dev/bce/if_bcereg.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/conf/options ============================================================================== --- stable/8/sys/conf/options Mon Jan 9 15:56:33 2012 (r229858) +++ stable/8/sys/conf/options Mon Jan 9 18:32:45 2012 (r229859) @@ -695,6 +695,7 @@ ED_SIC opt_ed.h # bce driver BCE_DEBUG opt_bce.h +BCE_NVRAM_WRITE_SUPPORT opt_bce.h SOCKBUF_DEBUG opt_global.h Modified: stable/8/sys/dev/bce/if_bce.c ============================================================================== --- stable/8/sys/dev/bce/if_bce.c Mon Jan 9 15:56:33 2012 (r229858) +++ stable/8/sys/dev/bce/if_bce.c Mon Jan 9 18:32:45 2012 (r229859) @@ -89,12 +89,6 @@ __FBSDID("$FreeBSD$"); #endif /****************************************************************************/ -/* BCE Build Time Options */ -/****************************************************************************/ -/* #define BCE_NVRAM_WRITE_SUPPORT 1 */ - - -/****************************************************************************/ /* PCI Device ID Table */ /* */ /* Used by bce_probe() to identify the devices supported by this driver. */ @@ -287,48 +281,43 @@ static int bce_shutdown (device_t); /* BCE Debug Data Structure Dump Routines */ /****************************************************************************/ #ifdef BCE_DEBUG -static u32 bce_reg_rd (struct bce_softc *, u32); -static void bce_reg_wr (struct bce_softc *, u32, u32); -static void bce_reg_wr16 (struct bce_softc *, u32, u16); -static u32 bce_ctx_rd (struct bce_softc *, u32, u32); -static void bce_dump_enet (struct bce_softc *, struct mbuf *); -static void bce_dump_mbuf (struct bce_softc *, struct mbuf *); +static u32 bce_reg_rd (struct bce_softc *, u32); +static void bce_reg_wr (struct bce_softc *, u32, u32); +static void bce_reg_wr16 (struct bce_softc *, u32, u16); +static u32 bce_ctx_rd (struct bce_softc *, u32, u32); +static void bce_dump_enet (struct bce_softc *, struct mbuf *); +static void bce_dump_mbuf (struct bce_softc *, struct mbuf *); static void bce_dump_tx_mbuf_chain (struct bce_softc *, u16, int); static void bce_dump_rx_mbuf_chain (struct bce_softc *, u16, int); -#ifdef BCE_JUMBO_HDRSPLIT static void bce_dump_pg_mbuf_chain (struct bce_softc *, u16, int); -#endif -static void bce_dump_txbd (struct bce_softc *, +static void bce_dump_txbd (struct bce_softc *, int, struct tx_bd *); -static void bce_dump_rxbd (struct bce_softc *, +static void bce_dump_rxbd (struct bce_softc *, int, struct rx_bd *); -#ifdef BCE_JUMBO_HDRSPLIT -static void bce_dump_pgbd (struct bce_softc *, +static void bce_dump_pgbd (struct bce_softc *, int, struct rx_bd *); -#endif static void bce_dump_l2fhdr (struct bce_softc *, int, struct l2_fhdr *); -static void bce_dump_ctx (struct bce_softc *, u16); -static void bce_dump_ftqs (struct bce_softc *); +static void bce_dump_ctx (struct bce_softc *, u16); +static void bce_dump_ftqs (struct bce_softc *); static void bce_dump_tx_chain (struct bce_softc *, u16, int); static void bce_dump_rx_bd_chain (struct bce_softc *, u16, int); -#ifdef BCE_JUMBO_HDRSPLIT static void bce_dump_pg_chain (struct bce_softc *, u16, int); -#endif static void bce_dump_status_block (struct bce_softc *); static void bce_dump_stats_block (struct bce_softc *); static void bce_dump_driver_state (struct bce_softc *); static void bce_dump_hw_state (struct bce_softc *); +static void bce_dump_shmem_state (struct bce_softc *); static void bce_dump_mq_regs (struct bce_softc *); static void bce_dump_bc_state (struct bce_softc *); static void bce_dump_txp_state (struct bce_softc *, int); static void bce_dump_rxp_state (struct bce_softc *, int); -static void bce_dump_tpat_state (struct bce_softc *, int); +static void bce_dump_tpat_state (struct bce_softc *, int); static void bce_dump_cp_state (struct bce_softc *, int); static void bce_dump_com_state (struct bce_softc *, int); -static void bce_dump_rv2p_state (struct bce_softc *); -static void bce_breakpoint (struct bce_softc *); -#endif +static void bce_dump_rv2p_state (struct bce_softc *); +static void bce_breakpoint (struct bce_softc *); +#endif /*BCE_DEBUG */ /****************************************************************************/ @@ -343,21 +332,27 @@ static int bce_miibus_read_reg (device static int bce_miibus_write_reg (device_t, int, int, int); static void bce_miibus_statchg (device_t); +#ifdef BCE_DEBUG +static int bce_sysctl_nvram_dump(SYSCTL_HANDLER_ARGS); +#ifdef BCE_NVRAM_WRITE_SUPPORT +static int bce_sysctl_nvram_write(SYSCTL_HANDLER_ARGS); +#endif +#endif /****************************************************************************/ /* BCE NVRAM Access Routines */ /****************************************************************************/ static int bce_acquire_nvram_lock (struct bce_softc *); static int bce_release_nvram_lock (struct bce_softc *); -static void bce_enable_nvram_access (struct bce_softc *); -static void bce_disable_nvram_access (struct bce_softc *); +static void bce_enable_nvram_access(struct bce_softc *); +static void bce_disable_nvram_access(struct bce_softc *); static int bce_nvram_read_dword (struct bce_softc *, u32, u8 *, u32); -static int bce_init_nvram (struct bce_softc *); -static int bce_nvram_read (struct bce_softc *, u32, u8 *, int); -static int bce_nvram_test (struct bce_softc *); +static int bce_init_nvram (struct bce_softc *); +static int bce_nvram_read (struct bce_softc *, u32, u8 *, int); +static int bce_nvram_test (struct bce_softc *); #ifdef BCE_NVRAM_WRITE_SUPPORT static int bce_enable_nvram_write (struct bce_softc *); -static void bce_disable_nvram_write (struct bce_softc *); +static void bce_disable_nvram_write(struct bce_softc *); static int bce_nvram_erase_page (struct bce_softc *, u32); static int bce_nvram_write_dword (struct bce_softc *, u32, u8 *, u32); static int bce_nvram_write (struct bce_softc *, u32, u8 *, int); @@ -366,12 +361,12 @@ static int bce_nvram_write (struct bce /****************************************************************************/ /* */ /****************************************************************************/ -static void bce_get_media (struct bce_softc *); -static void bce_init_media (struct bce_softc *); -static void bce_dma_map_addr (void *, - bus_dma_segment_t *, int, int); -static int bce_dma_alloc (device_t); -static void bce_dma_free (struct bce_softc *); +static void bce_get_rx_buffer_sizes(struct bce_softc *, int); +static void bce_get_media (struct bce_softc *); +static void bce_init_media (struct bce_softc *); +static void bce_dma_map_addr (void *, bus_dma_segment_t *, int, int); +static int bce_dma_alloc (device_t); +static void bce_dma_free (struct bce_softc *); static void bce_release_resources (struct bce_softc *); /****************************************************************************/ @@ -381,69 +376,67 @@ static int bce_fw_sync (struct bce_so static void bce_load_rv2p_fw (struct bce_softc *, u32 *, u32, u32); static void bce_load_cpu_fw (struct bce_softc *, struct cpu_reg *, struct fw_info *); -static void bce_start_cpu (struct bce_softc *, struct cpu_reg *); -static void bce_halt_cpu (struct bce_softc *, struct cpu_reg *); +static void bce_start_cpu (struct bce_softc *, struct cpu_reg *); +static void bce_halt_cpu (struct bce_softc *, struct cpu_reg *); static void bce_start_rxp_cpu (struct bce_softc *); static void bce_init_rxp_cpu (struct bce_softc *); static void bce_init_txp_cpu (struct bce_softc *); static void bce_init_tpat_cpu (struct bce_softc *); static void bce_init_cp_cpu (struct bce_softc *); static void bce_init_com_cpu (struct bce_softc *); -static void bce_init_cpus (struct bce_softc *); +static void bce_init_cpus (struct bce_softc *); -static void bce_print_adapter_info (struct bce_softc *); +static void bce_print_adapter_info (struct bce_softc *); static void bce_probe_pci_caps (device_t, struct bce_softc *); -static void bce_stop (struct bce_softc *); -static int bce_reset (struct bce_softc *, u32); -static int bce_chipinit (struct bce_softc *); -static int bce_blockinit (struct bce_softc *); +static void bce_stop (struct bce_softc *); +static int bce_reset (struct bce_softc *, u32); +static int bce_chipinit (struct bce_softc *); +static int bce_blockinit (struct bce_softc *); static int bce_init_tx_chain (struct bce_softc *); static void bce_free_tx_chain (struct bce_softc *); -static int bce_get_rx_buf (struct bce_softc *, +static int bce_get_rx_buf (struct bce_softc *, struct mbuf *, u16 *, u16 *, u32 *); static int bce_init_rx_chain (struct bce_softc *); static void bce_fill_rx_chain (struct bce_softc *); static void bce_free_rx_chain (struct bce_softc *); -#ifdef BCE_JUMBO_HDRSPLIT -static int bce_get_pg_buf (struct bce_softc *, +static int bce_get_pg_buf (struct bce_softc *, struct mbuf *, u16 *, u16 *); static int bce_init_pg_chain (struct bce_softc *); static void bce_fill_pg_chain (struct bce_softc *); static void bce_free_pg_chain (struct bce_softc *); -#endif static struct mbuf *bce_tso_setup (struct bce_softc *, struct mbuf **, u16 *); -static int bce_tx_encap (struct bce_softc *, struct mbuf **); +static int bce_tx_encap (struct bce_softc *, struct mbuf **); static void bce_start_locked (struct ifnet *); -static void bce_start (struct ifnet *); -static int bce_ioctl (struct ifnet *, u_long, caddr_t); -static void bce_watchdog (struct bce_softc *); +static void bce_start (struct ifnet *); +static int bce_ioctl (struct ifnet *, u_long, caddr_t); +static void bce_watchdog (struct bce_softc *); static int bce_ifmedia_upd (struct ifnet *); static int bce_ifmedia_upd_locked (struct ifnet *); static void bce_ifmedia_sts (struct ifnet *, struct ifmediareq *); static void bce_init_locked (struct bce_softc *); -static void bce_init (void *); +static void bce_init (void *); static void bce_mgmt_init_locked (struct bce_softc *sc); -static int bce_init_ctx (struct bce_softc *); +static int bce_init_ctx (struct bce_softc *); static void bce_get_mac_addr (struct bce_softc *); static void bce_set_mac_addr (struct bce_softc *); -static void bce_phy_intr (struct bce_softc *); +static void bce_phy_intr (struct bce_softc *); static inline u16 bce_get_hw_rx_cons (struct bce_softc *); static void bce_rx_intr (struct bce_softc *); static void bce_tx_intr (struct bce_softc *); static void bce_disable_intr (struct bce_softc *); static void bce_enable_intr (struct bce_softc *, int); -static void bce_intr (void *); +static void bce_intr (void *); static void bce_set_rx_mode (struct bce_softc *); static void bce_stats_update (struct bce_softc *); -static void bce_tick (void *); -static void bce_pulse (void *); +static void bce_tick (void *); +static void bce_pulse (void *); static void bce_add_sysctls (struct bce_softc *); @@ -499,23 +492,148 @@ DRIVER_MODULE(miibus, bce, miibus_driver SYSCTL_NODE(_hw, OID_AUTO, bce, CTLFLAG_RD, 0, "bce driver parameters"); /* Allowable values are TRUE or FALSE */ +static int bce_verbose = TRUE; +TUNABLE_INT("hw.bce.verbose", &bce_verbose); +SYSCTL_INT(_hw_bce, OID_AUTO, verbose, CTLFLAG_RDTUN, &bce_verbose, 0, + "Verbose output enable/disable"); + +/* Allowable values are TRUE or FALSE */ static int bce_tso_enable = TRUE; TUNABLE_INT("hw.bce.tso_enable", &bce_tso_enable); SYSCTL_UINT(_hw_bce, OID_AUTO, tso_enable, CTLFLAG_RDTUN, &bce_tso_enable, 0, -"TSO Enable/Disable"); + "TSO Enable/Disable"); /* Allowable values are 0 (IRQ), 1 (MSI/IRQ), and 2 (MSI-X/MSI/IRQ) */ /* ToDo: Add MSI-X support. */ static int bce_msi_enable = 1; TUNABLE_INT("hw.bce.msi_enable", &bce_msi_enable); SYSCTL_UINT(_hw_bce, OID_AUTO, msi_enable, CTLFLAG_RDTUN, &bce_msi_enable, 0, -"MSI-X|MSI|INTx selector"); + "MSI-X|MSI|INTx selector"); + +/* Allowable values are 1, 2, 4, 8. */ +static int bce_rx_pages = DEFAULT_RX_PAGES; +TUNABLE_INT("hw.bce.rx_pages", &bce_rx_pages); +SYSCTL_UINT(_hw_bce, OID_AUTO, rx_pages, CTLFLAG_RDTUN, &bce_rx_pages, 0, + "Receive buffer descriptor pages (1 page = 255 buffer descriptors)"); + +/* Allowable values are 1, 2, 4, 8. */ +static int bce_tx_pages = DEFAULT_TX_PAGES; +TUNABLE_INT("hw.bce.tx_pages", &bce_tx_pages); +SYSCTL_UINT(_hw_bce, OID_AUTO, tx_pages, CTLFLAG_RDTUN, &bce_tx_pages, 0, + "Transmit buffer descriptor pages (1 page = 255 buffer descriptors)"); + +/* Allowable values are TRUE or FALSE. */ +static int bce_hdr_split = TRUE; +TUNABLE_INT("hw.bce.hdr_split", &bce_hdr_split); +SYSCTL_UINT(_hw_bce, OID_AUTO, hdr_split, CTLFLAG_RDTUN, &bce_hdr_split, 0, + "Frame header/payload splitting Enable/Disable"); + +/* Allowable values are TRUE or FALSE. */ +static int bce_strict_rx_mtu = FALSE; +TUNABLE_INT("hw.bce.strict_rx_mtu", &bce_strict_rx_mtu); +SYSCTL_UINT(_hw_bce, OID_AUTO, loose_rx_mtu, CTLFLAG_RDTUN, + &bce_strict_rx_mtu, 0, + "Enable/Disable strict RX frame size checking"); -/* ToDo: Add tunable to enable/disable strict MTU handling. */ -/* Currently allows "loose" RX MTU checking (i.e. sets the */ -/* H/W RX MTU to the size of the largest receive buffer, or */ -/* 2048 bytes). This will cause a UNH failure but is more */ -/* desireable from a functional perspective. */ +/* Allowable values are 0 ... 100 */ +#ifdef BCE_DEBUG +/* Generate 1 interrupt for every transmit completion. */ +static int bce_tx_quick_cons_trip_int = 1; +#else +/* Generate 1 interrupt for every 20 transmit completions. */ +static int bce_tx_quick_cons_trip_int = DEFAULT_TX_QUICK_CONS_TRIP_INT; +#endif +TUNABLE_INT("hw.bce.tx_quick_cons_trip_int", &bce_tx_quick_cons_trip_int); +SYSCTL_UINT(_hw_bce, OID_AUTO, tx_quick_cons_trip_int, CTLFLAG_RDTUN, + &bce_tx_quick_cons_trip_int, 0, + "Transmit BD trip point during interrupts"); + +/* Allowable values are 0 ... 100 */ +/* Generate 1 interrupt for every transmit completion. */ +#ifdef BCE_DEBUG +static int bce_tx_quick_cons_trip = 1; +#else +/* Generate 1 interrupt for every 20 transmit completions. */ +static int bce_tx_quick_cons_trip = DEFAULT_TX_QUICK_CONS_TRIP; +#endif +TUNABLE_INT("hw.bce.tx_quick_cons_trip", &bce_tx_quick_cons_trip); +SYSCTL_UINT(_hw_bce, OID_AUTO, tx_quick_cons_trip, CTLFLAG_RDTUN, + &bce_tx_quick_cons_trip, 0, + "Transmit BD trip point"); + +/* Allowable values are 0 ... 100 */ +#ifdef BCE_DEBUG +/* Generate an interrupt if 0us have elapsed since the last TX completion. */ +static int bce_tx_ticks_int = 0; +#else +/* Generate an interrupt if 80us have elapsed since the last TX completion. */ +static int bce_tx_ticks_int = DEFAULT_TX_TICKS_INT; +#endif +TUNABLE_INT("hw.bce.tx_ticks_int", &bce_tx_ticks_int); +SYSCTL_UINT(_hw_bce, OID_AUTO, tx_ticks_int, CTLFLAG_RDTUN, + &bce_tx_ticks_int, 0, "Transmit ticks count during interrupt"); + +/* Allowable values are 0 ... 100 */ +#ifdef BCE_DEBUG +/* Generate an interrupt if 0us have elapsed since the last TX completion. */ +static int bce_tx_ticks = 0; +#else +/* Generate an interrupt if 80us have elapsed since the last TX completion. */ +static int bce_tx_ticks = DEFAULT_TX_TICKS; +#endif +TUNABLE_INT("hw.bce.tx_ticks", &bce_tx_ticks); +SYSCTL_UINT(_hw_bce, OID_AUTO, tx_ticks, CTLFLAG_RDTUN, + &bce_tx_ticks, 0, "Transmit ticks count"); + +/* Allowable values are 1 ... 100 */ +#ifdef BCE_DEBUG +/* Generate 1 interrupt for every received frame. */ +static int bce_rx_quick_cons_trip_int = 1; +#else +/* Generate 1 interrupt for every 6 received frames. */ +static int bce_rx_quick_cons_trip_int = DEFAULT_RX_QUICK_CONS_TRIP_INT; +#endif +TUNABLE_INT("hw.bce.rx_quick_cons_trip_int", &bce_rx_quick_cons_trip_int); +SYSCTL_UINT(_hw_bce, OID_AUTO, rx_quick_cons_trip_int, CTLFLAG_RDTUN, + &bce_rx_quick_cons_trip_int, 0, + "Receive BD trip point duirng interrupts"); + +/* Allowable values are 1 ... 100 */ +#ifdef BCE_DEBUG +/* Generate 1 interrupt for every received frame. */ +static int bce_rx_quick_cons_trip = 1; +#else +/* Generate 1 interrupt for every 6 received frames. */ +static int bce_rx_quick_cons_trip = DEFAULT_RX_QUICK_CONS_TRIP; +#endif +TUNABLE_INT("hw.bce.rx_quick_cons_trip", &bce_rx_quick_cons_trip); +SYSCTL_UINT(_hw_bce, OID_AUTO, rx_quick_cons_trip, CTLFLAG_RDTUN, + &bce_rx_quick_cons_trip, 0, + "Receive BD trip point"); + +/* Allowable values are 0 ... 100 */ +#ifdef BCE_DEBUG +/* Generate an int. if 0us have elapsed since the last received frame. */ +static int bce_rx_ticks_int = 0; +#else +/* Generate an int. if 18us have elapsed since the last received frame. */ +static int bce_rx_ticks_int = DEFAULT_RX_TICKS_INT; +#endif +TUNABLE_INT("hw.bce.rx_ticks_int", &bce_rx_ticks_int); +SYSCTL_UINT(_hw_bce, OID_AUTO, rx_ticks_int, CTLFLAG_RDTUN, + &bce_rx_ticks_int, 0, "Receive ticks count during interrupt"); + +/* Allowable values are 0 ... 100 */ +#ifdef BCE_DEBUG +/* Generate an int. if 0us have elapsed since the last received frame. */ +static int bce_rx_ticks = 0; +#else +/* Generate an int. if 18us have elapsed since the last received frame. */ +static int bce_rx_ticks = DEFAULT_RX_TICKS; +#endif +TUNABLE_INT("hw.bce.rx_ticks", &bce_rx_ticks); +SYSCTL_UINT(_hw_bce, OID_AUTO, rx_ticks, CTLFLAG_RDTUN, + &bce_rx_ticks, 0, "Receive ticks count"); /****************************************************************************/ @@ -597,7 +715,7 @@ bce_print_adapter_info(struct bce_softc DBENTER(BCE_VERBOSE_LOAD); - if (bootverbose) { + if (bce_verbose || bootverbose) { BCE_PRINTF("ASIC (0x%08X); ", sc->bce_chipid); printf("Rev (%c%d); ", ((BCE_CHIP_ID(sc) & 0xf000) >> 12) + 'A', ((BCE_CHIP_ID(sc) & 0x0ff0) >> 4)); @@ -619,12 +737,14 @@ bce_print_adapter_info(struct bce_softc } /* Firmware version and device features. */ - printf("B/C (%s); Flags (", sc->bce_bc_ver); + printf("B/C (%s); Bufs (RX:%d;TX:%d;PG:%d); Flags (", + sc->bce_bc_ver, sc->rx_pages, sc->tx_pages, + (bce_hdr_split == TRUE ? sc->pg_pages: 0)); - #ifdef BCE_JUMBO_HDRSPLIT - printf("SPLT"); - i++; - #endif + if (bce_hdr_split == TRUE) { + printf("SPLT"); + i++; + } if (sc->bce_flags & BCE_USING_MSI_FLAG) { if (i > 0) printf("|"); @@ -647,6 +767,17 @@ bce_print_adapter_info(struct bce_softc } else { printf(")\n"); } + + printf("Coal (RX:%d,%d,%d,%d; TX:%d,%d,%d,%d)\n", + sc->bce_rx_quick_cons_trip_int, + sc->bce_rx_quick_cons_trip, + sc->bce_rx_ticks_int, + sc->bce_rx_ticks, + sc->bce_tx_quick_cons_trip_int, + sc->bce_tx_quick_cons_trip, + sc->bce_tx_ticks_int, + sc->bce_tx_ticks); + } DBEXIT(BCE_VERBOSE_LOAD); @@ -705,6 +836,189 @@ bce_probe_pci_caps(device_t dev, struct /****************************************************************************/ +/* Load and validate user tunable settings. */ +/* */ +/* Returns: */ +/* Nothing. */ +/****************************************************************************/ +static void +bce_set_tunables(struct bce_softc *sc) +{ + /* Set sysctl values for RX page count. */ + switch (bce_rx_pages) { + case 1: + /* fall-through */ + case 2: + /* fall-through */ + case 4: + /* fall-through */ + case 8: + sc->rx_pages = bce_rx_pages; + break; + default: + sc->rx_pages = DEFAULT_RX_PAGES; + BCE_PRINTF("%s(%d): Illegal value (%d) specified for " + "hw.bce.rx_pages! Setting default of %d.\n", + __FILE__, __LINE__, bce_rx_pages, DEFAULT_RX_PAGES); + } + + /* ToDo: Consider allowing user setting for pg_pages. */ + sc->pg_pages = min((sc->rx_pages * 4), MAX_PG_PAGES); + + /* Set sysctl values for TX page count. */ + switch (bce_tx_pages) { + case 1: + /* fall-through */ + case 2: + /* fall-through */ + case 4: + /* fall-through */ + case 8: + sc->tx_pages = bce_tx_pages; + break; + default: + sc->tx_pages = DEFAULT_TX_PAGES; + BCE_PRINTF("%s(%d): Illegal value (%d) specified for " + "hw.bce.tx_pages! Setting default of %d.\n", + __FILE__, __LINE__, bce_tx_pages, DEFAULT_TX_PAGES); + } + + /* + * Validate the TX trip point (i.e. the number of + * TX completions before a status block update is + * generated and an interrupt is asserted. + */ + if (bce_tx_quick_cons_trip_int <= 100) { + sc->bce_tx_quick_cons_trip_int = + bce_tx_quick_cons_trip_int; + } else { + BCE_PRINTF("%s(%d): Illegal value (%d) specified for " + "hw.bce.tx_quick_cons_trip_int! Setting default of %d.\n", + __FILE__, __LINE__, bce_tx_quick_cons_trip_int, + DEFAULT_TX_QUICK_CONS_TRIP_INT); + sc->bce_tx_quick_cons_trip_int = + DEFAULT_TX_QUICK_CONS_TRIP_INT; + } + + if (bce_tx_quick_cons_trip <= 100) { + sc->bce_tx_quick_cons_trip = + bce_tx_quick_cons_trip; + } else { + BCE_PRINTF("%s(%d): Illegal value (%d) specified for " + "hw.bce.tx_quick_cons_trip! Setting default of %d.\n", + __FILE__, __LINE__, bce_tx_quick_cons_trip, + DEFAULT_TX_QUICK_CONS_TRIP); + sc->bce_tx_quick_cons_trip = + DEFAULT_TX_QUICK_CONS_TRIP; + } + + /* + * Validate the TX ticks count (i.e. the maximum amount + * of time to wait after the last TX completion has + * occurred before a status block update is generated + * and an interrupt is asserted. + */ + if (bce_tx_ticks_int <= 100) { + sc->bce_tx_ticks_int = + bce_tx_ticks_int; + } else { + BCE_PRINTF("%s(%d): Illegal value (%d) specified for " + "hw.bce.tx_ticks_int! Setting default of %d.\n", + __FILE__, __LINE__, bce_tx_ticks_int, + DEFAULT_TX_TICKS_INT); + sc->bce_tx_ticks_int = + DEFAULT_TX_TICKS_INT; + } + + if (bce_tx_ticks <= 100) { + sc->bce_tx_ticks = + bce_tx_ticks; + } else { + BCE_PRINTF("%s(%d): Illegal value (%d) specified for " + "hw.bce.tx_ticks! Setting default of %d.\n", + __FILE__, __LINE__, bce_tx_ticks, + DEFAULT_TX_TICKS); + sc->bce_tx_ticks = + DEFAULT_TX_TICKS; + } + + /* + * Validate the RX trip point (i.e. the number of + * RX frames received before a status block update is + * generated and an interrupt is asserted. + */ + if (bce_rx_quick_cons_trip_int <= 100) { + sc->bce_rx_quick_cons_trip_int = + bce_rx_quick_cons_trip_int; + } else { + BCE_PRINTF("%s(%d): Illegal value (%d) specified for " + "hw.bce.rx_quick_cons_trip_int! Setting default of %d.\n", + __FILE__, __LINE__, bce_rx_quick_cons_trip_int, + DEFAULT_RX_QUICK_CONS_TRIP_INT); + sc->bce_rx_quick_cons_trip_int = + DEFAULT_RX_QUICK_CONS_TRIP_INT; + } + + if (bce_rx_quick_cons_trip <= 100) { + sc->bce_rx_quick_cons_trip = + bce_rx_quick_cons_trip; + } else { + BCE_PRINTF("%s(%d): Illegal value (%d) specified for " + "hw.bce.rx_quick_cons_trip! Setting default of %d.\n", + __FILE__, __LINE__, bce_rx_quick_cons_trip, + DEFAULT_RX_QUICK_CONS_TRIP); + sc->bce_rx_quick_cons_trip = + DEFAULT_RX_QUICK_CONS_TRIP; + } + + /* + * Validate the RX ticks count (i.e. the maximum amount + * of time to wait after the last RX frame has been + * received before a status block update is generated + * and an interrupt is asserted. + */ + if (bce_rx_ticks_int <= 100) { + sc->bce_rx_ticks_int = bce_rx_ticks_int; + } else { + BCE_PRINTF("%s(%d): Illegal value (%d) specified for " + "hw.bce.rx_ticks_int! Setting default of %d.\n", + __FILE__, __LINE__, bce_rx_ticks_int, + DEFAULT_RX_TICKS_INT); + sc->bce_rx_ticks_int = DEFAULT_RX_TICKS_INT; + } + + if (bce_rx_ticks <= 100) { + sc->bce_rx_ticks = bce_rx_ticks; + } else { + BCE_PRINTF("%s(%d): Illegal value (%d) specified for " + "hw.bce.rx_ticks! Setting default of %d.\n", + __FILE__, __LINE__, bce_rx_ticks, + DEFAULT_RX_TICKS); + sc->bce_rx_ticks = DEFAULT_RX_TICKS; + } + + /* Disabling both RX ticks and RX trips will prevent interrupts. */ + if ((bce_rx_quick_cons_trip == 0) && (bce_rx_ticks == 0)) { + BCE_PRINTF("%s(%d): Cannot set both hw.bce.rx_ticks and " + "hw.bce.rx_quick_cons_trip to 0. Setting default values.\n", + __FILE__, __LINE__); + sc->bce_rx_ticks = DEFAULT_RX_TICKS; + sc->bce_rx_quick_cons_trip = DEFAULT_RX_QUICK_CONS_TRIP; + } + + /* Disabling both TX ticks and TX trips will prevent interrupts. */ + if ((bce_tx_quick_cons_trip == 0) && (bce_tx_ticks == 0)) { + BCE_PRINTF("%s(%d): Cannot set both hw.bce.tx_ticks and " + "hw.bce.tx_quick_cons_trip to 0. Setting default values.\n", + __FILE__, __LINE__); + sc->bce_tx_ticks = DEFAULT_TX_TICKS; + sc->bce_tx_quick_cons_trip = DEFAULT_TX_QUICK_CONS_TRIP; + } + +} + + +/****************************************************************************/ /* Device attach function. */ /* */ /* Allocates device resources, performs secondary chip identification, */ @@ -733,6 +1047,8 @@ bce_attach(device_t dev) sc->bce_flags = 0; sc->bce_phy_flags = 0; + bce_set_tunables(sc); + pci_enable_busmaster(dev); /* Allocate PCI memory resources. */ @@ -1021,37 +1337,13 @@ bce_attach(device_t dev) * values for the RX and TX chains. */ -#ifdef BCE_DEBUG - /* Force more frequent interrupts. */ - sc->bce_tx_quick_cons_trip_int = 1; - sc->bce_tx_quick_cons_trip = 1; - sc->bce_tx_ticks_int = 0; - sc->bce_tx_ticks = 0; - - sc->bce_rx_quick_cons_trip_int = 1; - sc->bce_rx_quick_cons_trip = 1; - sc->bce_rx_ticks_int = 0; - sc->bce_rx_ticks = 0; -#else - /* Improve throughput at the expense of increased latency. */ - sc->bce_tx_quick_cons_trip_int = 20; - sc->bce_tx_quick_cons_trip = 20; - sc->bce_tx_ticks_int = 80; - sc->bce_tx_ticks = 80; - - sc->bce_rx_quick_cons_trip_int = 6; - sc->bce_rx_quick_cons_trip = 6; - sc->bce_rx_ticks_int = 18; - sc->bce_rx_ticks = 18; -#endif - /* Not used for L2. */ - sc->bce_comp_prod_trip_int = 0; - sc->bce_comp_prod_trip = 0; - sc->bce_com_ticks_int = 0; - sc->bce_com_ticks = 0; - sc->bce_cmd_ticks_int = 0; - sc->bce_cmd_ticks = 0; + sc->bce_comp_prod_trip_int = 0; + sc->bce_comp_prod_trip = 0; + sc->bce_com_ticks_int = 0; + sc->bce_com_ticks = 0; + sc->bce_cmd_ticks_int = 0; + sc->bce_cmd_ticks = 0; /* Update statistics once every second. */ sc->bce_stats_ticks = 1000000 & 0xffff00; @@ -1105,23 +1397,11 @@ bce_attach(device_t dev) * This may change later if the MTU size is set to * something other than 1500. */ -#ifdef BCE_JUMBO_HDRSPLIT - sc->rx_bd_mbuf_alloc_size = MHLEN; - /* Make sure offset is 16 byte aligned for hardware. */ - sc->rx_bd_mbuf_align_pad = - roundup2((MSIZE - MHLEN), 16) - (MSIZE - MHLEN); - sc->rx_bd_mbuf_data_len = sc->rx_bd_mbuf_alloc_size - - sc->rx_bd_mbuf_align_pad; - sc->pg_bd_mbuf_alloc_size = MCLBYTES; -#else - sc->rx_bd_mbuf_alloc_size = MCLBYTES; - sc->rx_bd_mbuf_align_pad = - roundup2(MCLBYTES, 16) - MCLBYTES; - sc->rx_bd_mbuf_data_len = sc->rx_bd_mbuf_alloc_size - - sc->rx_bd_mbuf_align_pad; -#endif + bce_get_rx_buffer_sizes(sc, + (ETHER_MAX_LEN - ETHER_HDR_LEN - ETHER_CRC_LEN)); - ifp->if_snd.ifq_drv_maxlen = USABLE_TX_BD; + /* Recalculate our buffer allocation sizes. */ + ifp->if_snd.ifq_drv_maxlen = USABLE_TX_BD_ALLOC; IFQ_SET_MAXLEN(&ifp->if_snd, ifp->if_snd.ifq_drv_maxlen); IFQ_SET_READY(&ifp->if_snd); @@ -2594,9 +2874,9 @@ bce_nvram_write(struct bce_softc *sc, u3 goto bce_nvram_write_exit; bce_nvram_write_locked_exit: - bce_disable_nvram_write(sc); - bce_disable_nvram_access(sc); - bce_release_nvram_lock(sc); + bce_disable_nvram_write(sc); + bce_disable_nvram_access(sc); + bce_release_nvram_lock(sc); bce_nvram_write_exit: if (align_start || align_end) @@ -2641,7 +2921,7 @@ bce_nvram_test(struct bce_softc *sc) * Verify that offset 0 of the NVRAM contains * a valid magic number. */ - magic = bce_be32toh(buf[0]); + magic = bce_be32toh(buf[0]); if (magic != BCE_NVRAM_MAGIC) { rc = ENODEV; BCE_PRINTF("%s(%d): Invalid NVRAM magic value! " @@ -2685,6 +2965,58 @@ bce_nvram_test_exit: /****************************************************************************/ +/* Calculates the size of the buffers to allocate based on the MTU. */ +/* */ +/* Returns: */ +/* Nothing. */ +/****************************************************************************/ +static void +bce_get_rx_buffer_sizes(struct bce_softc *sc, int mtu) +{ + DBENTER(BCE_VERBOSE_LOAD); + + /* Use a single allocation type when header splitting enabled. */ + if (bce_hdr_split == TRUE) { + sc->rx_bd_mbuf_alloc_size = MHLEN; + /* Make sure offset is 16 byte aligned for hardware. */ + sc->rx_bd_mbuf_align_pad = + roundup2((MSIZE - MHLEN), 16) - (MSIZE - MHLEN); + sc->rx_bd_mbuf_data_len = sc->rx_bd_mbuf_alloc_size - + sc->rx_bd_mbuf_align_pad; + sc->pg_bd_mbuf_alloc_size = MCLBYTES; + } else { + if ((mtu + ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN + + ETHER_CRC_LEN) > MCLBYTES) { + /* Setup for jumbo RX buffer allocations. */ + sc->rx_bd_mbuf_alloc_size = MJUM9BYTES; + sc->rx_bd_mbuf_align_pad = + roundup2(MJUM9BYTES, 16) - MJUM9BYTES; + sc->rx_bd_mbuf_data_len = + sc->rx_bd_mbuf_alloc_size - + sc->rx_bd_mbuf_align_pad; + } else { + /* Setup for standard RX buffer allocations. */ + sc->rx_bd_mbuf_alloc_size = MCLBYTES; + sc->rx_bd_mbuf_align_pad = + roundup2(MCLBYTES, 16) - MCLBYTES; + sc->rx_bd_mbuf_data_len = + sc->rx_bd_mbuf_alloc_size - + sc->rx_bd_mbuf_align_pad; + } + } + +// DBPRINT(sc, BCE_INFO_LOAD, + DBPRINT(sc, BCE_WARN, + "%s(): rx_bd_mbuf_alloc_size = %d, rx_bd_mbuf_data_len = %d, " + "rx_bd_mbuf_align_pad = %d\n", __FUNCTION__, + sc->rx_bd_mbuf_alloc_size, sc->rx_bd_mbuf_data_len, + sc->rx_bd_mbuf_align_pad); + + DBEXIT(BCE_VERBOSE_LOAD); + +} + +/****************************************************************************/ /* Identifies the current media type of the controller and sets the PHY */ /* address. */ /* */ @@ -2918,7 +3250,7 @@ bce_dma_free(struct bce_softc *sc) /* Free, unmap and destroy all TX buffer descriptor chain pages. */ - for (i = 0; i < TX_PAGES; i++ ) { + for (i = 0; i < sc->tx_pages; i++ ) { if (sc->tx_bd_chain[i] != NULL) { bus_dmamem_free( sc->tx_bd_chain_tag, @@ -2946,7 +3278,7 @@ bce_dma_free(struct bce_softc *sc) /* Free, unmap and destroy all RX buffer descriptor chain pages. */ - for (i = 0; i < RX_PAGES; i++ ) { + for (i = 0; i < sc->rx_pages; i++ ) { if (sc->rx_bd_chain[i] != NULL) { bus_dmamem_free( sc->rx_bd_chain_tag, @@ -2973,38 +3305,38 @@ bce_dma_free(struct bce_softc *sc) } -#ifdef BCE_JUMBO_HDRSPLIT /* Free, unmap and destroy all page buffer descriptor chain pages. */ - for (i = 0; i < PG_PAGES; i++ ) { - if (sc->pg_bd_chain[i] != NULL) { - bus_dmamem_free( - sc->pg_bd_chain_tag, - sc->pg_bd_chain[i], - sc->pg_bd_chain_map[i]); - sc->pg_bd_chain[i] = NULL; - } + if (bce_hdr_split == TRUE) { + for (i = 0; i < sc->pg_pages; i++ ) { + if (sc->pg_bd_chain[i] != NULL) { + bus_dmamem_free( + sc->pg_bd_chain_tag, + sc->pg_bd_chain[i], + sc->pg_bd_chain_map[i]); + sc->pg_bd_chain[i] = NULL; + } - if (sc->pg_bd_chain_map[i] != NULL) { - bus_dmamap_unload( - sc->pg_bd_chain_tag, - sc->pg_bd_chain_map[i]); - bus_dmamap_destroy( - sc->pg_bd_chain_tag, - sc->pg_bd_chain_map[i]); - sc->pg_bd_chain_map[i] = NULL; + if (sc->pg_bd_chain_map[i] != NULL) { + bus_dmamap_unload( + sc->pg_bd_chain_tag, + sc->pg_bd_chain_map[i]); + bus_dmamap_destroy( + sc->pg_bd_chain_tag, + sc->pg_bd_chain_map[i]); + sc->pg_bd_chain_map[i] = NULL; + } } - } - /* Destroy the page buffer descriptor tag. */ - if (sc->pg_bd_chain_tag != NULL) { - bus_dma_tag_destroy(sc->pg_bd_chain_tag); - sc->pg_bd_chain_tag = NULL; + /* Destroy the page buffer descriptor tag. */ + if (sc->pg_bd_chain_tag != NULL) { + bus_dma_tag_destroy(sc->pg_bd_chain_tag); + sc->pg_bd_chain_tag = NULL; + } } -#endif /* Unload and destroy the TX mbuf maps. */ - for (i = 0; i < TOTAL_TX_BD; i++) { + for (i = 0; i < MAX_TX_BD_AVAIL; i++) { if (sc->tx_mbuf_map[i] != NULL) { bus_dmamap_unload(sc->tx_mbuf_tag, sc->tx_mbuf_map[i]); @@ -3021,7 +3353,7 @@ bce_dma_free(struct bce_softc *sc) } /* Unload and destroy the RX mbuf maps. */ - for (i = 0; i < TOTAL_RX_BD; i++) { + for (i = 0; i < MAX_RX_BD_AVAIL; i++) { if (sc->rx_mbuf_map[i] != NULL) { bus_dmamap_unload(sc->rx_mbuf_tag, sc->rx_mbuf_map[i]); @@ -3037,24 +3369,24 @@ bce_dma_free(struct bce_softc *sc) sc->rx_mbuf_tag = NULL; } -#ifdef BCE_JUMBO_HDRSPLIT /* Unload and destroy the page mbuf maps. */ - for (i = 0; i < TOTAL_PG_BD; i++) { - if (sc->pg_mbuf_map[i] != NULL) { - bus_dmamap_unload(sc->pg_mbuf_tag, - sc->pg_mbuf_map[i]); - bus_dmamap_destroy(sc->pg_mbuf_tag, - sc->pg_mbuf_map[i]); - sc->pg_mbuf_map[i] = NULL; + if (bce_hdr_split == TRUE) { + for (i = 0; i < MAX_PG_BD_AVAIL; i++) { + if (sc->pg_mbuf_map[i] != NULL) { + bus_dmamap_unload(sc->pg_mbuf_tag, + sc->pg_mbuf_map[i]); + bus_dmamap_destroy(sc->pg_mbuf_tag, + sc->pg_mbuf_map[i]); + sc->pg_mbuf_map[i] = NULL; + } } - } - /* Destroy the page mbuf tag. */ - if (sc->pg_mbuf_tag != NULL) { - bus_dma_tag_destroy(sc->pg_mbuf_tag); - sc->pg_mbuf_tag = NULL; + /* Destroy the page mbuf tag. */ + if (sc->pg_mbuf_tag != NULL) { + bus_dma_tag_destroy(sc->pg_mbuf_tag); + sc->pg_mbuf_tag = NULL; + } } -#endif /* Destroy the parent tag */ if (sc->parent_tag != NULL) { @@ -3296,7 +3628,7 @@ bce_dma_alloc(device_t dev) goto bce_dma_alloc_exit; } - for (i = 0; i < TX_PAGES; i++) { + for (i = 0; i < sc->tx_pages; i++) { if(bus_dmamem_alloc(sc->tx_bd_chain_tag, (void **)&sc->tx_bd_chain[i], @@ -3347,7 +3679,7 @@ bce_dma_alloc(device_t dev) } /* Create DMA maps for the TX mbufs clusters. */ - for (i = 0; i < TOTAL_TX_BD; i++) { + for (i = 0; i < TOTAL_TX_BD_ALLOC; i++) { if (bus_dmamap_create(sc->tx_mbuf_tag, BUS_DMA_NOWAIT, &sc->tx_mbuf_map[i])) { BCE_PRINTF("%s(%d): Unable to create TX mbuf DMA " @@ -3373,7 +3705,7 @@ bce_dma_alloc(device_t dev) goto bce_dma_alloc_exit; } - for (i = 0; i < RX_PAGES; i++) { + for (i = 0; i < sc->rx_pages; i++) { if (bus_dmamem_alloc(sc->rx_bd_chain_tag, (void **)&sc->rx_bd_chain[i], @@ -3405,12 +3737,11 @@ bce_dma_alloc(device_t dev) /* * Create a DMA tag for RX mbufs. */ -#ifdef BCE_JUMBO_HDRSPLIT - max_size = max_seg_size = ((sc->rx_bd_mbuf_alloc_size < MCLBYTES) ? - MCLBYTES : sc->rx_bd_mbuf_alloc_size); -#else - max_size = max_seg_size = MJUM9BYTES; -#endif + if (bce_hdr_split == TRUE) + max_size = max_seg_size = ((sc->rx_bd_mbuf_alloc_size < MCLBYTES) ? + MCLBYTES : sc->rx_bd_mbuf_alloc_size); + else + max_size = max_seg_size = MJUM9BYTES; max_segments = 1; DBPRINT(sc, BCE_INFO_LOAD, "%s(): Creating rx_mbuf_tag " @@ -3429,7 +3760,7 @@ bce_dma_alloc(device_t dev) } /* Create DMA maps for the RX mbuf clusters. */ - for (i = 0; i < TOTAL_RX_BD; i++) { + for (i = 0; i < TOTAL_RX_BD_ALLOC; i++) { if (bus_dmamap_create(sc->rx_mbuf_tag, BUS_DMA_NOWAIT, &sc->rx_mbuf_map[i])) { BCE_PRINTF("%s(%d): Unable to create RX mbuf " @@ -3439,78 +3770,77 @@ bce_dma_alloc(device_t dev) } } -#ifdef BCE_JUMBO_HDRSPLIT - /* - * Create a DMA tag for the page buffer descriptor chain, - * allocate and clear the memory, and fetch the physical - * address of the blocks. - */ - if (bus_dma_tag_create(sc->parent_tag, BCM_PAGE_SIZE, - BCE_DMA_BOUNDARY, BUS_SPACE_MAXADDR, sc->max_bus_addr, - NULL, NULL, BCE_PG_CHAIN_PAGE_SZ, 1, BCE_PG_CHAIN_PAGE_SZ, - 0, NULL, NULL, &sc->pg_bd_chain_tag)) { - BCE_PRINTF("%s(%d): Could not allocate page descriptor " - "chain DMA tag!\n", __FILE__, __LINE__); - rc = ENOMEM; - goto bce_dma_alloc_exit; - } - - for (i = 0; i < PG_PAGES; i++) { - - if (bus_dmamem_alloc(sc->pg_bd_chain_tag, - (void **)&sc->pg_bd_chain[i], - BUS_DMA_NOWAIT | BUS_DMA_ZERO | BUS_DMA_COHERENT, - &sc->pg_bd_chain_map[i])) { - BCE_PRINTF("%s(%d): Could not allocate page " - "descriptor chain DMA memory!\n", - __FILE__, __LINE__); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-8@FreeBSD.ORG Mon Jan 9 18:46:03 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B7CE106564A; Mon, 9 Jan 2012 18:46:03 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 59FF08FC22; Mon, 9 Jan 2012 18:46:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q09Ik3fh053100; Mon, 9 Jan 2012 18:46:03 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q09Ik3eo053098; Mon, 9 Jan 2012 18:46:03 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201201091846.q09Ik3eo053098@svn.freebsd.org> From: John Baldwin Date: Mon, 9 Jan 2012 18:46:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229861 - stable/8/sys/fs/nfsserver X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2012 18:46:03 -0000 Author: jhb Date: Mon Jan 9 18:46:03 2012 New Revision: 229861 URL: http://svn.freebsd.org/changeset/base/229861 Log: The sysctls for the new NFS server on stable/8 live under vfs.newnfs rather than vfs.nfsd. Modified: stable/8/sys/fs/nfsserver/nfs_nfsdsubs.c Modified: stable/8/sys/fs/nfsserver/nfs_nfsdsubs.c ============================================================================== --- stable/8/sys/fs/nfsserver/nfs_nfsdsubs.c Mon Jan 9 18:33:54 2012 (r229860) +++ stable/8/sys/fs/nfsserver/nfs_nfsdsubs.c Mon Jan 9 18:46:03 2012 (r229861) @@ -56,10 +56,10 @@ static nfstype newnfsv2_type[9] = { NFNO extern nfstype nfsv34_type[9]; #endif /* !APPLEKEXT */ -SYSCTL_DECL(_vfs_nfsd); +SYSCTL_DECL(_vfs_newnfs); static int disable_checkutf8 = 0; -SYSCTL_INT(_vfs_nfsd, OID_AUTO, disable_checkutf8, CTLFLAG_RW, +SYSCTL_INT(_vfs_newnfs, OID_AUTO, disable_checkutf8, CTLFLAG_RW, &disable_checkutf8, 0, "Disable the NFSv4 check for a UTF8 compliant name"); From owner-svn-src-stable-8@FreeBSD.ORG Mon Jan 9 18:52:47 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E74D71065670; Mon, 9 Jan 2012 18:52:47 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D31918FC12; Mon, 9 Jan 2012 18:52:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q09IqlxP053337; Mon, 9 Jan 2012 18:52:47 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q09Iqlgv053335; Mon, 9 Jan 2012 18:52:47 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201201091852.q09Iqlgv053335@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 9 Jan 2012 18:52:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229862 - stable/8/sys/dev/bce X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2012 18:52:48 -0000 Author: yongari Date: Mon Jan 9 18:52:47 2012 New Revision: 229862 URL: http://svn.freebsd.org/changeset/base/229862 Log: MFC r218529: - Updated firmware which improves small packet performance. Modified: stable/8/sys/dev/bce/if_bcefw.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/bce/if_bcefw.h ============================================================================== --- stable/8/sys/dev/bce/if_bcefw.h Mon Jan 9 18:46:03 2012 (r229861) +++ stable/8/sys/dev/bce/if_bcefw.h Mon Jan 9 18:52:47 2012 (r229862) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2006-2010 Broadcom Corporation + * Copyright (c) 2006-2011 Broadcom Corporation * David Christensen . All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,1310 +31,1254 @@ /* * This file contains firmware data derived from proprietary unpublished - * source code, Copyright (c) 2004, 2005, 2007, 2008 Broadcom Corporation. + * source code, Copyright (c) 2004-2011 Broadcom Corporation. * * Permission is hereby granted for the distribution of this firmware data - * in hexadecimal or equivalent format, provided this copyright notice is - * accompanying it. + * in hexadecimal or equivalent format, provided this copyright notice also + * accompanies it. */ -/* Firmware release 4.6.17 for BCM5706 and BCM5708 (b06). */ -/* Firmware release 4.6.16 for BCM5709 and BCM5716 (b09). */ -int bce_COM_b06FwReleaseMajor = 0x1; -int bce_COM_b06FwReleaseMinor = 0x0; -int bce_COM_b06FwReleaseFix = 0x0; -u32 bce_COM_b06FwStartAddr = 0x080000f8; -u32 bce_COM_b06FwTextAddr = 0x08000000; -int bce_COM_b06FwTextLen = 0x4df0; -u32 bce_COM_b06FwDataAddr = 0x00000000; -int bce_COM_b06FwDataLen = 0x0; -u32 bce_COM_b06FwRodataAddr = 0x08004df0; -int bce_COM_b06FwRodataLen = 0x14; -u32 bce_COM_b06FwBssAddr = 0x08004e58; -int bce_COM_b06FwBssLen = 0xbc; -u32 bce_COM_b06FwSbssAddr = 0x08004e20; -int bce_COM_b06FwSbssLen = 0x38; -u32 bce_COM_b06FwSDataAddr = 0x00000000; -int bce_COM_b06FwSDataLen = 0x0; -u32 bce_COM_b06FwText[(0x4df0/4) + 1] = { -0xa00003e, 0x0, 0x0, -0xd, 0x636f6d34, 0x2e362e31, 0x37000000, -0x4061102, 0x0, 0x3, 0x14, -0x32, 0x3, 0x0, 0x0, -0x0, 0x0, 0x0, 0x10, -0x136, 0xea60, 0x1, 0x0, -0x0, 0x0, 0x8, 0x0, -0x0, 0x0, 0x0, 0x0, -0x0, 0x0, 0x0, 0x0, -0x0, 0x0, 0x0, 0x2, -0x0, 0x0, 0x0, 0x0, -0x0, 0x0, 0x0, 0x0, -0x0, 0x10, 0x0, 0x0, -0x0, 0x0, 0x0, 0x0, -0x0, 0x0, 0x0, 0x0, -0x0, 0x0, 0x0, 0x0, -0x10000003, 0x0, 0xd, 0xd, -0x3c020800, 0x24424e20, 0x3c030800, 0x24634f14, -0xac400000, 0x43202b, 0x1480fffd, 0x24420004, -0x3c1d0800, 0x37bd7ffc, 0x3a0f021, 0x3c100800, -0x261000f8, 0x3c1c0800, 0x279c4e20, 0xe0002bd, -0x0, 0xd, 0x3c036010, 0x8c645000, -0x2402ff7f, 0x3c1a8000, 0x822024, 0x3484380c, -0x24020037, 0xac645000, 0xaf420008, 0x24020c80, -0xaf420024, 0x3c1b8008, 0x3c060800, 0x24c607e8, -0x3c020800, 0x24424e58, 0x2404001b, 0x2484ffff, -0xac460000, 0x481fffd, 0x24420004, 0x3c020800, -0x24420380, 0x3c010800, 0xac224e60, 0x3c020800, -0x24420680, 0x3c010800, 0xac224e64, 0x3c020800, -0x24420dcc, 0x3c010800, 0xac224ea0, 0x3c020800, -0x24420a5c, 0x3c030800, 0x24630954, 0x3c040800, -0x24840990, 0x3c050800, 0x24a53c70, 0x3c010800, -0xac224ea8, 0x3c020800, 0x24420570, 0x3c010800, -0xac264ea4, 0x3c010800, 0xac254eb4, 0x3c010800, -0xac234ebc, 0x3c010800, 0xac224ec0, 0x3c010800, -0xac244ec4, 0x3c010800, 0xac234e5c, 0x3c010800, -0xac204e68, 0x3c010800, 0xac204e6c, 0x3c010800, -0xac204e70, 0x3c010800, 0xac204e74, 0x3c010800, -0xac204e78, 0x3c010800, 0xac204e7c, 0x3c010800, -0xac204e80, 0x3c010800, 0xac244e84, 0x3c010800, -0xac204e88, 0x3c010800, 0xac204e8c, 0x3c010800, -0xac204e90, 0x3c010800, 0xac204e94, 0x3c010800, -0xac204e98, 0x3c010800, 0xac264e9c, 0x3c010800, -0xac204eac, 0x3c010800, 0xac254eb0, 0x3c010800, -0xac234eb8, 0xa000707, 0x0, 0x3c030800, -0x8c630020, 0x8f820008, 0x10430003, 0x0, -0xa00053f, 0xaf830008, 0x3e00008, 0x0, -0x27bdffe8, 0xafb00010, 0xafbf0014, 0x27500100, -0x92020009, 0x1040001a, 0x24030001, 0x3c020800, -0x8c420020, 0x10400016, 0x1821, 0xe000577, -0x0, 0x96030008, 0x3c060800, 0x94c64ed6, -0x8e040018, 0x8f820020, 0x9605000c, 0x31c00, -0x661825, 0xac440000, 0xac450004, 0x24040001, -0xac400008, 0xac40000c, 0xac400010, 0xac400014, -0xac400018, 0xe00059c, 0xac43001c, 0x1821, -0x8fbf0014, 0x8fb00010, 0x601021, 0x3e00008, -0x27bd0018, 0x27bdffe8, 0xafbf0010, 0x97420108, -0x30437000, 0x24022000, 0x1062000a, 0x28642001, -0x54800012, 0x8fbf0010, 0x24024000, 0x10620008, -0x24026000, 0x1062000a, 0x8fbf0010, 0xa0000fb, -0x1021, 0x8fbf0010, 0xa0000bb, 0x27bd0018, -0xe000409, 0x0, 0xa0000fa, 0x8fbf0010, -0xe000fc9, 0x0, 0x8fbf0010, 0x1021, -0x3e00008, 0x27bd0018, 0x3c020800, 0x8c420020, -0x27bdffe8, 0x10400027, 0xafbf0010, 0xe000577, -0x0, 0x97420108, 0x9743010c, 0x8f850020, -0x3042003e, 0x3063ffff, 0x21400, 0x431025, -0xaca20000, 0x8f420100, 0x3c060800, 0x94c64ed6, -0x8fbf0010, 0xaca20004, 0x97430116, 0x9744010e, -0x3c022000, 0x31c00, 0x3084ffff, 0x641825, -0xaca30008, 0xc23025, 0x97420110, 0x97430112, -0x24040001, 0x21400, 0x3063ffff, 0x431025, -0xaca2000c, 0x97420114, 0x27bd0018, 0x3042ffff, -0xaca20010, 0xaca00014, 0xaca00018, 0xa00059c, -0xaca6001c, 0x8fbf0010, 0x3e00008, 0x27bd0018, -0x3c020800, 0x8c420020, 0x27bdffe8, 0x1040002a, -0xafbf0010, 0xe000577, 0x0, 0x97420108, -0x9743010c, 0x8f850020, 0x3042003e, 0x3063ffff, -0x21400, 0x431025, 0xaca20000, 0x8f420100, -0x3c060800, 0x94c64ed6, 0x8fbf0010, 0xaca20004, -0x97430116, 0x9744010e, 0x3c022000, 0x31c00, -0x3084ffff, 0x641825, 0xaca30008, 0xc23025, -0x97420110, 0x97430112, 0x24040001, 0x21400, -0x3063ffff, 0x431025, 0xaca2000c, 0x97420114, -0x27bd0018, 0x3042ffff, 0xaca20010, 0x8f420118, -0xaca20014, 0x9342010b, 0x304200ff, 0xaca20018, -0xa00059c, 0xaca6001c, 0x8fbf0010, 0x3e00008, -0x27bd0018, 0x27bdffe0, 0xafb00010, 0xafbf0018, -0xafb10014, 0x27500100, 0x9203000b, 0x2402001a, -0x96110008, 0x14620035, 0x2021, 0x32220001, -0x10400009, 0x0, 0x8e020000, 0x96030014, -0x211c2, 0x21040, 0x5a1021, 0xa4430080, -0xa000179, 0x32220002, 0xe00012b, 0x0, -0x3c020800, 0x8c420040, 0x24420001, 0x3c010800, -0xac220040, 0x32220002, 0x2202b, 0x3c020800, -0x8c420044, 0x32230004, 0x24420001, 0x3c010800, -0xac220044, 0x1060001a, 0x8fbf0018, 0x8f4202b8, -0x4410008, 0x24040001, 0x3c020800, 0x8c420060, -0x24420001, 0x3c010800, 0xac220060, 0xa00019c, -0x8fb10014, 0x8e020020, 0x96030016, 0x2021, -0xaf420280, 0x8e020004, 0xa7430284, 0xaf420288, -0x3c021000, 0xaf4202b8, 0x3c020800, 0x8c42005c, -0x24420001, 0x3c010800, 0xac22005c, 0x8fbf0018, -0x8fb10014, 0x8fb00010, 0x801021, 0x3e00008, -0x27bd0020, 0x27bdffe0, 0xafb00010, 0xafbf0018, -0xafb10014, 0x27500100, 0x9203000b, 0x24020003, -0x96110008, 0x14620048, 0x2021, 0x32220001, -0x10400008, 0x0, 0x8e020000, 0x96030014, -0x211c2, 0x21040, 0x5a1021, 0xa0001bb, -0xa4430080, 0xe0000fd, 0x0, 0x3c020800, -0x8c420040, 0x24420001, 0x3c010800, 0xac220040, -0x3c020800, 0x8c420044, 0x32230004, 0x24420001, -0x3c010800, 0xac220044, 0x1060001a, 0x32220002, -0x8f4202b8, 0x4430008, 0x8e020020, 0x3c020800, -0x8c420060, 0x24420001, 0x3c010800, 0xac220060, -0xa0001f1, 0x24040001, 0x96030016, 0x2021, -0xaf420280, 0x8e020004, 0xa7430284, 0xaf420288, -0x3c021000, 0xaf4202b8, 0x3c020800, 0x8c42005c, -0x24420001, 0x3c010800, 0xac22005c, 0xa0001f2, -0x8fbf0018, 0x10400014, 0x2021, 0x8f430104, -0x3c026020, 0xac430014, 0x8c420004, 0x240301fe, -0x304203ff, 0x1443000c, 0x2021, 0x8f420100, -0x219c2, 0x2462fffc, 0x2c420008, 0x10400003, -0x24040002, 0x2462fffd, 0x442004, 0x3c026000, -0xac446914, 0x2021, 0x8fbf0018, 0x8fb10014, -0x8fb00010, 0x801021, 0x3e00008, 0x27bd0020, -0x93620000, 0x3e00008, 0xaf800004, 0x3e00008, -0x1021, 0x27bdffe8, 0xafbf0014, 0xafb00010, -0x8f420100, 0xaf420020, 0x8f420104, 0xaf4200a8, -0x9350010b, 0xe0001f7, 0x321000ff, 0x3c020800, -0x24424e58, 0x101880, 0x2e10001c, 0x16000004, -0x621021, 0xe0001fa, 0xa000212, 0x0, -0x8c420000, 0x40f809, 0x0, 0x10400005, -0x3c024000, 0x8f430104, 0x3c026020, 0xac430014, -0x3c024000, 0xaf420138, 0x3c020800, 0x8c420034, -0x8fbf0014, 0x8fb00010, 0x24420001, 0x3c010800, -0xac220034, 0x3e00008, 0x27bd0018, 0x27bdffe8, -0xafbf0010, 0x8f420140, 0xe0001f7, 0xaf420020, -0xe000393, 0x0, 0x3c024000, 0xaf420178, -0x3c030800, 0x24630038, 0x8c620000, 0x8fbf0010, -0x27bd0018, 0x24420001, 0x3e00008, 0xac620000, -0x27bdffe8, 0xafbf0010, 0x8f420180, 0xe0001f7, -0xaf420020, 0x8f430180, 0x24020f00, 0x14620005, -0x0, 0x8f420188, 0xa742009c, 0xa00024c, -0x3c024000, 0x93620000, 0x24030050, 0x304200ff, -0x14430008, 0x3c024000, 0xe000377, 0x0, -0x14400004, 0x3c024000, 0xe000e55, 0x0, -0x3c024000, 0xaf4201b8, 0x3c020800, 0x8c42003c, -0x8fbf0010, 0x24420001, 0x3c010800, 0xac22003c, -0x3e00008, 0x27bd0018, 0x3e00008, 0x1021, -0x8f430104, 0x8f820010, 0x10430008, 0x0, -0x3c020800, 0x8c420084, 0x24420001, 0x3c010800, -0xac220084, 0x8f420104, 0xaf820010, 0x3e00008, -0x0, 0x27bdffe8, 0xafbf0010, 0x27440100, -0x94820008, 0x30430002, 0x30420004, 0x1040001b, -0x0, 0x8f4202b8, 0x4410008, 0x24050001, -0x3c020800, 0x8c420060, 0x24420001, 0x3c010800, -0xac220060, 0xa000294, 0x8fbf0010, 0x8c820020, -0x94830016, 0x2821, 0xaf420280, 0x8c820004, -0xa7430284, 0xaf420288, 0x3c021000, 0xaf4202b8, -0x3c020800, 0x8c42005c, 0x24420001, 0x3c010800, -0xac22005c, 0xa000294, 0x8fbf0010, 0x10600008, -0x24050001, 0x3c020800, 0x8c420084, 0x24420001, -0x3c010800, 0xac220084, 0xa000294, 0x8fbf0010, -0x8f440100, 0xe000257, 0x0, 0x2821, -0x8fbf0010, 0xa01021, 0x3e00008, 0x27bd0018, -0x3c020800, 0x8c420088, 0x27430100, 0x9465000c, -0x24420001, 0x3c010800, 0xac220088, 0x8c640018, -0x3451021, 0x90454000, 0xaf440038, 0x8c62001c, -0x2403fff8, 0x52e00, 0x431024, 0x34420004, -0xaf42003c, 0x3c020005, 0xaf420030, 0x0, -0x0, 0x0, 0xaf450404, 0x0, -0x0, 0x0, 0x3c020006, 0x34420001, -0xaf420030, 0x0, 0x0, 0x0, -0x8f420000, 0x30420010, 0x1040fffd, 0x1021, -0x3e00008, 0x0, 0x27bdffe0, 0xafbf0018, -0xafb10014, 0xe000055, 0xafb00010, 0x3c028000, -0x34420070, 0x8c420000, 0xaf820014, 0xe0000b2, -0x0, 0x3c028000, 0x34460070, 0x3c030800, -0x8c6300a0, 0x3c020800, 0x8c4200a4, 0x10430004, -0x8f840014, 0x3c010800, 0xac2300a4, 0xa743009e, -0x8cca0000, 0x3c030800, 0x8c6300bc, 0x3c020800, -0x8c4200b8, 0x1442023, 0x641821, 0x4021, -0x64202b, 0x481021, 0x441021, 0x3c010800, -0xac2300bc, 0x3c010800, 0xac2200b8, 0x8f510000, -0x32220007, 0x1040ffe1, 0xaf8a0014, 0x8cc60000, -0x3c050800, 0x8ca500bc, 0x3c040800, 0x8c8400b8, -0xca3023, 0xa62821, 0x1021, 0xa6302b, -0x822021, 0x862021, 0x32270001, 0x3c010800, -0xac2500bc, 0x3c010800, 0xac2400b8, 0x10e00021, -0x32220002, 0x8f420100, 0xaf420020, 0x8f420104, -0xaf4200a8, 0x9342010b, 0xe0001f7, 0x305000ff, -0x2e02001c, 0x54400004, 0x101080, 0xe0001fa, -0xa00030b, 0x0, 0x3c030800, 0x24634e58, -0x431021, 0x8c420000, 0x40f809, 0x0, -0x10400005, 0x3c024000, 0x8f430104, 0x3c026020, -0xac430014, 0x3c024000, 0xaf420138, 0x3c020800, -0x8c420034, 0x24420001, 0x3c010800, 0xac220034, -0x32220002, 0x1040000e, 0x32220004, 0x8f420140, -0xe0001f7, 0xaf420020, 0xe000393, 0x0, -0x3c024000, 0xaf420178, 0x3c020800, 0x8c420038, -0x24420001, 0x3c010800, 0xac220038, 0x32220004, -0x1040ff9b, 0x3c028000, 0x8f420180, 0xe0001f7, -0xaf420020, 0x8f430180, 0x24020f00, 0x14620005, -0x0, 0x8f420188, 0xa742009c, 0xa000340, -0x3c024000, 0x93620000, 0x24030050, 0x304200ff, -0x14430008, 0x3c024000, 0xe000377, 0x0, -0x54400004, 0x3c024000, 0xe000e55, 0x0, -0x3c024000, 0xaf4201b8, 0x3c020800, 0x8c42003c, -0x24420001, 0x3c010800, 0xac22003c, 0xa0002c3, -0x3c028000, 0x3c029000, 0x34420001, 0x822025, -0xaf440020, 0x8f420020, 0x440fffe, 0x0, -0x3e00008, 0x0, 0x3c028000, 0x34420001, -0x822025, 0x3e00008, 0xaf440020, 0x27bdffe0, -0xafb10014, 0xafb00010, 0x808821, 0xafbf0018, -0xe000348, 0x30b000ff, 0x9362007d, 0x2202021, -0x2028025, 0xa370007d, 0x8f700074, 0x3c028000, -0xe000351, 0x2028024, 0x16000009, 0x8fbf0018, -0x8f4201f8, 0x440fffe, 0x24020002, 0xaf5101c0, -0xa34201c4, 0x3c021000, 0xaf4201f8, 0x8fbf0018, -0x8fb10014, 0x8fb00010, 0x3e00008, 0x27bd0020, -0x27bdffd0, 0x1021, 0x3e00008, 0x27bd0030, -0x27bdffe8, 0xafbf0010, 0x97420184, 0x30420200, -0x10400005, 0x2021, 0xe00108c, 0x0, -0xa00038b, 0x24040001, 0x8f420188, 0x4400009, -0x8fbf0010, 0x8f420188, 0x3c03ff00, 0x431024, -0x3c030400, 0x14430003, 0x24040001, 0x9362003e, -0x8fbf0010, 0x801021, 0x3e00008, 0x27bd0018, -0xa3600022, 0x8f440140, 0xa000356, 0x24050001, -0x27bdffe8, 0xafbf0014, 0xafb00010, 0x93620000, -0x24030020, 0x304200ff, 0x1043000b, 0x0, -0x93620000, 0x24030030, 0x304200ff, 0x10430006, -0x0, 0x93620000, 0x24030050, 0x304200ff, -0x14430062, 0x8fbf0014, 0x93420148, 0x304200ff, -0x2443ffff, 0x2c620005, 0x1040005c, 0x8fbf0014, -0x31080, 0x3c030800, 0x24634df0, 0x431021, -0x8c420000, 0x400008, 0x0, 0xe000348, -0x8f440140, 0x8f70000c, 0x8f420144, 0x16020002, -0x24020001, 0xaf62000c, 0xe000351, 0x8f440140, -0x8f420144, 0x14500004, 0x8fbf0014, 0x8fb00010, -0xa001000, 0x27bd0018, 0x8f62000c, 0xa0003ff, -0x0, 0x97620010, 0x8f430144, 0x3042ffff, -0x14620009, 0x0, 0x24020001, 0xa7620010, -0x8f420140, 0xaf420200, 0x3c021000, 0xaf420238, -0xa000406, 0x8fbf0014, 0x97620010, 0xa0003ff, -0x0, 0xe000348, 0x8f440140, 0x97620012, -0x8f430144, 0x3050ffff, 0x16030002, 0x24020001, -0xa7620012, 0xe000351, 0x8f440140, 0x8f420144, -0x16020004, 0x8fbf0014, 0x8fb00010, 0xa00038f, -0x27bd0018, 0x97620012, 0xa0003ff, 0x0, -0x97620014, 0x8f430144, 0x3042ffff, 0x14620006, -0x8fbf0014, 0x24020001, 0x8fb00010, 0xa7620014, -0xa00132c, 0x27bd0018, 0x97620014, 0xa0003ff, -0x0, 0x97620016, 0x8f430144, 0x3042ffff, -0x14620006, 0x24020001, 0x8fbf0014, 0x8fb00010, -0xa7620016, 0xa000bf3, 0x27bd0018, 0x97620016, -0x14400006, 0x8fbf0014, 0x3c020800, 0x8c420070, -0x24420001, 0x3c010800, 0xac220070, 0x8fb00010, -0x3e00008, 0x27bd0018, 0x27bdffe8, 0xafbf0014, -0xafb00010, 0x93430109, 0x2402001f, 0x8f500100, -0x106200a5, 0x28620020, 0x10400018, 0x24020038, -0x2862000a, 0x1040000c, 0x2402000b, 0x28620008, -0x1040002c, 0x0, 0x46000e7, 0x28620002, -0x14400028, 0x24020006, 0x10620026, 0x8fbf0014, -0xa000503, 0x8fb00010, 0x1062005e, 0x2862000b, -0x144000de, 0x8fbf0014, 0x2402000e, 0x10620073, -0x8fb00010, 0xa000503, 0x0, 0x106200c2, -0x28620039, 0x1040000a, 0x24020080, 0x24020036, -0x106200cc, 0x28620037, 0x104000b6, 0x24020035, -0x106200c3, 0x8fbf0014, 0xa000503, 0x8fb00010, -0x1062002b, 0x28620081, 0x10400006, 0x240200c8, -0x24020039, 0x106200b6, 0x8fbf0014, 0xa000503, -0x8fb00010, 0x10620099, 0x8fbf0014, 0xa000503, -0x8fb00010, 0x3c020800, 0x8c420020, 0x104000bb, -0x8fbf0014, 0xe000577, 0x0, 0x8f420100, -0x8f830020, 0x9745010c, 0x97460108, 0xac620000, -0x8f420104, 0x3c040800, 0x94844ed6, 0x52c00, -0xac620004, 0x8f420118, 0x63400, 0xc43025, -0xac620008, 0x8f42011c, 0x24040001, 0xac62000c, -0x9342010a, 0xa22825, 0xac650010, 0xac600014, -0xac600018, 0xac66001c, 0xa0004d7, 0x8fbf0014, -0x3c020800, 0x8c420020, 0x1040009c, 0x8fbf0014, -0xe000577, 0x0, 0x97440108, 0x3c030800, -0x94634ed6, 0x9745010c, 0x42202, 0x9746010e, -0x8f820020, 0x42600, 0x832025, 0x52c00, -0x3c030080, 0xa62825, 0x832025, 0xac400000, -0xac400004, 0xac400008, 0xac40000c, 0xac450010, -0xac400014, 0xac400018, 0xac44001c, 0xa0004d6, -0x24040001, 0x9742010c, 0x14400015, 0x0, -0x93620005, 0x30420010, 0x14400011, 0x0, -0xe000348, 0x2002021, 0x93620005, 0x2002021, -0x34420010, 0xe000351, 0xa3620005, 0x93620000, -0x24030020, 0x304200ff, 0x1043006f, 0x2002021, -0x8fbf0014, 0x8fb00010, 0xa0010a2, 0x27bd0018, -0xd, 0xa000502, 0x8fbf0014, 0x3c020800, -0x8c420020, 0x10400065, 0x8fbf0014, 0xe000577, -0x0, 0x8f420104, 0x8f830020, 0x9744010c, -0x3c050800, 0x94a54ed6, 0xac620000, 0x9762002c, -0x42400, 0x3042ffff, 0x822025, 0x3c02400e, -0xa22825, 0xac640004, 0xac600008, 0xac60000c, -0xac600010, 0xac600014, 0xac600018, 0xac65001c, -0xa0004d6, 0x24040001, 0xe000348, 0x2002021, -0xa7600008, 0xe000351, 0x2002021, 0x2002021, -0xe000356, 0x24050001, 0x3c020800, 0x8c420020, -0x10400042, 0x8fbf0014, 0xe000577, 0x0, -0x9742010c, 0x8f830020, 0x3c050800, 0x94a54ed6, -0x21400, 0xac700000, 0xac620004, 0xac600008, -0x8f64004c, 0x3c02401f, 0xa22825, 0xac64000c, -0x8f620050, 0x24040001, 0xac620010, 0x8f620054, -0xac620014, 0xac600018, 0xac65001c, 0x8fbf0014, -0x8fb00010, 0xa00059c, 0x27bd0018, 0x93620000, -0x24030020, 0x304200ff, 0x10430024, 0x8fbf0014, -0xe000fea, 0x2002021, 0x10400020, 0x8fbf0014, -0x2002021, 0x8fb00010, 0x2821, 0xa000356, -0x27bd0018, 0x2002021, 0x8fbf0014, 0x8fb00010, -0xa000664, 0x27bd0018, 0x9745010c, 0x2002021, -0x8fbf0014, 0x8fb00010, 0xa000684, 0x27bd0018, -0x2002021, 0x8fb00010, 0xa0006a9, 0x27bd0018, -0x9345010d, 0x2002021, 0x8fb00010, 0xa0006f3, -0x27bd0018, 0x2002021, 0x8fbf0014, 0x8fb00010, -0xa0006cf, 0x27bd0018, 0x8fbf0014, 0x8fb00010, -0x3e00008, 0x27bd0018, 0x8f420278, 0x440fffe, -0x34820080, 0xaf420240, 0x24020002, 0xa3420244, -0x3c021000, 0x3e00008, 0xaf420278, 0x3c040800, -0x94844ee2, 0x3c020800, 0x8c424eec, 0x3083ffff, -0x318c0, 0x431021, 0xaf42003c, 0x3c020800, -0x8c424ee8, 0xaf420038, 0x3c020050, 0x34420008, -0xaf420030, 0x0, 0x0, 0x0, -0x8f420000, 0x30420020, 0x1040fffd, 0x0, -0x8f420400, 0x3c010800, 0xac224ed8, 0x8f420404, -0x3c010800, 0xac224edc, 0x3c020020, 0xaf420030, -0x0, 0x3c020800, 0x94424ee0, 0x3c030800, -0x94634ee4, 0x3c050800, 0x94a54ee6, 0x24840001, -0x431021, 0x3083ffff, 0x3c010800, 0xa4224ee0, -0x3c010800, 0xa4244ee2, 0x14650003, 0x0, -0x3c010800, 0xa4204ee2, 0x3e00008, 0x0, -0x3c05000a, 0x27bdffe8, 0x3452821, 0x3c040800, -0x24844ec8, 0xafbf0010, 0xe000601, 0x2406000a, -0x3c020800, 0x94424eca, 0x3c030800, 0x94634ee6, -0x3042000f, 0x24420003, 0x431804, 0x24027fff, -0x43102b, 0x10400002, 0xaf83001c, 0xd, -0xe00050e, 0x0, 0x3c020800, 0x94424ed2, -0x8fbf0010, 0x27bd0018, 0x3e00008, 0xa74200a2, -0x3c02000a, 0x3421021, 0x94430006, 0x3c020800, -0x94424ed2, 0x3c010800, 0xa4234ece, 0x431023, -0x8f83001c, 0x21400, 0x21403, 0x43102b, -0x3e00008, 0x38420001, 0x27bdffe8, 0xafbf0010, -0x3c02000a, 0x3421021, 0x94420006, 0x3c010800, -0xa4224ece, 0xe00055b, 0x0, 0x5440fff9, -0x3c02000a, 0x8fbf0010, 0x3e00008, 0x27bd0018, -0x27bdffe8, 0xafbf0010, 0xe00055b, 0x0, -0x10400003, 0x0, 0xe000569, 0x0, -0x3c020800, 0x8c424ed8, 0x8fbf0010, 0x27430400, -0xaf420038, 0x3c020800, 0x8c424edc, 0x27bd0018, -0xaf830020, 0xaf42003c, 0x3c020005, 0xaf420030, -0x3e00008, 0xaf800018, 0x8f820018, 0x3c030006, -0x21140, 0x431025, 0xaf420030, 0x0, -0x0, 0x0, 0x8f420000, 0x30420010, -0x1040fffd, 0x27420400, 0xaf820020, 0x3e00008, -0xaf800018, 0x3c060800, 0x8cc64edc, 0x8f850018, -0x8f830020, 0x3c020800, 0x94424ed2, 0x27bdffe0, -0x24a50001, 0x24630020, 0x24420001, 0x24c70020, -0xafb10014, 0xafb00010, 0xafbf0018, 0xaf850018, -0xaf830020, 0x3c010800, 0xa4224ed2, 0x309000ff, -0x3c010800, 0xac274edc, 0x4c10008, 0x8821, -0x4e00006, 0x0, 0x3c020800, 0x8c424ed8, -0x24420001, 0x3c010800, 0xac224ed8, 0x3c020800, -0x94424ed2, 0x3c030800, 0x94634ee0, 0x10202b, -0x431026, 0x2c420001, 0x441025, 0x14400004, -0x8f830018, 0x24020010, 0x1462000f, 0x0, -0xe00058d, 0x24110001, 0x3c030800, 0x94634ed2, -0x3c020800, 0x94424ee0, 0x14620003, 0x0, -0xe00050e, 0x0, 0x16000003, 0x0, -0xe000577, 0x0, 0x3c030800, 0x94634ed6, -0x3c020800, 0x94424ed4, 0x24630001, 0x3064ffff, -0x3c010800, 0xa4234ed6, 0x14820003, 0x0, -0x3c010800, 0xa4204ed6, 0x12000006, 0x0, -0x3c020800, 0x94424ed2, 0xa74200a2, 0xa0005ef, -0x2201021, 0xe00055b, 0x0, 0x10400004, -0x2201021, 0xe000569, 0x0, 0x2201021, -0x8fbf0018, 0x8fb10014, 0x8fb00010, 0x3e00008, -0x27bd0020, 0x3084ffff, 0x30a5ffff, 0x1821, -0x10800007, 0x0, 0x30820001, 0x10400002, -0x42042, 0x651821, 0xa0005f7, 0x52840, -0x3e00008, 0x601021, 0x10c00006, 0x24c6ffff, -0x8ca20000, 0x24a50004, 0xac820000, 0xa000601, -0x24840004, 0x3e00008, 0x0, 0x10a00008, -0x24a3ffff, 0xac860000, 0x0, 0x0, -0x2402ffff, 0x2463ffff, 0x1462fffa, 0x24840004, -0x3e00008, 0x0, 0x24020001, 0xaf62000c, -0xa7620010, 0xa7620012, 0xa7620014, 0x3e00008, -0xa7620016, 0x3082007f, 0x3421021, 0x3c08000e, -0x481821, 0x3c020800, 0x8c420020, 0x27bdffd8, -0x2407ff80, 0xafb3001c, 0xafb20018, 0xafb10014, -0xafb00010, 0xafbf0020, 0x808021, 0x30b100ff, -0x872024, 0x30d200ff, 0x1040002f, 0x9821, -0xaf44002c, 0x90620000, 0x24030050, 0x304200ff, -0x1443000e, 0x0, 0x3c020800, 0x8c4200e0, -0x2021021, 0x471024, 0xaf42002c, 0x3c020800, -0x8c4200e0, 0x2021021, 0x3042007f, 0x3421021, -0x481021, 0x944200d4, 0x3053ffff, 0xe000577, -0x0, 0x3c020800, 0x94424ed6, 0x8f830020, -0x113400, 0xc23025, 0x122c00, 0x3c024000, -0xc23025, 0x34a50001, 0xac700000, 0x8fbf0020, -0xac600004, 0x8fb20018, 0xac730008, 0x8fb10014, -0xac60000c, 0x8fb3001c, 0xac650010, 0x8fb00010, -0xac600014, 0x24040001, 0xac600018, 0x27bd0028, -0xa00059c, 0xac66001c, 0x8fbf0020, 0x8fb3001c, -0x8fb20018, 0x8fb10014, 0x8fb00010, 0x3e00008, -0x27bd0028, 0x9343010f, 0x24020010, 0x1062000e, -0x28650011, 0x10a00007, 0x24020012, 0x24020008, -0x2405003a, 0x10620006, 0x3021, 0x3e00008, -0x0, 0x24050035, 0x1462fffc, 0x3021, -0xa00061c, 0x0, 0x8f420074, 0x24420fa0, -0x3e00008, 0xaf62000c, 0x27bdffe8, 0xafbf0010, -0xe000356, 0x24050001, 0x8fbf0010, 0x24020001, -0xa7620012, 0x27bd0018, 0x24020001, 0x3e00008, -0xa3600022, 0x27bdffe0, 0xafb10014, 0xafb00010, -0xafbf0018, 0x30b1ffff, 0xe000348, 0x808021, -0x9362003f, 0x24030004, 0x304200ff, 0x1443000c, -0x2002021, 0x12200008, 0x2402000a, 0xe000615, -0x0, 0x93620005, 0x2403fffe, 0x431024, -0xa3620005, 0x24020012, 0xa362003f, 0x2002021, -0xe000351, 0xa3600081, 0x16200003, 0x2002021, -0xe000679, 0x0, 0x2002021, 0x322600ff, -0x8fbf0018, 0x8fb10014, 0x8fb00010, 0x24050038, -0xa00061c, 0x27bd0020, 0x27bdffe0, 0xafbf001c, -0xafb20018, 0xafb10014, 0xafb00010, 0xe000348, -0x808021, 0xe000615, 0x0, 0x9362003f, -0x24120018, 0x305100ff, 0x12320003, 0x2002021, -0x24020012, 0xa362003f, 0x93620005, 0x2403fffe, -0x431024, 0xe000351, 0xa3620005, 0x2002021, -0x24050020, 0x16320007, 0x3021, 0x8fbf001c, -0x8fb20018, 0x8fb10014, 0x8fb00010, 0xa000356, -0x27bd0020, 0x8fbf001c, 0x8fb20018, 0x8fb10014, -0x8fb00010, 0x24050039, 0xa00061c, 0x27bd0020, -0x27bdffe8, 0xafb00010, 0xafbf0014, 0x9742010c, -0x24050036, 0x808021, 0x14400010, 0x304600ff, -0xe000348, 0x0, 0x24020012, 0xa362003f, -0x93620005, 0x34420010, 0xe000615, 0xa3620005, -0xe000351, 0x2002021, 0x2002021, 0xe000356, -0x24050020, 0xa0006e8, 0x0, 0xe00061c, -0x0, 0xe000348, 0x2002021, 0x93620023, -0x2403ff9f, 0x2002021, 0x431024, 0x8fbf0014, -0x8fb00010, 0xa3620023, 0xa000351, 0x27bd0018, -0x27bdffe0, 0xafbf0018, 0xafb10014, 0xafb00010, -0x30b100ff, 0xe000348, 0x808021, 0x24020012, -0xe000615, 0xa362003f, 0xe000351, 0x2002021, -0x2002021, 0x2203021, 0x8fbf0018, 0x8fb10014, -0x8fb00010, 0x24050035, 0xa00061c, 0x27bd0020, -0xa380002c, 0x3e00008, 0xa380002d, 0x8f420278, -0x440fffe, 0x8f820034, 0xaf420240, 0x24020002, -0xa3420244, 0x3c021000, 0x3e00008, 0xaf420278, -0x3c036000, 0x8c625400, 0x30420008, 0x1440fffd, -0x0, 0x8c625408, 0xaf820000, 0x24020052, -0xac605408, 0xac645430, 0xac625434, 0x24020008, -0x3e00008, 0xac625400, 0x3c026000, 0x8c425400, -0x30420008, 0x10400005, 0x3c036000, 0x8c625400, -0x30420008, 0x1440fffd, 0x0, 0x8f830000, -0x3c026000, 0x3e00008, 0xac435408, 0x90a30000, -0x24020005, 0x804021, 0x3063003f, 0x4821, -0x14620005, 0x5021, 0x90a2001c, 0x94a3001e, -0x304900ff, 0x306affff, 0xad00000c, 0xad000010, -0xad000024, 0x95020014, 0x8d05001c, 0x8d040018, -0x3042ffff, 0x491023, 0x21100, 0x237c3, -0x403821, 0x862023, 0xa2102b, 0x822023, -0xa72823, 0xad05001c, 0xad040018, 0xa5090014, -0xa5090020, 0xa50a0016, 0x3e00008, 0xa50a0022, -0x8f4201f8, 0x440fffe, 0x24020002, 0xaf4401c0, -0xa34201c4, 0x3c021000, 0x3e00008, 0xaf4201f8, -0x3c020800, 0x8c4200b4, 0x27bdffe8, 0xafbf0014, -0x24420001, 0xafb00010, 0x3c010800, 0xac2200b4, -0x8f430024, 0x3c02001f, 0x30aa00ff, 0x3442ff80, -0x30d800ff, 0x628024, 0x80f821, 0x30ef00ff, -0x1158003b, 0x1405821, 0x240cff80, 0x3c19000a, -0x3163007f, 0x310c0, 0x31940, 0x621821, -0x3c020800, 0x8c4200dc, 0x25680001, 0x310d007f, -0x3e21021, 0x431021, 0x3043007f, 0x3431821, -0x4c1024, 0x794821, 0xaf420024, 0x8d220024, -0x16c1824, 0x6c7026, 0xad22000c, 0x8d220024, -0x310800ff, 0xad220010, 0x95220014, 0x95230020, -0x8d27001c, 0x3042ffff, 0x3063ffff, 0x8d260018, -0x431023, 0x21100, 0x227c3, 0x402821, -0xc43023, 0xe2102b, 0xc23023, 0xe53823, -0xad27001c, 0xad260018, 0x95220020, 0xa5220014, -0x95220022, 0x154b000a, 0xa5220016, 0x8d230024, -0x8d220008, 0x25460001, 0x31450080, 0x14620004, -0x30c4007f, 0x108f0002, 0x38aa0080, 0xc05021, -0x51af0001, 0x31c800ff, 0x1518ffc9, 0x1005821, -0x8f840034, 0x3082007f, 0x3421821, 0x3c02000a, -0x621821, 0x2402ff80, 0x822024, 0xaf440024, -0xa06a0079, 0xa06a0083, 0x8c620050, 0x8f840034, -0xac620070, 0x8c650074, 0x3c027fff, 0x3442ffff, -0xa22824, 0xe00074f, 0xac650074, 0xaf500024, -0x8fbf0014, 0x8fb00010, 0x3e00008, 0x27bd0018, -0x27bdffc0, 0xafbe0038, 0xafb70034, 0xafb5002c, -0xafb20020, 0xafb1001c, 0xafb00018, 0xafbf003c, -0xafb60030, 0xafb40028, 0xafb30024, 0x8f450024, -0x8f460028, 0x8f43002c, 0x3c02001f, 0x3442ff80, -0x621824, 0xc23024, 0x80a821, 0xafa30014, -0xa2f024, 0xe000713, 0xafa60010, 0x3c020800, -0x8c4200e0, 0x2410ff80, 0x3608821, 0x2a21021, -0x501024, 0xaf420024, 0x3c020800, 0x8c4200e0, -0x2a21021, 0x3042007f, 0x3421821, 0x3c02000a, -0x629021, 0x924200d2, 0x93630084, 0x305700ff, -0x306300ff, 0x24020001, 0x10620034, 0x3602021, -0x24020002, 0x14620036, 0x0, 0xe0012f8, -0x2402821, 0x92230083, 0x92220083, 0x3063007f, -0x3042007f, 0x210c0, 0x31940, 0x621821, -0x3c020800, 0x8c4200dc, 0x2a21021, 0x433821, -0xf01024, 0xaf420028, 0x92250078, 0x92240083, -0x30e2007f, 0x3421821, 0x3c02000c, 0x14850007, -0x628021, 0x2402ffff, 0xa24200f1, 0x2402ffff, -0xa64200f2, 0xa00080b, 0x2402ffff, 0x96020020, -0xa24200f1, 0x96020022, 0xa64200f2, 0x8e020024, -0xae4200f4, 0x92220083, 0xa24200f0, 0x8e4200c8, -0xae4200fc, 0x8e4200c4, 0xae4200f8, 0x8e220050, -0xae420100, 0x8e4200cc, 0xae420104, 0x92220085, -0x3042003f, 0xa000866, 0x34420040, 0xe00131b, -0x2402821, 0x92220085, 0xa000866, 0x3042003f, -0x93620085, 0x2403ffdf, 0x3042003f, 0xa3620085, -0x93620085, 0x431024, 0xa3620085, 0x93630083, -0x93620078, 0x307400ff, 0x304200ff, 0x10540036, -0x240aff80, 0x3c0c000c, 0x3283007f, 0x310c0, -0x31940, 0x621821, 0x3c020800, 0x8c4200dc, -0x26880001, 0x3109007f, 0x2a21021, 0x433821, -0x30e2007f, 0x3421821, 0xea1024, 0xaf420028, -0x6c8021, 0x8e020024, 0x28a1824, 0x6a5826, -0xae02000c, 0x8e020024, 0x310800ff, 0xae020010, -0x96020014, 0x96030020, 0x8e07001c, 0x3042ffff, -0x3063ffff, 0x8e060018, 0x431023, 0x21100, -0x227c3, 0x402821, 0xc43023, 0xe2102b, -0xc23023, 0xe53823, 0xae07001c, 0xae060018, -0x96020020, 0xa6020014, 0x96020022, 0xa6020016, -0x92220079, 0x304200ff, 0x10540007, 0x0, -0x51370001, 0x316800ff, 0x92220078, 0x304200ff, -0x1448ffcd, 0x100a021, 0x92220083, 0xa2220079, -0x8e220050, 0xa0008c6, 0xae220070, 0xa2220085, -0x8e22004c, 0x2405ff80, 0xae42010c, 0x92220085, -0x34420020, 0xa2220085, 0x924200d1, 0x3c030800, -0x8c6300dc, 0x305400ff, 0x3c020800, 0x8c4200e4, -0x143140, 0x1420c0, 0x2a31821, 0xc42021, -0x2a21021, 0x643821, 0x461021, 0x451824, -0xe52824, 0xaf450028, 0xaf43002c, 0x3042007f, -0x924400d0, 0x30e3007f, 0x3422821, 0x3431821, -0x3c02000c, 0x628021, 0x3c02000e, 0x309600ff, -0xa29821, 0x1296002a, 0x0, 0x8e02000c, -0x2002021, 0x2602821, 0x10400025, 0x26100028, -0xe00072e, 0x0, 0x9262000d, 0x26830001, -0x307400ff, 0x3042007f, 0xa262000d, 0x2404ff80, -0x1697fff0, 0x26730020, 0x3c020800, 0x8c4200dc, -0xa021, 0x2a21021, 0x441024, 0xaf420028, -0x3c020800, 0x8c4200e4, 0x3c030800, 0x8c6300dc, -0x2a21021, 0x441024, 0xaf42002c, 0x3c020800, -0x8c4200e4, 0x2a31821, 0x3063007f, 0x2a21021, -0x3042007f, 0x3422021, 0x3431821, 0x3c02000c, -0x628021, 0x3c02000e, 0xa000888, 0x829821, -0x8e4200d8, 0xae220050, 0x8e4200d8, 0xae220070, -0x92250083, 0x924600d1, 0x92230083, 0x924400d1, -0x2402ff80, 0xa22824, 0x3063007f, 0x308400ff, -0xa62825, 0x64182a, 0x10600002, 0x30a500ff, -0x38a50080, 0xa2250083, 0xa2250079, 0xe000721, -0x0, 0x9222007e, 0x2a02021, 0xa222007a, -0x8e230074, 0x3c027fff, 0x3442ffff, 0x621824, -0xe00074f, 0xae230074, 0x8fa20010, 0xaf5e0024, -0x8fbf003c, 0xaf420028, 0x8fbe0038, 0x8fa20014, -0x8fb70034, 0x8fb60030, 0x8fb5002c, 0x8fb40028, -0x8fb30024, 0x8fb20020, 0x8fb1001c, 0x8fb00018, -0x27bd0040, 0x3e00008, 0xaf42002c, 0x90a20000, -0x24420001, 0xa0a20000, 0x3c030800, 0x8c6300f4, -0x304200ff, 0x1443000f, 0x803021, 0xa0a00000, -0x3c020800, 0x8c4200e4, 0x8f840034, 0x822021, -0x3082007f, 0x3421821, 0x3c02000c, 0x621821, -0x2402ff80, 0x822024, 0xacc30000, 0x3e00008, -0xaf440028, 0x8c820000, 0x24420020, 0x3e00008, -0xac820000, 0x94c20000, 0x3c080800, 0x950800ca, -0x30e7ffff, 0x804821, 0x1021021, 0xa4c20000, -0x94c20000, 0x3042ffff, 0xe2102b, 0x54400001, -0xa4c70000, 0x94a20000, 0x3c030800, 0x8c6300cc, -0x24420001, 0xa4a20000, 0x94a20000, 0x3042ffff, -0x54430007, 0x8f860028, 0x107102b, 0xa4a00000, -0x54400001, 0x1003821, 0xa4c70000, 0x8f860028, -0x8cc4001c, 0xaf44003c, 0x94a20000, 0x8f43003c, -0x3042ffff, 0x210c0, 0x621821, 0xaf43003c, -0x8f42003c, 0x822023, 0x18800004, 0x0, -0x8cc20018, 0xa000927, 0x24420001, 0x8cc20018, -0xaf420038, 0x3c020050, 0x34420010, 0xaf420030, -0x0, 0x0, 0x0, 0x8f420000, -0x30420020, 0x1040fffd, 0x0, 0x8f420404, -0xad220004, 0x8f420400, 0xad220000, 0x3c020020, -0xaf420030, 0x3e00008, 0x0, 0x27bdffe0, -0xafb20018, 0xafb10014, 0xafb00010, 0xafbf001c, -0x94c20000, 0xc08021, 0x3c120800, 0x965200c6, -0x24420001, 0xa6020000, 0x96030000, 0x94e20000, -0xe03021, 0x14430005, 0x8fb10030, 0xe0008fc, -0x2403821, 0xa000959, 0x0, 0x8c830004, -0x8c820004, 0x24420040, 0x4610007, 0xac820004, -0x8c820004, 0x4400004, 0x0, 0x8c820000, -0x24420001, 0xac820000, 0x96020000, 0x3042ffff, -0x50520001, 0xa6000000, 0x96220000, 0x24420001, -0xa6220000, 0x8f820028, 0x96230000, 0x94420016, -0x14430004, 0x8fbf001c, 0x24020001, 0xa6220000, -0x8fbf001c, 0x8fb20018, 0x8fb10014, 0x8fb00010, -0x3e00008, 0x27bd0020, 0x8f890028, 0x27bdffe0, -0xafbf0018, 0x8d220028, 0x27480400, 0x30e700ff, -0xaf420038, 0x8d22002c, 0xaf880030, 0xaf42003c, -0x3c020005, 0xaf420030, 0x0, 0x0, -0x0, 0x0, 0x0, 0x0, -0x8c82000c, 0x8c82000c, 0xad020000, 0x8c820010, -0xad020004, 0x8c820018, 0xad020008, 0x8c82001c, -0xad02000c, 0x8ca20014, 0xad020010, 0x8c820020, -0xad020014, 0x90820005, 0x304200ff, 0x21200, -0xad020018, 0x8ca20018, 0xad02001c, 0x8ca2000c, -0xad020020, 0x8ca20010, 0xad020024, 0x8ca2001c, -0xad020028, 0x8ca20020, 0xad02002c, 0xad060030, -0xad000034, 0x97830026, 0x3402ffff, 0x14620002, -0x602021, 0x3404ffff, 0x10e00011, 0xad040038, -0x95230036, 0x95240036, 0x24020001, 0x3063ffff, -0x318c2, 0x691821, 0x90650040, 0x30840007, -0x821004, 0x451025, 0xa0620040, 0x8f820028, -0x94420056, 0x3042ffff, 0xa0009c0, 0xad02003c, -0x95230036, 0x95240036, 0x24020001, 0x3063ffff, -0x318c2, 0x691821, 0x90650040, 0x30840007, -0x821004, 0x21027, 0x451024, 0xa0620040, -0xad00003c, 0x0, 0x0, 0x0, -0x3c020006, 0x34420040, 0xaf420030, 0x0, -0x0, 0x0, 0x8f420000, 0x30420010, -0x1040fffd, 0x8f860028, 0xaf880030, 0x24c20056, -0x24c7003c, 0x24c40028, 0x24c50032, 0x24c60036, -0xe00093a, 0xafa20010, 0x8fbf0018, 0x3e00008, -0x27bd0020, 0x8f830024, 0x3c050800, 0x8ca500e8, -0x8f820034, 0x30633fff, 0x31980, 0x451021, -0x431021, 0x2403ff80, 0x3045007f, 0x431024, -0xaf420028, 0x3451821, 0x3c02000c, 0x623021, -0x90c2000d, 0x3821, 0x34420010, 0xa0c2000d, -0x8f890028, 0x8f8a0024, 0x95230036, 0xa1382, -0x30480003, 0x24020001, 0xa4c3000e, 0x1102000b, -0x29020002, 0x10400005, 0x24020002, 0x1100000c, -0x24030001, 0xa000a03, 0x1821, 0x11020006, -0x0, 0xa000a03, 0x1821, 0x8cc2002c, -0xa000a03, 0x24430001, 0x8cc20014, 0x24430001, -0x8cc20018, 0x43102b, 0x14400003, 0x0, -0xa000a0c, 0x24070001, 0x9522003e, 0x24420001, -0xa522003e, 0xa1382, 0x30430003, 0x2c620002, -0x10400009, 0x802821, 0x14600004, 0x0, -0x94c20036, 0xa000a1c, 0x3046ffff, 0x8cc60038, -0xa000a1c, 0x802821, 0x3021, 0x3c040800, -0x24844ef0, 0xa00096d, 0x0, 0x27490100, -0x8d22000c, 0x95230006, 0x1202021, 0x21602, -0x3045003f, 0x3063ffff, 0x24020027, 0x28a60028, -0x10a2000e, 0xaf830024, 0x10c00008, 0x24020031, -0x24020021, 0x10a20009, 0x24020025, 0x10a20007, -0x9382002d, 0xa000a3a, 0x0, 0x10a20005, -0x9382002d, 0xa000a3a, 0x0, 0xa0009d8, -0x0, 0xa00070a, 0x0, 0x95230006, -0x91240005, 0x8d25000c, 0x8d260010, 0x8d270018, -0x8d28001c, 0x8d290020, 0x24420001, 0x3c010800, -0xa4234ef6, 0x3c010800, 0xa0244ef5, 0x3c010800, -0xac254efc, 0x3c010800, 0xac264f00, 0x3c010800, -0xac274f08, 0x3c010800, 0xac284f0c, 0x3c010800, -0xac294f10, 0x3e00008, 0xa382002d, 0x8f870028, -0x27bdffc0, 0xafb30034, 0xafb20030, 0xafb1002c, -0xafb00028, 0xafbf0038, 0x3c020800, 0x8c4200d0, -0x94e30030, 0x30b0ffff, 0x501007, 0x3045ffff, -0x3063ffff, 0xc09821, 0xa7a20010, 0x3c110800, -0x963100c6, 0x14a30006, 0x3092ffff, 0x8ce20024, -0x24420030, 0xaf42003c, 0xa000a73, 0x8ce20020, -0x94e20032, 0x3042ffff, 0x54a20008, 0x27a40018, -0x8ce2002c, 0x24420030, 0xaf42003c, 0x8ce20028, -0xaf420038, 0xa000a81, 0x8f840028, 0x27a50010, -0x27a60020, 0x2203821, 0xe0008fc, 0xa7a00020, -0x8fa20018, 0x24420030, 0xaf420038, 0x8fa2001c, -0xaf42003c, 0x8f840028, 0x3c020005, 0xaf420030, -0x94820034, 0x27430400, 0x3042ffff, 0x202102b, -0x14400007, 0xaf830030, 0x94820054, 0x94830034, -0x2021021, 0x431023, 0xa000a95, 0x3043ffff, -0x94830054, 0x94820034, 0x2231821, 0x501023, -0x621823, 0x3063ffff, 0x94820016, 0x3042ffff, -0x14430003, 0x0, 0xa000aa3, 0x24030001, -0x94820016, 0x3042ffff, 0x43102b, 0x10400005, -0x8f820030, 0x94820016, 0x621023, 0x3043ffff, -0x8f820030, 0xac530000, 0xac400004, 0xac520008, -0xac43000c, 0x3c020006, 0x34420010, 0xaf420030, -0x0, 0x0, 0x0, 0x8f420000, -0x30420010, 0x1040fffd, 0x1018c2, 0x641821, -0x90650040, 0x32040007, 0x24020001, 0x8fbf0038, -0x8fb30034, 0x8fb20030, 0x8fb1002c, 0x8fb00028, -0x821004, 0x451025, 0x27bd0040, 0x3e00008, -0xa0620040, 0x27bdffa8, 0xafb60050, 0xafb5004c, -0xafb40048, 0xafb30044, 0xafb1003c, 0xafbf0054, -0xafb20040, 0xafb00038, 0x8c900000, 0x3c020800, -0x8c4200e8, 0x8f860034, 0x96030002, 0x2413ff80, -0xc23021, 0x30633fff, 0x31980, 0xc33821, -0xf31024, 0x90b20000, 0xaf42002c, 0x92030002, -0x30e2007f, 0x3423021, 0x3c02000e, 0xc28821, -0x306300c0, 0x24020040, 0x80a821, 0xa0b021, -0x14620026, 0xa021, 0x8e340038, 0x8e220018, -0x14400002, 0x24020001, 0xae220018, 0x9202000d, -0x30420020, 0x14400015, 0x8f820034, 0x3c030800, -0x8c6300dc, 0x1238c0, 0x123140, 0x431021, -0xc73021, 0x463821, 0x30e30007, 0x3c020080, -0x30e60078, 0xc23025, 0x3431821, 0xf31024, -0xaf420800, 0x24630900, 0xaf460810, 0x8e220018, -0x8c630008, 0x431021, 0xae220018, 0x8e22002c, -0x8e230018, 0x24420001, 0x62182b, 0x1060003d, -0x0, 0xa000b57, 0x0, 0x92030002, -0x2402ffc0, 0x431024, 0x304200ff, 0x14400005, -0x24020001, 0xae220018, 0x96220036, 0xa000b40, -0x3054ffff, 0x8e220014, 0x24420001, 0xae220018, -0x92020000, 0x21600, 0x21603, 0x4410029, -0x0, 0x96020002, 0x27a40010, 0x802821, -0xa7a20016, 0x96020002, 0x24070001, 0x3021, -0x3042ffff, 0xaf820024, 0xe00096d, 0xafa0001c, -0x96030002, 0x3c040800, 0x8c8400e8, 0x8f820034, -0x30633fff, 0x31980, 0x441021, 0x431021, -0x3043007f, 0x3c05000c, 0x531024, 0x3431821, -0xaf420028, 0x651821, 0x9062000d, 0x122140, -0x3042007f, 0xa062000d, 0x3c030800, 0x8c6300e4, -0x8f820034, 0x431021, 0x443821, 0x30e2007f, -0x3421021, 0x451021, 0xf31824, 0xaf430028, -0xaea20000, 0x9222000d, 0x30420010, 0x10400013, -0x2a02021, 0x8f830028, 0x8ea40000, 0x2803021, -0x9462003e, 0x2442ffff, 0xa462003e, 0x94840002, -0x9625000e, 0x3084ffff, 0xe000a52, 0x30a5ffff, -0x8f820028, 0x94430034, 0x9622000e, 0x14430003, -0x2a02021, 0x24020001, 0xa382002c, 0x2c02821, -0xe0008e2, 0x0, 0x8fbf0054, 0x8fb60050, -0x8fb5004c, 0x8fb40048, 0x8fb30044, 0x8fb20040, -0x8fb1003c, 0x8fb00038, 0x3e00008, 0x27bd0058, -0x8f850028, 0x27bdffd0, 0xafb40028, 0xafb20020, -0xafbf002c, 0xafb30024, 0xafb1001c, 0xafb00018, -0x90a800d0, 0x90a600d1, 0x3c020800, 0x8c4200e4, -0x8f830034, 0x30c700ff, 0xa3a60010, 0x621821, -0x71140, 0x621821, 0x3062007f, 0x3422021, -0x3c02000c, 0x822021, 0x2402ff80, 0x621824, -0x311200ff, 0x8cb100d8, 0xafa40014, 0x8cb300dc, -0xa021, 0xaf430028, 0x10f2001f, 0x24020001, -0x8fa60014, 0x27a40014, 0x27a50010, 0x8cc20004, -0x2228021, 0x2701023, 0x4400017, 0x24020001, -0x90c3000d, 0x2402ff80, 0x431024, 0x304200ff, -0x14400007, 0x2008821, 0x90c2000d, 0x34420040, -0xe0008e2, 0xa0c2000d, 0xa000b9e, 0x93a20010, -0xe000ac0, 0x24140001, 0x8f830028, 0xac7000d8, -0x93a20010, 0xa06200d1, 0x93a20010, 0x1452ffe5, -0x8fa60014, 0x24020001, 0x16820004, 0x8fbf002c, -0xe00070a, 0x0, 0x8fbf002c, 0x8fb40028, -0x8fb30024, 0x8fb20020, 0x8fb1001c, 0x8fb00018, -0x3e00008, 0x27bd0030, 0x27bdffd8, 0xafb3001c, -0xafb20018, 0xafb10014, 0xafb00010, 0xafbf0020, -0x809821, 0xe08021, 0x30b1ffff, 0xe000577, -0x30d200ff, 0x0, 0x0, 0x0, -0x8f820020, 0xac510000, 0xac520004, 0xac530008, -0xac40000c, 0xac400010, 0xac400014, 0xac400018, -0x3c030800, 0x94634ed6, 0x2038025, 0xac50001c, -0x0, 0x0, 0x0, 0x24040001, -0x8fbf0020, 0x8fb3001c, 0x8fb20018, 0x8fb10014, -0x8fb00010, 0xa00059c, 0x27bd0028, 0x27bdffe8, -0xafb00010, 0xafbf0014, 0x30a5ffff, 0x30c600ff, -0x808021, 0x24020c80, 0xaf420024, 0x0, -0x0, 0x0, 0x0, 0x0, -0xe000bad, 0x0, 0x3c040800, 0x248400e0, -0x8c820000, 0x2403ff80, 0x8fbf0014, 0x2021021, -0x431024, 0xaf420024, 0x8c820000, 0x3c03000a, -0x2028021, 0x3210007f, 0x3501021, 0x8fb00010, -0x431021, 0x27bd0018, 0x3e00008, 0xaf820028, -0x27bdffe8, 0xafbf0010, 0x8f440140, 0x3c030800, -0x8c6300e0, 0x2402ff80, 0xaf840034, 0x831821, -0x621024, 0xaf420024, 0x3c020008, 0x3424021, -0x95050002, 0x3063007f, 0x3c02000a, 0x3431821, -0x621821, 0x30a5ffff, 0x3402ffff, 0x3021, -0x3c076020, 0x10a20006, 0xaf830028, 0x2402ffff, -0xa5020002, 0x946500d4, 0xe000bd2, 0x30a5ffff, -0x8fbf0010, 0x24020c80, 0x27bd0018, 0x3e00008, -0xaf420024, 0x3c020008, 0x3424021, 0x95020002, -0x3c0a0800, 0x954a00c6, 0x3046ffff, 0x14c00007, -0x3402ffff, 0x8f820028, 0x8f840034, 0x3c076020, -0x944500d4, 0xa000c3b, 0x30a5ffff, 0x10c20024, -0x8f870028, 0x94e20054, 0x94e40016, 0x3045ffff, -0xa61023, 0xa6182b, 0x3089ffff, 0x10600004, -0x3044ffff, 0xc51023, 0x1221023, 0x3044ffff, -0x8a102b, 0x1040000c, 0x12a1023, 0x24020001, -0xa5020016, 0x2402ffff, 0xa5020002, 0x94e500d4, -0x8f840034, 0x3021, 0x30a5ffff, 0x3c076020, -0xa000bd2, 0x0, 0x44102a, 0x10400008, -0x0, 0x95020016, 0x30420001, 0x10400004, -0x0, 0x9742007e, 0x24420014, 0xa5020016, -0x3e00008, 0x0, 0x8f840028, 0x27bdffe0, -0xafbf0018, 0x94820034, 0x9483003e, 0x1060001a, -0x3048ffff, 0x9383002c, 0x24020001, 0x14620027, -0x8fbf0018, 0x8f820028, 0x818c2, 0x31080007, -0x621821, 0x2447003a, 0x24490054, 0x24440020, -0x24450030, 0x24460034, 0x90620040, 0x304200ff, -0x1021007, 0x30420001, 0x10400016, 0x8fbf0018, -0xe00093a, 0xafa90010, 0x8f820028, 0x94420034, -0xa000c54, 0x3048ffff, 0x94830036, 0x94820034, -0x1043000e, 0x8fbf0018, 0x94820036, 0xa4820034, -0x94820056, 0xa4820054, 0x8c82002c, 0xac820024, -0x94820032, 0xa4820030, 0x9482003c, 0xa482003a, -0x8fbf0018, 0xa000c14, 0x27bd0020, 0x3e00008, -0x27bd0020, 0x27bdffe8, 0xafbf0010, 0x8f4a0100, -0x3c050800, 0x8ca500e0, 0x3c020800, 0x90424efc, -0x3c0c0800, 0x958c4ef6, 0x1452821, 0x304b003f, -0x30a2007f, 0x3424021, 0x39690032, 0x3c02000a, -0x3963003f, 0x2c630001, 0x1024021, 0x2d290001, -0x2402ff80, 0xa22824, 0x1234825, 0xaf8a0034, -0x801821, 0xaf450024, 0x3021, 0x802821, -0x24070001, 0xaf880028, 0x3c040800, 0x24844ef0, -0xaf8c0024, 0x15200006, 0xa380002d, 0x24020020, -0x1562000e, 0x3402ffff, 0x1582000c, 0x0, -0x24020020, 0x15620005, 0x0, 0x8c630014, -0x2402ffff, 0x10620007, 0x0, 0xe00096d, -0x0, 0xa000cb0, 0x0, 0xe0009d8, -0x602021, 0xe000c49, 0x0, 0x8fbf0010, -0x24020c80, 0x27bd0018, 0x3e00008, 0xaf420024, -0x3c020800, 0x8c4200e0, 0x27bdffa0, 0xafb1003c, -0x821021, 0x2411ff80, 0xafbe0058, 0xafb70054, -0xafb20040, 0xafb00038, 0xafbf005c, 0xafb60050, -0xafb5004c, 0xafb40048, 0xafb30044, 0x511024, -0x8f480024, 0x8f490028, 0x8f470028, 0xaf420024, -0x3c020800, 0x8c4200e0, 0x809021, 0x24060006, -0x821021, 0x3042007f, 0x3421821, 0x3c02000a, -0x628021, 0x3c02001f, 0x3442ff80, 0xe23824, -0x27a40010, 0x260500f0, 0x122f024, 0x102b824, -0xe000601, 0xafa70030, 0x8fa20018, 0xae0200c4, -0x8fa2001c, 0xae0200c8, 0x8fa20024, 0xae0200cc, -0x93a40010, 0x920300d1, 0x2402ff80, 0x821024, -0x431025, 0x304900ff, 0x3083007f, 0x3122007f, -0x62102a, 0x10400004, 0x310c0, 0x1311026, -0x304900ff, 0x310c0, 0x31940, 0x621821, -0x3c020800, 0x8c4200dc, 0x920400d2, 0x2421021, -0x431021, 0x511024, 0xaf420028, 0x93a30010, -0x3063007f, 0x310c0, 0x31940, 0x621821, -0x3c020800, 0x8c4200dc, 0x2421021, 0x431021, -0x3042007f, 0x3421821, 0x3c02000c, 0x624021, -0x8fa30014, 0x2402ffff, 0x10620030, 0x309500ff, -0x93a20011, 0x95030014, 0x304400ff, 0x3063ffff, -0x64182b, 0x1060000d, 0x0, 0x95040014, -0x8d07001c, 0x8d060018, 0x3084ffff, 0x442023, -0x42100, 0x1021, 0xe43821, 0xe4202b, -0xc23021, 0xa000d2a, 0xc43021, 0x95040014, -0x8d07001c, 0x8d060018, 0x3084ffff, 0x822023, -0x42100, 0x1021, 0x801821, 0xc23023, -0xe4202b, 0xc43023, 0xe33823, 0xad07001c, -0xad060018, 0x93a20011, 0xa5020014, 0x97a20012, -0xa5020016, 0x8fa20014, 0xad020010, 0x8fa20014, -0xad02000c, 0x93a20011, 0xa5020020, 0x97a20012, -0xa5020022, 0x8fa20014, 0xad020024, 0x2406ff80, -0x2461024, 0x3256007f, 0xaf420024, 0x3561821, -0x3c02000a, 0x628021, 0x8e02004c, 0x8fa20020, -0x3124007f, 0x428c0, 0xae020050, 0x8fa20020, -0x42140, 0x852821, 0xae020070, 0x93a20010, -0x1208821, 0xa2020083, 0x93a20010, 0xa2020079, -0x92020085, 0x3042003f, 0xa2020085, 0x3c020800, -0x8c4200dc, 0x2421021, 0x451021, 0x461024, -0xaf42002c, 0x3c020800, 0x8c4200e4, 0x3c030800, -0x8c6300dc, 0x2421021, 0x441021, 0x461024, -0xaf420028, 0x3c020800, 0x8c4200e4, 0x2431821, -0x651821, 0x2421021, 0x441021, 0x3042007f, -0x3063007f, 0x93a50010, 0x3422021, 0x3431821, -0x3c02000e, 0x624021, 0x3c02000c, 0x10b1008c, -0x824821, 0x3233007f, 0x16600019, 0x2404ff80, -0x3c020800, 0x8c4200dc, 0x2421021, 0x441024, -0xaf42002c, 0x3c020800, 0x8c4200e4, 0x3c030800, -0x8c6300dc, 0x2421021, 0x441024, 0xaf420028, -0x3c020800, 0x8c4200e4, 0x2431821, 0x3063007f, -0x2421021, 0x3042007f, 0x3422021, 0x3431821, -0x3c02000e, 0x624021, 0x3c02000c, 0x824821, -0x9124000d, 0x2414ff80, 0x1021, 0x942025, -0xa124000d, 0x95040002, 0x95050014, 0x8d07001c, -0x3084ffff, 0x30a5ffff, 0x8d060018, 0x852023, -0x42100, 0xe43821, 0xc23021, 0xe4202b, -0xc43021, 0xad07001c, 0xad060018, 0x95020002, -0xa5020014, 0xa5000016, 0x8d020008, 0xad020010, -0x8d020008, 0xad02000c, 0x95020002, 0xa5020020, -0xa5000022, 0x8d020008, 0xad020024, 0x9122000d, -0x30420040, 0x10400042, 0x26220001, 0x3c020800, -0x8c4200e0, 0xa3b30028, 0x3c10000a, 0x2421021, -0x541024, 0xaf420024, 0x3c020800, 0x8c4200e0, -0xa380002c, 0x27a4002c, 0x2421021, 0x3042007f, -0x3421821, 0x701821, 0x8c6200d8, 0x8d260004, -0x27a50028, 0xafa9002c, 0x461021, 0xac6200d8, -0xe000ac0, 0xaf830028, 0x93a30028, 0x8f820028, -0xe00070a, 0xa04300d1, 0xe000c49, 0x0, -0x2541024, 0xaf420024, 0x3c020800, 0x8c4200dc, -0x132940, 0x1320c0, 0xa42021, 0x2421021, -0x441021, 0x541024, 0xaf42002c, 0x3c020800, -0x8c4200e4, 0x3c030800, 0x8c6300dc, 0x3563021, -0x2421021, 0x451021, 0x541024, 0xaf420028, -0x3c020800, 0x8c4200e4, 0x2431821, 0x641821, -0x2421021, 0x451021, 0x3042007f, 0x3063007f, -0x3422021, 0x3431821, 0x3c02000e, 0x624021, -0x3c02000c, 0xd08021, 0x824821, 0x26220001, -0x3043007f, 0x14750005, 0x304400ff, 0x2403ff80, -0x2231024, 0x431026, 0x304400ff, 0x93a20010, -0x808821, 0x25080028, 0x1444ff76, 0x25290020, -0x93a40010, 0x8fa30014, 0x2402ffff, 0x1062000a, -0x308900ff, 0x24820001, 0x24830001, 0x3042007f, -0x14550005, 0x306900ff, 0x2403ff80, 0x831024, -0x431026, 0x304900ff, 0x92020078, 0x305300ff, -0x11330032, 0x1208821, 0x3c020800, 0x8c4200dc, -0x3225007f, 0x520c0, 0x52940, 0xa42021, -0x2421021, 0x2406ff80, 0x441021, 0x461024, -0xaf42002c, 0x3c030800, 0x8c6300dc, 0x3c020800, -0x8c4200e4, 0x2431821, 0x2421021, 0x451021, -0x641821, 0x461024, 0x3063007f, 0xaf420028, -0x3431821, 0x3c02000e, 0x624021, 0x3c020800, -0x8c4200e4, 0x8d06000c, 0x1002021, 0x2421021, -0x451021, 0x3042007f, 0x3421821, 0x3c02000c, -0x624821, 0x10c0000d, 0x1202821, 0xe00072e, -0x0, 0x2402ff80, 0x2221824, 0x26240001, -0x622826, 0x3082007f, 0x14550002, 0x308300ff, -0x30a300ff, 0x1473ffd0, 0x608821, 0x8e030074, -0x3c027fff, 0x3442ffff, 0x621824, 0xae030074, -0xe00074f, 0x2402021, 0xaf570024, 0x8fa20030, -0xaf5e0028, 0x8fbf005c, 0x8fbe0058, 0x8fb70054, -0x8fb60050, 0x8fb5004c, 0x8fb40048, 0x8fb30044, -0x8fb20040, 0x8fb1003c, 0x8fb00038, 0x27bd0060, -0x3e00008, 0xaf42002c, 0x27bdffd8, 0xafb1001c, -0xafbf0020, 0xafb00018, 0x27510188, 0x92220003, -0x2408ff80, 0x3c03000a, 0x3047007f, 0xa3a70010, -0x8f460180, 0x3c020800, 0x8c4200e0, 0xaf860034, -0xc22821, 0xa81024, 0xaf420024, 0x92240000, -0x30a2007f, 0x3421021, 0x431021, 0xaf820028, -0x3084007f, 0x24020002, 0x14820025, 0x71940, -0x3c020800, 0x8c4200e4, 0xc21021, 0x432821, -0x30a2007f, 0x3421821, 0xa81024, 0xaf420028, -0x3c02000c, 0x621821, 0x9062000d, 0xafa30014, -0x481025, 0xa062000d, 0x8fa30014, 0x9062000d, -0x30420040, 0x5040006a, 0x8fbf0020, 0x8f860028, -0xa380002c, 0x27a40014, 0x8cc200d8, 0x8c630004, -0x27a50010, 0x431021, 0xe000ac0, 0xacc200d8, -0x93a30010, 0x8f820028, 0xe00070a, 0xa04300d1, -0xe000c49, 0x0, 0xa000eeb, 0x8fbf0020, -0xe000713, 0xc02021, 0xe000721, 0x0, -0x3c020008, 0x3428021, 0x92230001, 0x9202007b, -0x1443004f, 0x8fbf0020, 0x92220000, 0x3044007f, -0x24020004, 0x10820017, 0x28820005, 0x10400006, -0x24020005, 0x24020003, 0x10820007, 0x8fb1001c, -0xa000eec, 0x0, 0x10820012, 0x8fbf0020, -0xa000eec, 0x8fb1001c, 0x92050083, 0x92060078, -0x8e070074, 0x8f840034, 0x30a500ff, 0x73e02, -0x30c600ff, 0xe000757, 0x30e7007f, 0xa000eeb, -0x8fbf0020, 0xe000cb7, 0x8f840034, 0xa000eeb, -0x8fbf0020, 0x24020c80, 0xaf420024, 0x9202003e, -0x30420040, 0x10400020, 0x0, 0x9202003e, -0x21600, 0x21603, 0x4410006, 0x0, -0x8f840034, 0xe000684, 0x24050093, 0xa000eeb, -0x8fbf0020, 0x9202003f, 0x24030018, 0x304200ff, -0x1443000c, 0x8f840034, 0x24050039, 0xe00061c, -0x3021, 0xe000348, 0x8f840034, 0x24020012, -0xa202003f, 0xe000351, 0x8f840034, 0xa000eeb, -0x8fbf0020, 0x24050036, 0xe00061c, 0x3021, -0xa000eeb, 0x8fbf0020, 0xe000348, 0x8f840034, -0x92020005, 0x34420020, 0xa2020005, 0xe000351, -0x8f840034, 0xe0010a2, 0x8f840034, 0x8fbf0020, -0x8fb1001c, 0x8fb00018, 0x24020c80, 0x27bd0028, -0x3e00008, 0xaf420024, 0x27bdffe8, 0xafb00010, -0xafbf0014, 0x27430100, 0x94620008, 0x21400, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-8@FreeBSD.ORG Mon Jan 9 19:08:53 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DF294106566B; Mon, 9 Jan 2012 19:08:52 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CCB0B8FC0C; Mon, 9 Jan 2012 19:08:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q09J8qqI054011; Mon, 9 Jan 2012 19:08:52 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q09J8qe7054007; Mon, 9 Jan 2012 19:08:52 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201201091908.q09J8qe7054007@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 9 Jan 2012 19:08:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229865 - stable/8/sys/dev/bce X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2012 19:08:53 -0000 Author: yongari Date: Mon Jan 9 19:08:52 2012 New Revision: 229865 URL: http://svn.freebsd.org/changeset/base/229865 Log: MFC r228476: Rework link state tracking and remove superfluous link UP/DOWN messages. o Add check for actually resolved speed in miibus_statchg callback instead of blindly reprogramming BCE_EMAC_MODE register. The callback may be called multiple times(e.g. link UP, link transition, auto-negotiate complete etc) while auto-negotiation is in progress. All unresolved link state changes are ignored now and setting BCE_EMAC_MODE after link establishment is done once. o bce(4) is careful enough not to drive MII_TICK if driver got a valid link. To detect lost link, bce(4) relied on link state change interrupt and if driver see the interrupt, it forced to drive MII_TICK by calling bce_tick() in interrupt handler. Because bce(4) generates multiple link state change interrupts while auto-negotiation is in progress, bce_tick() would be called multiple times and this resulted in generating multiple link UP/DOWN messages. With this change, bce_tick() is not called in interrupt handler anymore such that miibus_statchg callback handles link state changes with consistent manner. Modified: stable/8/sys/dev/bce/if_bce.c stable/8/sys/dev/bce/if_bcereg.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/bce/if_bce.c ============================================================================== --- stable/8/sys/dev/bce/if_bce.c Mon Jan 9 19:07:14 2012 (r229864) +++ stable/8/sys/dev/bce/if_bce.c Mon Jan 9 19:08:52 2012 (r229865) @@ -1986,6 +1986,7 @@ static void bce_miibus_statchg(device_t dev) { struct bce_softc *sc; + struct ifnet *ifp; struct mii_data *mii; int val; @@ -1993,42 +1994,57 @@ bce_miibus_statchg(device_t dev) DBENTER(BCE_VERBOSE_PHY); + ifp = sc->bce_ifp; mii = device_get_softc(sc->bce_miibus); + if (mii == NULL || ifp == NULL || + (ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) + return; + sc->bce_link_up = FALSE; val = REG_RD(sc, BCE_EMAC_MODE); val &= ~(BCE_EMAC_MODE_PORT | BCE_EMAC_MODE_HALF_DUPLEX | BCE_EMAC_MODE_MAC_LOOP | BCE_EMAC_MODE_FORCE_LINK | BCE_EMAC_MODE_25G); /* Set MII or GMII interface based on the PHY speed. */ - switch (IFM_SUBTYPE(mii->mii_media_active)) { - case IFM_10_T: - if (BCE_CHIP_NUM(sc) != BCE_CHIP_NUM_5706) { - DBPRINT(sc, BCE_INFO_PHY, - "Enabling 10Mb interface.\n"); - val |= BCE_EMAC_MODE_PORT_MII_10; + if ((mii->mii_media_status & (IFM_ACTIVE | IFM_AVALID)) == + (IFM_ACTIVE | IFM_AVALID)) { + switch (IFM_SUBTYPE(mii->mii_media_active)) { + case IFM_10_T: + if (BCE_CHIP_NUM(sc) != BCE_CHIP_NUM_5706) { + DBPRINT(sc, BCE_INFO_PHY, + "Enabling 10Mb interface.\n"); + val |= BCE_EMAC_MODE_PORT_MII_10; + sc->bce_link_up = TRUE; + break; + } + /* FALLTHROUGH */ + case IFM_100_TX: + DBPRINT(sc, BCE_INFO_PHY, "Enabling MII interface.\n"); + val |= BCE_EMAC_MODE_PORT_MII; + sc->bce_link_up = TRUE; + break; + case IFM_2500_SX: + DBPRINT(sc, BCE_INFO_PHY, "Enabling 2.5G MAC mode.\n"); + val |= BCE_EMAC_MODE_25G; + /* FALLTHROUGH */ + case IFM_1000_T: + case IFM_1000_SX: + DBPRINT(sc, BCE_INFO_PHY, "Enabling GMII interface.\n"); + val |= BCE_EMAC_MODE_PORT_GMII; + sc->bce_link_up = TRUE; + if (bce_verbose || bootverbose) + BCE_PRINTF("Gigabit link up!\n"); + break; + default: + DBPRINT(sc, BCE_INFO_PHY, "Unknown link speed.\n"); break; } - /* fall-through */ - case IFM_100_TX: - DBPRINT(sc, BCE_INFO_PHY, "Enabling MII interface.\n"); - val |= BCE_EMAC_MODE_PORT_MII; - break; - case IFM_2500_SX: - DBPRINT(sc, BCE_INFO_PHY, "Enabling 2.5G MAC mode.\n"); - val |= BCE_EMAC_MODE_25G; - /* fall-through */ - case IFM_1000_T: - case IFM_1000_SX: - DBPRINT(sc, BCE_INFO_PHY, "Enabling GMII interface.\n"); - val |= BCE_EMAC_MODE_PORT_GMII; - break; - default: - DBPRINT(sc, BCE_INFO_PHY, "Unknown link speed, enabling " - "default GMII interface.\n"); - val |= BCE_EMAC_MODE_PORT_GMII; } + if (sc->bce_link_up == FALSE) + return; + /* Set half or full duplex based on PHY settings. */ if ((mii->mii_media_active & IFM_GMASK) == IFM_HDX) { DBPRINT(sc, BCE_INFO_PHY, @@ -2040,7 +2056,7 @@ bce_miibus_statchg(device_t dev) REG_WR(sc, BCE_EMAC_MODE, val); - if ((mii->mii_media_active & IFM_ETH_RXPAUSE) != 0) { + if ((mii->mii_media_active & IFM_ETH_RXPAUSE) != 0) { DBPRINT(sc, BCE_INFO_PHY, "%s(): Enabling RX flow control.\n", __FUNCTION__); BCE_SETBIT(sc, BCE_EMAC_RX_MODE, BCE_EMAC_RX_MODE_FLOW_EN); @@ -2050,7 +2066,7 @@ bce_miibus_statchg(device_t dev) BCE_CLRBIT(sc, BCE_EMAC_RX_MODE, BCE_EMAC_RX_MODE_FLOW_EN); } - if ((mii->mii_media_active & IFM_ETH_TXPAUSE) != 0) { + if ((mii->mii_media_active & IFM_ETH_TXPAUSE) != 0) { DBPRINT(sc, BCE_INFO_PHY, "%s(): Enabling TX flow control.\n", __FUNCTION__); BCE_SETBIT(sc, BCE_EMAC_TX_MODE, BCE_EMAC_TX_MODE_FLOW_EN); @@ -6210,15 +6226,11 @@ bce_phy_intr(struct bce_softc *sc) DBPRINT(sc, BCE_INFO_PHY, "%s(): Link is now DOWN.\n", __FUNCTION__); } - /* - * Assume link is down and allow - * tick routine to update the state - * based on the actual media state. + * Link state changed, allow tick routine to update + * the state baased on actual media state. */ - sc->bce_link_up = FALSE; - callout_stop(&sc->bce_tick_callout); - bce_tick(sc); + sc->bce_link_tick = TRUE; } /* Acknowledge the link change interrupt. */ @@ -6902,12 +6914,13 @@ bce_init_locked(struct bce_softc *sc) /* Enable host interrupts. */ bce_enable_intr(sc, 1); - bce_ifmedia_upd_locked(ifp); - /* Let the OS know the driver is up and running. */ ifp->if_drv_flags |= IFF_DRV_RUNNING; ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; + sc->bce_link_tick = TRUE; + bce_ifmedia_upd_locked(ifp); + callout_reset(&sc->bce_tick_callout, hz, bce_tick, sc); bce_init_locked_exit: @@ -8203,31 +8216,19 @@ bce_tick(void *xsc) bce_watchdog(sc); /* If link is up already up then we're done. */ - if (sc->bce_link_up == TRUE) + if (sc->bce_link_tick == FALSE && sc->bce_link_up == TRUE) goto bce_tick_exit; /* Link is down. Check what the PHY's doing. */ mii = device_get_softc(sc->bce_miibus); mii_tick(mii); - /* Check if the link has come up. */ - if ((mii->mii_media_status & IFM_ACTIVE) && - (IFM_SUBTYPE(mii->mii_media_active) != IFM_NONE)) { + sc->bce_link_tick = FALSE; + /* Now that link is up, handle any outstanding TX traffic. */ + if (sc->bce_link_up == TRUE && !IFQ_DRV_IS_EMPTY(&ifp->if_snd)) { DBPRINT(sc, BCE_VERBOSE_MISC, - "%s(): Link up!\n", __FUNCTION__); - sc->bce_link_up = TRUE; - if ((IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_T || - IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_SX || - IFM_SUBTYPE(mii->mii_media_active) == IFM_2500_SX) && - (bce_verbose || bootverbose)) - BCE_PRINTF("Gigabit link up!\n"); - - /* Now that link is up, handle any outstanding TX traffic. */ - if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) { - DBPRINT(sc, BCE_VERBOSE_MISC, "%s(): Found " - "pending TX traffic.\n", __FUNCTION__); - bce_start_locked(ifp); - } + "%s(): Found pending TX traffic.\n", __FUNCTION__); + bce_start_locked(ifp); } bce_tick_exit: Modified: stable/8/sys/dev/bce/if_bcereg.h ============================================================================== --- stable/8/sys/dev/bce/if_bcereg.h Mon Jan 9 19:07:14 2012 (r229864) +++ stable/8/sys/dev/bce/if_bcereg.h Mon Jan 9 19:08:52 2012 (r229865) @@ -6560,6 +6560,7 @@ struct bce_softc u16 pg_prod; u16 pg_cons; + int bce_link_tick; int bce_link_up; struct callout bce_tick_callout; struct callout bce_pulse_callout; From owner-svn-src-stable-8@FreeBSD.ORG Mon Jan 9 19:20:46 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8289A1065782; Mon, 9 Jan 2012 19:20:46 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 67C658FC12; Mon, 9 Jan 2012 19:20:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q09JKkUU054556; Mon, 9 Jan 2012 19:20:46 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q09JKkXS054553; Mon, 9 Jan 2012 19:20:46 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201201091920.q09JKkXS054553@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 9 Jan 2012 19:20:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229868 - stable/8/sys/dev/bge X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2012 19:20:46 -0000 Author: yongari Date: Mon Jan 9 19:20:46 2012 New Revision: 229868 URL: http://svn.freebsd.org/changeset/base/229868 Log: MFC r228479-228480: r228479: BCM5720 performance tweak from Broadcom. o Allow multiple outstanding read requests from non-LSO read DMA engine. o Allow 4KB burst length reads for non-LSO frames. o Enable 512B burst length reads for buffer descriptors. r228480: Destroy DMA tag for jumbo RX buffer in device detach. Modified: stable/8/sys/dev/bge/if_bge.c stable/8/sys/dev/bge/if_bgereg.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/bge/if_bge.c ============================================================================== --- stable/8/sys/dev/bge/if_bge.c Mon Jan 9 19:18:53 2012 (r229867) +++ stable/8/sys/dev/bge/if_bge.c Mon Jan 9 19:20:46 2012 (r229868) @@ -2084,9 +2084,15 @@ bge_blockinit(struct bge_softc *sc) val |= BGE_RDMAMODE_TSO6_ENABLE; } - if (sc->bge_asicrev == BGE_ASICREV_BCM5720) + if (sc->bge_asicrev == BGE_ASICREV_BCM5720) { val |= CSR_READ_4(sc, BGE_RDMA_MODE) & BGE_RDMAMODE_H2BNC_VLAN_DET; + /* + * Allow multiple outstanding read requests from + * non-LSO read DMA engine. + */ + val &= ~BGE_RDMAMODE_MULT_DMA_RD_DIS; + } if (sc->bge_asicrev == BGE_ASICREV_BCM5761 || sc->bge_asicrev == BGE_ASICREV_BCM5784 || @@ -2116,12 +2122,20 @@ bge_blockinit(struct bge_softc *sc) BGE_RDMA_RSRVCTRL_FIFO_OFLW_FIX); } - if (sc->bge_asicrev == BGE_ASICREV_BCM5719 || - sc->bge_asicrev == BGE_ASICREV_BCM5720) { + if (sc->bge_asicrev == BGE_ASICREV_BCM5719) { CSR_WRITE_4(sc, BGE_RDMA_LSO_CRPTEN_CTRL, CSR_READ_4(sc, BGE_RDMA_LSO_CRPTEN_CTRL) | BGE_RDMA_LSO_CRPTEN_CTRL_BLEN_BD_4K | BGE_RDMA_LSO_CRPTEN_CTRL_BLEN_LSO_4K); + } else if (sc->bge_asicrev == BGE_ASICREV_BCM5720) { + /* + * Allow 4KB burst length reads for non-LSO frames. + * Enable 512B burst length reads for buffer descriptors. + */ + CSR_WRITE_4(sc, BGE_RDMA_LSO_CRPTEN_CTRL, + CSR_READ_4(sc, BGE_RDMA_LSO_CRPTEN_CTRL) | + BGE_RDMA_LSO_CRPTEN_CTRL_BLEN_BD_512 | + BGE_RDMA_LSO_CRPTEN_CTRL_BLEN_LSO_4K); } CSR_WRITE_4(sc, BGE_RDMA_MODE, val); @@ -2348,6 +2362,8 @@ bge_dma_free(struct bge_softc *sc) if (sc->bge_cdata.bge_rx_mtag) bus_dma_tag_destroy(sc->bge_cdata.bge_rx_mtag); + if (sc->bge_cdata.bge_mtag_jumbo) + bus_dma_tag_destroy(sc->bge_cdata.bge_mtag_jumbo); if (sc->bge_cdata.bge_tx_mtag) bus_dma_tag_destroy(sc->bge_cdata.bge_tx_mtag); Modified: stable/8/sys/dev/bge/if_bgereg.h ============================================================================== --- stable/8/sys/dev/bge/if_bgereg.h Mon Jan 9 19:18:53 2012 (r229867) +++ stable/8/sys/dev/bge/if_bgereg.h Mon Jan 9 19:20:46 2012 (r229868) @@ -1573,6 +1573,7 @@ #define BGE_RDMA_RSRVCTRL_FIFO_HWM_MASK 0x000FF000 #define BGE_RDMA_RSRVCTRL_TXMRGN_MASK 0xFFE00000 +#define BGE_RDMA_LSO_CRPTEN_CTRL_BLEN_BD_512 0x00020000 #define BGE_RDMA_LSO_CRPTEN_CTRL_BLEN_BD_4K 0x00030000 #define BGE_RDMA_LSO_CRPTEN_CTRL_BLEN_LSO_4K 0x000C0000 From owner-svn-src-stable-8@FreeBSD.ORG Mon Jan 9 19:30:23 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BDF0E1065670; Mon, 9 Jan 2012 19:30:23 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AC62A8FC13; Mon, 9 Jan 2012 19:30:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q09JUNpm054995; Mon, 9 Jan 2012 19:30:23 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q09JUNUF054993; Mon, 9 Jan 2012 19:30:23 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201201091930.q09JUNUF054993@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 9 Jan 2012 19:30:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229871 - stable/8/sys/dev/fxp X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2012 19:30:23 -0000 Author: yongari Date: Mon Jan 9 19:30:23 2012 New Revision: 229871 URL: http://svn.freebsd.org/changeset/base/229871 Log: MFC r228716: TCP header size is represented by number of 32bits words. Fix the TCP header size calculation such that makes TSO engine cache all header(ethernet/IP/TCP) bytes to its internal buffer. While here, remove extra pull up for TCP payload. Unlike some em(4) controllers, fxp(4) does not require such work around for TSO. The two limitations are ethernet/IP/TCP header size should be less than or equal to the size of controller's internal buffer(80 bytes) and these header information should be found in the first fragment of a TSO frame. Modified: stable/8/sys/dev/fxp/if_fxp.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/fxp/if_fxp.c ============================================================================== --- stable/8/sys/dev/fxp/if_fxp.c Mon Jan 9 19:28:51 2012 (r229870) +++ stable/8/sys/dev/fxp/if_fxp.c Mon Jan 9 19:30:23 2012 (r229871) @@ -1454,7 +1454,7 @@ fxp_encap(struct fxp_softc *sc, struct m return (ENOBUFS); } tcp = (struct tcphdr *)(mtod(m, char *) + poff); - m = m_pullup(m, poff + sizeof(struct tcphdr) + tcp->th_off); + m = m_pullup(m, poff + (tcp->th_off << 2)); if (m == NULL) { *m_head = NULL; return (ENOBUFS); From owner-svn-src-stable-8@FreeBSD.ORG Mon Jan 9 19:58:42 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 01116106566C; Mon, 9 Jan 2012 19:58:42 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E3A278FC0C; Mon, 9 Jan 2012 19:58:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q09JwfJn056027; Mon, 9 Jan 2012 19:58:41 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q09JwfGb056025; Mon, 9 Jan 2012 19:58:41 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201201091958.q09JwfGb056025@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 9 Jan 2012 19:58:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229875 - stable/8/sys/dev/msk X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2012 19:58:42 -0000 Author: yongari Date: Mon Jan 9 19:58:41 2012 New Revision: 229875 URL: http://svn.freebsd.org/changeset/base/229875 Log: MFC r228717: Increase wait time for OP_TCPSTART command processing. It seems 100us is not enough to ensure prefetch unit work. Modified: stable/8/sys/dev/msk/if_msk.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/msk/if_msk.c ============================================================================== --- stable/8/sys/dev/msk/if_msk.c Mon Jan 9 19:57:07 2012 (r229874) +++ stable/8/sys/dev/msk/if_msk.c Mon Jan 9 19:58:41 2012 (r229875) @@ -656,8 +656,8 @@ msk_rx_fill(struct msk_if_softc *sc_if, if ((sc_if->msk_flags & MSK_FLAG_DESCV2) == 0 && (sc_if->msk_ifp->if_capenable & IFCAP_RXCSUM) != 0) { /* Wait until controller executes OP_TCPSTART command. */ - for (i = 10; i > 0; i--) { - DELAY(10); + for (i = 100; i > 0; i--) { + DELAY(100); idx = CSR_READ_2(sc_if->msk_softc, Y2_PREF_Q_ADDR(sc_if->msk_rxq, PREF_UNIT_GET_IDX_REG)); From owner-svn-src-stable-8@FreeBSD.ORG Mon Jan 9 20:07:38 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B879E106564A; Mon, 9 Jan 2012 20:07:38 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8C4058FC18; Mon, 9 Jan 2012 20:07:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q09K7cIE056499; Mon, 9 Jan 2012 20:07:38 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q09K7cHf056496; Mon, 9 Jan 2012 20:07:38 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201201092007.q09K7cHf056496@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 9 Jan 2012 20:07:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229877 - in stable/8/sys: dev/msk sparc64/pci X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2012 20:07:38 -0000 Author: yongari Date: Mon Jan 9 20:07:38 2012 New Revision: 229877 URL: http://svn.freebsd.org/changeset/base/229877 Log: MFC r212378: Catch up to rename of the constant for the Master Data Parity Error bit in the PCI status register. Modified: stable/8/sys/dev/msk/if_msk.c stable/8/sys/sparc64/pci/schizo.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/msk/if_msk.c ============================================================================== --- stable/8/sys/dev/msk/if_msk.c Mon Jan 9 19:59:53 2012 (r229876) +++ stable/8/sys/dev/msk/if_msk.c Mon Jan 9 20:07:38 2012 (r229877) @@ -1392,7 +1392,7 @@ mskc_reset(struct msk_softc *sc) pci_write_config(sc->msk_dev, PCIR_STATUS, status | PCIM_STATUS_PERR | PCIM_STATUS_SERR | PCIM_STATUS_RMABORT | - PCIM_STATUS_RTABORT | PCIM_STATUS_PERRREPORT, 2); + PCIM_STATUS_RTABORT | PCIM_STATUS_MDPERR, 2); CSR_WRITE_2(sc, B0_CTST, CS_MRST_CLR); switch (sc->msk_bustype) { @@ -3518,7 +3518,7 @@ msk_intr_hwerr(struct msk_softc *sc) CSR_WRITE_1(sc, B2_TST_CTRL1, TST_CFG_WRITE_ON); pci_write_config(sc->msk_dev, PCIR_STATUS, v16 | PCIM_STATUS_PERR | PCIM_STATUS_SERR | PCIM_STATUS_RMABORT | - PCIM_STATUS_RTABORT | PCIM_STATUS_PERRREPORT, 2); + PCIM_STATUS_RTABORT | PCIM_STATUS_MDPERR, 2); CSR_WRITE_1(sc, B2_TST_CTRL1, TST_CFG_WRITE_OFF); } Modified: stable/8/sys/sparc64/pci/schizo.c ============================================================================== --- stable/8/sys/sparc64/pci/schizo.c Mon Jan 9 19:59:53 2012 (r229876) +++ stable/8/sys/sparc64/pci/schizo.c Mon Jan 9 20:07:38 2012 (r229877) @@ -882,7 +882,7 @@ schizo_pci_bus(void *arg) fatal = 1; if ((status & (PCIM_STATUS_PERR | PCIM_STATUS_SERR | PCIM_STATUS_RMABORT | PCIM_STATUS_RTABORT | - PCIM_STATUS_PERRREPORT)) != 0 || + PCIM_STATUS_MDPERR)) != 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 || From owner-svn-src-stable-8@FreeBSD.ORG Mon Jan 9 20:14:53 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 410DB1065670; Mon, 9 Jan 2012 20:14:53 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2F8098FC12; Mon, 9 Jan 2012 20:14:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q09KEroX056885; Mon, 9 Jan 2012 20:14:53 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q09KErjK056883; Mon, 9 Jan 2012 20:14:53 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201201092014.q09KErjK056883@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 9 Jan 2012 20:14:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229879 - stable/8/sys/dev/msk X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2012 20:14:53 -0000 Author: yongari Date: Mon Jan 9 20:14:52 2012 New Revision: 229879 URL: http://svn.freebsd.org/changeset/base/229879 Log: MFC r198999: Take a step towards removing if_watchdog/if_timer. Don't explicitly set if_watchdog/if_timer to NULL/0 when initializing an ifnet. if_alloc() sets those members to NULL/0 already. Modified: stable/8/sys/dev/msk/if_msk.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/msk/if_msk.c ============================================================================== --- stable/8/sys/dev/msk/if_msk.c Mon Jan 9 20:08:57 2012 (r229878) +++ stable/8/sys/dev/msk/if_msk.c Mon Jan 9 20:14:52 2012 (r229879) @@ -1661,8 +1661,6 @@ msk_attach(device_t dev) ifp->if_capenable = ifp->if_capabilities; ifp->if_ioctl = msk_ioctl; ifp->if_start = msk_start; - ifp->if_timer = 0; - ifp->if_watchdog = NULL; ifp->if_init = msk_init; IFQ_SET_MAXLEN(&ifp->if_snd, MSK_TX_RING_CNT - 1); ifp->if_snd.ifq_drv_maxlen = MSK_TX_RING_CNT - 1; From owner-svn-src-stable-8@FreeBSD.ORG Tue Jan 10 00:03:31 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4385C1065679; Tue, 10 Jan 2012 00:03:31 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2BCC18FC1D; Tue, 10 Jan 2012 00:03:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q0A03Ve7067954; Tue, 10 Jan 2012 00:03:31 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q0A03U4m067946; Tue, 10 Jan 2012 00:03:30 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201201100003.q0A03U4m067946@svn.freebsd.org> From: Eitan Adler Date: Tue, 10 Jan 2012 00:03:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229889 - in stable/8: sbin/ipfw sys/cam/scsi sys/fs/devfs sys/netinet usr.sbin/mtree usr.sbin/pmcstat X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2012 00:03:31 -0000 Author: eadler (ports committer) Date: Tue Jan 10 00:03:30 2012 New Revision: 229889 URL: http://svn.freebsd.org/changeset/base/229889 Log: MFC 227489: - fix duplicate "a a" in some comments Approved by: simon Modified: stable/8/sbin/ipfw/main.c stable/8/sys/cam/scsi/scsi_ch.h stable/8/sys/cam/scsi/scsi_ses.c stable/8/sys/fs/devfs/devfs_rule.c stable/8/sys/netinet/sctp_structs.h stable/8/usr.sbin/mtree/mtree.5 stable/8/usr.sbin/pmcstat/pmcstat.c Directory Properties: stable/8/sbin/ipfw/ (props changed) stable/8/sys/ (props changed) stable/8/usr.sbin/mtree/ (props changed) stable/8/usr.sbin/pmcstat/ (props changed) Modified: stable/8/sbin/ipfw/main.c ============================================================================== --- stable/8/sbin/ipfw/main.c Tue Jan 10 00:01:17 2012 (r229888) +++ stable/8/sbin/ipfw/main.c Tue Jan 10 00:03:30 2012 (r229889) @@ -87,7 +87,7 @@ help(void) * which includes the program name and a NULL entry at the end. * If we are called with a single string, we split it on whitespace. * Also, arguments with a trailing ',' are joined to the next one. - * The pointers (av[]) and data are in a a single chunk of memory. + * The pointers (av[]) and data are in a single chunk of memory. * av[0] points to the original program name, all other entries * point into the allocated chunk. */ Modified: stable/8/sys/cam/scsi/scsi_ch.h ============================================================================== --- stable/8/sys/cam/scsi/scsi_ch.h Tue Jan 10 00:01:17 2012 (r229888) +++ stable/8/sys/cam/scsi/scsi_ch.h Tue Jan 10 00:03:30 2012 (r229889) @@ -359,7 +359,7 @@ struct page_device_capabilities { * Some of these fields can be a little confusing, so an explanation * is in order. * - * Each component within a a medium changer apparatus is called an + * Each component within a medium changer apparatus is called an * "element". * * The "medium transport element address" is the address of the first Modified: stable/8/sys/cam/scsi/scsi_ses.c ============================================================================== --- stable/8/sys/cam/scsi/scsi_ses.c Tue Jan 10 00:01:17 2012 (r229888) +++ stable/8/sys/cam/scsi/scsi_ses.c Tue Jan 10 00:03:30 2012 (r229889) @@ -714,7 +714,7 @@ ses_log(struct ses_softc *ssc, const cha /* * Is this a device that supports enclosure services? * - * It's a a pretty simple ruleset- if it is device type 0x0D (13), it's + * It's a pretty simple ruleset- if it is device type 0x0D (13), it's * an SES device. If it happens to be an old UNISYS SEN device, we can * handle that too. */ Modified: stable/8/sys/fs/devfs/devfs_rule.c ============================================================================== --- stable/8/sys/fs/devfs/devfs_rule.c Tue Jan 10 00:01:17 2012 (r229888) +++ stable/8/sys/fs/devfs/devfs_rule.c Tue Jan 10 00:03:30 2012 (r229889) @@ -617,7 +617,7 @@ devfs_rule_run(struct devfs_krule *dk, s * XXX: not work as this is called when devices are created * XXX: long time after the rules were instantiated. * XXX: a printf() would probably give too much noise, or - * XXX: DoS the machine. I guess a a rate-limited message + * XXX: DoS the machine. I guess a rate-limited message * XXX: might work. */ if (depth > 0) { Modified: stable/8/sys/netinet/sctp_structs.h ============================================================================== --- stable/8/sys/netinet/sctp_structs.h Tue Jan 10 00:01:17 2012 (r229888) +++ stable/8/sys/netinet/sctp_structs.h Tue Jan 10 00:03:30 2012 (r229889) @@ -350,7 +350,7 @@ TAILQ_HEAD(sctpchunk_listhead, sctp_tmit #define CHUNK_FLAGS_PR_SCTP_BUF SCTP_PR_SCTP_BUF #define CHUNK_FLAGS_PR_SCTP_RTX SCTP_PR_SCTP_RTX -/* The upper byte is used a a bit mask */ +/* The upper byte is used as a bit mask */ #define CHUNK_FLAGS_FRAGMENT_OK 0x0100 struct chk_id { Modified: stable/8/usr.sbin/mtree/mtree.5 ============================================================================== --- stable/8/usr.sbin/mtree/mtree.5 Tue Jan 10 00:01:17 2012 (r229888) +++ stable/8/usr.sbin/mtree/mtree.5 Tue Jan 10 00:03:30 2012 (r229889) @@ -48,7 +48,7 @@ Leading whitespace is always ignored. .Pp When encoding file or pathnames, any backslash character or character outside of the 95 printable ASCII characters must be -encoded as a a backslash followed by three +encoded as a backslash followed by three octal digits. When reading mtree files, any appearance of a backslash followed by three octal digits should be converted into the Modified: stable/8/usr.sbin/pmcstat/pmcstat.c ============================================================================== --- stable/8/usr.sbin/pmcstat/pmcstat.c Tue Jan 10 00:01:17 2012 (r229888) +++ stable/8/usr.sbin/pmcstat/pmcstat.c Tue Jan 10 00:03:30 2012 (r229889) @@ -1023,7 +1023,7 @@ main(int argc, char **argv) /* * Check if "-k kerneldir" was specified, and if whether - * 'kerneldir' actually refers to a a file. If so, use + * 'kerneldir' actually refers to a file. If so, use * `dirname path` to determine the kernel directory. */ if (args.pa_flags & FLAG_HAS_KERNELPATH) { From owner-svn-src-stable-8@FreeBSD.ORG Tue Jan 10 00:19:18 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8BC4D1065675; Tue, 10 Jan 2012 00:19:18 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 724BE8FC08; Tue, 10 Jan 2012 00:19:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q0A0JIMt069195; Tue, 10 Jan 2012 00:19:18 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q0A0JILb069193; Tue, 10 Jan 2012 00:19:18 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201201100019.q0A0JILb069193@svn.freebsd.org> From: Eitan Adler Date: Tue, 10 Jan 2012 00:19:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229890 - stable/8/sys/dev/puc X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2012 00:19:18 -0000 Author: eadler (ports committer) Date: Tue Jan 10 00:19:18 2012 New Revision: 229890 URL: http://svn.freebsd.org/changeset/base/229890 Log: MFC 226404: - add support for I-O DATA RSA-PCI2/R PR: kern/142999 Approved by: jhb Modified: stable/8/sys/dev/puc/pucdata.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/dev/puc/pucdata.c ============================================================================== --- stable/8/sys/dev/puc/pucdata.c Tue Jan 10 00:03:30 2012 (r229889) +++ stable/8/sys/dev/puc/pucdata.c Tue Jan 10 00:19:18 2012 (r229890) @@ -645,6 +645,12 @@ const struct puc_cfg puc_pci_devices[] = * As sold by Kouwell . * I/O Flex PCI I/O Card Model-223 with 4 serial and 1 parallel ports. */ + { + 0x1415, 0x9501, 0x10fc ,0xc070, + "I-O DATA RSA-PCI2/R", + DEFAULT_RCLK * 8, + PUC_PORT_2S, 0x10, 0, 8, + }, { 0x1415, 0x9501, 0x131f, 0x2050, "SIIG Cyber 4 PCI 16550", From owner-svn-src-stable-8@FreeBSD.ORG Tue Jan 10 00:27:16 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 77302106566B; Tue, 10 Jan 2012 00:27:16 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 61B1E8FC13; Tue, 10 Jan 2012 00:27:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q0A0RG8D069927; Tue, 10 Jan 2012 00:27:16 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q0A0RGGw069925; Tue, 10 Jan 2012 00:27:16 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201201100027.q0A0RGGw069925@svn.freebsd.org> From: Eitan Adler Date: Tue, 10 Jan 2012 00:27:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229893 - stable/8/sys/dev/sio X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2012 00:27:16 -0000 Author: eadler (ports committer) Date: Tue Jan 10 00:27:16 2012 New Revision: 229893 URL: http://svn.freebsd.org/changeset/base/229893 Log: MFC r227532: - add support for Broadcom 802.11bg/EDGE/GPRS CardBus (Serial) - correct mislabeling of 0x432214e4 device PR: kern/119606 Approved by: jhb Modified: stable/8/sys/dev/sio/sio_pci.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/dev/sio/sio_pci.c ============================================================================== --- stable/8/sys/dev/sio/sio_pci.c Tue Jan 10 00:26:54 2012 (r229892) +++ stable/8/sys/dev/sio/sio_pci.c Tue Jan 10 00:27:16 2012 (r229893) @@ -76,7 +76,8 @@ static struct pci_ids pci_ids[] = { { 0x7101135e, "SeaLevel Ultra 530.PCI Single Port Serial", 0x18 }, { 0x0000151f, "SmartLink 5634PCV SurfRider", 0x10 }, { 0x0103115d, "Xircom Cardbus modem", 0x10 }, - { 0x432214e4, "Broadcom 802.11g/GPRS CardBus (Serial)", 0x10 }, + { 0x432214e4, "Broadcom 802.11b/GPRS CardBus (Serial)", 0x10 }, + { 0x434414e4, "Broadcom 802.11bg/EDGE/GPRS CardBus (Serial)", 0x10 }, { 0x01c0135c, "Quatech SSCLP-200/300", 0x18 /* * NB: You must mount the "SPAD" jumper to correctly detect From owner-svn-src-stable-8@FreeBSD.ORG Tue Jan 10 00:35:02 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3A60E1065701; Tue, 10 Jan 2012 00:35:02 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2456C8FC08; Tue, 10 Jan 2012 00:35:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q0A0Z20V070642; Tue, 10 Jan 2012 00:35:02 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q0A0Z2F6070640; Tue, 10 Jan 2012 00:35:02 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201201100035.q0A0Z2F6070640@svn.freebsd.org> From: Eitan Adler Date: Tue, 10 Jan 2012 00:35:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229896 - stable/8/sys/dev/puc X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2012 00:35:02 -0000 Author: eadler (ports committer) Date: Tue Jan 10 00:35:01 2012 New Revision: 229896 URL: http://svn.freebsd.org/changeset/base/229896 Log: MFC r227535: - add support for Titan VScom PCIex-800H PR: kern/124128 Approved by: jhb Modified: stable/8/sys/dev/puc/pucdata.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/dev/puc/pucdata.c ============================================================================== --- stable/8/sys/dev/puc/pucdata.c Tue Jan 10 00:34:40 2012 (r229895) +++ stable/8/sys/dev/puc/pucdata.c Tue Jan 10 00:35:01 2012 (r229896) @@ -850,6 +850,18 @@ const struct puc_cfg puc_pci_devices[] = PUC_PORT_2S, 0x10, 4, 0, }, + { 0x14d2, 0xa007, 0xffff, 0, + "Titan VScom PCIex-800H", + DEFAULT_RCLK * 8, + PUC_PORT_4S, 0x10, 0, 8, + }, + + { 0x14d2, 0xa008, 0xffff, 0, + "Titan VScom PCIex-800H", + DEFAULT_RCLK * 8, + PUC_PORT_4S, 0x10, 0, 8, + }, + { 0x14db, 0x2130, 0xffff, 0, "Avlab Technology, PCI IO 2S", DEFAULT_RCLK, From owner-svn-src-stable-8@FreeBSD.ORG Tue Jan 10 01:02:19 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DAB2A106566B; Tue, 10 Jan 2012 01:02:19 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C47E48FC08; Tue, 10 Jan 2012 01:02:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q0A12JNj072730; Tue, 10 Jan 2012 01:02:19 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q0A12JML072727; Tue, 10 Jan 2012 01:02:19 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201201100102.q0A12JML072727@svn.freebsd.org> From: Eitan Adler Date: Tue, 10 Jan 2012 01:02:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229900 - in stable/8/usr.sbin: fwcontrol newsyslog X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2012 01:02:20 -0000 Author: eadler (ports committer) Date: Tue Jan 10 01:02:19 2012 New Revision: 229900 URL: http://svn.freebsd.org/changeset/base/229900 Log: - Remove extraneous null ptr deref checks - Fix memory leak Approved by: jhb Modified: stable/8/usr.sbin/fwcontrol/fwcontrol.c stable/8/usr.sbin/newsyslog/newsyslog.c Directory Properties: stable/8/usr.sbin/fwcontrol/ (props changed) stable/8/usr.sbin/newsyslog/ (props changed) Modified: stable/8/usr.sbin/fwcontrol/fwcontrol.c ============================================================================== --- stable/8/usr.sbin/fwcontrol/fwcontrol.c Tue Jan 10 01:01:57 2012 (r229899) +++ stable/8/usr.sbin/fwcontrol/fwcontrol.c Tue Jan 10 01:02:19 2012 (r229900) @@ -152,8 +152,7 @@ str2node(int fd, const char *nodestr) fweui2eui64(&data->dev[i].eui, &tmpeui); if (memcmp(&eui, &tmpeui, sizeof(struct eui64)) == 0) { node = data->dev[i].dst; - if (data != NULL) - free(data); + free(data); goto gotnode; } } Modified: stable/8/usr.sbin/newsyslog/newsyslog.c ============================================================================== --- stable/8/usr.sbin/newsyslog/newsyslog.c Tue Jan 10 01:01:57 2012 (r229899) +++ stable/8/usr.sbin/newsyslog/newsyslog.c Tue Jan 10 01:02:19 2012 (r229900) @@ -1914,9 +1914,10 @@ do_zipwork(struct zipwork_entry *zwork) pid_t pidzip, wpid; char zresult[MAXPATHLEN]; + assert(zwork != NULL); pgm_path = NULL; strlcpy(zresult, zwork->zw_fname, sizeof(zresult)); - if (zwork != NULL && zwork->zw_conf != NULL && + if (zwork->zw_conf != NULL && zwork->zw_conf->compress > COMPRESS_NONE) for (int c = 1; c < COMPRESS_TYPES; c++) { if (zwork->zw_conf->compress == c) { From owner-svn-src-stable-8@FreeBSD.ORG Tue Jan 10 02:04:14 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 11EE4106566B; Tue, 10 Jan 2012 02:04:14 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from esa-annu.mail.uoguelph.ca (esa-annu.mail.uoguelph.ca [131.104.91.36]) by mx1.freebsd.org (Postfix) with ESMTP id 7F2B28FC08; Tue, 10 Jan 2012 02:04:13 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ap4EACGVC0+DaFvO/2dsb2JhbABDhQ+oTYFyAQEFI1YMDw4GBgINGQJZBogVpF6RfIEvgk6GfoEWBIg5jE+SVw X-IronPort-AV: E=Sophos;i="4.71,484,1320642000"; d="scan'208";a="151360295" Received: from erie.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca) ([131.104.91.206]) by esa-annu-pri.mail.uoguelph.ca with ESMTP; 09 Jan 2012 20:34:46 -0500 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id 1C05FB3EB1; Mon, 9 Jan 2012 20:34:46 -0500 (EST) Date: Mon, 9 Jan 2012 20:34:46 -0500 (EST) From: Rick Macklem To: John Baldwin Message-ID: <2015325900.1122521.1326159286096.JavaMail.root@erie.cs.uoguelph.ca> In-Reply-To: <201201091846.q09Ik3eo053098@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [172.17.91.201] X-Mailer: Zimbra 6.0.10_GA_2692 (ZimbraWebClient - FF3.0 (Win)/6.0.10_GA_2692) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r229861 - stable/8/sys/fs/nfsserver X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2012 02:04:14 -0000 Thanks John. Sorry about that. Pointy hat goes on me. rick ps: I probably shouldn't have merged in into stable/8, but since you've fixed it, it might as well stay there. ----- Original Message ----- > Author: jhb > Date: Mon Jan 9 18:46:03 2012 > New Revision: 229861 > URL: http://svn.freebsd.org/changeset/base/229861 > > Log: > The sysctls for the new NFS server on stable/8 live under vfs.newnfs > rather than vfs.nfsd. > > Modified: > stable/8/sys/fs/nfsserver/nfs_nfsdsubs.c > > Modified: stable/8/sys/fs/nfsserver/nfs_nfsdsubs.c > ============================================================================== > --- stable/8/sys/fs/nfsserver/nfs_nfsdsubs.c Mon Jan 9 18:33:54 2012 > (r229860) > +++ stable/8/sys/fs/nfsserver/nfs_nfsdsubs.c Mon Jan 9 18:46:03 2012 > (r229861) > @@ -56,10 +56,10 @@ static nfstype newnfsv2_type[9] = { NFNO > extern nfstype nfsv34_type[9]; > #endif /* !APPLEKEXT */ > > -SYSCTL_DECL(_vfs_nfsd); > +SYSCTL_DECL(_vfs_newnfs); > > static int disable_checkutf8 = 0; > -SYSCTL_INT(_vfs_nfsd, OID_AUTO, disable_checkutf8, CTLFLAG_RW, > +SYSCTL_INT(_vfs_newnfs, OID_AUTO, disable_checkutf8, CTLFLAG_RW, > &disable_checkutf8, 0, > "Disable the NFSv4 check for a UTF8 compliant name"); From owner-svn-src-stable-8@FreeBSD.ORG Tue Jan 10 02:55:44 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2640010657C9; Tue, 10 Jan 2012 02:55:44 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0F1D28FC1C; Tue, 10 Jan 2012 02:55:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q0A2thbR079505; Tue, 10 Jan 2012 02:55:43 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q0A2thfD079502; Tue, 10 Jan 2012 02:55:43 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201201100255.q0A2thfD079502@svn.freebsd.org> From: Rick Macklem Date: Tue, 10 Jan 2012 02:55:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229906 - in stable/8/sys: fs/nfs nfsclient X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2012 02:55:44 -0000 Author: rmacklem Date: Tue Jan 10 02:55:43 2012 New Revision: 229906 URL: http://svn.freebsd.org/changeset/base/229906 Log: MFC: r228757 jwd@ reported a problem via email where the old NFS client would get a reply of EEXIST from an NFS server when a Mkdir RPC was retried, for an NFS over UDP mount. Upon investigation, it was found that the client was retransmitting the Mkdir RPC request over UDP, but with a different xid. As such, the retransmitted message would miss the Duplicate Request Cache in the server, causing it to reply EEXIST. The kernel client side UDP rpc code has two timers. The first one causes a retransmit using the same xid and socket and was set to a fixed value of 3seconds. (The default can be overridden via CLSET_RETRY_TIMEOUT.) The second one creates a new socket and xid and should be larger than the first. However, both NFS clients were setting the second timer to nm_timeo ("timeout=" mount argument), which defaulted to 1second, so the first timer would never time out. This patch fixes both NFS clients so that they set the first timer using nm_timeo and makes the second timer larger than the first one. Modified: stable/8/sys/fs/nfs/nfs_commonkrpc.c stable/8/sys/nfsclient/nfs_krpc.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/fs/nfs/nfs_commonkrpc.c ============================================================================== --- stable/8/sys/fs/nfs/nfs_commonkrpc.c Tue Jan 10 02:55:43 2012 (r229905) +++ stable/8/sys/fs/nfs/nfs_commonkrpc.c Tue Jan 10 02:55:43 2012 (r229906) @@ -145,6 +145,7 @@ newnfs_connect(struct nfsmount *nmp, str struct socket *so; int one = 1, retries, error = 0; struct thread *td = curthread; + struct timeval timo; /* * We need to establish the socket using the credentials of @@ -241,9 +242,18 @@ newnfs_connect(struct nfsmount *nmp, str CLNT_CONTROL(client, CLSET_INTERRUPTIBLE, &one); if ((nmp->nm_flag & NFSMNT_RESVPORT)) CLNT_CONTROL(client, CLSET_PRIVPORT, &one); - if (NFSHASSOFT(nmp)) - retries = nmp->nm_retry; - else + if (NFSHASSOFT(nmp)) { + if (nmp->nm_sotype == SOCK_DGRAM) + /* + * For UDP, the large timeout for a reconnect + * will be set to "nm_retry * nm_timeo / 2", so + * we only want to do 2 reconnect timeout + * retries. + */ + retries = 2; + else + retries = nmp->nm_retry; + } else retries = INT_MAX; } else { /* @@ -261,6 +271,27 @@ newnfs_connect(struct nfsmount *nmp, str } CLNT_CONTROL(client, CLSET_RETRIES, &retries); + if (nmp != NULL) { + /* + * For UDP, there are 2 timeouts: + * - CLSET_RETRY_TIMEOUT sets the initial timeout for the timer + * that does a retransmit of an RPC request using the same + * socket and xid. This is what you normally want to do, + * since NFS servers depend on "same xid" for their + * Duplicate Request Cache. + * - timeout specified in CLNT_CALL_MBUF(), which specifies when + * retransmits on the same socket should fail and a fresh + * socket created. Each of these timeouts counts as one + * CLSET_RETRIES as set above. + * Set the initial retransmit timeout for UDP. This timeout + * doesn't exist for TCP and the following call just fails, + * which is ok. + */ + timo.tv_sec = nmp->nm_timeo / NFS_HZ; + timo.tv_usec = (nmp->nm_timeo % NFS_HZ) * 1000000 / NFS_HZ; + CLNT_CONTROL(client, CLSET_RETRY_TIMEOUT, &timo); + } + mtx_lock(&nrp->nr_mtx); if (nrp->nr_client != NULL) { /* @@ -419,7 +450,7 @@ newnfs_request(struct nfsrv_descript *nd { u_int32_t *tl; time_t waituntil; - int i, j, set_uid = 0, set_sigset = 0; + int i, j, set_uid = 0, set_sigset = 0, timeo; int trycnt, error = 0, usegssname = 0, secflavour = AUTH_SYS; u_int16_t procnum; u_int trylater_delay = 1; @@ -582,6 +613,12 @@ newnfs_request(struct nfsrv_descript *nd } trycnt = 0; tryagain: + /* + * This timeout specifies when a new socket should be created, + * along with new xid values. For UDP, this should be done + * infrequently, since retransmits of RPC requests should normally + * use the same xid. + */ if (nmp == NULL) { timo.tv_usec = 0; if (clp == NULL) @@ -596,8 +633,22 @@ tryagain: else timo.tv_sec = NFS_TCPTIMEO; } else { - timo.tv_sec = nmp->nm_timeo / NFS_HZ; - timo.tv_usec = (nmp->nm_timeo * 1000000) / NFS_HZ; + if (NFSHASSOFT(nmp)) { + /* + * CLSET_RETRIES is set to 2, so this should be + * half of the total timeout required. + */ + timeo = nmp->nm_retry * nmp->nm_timeo / 2; + if (timeo < 1) + timeo = 1; + timo.tv_sec = timeo / NFS_HZ; + timo.tv_usec = (timeo % NFS_HZ) * 1000000 / + NFS_HZ; + } else { + /* For UDP hard mounts, use a large value. */ + timo.tv_sec = NFS_MAXTIMEO / NFS_HZ; + timo.tv_usec = 0; + } } if (rep != NULL) { Modified: stable/8/sys/nfsclient/nfs_krpc.c ============================================================================== --- stable/8/sys/nfsclient/nfs_krpc.c Tue Jan 10 02:55:43 2012 (r229905) +++ stable/8/sys/nfsclient/nfs_krpc.c Tue Jan 10 02:55:43 2012 (r229906) @@ -191,6 +191,7 @@ nfs_connect(struct nfsmount *nmp) struct netconfig *nconf; rpcvers_t vers; int one = 1, retries; + struct timeval timo; /* * We need to establish the socket using the credentials of @@ -258,12 +259,37 @@ nfs_connect(struct nfsmount *nmp) CLNT_CONTROL(client, CLSET_INTERRUPTIBLE, &one); if (nmp->nm_flag & NFSMNT_RESVPORT) CLNT_CONTROL(client, CLSET_PRIVPORT, &one); - if (nmp->nm_flag & NFSMNT_SOFT) - retries = nmp->nm_retry; - else + if ((nmp->nm_flag & NFSMNT_SOFT) != 0) { + if (nmp->nm_sotype == SOCK_DGRAM) + /* + * For UDP, the large timeout for a reconnect will + * be set to "nm_retry * nm_timeo / 2", so we only + * want to do 2 reconnect timeout retries. + */ + retries = 2; + else + retries = nmp->nm_retry; + } else retries = INT_MAX; CLNT_CONTROL(client, CLSET_RETRIES, &retries); + /* + * For UDP, there are 2 timeouts: + * - CLSET_RETRY_TIMEOUT sets the initial timeout for the timer + * that does a retransmit of an RPC request using the same socket + * and xid. This is what you normally want to do, since NFS + * servers depend on "same xid" for their Duplicate Request Cache. + * - timeout specified in CLNT_CALL_MBUF(), which specifies when + * retransmits on the same socket should fail and a fresh socket + * created. Each of these timeouts counts as one CLSET_RETRIES, + * as set above. + * Set the initial retransmit timeout for UDP. This timeout doesn't + * exist for TCP and the following call just fails, which is ok. + */ + timo.tv_sec = nmp->nm_timeo / NFS_HZ; + timo.tv_usec = (nmp->nm_timeo % NFS_HZ) * 1000000 / NFS_HZ; + CLNT_CONTROL(client, CLSET_RETRY_TIMEOUT, &timo); + mtx_lock(&nmp->nm_mtx); if (nmp->nm_client) { /* @@ -411,7 +437,7 @@ nfs_request(struct vnode *vp, struct mbu struct mbuf *md; time_t waituntil; caddr_t dpos; - int error = 0; + int error = 0, timeo; struct timeval now; AUTH *auth = NULL; enum nfs_rto_timer_t timer; @@ -486,8 +512,32 @@ nfs_request(struct vnode *vp, struct mbu nfsstats.rpcrequests++; tryagain: - timo.tv_sec = nmp->nm_timeo / NFS_HZ; - timo.tv_usec = (nmp->nm_timeo * 1000000) / NFS_HZ; + /* + * This timeout specifies when a new socket should be created, + * along with new xid values. For UDP, this should be done + * infrequently, since retransmits of RPC requests should normally + * use the same xid. + */ + if (nmp->nm_sotype == SOCK_DGRAM) { + if ((nmp->nm_flag & NFSMNT_SOFT) != 0) { + /* + * CLSET_RETRIES is set to 2, so this should be half + * of the total timeout required. + */ + timeo = nmp->nm_retry * nmp->nm_timeo / 2; + if (timeo < 1) + timeo = 1; + timo.tv_sec = timeo / NFS_HZ; + timo.tv_usec = (timeo % NFS_HZ) * 1000000 / NFS_HZ; + } else { + /* For UDP hard mounts, use a large value. */ + timo.tv_sec = NFS_MAXTIMEO / NFS_HZ; + timo.tv_usec = 0; + } + } else { + timo.tv_sec = nmp->nm_timeo / NFS_HZ; + timo.tv_usec = (nmp->nm_timeo % NFS_HZ) * 1000000 / NFS_HZ; + } mrep = NULL; stat = CLNT_CALL_MBUF(nmp->nm_client, &ext, (nmp->nm_flag & NFSMNT_NFSV3) ? procnum : nfsv2_procid[procnum], From owner-svn-src-stable-8@FreeBSD.ORG Tue Jan 10 08:41:11 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0B1A2106566B; Tue, 10 Jan 2012 08:41:11 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EA20D8FC08; Tue, 10 Jan 2012 08:41:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q0A8fA1I098217; Tue, 10 Jan 2012 08:41:10 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q0A8fAH9098207; Tue, 10 Jan 2012 08:41:10 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201201100841.q0A8fAH9098207@svn.freebsd.org> From: Fabien Thomas Date: Tue, 10 Jan 2012 08:41:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229928 - in stable/8: share/man/man4 sys/amd64/conf sys/conf sys/dev/viawd sys/i386/conf sys/modules sys/modules/viawd X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2012 08:41:11 -0000 Author: fabient Date: Tue Jan 10 08:41:10 2012 New Revision: 229928 URL: http://svn.freebsd.org/changeset/base/229928 Log: MFC r228431, r228502, r228802: Add watchdog support for VIA south bridge chipset. Tested on VT8251, VX900 but CX700, VX800, VX855 should works. Added: stable/8/share/man/man4/viawd.4 - copied unchanged from r228431, head/share/man/man4/viawd.4 stable/8/sys/dev/viawd/ - copied from r228431, head/sys/dev/viawd/ stable/8/sys/modules/viawd/ - copied from r228431, head/sys/modules/viawd/ Modified: stable/8/share/man/man4/Makefile stable/8/sys/amd64/conf/NOTES stable/8/sys/conf/files.amd64 stable/8/sys/conf/files.i386 stable/8/sys/dev/viawd/viawd.c stable/8/sys/dev/viawd/viawd.h stable/8/sys/i386/conf/NOTES stable/8/sys/modules/Makefile Directory Properties: stable/8/share/man/man4/ (props changed) stable/8/sys/ (props changed) Modified: stable/8/share/man/man4/Makefile ============================================================================== --- stable/8/share/man/man4/Makefile Tue Jan 10 08:16:28 2012 (r229927) +++ stable/8/share/man/man4/Makefile Tue Jan 10 08:41:10 2012 (r229928) @@ -482,6 +482,7 @@ MAN= aac.4 \ vga.4 \ vge.4 \ viapm.4 \ + ${_viawd.4} \ vinum.4 \ vkbd.4 \ vlan.4 \ @@ -688,6 +689,7 @@ _speaker.4= speaker.4 _spkr.4= spkr.4 _tpm.4= tpm.4 _urtw.4= urtw.4 +_viawd.4= viawd.4 _wpi.4= wpi.4 _xen.4= xen.4 Copied: stable/8/share/man/man4/viawd.4 (from r228431, head/share/man/man4/viawd.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/share/man/man4/viawd.4 Tue Jan 10 08:41:10 2012 (r229928, copy of r228431, head/share/man/man4/viawd.4) @@ -0,0 +1,79 @@ +.\"- +.\" Copyright (c) 2011 Fabien Thomas +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS `AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd December 7, 2011 +.Dt VIAWD 4 +.Os +.Sh NAME +.Nm viawd +.Nd device driver for VIA south bridge watchdog timer +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following line in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device viawd" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +viawd_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides +.Xr watchdog 4 +support for the watchdog interrupt timer present on +VIA south bridge chipset (VT8251, CX700, VX800, VX855, VX900). +.Pp +The VIA south bridge have a built-in watchdog timer, +which can be enabled and disabled by user's program and set between +1 to 1023 seconds. +.Pp +The +.Nm +driver when unloaded with running watchdog will reschedule the watchdog +to 5 minutes. +.Sh SEE ALSO +.Xr watchdog 4 , +.Xr watchdog 8 , +.Xr watchdogd 8 , +.Xr watchdog 9 +.Sh HISTORY +The +.Nm +driver first appeared in +.Fx 10.0 . +.Sh AUTHORS +.An -nosplit +The +.Nm +driver and this manual page were written by +.An Fabien Thomas Aq fabient@FreeBSD.org . Modified: stable/8/sys/amd64/conf/NOTES ============================================================================== --- stable/8/sys/amd64/conf/NOTES Tue Jan 10 08:16:28 2012 (r229927) +++ stable/8/sys/amd64/conf/NOTES Tue Jan 10 08:41:10 2012 (r229928) @@ -459,6 +459,7 @@ device tpm # device ichwd device amdsbwd +device viawd # # Temperature sensors: Modified: stable/8/sys/conf/files.amd64 ============================================================================== --- stable/8/sys/conf/files.amd64 Tue Jan 10 08:16:28 2012 (r229927) +++ stable/8/sys/conf/files.amd64 Tue Jan 10 08:41:10 2012 (r229928) @@ -231,6 +231,7 @@ dev/tpm/tpm.c optional tpm dev/tpm/tpm_acpi.c optional tpm acpi dev/tpm/tpm_isa.c optional tpm isa dev/uart/uart_cpu_amd64.c optional uart +dev/viawd/viawd.c optional viawd dev/wpi/if_wpi.c optional wpi isa/syscons_isa.c optional sc isa/vga_isa.c optional vga Modified: stable/8/sys/conf/files.i386 ============================================================================== --- stable/8/sys/conf/files.i386 Tue Jan 10 08:16:28 2012 (r229927) +++ stable/8/sys/conf/files.i386 Tue Jan 10 08:41:10 2012 (r229928) @@ -236,6 +236,7 @@ dev/tpm/tpm.c optional tpm dev/tpm/tpm_acpi.c optional tpm acpi dev/tpm/tpm_isa.c optional tpm isa dev/uart/uart_cpu_i386.c optional uart +dev/viawd/viawd.c optional viawd dev/acpica/acpi_if.m standard dev/acpi_support/acpi_wmi_if.m standard dev/wpi/if_wpi.c optional wpi Modified: stable/8/sys/dev/viawd/viawd.c ============================================================================== --- head/sys/dev/viawd/viawd.c Mon Dec 12 09:50:33 2011 (r228431) +++ stable/8/sys/dev/viawd/viawd.c Tue Jan 10 08:41:10 2012 (r229928) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 Fabien Thomas + * Copyright (c) 2011 Fabien Thomas * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -42,10 +42,9 @@ __FBSDID("$FreeBSD$"); #include "viawd.h" -#define viawd_read_wd_4(sc, off) \ - bus_space_read_4((sc)->wd_bst, (sc)->wd_bsh, (off)) -#define viawd_write_wd_4(sc, off, val) \ - bus_space_write_4((sc)->wd_bst, (sc)->wd_bsh, (off), (val)) +#define viawd_read_4(sc, off) bus_read_4((sc)->wd_res, (off)) +#define viawd_write_4(sc, off, val) \ + bus_write_4((sc)->wd_res, (off), (val)) static struct viawd_device viawd_devices[] = { { DEVICEID_VT8251, "VIA VT8251 watchdog timer" }, @@ -58,37 +57,17 @@ static struct viawd_device viawd_devices static devclass_t viawd_devclass; -static device_t -viawd_find(struct viawd_device **id_p) -{ - struct viawd_device *id; - device_t sb_dev = NULL; - - /* Look for a supported VIA south bridge. */ - for (id = viawd_devices; id->desc != NULL; ++id) - if ((sb_dev = pci_find_device(VENDORID_VIA, id->device)) != NULL) - break; - - if (sb_dev == NULL) - return (NULL); - - if (id_p != NULL) - *id_p = id; - - return (sb_dev); -} - static void viawd_tmr_state(struct viawd_softc *sc, int enable) { uint32_t reg; - reg = viawd_read_wd_4(sc, VIAWD_MEM_CTRL); + reg = viawd_read_4(sc, VIAWD_MEM_CTRL); if (enable) reg |= VIAWD_MEM_CTRL_TRIGGER | VIAWD_MEM_CTRL_ENABLE; else reg &= ~VIAWD_MEM_CTRL_ENABLE; - viawd_write_wd_4(sc, VIAWD_MEM_CTRL, reg); + viawd_write_4(sc, VIAWD_MEM_CTRL, reg); } static void @@ -101,7 +80,7 @@ viawd_tmr_set(struct viawd_softc *sc, un else if (timeout > VIAWD_MEM_COUNT_MAX) timeout = VIAWD_MEM_COUNT_MAX; - viawd_write_wd_4(sc, VIAWD_MEM_COUNT, timeout); + viawd_write_4(sc, VIAWD_MEM_COUNT, timeout); sc->timeout = timeout; } @@ -127,35 +106,40 @@ viawd_event(void *arg, unsigned int cmd, viawd_tmr_state(sc, 0); } -static void -viawd_identify(driver_t *driver, device_t parent) +/* Look for a supported VIA south bridge. */ +static struct viawd_device * +viawd_find(device_t dev) { - device_t dev; - device_t sb_dev; - struct viawd_device *id_p; + struct viawd_device *id; - sb_dev = viawd_find(&id_p); - if (sb_dev == NULL) - return; + if (pci_get_vendor(dev) != VENDORID_VIA) + return (NULL); + for (id = viawd_devices; id->desc != NULL; id++) + if (pci_get_device(dev) == id->device) + return (id); + return (NULL); +} - /* Good, add child to bus. */ - if ((dev = device_find_child(parent, driver->name, 0)) == NULL) - dev = BUS_ADD_CHILD(parent, 0, driver->name, 0); +static void +viawd_identify(driver_t *driver, device_t parent) +{ - if (dev == NULL) + if (viawd_find(parent) == NULL) return; - device_set_desc_copy(dev, id_p->desc); + if (device_find_child(parent, driver->name, -1) == NULL) + BUS_ADD_CHILD(parent, 0, driver->name, 0); } static int viawd_probe(device_t dev) { + struct viawd_device *id; - /* Do not claim some ISA PnP device by accident. */ - if (isa_get_logicalid(dev) != 0) - return (ENXIO); - return (0); + id = viawd_find(device_get_parent(dev)); + KASSERT(id != NULL, ("parent should be a valid VIA SB")); + device_set_desc(dev, id->desc); + return (BUS_PROBE_GENERIC); } static int @@ -163,13 +147,12 @@ viawd_attach(device_t dev) { device_t sb_dev; struct viawd_softc *sc; - struct viawd_device *id_p; uint32_t pmbase, reg; sc = device_get_softc(dev); sc->dev = dev; - sb_dev = viawd_find(&id_p); + sb_dev = device_get_parent(dev); if (sb_dev == NULL) { device_printf(dev, "Can not find watchdog device.\n"); goto fail; @@ -193,16 +176,14 @@ viawd_attach(device_t dev) device_printf(dev, "Unable to map watchdog memory\n"); goto fail; } - sc->wd_bst = rman_get_bustag(sc->wd_res); - sc->wd_bsh = rman_get_bushandle(sc->wd_res); /* Check if watchdog fired last boot. */ - reg = viawd_read_wd_4(sc, VIAWD_MEM_CTRL); + reg = viawd_read_4(sc, VIAWD_MEM_CTRL); if (reg & VIAWD_MEM_CTRL_FIRED) { device_printf(dev, "ERROR: watchdog rebooted the system\n"); /* Reset bit state. */ - viawd_write_wd_4(sc, VIAWD_MEM_CTRL, reg); + viawd_write_4(sc, VIAWD_MEM_CTRL, reg); } /* Register the watchdog event handler. */ @@ -233,7 +214,7 @@ viawd_detach(device_t dev) * Do not stop the watchdog on shutdown if active but bump the * timer to avoid spurious reset. */ - reg = viawd_read_wd_4(sc, VIAWD_MEM_CTRL); + reg = viawd_read_4(sc, VIAWD_MEM_CTRL); if (reg & VIAWD_MEM_CTRL_ENABLE) { viawd_tmr_set(sc, VIAWD_TIMEOUT_SHUTDOWN); viawd_tmr_state(sc, 1); @@ -264,23 +245,4 @@ static driver_t viawd_driver = { sizeof(struct viawd_softc), }; -static int -viawd_modevent(module_t mode, int type, void *data) -{ - int error = 0; - - switch (type) { - case MOD_LOAD: - printf("viawd module loaded\n"); - break; - case MOD_UNLOAD: - printf("viawd module unloaded\n"); - break; - case MOD_SHUTDOWN: - printf("viawd module shutting down\n"); - break; - } - return (error); -} - -DRIVER_MODULE(viawd, isa, viawd_driver, viawd_devclass, viawd_modevent, NULL); +DRIVER_MODULE(viawd, isab, viawd_driver, viawd_devclass, NULL, NULL); Modified: stable/8/sys/dev/viawd/viawd.h ============================================================================== --- head/sys/dev/viawd/viawd.h Mon Dec 12 09:50:33 2011 (r228431) +++ stable/8/sys/dev/viawd/viawd.h Tue Jan 10 08:41:10 2012 (r229928) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 Fabien Thomas + * Copyright (c) 2011 Fabien Thomas * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -40,8 +40,6 @@ struct viawd_softc { int wd_rid; struct resource *wd_res; - bus_space_tag_t wd_bst; - bus_space_handle_t wd_bsh; eventhandler_tag ev_tag; unsigned int timeout; Modified: stable/8/sys/i386/conf/NOTES ============================================================================== --- stable/8/sys/i386/conf/NOTES Tue Jan 10 08:16:28 2012 (r229927) +++ stable/8/sys/i386/conf/NOTES Tue Jan 10 08:41:10 2012 (r229928) @@ -844,6 +844,7 @@ hint.pcf.0.irq="5" # device ichwd device amdsbwd +device viawd # # Temperature sensors: Modified: stable/8/sys/modules/Makefile ============================================================================== --- stable/8/sys/modules/Makefile Tue Jan 10 08:16:28 2012 (r229927) +++ stable/8/sys/modules/Makefile Tue Jan 10 08:41:10 2012 (r229928) @@ -306,6 +306,7 @@ SUBDIR= ${_3dfx} \ utopia \ ${_vesa} \ vge \ + ${_viawd} \ vkbd \ ${_vpo} \ vr \ @@ -503,6 +504,7 @@ _nve= nve _nvram= nvram _nxge= nxge _tpm= tpm +_viawd= viawd _wpi= wpi _wpifw= wpifw .if ${MK_CRYPT} != "no" || defined(ALL_MODULES) @@ -602,6 +604,7 @@ _tmpfs= tmpfs _tpm= tpm _twa= twa _vesa= vesa +_viawd= viawd _x86bios= x86bios _wi= wi _wpi= wpi From owner-svn-src-stable-8@FreeBSD.ORG Wed Jan 11 01:58:49 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 907391065670; Wed, 11 Jan 2012 01:58:49 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5EBD48FC0C; Wed, 11 Jan 2012 01:58:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q0B1wnuu037283; Wed, 11 Jan 2012 01:58:49 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q0B1wnnC037281; Wed, 11 Jan 2012 01:58:49 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201201110158.q0B1wnnC037281@svn.freebsd.org> From: Rick Macklem Date: Wed, 11 Jan 2012 01:58:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229955 - stable/8/sys/fs/nfsclient X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2012 01:58:49 -0000 Author: rmacklem Date: Wed Jan 11 01:58:49 2012 New Revision: 229955 URL: http://svn.freebsd.org/changeset/base/229955 Log: MFC: r228827 During investigation of an NFSv4 client crash reported by glebius@, jhb@ spotted that nfscl_getstateid() might modify credentials when called from nfsrpc_read() for the case where p != NULL, whereas nfsrpc_read() only did a crdup() to get new credentials for p == NULL. This bug was introduced by r195510, since pre-r195510 nfscl_getstateid() only modified credentials for the p == NULL case. This patch modifies nfsrpc_read()/nfsrpc_write() so that they do crdup() for the p != NULL case. It is conceivable that this bug caused the crash reported by glebius@, but that will not be determined for some time, since the crash occurred after about 1month of operation. Modified: stable/8/sys/fs/nfsclient/nfs_clrpcops.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- stable/8/sys/fs/nfsclient/nfs_clrpcops.c Wed Jan 11 01:42:16 2012 (r229954) +++ stable/8/sys/fs/nfsclient/nfs_clrpcops.c Wed Jan 11 01:58:49 2012 (r229955) @@ -1232,8 +1232,7 @@ nfsrpc_read(vnode_t vp, struct uio *uiop newcred = cred; if (NFSHASNFSV4(nmp)) { nfhp = np->n_fhp; - if (p == NULL) - newcred = NFSNEWCRED(cred); + newcred = NFSNEWCRED(cred); } retrycnt = 0; do { @@ -1263,7 +1262,7 @@ nfsrpc_read(vnode_t vp, struct uio *uiop expireret == 0 && clidrev != 0 && retrycnt < 4)); if (error && retrycnt >= 4) error = EIO; - if (NFSHASNFSV4(nmp) && p == NULL) + if (NFSHASNFSV4(nmp)) NFSFREECRED(newcred); return (error); } @@ -1384,8 +1383,7 @@ nfsrpc_write(vnode_t vp, struct uio *uio clidrev = nmp->nm_clp->nfsc_clientidrev; newcred = cred; if (NFSHASNFSV4(nmp)) { - if (p == NULL) - newcred = NFSNEWCRED(cred); + newcred = NFSNEWCRED(cred); nfhp = np->n_fhp; } retrycnt = 0; @@ -1435,7 +1433,7 @@ nfsrpc_write(vnode_t vp, struct uio *uio ((error == NFSERR_STALESTATEID || error == NFSERR_STALEDONTRECOVER) && called_from_strategy != 0))) error = EIO; - if (NFSHASNFSV4(nmp) && p == NULL) + if (NFSHASNFSV4(nmp)) NFSFREECRED(newcred); return (error); } From owner-svn-src-stable-8@FreeBSD.ORG Wed Jan 11 13:56:32 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 36DB4106566B; Wed, 11 Jan 2012 13:56:32 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 248E18FC0C; Wed, 11 Jan 2012 13:56:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q0BDuVdv062126; Wed, 11 Jan 2012 13:56:32 GMT (envelope-from nyan@svn.freebsd.org) Received: (from nyan@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q0BDuVfc062124; Wed, 11 Jan 2012 13:56:31 GMT (envelope-from nyan@svn.freebsd.org) Message-Id: <201201111356.q0BDuVfc062124@svn.freebsd.org> From: Takahashi Yoshihiro Date: Wed, 11 Jan 2012 13:56:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229958 - stable/8/sys/boot/pc98/boot2 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2012 13:56:32 -0000 Author: nyan Date: Wed Jan 11 13:56:31 2012 New Revision: 229958 URL: http://svn.freebsd.org/changeset/base/229958 Log: MFC: revision 229462 Fix 230MB MO support. Submitted by: Kaho Toshikazu Modified: stable/8/sys/boot/pc98/boot2/boot1.S Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/boot/pc98/boot2/boot1.S ============================================================================== --- stable/8/sys/boot/pc98/boot2/boot1.S Wed Jan 11 13:52:34 2012 (r229957) +++ stable/8/sys/boot/pc98/boot2/boot1.S Wed Jan 11 13:56:31 2012 (r229958) @@ -219,7 +219,7 @@ read: xor %ax,%ax jc read_load and $0xff7f,%si /* SCSI MO */ mov %di,%cx - shr $16,%di + shr $16,%edi mov %di,%dx jmp read_load read_fd: or $0xd000,%si From owner-svn-src-stable-8@FreeBSD.ORG Wed Jan 11 18:14:23 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 25493106564A; Wed, 11 Jan 2012 18:14:23 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 12E738FC12; Wed, 11 Jan 2012 18:14:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q0BIEMQS071070; Wed, 11 Jan 2012 18:14:22 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q0BIEMC6071068; Wed, 11 Jan 2012 18:14:22 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201201111814.q0BIEMC6071068@svn.freebsd.org> From: Alexander Motin Date: Wed, 11 Jan 2012 18:14:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229974 - stable/8/sys/dev/sound/pci/hda X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2012 18:14:23 -0000 Author: mav Date: Wed Jan 11 18:14:22 2012 New Revision: 229974 URL: http://svn.freebsd.org/changeset/base/229974 Log: MFC r228726, r228727: Cast some vendor-specific spell on VIA VT1708S codecs to: - make analog input loopback work; - get access to the mics boost controls. Sponsored by: iXsystems, Inc. Modified: stable/8/sys/dev/sound/pci/hda/hdac.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/sound/pci/hda/hdac.c ============================================================================== --- stable/8/sys/dev/sound/pci/hda/hdac.c Wed Jan 11 18:12:53 2012 (r229973) +++ stable/8/sys/dev/sound/pci/hda/hdac.c Wed Jan 11 18:14:22 2012 (r229974) @@ -4921,6 +4921,30 @@ hdac_vendor_patch_parse(struct hdac_devi if (w != NULL) w->connsenable[0] = 0; break; + case HDA_CODEC_VT1708S_0: + case HDA_CODEC_VT1708S_1: + case HDA_CODEC_VT1708S_2: + case HDA_CODEC_VT1708S_3: + case HDA_CODEC_VT1708S_4: + case HDA_CODEC_VT1708S_5: + case HDA_CODEC_VT1708S_6: + case HDA_CODEC_VT1708S_7: + /* + * These codecs have hidden mic boost controls. + */ + w = hdac_widget_get(devinfo, 26); + if (w != NULL) + w->param.inamp_cap = + (40 << HDA_PARAM_OUTPUT_AMP_CAP_STEPSIZE_SHIFT) | + (3 << HDA_PARAM_OUTPUT_AMP_CAP_NUMSTEPS_SHIFT) | + (0 << HDA_PARAM_OUTPUT_AMP_CAP_OFFSET_SHIFT); + w = hdac_widget_get(devinfo, 30); + if (w != NULL) + w->param.inamp_cap = + (40 << HDA_PARAM_OUTPUT_AMP_CAP_STEPSIZE_SHIFT) | + (3 << HDA_PARAM_OUTPUT_AMP_CAP_NUMSTEPS_SHIFT) | + (0 << HDA_PARAM_OUTPUT_AMP_CAP_OFFSET_SHIFT); + break; } } @@ -6408,7 +6432,7 @@ hdac_audio_commit(struct hdac_devinfo *d struct hdac_softc *sc = devinfo->codec->sc; struct hdac_widget *w; nid_t cad; - uint32_t gdata, gmask, gdir; + uint32_t id, gdata, gmask, gdir; int commitgpio, numgpio; int i; @@ -6417,6 +6441,24 @@ hdac_audio_commit(struct hdac_devinfo *d if (sc->pci_subvendor == APPLE_INTEL_MAC) hdac_command(sc, HDA_CMD_12BIT(cad, devinfo->nid, 0x7e7, 0), cad); + id = hdac_codec_id(devinfo->codec); + switch (id) { + case HDA_CODEC_VT1708S_0: + case HDA_CODEC_VT1708S_1: + case HDA_CODEC_VT1708S_2: + case HDA_CODEC_VT1708S_3: + case HDA_CODEC_VT1708S_4: + case HDA_CODEC_VT1708S_5: + case HDA_CODEC_VT1708S_6: + case HDA_CODEC_VT1708S_7: + /* Enable Mic Boost Volume controls. */ + hdac_command(sc, HDA_CMD_12BIT(cad, devinfo->nid, + 0xf98, 0x01), cad); + /* Don't bypass mixer. */ + hdac_command(sc, HDA_CMD_12BIT(cad, devinfo->nid, + 0xf88, 0xc0), cad); + break; + } /* Commit controls. */ hdac_audio_ctl_commit(devinfo); @@ -7718,10 +7760,6 @@ hdac_attach2(void *arg) ); hdac_audio_parse(devinfo); HDA_BOOTHVERBOSE( - device_printf(sc->dev, "Parsing Ctls...\n"); - ); - hdac_audio_ctl_parse(devinfo); - HDA_BOOTHVERBOSE( device_printf(sc->dev, "Parsing vendor patch...\n"); ); hdac_vendor_patch_parse(devinfo); @@ -7729,6 +7767,10 @@ hdac_attach2(void *arg) devinfo->function.audio.quirks &= ~quirks_off; HDA_BOOTHVERBOSE( + device_printf(sc->dev, "Parsing Ctls...\n"); + ); + hdac_audio_ctl_parse(devinfo); + HDA_BOOTHVERBOSE( device_printf(sc->dev, "Disabling nonaudio...\n"); ); hdac_audio_disable_nonaudio(devinfo); From owner-svn-src-stable-8@FreeBSD.ORG Wed Jan 11 18:18:38 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 99BD7106566C; Wed, 11 Jan 2012 18:18:38 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 83C7F8FC16; Wed, 11 Jan 2012 18:18:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q0BIIcAc071262; Wed, 11 Jan 2012 18:18:38 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q0BIIcoL071254; Wed, 11 Jan 2012 18:18:38 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201201111818.q0BIIcoL071254@svn.freebsd.org> From: Xin LI Date: Wed, 11 Jan 2012 18:18:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229975 - in stable: 8/share/man/man4 8/sys/amd64/conf 8/sys/conf 8/sys/dev/hpt27xx 8/sys/i386/conf 8/sys/modules 8/sys/modules/hpt27xx 9/share/man/man4 9/sys/amd64/conf 9/sys/conf 9/sy... X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2012 18:18:38 -0000 Author: delphij Date: Wed Jan 11 18:18:37 2012 New Revision: 229975 URL: http://svn.freebsd.org/changeset/base/229975 Log: MFC r228940: Import the first release of HighPoint RocketRAID 27xx SAS 6Gb/s HBA card driver. This driver works for FreeBSD/i386 and FreeBSD/amd64 platforms. Many thanks to HighPoint for providing this driver. Added: stable/8/share/man/man4/hpt27xx.4 - copied unchanged from r228940, head/share/man/man4/hpt27xx.4 stable/8/sys/dev/hpt27xx/ - copied from r228940, head/sys/dev/hpt27xx/ stable/8/sys/modules/hpt27xx/ - copied from r228940, head/sys/modules/hpt27xx/ Modified: stable/8/share/man/man4/Makefile stable/8/sys/amd64/conf/NOTES stable/8/sys/conf/files.amd64 stable/8/sys/conf/files.i386 stable/8/sys/i386/conf/NOTES stable/8/sys/modules/Makefile Directory Properties: stable/8/share/man/man4/ (props changed) stable/8/sys/ (props changed) Changes in other areas also in this revision: Added: stable/9/share/man/man4/hpt27xx.4 - copied unchanged from r228940, head/share/man/man4/hpt27xx.4 stable/9/sys/dev/hpt27xx/ - copied from r228940, head/sys/dev/hpt27xx/ stable/9/sys/modules/hpt27xx/ - copied from r228940, head/sys/modules/hpt27xx/ Modified: stable/9/share/man/man4/Makefile stable/9/sys/amd64/conf/NOTES stable/9/sys/conf/files.amd64 stable/9/sys/conf/files.i386 stable/9/sys/i386/conf/NOTES stable/9/sys/modules/Makefile Directory Properties: stable/9/share/man/man4/ (props changed) stable/9/sys/ (props changed) stable/9/sys/conf/ (props changed) Modified: stable/8/share/man/man4/Makefile ============================================================================== --- stable/8/share/man/man4/Makefile Wed Jan 11 18:14:22 2012 (r229974) +++ stable/8/share/man/man4/Makefile Wed Jan 11 18:18:37 2012 (r229975) @@ -139,6 +139,7 @@ MAN= aac.4 \ hfa.4 \ hifn.4 \ hme.4 \ + ${_hpt27xx.4} \ ${_hptiop.4} \ ${_hptmv.4} \ ${_hptrr.4} \ @@ -663,6 +664,7 @@ _asmc.4= asmc.4 _coretemp.4= coretemp.4 _cpuctl.4= cpuctl.4 _dpms.4= dpms.4 +_hpt27xx.4= hpt27xx.4 _hptiop.4= hptiop.4 _hptmv.4= hptmv.4 _hptrr.4= hptrr.4 Copied: stable/8/share/man/man4/hpt27xx.4 (from r228940, head/share/man/man4/hpt27xx.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/share/man/man4/hpt27xx.4 Wed Jan 11 18:18:37 2012 (r229975, copy of r228940, head/share/man/man4/hpt27xx.4) @@ -0,0 +1,101 @@ +.\" +.\" Copyright (c) 2011 iXsystems, Inc. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR +.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT, +.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd December 28, 2011 +.Dt HPT27XX 4 +.Os +.Sh NAME +.Nm hpt27xx +.Nd "HighPoint RocketRAID 27xx SAS 6Gb/s HBA card driver" +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following line in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device hpt27xx" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +hpt27xx_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides support for HighPoint's RocketRAID 27xx based RAID controller. +.Pp +These devices support SAS disk drives +and provide RAID0 (striping), RAID1 (mirroring), and RAID5 functionality. +.Sh HARDWARE +The +.Nm +driver supports the following SAS +controllers: +.Pp +.Bl -bullet -compact +.It +HighPoint's RocketRAID 271x series +.It +HighPoint's RocketRAID 272x series +.It +HighPoint's RocketRAID 274x series +.It +HighPoint's RocketRAID 276x series +.It +HighPoint's RocketRAID 278x series +.El +.Sh NOTES +The +.Nm +driver only works on the i386 and amd64 platforms as it requires a binary +blob object from the manufacturer which they only supply for these platforms. +The +.Nm +driver does +.Em not +work on i386 with +.Xr pae 4 +enabled. +.Sh SEE ALSO +.Xr kld 4 , +.Xr kldload 8 , +.Xr loader 8 +.Sh HISTORY +The +.Nm +device driver first appeared in +.Fx 10.0 . +.Sh AUTHORS +.An -nosplit +The +.Nm +device driver was written by +.An HighPoint Technologies, Inc. . +This manual page was written by +.An Xin LI Aq delphij@FreeBSD.org +for iXsystems, Inc. Modified: stable/8/sys/amd64/conf/NOTES ============================================================================== --- stable/8/sys/amd64/conf/NOTES Wed Jan 11 18:14:22 2012 (r229974) +++ stable/8/sys/amd64/conf/NOTES Wed Jan 11 18:18:37 2012 (r229975) @@ -389,6 +389,10 @@ device aac device aacp # SCSI Passthrough interface (optional, CAM required) # +# Highpoint RocketRAID 27xx. +device hpt27xx + +# # Highpoint RocketRAID 182x. device hptmv Modified: stable/8/sys/conf/files.amd64 ============================================================================== --- stable/8/sys/conf/files.amd64 Wed Jan 11 18:14:22 2012 (r229974) +++ stable/8/sys/conf/files.amd64 Wed Jan 11 18:18:37 2012 (r229975) @@ -58,6 +58,10 @@ os+%DIKED-nve.h optional nve pci \ no-implicit-rule no-obj before-depend \ clean "os+%DIKED-nve.h" # +hpt27xx_lib.o optional hpt27xx \ + dependency "$S/dev/hpt27xx/amd64-elf.hpt27xx_lib.o.uu" \ + compile-with "uudecode < $S/dev/hpt27xx/amd64-elf.hpt27xx_lib.o.uu" \ + no-implicit-rule hptmvraid.o optional hptmv \ dependency "$S/dev/hptmv/amd64-elf.raid.o.uu" \ compile-with "uudecode < $S/dev/hptmv/amd64-elf.raid.o.uu" \ @@ -194,6 +198,9 @@ dev/fdc/fdc.c optional fdc dev/fdc/fdc_acpi.c optional fdc dev/fdc/fdc_isa.c optional fdc isa dev/fdc/fdc_pccard.c optional fdc pccard +dev/hpt27xx/os_bsd.c optional hpt27xx +dev/hpt27xx/osm_bsd.c optional hpt27xx +dev/hpt27xx/hpt27xx_config.c optional hpt27xx dev/hptmv/entry.c optional hptmv dev/hptmv/mv.c optional hptmv dev/hptmv/gui_lib.c optional hptmv Modified: stable/8/sys/conf/files.i386 ============================================================================== --- stable/8/sys/conf/files.i386 Wed Jan 11 18:14:22 2012 (r229974) +++ stable/8/sys/conf/files.i386 Wed Jan 11 18:18:37 2012 (r229975) @@ -57,6 +57,10 @@ os+%DIKED-nve.h optional nve pci \ no-implicit-rule no-obj before-depend \ clean "os+%DIKED-nve.h" # +hpt27xx_lib.o optional hpt27xx \ + dependency "$S/dev/hpt27xx/i386-elf.hpt27xx_lib.o.uu" \ + compile-with "uudecode < $S/dev/hpt27xx/i386-elf.hpt27xx_lib.o.uu" \ + no-implicit-rule hptmvraid.o optional hptmv \ dependency "$S/dev/hptmv/i386-elf.raid.o.uu" \ compile-with "uudecode < $S/dev/hptmv/i386-elf.raid.o.uu" \ @@ -173,6 +177,9 @@ dev/fdc/fdc_pccard.c optional fdc pccar dev/fe/if_fe_isa.c optional fe isa dev/glxsb/glxsb.c optional glxsb dev/glxsb/glxsb_hash.c optional glxsb +dev/hpt27xx/os_bsd.c optional hpt27xx +dev/hpt27xx/osm_bsd.c optional hpt27xx +dev/hpt27xx/hpt27xx_config.c optional hpt27xx dev/hptmv/entry.c optional hptmv dev/hptmv/mv.c optional hptmv dev/hptmv/gui_lib.c optional hptmv Modified: stable/8/sys/i386/conf/NOTES ============================================================================== --- stable/8/sys/i386/conf/NOTES Wed Jan 11 18:14:22 2012 (r229974) +++ stable/8/sys/i386/conf/NOTES Wed Jan 11 18:18:37 2012 (r229975) @@ -725,6 +725,10 @@ device aacp # SCSI Passthrough interfac device asr # +# Highpoint RocketRAID 27xx. +device hpt27xx + +# # Highpoint RocketRAID 182x. device hptmv Modified: stable/8/sys/modules/Makefile ============================================================================== --- stable/8/sys/modules/Makefile Wed Jan 11 18:14:22 2012 (r229974) +++ stable/8/sys/modules/Makefile Wed Jan 11 18:18:37 2012 (r229975) @@ -105,6 +105,7 @@ SUBDIR= ${_3dfx} \ hatm \ hifn \ hme \ + ${_hpt27xx} \ ${_hptiop} \ ${_hptmv} \ ${_hptrr} \ @@ -482,6 +483,7 @@ _coretemp= coretemp _ctau= ctau _dpt= dpt _ex= ex +_hpt27xx= hpt27xx _hptiop= hptiop _hptmv= hptmv _hptrr= hptrr @@ -554,6 +556,7 @@ _et= et _em= em _exca= exca _ext2fs= ext2fs +_hpt27xx= hpt27xx _hptiop= hptiop _hptmv= hptmv _hptrr= hptrr From owner-svn-src-stable-8@FreeBSD.ORG Wed Jan 11 19:12:30 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 120B0106566C; Wed, 11 Jan 2012 19:12:30 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F407A8FC16; Wed, 11 Jan 2012 19:12:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q0BJCTie073065; Wed, 11 Jan 2012 19:12:29 GMT (envelope-from mckusick@svn.freebsd.org) Received: (from mckusick@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q0BJCTgr073063; Wed, 11 Jan 2012 19:12:29 GMT (envelope-from mckusick@svn.freebsd.org) Message-Id: <201201111912.q0BJCTgr073063@svn.freebsd.org> From: Kirk McKusick Date: Wed, 11 Jan 2012 19:12:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229978 - stable/8/sys/kern X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2012 19:12:30 -0000 Author: mckusick Date: Wed Jan 11 19:12:29 2012 New Revision: 229978 URL: http://svn.freebsd.org/changeset/base/229978 Log: MFC: 226265 When unmounting a filesystem always wait for the vfs_busy lock to clear so that if no vnodes in the filesystem are actively in use the unmount will succeed rather than failing with EBUSY. Reported by: Garrett Cooper Reviewed by: Attilio Rao and Kostik Belousov Tested by: Garrett Cooper PR: kern/161016 Modified: stable/8/sys/kern/vfs_mount.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/kern/vfs_mount.c ============================================================================== --- stable/8/sys/kern/vfs_mount.c Wed Jan 11 18:38:52 2012 (r229977) +++ stable/8/sys/kern/vfs_mount.c Wed Jan 11 19:12:29 2012 (r229978) @@ -1260,18 +1260,6 @@ dounmount(mp, flags, td) mp->mnt_kern_flag |= MNTK_UNMOUNTF; error = 0; if (mp->mnt_lockref) { - if ((flags & MNT_FORCE) == 0) { - mp->mnt_kern_flag &= ~(MNTK_UNMOUNT | MNTK_NOINSMNTQ | - MNTK_UNMOUNTF); - if (mp->mnt_kern_flag & MNTK_MWAIT) { - mp->mnt_kern_flag &= ~MNTK_MWAIT; - wakeup(mp); - } - MNT_IUNLOCK(mp); - if (coveredvp) - VOP_UNLOCK(coveredvp, 0); - return (EBUSY); - } mp->mnt_kern_flag |= MNTK_DRAINING; error = msleep(&mp->mnt_lockref, MNT_MTX(mp), PVFS, "mount drain", 0); From owner-svn-src-stable-8@FreeBSD.ORG Wed Jan 11 23:11:28 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3326B1065670; Wed, 11 Jan 2012 23:11:28 +0000 (UTC) (envelope-from wblock@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 20D438FC15; Wed, 11 Jan 2012 23:11:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q0BNBSY9081041; Wed, 11 Jan 2012 23:11:28 GMT (envelope-from wblock@svn.freebsd.org) Received: (from wblock@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q0BNBSWw081039; Wed, 11 Jan 2012 23:11:28 GMT (envelope-from wblock@svn.freebsd.org) Message-Id: <201201112311.q0BNBSWw081039@svn.freebsd.org> From: Warren Block Date: Wed, 11 Jan 2012 23:11:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229990 - stable/8/usr.sbin/cron/crontab X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2012 23:11:28 -0000 Author: wblock (doc committer) Date: Wed Jan 11 23:11:27 2012 New Revision: 229990 URL: http://svn.freebsd.org/changeset/base/229990 Log: MFC r227981: Point out that @reboot runs at every cron startup, not just system startup. Approved by: gjb (mentor) Modified: stable/8/usr.sbin/cron/crontab/crontab.5 Directory Properties: stable/8/usr.sbin/cron/ (props changed) Modified: stable/8/usr.sbin/cron/crontab/crontab.5 ============================================================================== --- stable/8/usr.sbin/cron/crontab/crontab.5 Wed Jan 11 23:06:37 2012 (r229989) +++ stable/8/usr.sbin/cron/crontab/crontab.5 Wed Jan 11 23:11:27 2012 (r229990) @@ -224,7 +224,7 @@ one of eight special strings may appear: .Bd -literal -offset indent string meaning ------ ------- -@reboot Run once, at startup. +@reboot Run once, at startup of cron. @yearly Run once a year, "0 0 1 1 *". @annually (same as @yearly) @monthly Run once a month, "0 0 1 * *". From owner-svn-src-stable-8@FreeBSD.ORG Thu Jan 12 00:01:12 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5852B1065678; Thu, 12 Jan 2012 00:01:12 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2D9638FC08; Thu, 12 Jan 2012 00:01:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q0C01CXZ082828; Thu, 12 Jan 2012 00:01:12 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q0C01CWC082825; Thu, 12 Jan 2012 00:01:12 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201201120001.q0C01CWC082825@svn.freebsd.org> From: Jilles Tjoelker Date: Thu, 12 Jan 2012 00:01:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229993 - stable/8/usr.bin/du X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2012 00:01:12 -0000 Author: jilles Date: Thu Jan 12 00:01:11 2012 New Revision: 229993 URL: http://svn.freebsd.org/changeset/base/229993 Log: MFC r228669: du: Allow multiple -HLP options, the last one wins. This matches 4.4BSD tradition and other utilities with these options and is required by POSIX (POSIX does not specify -P, only -HL). Modified: stable/8/usr.bin/du/du.1 stable/8/usr.bin/du/du.c Directory Properties: stable/8/usr.bin/du/ (props changed) Modified: stable/8/usr.bin/du/du.1 ============================================================================== --- stable/8/usr.bin/du/du.1 Wed Jan 11 23:30:18 2012 (r229992) +++ stable/8/usr.bin/du/du.1 Thu Jan 12 00:01:11 2012 (r229993) @@ -32,7 +32,7 @@ .\" @(#)du.1 8.2 (Berkeley) 4/1/94 .\" $FreeBSD$ .\" -.Dd December 8, 2011 +.Dd December 17, 2011 .Dt DU 1 .Os .Sh NAME @@ -159,6 +159,13 @@ or .Fl L option is specified, storage used by any symbolic links which are followed is not counted (or displayed). +The +.Fl H , +.Fl L +and +.Fl P +options override each other and the command's actions are determined +by the last one specified. .Pp The .Fl h, k Modified: stable/8/usr.bin/du/du.c ============================================================================== --- stable/8/usr.bin/du/du.c Wed Jan 11 23:30:18 2012 (r229992) +++ stable/8/usr.bin/du/du.c Thu Jan 12 00:01:11 2012 (r229993) @@ -94,18 +94,18 @@ main(int argc, char *argv[]) int ftsoptions; int listall; int depth; - int Hflag, Lflag, Pflag, aflag, sflag, dflag, cflag; + int Hflag, Lflag, aflag, sflag, dflag, cflag; int hflag, lflag, ch, notused, rval; char **save; static char dot[] = "."; setlocale(LC_ALL, ""); - Hflag = Lflag = Pflag = aflag = sflag = dflag = cflag = hflag = + Hflag = Lflag = aflag = sflag = dflag = cflag = hflag = lflag = Aflag = 0; save = argv; - ftsoptions = 0; + ftsoptions = FTS_PHYSICAL; savednumber = 0; threshold = 0; threshold_sign = 1; @@ -130,19 +130,17 @@ main(int argc, char *argv[]) break; case 'H': Hflag = 1; + Lflag = 0; break; case 'I': ignoreadd(optarg); break; case 'L': - if (Pflag) - usage(); Lflag = 1; + Hflag = 0; break; case 'P': - if (Lflag) - usage(); - Pflag = 1; + Hflag = Lflag = 0; break; case 'a': aflag = 1; @@ -215,20 +213,12 @@ main(int argc, char *argv[]) * the man page, so it's a feature. */ - if (Hflag + Lflag + Pflag > 1) - usage(); - - if (Hflag + Lflag + Pflag == 0) - Pflag = 1; /* -P (physical) is default */ - if (Hflag) ftsoptions |= FTS_COMFOLLOW; - - if (Lflag) + if (Lflag) { + ftsoptions &= ~FTS_PHYSICAL; ftsoptions |= FTS_LOGICAL; - - if (Pflag) - ftsoptions |= FTS_PHYSICAL; + } if (!Aflag && (cblocksize % DEV_BSIZE) != 0) cblocksize = howmany(cblocksize, DEV_BSIZE) * DEV_BSIZE; From owner-svn-src-stable-8@FreeBSD.ORG Thu Jan 12 00:03:51 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3274B106564A; Thu, 12 Jan 2012 00:03:51 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1F3528FC14; Thu, 12 Jan 2012 00:03:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q0C03pwE082979; Thu, 12 Jan 2012 00:03:51 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q0C03owC082977; Thu, 12 Jan 2012 00:03:51 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201201120003.q0C03owC082977@svn.freebsd.org> From: Eitan Adler Date: Thu, 12 Jan 2012 00:03:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229995 - in stable/8/sys: dev/fb modules/splash modules/splash/txt X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2012 00:03:51 -0000 Author: eadler (ports committer) Date: Thu Jan 12 00:03:50 2012 New Revision: 229995 URL: http://svn.freebsd.org/changeset/base/229995 Log: MFC r228445: - Add support for ASCII art splash screens in TheDraw format PR: kern/143370 Approved by: ed Added: stable/8/sys/dev/fb/splash_txt.c - copied unchanged from r228445, head/sys/dev/fb/splash_txt.c stable/8/sys/modules/splash/txt/ - copied from r228445, head/sys/modules/splash/txt/ Modified: stable/8/sys/modules/splash/Makefile Directory Properties: stable/8/share/man/ (props changed) stable/8/share/man/man4/ (props changed) stable/8/sys/ (props changed) Copied: stable/8/sys/dev/fb/splash_txt.c (from r228445, head/sys/dev/fb/splash_txt.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/sys/dev/fb/splash_txt.c Thu Jan 12 00:03:50 2012 (r229995, copy of r228445, head/sys/dev/fb/splash_txt.c) @@ -0,0 +1,135 @@ +/*- + * Copyright (c) 1999 Michael Smith + * Copyright (c) 1999 Kazutaka YOKOTA + * Copyright (c) 2005 Antony Mawer + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include + +static int splash_on = FALSE; + +static int txt_init(video_adapter_t *adp); +static int txt_end(video_adapter_t *adp); +static int txt_splash(video_adapter_t * adp, const int on); + +/* These are rows by columns of the text-mode display device. */ +#define BIN_IMAGE_WIDTH 80 +#define BIN_IMAGE_HEIGHT 25 + +static splash_decoder_t txt_decoder = { + .name = "splash_txt", + .init = txt_init, + .term = txt_end, + .splash = txt_splash, + .data_type = SPLASH_IMAGE, +}; + +SPLASH_DECODER(splash_txt, txt_decoder); + +static void +draw_text_splash(sc_softc_t *sc) +{ + u_int x, y; + u_char ch, attr; + u_char *pdata = txt_decoder.data; + + /* Init failed. */ + if (txt_decoder.data == NULL) + return; + for (y = 0; y < BIN_IMAGE_HEIGHT; y++) { + for (x = 0; x < BIN_IMAGE_WIDTH; x++) { + ch = *pdata++; + attr = *pdata++; + sc_vtb_putc(&sc->cur_scp->scr, + (y * sc->cur_scp->xsize) + x, + sc->scr_map[ch], (int)attr << 8); + } + } +} + +static int +txt_init(video_adapter_t *adp) +{ + + /* Ensure that the image data exists. */ + if (txt_decoder.data == NULL || txt_decoder.data_size <= 0) { + printf("splash_txt: No ASCII bitmap file found\n"); + return (ENODEV); + } + return (0); +} + +static int +txt_end(video_adapter_t *adp) +{ + + return (0); +} + +static int +txt_splash(video_adapter_t *adp, const int on) +{ + sc_softc_t *sc; + scr_stat *scp; + + sc = sc_find_softc(adp, NULL); + if (sc == NULL) + return (EAGAIN); + scp = sc->cur_scp; + if (on) { + if (!splash_on) { + if (adp->va_info.vi_flags & V_INFO_GRAPHICS) + return EAGAIN; + /* Clear screen and set border colour. */ + sc_vtb_clear(&scp->scr, sc->scr_map[0x20], + (FG_LIGHTGREY | BG_BLACK) << 8); + (*vidsw[adp->va_index]->set_hw_cursor)(adp, -1, -1); + sc_set_border(scp, 0); + splash_on = TRUE; + /* Display the splash screen. */ + draw_text_splash(sc); + } + return (0); + } else { + /* The video mode will be restored by the caller. */ + splash_on = FALSE; + return (0); + } +} + + Modified: stable/8/sys/modules/splash/Makefile ============================================================================== --- stable/8/sys/modules/splash/Makefile Thu Jan 12 00:02:14 2012 (r229994) +++ stable/8/sys/modules/splash/Makefile Thu Jan 12 00:03:50 2012 (r229995) @@ -1,5 +1,5 @@ # $FreeBSD$ -SUBDIR= bmp pcx +SUBDIR= bmp pcx txt .include From owner-svn-src-stable-8@FreeBSD.ORG Thu Jan 12 14:44:15 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 343761065672; Thu, 12 Jan 2012 14:44:15 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 044A18FC12; Thu, 12 Jan 2012 14:44:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q0CEiEMg013860; Thu, 12 Jan 2012 14:44:14 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q0CEiE6a013856; Thu, 12 Jan 2012 14:44:14 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201201121444.q0CEiE6a013856@svn.freebsd.org> From: John Baldwin Date: Thu, 12 Jan 2012 14:44:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r230013 - in stable/8: share/man/man9 sys/sys X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2012 14:44:15 -0000 Author: jhb Date: Thu Jan 12 14:44:14 2012 New Revision: 230013 URL: http://svn.freebsd.org/changeset/base/230013 Log: MFC 228715: Add a TASK_INITIALIZER() macro that can be used to statically initialize a task structure. Modified: stable/8/share/man/man9/Makefile stable/8/share/man/man9/taskqueue.9 stable/8/sys/sys/taskqueue.h Directory Properties: stable/8/share/man/man9/ (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/share/man/man9/Makefile ============================================================================== --- stable/8/share/man/man9/Makefile Thu Jan 12 14:43:52 2012 (r230012) +++ stable/8/share/man/man9/Makefile Thu Jan 12 14:44:14 2012 (r230013) @@ -1218,6 +1218,7 @@ MLINKS+=sysctl_ctx_init.9 sysctl_ctx_ent sysctl_ctx_init.9 sysctl_ctx_entry_find.9 \ sysctl_ctx_init.9 sysctl_ctx_free.9 MLINKS+=taskqueue.9 TASK_INIT.9 \ + taskqueue.9 TASK_INITIALIZER.9 \ taskqueue.9 taskqueue_create.9 \ taskqueue.9 TASKQUEUE_DECLARE.9 \ taskqueue.9 TASKQUEUE_DEFINE.9 \ Modified: stable/8/share/man/man9/taskqueue.9 ============================================================================== --- stable/8/share/man/man9/taskqueue.9 Thu Jan 12 14:43:52 2012 (r230012) +++ stable/8/share/man/man9/taskqueue.9 Thu Jan 12 14:44:14 2012 (r230013) @@ -72,6 +72,7 @@ struct task { .Ft int .Fn taskqueue_member "struct taskqueue *queue" "struct thread *td" .Fn TASK_INIT "struct task *task" "int priority" "task_fn_t *func" "void *context" +.Fn TASK_INITIALIZER "int priority" "task_fn_t func" "void *context" .Fn TASKQUEUE_DECLARE "name" .Fn TASKQUEUE_DEFINE "name" "taskqueue_enqueue_fn enqueue" "void *context" "init" .Fn TASKQUEUE_FAST_DEFINE "name" "taskqueue_enqueue_fn enqueue" "void *context" "init" @@ -193,6 +194,9 @@ A convenience macro, is provided to initialise a .Va task structure. +The +.Fn TASK_INITIALIZER +macro generates an initializer for a task structure. The values of .Va priority , .Va func , Modified: stable/8/sys/sys/taskqueue.h ============================================================================== --- stable/8/sys/sys/taskqueue.h Thu Jan 12 14:43:52 2012 (r230012) +++ stable/8/sys/sys/taskqueue.h Thu Jan 12 14:44:14 2012 (r230013) @@ -61,6 +61,12 @@ void taskqueue_block(struct taskqueue *q void taskqueue_unblock(struct taskqueue *queue); int taskqueue_member(struct taskqueue *queue, struct thread *td); +#define TASK_INITIALIZER(priority, func, context) \ + { .ta_pending = 0, \ + .ta_priority = (priority), \ + .ta_func = (func), \ + .ta_context = (context) } + /* * Functions for dedicated thread taskqueues */ From owner-svn-src-stable-8@FreeBSD.ORG Thu Jan 12 15:02:52 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1CC921065678; Thu, 12 Jan 2012 15:02:52 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F00838FC19; Thu, 12 Jan 2012 15:02:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q0CF2pJV014637; Thu, 12 Jan 2012 15:02:51 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q0CF2pwg014634; Thu, 12 Jan 2012 15:02:51 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201201121502.q0CF2pwg014634@svn.freebsd.org> From: Alexander Motin Date: Thu, 12 Jan 2012 15:02:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r230015 - stable/8/sys/cam/scsi X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2012 15:02:52 -0000 Author: mav Date: Thu Jan 12 15:02:51 2012 New Revision: 230015 URL: http://svn.freebsd.org/changeset/base/230015 Log: MFC r228808, r228847, 229395: r228808, r228847: Make cd driver to handle Audio CDs, reporting their 2352 bytes sectors to GEOM and using READ CD command for reading data, same as acd driver does. Audio CDs identified by checking respective bit of the control field of the first track in TOC. 229395: Add support for CDRIOCGETBLOCKSIZE and CDRIOCSETBLOCKSIZE IOCTLs to control sector size same as acd driver does. Together with r228808 and r228847 this allows existing multimedia/vlc to play Audio CDs via CAM cd driver. PR: ports/162190 Sponsored by: iXsystems, Inc. Modified: stable/8/sys/cam/scsi/scsi_all.h stable/8/sys/cam/scsi/scsi_cd.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/cam/scsi/scsi_all.h ============================================================================== --- stable/8/sys/cam/scsi/scsi_all.h Thu Jan 12 14:53:08 2012 (r230014) +++ stable/8/sys/cam/scsi/scsi_all.h Thu Jan 12 15:02:51 2012 (r230015) @@ -611,6 +611,7 @@ struct ata_pass_16 { #define READ_12 0xA8 #define WRITE_12 0xAA #define READ_ELEMENT_STATUS 0xB8 +#define READ_CD 0xBE /* Maintenance In Service Action Codes */ #define REPORT_IDENTIFYING_INFRMATION 0x05 Modified: stable/8/sys/cam/scsi/scsi_cd.c ============================================================================== --- stable/8/sys/cam/scsi/scsi_cd.c Thu Jan 12 14:53:08 2012 (r230014) +++ stable/8/sys/cam/scsi/scsi_cd.c Thu Jan 12 15:02:51 2012 (r230015) @@ -1475,6 +1475,14 @@ cdstart(struct cam_periph *periph, union /* dxfer_len */ bp->bio_bcount, /* sense_len */ SSD_FULL_SIZE, /* timeout */ 30000); + /* Use READ CD command for audio tracks. */ + if (softc->params.blksize == 2352) { + start_ccb->csio.cdb_io.cdb_bytes[0] = READ_CD; + start_ccb->csio.cdb_io.cdb_bytes[9] = 0xf8; + start_ccb->csio.cdb_io.cdb_bytes[10] = 0; + start_ccb->csio.cdb_io.cdb_bytes[11] = 0; + start_ccb->csio.cdb_len = 12; + } start_ccb->ccb_h.ccb_state = CD_CCB_BUFFER_IO; @@ -2668,6 +2676,16 @@ cdioctl(struct disk *dp, u_long cmd, voi error = cdsetspeed(periph, CDR_MAX_SPEED, *(u_int32_t *)addr); cam_periph_unlock(periph); break; + case CDRIOCGETBLOCKSIZE: + *(int *)addr = softc->params.blksize; + break; + case CDRIOCSETBLOCKSIZE: + if (*(int *)addr <= 0) { + error = EINVAL; + break; + } + softc->disk->d_sectorsize = softc->params.blksize = *(int *)addr; + break; case DVDIOCSENDKEY: case DVDIOCREPORTKEY: { struct dvd_authinfo *authinfo; @@ -2871,6 +2889,13 @@ cdcheckmedia(struct cam_periph *periph) softc->flags |= CD_FLAG_VALID_TOC; + /* If the first track is audio, correct sector size. */ + if ((softc->toc.entries[0].control & 4) == 0) { + softc->disk->d_sectorsize = softc->params.blksize = 2352; + softc->disk->d_mediasize = + (off_t)softc->params.blksize * softc->params.disksize; + } + bailout: /* From owner-svn-src-stable-8@FreeBSD.ORG Thu Jan 12 15:50:22 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 554971065670; Thu, 12 Jan 2012 15:50:22 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3BFC58FC15; Thu, 12 Jan 2012 15:50:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q0CFoMRx016221; Thu, 12 Jan 2012 15:50:22 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q0CFoMsW016219; Thu, 12 Jan 2012 15:50:22 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201201121550.q0CFoMsW016219@svn.freebsd.org> From: Alexander Motin Date: Thu, 12 Jan 2012 15:50:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r230018 - stable/8/share/examples/scsi_target X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2012 15:50:22 -0000 Author: mav Date: Thu Jan 12 15:50:21 2012 New Revision: 230018 URL: http://svn.freebsd.org/changeset/base/230018 Log: MFC r228462: - Fix different variable types use in different files after r121184, causing problems on amd64. - s/%lud/%lu/. Sponsored by: iXsystems, Inc. Modified: stable/8/share/examples/scsi_target/scsi_cmds.c Directory Properties: stable/8/share/examples/ (props changed) stable/8/share/examples/cvsup/ (props changed) Modified: stable/8/share/examples/scsi_target/scsi_cmds.c ============================================================================== --- stable/8/share/examples/scsi_target/scsi_cmds.c Thu Jan 12 15:49:06 2012 (r230017) +++ stable/8/share/examples/scsi_target/scsi_cmds.c Thu Jan 12 15:50:21 2012 (r230018) @@ -103,8 +103,8 @@ static struct targ_cdb_handlers cdb_hand static struct scsi_inquiry_data inq_data; static struct initiator_state istates[MAX_INITIATORS]; extern int debug; -extern uint64_t volume_size; -extern size_t sector_size; +extern off_t volume_size; +extern u_int sector_size; extern size_t buf_size; cam_status @@ -609,7 +609,7 @@ start_io(struct ccb_accept_tio *atio, st if (dir == CAM_DIR_IN) { if (notaio) { if (debug) - warnx("read sync %lud @ block " OFF_FMT, + warnx("read sync %lu @ block " OFF_FMT, (unsigned long) (ctio->dxfer_len / sector_size), c_descr->offset / sector_size); @@ -625,7 +625,7 @@ start_io(struct ccb_accept_tio *atio, st } } else { if (debug) - warnx("read async %lud @ block " OFF_FMT, + warnx("read async %lu @ block " OFF_FMT, (unsigned long) (ctio->dxfer_len / sector_size), c_descr->offset / sector_size); @@ -725,7 +725,7 @@ tcmd_rdwr_done(struct ccb_accept_tio *at a_descr->targ_req += ctio->dxfer_len; if (notaio) { if (debug) - warnx("write sync %lud @ block " + warnx("write sync %lu @ block " OFF_FMT, (unsigned long) (ctio->dxfer_len / sector_size), c_descr->offset / sector_size); @@ -742,7 +742,7 @@ tcmd_rdwr_done(struct ccb_accept_tio *at tcmd_rdwr_done(atio, ctio, AIO_DONE); } else { if (debug) - warnx("write async %lud @ block " + warnx("write async %lu @ block " OFF_FMT, (unsigned long) (ctio->dxfer_len / sector_size), c_descr->offset / sector_size); From owner-svn-src-stable-8@FreeBSD.ORG Thu Jan 12 15:57:04 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1C28E1065672; Thu, 12 Jan 2012 15:57:04 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 058928FC24; Thu, 12 Jan 2012 15:57:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q0CFv3lZ016535; Thu, 12 Jan 2012 15:57:03 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q0CFv3GT016533; Thu, 12 Jan 2012 15:57:03 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201201121557.q0CFv3GT016533@svn.freebsd.org> From: Alexander Motin Date: Thu, 12 Jan 2012 15:57:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r230020 - stable/8/sys/dev/isp X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2012 15:57:04 -0000 Author: mav Date: Thu Jan 12 15:57:03 2012 New Revision: 230020 URL: http://svn.freebsd.org/changeset/base/230020 Log: MFC r228461: Fix few bugs in isp(4) target mode support: - in destroy_lun_state() assert hold == 1 instead of 0, as it should receive hold taken by the create_lun_state() or get_lun_statep() before; - fix hold count leak inside rls_lun_statep() that also fired above assert; - in destroy_lun_state() use SIM bus number instead of SIM path id for ISP_GET_PC_ADDR(), as it was before r196008; - make isp_disable_lun() to set status in CCB; - make isp_target_mark_aborted() set status into the proper CCB. Reviewed by: mjacob Sponsored by: iXsystems, inc. Modified: stable/8/sys/dev/isp/isp_freebsd.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/isp/isp_freebsd.c ============================================================================== --- stable/8/sys/dev/isp/isp_freebsd.c Thu Jan 12 15:56:17 2012 (r230019) +++ stable/8/sys/dev/isp/isp_freebsd.c Thu Jan 12 15:57:03 2012 (r230020) @@ -1037,8 +1037,9 @@ static ISP_INLINE void destroy_lun_state(ispsoftc_t *isp, tstate_t *tptr) { struct tslist *lhp; - KASSERT((tptr->hold == 0), ("tptr still held")); - ISP_GET_PC_ADDR(isp, xpt_path_path_id(tptr->owner), lun_hash[LUN_HASH_FUNC(xpt_path_lun_id(tptr->owner))], lhp); + KASSERT((tptr->hold != 0), ("tptr is not held")); + KASSERT((tptr->hold == 1), ("tptr still held (%d)", tptr->hold)); + ISP_GET_PC_ADDR(isp, cam_sim_bus(xpt_path_sim(tptr->owner)), lun_hash[LUN_HASH_FUNC(xpt_path_lun_id(tptr->owner))], lhp); SLIST_REMOVE(lhp, tptr, tstate, next); xpt_free_path(tptr->owner); free(tptr, M_DEVBUF); @@ -1266,12 +1267,13 @@ isp_disable_lun(ispsoftc_t *isp, union c mtx_sleep(isp, &isp->isp_lock, PRIBIO, "want_isp_disable_lun", 0); } isp->isp_osinfo.tmbusy = 1; + status = CAM_REQ_INPROG; /* * Find the state pointer. */ if ((tptr = get_lun_statep(isp, bus, lun)) == NULL) { - ccb->ccb_h.status = CAM_PATH_INVALID; + status = CAM_PATH_INVALID; goto done; } @@ -1291,13 +1293,13 @@ isp_disable_lun(ispsoftc_t *isp, union c } isp->isp_osinfo.rptr = &status; - status = CAM_REQ_INPROG; if (isp_lun_cmd(isp, RQSTYPE_ENABLE_LUN, bus, lun, 0, 0)) { status = CAM_RESRC_UNAVAIL; } else { mtx_sleep(ccb, &isp->isp_lock, PRIBIO, "isp_disable_lun", 0); } done: + ccb->ccb_h.status = status; if (status == CAM_REQ_CMP) { xpt_print(ccb->ccb_h.path, "now disabled for target mode\n"); } @@ -2899,23 +2901,25 @@ isp_target_mark_aborted(ispsoftc_t *isp, { tstate_t *tptr; atio_private_data_t *atp; + union ccb *accb = ccb->cab.abort_ccb; - tptr = get_lun_statep(isp, XS_CHANNEL(ccb), XS_LUN(ccb)); + tptr = get_lun_statep(isp, XS_CHANNEL(accb), XS_LUN(accb)); if (tptr == NULL) { - tptr = get_lun_statep(isp, XS_CHANNEL(ccb), CAM_LUN_WILDCARD); + tptr = get_lun_statep(isp, XS_CHANNEL(accb), CAM_LUN_WILDCARD); if (tptr == NULL) { ccb->ccb_h.status = CAM_REQ_INVALID; return; } } - atp = isp_get_atpd(isp, tptr, ccb->atio.tag_id); + atp = isp_get_atpd(isp, tptr, accb->atio.tag_id); if (atp == NULL) { ccb->ccb_h.status = CAM_REQ_INVALID; - return; + } else { + atp->dead = 1; + ccb->ccb_h.status = CAM_REQ_CMP; } - atp->dead = 1; - ccb->ccb_h.status = CAM_REQ_CMP; + rls_lun_statep(isp, tptr); } static void @@ -4403,7 +4407,7 @@ isp_action(struct cam_sim *sim, union cc switch (accb->ccb_h.func_code) { #ifdef ISP_TARGET_MODE case XPT_ACCEPT_TARGET_IO: - isp_target_mark_aborted(isp, accb); + isp_target_mark_aborted(isp, ccb); break; #endif case XPT_SCSI_IO: From owner-svn-src-stable-8@FreeBSD.ORG Thu Jan 12 20:45:57 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 11C3F1065670; Thu, 12 Jan 2012 20:45:57 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F406A8FC15; Thu, 12 Jan 2012 20:45:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q0CKjuc5025695; Thu, 12 Jan 2012 20:45:56 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q0CKjurQ025693; Thu, 12 Jan 2012 20:45:56 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201201122045.q0CKjurQ025693@svn.freebsd.org> From: Christian Brueffer Date: Thu, 12 Jan 2012 20:45:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r230029 - stable/8/share/man/man4 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2012 20:45:57 -0000 Author: brueffer Date: Thu Jan 12 20:45:56 2012 New Revision: 230029 URL: http://svn.freebsd.org/changeset/base/230029 Log: MFC: r229585 Fix typo. Modified: stable/8/share/man/man4/bce.4 Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/bce.4 ============================================================================== --- stable/8/share/man/man4/bce.4 Thu Jan 12 20:39:54 2012 (r230028) +++ stable/8/share/man/man4/bce.4 Thu Jan 12 20:45:56 2012 (r230029) @@ -251,7 +251,7 @@ status block. .It "bce%d: Could not allocate status block DMA memory!" The driver could not allocate DMA addressable memory for the controller's status block. -.It "bce_d: Could not map status block DMA memory!" +.It "bce%d: Could not map status block DMA memory!" The driver could not map the status block memory into the controller's DMA address space. .It "bce%d: Could not allocate statistics block DMA tag!" From owner-svn-src-stable-8@FreeBSD.ORG Fri Jan 13 00:38:00 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BE6D4106566B; Fri, 13 Jan 2012 00:38:00 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A1F8D8FC19; Fri, 13 Jan 2012 00:38:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q0D0c0Ui033668; Fri, 13 Jan 2012 00:38:00 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q0D0c0Af033666; Fri, 13 Jan 2012 00:38:00 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201201130038.q0D0c0Af033666@svn.freebsd.org> From: Eitan Adler Date: Fri, 13 Jan 2012 00:38:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r230038 - stable/8/sys/kern X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2012 00:38:01 -0000 Author: eadler (ports committer) Date: Fri Jan 13 00:38:00 2012 New Revision: 230038 URL: http://svn.freebsd.org/changeset/base/230038 Log: MFC r228470: - Add a sysctl to allow non-root users the ability to set idle priorities. - While here fix up some style nits. Approved by: jhb Modified: stable/8/sys/kern/kern_resource.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/kern/kern_resource.c ============================================================================== --- stable/8/sys/kern/kern_resource.c Thu Jan 12 22:49:36 2012 (r230037) +++ stable/8/sys/kern/kern_resource.c Fri Jan 13 00:38:00 2012 (r230038) @@ -55,6 +55,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -272,6 +273,10 @@ donice(struct thread *td, struct proc *p return (0); } +static int unprivileged_idprio; +SYSCTL_INT(_security_bsd, OID_AUTO, unprivileged_idprio, CTLFLAG_RW, + &unprivileged_idprio, 0, "Allow non-root users to set an idle priority"); + /* * Set realtime priority for LWP. */ @@ -322,18 +327,26 @@ rtprio_thread(struct thread *td, struct break; /* Disallow setting rtprio in most cases if not superuser. */ -/* - * Realtime priority has to be restricted for reasons which should be - * obvious. However, for idle priority, there is a potential for - * system deadlock if an idleprio process gains a lock on a resource - * that other processes need (and the idleprio process can't run - * due to a CPU-bound normal process). Fix me! XXX - */ -#if 0 - if (RTP_PRIO_IS_REALTIME(rtp.type)) { -#else - if (rtp.type != RTP_PRIO_NORMAL) { -#endif + + /* + * Realtime priority has to be restricted for reasons which + * should be obvious. However, for idleprio processes, there is + * a potential for system deadlock if an idleprio process gains + * a lock on a resource that other processes need (and the + * idleprio process can't run due to a CPU-bound normal + * process). Fix me! XXX + * + * This problem is not only related to idleprio process. + * A user level program can obtain a file lock and hold it + * indefinitely. Additionally, without idleprio processes it is + * still conceivable that a program with low priority will never + * get to run. In short, allowing this feature might make it + * easier to lock a resource indefinitely, but it is not the + * only thing that makes it possible. + */ + if (RTP_PRIO_BASE(rtp.type) == RTP_PRIO_REALTIME || + (RTP_PRIO_BASE(rtp.type) == RTP_PRIO_IDLE && + unprivileged_idprio == 0)) { error = priv_check(td, PRIV_SCHED_RTPRIO); if (error) break; @@ -426,19 +439,14 @@ rtprio(td, uap) if ((error = p_cansched(td, p)) || (error = cierror)) break; - /* Disallow setting rtprio in most cases if not superuser. */ -/* - * Realtime priority has to be restricted for reasons which should be - * obvious. However, for idle priority, there is a potential for - * system deadlock if an idleprio process gains a lock on a resource - * that other processes need (and the idleprio process can't run - * due to a CPU-bound normal process). Fix me! XXX - */ -#if 0 - if (RTP_PRIO_IS_REALTIME(rtp.type)) { -#else - if (rtp.type != RTP_PRIO_NORMAL) { -#endif + /* + * Disallow setting rtprio in most cases if not superuser. + * See the comment in sys_rtprio_thread about idprio + * threads holding a lock. + */ + if (RTP_PRIO_BASE(rtp.type) == RTP_PRIO_REALTIME || + (RTP_PRIO_BASE(rtp.type) == RTP_PRIO_IDLE && + !unprivileged_idprio)) { error = priv_check(td, PRIV_SCHED_RTPRIO); if (error) break; From owner-svn-src-stable-8@FreeBSD.ORG Fri Jan 13 07:10:53 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9D090106564A; Fri, 13 Jan 2012 07:10:53 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 70D878FC14; Fri, 13 Jan 2012 07:10:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q0D7ArjH047879; Fri, 13 Jan 2012 07:10:53 GMT (envelope-from mckusick@svn.freebsd.org) Received: (from mckusick@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q0D7ArqQ047876; Fri, 13 Jan 2012 07:10:53 GMT (envelope-from mckusick@svn.freebsd.org) Message-Id: <201201130710.q0D7ArqQ047876@svn.freebsd.org> From: Kirk McKusick Date: Fri, 13 Jan 2012 07:10:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r230048 - stable/8/sbin/dump X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2012 07:10:53 -0000 Author: mckusick Date: Fri Jan 13 07:10:52 2012 New Revision: 230048 URL: http://svn.freebsd.org/changeset/base/230048 Log: MFC: 226520 The current /etc/dumpdates file restricts device names to 32 characters. With the addition of various GEOM layers some device names now exceed this length, for example /dev/mirror/encrypted.elig.journal. This change expands the field to 53 bytes which brings the /etc/dumpdates lines to 80 characters. Exceeding 80 characters makes the /etc/dumpdates file much less human readable. A test is added to dump so that it verifies that the device name will fit in the 53 character field failing the dump if it is too long. This change has been checked to verify that its /etc/dumpdates file is compatible with older versions of dump. Reported by: Martin Sugioarto PR: kern/160678 Modified: stable/8/sbin/dump/dump.h stable/8/sbin/dump/itime.c Directory Properties: stable/8/sbin/dump/ (props changed) Modified: stable/8/sbin/dump/dump.h ============================================================================== --- stable/8/sbin/dump/dump.h Fri Jan 13 07:08:21 2012 (r230047) +++ stable/8/sbin/dump/dump.h Fri Jan 13 07:10:52 2012 (r230048) @@ -171,9 +171,10 @@ void putdumptime(void); if (ddatev != NULL) \ for (ddp = ddatev[i = 0]; i < nddates; ddp = ddatev[++i]) -#define DUMPOUTFMT "%-32s %d %s" /* for printf */ +#define DUMPFMTLEN 53 /* max device pathname length */ +#define DUMPOUTFMT "%-*s %d %s" /* for printf */ /* name, level, ctime(date) */ -#define DUMPINFMT "%32s %d %[^\n]\n" /* inverse for scanf */ +#define DUMPINFMT "%s %d %[^\n]\n" /* inverse for scanf */ void sig(int signo); Modified: stable/8/sbin/dump/itime.c ============================================================================== --- stable/8/sbin/dump/itime.c Fri Jan 13 07:08:21 2012 (r230047) +++ stable/8/sbin/dump/itime.c Fri Jan 13 07:10:52 2012 (r230048) @@ -222,7 +222,10 @@ static void dumprecout(FILE *file, const struct dumpdates *what) { - if (fprintf(file, DUMPOUTFMT, what->dd_name, + if (strlen(what->dd_name) > DUMPFMTLEN) + quit("Name '%s' exceeds DUMPFMTLEN (%d) bytes\n", + what->dd_name, DUMPFMTLEN); + if (fprintf(file, DUMPOUTFMT, DUMPFMTLEN, what->dd_name, what->dd_level, ctime(&what->dd_ddate)) < 0) quit("%s: %s\n", dumpdates, strerror(errno)); } From owner-svn-src-stable-8@FreeBSD.ORG Fri Jan 13 11:06:32 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4285A106564A; Fri, 13 Jan 2012 11:06:32 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1D07C8FC08; Fri, 13 Jan 2012 11:06:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q0DB6Vf3059847; Fri, 13 Jan 2012 11:06:31 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q0DB6Vx8059845; Fri, 13 Jan 2012 11:06:31 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201201131106.q0DB6Vx8059845@svn.freebsd.org> From: Jaakko Heinonen Date: Fri, 13 Jan 2012 11:06:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r230056 - stable/8/share/man/man9 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2012 11:06:32 -0000 Author: jh Date: Fri Jan 13 11:06:31 2012 New Revision: 230056 URL: http://svn.freebsd.org/changeset/base/230056 Log: Partially MFC r228358: Fix markup. Modified: stable/8/share/man/man9/sbuf.9 Directory Properties: stable/8/share/man/man9/ (props changed) Modified: stable/8/share/man/man9/sbuf.9 ============================================================================== --- stable/8/share/man/man9/sbuf.9 Fri Jan 13 11:01:23 2012 (r230055) +++ stable/8/share/man/man9/sbuf.9 Fri Jan 13 11:06:31 2012 (r230056) @@ -380,7 +380,8 @@ function returns the actual string; only works on a finished .Fa sbuf . The -.Fn sbuf_len function returns the length of the string. +.Fn sbuf_len +function returns the length of the string. For an .Fa sbuf with an attached drain, From owner-svn-src-stable-8@FreeBSD.ORG Fri Jan 13 11:10:18 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0B0D6106564A; Fri, 13 Jan 2012 11:10:18 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E836A8FC17; Fri, 13 Jan 2012 11:10:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q0DBAHNX060010; Fri, 13 Jan 2012 11:10:17 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q0DBAH4i060008; Fri, 13 Jan 2012 11:10:17 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201201131110.q0DBAH4i060008@svn.freebsd.org> From: Jaakko Heinonen Date: Fri, 13 Jan 2012 11:10:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r230057 - stable/8/share/man/man9 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2012 11:10:18 -0000 Author: jh Date: Fri Jan 13 11:10:17 2012 New Revision: 230057 URL: http://svn.freebsd.org/changeset/base/230057 Log: MFC r228359: sbuf_data() hasn't returned NULL for overflowed buffers since r71721. Modified: stable/8/share/man/man9/sbuf.9 Directory Properties: stable/8/share/man/man9/ (props changed) Modified: stable/8/share/man/man9/sbuf.9 ============================================================================== --- stable/8/share/man/man9/sbuf.9 Fri Jan 13 11:06:31 2012 (r230056) +++ stable/8/share/man/man9/sbuf.9 Fri Jan 13 11:10:17 2012 (r230057) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 25, 2011 +.Dd December 9, 2011 .Dt SBUF 9 .Os .Sh NAME @@ -456,12 +456,8 @@ function returns a non-zero value if the buffer overflowed, and zero otherwise. .Pp The -.Fn sbuf_data -and .Fn sbuf_len -functions return -.Dv NULL -and \-1, respectively, if the buffer overflowed. +function returns \-1 if the buffer overflowed. .Pp The .Fn sbuf_copyin From owner-svn-src-stable-8@FreeBSD.ORG Fri Jan 13 18:49:28 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A516210657C5; Fri, 13 Jan 2012 18:49:28 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 846418FC15; Fri, 13 Jan 2012 18:49:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q0DInS1I074627; Fri, 13 Jan 2012 18:49:28 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q0DInSic074623; Fri, 13 Jan 2012 18:49:28 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201201131849.q0DInSic074623@svn.freebsd.org> From: John Baldwin Date: Fri, 13 Jan 2012 18:49:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r230066 - in stable/8: sys/boot/i386/boot0 usr.sbin/boot0cfg X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2012 18:49:28 -0000 Author: jhb Date: Fri Jan 13 18:49:28 2012 New Revision: 230066 URL: http://svn.freebsd.org/changeset/base/230066 Log: MFC 228738: Allow boot0cfg to force a PXE boot via boot0 on the next boot. - Fix boot0 to check for PXE when using the pre-set setting for the preferred slice. - Update boot0cfg to use slice 6 to select PXE. Accept a 'pxe' argument instead of a number for the 's' option as a way to select PXE as well. Modified: stable/8/sys/boot/i386/boot0/boot0.S stable/8/usr.sbin/boot0cfg/boot0cfg.8 stable/8/usr.sbin/boot0cfg/boot0cfg.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/usr.sbin/boot0cfg/ (props changed) Modified: stable/8/sys/boot/i386/boot0/boot0.S ============================================================================== --- stable/8/sys/boot/i386/boot0/boot0.S Fri Jan 13 18:49:04 2012 (r230065) +++ stable/8/sys/boot/i386/boot0/boot0.S Fri Jan 13 18:49:28 2012 (r230066) @@ -413,6 +413,7 @@ got_key: 3: #endif /* ONLY_F_KEYS */ #endif /* SIO */ +check_selection: cmpb $0x5,%al # F1..F6 or 1..6 ? #ifdef PXE /* enable PXE/INT18 using F6 */ jne 1f; @@ -421,7 +422,6 @@ got_key: #endif /* PXE */ jae beep # Not in F1..F5, beep -check_selection: /* * We have a selection. If it's a bad selection go back to complain. * The bits in MNUOPT were set when the options were printed. Modified: stable/8/usr.sbin/boot0cfg/boot0cfg.8 ============================================================================== --- stable/8/usr.sbin/boot0cfg/boot0cfg.8 Fri Jan 13 18:49:04 2012 (r230065) +++ stable/8/usr.sbin/boot0cfg/boot0cfg.8 Fri Jan 13 18:49:28 2012 (r230066) @@ -146,6 +146,9 @@ Set the default boot selection to .Ar slice . Values between 1 and 4 refer to slices; a value of 5 refers to the option of booting from a second disk. +The special string +.Dq PXE +or a value of 6 can be used to boot via PXE. .It Fl t Ar ticks Set the timeout value to .Ar ticks . Modified: stable/8/usr.sbin/boot0cfg/boot0cfg.c ============================================================================== --- stable/8/usr.sbin/boot0cfg/boot0cfg.c Fri Jan 13 18:49:04 2012 (r230065) +++ stable/8/usr.sbin/boot0cfg/boot0cfg.c Fri Jan 13 18:49:28 2012 (r230066) @@ -168,7 +168,10 @@ main(int argc, char *argv[]) o_flag = 1; break; case 's': - s_arg = argtoi(optarg, 1, 5, 's'); + if (strcasecmp(optarg, "pxe") == 0) + s_arg = 6; + else + s_arg = argtoi(optarg, 1, 6, 's'); break; case 't': t_arg = argtoi(optarg, 1, 0xffff, 't'); @@ -441,8 +444,10 @@ display_mbr(u_int8_t *mbr) printf("default_selection=F%d (", mbr[OFF_OPT] + 1); if (mbr[OFF_OPT] < 4) printf("Slice %d", mbr[OFF_OPT] + 1); - else + else if (mbr[OFF_OPT] == 4) printf("Drive 1"); + else + printf("PXE"); printf(")\n"); } From owner-svn-src-stable-8@FreeBSD.ORG Fri Jan 13 18:54:11 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 03AB2106564A; Fri, 13 Jan 2012 18:54:11 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C78638FC18; Fri, 13 Jan 2012 18:54:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q0DIsA9e074873; Fri, 13 Jan 2012 18:54:10 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q0DIsAGX074869; Fri, 13 Jan 2012 18:54:10 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201201131854.q0DIsAGX074869@svn.freebsd.org> From: John Baldwin Date: Fri, 13 Jan 2012 18:54:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r230068 - in stable/8/sys: kern sys X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2012 18:54:11 -0000 Author: jhb Date: Fri Jan 13 18:54:10 2012 New Revision: 230068 URL: http://svn.freebsd.org/changeset/base/230068 Log: MFC 228849, 229727: Add post-VOP hooks for VOP_DELETEEXTATTR() and VOP_SETEXTATTR() and use these to trigger a NOTE_ATTRIB EVFILT_VNODE kevent when the extended attributes of a vnode are changed. Modified: stable/8/sys/kern/vfs_subr.c stable/8/sys/kern/vnode_if.src stable/8/sys/sys/vnode.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/kern/vfs_subr.c ============================================================================== --- stable/8/sys/kern/vfs_subr.c Fri Jan 13 18:53:48 2012 (r230067) +++ stable/8/sys/kern/vfs_subr.c Fri Jan 13 18:54:10 2012 (r230068) @@ -4003,6 +4003,15 @@ vop_create_post(void *ap, int rc) } void +vop_deleteextattr_post(void *ap, int rc) +{ + struct vop_deleteextattr_args *a = ap; + + if (!rc) + VFS_KNOTE_LOCKED(a->a_vp, NOTE_ATTRIB); +} + +void vop_link_post(void *ap, int rc) { struct vop_link_args *a = ap; @@ -4084,6 +4093,15 @@ vop_setattr_post(void *ap, int rc) } void +vop_setextattr_post(void *ap, int rc) +{ + struct vop_setextattr_args *a = ap; + + if (!rc) + VFS_KNOTE_LOCKED(a->a_vp, NOTE_ATTRIB); +} + +void vop_symlink_post(void *ap, int rc) { struct vop_symlink_args *a = ap; Modified: stable/8/sys/kern/vnode_if.src ============================================================================== --- stable/8/sys/kern/vnode_if.src Fri Jan 13 18:53:48 2012 (r230067) +++ stable/8/sys/kern/vnode_if.src Fri Jan 13 18:54:10 2012 (r230068) @@ -562,6 +562,7 @@ vop_openextattr { %% deleteextattr vp E E E +%! deleteextattr post vop_deleteextattr_post vop_deleteextattr { IN struct vnode *vp; @@ -573,6 +574,7 @@ vop_deleteextattr { %% setextattr vp E E E +%! setextattr post vop_setextattr_post vop_setextattr { IN struct vnode *vp; Modified: stable/8/sys/sys/vnode.h ============================================================================== --- stable/8/sys/sys/vnode.h Fri Jan 13 18:53:48 2012 (r230067) +++ stable/8/sys/sys/vnode.h Fri Jan 13 18:54:10 2012 (r230068) @@ -705,6 +705,7 @@ int vop_panic(struct vop_generic_args *a /* These are called from within the actual VOPS. */ void vop_create_post(void *a, int rc); +void vop_deleteextattr_post(void *a, int rc); void vop_link_post(void *a, int rc); void vop_lock_pre(void *a); void vop_lock_post(void *a, int rc); @@ -717,6 +718,7 @@ void vop_rename_post(void *a, int rc); void vop_rename_pre(void *a); void vop_rmdir_post(void *a, int rc); void vop_setattr_post(void *a, int rc); +void vop_setextattr_post(void *a, int rc); void vop_strategy_pre(void *a); void vop_symlink_post(void *a, int rc); void vop_unlock_post(void *a, int rc); From owner-svn-src-stable-8@FreeBSD.ORG Fri Jan 13 18:58:32 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3CE381065795; Fri, 13 Jan 2012 18:58:32 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 284B48FC15; Fri, 13 Jan 2012 18:58:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q0DIwWZE075096; Fri, 13 Jan 2012 18:58:32 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q0DIwWIr075094; Fri, 13 Jan 2012 18:58:32 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201201131858.q0DIwWIr075094@svn.freebsd.org> From: John Baldwin Date: Fri, 13 Jan 2012 18:58:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r230070 - stable/8/sys/kern X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2012 18:58:32 -0000 Author: jhb Date: Fri Jan 13 18:58:31 2012 New Revision: 230070 URL: http://svn.freebsd.org/changeset/base/230070 Log: MFC 229622: Fix a logic bug in change 228207 in the check for a thread's new user priority being a realtime priority. Modified: stable/8/sys/kern/kern_resource.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/kern/kern_resource.c ============================================================================== --- stable/8/sys/kern/kern_resource.c Fri Jan 13 18:58:15 2012 (r230069) +++ stable/8/sys/kern/kern_resource.c Fri Jan 13 18:58:31 2012 (r230070) @@ -506,7 +506,7 @@ rtp_to_pri(struct rtprio *rtp, struct th oldpri = td->td_user_pri; sched_user_prio(td, newpri); if (td->td_user_pri != oldpri && (td == curthread || - td->td_priority == oldpri || td->td_user_pri >= PRI_MAX_REALTIME)) + td->td_priority == oldpri || td->td_user_pri <= PRI_MAX_REALTIME)) sched_prio(td, td->td_user_pri); if (TD_ON_UPILOCK(td) && oldpri != newpri) { thread_unlock(td); From owner-svn-src-stable-8@FreeBSD.ORG Fri Jan 13 19:13:44 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 674C8106566B; Fri, 13 Jan 2012 19:13:44 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 37D0B8FC0C; Fri, 13 Jan 2012 19:13:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q0DJDiFK075824; Fri, 13 Jan 2012 19:13:44 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q0DJDiYn075822; Fri, 13 Jan 2012 19:13:44 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201201131913.q0DJDiYn075822@svn.freebsd.org> From: John Baldwin Date: Fri, 13 Jan 2012 19:13:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r230073 - stable/8/sys X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2012 19:13:44 -0000 Author: jhb Date: Fri Jan 13 19:13:43 2012 New Revision: 230073 URL: http://svn.freebsd.org/changeset/base/230073 Log: MFC 215605,215606,222952,229400: Various improvements to the 'cscope' target: - Add x86 to ALL_ARCH. - Add lex and yacc sources to things cscope'd. - Include sys/xen in cscope tag file generation. - Improve the cscope target's handling of MD directories. Automatically include the MACHINE_ARCH directory if it differs from MACHINE when building an index for a single machine. Also, include the 'x86' directory when building an index for i386, pc98, or amd64. Modified: stable/8/sys/Makefile Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/Makefile ============================================================================== --- stable/8/sys/Makefile Fri Jan 13 19:10:53 2012 (r230072) +++ stable/8/sys/Makefile Fri Jan 13 19:13:43 2012 (r230073) @@ -12,11 +12,19 @@ CSCOPEDIRS= boot bsm cam cddl compat con geom gnu isa kern libkern modules net net80211 netatalk \ netgraph netinet netinet6 netipsec netipx netnatm netncp \ netsmb nfs nfsclient nfsserver nlm opencrypto \ - pci rpc security sys ufs vm xdr ${CSCOPE_ARCHDIR} + pci rpc security sys ufs vm xdr xen ${CSCOPE_ARCHDIR} +.if !defined(CSCOPE_ARCHDIR) .if defined(ALL_ARCH) -CSCOPE_ARCHDIR ?= amd64 arm i386 ia64 mips pc98 powerpc sparc64 sun4v +CSCOPE_ARCHDIR = amd64 arm i386 ia64 mips pc98 powerpc sparc64 sun4v x86 .else -CSCOPE_ARCHDIR ?= ${MACHINE} +CSCOPE_ARCHDIR = ${MACHINE} +.if ${MACHINE} != ${MACHINE_ARCH} +CSCOPE_ARCHDIR += ${MACHINE_ARCH} +.endif +.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64" +CSCOPE_ARCHDIR += x86 +.endif +.endif .endif # Loadable kernel modules @@ -34,7 +42,7 @@ cscope.out: ${.CURDIR}/cscope.files ${.CURDIR}/cscope.files: .PHONY cd ${.CURDIR}; \ - find ${CSCOPEDIRS} -name "*.[chSs]" -a -type f > ${.TARGET} + find ${CSCOPEDIRS} -name "*.[chSsly]" -a -type f > ${.TARGET} cscope-clean: rm -f cscope.files cscope.out cscope.in.out cscope.po.out From owner-svn-src-stable-8@FreeBSD.ORG Fri Jan 13 19:20:33 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BE5971065677; Fri, 13 Jan 2012 19:20:33 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9E04D8FC0C; Fri, 13 Jan 2012 19:20:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q0DJKXZq076130; Fri, 13 Jan 2012 19:20:33 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q0DJKXCP076127; Fri, 13 Jan 2012 19:20:33 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201201131920.q0DJKXCP076127@svn.freebsd.org> From: John Baldwin Date: Fri, 13 Jan 2012 19:20:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r230075 - in stable/8/sys: netinet netinet6 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2012 19:20:34 -0000 Author: jhb Date: Fri Jan 13 19:20:33 2012 New Revision: 230075 URL: http://svn.freebsd.org/changeset/base/230075 Log: MFC 229414,229476,229477: Various fixes to the SIOC[DG]LIFADDR ioctl handlers: - Grab a reference on any matching interface address (ifa) before dropping the IF_ADDR_LOCK() and release the reference after using it to prevent a potential use-after-free. - Fix the IPv4 ioctl handlers in in_lifaddr_ioctl() to work with IPv4 interface addresses rather than IPv6. - Add missing interface address list locking in the IPv4 handlers. Modified: stable/8/sys/netinet/in.c stable/8/sys/netinet6/in6.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/netinet/in.c ============================================================================== --- stable/8/sys/netinet/in.c Fri Jan 13 19:20:09 2012 (r230074) +++ stable/8/sys/netinet/in.c Fri Jan 13 19:20:33 2012 (r230075) @@ -720,7 +720,7 @@ in_lifaddr_ioctl(struct socket *so, u_lo if (iflr->flags & IFLR_PREFIX) return (EINVAL); - /* copy args to in_aliasreq, perform ioctl(SIOCAIFADDR_IN6). */ + /* copy args to in_aliasreq, perform ioctl(SIOCAIFADDR). */ bzero(&ifra, sizeof(ifra)); bcopy(iflr->iflr_name, ifra.ifra_name, sizeof(ifra.ifra_name)); @@ -769,8 +769,9 @@ in_lifaddr_ioctl(struct socket *so, u_lo } } + IF_ADDR_LOCK(ifp); TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { - if (ifa->ifa_addr->sa_family != AF_INET6) + if (ifa->ifa_addr->sa_family != AF_INET) continue; if (match.s_addr == 0) break; @@ -779,6 +780,9 @@ in_lifaddr_ioctl(struct socket *so, u_lo if (candidate.s_addr == match.s_addr) break; } + if (ifa != NULL) + ifa_ref(ifa); + IF_ADDR_UNLOCK(ifp); if (ifa == NULL) return (EADDRNOTAVAIL); ia = (struct in_ifaddr *)ifa; @@ -797,12 +801,13 @@ in_lifaddr_ioctl(struct socket *so, u_lo in_mask2len(&ia->ia_sockmask.sin_addr); iflr->flags = 0; /*XXX*/ + ifa_free(ifa); return (0); } else { struct in_aliasreq ifra; - /* fill in_aliasreq and do ioctl(SIOCDIFADDR_IN6) */ + /* fill in_aliasreq and do ioctl(SIOCDIFADDR) */ bzero(&ifra, sizeof(ifra)); bcopy(iflr->iflr_name, ifra.ifra_name, sizeof(ifra.ifra_name)); @@ -815,6 +820,7 @@ in_lifaddr_ioctl(struct socket *so, u_lo } bcopy(&ia->ia_sockmask, &ifra.ifra_dstaddr, ia->ia_sockmask.sin_len); + ifa_free(ifa); return (in_control(so, SIOCDIFADDR, (caddr_t)&ifra, ifp, td)); Modified: stable/8/sys/netinet6/in6.c ============================================================================== --- stable/8/sys/netinet6/in6.c Fri Jan 13 19:20:09 2012 (r230074) +++ stable/8/sys/netinet6/in6.c Fri Jan 13 19:20:33 2012 (r230075) @@ -1655,6 +1655,8 @@ in6_lifaddr_ioctl(struct socket *so, u_l if (IN6_ARE_ADDR_EQUAL(&candidate, &match)) break; } + if (ifa != NULL) + ifa_ref(ifa); IF_ADDR_UNLOCK(ifp); if (!ifa) return EADDRNOTAVAIL; @@ -1667,16 +1669,20 @@ in6_lifaddr_ioctl(struct socket *so, u_l bcopy(&ia->ia_addr, &iflr->addr, ia->ia_addr.sin6_len); error = sa6_recoverscope( (struct sockaddr_in6 *)&iflr->addr); - if (error != 0) + if (error != 0) { + ifa_free(ifa); return (error); + } if ((ifp->if_flags & IFF_POINTOPOINT) != 0) { bcopy(&ia->ia_dstaddr, &iflr->dstaddr, ia->ia_dstaddr.sin6_len); error = sa6_recoverscope( (struct sockaddr_in6 *)&iflr->dstaddr); - if (error != 0) + if (error != 0) { + ifa_free(ifa); return (error); + } } else bzero(&iflr->dstaddr, sizeof(iflr->dstaddr)); @@ -1684,6 +1690,7 @@ in6_lifaddr_ioctl(struct socket *so, u_l in6_mask2len(&ia->ia_prefixmask.sin6_addr, NULL); iflr->flags = ia->ia6_flags; /* XXX */ + ifa_free(ifa); return 0; } else { @@ -1707,6 +1714,7 @@ in6_lifaddr_ioctl(struct socket *so, u_l ia->ia_prefixmask.sin6_len); ifra.ifra_flags = ia->ia6_flags; + ifa_free(ifa); return in6_control(so, SIOCDIFADDR_IN6, (caddr_t)&ifra, ifp, td); } From owner-svn-src-stable-8@FreeBSD.ORG Fri Jan 13 19:51:16 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3AB4F1065675; Fri, 13 Jan 2012 19:51:16 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 23CF68FC17; Fri, 13 Jan 2012 19:51:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q0DJpGH5077604; Fri, 13 Jan 2012 19:51:16 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q0DJpFUM077600; Fri, 13 Jan 2012 19:51:15 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201201131951.q0DJpFUM077600@svn.freebsd.org> From: John Baldwin Date: Fri, 13 Jan 2012 19:51:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r230077 - in stable/8/sys: netinet netinet6 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2012 19:51:16 -0000 Author: jhb Date: Fri Jan 13 19:51:15 2012 New Revision: 230077 URL: http://svn.freebsd.org/changeset/base/230077 Log: MFC 229390,229420,229479: Fix some races in the multicast code by removing places where we would drop the IF_ADDR_LOCK while walking an interface's multicast address list: - Use TAILQ_FOREACH() instead of TAILQ_FOREACH_SAFE() for some loops that do not modify the queues they iterate over. - When cancelling multicast timers on an interface, don't release the reference on a group in the leaving state while iterating over the loop. Instead, use the same approach used in igmp_ifdetach() and mld_ifdetach() of placing the groups to free on a pending release list and then releasing the references after dropping the IF_ADDR_LOCK. - Use the mli_relinmhead list normally used to defer calls to in6m_release_locked() to defer calls to mld_v1_transmit_report() until after the IF_ADDR_LOCK is dropped. Modified: stable/8/sys/netinet/igmp.c stable/8/sys/netinet6/in6.c stable/8/sys/netinet6/mld6.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/netinet/igmp.c ============================================================================== --- stable/8/sys/netinet/igmp.c Fri Jan 13 19:50:52 2012 (r230076) +++ stable/8/sys/netinet/igmp.c Fri Jan 13 19:51:15 2012 (r230077) @@ -1641,7 +1641,7 @@ igmp_fasttimo_vnet(void) struct ifqueue qrq; /* Query response packets */ struct ifnet *ifp; struct igmp_ifinfo *igi; - struct ifmultiaddr *ifma, *tifma; + struct ifmultiaddr *ifma; struct in_multi *inm; int loop, uri_fasthz; @@ -1708,8 +1708,7 @@ igmp_fasttimo_vnet(void) } IF_ADDR_LOCK(ifp); - TAILQ_FOREACH_SAFE(ifma, &ifp->if_multiaddrs, ifma_link, - tifma) { + TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { if (ifma->ifma_addr->sa_family != AF_INET || ifma->ifma_protospec == NULL) continue; @@ -2003,7 +2002,7 @@ igmp_v3_cancel_link_timers(struct igmp_i { struct ifmultiaddr *ifma; struct ifnet *ifp; - struct in_multi *inm; + struct in_multi *inm, *tinm; CTR3(KTR_IGMPV3, "%s: cancel v3 timers on ifp %p(%s)", __func__, igi->igi_ifp, igi->igi_ifp->if_xname); @@ -2049,14 +2048,8 @@ igmp_v3_cancel_link_timers(struct igmp_i * transition to REPORTING to ensure the host leave * message is sent upstream to the old querier -- * transition to NOT would lose the leave and race. - * - * SMPNG: Must drop and re-acquire IF_ADDR_LOCK - * around inm_release_locked(), as it is not - * a recursive mutex. */ - IF_ADDR_UNLOCK(ifp); - inm_release_locked(inm); - IF_ADDR_LOCK(ifp); + SLIST_INSERT_HEAD(&igi->igi_relinmhead, inm, inm_nrele); /* FALLTHROUGH */ case IGMP_G_QUERY_PENDING_MEMBER: case IGMP_SG_QUERY_PENDING_MEMBER: @@ -2075,6 +2068,10 @@ igmp_v3_cancel_link_timers(struct igmp_i _IF_DRAIN(&inm->inm_scq); } IF_ADDR_UNLOCK(ifp); + SLIST_FOREACH_SAFE(inm, &igi->igi_relinmhead, inm_nrele, tinm) { + SLIST_REMOVE_HEAD(&igi->igi_relinmhead, inm_nrele); + inm_release_locked(inm); + } } /* @@ -3320,7 +3317,7 @@ igmp_v3_merge_state_changes(struct in_mu static void igmp_v3_dispatch_general_query(struct igmp_ifinfo *igi) { - struct ifmultiaddr *ifma, *tifma; + struct ifmultiaddr *ifma; struct ifnet *ifp; struct in_multi *inm; int retval, loop; @@ -3334,7 +3331,7 @@ igmp_v3_dispatch_general_query(struct ig ifp = igi->igi_ifp; IF_ADDR_LOCK(ifp); - TAILQ_FOREACH_SAFE(ifma, &ifp->if_multiaddrs, ifma_link, tifma) { + TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { if (ifma->ifma_addr->sa_family != AF_INET || ifma->ifma_protospec == NULL) continue; Modified: stable/8/sys/netinet6/in6.c ============================================================================== --- stable/8/sys/netinet6/in6.c Fri Jan 13 19:50:52 2012 (r230076) +++ stable/8/sys/netinet6/in6.c Fri Jan 13 19:51:15 2012 (r230077) @@ -1195,7 +1195,7 @@ in6_purgeaddr(struct ifaddr *ifa) struct sockaddr_in6 mask, addr; int plen, error; struct rtentry *rt; - struct ifaddr *ifa0, *nifa; + struct ifaddr *ifa0; /* * find another IPv6 address as the gateway for the @@ -1203,7 +1203,7 @@ in6_purgeaddr(struct ifaddr *ifa) * address routes */ IF_ADDR_LOCK(ifp); - TAILQ_FOREACH_SAFE(ifa0, &ifp->if_addrhead, ifa_link, nifa) { + TAILQ_FOREACH(ifa0, &ifp->if_addrhead, ifa_link) { if ((ifa0->ifa_addr->sa_family != AF_INET6) || memcmp(&satosin6(ifa0->ifa_addr)->sin6_addr, &ia->ia_addr.sin6_addr, Modified: stable/8/sys/netinet6/mld6.c ============================================================================== --- stable/8/sys/netinet6/mld6.c Fri Jan 13 19:50:52 2012 (r230076) +++ stable/8/sys/netinet6/mld6.c Fri Jan 13 19:51:15 2012 (r230077) @@ -121,7 +121,8 @@ static int mld_v1_input_query(struct ifn /*const*/ struct mld_hdr *); static int mld_v1_input_report(struct ifnet *, const struct ip6_hdr *, /*const*/ struct mld_hdr *); -static void mld_v1_process_group_timer(struct in6_multi *, const int); +static void mld_v1_process_group_timer(struct mld_ifinfo *, + struct in6_multi *); static void mld_v1_process_querier_timers(struct mld_ifinfo *); static int mld_v1_transmit_report(struct in6_multi *, const int); static void mld_v1_update_group(struct in6_multi *, const int); @@ -1332,8 +1333,8 @@ mld_fasttimo_vnet(void) struct ifqueue qrq; /* Query response packets */ struct ifnet *ifp; struct mld_ifinfo *mli; - struct ifmultiaddr *ifma, *tifma; - struct in6_multi *inm; + struct ifmultiaddr *ifma; + struct in6_multi *inm, *tinm; int uri_fasthz; uri_fasthz = 0; @@ -1397,24 +1398,14 @@ mld_fasttimo_vnet(void) } IF_ADDR_LOCK(ifp); - TAILQ_FOREACH_SAFE(ifma, &ifp->if_multiaddrs, ifma_link, - tifma) { + TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { if (ifma->ifma_addr->sa_family != AF_INET6 || ifma->ifma_protospec == NULL) continue; inm = (struct in6_multi *)ifma->ifma_protospec; switch (mli->mli_version) { case MLD_VERSION_1: - /* - * XXX Drop IF_ADDR lock temporarily to - * avoid recursion caused by a potential - * call by in6ifa_ifpforlinklocal(). - * rwlock candidate? - */ - IF_ADDR_UNLOCK(ifp); - mld_v1_process_group_timer(inm, - mli->mli_version); - IF_ADDR_LOCK(ifp); + mld_v1_process_group_timer(mli, inm); break; case MLD_VERSION_2: mld_v2_process_group_timers(mli, &qrq, @@ -1424,9 +1415,25 @@ mld_fasttimo_vnet(void) } IF_ADDR_UNLOCK(ifp); - if (mli->mli_version == MLD_VERSION_2) { - struct in6_multi *tinm; - + switch (mli->mli_version) { + case MLD_VERSION_1: + /* + * Transmit reports for this lifecycle. This + * is done while not holding IF_ADDR_LOCK + * since this can call + * in6ifa_ifpforlinklocal() which locks + * IF_ADDR_LOCK internally as well as + * ip6_output() to transmit a packet. + */ + SLIST_FOREACH_SAFE(inm, &mli->mli_relinmhead, + in6m_nrele, tinm) { + SLIST_REMOVE_HEAD(&mli->mli_relinmhead, + in6m_nrele); + (void)mld_v1_transmit_report(inm, + MLD_LISTENER_REPORT); + } + break; + case MLD_VERSION_2: mld_dispatch_queue(&qrq, 0); mld_dispatch_queue(&scq, 0); @@ -1440,6 +1447,7 @@ mld_fasttimo_vnet(void) in6m_nrele); in6m_release_locked(inm); } + break; } } @@ -1453,7 +1461,7 @@ out_locked: * Will update the global pending timer flags. */ static void -mld_v1_process_group_timer(struct in6_multi *inm, const int version) +mld_v1_process_group_timer(struct mld_ifinfo *mli, struct in6_multi *inm) { int report_timer_expired; @@ -1480,8 +1488,8 @@ mld_v1_process_group_timer(struct in6_mu case MLD_REPORTING_MEMBER: if (report_timer_expired) { inm->in6m_state = MLD_IDLE_MEMBER; - (void)mld_v1_transmit_report(inm, - MLD_LISTENER_REPORT); + SLIST_INSERT_HEAD(&mli->mli_relinmhead, inm, + in6m_nrele); } break; case MLD_G_QUERY_PENDING_MEMBER: @@ -1652,7 +1660,7 @@ mld_v2_cancel_link_timers(struct mld_ifi { struct ifmultiaddr *ifma; struct ifnet *ifp; - struct in6_multi *inm; + struct in6_multi *inm, *tinm; CTR3(KTR_MLD, "%s: cancel v2 timers on ifp %p(%s)", __func__, mli->mli_ifp, mli->mli_ifp->if_xname); @@ -1691,14 +1699,9 @@ mld_v2_cancel_link_timers(struct mld_ifi * If we are leaving the group and switching * version, we need to release the final * reference held for issuing the INCLUDE {}. - * - * SMPNG: Must drop and re-acquire IF_ADDR_LOCK - * around in6m_release_locked(), as it is not - * a recursive mutex. */ - IF_ADDR_UNLOCK(ifp); - in6m_release_locked(inm); - IF_ADDR_LOCK(ifp); + SLIST_INSERT_HEAD(&mli->mli_relinmhead, inm, + in6m_nrele); /* FALLTHROUGH */ case MLD_G_QUERY_PENDING_MEMBER: case MLD_SG_QUERY_PENDING_MEMBER: @@ -1716,6 +1719,10 @@ mld_v2_cancel_link_timers(struct mld_ifi } } IF_ADDR_UNLOCK(ifp); + SLIST_FOREACH_SAFE(inm, &mli->mli_relinmhead, in6m_nrele, tinm) { + SLIST_REMOVE_HEAD(&mli->mli_relinmhead, in6m_nrele); + in6m_release_locked(inm); + } } /* @@ -2972,7 +2979,7 @@ mld_v2_merge_state_changes(struct in6_mu static void mld_v2_dispatch_general_query(struct mld_ifinfo *mli) { - struct ifmultiaddr *ifma, *tifma; + struct ifmultiaddr *ifma; struct ifnet *ifp; struct in6_multi *inm; int retval; @@ -2986,7 +2993,7 @@ mld_v2_dispatch_general_query(struct mld ifp = mli->mli_ifp; IF_ADDR_LOCK(ifp); - TAILQ_FOREACH_SAFE(ifma, &ifp->if_multiaddrs, ifma_link, tifma) { + TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { if (ifma->ifma_addr->sa_family != AF_INET6 || ifma->ifma_protospec == NULL) continue; From owner-svn-src-stable-8@FreeBSD.ORG Fri Jan 13 20:15:49 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C7DE91065673; Fri, 13 Jan 2012 20:15:49 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A815C8FC14; Fri, 13 Jan 2012 20:15:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q0DKFnsW078561; Fri, 13 Jan 2012 20:15:49 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q0DKFnHP078557; Fri, 13 Jan 2012 20:15:49 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201201132015.q0DKFnHP078557@svn.freebsd.org> From: John Baldwin Date: Fri, 13 Jan 2012 20:15:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r230080 - stable/8/sys/kern X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2012 20:15:49 -0000 Author: jhb Date: Fri Jan 13 20:15:49 2012 New Revision: 230080 URL: http://svn.freebsd.org/changeset/base/230080 Log: MFC 229429: Some small fixes to CPU accounting for threads: - Only initialize the per-cpu switchticks and switchtime in sched_throw() for the very first context switch on APs during boot. This avoids a small gap between the middle of thread_exit() and sched_throw() where time is not accounted to any thread. - In thread_exit(), update the timestamp bookkeeping to track the changes to mi_switch() introduced by td_rux so that the code once again matches the comment claiming it is mimicing mi_switch(). Specifically, only update the per-thread stats directly and depend on ruxagg() to update p_rux rather than adjusting p_rux directly. While here, move the timestamp bookkeeping as late in the function as possible. Modified: stable/8/sys/kern/kern_thread.c stable/8/sys/kern/sched_4bsd.c stable/8/sys/kern/sched_ule.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/kern/kern_thread.c ============================================================================== --- stable/8/sys/kern/kern_thread.c Fri Jan 13 20:15:27 2012 (r230079) +++ stable/8/sys/kern/kern_thread.c Fri Jan 13 20:15:49 2012 (r230080) @@ -333,7 +333,7 @@ thread_free(struct thread *td) void thread_exit(void) { - uint64_t new_switchtime; + uint64_t runtime, new_switchtime; struct thread *td; struct thread *td2; struct proc *p; @@ -362,15 +362,6 @@ thread_exit(void) */ cpu_thread_exit(td); /* XXXSMP */ - /* Do the same timestamp bookkeeping that mi_switch() would do. */ - new_switchtime = cpu_ticks(); - p->p_rux.rux_runtime += (new_switchtime - PCPU_GET(switchtime)); - PCPU_SET(switchtime, new_switchtime); - PCPU_SET(switchticks, ticks); - PCPU_INC(cnt.v_swtch); - /* Save our resource usage in our process. */ - td->td_ru.ru_nvcsw++; - rucollect(&p->p_ru, &td->td_ru); /* * The last thread is left attached to the process * So that the whole bundle gets recycled. Skip @@ -419,7 +410,21 @@ thread_exit(void) PMC_SWITCH_CONTEXT(td, PMC_FN_CSW_OUT); #endif PROC_UNLOCK(p); + + /* Do the same timestamp bookkeeping that mi_switch() would do. */ + new_switchtime = cpu_ticks(); + runtime = new_switchtime - PCPU_GET(switchtime); + td->td_runtime += runtime; + td->td_incruntime += runtime; + PCPU_SET(switchtime, new_switchtime); + PCPU_SET(switchticks, ticks); + PCPU_INC(cnt.v_swtch); + + /* Save our resource usage in our process. */ + td->td_ru.ru_nvcsw++; ruxagg(p, td); + rucollect(&p->p_ru, &td->td_ru); + thread_lock(td); PROC_SUNLOCK(p); td->td_state = TDS_INACTIVE; Modified: stable/8/sys/kern/sched_4bsd.c ============================================================================== --- stable/8/sys/kern/sched_4bsd.c Fri Jan 13 20:15:27 2012 (r230079) +++ stable/8/sys/kern/sched_4bsd.c Fri Jan 13 20:15:49 2012 (r230080) @@ -1571,14 +1571,14 @@ sched_throw(struct thread *td) if (td == NULL) { mtx_lock_spin(&sched_lock); spinlock_exit(); + PCPU_SET(switchtime, cpu_ticks()); + PCPU_SET(switchticks, ticks); } else { lock_profile_release_lock(&sched_lock.lock_object); MPASS(td->td_lock == &sched_lock); } mtx_assert(&sched_lock, MA_OWNED); KASSERT(curthread->td_md.md_spinlock_count == 1, ("invalid count")); - PCPU_SET(switchtime, cpu_ticks()); - PCPU_SET(switchticks, ticks); cpu_throw(td, choosethread()); /* doesn't return */ } Modified: stable/8/sys/kern/sched_ule.c ============================================================================== --- stable/8/sys/kern/sched_ule.c Fri Jan 13 20:15:27 2012 (r230079) +++ stable/8/sys/kern/sched_ule.c Fri Jan 13 20:15:49 2012 (r230080) @@ -2585,6 +2585,8 @@ sched_throw(struct thread *td) /* Correct spinlock nesting and acquire the correct lock. */ TDQ_LOCK(tdq); spinlock_exit(); + PCPU_SET(switchtime, cpu_ticks()); + PCPU_SET(switchticks, ticks); } else { MPASS(td->td_lock == TDQ_LOCKPTR(tdq)); tdq_load_rem(tdq, td); @@ -2593,8 +2595,6 @@ sched_throw(struct thread *td) KASSERT(curthread->td_md.md_spinlock_count == 1, ("invalid count")); newtd = choosethread(); TDQ_LOCKPTR(tdq)->mtx_lock = (uintptr_t)newtd; - PCPU_SET(switchtime, cpu_ticks()); - PCPU_SET(switchticks, ticks); cpu_throw(td, newtd); /* doesn't return */ } From owner-svn-src-stable-8@FreeBSD.ORG Fri Jan 13 20:23:18 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 86E691065678; Fri, 13 Jan 2012 20:23:18 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7168A8FC08; Fri, 13 Jan 2012 20:23:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q0DKNIYE078881; Fri, 13 Jan 2012 20:23:18 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q0DKNIId078879; Fri, 13 Jan 2012 20:23:18 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201201132023.q0DKNIId078879@svn.freebsd.org> From: John Baldwin Date: Fri, 13 Jan 2012 20:23:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r230082 - stable/8/sys/modules/kgssapi_krb5 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2012 20:23:18 -0000 Author: jhb Date: Fri Jan 13 20:23:18 2012 New Revision: 230082 URL: http://svn.freebsd.org/changeset/base/230082 Log: MFC 229519: Fix 'make clean' for this module so it cleans up the generated gssd.h. Modified: stable/8/sys/modules/kgssapi_krb5/Makefile Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/modules/kgssapi_krb5/Makefile ============================================================================== --- stable/8/sys/modules/kgssapi_krb5/Makefile Fri Jan 13 20:22:57 2012 (r230081) +++ stable/8/sys/modules/kgssapi_krb5/Makefile Fri Jan 13 20:23:18 2012 (r230082) @@ -13,6 +13,7 @@ SRCS= krb5_mech.c \ SRCS+= kgss_if.h gssd.h MFILES= kgssapi/kgss_if.m +CLEANFILES= gssd.h S= ${.CURDIR}/../.. From owner-svn-src-stable-8@FreeBSD.ORG Fri Jan 13 20:25:57 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 17695106564A; Fri, 13 Jan 2012 20:25:57 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 028398FC15; Fri, 13 Jan 2012 20:25:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q0DKPuc2079059; Fri, 13 Jan 2012 20:25:56 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q0DKPuVn079057; Fri, 13 Jan 2012 20:25:56 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201201132025.q0DKPuVn079057@svn.freebsd.org> From: John Baldwin Date: Fri, 13 Jan 2012 20:25:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r230084 - stable/8/sys/kern X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2012 20:25:57 -0000 Author: jhb Date: Fri Jan 13 20:25:56 2012 New Revision: 230084 URL: http://svn.freebsd.org/changeset/base/230084 Log: MFC 228960: Cap the priority calculated from the current thread's running tick count at SCHED_PRI_RANGE to prevent overflows in the priority value. This can happen due to irregularities with clock interrupts under certain virtualization environments. Modified: stable/8/sys/kern/sched_ule.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/kern/sched_ule.c ============================================================================== --- stable/8/sys/kern/sched_ule.c Fri Jan 13 20:25:38 2012 (r230083) +++ stable/8/sys/kern/sched_ule.c Fri Jan 13 20:25:56 2012 (r230084) @@ -1426,7 +1426,8 @@ sched_priority(struct thread *td) } else { pri = SCHED_PRI_MIN; if (td->td_sched->ts_ticks) - pri += SCHED_PRI_TICKS(td->td_sched); + pri += min(SCHED_PRI_TICKS(td->td_sched), + SCHED_PRI_RANGE); pri += SCHED_PRI_NICE(td->td_proc->p_nice); KASSERT(pri >= PRI_MIN_BATCH && pri <= PRI_MAX_BATCH, ("sched_priority: invalid priority %d: nice %d, " From owner-svn-src-stable-8@FreeBSD.ORG Fri Jan 13 20:35:44 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B3C6F106564A; Fri, 13 Jan 2012 20:35:43 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 83CEC8FC12; Fri, 13 Jan 2012 20:35:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q0DKZhJ5079543; Fri, 13 Jan 2012 20:35:43 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q0DKZh80079540; Fri, 13 Jan 2012 20:35:43 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201201132035.q0DKZh80079540@svn.freebsd.org> From: John Baldwin Date: Fri, 13 Jan 2012 20:35:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r230087 - stable/8/sys/netinet X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2012 20:35:44 -0000 Author: jhb Date: Fri Jan 13 20:35:43 2012 New Revision: 230087 URL: http://svn.freebsd.org/changeset/base/230087 Log: MFC 221891,229665,229672,229700: Remove the assertion from tcp_input() that rcv_nxt is always greater than or equal to rcv_adv and fix tcp_twstart() to handle this case by assuming the last window was zero rather than a negative value. The code in tcp_input() already safely handled this case. It can happen due to delayed ACKs along with a remote sender that sends data beyond the window we previously advertised. If we have room in our socket buffer for the extra data beyond the advertised window, we will accept it. However, if the ACK for that segment is delayed, then we will not effectively fixup rcv_adv to account for that extra data until the next segment arrives and forces out an ACK. When that next segment arrives, rcv_nxt will be beyond rcv_adv. Modified: stable/8/sys/netinet/tcp_input.c stable/8/sys/netinet/tcp_timewait.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/netinet/tcp_input.c ============================================================================== --- stable/8/sys/netinet/tcp_input.c Fri Jan 13 20:35:12 2012 (r230086) +++ stable/8/sys/netinet/tcp_input.c Fri Jan 13 20:35:43 2012 (r230087) @@ -1776,9 +1776,6 @@ tcp_do_segment(struct mbuf *m, struct tc win = sbspace(&so->so_rcv); if (win < 0) win = 0; - KASSERT(SEQ_GEQ(tp->rcv_adv, tp->rcv_nxt), - ("tcp_input negative window: tp %p rcv_nxt %u rcv_adv %u", tp, - tp->rcv_adv, tp->rcv_nxt)); tp->rcv_wnd = imax(win, (int)(tp->rcv_adv - tp->rcv_nxt)); /* Reset receive buffer auto scaling when not in bulk receive mode. */ Modified: stable/8/sys/netinet/tcp_timewait.c ============================================================================== --- stable/8/sys/netinet/tcp_timewait.c Fri Jan 13 20:35:12 2012 (r230086) +++ stable/8/sys/netinet/tcp_timewait.c Fri Jan 13 20:35:43 2012 (r230087) @@ -228,10 +228,10 @@ tcp_twstart(struct tcpcb *tp) /* * Recover last window size sent. */ - KASSERT(SEQ_GEQ(tp->rcv_adv, tp->rcv_nxt), - ("tcp_twstart negative window: tp %p rcv_nxt %u rcv_adv %u", tp, - tp->rcv_adv, tp->rcv_nxt)); - tw->last_win = (tp->rcv_adv - tp->rcv_nxt) >> tp->rcv_scale; + if (SEQ_GT(tp->rcv_adv, tp->rcv_nxt)) + tw->last_win = (tp->rcv_adv - tp->rcv_nxt) >> tp->rcv_scale; + else + tw->last_win = 0; /* * Set t_recent if timestamps are used on the connection. From owner-svn-src-stable-8@FreeBSD.ORG Fri Jan 13 23:25:58 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DAD43106566B; Fri, 13 Jan 2012 23:25:58 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C8F4D8FC12; Fri, 13 Jan 2012 23:25:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q0DNPwSA084955; Fri, 13 Jan 2012 23:25:58 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q0DNPw0Y084953; Fri, 13 Jan 2012 23:25:58 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201201132325.q0DNPw0Y084953@svn.freebsd.org> From: Gleb Smirnoff Date: Fri, 13 Jan 2012 23:25:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r230093 - stable/8/sbin/dhclient X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2012 23:25:59 -0000 Author: glebius Date: Fri Jan 13 23:25:58 2012 New Revision: 230093 URL: http://svn.freebsd.org/changeset/base/230093 Log: Merge r228463, that explicily uses 255.0.0.0 mask for the temporary prefix. This change isn't actually needed in the stable/8, but let it be here, in case if anyone tries to run stable/8 world on a head/ kernel. Modified: stable/8/sbin/dhclient/dhclient-script Directory Properties: stable/8/sbin/dhclient/ (props changed) Modified: stable/8/sbin/dhclient/dhclient-script ============================================================================== --- stable/8/sbin/dhclient/dhclient-script Fri Jan 13 23:25:35 2012 (r230092) +++ stable/8/sbin/dhclient/dhclient-script Fri Jan 13 23:25:58 2012 (r230093) @@ -305,7 +305,7 @@ MEDIUM) PREINIT) delete_old_alias - $IFCONFIG $interface inet alias 0.0.0.0 netmask 0.0.0.0 broadcast 255.255.255.255 up + $IFCONFIG $interface inet alias 0.0.0.0 netmask 255.0.0.0 broadcast 255.255.255.255 up ;; ARPCHECK|ARPSEND) From owner-svn-src-stable-8@FreeBSD.ORG Sat Jan 14 19:22:46 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 06DE4106566B; Sat, 14 Jan 2012 19:22:46 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CA53F8FC16; Sat, 14 Jan 2012 19:22:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q0EJMjB0045699; Sat, 14 Jan 2012 19:22:45 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q0EJMjmF045696; Sat, 14 Jan 2012 19:22:45 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <201201141922.q0EJMjmF045696@svn.freebsd.org> From: Hajimu UMEMOTO Date: Sat, 14 Jan 2012 19:22:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r230112 - in stable/8: lib/libc/net sbin/route X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2012 19:22:46 -0000 Author: ume Date: Sat Jan 14 19:22:45 2012 New Revision: 230112 URL: http://svn.freebsd.org/changeset/base/230112 Log: MFC r229766: Handle the internal scope address representation of the KAME IPv6 stack for the node-local multicast address. Modified: stable/8/lib/libc/net/getaddrinfo.c stable/8/sbin/route/route.c Directory Properties: stable/8/lib/libc/ (props changed) stable/8/sbin/route/ (props changed) Modified: stable/8/lib/libc/net/getaddrinfo.c ============================================================================== --- stable/8/lib/libc/net/getaddrinfo.c Sat Jan 14 19:08:39 2012 (r230111) +++ stable/8/lib/libc/net/getaddrinfo.c Sat Jan 14 19:22:45 2012 (r230112) @@ -1576,7 +1576,8 @@ ip6_str2scopeid(char *scope, struct sock if (*scope == '\0') return -1; - if (IN6_IS_ADDR_LINKLOCAL(a6) || IN6_IS_ADDR_MC_LINKLOCAL(a6)) { + if (IN6_IS_ADDR_LINKLOCAL(a6) || IN6_IS_ADDR_MC_LINKLOCAL(a6) || + IN6_IS_ADDR_MC_NODELOCAL(a6)) { /* * We currently assume a one-to-one mapping between links * and interfaces, so we simply use interface indices for Modified: stable/8/sbin/route/route.c ============================================================================== --- stable/8/sbin/route/route.c Sat Jan 14 19:08:39 2012 (r230111) +++ stable/8/sbin/route/route.c Sat Jan 14 19:22:45 2012 (r230112) @@ -375,7 +375,8 @@ routename(struct sockaddr *sa) #ifdef __KAME__ if (sa->sa_len == sizeof(struct sockaddr_in6) && (IN6_IS_ADDR_LINKLOCAL(&sin6.sin6_addr) || - IN6_IS_ADDR_MC_LINKLOCAL(&sin6.sin6_addr)) && + IN6_IS_ADDR_MC_LINKLOCAL(&sin6.sin6_addr) || + IN6_IS_ADDR_MC_NODELOCAL(&sin6.sin6_addr)) && sin6.sin6_scope_id == 0) { sin6.sin6_scope_id = ntohs(*(u_int16_t *)&sin6.sin6_addr.s6_addr[2]); @@ -500,7 +501,8 @@ netname(struct sockaddr *sa) #ifdef __KAME__ if (sa->sa_len == sizeof(struct sockaddr_in6) && (IN6_IS_ADDR_LINKLOCAL(&sin6.sin6_addr) || - IN6_IS_ADDR_MC_LINKLOCAL(&sin6.sin6_addr)) && + IN6_IS_ADDR_MC_LINKLOCAL(&sin6.sin6_addr) || + IN6_IS_ADDR_MC_NODELOCAL(&sin6.sin6_addr)) && sin6.sin6_scope_id == 0) { sin6.sin6_scope_id = ntohs(*(u_int16_t *)&sin6.sin6_addr.s6_addr[2]); @@ -1002,7 +1004,8 @@ getaddr(int which, char *str, struct hos memcpy(&su->sin6, res->ai_addr, sizeof(su->sin6)); #ifdef __KAME__ if ((IN6_IS_ADDR_LINKLOCAL(&su->sin6.sin6_addr) || - IN6_IS_ADDR_MC_LINKLOCAL(&su->sin6.sin6_addr)) && + IN6_IS_ADDR_MC_LINKLOCAL(&su->sin6.sin6_addr) || + IN6_IS_ADDR_MC_NODELOCAL(&su->sin6.sin6_addr)) && su->sin6.sin6_scope_id) { *(u_int16_t *)&su->sin6.sin6_addr.s6_addr[2] = htons(su->sin6.sin6_scope_id);