From owner-svn-src-all@FreeBSD.ORG Sun Jan 31 02:11:14 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 894AC1065693; Sun, 31 Jan 2010 02:11:14 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 76F168FC16; Sun, 31 Jan 2010 02:11:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0V2BEuY075711; Sun, 31 Jan 2010 02:11:14 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0V2BEmY075710; Sun, 31 Jan 2010 02:11:14 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201001310211.o0V2BEmY075710@svn.freebsd.org> From: Edward Tomasz Napierala Date: Sun, 31 Jan 2010 02:11: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: r203264 - stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 02:11:14 -0000 Author: trasz Date: Sun Jan 31 02:11:14 2010 New Revision: 203264 URL: http://svn.freebsd.org/changeset/base/203264 Log: MFC r196949: Enable NFSv4 ACL support in ZFS. MFC r197435: In VOP_SETACL(9) and VOP_GETACL(9), specifying wrong ACL type should result in EINVAL, not EOPNOTSUPP. Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Sun Jan 31 01:30:51 2010 (r203263) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Sun Jan 31 02:11:14 2010 (r203264) @@ -3851,7 +3851,15 @@ zfs_pathconf(vnode_t *vp, int cmd, ulong #endif case _PC_ACL_EXTENDED: - *valp = 0; /* TODO */ + *valp = 0; + return (0); + + case _PC_ACL_NFS4: + *valp = 1; + return (0); + + case _PC_ACL_PATH_MAX: + *valp = ACL_MAX_ENTRIES; return (0); case _PC_MIN_HOLE_SIZE: @@ -4471,6 +4479,26 @@ zfs_freebsd_pathconf(ap) return (error); } +static int +zfs_freebsd_fifo_pathconf(ap) + struct vop_pathconf_args /* { + struct vnode *a_vp; + int a_name; + register_t *a_retval; + } */ *ap; +{ + + switch (ap->a_name) { + case _PC_ACL_EXTENDED: + case _PC_ACL_NFS4: + case _PC_ACL_PATH_MAX: + case _PC_MAC_PRESENT: + return (zfs_freebsd_pathconf(ap)); + default: + return (fifo_specops.vop_pathconf(ap)); + } +} + /* * FreeBSD's extended attributes namespace defines file name prefix for ZFS' * extended attribute name: @@ -4865,7 +4893,7 @@ zfs_freebsd_getacl(ap) vsecattr_t vsecattr; if (ap->a_type != ACL_TYPE_NFS4) - return (EOPNOTSUPP); + return (EINVAL); vsecattr.vsa_mask = VSA_ACE | VSA_ACECNT; if (error = zfs_getsecattr(ap->a_vp, &vsecattr, 0, ap->a_cred, NULL)) @@ -4894,13 +4922,13 @@ zfs_freebsd_setacl(ap) aclent_t *aaclp; if (ap->a_type != ACL_TYPE_NFS4) - return (EOPNOTSUPP); + return (EINVAL); if (ap->a_aclp->acl_cnt < 1 || ap->a_aclp->acl_cnt > MAX_ACL_ENTRIES) return (EINVAL); /* - * With NFS4 ACLs, chmod(2) may need to add additional entries, + * With NFSv4 ACLs, chmod(2) may need to add additional entries, * splitting every entry into two and appending "canonical six" * entries at the end. Don't allow for setting an ACL that would * cause chmod(2) to run out of ACL entries. @@ -4974,11 +5002,9 @@ struct vop_vector zfs_vnodeops = { .vop_deleteextattr = zfs_deleteextattr, .vop_setextattr = zfs_setextattr, .vop_listextattr = zfs_listextattr, -#ifdef notyet .vop_getacl = zfs_freebsd_getacl, .vop_setacl = zfs_freebsd_setacl, .vop_aclcheck = zfs_freebsd_aclcheck, -#endif }; struct vop_vector zfs_fifoops = { @@ -4991,10 +5017,9 @@ struct vop_vector zfs_fifoops = { .vop_reclaim = zfs_freebsd_reclaim, .vop_setattr = zfs_freebsd_setattr, .vop_write = VOP_PANIC, + .vop_pathconf = zfs_freebsd_fifo_pathconf, .vop_fid = zfs_freebsd_fid, -#ifdef notyet .vop_getacl = zfs_freebsd_getacl, .vop_setacl = zfs_freebsd_setacl, .vop_aclcheck = zfs_freebsd_aclcheck, -#endif }; From owner-svn-src-all@FreeBSD.ORG Sun Jan 31 02:17:02 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 555D41065672; Sun, 31 Jan 2010 02:17:02 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 43C6A8FC12; Sun, 31 Jan 2010 02:17:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0V2H2uj077013; Sun, 31 Jan 2010 02:17:02 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0V2H2w7077011; Sun, 31 Jan 2010 02:17:02 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201001310217.o0V2H2w7077011@svn.freebsd.org> From: Edward Tomasz Napierala Date: Sun, 31 Jan 2010 02:17: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: r203265 - stable/8/tools/regression/acltools X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 02:17:02 -0000 Author: trasz Date: Sun Jan 31 02:17:01 2010 New Revision: 203265 URL: http://svn.freebsd.org/changeset/base/203265 Log: MFC r196710: Add regression test for ACLs on device files - mostly to make sure we don't crash on attempt to set ACL on them. Modified: stable/8/tools/regression/acltools/tools-posix.test Directory Properties: stable/8/tools/regression/acltools/ (props changed) Modified: stable/8/tools/regression/acltools/tools-posix.test ============================================================================== --- stable/8/tools/regression/acltools/tools-posix.test Sun Jan 31 02:11:14 2010 (r203264) +++ stable/8/tools/regression/acltools/tools-posix.test Sun Jan 31 02:17:01 2010 (r203265) @@ -387,3 +387,19 @@ $ ls -l fff | cut -d' ' -f1 $ rm fff +# Test if we deal properly with device files. +$ mknod bbb b 1 1 +$ setfacl -m u:42:r,g:43:w bbb +> setfacl: acl_get_file() failed: Operation not supported +$ ls -l bbb | cut -d' ' -f1 +> brw-r--r-- + +$ rm bbb + +$ mknod ccc c 1 1 +$ setfacl -m u:42:r,g:43:w ccc +> setfacl: acl_get_file() failed: Operation not supported +$ ls -l ccc | cut -d' ' -f1 +> crw-r--r-- + +$ rm ccc From owner-svn-src-all@FreeBSD.ORG Sun Jan 31 02:18:28 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 736A01065695; Sun, 31 Jan 2010 02:18:28 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 620A68FC34; Sun, 31 Jan 2010 02:18:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0V2ISKu077397; Sun, 31 Jan 2010 02:18:28 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0V2ISZg077395; Sun, 31 Jan 2010 02:18:28 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201001310218.o0V2ISZg077395@svn.freebsd.org> From: Edward Tomasz Napierala Date: Sun, 31 Jan 2010 02:18: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: r203266 - stable/8/tools/regression/acltools X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 02:18:28 -0000 Author: trasz Date: Sun Jan 31 02:18:28 2010 New Revision: 203266 URL: http://svn.freebsd.org/changeset/base/203266 Log: MFC r196736: Adapt to the fact that ls(1) correctly prints '+' for symlinks with ACLs now. Modified: stable/8/tools/regression/acltools/tools-posix.test Directory Properties: stable/8/tools/regression/acltools/ (props changed) Modified: stable/8/tools/regression/acltools/tools-posix.test ============================================================================== --- stable/8/tools/regression/acltools/tools-posix.test Sun Jan 31 02:17:01 2010 (r203265) +++ stable/8/tools/regression/acltools/tools-posix.test Sun Jan 31 02:18:28 2010 (r203266) @@ -77,9 +77,8 @@ $ getfacl -h lll > mask::rwx > other::r-x -# XXX: Why doesn't ls(1) print '+' for symbolic links with ACL set? $ ls -l lll | cut -d' ' -f1 -> lrwxrwxr-x +> lrwxrwxr-x+ # Check whether the original file is left untouched. $ ls -l xxx | cut -d' ' -f1 From owner-svn-src-all@FreeBSD.ORG Sun Jan 31 02:20:02 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 057841065670; Sun, 31 Jan 2010 02:20:02 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E1ACB8FC19; Sun, 31 Jan 2010 02:20:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0V2K1Ih077859; Sun, 31 Jan 2010 02:20:01 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0V2K130077853; Sun, 31 Jan 2010 02:20:01 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201001310220.o0V2K130077853@svn.freebsd.org> From: Edward Tomasz Napierala Date: Sun, 31 Jan 2010 02:20: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: r203267 - stable/8/tools/regression/acltools X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 02:20:02 -0000 Author: trasz Date: Sun Jan 31 02:20:01 2010 New Revision: 203267 URL: http://svn.freebsd.org/changeset/base/203267 Log: MFC r196938: Add regression tests for NFSv4 ACLs and update POSIX.1e tests to the changed error messages. Added: stable/8/tools/regression/acltools/01.t - copied unchanged from r196938, head/tools/regression/acltools/01.t stable/8/tools/regression/acltools/tools-nfs4.test - copied unchanged from r196938, head/tools/regression/acltools/tools-nfs4.test Modified: stable/8/tools/regression/acltools/00.t stable/8/tools/regression/acltools/tools-posix.test Directory Properties: stable/8/tools/regression/acltools/ (props changed) Modified: stable/8/tools/regression/acltools/00.t ============================================================================== --- stable/8/tools/regression/acltools/00.t Sun Jan 31 02:18:28 2010 (r203266) +++ stable/8/tools/regression/acltools/00.t Sun Jan 31 02:20:01 2010 (r203267) @@ -1,5 +1,32 @@ #!/bin/sh # +# Copyright (c) 2008, 2009 Edward Tomasz NapieraÅ‚a +# 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$ +# + # This is a wrapper script to run tools-posix.test. # # If any of the tests fails, here is how to debug it: go to @@ -9,9 +36,6 @@ # /usr/src/tools/regression/acltools/run /usr/src/tools/regression/acltools/tools-posix.test # # Output should be obvious. -# -# $FreeBSD$ -# echo "1..4" @@ -59,4 +83,3 @@ rmdir $MNT mdconfig -du $MD echo "ok 4" - Copied: stable/8/tools/regression/acltools/01.t (from r196938, head/tools/regression/acltools/01.t) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/acltools/01.t Sun Jan 31 02:20:01 2010 (r203267, copy of r196938, head/tools/regression/acltools/01.t) @@ -0,0 +1,86 @@ +#!/bin/sh +# +# Copyright (c) 2008, 2009 Edward Tomasz NapieraÅ‚a +# 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$ +# + +# This is a wrapper script to run tools-nfs4.test on ZFS filesystem. +# +# WARNING: It uses hardcoded ZFS pool name "acltools" +# +# If any of the tests fails, here is how to debug it: go to +# the directory with problematic filesystem mounted on it, +# and do /path/to/test run /path/to/test tools-nfs4.test, e.g. +# +# /usr/src/tools/regression/acltools/run /usr/src/tools/regression/acltools/tools-nfs4.test +# +# Output should be obvious. + +echo "1..4" + +if [ `whoami` != "root" ]; then + echo "not ok 1 - you need to be root to run this test." + exit 1 +fi + +TESTDIR=`dirname $0` + +# Set up the test filesystem. +MD=`mdconfig -at swap -s 64m` +MNT=`mktemp -dt acltools` +zpool create -R $MNT acltools /dev/$MD +if [ $? -ne 0 ]; then + echo "not ok 1 - 'zpool create' failed." + exit 1 +fi + +echo "ok 1" + +cd $MNT + +# First, check whether we can crash the kernel by creating too many +# entries. For some reason this won't work in the test file. +touch xxx +setfacl -x5 xxx +while :; do setfacl -a0 u:42:rwx:allow xxx 2> /dev/null; if [ $? -ne 0 ]; then break; fi; done +chmod 600 xxx +rm xxx +echo "ok 2" + +perl $TESTDIR/run $TESTDIR/tools-nfs4.test > /dev/null + +if [ $? -eq 0 ]; then + echo "ok 3" +else + echo "not ok 3" +fi + +cd / +zpool destroy -f acltools +rmdir $MNT +mdconfig -du $MD + +echo "ok 4" Copied: stable/8/tools/regression/acltools/tools-nfs4.test (from r196938, head/tools/regression/acltools/tools-nfs4.test) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/acltools/tools-nfs4.test Sun Jan 31 02:20:01 2010 (r203267, copy of r196938, head/tools/regression/acltools/tools-nfs4.test) @@ -0,0 +1,829 @@ +# Copyright (c) 2008, 2009 Edward Tomasz NapieraÅ‚a +# 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$ +# + +# This is a tools-level test for NFSv4 ACL functionality. Run it as root +# using ACL-enabled kernel: +# +# /usr/src/tools/regression/acltools/run /usr/src/tools/regression/acltools/tools-nfs4.test +# +# WARNING: Creates files in unsafe way. + +$ whoami +> root +$ umask 022 + +# Smoke test for getfacl(1). +$ touch xxx +$ getfacl xxx +> # file: xxx +> # owner: root +> # group: wheel +> owner@:--x-----------:------:deny +> owner@:rw-p---A-W-Co-:------:allow +> group@:-wxp----------:------:deny +> group@:r-------------:------:allow +> everyone@:-wxp---A-W-Co-:------:deny +> everyone@:r-----a-R-c--s:------:allow + +$ getfacl -q xxx +> owner@:--x-----------:------:deny +> owner@:rw-p---A-W-Co-:------:allow +> group@:-wxp----------:------:deny +> group@:r-------------:------:allow +> everyone@:-wxp---A-W-Co-:------:deny +> everyone@:r-----a-R-c--s:------:allow + +# Check verbose mode formatting. +$ getfacl -v xxx +> # file: xxx +> # owner: root +> # group: wheel +> owner@:execute::deny +> owner@:read_data/write_data/append_data/write_attributes/write_xattr/write_acl/write_owner::allow +> group@:write_data/execute/append_data::deny +> group@:read_data::allow +> everyone@:write_data/execute/append_data/write_attributes/write_xattr/write_acl/write_owner::deny +> everyone@:read_data/read_attributes/read_xattr/read_acl/synchronize::allow + +# Test setfacl -a. +$ setfacl -a2 u:0:write_acl:allow,g:1:read_acl:deny xxx +$ getfacl -n xxx +> # file: xxx +> # owner: root +> # group: wheel +> owner@:--x-----------:------:deny +> owner@:rw-p---A-W-Co-:------:allow +> user:0:-----------C--:------:allow +> group:1:----------c---:------:deny +> group@:-wxp----------:------:deny +> group@:r-------------:------:allow +> everyone@:-wxp---A-W-Co-:------:deny +> everyone@:r-----a-R-c--s:------:allow + +# Test user and group name resolving. +$ rm xxx +$ touch xxx +$ setfacl -a2 u:root:write_acl:allow,g:daemon:read_acl:deny xxx +$ getfacl xxx +> # file: xxx +> # owner: root +> # group: wheel +> owner@:--x-----------:------:deny +> owner@:rw-p---A-W-Co-:------:allow +> user:root:-----------C--:------:allow +> group:daemon:----------c---:------:deny +> group@:-wxp----------:------:deny +> group@:r-------------:------:allow +> everyone@:-wxp---A-W-Co-:------:deny +> everyone@:r-----a-R-c--s:------:allow + +# Check whether ls correctly marks files with "+". +$ ls -l xxx | cut -d' ' -f1 +> -rw-r--r--+ + +# Test removing entries by number. +$ setfacl -x 4 xxx +$ setfacl -x 4 xxx +$ getfacl -n xxx +> # file: xxx +> # owner: root +> # group: wheel +> owner@:--x-----------:------:deny +> owner@:rw-p---A-W-Co-:------:allow +> user:0:-----------C--:------:allow +> group:1:----------c---:------:deny +> everyone@:-wxp---A-W-Co-:------:deny +> everyone@:r-----a-R-c--s:------:allow + +# Test setfacl -m. +$ setfacl -a0 everyone@:rwx:deny xxx +$ setfacl -a0 everyone@:rwx:deny xxx +$ setfacl -a0 everyone@:rwx:deny xxx +$ setfacl -m everyone@::deny xxx +$ getfacl -n xxx +> # file: xxx +> # owner: root +> # group: wheel +> everyone@:--------------:------:deny +> everyone@:--------------:------:deny +> everyone@:--------------:------:deny +> owner@:--x-----------:------:deny +> owner@:rw-p---A-W-Co-:------:allow +> user:0:-----------C--:------:allow +> group:1:----------c---:------:deny +> everyone@:--------------:------:deny +> everyone@:r-----a-R-c--s:------:allow + +# Test getfacl -i. +$ getfacl -i xxx +> # file: xxx +> # owner: root +> # group: wheel +> everyone@:--------------:------:deny +> everyone@:--------------:------:deny +> everyone@:--------------:------:deny +> owner@:--x-----------:------:deny +> owner@:rw-p---A-W-Co-:------:allow +> user:root:-----------C--:------:allow:0 +> group:daemon:----------c---:------:deny:1 +> everyone@:--------------:------:deny +> everyone@:r-----a-R-c--s:------:allow + +# Make sure cp without any flags does not copy copy the ACL. +$ cp xxx yyy +$ ls -l yyy | cut -d' ' -f1 +> -rw-r--r-- + +# Make sure it does with the "-p" flag. +$ rm yyy +$ cp -p xxx yyy +$ getfacl -n yyy +> # file: yyy +> # owner: root +> # group: wheel +> everyone@:--------------:------:deny +> everyone@:--------------:------:deny +> everyone@:--------------:------:deny +> owner@:--x-----------:------:deny +> owner@:rw-p---A-W-Co-:------:allow +> user:0:-----------C--:------:allow +> group:1:----------c---:------:deny +> everyone@:--------------:------:deny +> everyone@:r-----a-R-c--s:------:allow + +$ rm yyy + +# Test removing entries by... by example? +$ setfacl -x everyone@::deny xxx +$ getfacl -n xxx +> # file: xxx +> # owner: root +> # group: wheel +> owner@:--x-----------:------:deny +> owner@:rw-p---A-W-Co-:------:allow +> user:0:-----------C--:------:allow +> group:1:----------c---:------:deny +> everyone@:r-----a-R-c--s:------:allow + +# Test setfacl -b. +$ setfacl -b xxx +$ getfacl -n xxx +> # file: xxx +> # owner: root +> # group: wheel +> owner@:--x-----------:------:deny +> owner@:rw-p---A-W-Co-:------:allow +> group@:-wxp----------:------:deny +> group@:r-------------:------:allow +> everyone@:-wxp---A-W-Co-:------:deny +> everyone@:r-----a-R-c--s:------:allow + +$ ls -l xxx | cut -d' ' -f1 +> -rw-r--r-- + +# Check setfacl(1) and getfacl(1) with multiple files. +$ touch xxx yyy zzz + +$ ls -l xxx yyy zzz | cut -d' ' -f1 +> -rw-r--r-- +> -rw-r--r-- +> -rw-r--r-- + +$ setfacl -m u:42:x:allow,g:43:w:allow nnn xxx yyy zzz +> setfacl: nnn: stat() failed: No such file or directory + +$ ls -l nnn xxx yyy zzz | cut -d' ' -f1 +> ls: nnn: No such file or directory +> -rw-r--r--+ +> -rw-r--r--+ +> -rw-r--r--+ + +$ getfacl -nq nnn xxx yyy zzz +> getfacl: nnn: stat() failed: No such file or directory +> user:42:--x-----------:------:allow +> group:43:-w------------:------:allow +> owner@:--x-----------:------:deny +> owner@:rw-p---A-W-Co-:------:allow +> group@:-wxp----------:------:deny +> group@:r-------------:------:allow +> everyone@:-wxp---A-W-Co-:------:deny +> everyone@:r-----a-R-c--s:------:allow +> +> user:42:--x-----------:------:allow +> group:43:-w------------:------:allow +> owner@:--x-----------:------:deny +> owner@:rw-p---A-W-Co-:------:allow +> group@:-wxp----------:------:deny +> group@:r-------------:------:allow +> everyone@:-wxp---A-W-Co-:------:deny +> everyone@:r-----a-R-c--s:------:allow +> +> user:42:--x-----------:------:allow +> group:43:-w------------:------:allow +> owner@:--x-----------:------:deny +> owner@:rw-p---A-W-Co-:------:allow +> group@:-wxp----------:------:deny +> group@:r-------------:------:allow +> everyone@:-wxp---A-W-Co-:------:deny +> everyone@:r-----a-R-c--s:------:allow + +$ setfacl -b nnn xxx yyy zzz +> setfacl: nnn: stat() failed: No such file or directory + +$ ls -l nnn xxx yyy zzz | cut -d' ' -f1 +> ls: nnn: No such file or directory +> -rw-r--r-- +> -rw-r--r-- +> -rw-r--r-- + +$ rm xxx yyy zzz + +# Test applying mode to an ACL. +$ touch xxx +$ setfacl -a0 user:42:r:allow,user:43:w:deny,user:43:w:allow,user:44:x:allow -x everyone@::allow xxx +$ chmod 600 xxx +$ getfacl -n xxx +> # file: xxx +> # owner: root +> # group: wheel +> user:42:r-------------:------:deny +> user:42:r-------------:------:allow +> user:43:-w------------:------:deny +> user:43:-w------------:------:allow +> user:44:--x-----------:------:deny +> user:44:--x-----------:------:allow +> owner@:--------------:------:deny +> owner@:-------A-W-Co-:------:allow +> group@:--------------:------:deny +> group@:--------------:------:allow +> everyone@:-------A-W-Co-:------:deny +> owner@:--x-----------:------:deny +> owner@:rw-p---A-W-Co-:------:allow +> group@:rwxp----------:------:deny +> group@:--------------:------:allow +> everyone@:rwxp---A-W-Co-:------:deny +> everyone@:------a-R-c--s:------:allow +$ ls -l xxx | cut -d' ' -f1 +> -rw-------+ + +$ rm xxx +$ touch xxx +$ chown 42 xxx +$ setfacl -a0 user:42:r:allow,user:43:w:deny,user:43:w:allow,user:44:x:allow xxx +$ chmod 600 xxx +$ getfacl -n xxx +> # file: xxx +> # owner: 42 +> # group: wheel +> user:42:--------------:------:deny +> user:42:r-------------:------:allow +> user:43:-w------------:------:deny +> user:43:-w------------:------:allow +> user:44:--x-----------:------:deny +> user:44:--x-----------:------:allow +> owner@:--x-----------:------:deny +> owner@:rw-p---A-W-Co-:------:allow +> group@:rwxp----------:------:deny +> group@:--------------:------:allow +> everyone@:rwxp---A-W-Co-:------:deny +> everyone@:------a-R-c--s:------:allow +$ ls -l xxx | cut -d' ' -f1 +> -rw-------+ + +$ rm xxx +$ touch xxx +$ chown 43 xxx +$ setfacl -a0 user:42:r:allow,user:43:w:deny,user:43:w:allow,user:44:x:allow xxx +$ chmod 124 xxx +$ getfacl -n xxx +> # file: xxx +> # owner: 43 +> # group: wheel +> user:42:r-------------:------:deny +> user:42:r-------------:------:allow +> user:43:-w------------:------:deny +> user:43:-w------------:------:allow +> user:44:--x-----------:------:deny +> user:44:--x-----------:------:allow +> owner@:rw-p----------:------:deny +> owner@:--x----A-W-Co-:------:allow +> group@:r-x-----------:------:deny +> group@:-w-p----------:------:allow +> everyone@:-wxp---A-W-Co-:------:deny +> everyone@:r-----a-R-c--s:------:allow +$ ls -l xxx | cut -d' ' -f1 +> ---x-w-r--+ + +$ rm xxx +$ touch xxx +$ chown 43 xxx +$ setfacl -a0 user:42:r:allow,user:43:w:deny,user:43:w:allow,user:44:x:allow xxx +$ chmod 412 xxx +$ getfacl -n xxx +> # file: xxx +> # owner: 43 +> # group: wheel +> user:42:r-------------:------:deny +> user:42:r-------------:------:allow +> user:43:-w------------:------:deny +> user:43:-w------------:------:allow +> user:44:--------------:------:deny +> user:44:--x-----------:------:allow +> owner@:-wxp----------:------:deny +> owner@:r------A-W-Co-:------:allow +> group@:rw-p----------:------:deny +> group@:--x-----------:------:allow +> everyone@:r-x----A-W-Co-:------:deny +> everyone@:-w-p--a-R-c--s:------:allow +$ ls -l xxx | cut -d' ' -f1 +> -r----x-w-+ + +$ mkdir ddd +$ setfacl -a0 group:44:rwapd:allow ddd +$ setfacl -a0 group:43:write_data/delete_child:d:deny,group@:ad:allow ddd +$ setfacl -a0 user:42:rx:fi:allow,group:42:write_data/delete_child:d:allow ddd +$ setfacl -m everyone@:-w-p--a-R-c--s:fi:allow ddd +$ getfacl -n ddd +> # file: ddd +> # owner: root +> # group: wheel +> user:42:r-x-----------:f-i---:allow +> group:42:-w--D---------:-d----:allow +> group:43:-w--D---------:-d----:deny +> group@:-----da-------:------:allow +> group:44:rw-p-da-------:------:allow +> owner@:--------------:------:deny +> owner@:rwxp---A-W-Co-:------:allow +> group@:-w-p----------:------:deny +> group@:r-x-----------:------:allow +> everyone@:-w-p---A-W-Co-:------:deny +> everyone@:-w-p--a-R-c--s:f-i---:allow +$ chmod 777 ddd +$ getfacl -n ddd +> # file: ddd +> # owner: root +> # group: wheel +> user:42:r-x-----------:f-i---:allow +> group:42:-w--D---------:-di---:allow +> group:42:--------------:------:deny +> group:42:-w--D---------:------:allow +> group:43:-w--D---------:-di---:deny +> group:43:-w--D---------:------:deny +> group@:-----da-------:------:allow +> group:44:--------------:------:deny +> group:44:rw-p-da-------:------:allow +> owner@:--------------:------:deny +> owner@:-------A-W-Co-:------:allow +> group@:--------------:------:deny +> group@:--------------:------:allow +> everyone@:-------A-W-Co-:------:deny +> everyone@:-w-p--a-R-c--s:f-i---:allow +> owner@:--------------:------:deny +> owner@:rwxp---A-W-Co-:------:allow +> group@:--------------:------:deny +> group@:rwxp----------:------:allow +> everyone@:-------A-W-Co-:------:deny +> everyone@:rwxp--a-R-c--s:------:allow + +$ rmdir ddd +$ mkdir ddd +$ setfacl -a0 group:44:rwapd:allow ddd +$ setfacl -a0 group:43:write_data/delete_child:d:deny,group@:ad:allow ddd +$ setfacl -a0 user:42:rx:fi:allow,group:42:write_data/delete_child:d:allow ddd +$ setfacl -m everyone@:-w-p--a-R-c--s:fi:allow ddd +$ chmod 124 ddd +$ getfacl -n ddd +> # file: ddd +> # owner: root +> # group: wheel +> user:42:r-x-----------:f-i---:allow +> group:42:-w--D---------:-di---:allow +> group:42:--------------:------:deny +> group:42:----D---------:------:allow +> group:43:-w--D---------:-di---:deny +> group:43:-w--D---------:------:deny +> group@:-----da-------:------:allow +> group:44:r-------------:------:deny +> group:44:r----da-------:------:allow +> owner@:--------------:------:deny +> owner@:-------A-W-Co-:------:allow +> group@:--------------:------:deny +> group@:--------------:------:allow +> everyone@:-------A-W-Co-:------:deny +> everyone@:-w-p--a-R-c--s:f-i---:allow +> owner@:rw-p----------:------:deny +> owner@:--x----A-W-Co-:------:allow +> group@:r-x-----------:------:deny +> group@:-w-p----------:------:allow +> everyone@:-wxp---A-W-Co-:------:deny +> everyone@:r-----a-R-c--s:------:allow + +$ rmdir ddd +$ mkdir ddd +$ setfacl -a0 group:44:rwapd:allow ddd +$ setfacl -a0 group:43:write_data/delete_child:d:deny,group@:ad:allow ddd +$ setfacl -a0 user:42:rx:allow,user:42:rx:fi:allow,group:42:write_data/delete_child:d:allow ddd +$ setfacl -m everyone@:-w-p--a-R-c--s:fi:allow ddd +$ chmod 412 ddd +$ getfacl -n ddd +> # file: ddd +> # owner: root +> # group: wheel +> user:42:r-------------:------:deny +> user:42:r-x-----------:------:allow +> user:42:r-x-----------:f-i---:allow +> group:42:-w--D---------:-di---:allow +> group:42:-w------------:------:deny +> group:42:-w--D---------:------:allow +> group:43:-w--D---------:-di---:deny +> group:43:-w--D---------:------:deny +> group@:-----da-------:------:allow +> group:44:rw-p----------:------:deny +> group:44:rw-p-da-------:------:allow +> owner@:--------------:------:deny +> owner@:-------A-W-Co-:------:allow +> group@:--------------:------:deny +> group@:--------------:------:allow +> everyone@:-------A-W-Co-:------:deny +> everyone@:-w-p--a-R-c--s:f-i---:allow +> owner@:-wxp----------:------:deny +> owner@:r------A-W-Co-:------:allow +> group@:rw-p----------:------:deny +> group@:--x-----------:------:allow +> everyone@:r-x----A-W-Co-:------:deny +> everyone@:-w-p--a-R-c--s:------:allow + +$ rmdir ddd +$ mkdir ddd +$ setfacl -a0 group:44:rwapd:allow ddd +$ setfacl -a0 group:43:write_data/delete_child:d:deny,group@:ad:allow ddd +$ setfacl -a0 user:42:rx:allow,user:42:rx:fi:allow,group:42:write_data/delete_child:d:allow ddd +$ setfacl -m everyone@:-w-p--a-R-c--s:fi:allow ddd +$ chown 42 ddd +$ chmod 412 ddd +$ getfacl -n ddd +> # file: ddd +> # owner: 42 +> # group: wheel +> user:42:--x-----------:------:deny +> user:42:r-x-----------:------:allow +> user:42:r-x-----------:f-i---:allow +> group:42:-w--D---------:-di---:allow +> group:42:-w------------:------:deny +> group:42:-w--D---------:------:allow +> group:43:-w--D---------:-di---:deny +> group:43:-w--D---------:------:deny +> group@:-----da-------:------:allow +> group:44:rw-p----------:------:deny +> group:44:rw-p-da-------:------:allow +> owner@:--------------:------:deny +> owner@:-------A-W-Co-:------:allow +> group@:--------------:------:deny +> group@:--------------:------:allow +> everyone@:-------A-W-Co-:------:deny +> everyone@:-w-p--a-R-c--s:f-i---:allow +> owner@:-wxp----------:------:deny +> owner@:r------A-W-Co-:------:allow +> group@:rw-p----------:------:deny +> group@:--x-----------:------:allow +> everyone@:r-x----A-W-Co-:------:deny +> everyone@:-w-p--a-R-c--s:------:allow + +# Test applying ACL to mode. +$ rmdir ddd +$ mkdir ddd +$ setfacl -a0 u:42:rwx:fi:allow ddd +$ ls -ld ddd | cut -d' ' -f1 +> drwxr-xr-x+ + +$ rmdir ddd +$ mkdir ddd +$ chmod 0 ddd +$ setfacl -a0 owner@:r:allow,group@:w:deny,group@:wx:allow ddd +$ ls -ld ddd | cut -d' ' -f1 +> dr----x---+ + +# XXX: This one is fishy. Shouldn't it be "dr---wx---+"? +$ rmdir ddd +$ mkdir ddd +$ chmod 0 ddd +$ setfacl -a0 owner@:r:allow,group@:w:fi:deny,group@:wx:allow ddd +$ ls -ld ddd | cut -d' ' -f1 +> dr---wx---+ + +$ rmdir ddd +$ mkdir ddd +$ chmod 0 ddd +$ setfacl -a0 owner@:r:allow,group:43:w:deny,group:43:wx:allow ddd +$ ls -ld ddd | cut -d' ' -f1 +> dr--------+ + +$ rmdir ddd +$ mkdir ddd +$ chmod 0 ddd +$ setfacl -a0 owner@:r:allow,user:43:w:deny,user:43:wx:allow ddd +$ ls -ld ddd | cut -d' ' -f1 +> dr--------+ + +# Test inheritance. +$ rmdir ddd +$ mkdir ddd +$ setfacl -a0 group:43:write_data/write_acl:fin:deny,u:43:rwxp:allow ddd +$ setfacl -a0 user:42:rx:fi:allow,group:42:write_data/delete_child:dn:deny ddd +$ setfacl -a0 user:42:write_acl/write_owner:fi:allow ddd +$ setfacl -a0 group:41:read_data/read_attributes:dni:allow ddd +$ setfacl -a0 user:41:write_data/write_attributes:fn:allow ddd +$ getfacl -qn ddd +> user:41:-w-----A------:f--n--:allow +> group:41:r-----a-------:-din--:allow +> user:42:-----------Co-:f-i---:allow +> user:42:r-x-----------:f-i---:allow +> group:42:-w--D---------:-d-n--:deny +> group:43:-w---------C--:f-in--:deny +> user:43:rwxp----------:------:allow +> owner@:--------------:------:deny +> owner@:rwxp---A-W-Co-:------:allow +> group@:-w-p----------:------:deny +> group@:r-x-----------:------:allow +> everyone@:-w-p---A-W-Co-:------:deny +> everyone@:r-x---a-R-c--s:------:allow + +$ cd ddd +$ touch xxx +$ getfacl -qn xxx +> user:41:-w------------:------:deny +> user:41:-w-----A------:------:allow +> user:42:--------------:------:deny +> user:42:--------------:------:allow +> user:42:--x-----------:------:deny +> user:42:r-x-----------:------:allow +> group:43:-w---------C--:------:deny +> owner@:--x-----------:------:deny +> owner@:rw-p---A-W-Co-:------:allow +> group@:-wxp----------:------:deny +> group@:r-------------:------:allow +> everyone@:-wxp---A-W-Co-:------:deny +> everyone@:r-----a-R-c--s:------:allow + +$ rm xxx +$ umask 077 +$ touch xxx +$ getfacl -qn xxx +> user:41:-w------------:------:deny +> user:41:-w-----A------:------:allow +> user:42:--------------:------:deny +> user:42:--------------:------:allow +> user:42:r-x-----------:------:deny +> user:42:r-x-----------:------:allow +> group:43:-w---------C--:------:deny +> owner@:--x-----------:------:deny +> owner@:rw-p---A-W-Co-:------:allow +> group@:rwxp----------:------:deny +> group@:--------------:------:allow +> everyone@:rwxp---A-W-Co-:------:deny +> everyone@:------a-R-c--s:------:allow + +$ rm xxx +$ umask 770 +$ touch xxx +$ getfacl -qn xxx +> user:41:-w------------:------:deny +> user:41:-w-----A------:------:allow +> user:42:--------------:------:deny +> user:42:--------------:------:allow +> user:42:r-x-----------:------:deny +> user:42:r-x-----------:------:allow +> group:43:-w---------C--:------:deny +> owner@:rwxp----------:------:deny +> owner@:-------A-W-Co-:------:allow +> group@:rwxp----------:------:deny +> group@:--------------:------:allow +> everyone@:--x----A-W-Co-:------:deny +> everyone@:rw-p--a-R-c--s:------:allow + +$ rm xxx +$ umask 707 +$ touch xxx +$ getfacl -qn xxx +> user:41:--------------:------:deny +> user:41:-w-----A------:------:allow +> user:42:--------------:------:deny +> user:42:--------------:------:allow +> user:42:--x-----------:------:deny +> user:42:r-x-----------:------:allow +> group:43:-w---------C--:------:deny +> owner@:rwxp----------:------:deny +> owner@:-------A-W-Co-:------:allow +> group@:--x-----------:------:deny +> group@:rw-p----------:------:allow +> everyone@:rwxp---A-W-Co-:------:deny +> everyone@:------a-R-c--s:------:allow + +$ umask 077 +$ mkdir yyy +$ getfacl -qn yyy +> group:41:r-------------:------:deny +> group:41:r-----a-------:------:allow +> user:42:-----------Co-:f-i---:allow +> user:42:r-x-----------:f-i---:allow +> group:42:-w--D---------:------:deny +> owner@:--------------:------:deny +> owner@:rwxp---A-W-Co-:------:allow +> group@:rwxp----------:------:deny +> group@:--------------:------:allow +> everyone@:rwxp---A-W-Co-:------:deny +> everyone@:------a-R-c--s:------:allow + +$ rmdir yyy +$ umask 770 +$ mkdir yyy +$ getfacl -qn yyy +> group:41:r-------------:------:deny +> group:41:r-----a-------:------:allow +> user:42:-----------Co-:f-i---:allow +> user:42:r-x-----------:f-i---:allow +> group:42:-w--D---------:------:deny +> owner@:rwxp----------:------:deny +> owner@:-------A-W-Co-:------:allow +> group@:rwxp----------:------:deny +> group@:--------------:------:allow +> everyone@:-------A-W-Co-:------:deny +> everyone@:rwxp--a-R-c--s:------:allow + +$ rmdir yyy +$ umask 707 +$ mkdir yyy +$ getfacl -qn yyy +> group:41:--------------:------:deny +> group:41:------a-------:------:allow +> user:42:-----------Co-:f-i---:allow +> user:42:r-x-----------:f-i---:allow +> group:42:-w--D---------:------:deny +> owner@:rwxp----------:------:deny +> owner@:-------A-W-Co-:------:allow +> group@:--------------:------:deny +> group@:rwxp----------:------:allow +> everyone@:rwxp---A-W-Co-:------:deny +> everyone@:------a-R-c--s:------:allow + +# There is some complication regarding how write_acl and write_owner flags +# get inherited. Make sure we got it right. +$ setfacl -b . +$ setfacl -a0 u:42:Co:f:allow . +$ setfacl -a0 u:43:Co:d:allow . +$ setfacl -a0 u:44:Co:fd:allow . +$ setfacl -a0 u:45:Co:fi:allow . +$ setfacl -a0 u:46:Co:di:allow . +$ setfacl -a0 u:47:Co:fdi:allow . +$ setfacl -a0 u:48:Co:fn:allow . +$ setfacl -a0 u:49:Co:dn:allow . +$ setfacl -a0 u:50:Co:fdn:allow . +$ setfacl -a0 u:51:Co:fni:allow . +$ setfacl -a0 u:52:Co:dni:allow . +$ setfacl -a0 u:53:Co:fdni:allow . +$ umask 022 +$ rm xxx +$ touch xxx +$ getfacl -nq xxx +> user:53:--------------:------:deny +> user:53:--------------:------:allow +> user:51:--------------:------:deny +> user:51:--------------:------:allow +> user:50:--------------:------:deny +> user:50:--------------:------:allow +> user:48:--------------:------:deny +> user:48:--------------:------:allow +> user:47:--------------:------:deny +> user:47:--------------:------:allow +> user:45:--------------:------:deny +> user:45:--------------:------:allow +> user:44:--------------:------:deny +> user:44:--------------:------:allow +> user:42:--------------:------:deny +> user:42:--------------:------:allow +> owner@:--x-----------:------:deny +> owner@:rw-p---A-W-Co-:------:allow +> group@:-wxp----------:------:deny +> group@:r-------------:------:allow +> everyone@:-wxp---A-W-Co-:------:deny +> everyone@:r-----a-R-c--s:------:allow + +$ rmdir yyy +$ mkdir yyy +$ getfacl -nq yyy +> user:53:--------------:------:deny +> user:53:--------------:------:allow +> user:52:--------------:------:deny +> user:52:--------------:------:allow +> user:50:--------------:------:deny +> user:50:--------------:------:allow +> user:49:--------------:------:deny +> user:49:--------------:------:allow +> user:47:-----------Co-:fdi---:allow +> user:47:--------------:------:deny +> user:47:--------------:------:allow +> user:46:-----------Co-:-di---:allow +> user:46:--------------:------:deny +> user:46:--------------:------:allow +> user:45:-----------Co-:f-i---:allow +> user:44:-----------Co-:fdi---:allow +> user:44:--------------:------:deny +> user:44:--------------:------:allow +> user:43:-----------Co-:-di---:allow +> user:43:--------------:------:deny +> user:43:--------------:------:allow +> user:42:-----------Co-:f-i---:allow +> owner@:--------------:------:deny +> owner@:rwxp---A-W-Co-:------:allow +> group@:-w-p----------:------:deny +> group@:r-x-----------:------:allow +> everyone@:-w-p---A-W-Co-:------:deny +> everyone@:r-x---a-R-c--s:------:allow + +$ setfacl -b . +$ setfacl -a0 u:42:Co:f:deny . +$ setfacl -a0 u:43:Co:d:deny . +$ setfacl -a0 u:44:Co:fd:deny . +$ setfacl -a0 u:45:Co:fi:deny . +$ setfacl -a0 u:46:Co:di:deny . +$ setfacl -a0 u:47:Co:fdi:deny . +$ setfacl -a0 u:48:Co:fn:deny . +$ setfacl -a0 u:49:Co:dn:deny . +$ setfacl -a0 u:50:Co:fdn:deny . +$ setfacl -a0 u:51:Co:fni:deny . +$ setfacl -a0 u:52:Co:dni:deny . +$ setfacl -a0 u:53:Co:fdni:deny . +$ umask 022 +$ rm xxx +$ touch xxx +$ getfacl -nq xxx +> user:53:-----------Co-:------:deny +> user:51:-----------Co-:------:deny +> user:50:-----------Co-:------:deny +> user:48:-----------Co-:------:deny +> user:47:-----------Co-:------:deny +> user:45:-----------Co-:------:deny +> user:44:-----------Co-:------:deny +> user:42:-----------Co-:------:deny +> owner@:--x-----------:------:deny +> owner@:rw-p---A-W-Co-:------:allow +> group@:-wxp----------:------:deny +> group@:r-------------:------:allow +> everyone@:-wxp---A-W-Co-:------:deny +> everyone@:r-----a-R-c--s:------:allow + +$ rmdir yyy +$ mkdir yyy +$ getfacl -nq yyy +> user:53:-----------Co-:------:deny +> user:52:-----------Co-:------:deny +> user:50:-----------Co-:------:deny +> user:49:-----------Co-:------:deny +> user:47:-----------Co-:fdi---:deny +> user:47:-----------Co-:------:deny +> user:46:-----------Co-:-di---:deny +> user:46:-----------Co-:------:deny +> user:45:-----------Co-:f-i---:deny +> user:44:-----------Co-:fdi---:deny +> user:44:-----------Co-:------:deny +> user:43:-----------Co-:-di---:deny +> user:43:-----------Co-:------:deny +> user:42:-----------Co-:f-i---:deny +> owner@:--------------:------:deny +> owner@:rwxp---A-W-Co-:------:allow +> group@:-w-p----------:------:deny +> group@:r-x-----------:------:allow +> everyone@:-w-p---A-W-Co-:------:deny +> everyone@:r-x---a-R-c--s:------:allow + +$ rmdir yyy +$ rm xxx +$ cd .. +$ rmdir ddd + +$ rm xxx + Modified: stable/8/tools/regression/acltools/tools-posix.test ============================================================================== --- stable/8/tools/regression/acltools/tools-posix.test Sun Jan 31 02:18:28 2010 (r203266) +++ stable/8/tools/regression/acltools/tools-posix.test Sun Jan 31 02:20:01 2010 (r203267) @@ -1,11 +1,36 @@ +# Copyright (c) 2008, 2009 Edward Tomasz NapieraÅ‚a +# 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$ +# *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Jan 31 02:22:31 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8122F1065670; Sun, 31 Jan 2010 02:22:31 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6F00A8FC18; Sun, 31 Jan 2010 02:22:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0V2MViu078553; Sun, 31 Jan 2010 02:22:31 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0V2MVhT078552; Sun, 31 Jan 2010 02:22:31 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201001310222.o0V2MVhT078552@svn.freebsd.org> From: Edward Tomasz Napierala Date: Sun, 31 Jan 2010 02:22: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: r203268 - stable/8/tools/regression/acltools X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 02:22:31 -0000 Author: trasz Date: Sun Jan 31 02:22:31 2010 New Revision: 203268 URL: http://svn.freebsd.org/changeset/base/203268 Log: MFC r197434: Add ACL fuzzer. It's not used by the regression tests right now, but I'd prefert to have it here, so it won't get lost. Added: stable/8/tools/regression/acltools/aclfuzzer.sh - copied unchanged from r197434, head/tools/regression/acltools/aclfuzzer.sh Modified: Directory Properties: stable/8/tools/regression/acltools/ (props changed) Copied: stable/8/tools/regression/acltools/aclfuzzer.sh (from r197434, head/tools/regression/acltools/aclfuzzer.sh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/acltools/aclfuzzer.sh Sun Jan 31 02:22:31 2010 (r203268, copy of r197434, head/tools/regression/acltools/aclfuzzer.sh) @@ -0,0 +1,225 @@ +#!/bin/sh +# +# Copyright (c) 2008, 2009 Edward Tomasz NapieraÅ‚a +# 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$ +# + +# This is an NFSv4 ACL fuzzer. It expects to be run by non-root in a scratch +# directory on a filesystem with NFSv4 ACLs support. Output it generates +# is expected to be fed to /usr/src/tools/regression/acltools/run script. + +NUMBER_OF_COMMANDS=300 + +run_command() +{ + echo "\$ $1" + eval $1 2>&1 | sed 's/^/> /' +} + +rnd_from_0_to() +{ + max=`expr $1 + 1` + rnd=`jot -r 1` + rnd=`expr $rnd % $max` + + echo $rnd +} + +rnd_path() +{ + rnd=`rnd_from_0_to 3` + case $rnd in + 0) echo "$TMP/aaa" ;; + 1) echo "$TMP/bbb" ;; + 2) echo "$TMP/aaa/ccc" ;; + 3) echo "$TMP/bbb/ddd" ;; + esac +} + +f_prepend_random_acl_on() +{ + rnd=`rnd_from_0_to 4` + case $rnd in + 0) u="owner@" ;; + 1) u="group@" ;; + 2) u="everyone@" ;; + 3) u="u:1138" ;; + 4) u="g:1138" ;; + esac + + p="" + while :; do + rnd=`rnd_from_0_to 30` + if [ -n "$p" -a $rnd -ge 14 ]; then + break; + fi + + case $rnd in + 0) p="${p}r" ;; + 1) p="${p}w" ;; + 2) p="${p}x" ;; + 3) p="${p}p" ;; + 4) p="${p}d" ;; + 5) p="${p}D" ;; + 6) p="${p}a" ;; + 7) p="${p}A" ;; + 8) p="${p}R" ;; + 9) p="${p}W" ;; + 10) p="${p}R" ;; + 11) p="${p}c" ;; + 12) p="${p}C" ;; + 13) p="${p}o" ;; + 14) p="${p}s" ;; + esac + done + + f="" + while :; do + rnd=`rnd_from_0_to 10` + if [ $rnd -ge 6 ]; then + break; + fi + + case $rnd in + 0) f="${f}f" ;; + 1) f="${f}d" ;; + 2) f="${f}n" ;; + 3) f="${f}i" ;; + esac + done + + rnd=`rnd_from_0_to 1` + case $rnd in + 0) x="allow" ;; + 1) x="deny" ;; + esac + + acl="$u:$p:$f:$x" + + file=`rnd_path` + run_command "setfacl -a0 $acl $file" +} + +f_getfacl() +{ + file=`rnd_path` + run_command "getfacl -qn $file" +} + +f_ls_mode() +{ + file=`rnd_path` + run_command "ls -al $file | sed -n '2p' | cut -d' ' -f1" +} + +f_chmod() +{ + b1=`rnd_from_0_to 7` + b2=`rnd_from_0_to 7` + b3=`rnd_from_0_to 7` + b4=`rnd_from_0_to 7` + file=`rnd_path` + + run_command "chmod $b1$b2$b3$b4 $file $2" +} + +f_touch() +{ + file=`rnd_path` + run_command "touch $file" +} + +f_rm() +{ + file=`rnd_path` + run_command "rm -f $file" +} + +f_mkdir() +{ + file=`rnd_path` + run_command "mkdir $file" +} + +f_rmdir() +{ + file=`rnd_path` + run_command "rmdir $file" +} + +f_mv() +{ + from=`rnd_path` + to=`rnd_path` + run_command "mv -f $from $to" +} + +# XXX: To be implemented: chown(8), setting times with touch(1). + +switch_to_random_user() +{ + # XXX: To be implemented. +} + +execute_random_command() +{ + rnd=`rnd_from_0_to 20` + + case $rnd in + 0|10|11|12|13|15) cmd=f_prepend_random_acl_on ;; + 1) cmd=f_getfacl ;; + 2) cmd=f_ls_mode ;; + 3) cmd=f_chmod ;; + 4|18|19) cmd=f_touch ;; + 5) cmd=f_rm ;; + 6|16|17) cmd=f_mkdir ;; + 7) cmd=f_rmdir ;; + 8) cmd=f_mv ;; + esac + + $cmd "XXX" +} + +echo "# Fuzzing; will stop after $NUMBER_OF_COMMANDS commands." +TMP="aclfuzzer_`dd if=/dev/random bs=1k count=1 2>/dev/null | openssl md5`" + +run_command "whoami" +umask 022 +run_command "umask 022" +run_command "mkdir $TMP" + +i=0; +while [ "$i" -lt "$NUMBER_OF_COMMANDS" ]; do + switch_to_random_user + execute_random_command + i=`expr $i + 1` +done + +run_command "find $TMP -exec setfacl -a0 everyone@:rxd:allow {} \;" +run_command "rm -rfv $TMP" + +echo "# Fuzzed, thank you." + From owner-svn-src-all@FreeBSD.ORG Sun Jan 31 02:23:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 16C87106566B; Sun, 31 Jan 2010 02:23:54 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 03BF68FC18; Sun, 31 Jan 2010 02:23:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0V2Nr6R078907; Sun, 31 Jan 2010 02:23:53 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0V2Nrgt078903; Sun, 31 Jan 2010 02:23:53 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201001310223.o0V2Nrgt078903@svn.freebsd.org> From: Edward Tomasz Napierala Date: Sun, 31 Jan 2010 02:23: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: r203269 - stable/8/tools/regression/acltools X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 02:23:54 -0000 Author: trasz Date: Sun Jan 31 02:23:53 2010 New Revision: 203269 URL: http://svn.freebsd.org/changeset/base/203269 Log: MFC r197436: Add cross-filesystem regression tests for ACLs. Added: stable/8/tools/regression/acltools/03.t - copied unchanged from r197436, head/tools/regression/acltools/03.t stable/8/tools/regression/acltools/tools-crossfs.test - copied unchanged from r197436, head/tools/regression/acltools/tools-crossfs.test Modified: stable/8/tools/regression/acltools/00.t Directory Properties: stable/8/tools/regression/acltools/ (props changed) Modified: stable/8/tools/regression/acltools/00.t ============================================================================== --- stable/8/tools/regression/acltools/00.t Sun Jan 31 02:22:31 2010 (r203268) +++ stable/8/tools/regression/acltools/00.t Sun Jan 31 02:23:53 2010 (r203269) @@ -27,7 +27,7 @@ # $FreeBSD$ # -# This is a wrapper script to run tools-posix.test. +# This is a wrapper script to run tools-posix.test on UFS filesystem. # # If any of the tests fails, here is how to debug it: go to # the directory with problematic filesystem mounted on it, Copied: stable/8/tools/regression/acltools/03.t (from r197436, head/tools/regression/acltools/03.t) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/acltools/03.t Sun Jan 31 02:23:53 2010 (r203269, copy of r197436, head/tools/regression/acltools/03.t) @@ -0,0 +1,110 @@ +#!/bin/sh +# +# Copyright (c) 2008, 2009 Edward Tomasz NapieraÅ‚a +# 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$ +# + +# This is a wrapper script to run tools-crossfs.test between UFS without +# ACLs, UFS with POSIX.1e ACLs, and ZFS with NFSv4 ACLs. +# +# WARNING: It uses hardcoded ZFS pool name "acltools" +# +# Output should be obvious. + +echo "1..5" + +if [ `whoami` != "root" ]; then + echo "not ok 1 - you need to be root to run this test." + exit 1 +fi + +TESTDIR=`dirname $0` +MNTROOT=`mktemp -dt acltools` + +# Set up the test filesystems. +MD1=`mdconfig -at swap -s 64m` +MNT1=$MNTROOT/nfs4 +mkdir $MNT1 +zpool create -R $MNT1 acltools /dev/$MD1 +if [ $? -ne 0 ]; then + echo "not ok 1 - 'zpool create' failed." + exit 1 +fi + +echo "ok 1" + +MD2=`mdconfig -at swap -s 10m` +MNT2=$MNTROOT/posix +mkdir $MNT2 +newfs /dev/$MD2 > /dev/null +mount -o acls /dev/$MD2 $MNT2 +if [ $? -ne 0 ]; then + echo "not ok 2 - mount failed." + exit 1 +fi + +echo "ok 2" + +MD3=`mdconfig -at swap -s 10m` +MNT3=$MNTROOT/none +mkdir $MNT3 +newfs /dev/$MD3 > /dev/null +mount /dev/$MD3 $MNT3 +if [ $? -ne 0 ]; then + echo "not ok 3 - mount failed." + exit 1 +fi + +echo "ok 3" + +cd $MNTROOT + +perl $TESTDIR/run $TESTDIR/tools-crossfs.test > /dev/null + +if [ $? -eq 0 ]; then + echo "ok 4" +else + echo "not ok 4" +fi + +cd / + +umount -f $MNT3 +rmdir $MNT3 +mdconfig -du $MD3 + +umount -f $MNT2 +rmdir $MNT2 +mdconfig -du $MD2 + +zpool destroy -f acltools +rmdir $MNT1 +mdconfig -du $MD1 + +rmdir $MNTROOT + +echo "ok 5" + Copied: stable/8/tools/regression/acltools/tools-crossfs.test (from r197436, head/tools/regression/acltools/tools-crossfs.test) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/acltools/tools-crossfs.test Sun Jan 31 02:23:53 2010 (r203269, copy of r197436, head/tools/regression/acltools/tools-crossfs.test) @@ -0,0 +1,178 @@ +# Copyright (c) 2008, 2009 Edward Tomasz NapieraÅ‚a +# 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$ +# + +# This is a tools-level test intended to verify that cp(1) and mv(1) +# do the right thing with respect to ACLs. Run it as root using +# ACL-enabled kernel: +# +# /usr/src/tools/regression/acltools/run /usr/src/tools/regression/acltools/tools-nfs4.test +# +# You need to have three subdirectories, named nfs4, posix and none, +# with filesystems with NFSv4 ACLs, POSIX.1e ACLs and no ACLs enabled, +# respectively, mounted on them, in your current directory. +# +# WARNING: Creates files in unsafe way. + +$ whoami +> root +$ umask 022 + +$ touch nfs4/xxx +$ getfacl -nq nfs4/xxx +> owner@:--x-----------:------:deny +> owner@:rw-p---A-W-Co-:------:allow +> group@:-wxp----------:------:deny +> group@:r-------------:------:allow +> everyone@:-wxp---A-W-Co-:------:deny +> everyone@:r-----a-R-c--s:------:allow + +$ touch posix/xxx +$ getfacl -nq posix/xxx +> user::rw- +> group::r-- +> other::r-- + +$ rm posix/xxx + +# mv without any ACLs. +$ chmod 456 nfs4/xxx +$ mv nfs4/xxx posix/ +$ ls -l posix/xxx | cut -d' ' -f1 +> -r--r-xrw- + +# mv with POSIX.1e ACLs. +$ setfacl -m u:42:x,g:43:w posix/xxx +$ rm -f posix/yyy +$ mv posix/xxx posix/yyy +$ getfacl -nq posix/yyy +> user::r-- +> user:42:--x +> group::r-x +> group:43:-w- +> mask::rwx +> other::rw- + +# mv from POSIX.1e to NFSv4. +$ rm -f nfs4/xxx +$ mv posix/yyy nfs4/xxx +> mv: failed to set acl entries for nfs4/xxx: Invalid argument +$ getfacl -nq nfs4/xxx +> owner@:-wxp----------:------:deny +> owner@:r------A-W-Co-:------:allow +> group@:--------------:------:deny +> group@:rwxp----------:------:allow +> everyone@:--x----A-W-Co-:------:deny +> everyone@:rw-p--a-R-c--s:------:allow + +# mv with NFSv4 ACLs. +$ setfacl -a0 u:42:x:allow,g:43:w:allow nfs4/xxx +$ rm -f nfs4/yyy +$ mv nfs4/xxx nfs4/yyy +$ getfacl -nq nfs4/yyy +> user:42:--x-----------:------:allow +> group:43:-w------------:------:allow +> owner@:-wxp----------:------:deny +> owner@:r------A-W-Co-:------:allow +> group@:--------------:------:deny +> group@:rwxp----------:------:allow +> everyone@:--x----A-W-Co-:------:deny +> everyone@:rw-p--a-R-c--s:------:allow + +# mv from NFSv4 to POSIX.1e. +$ rm -f posix/xxx +$ mv nfs4/yyy posix/xxx +> mv: failed to set acl entries for posix/xxx: Invalid argument +$ ls -l posix/xxx | cut -d' ' -f1 +> -r--rwxrw- + +# mv from POSIX.1e to none. +$ setfacl -m u:42:x,g:43:w posix/xxx +$ mv posix/xxx none/xxx +> mv: failed to set acl entries for none/xxx: Operation not supported +$ ls -l none/xxx | cut -d' ' -f1 +> -r--rwxrw- + +# cp with POSIX.1e ACLs. +$ rm -f posix/xxx +$ touch posix/xxx +$ setfacl -m u:42:x,g:43:w posix/xxx +$ getfacl -nq posix/xxx +> user::rw- +> user:42:--x +> group::r-- +> group:43:-w- +> mask::rwx +> other::r-- + +$ rm -f posix/yyy +$ cp posix/xxx posix/yyy +$ getfacl -nq posix/yyy +> user::rw- +> group::r-x +> other::r-- + +$ rm -f posix/yyy +$ cp -p posix/xxx posix/yyy +$ getfacl -nq posix/yyy +> user::rw- +> user:42:--x +> group::r-- +> group:43:-w- +> mask::rwx +> other::r-- + +# mv from POSIX.1e to NFSv4. +$ rm -f nfs4/xxx +$ cp -p posix/xxx nfs4/xxx +> cp: failed to set acl entries for nfs4/xxx: Invalid argument +$ ls -l nfs4/xxx | cut -d' ' -f1 +> -rw-rwxr-- + +# cp with NFSv4 ACLs. +$ setfacl -a0 u:42:x:allow,g:43:w:allow nfs4/xxx +$ rm -f nfs4/yyy +$ cp -p nfs4/xxx nfs4/yyy +$ getfacl -nq nfs4/yyy +> user:42:--x-----------:------:allow +> group:43:-w------------:------:allow +> owner@:--x-----------:------:deny +> owner@:rw-p---A-W-Co-:------:allow +> group@:--------------:------:deny +> group@:rwxp----------:------:allow +> everyone@:-wxp---A-W-Co-:------:deny +> everyone@:r-----a-R-c--s:------:allow + +# cp from NFSv4 to POSIX.1e. +$ rm -f posix/xxx +$ cp -p nfs4/xxx posix/xxx +> cp: failed to set acl entries for posix/xxx: Invalid argument +$ ls -l posix/xxx | cut -d' ' -f1 +> -rw-rwxr-- + +$ cp -p nfs4/yyy none/xxx +> cp: failed to set acl entries for none/xxx: Operation not supported + From owner-svn-src-all@FreeBSD.ORG Sun Jan 31 02:25:16 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 441E31065670; Sun, 31 Jan 2010 02:25:16 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 321E38FC18; Sun, 31 Jan 2010 02:25:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0V2PGoF079262; Sun, 31 Jan 2010 02:25:16 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0V2PG6f079260; Sun, 31 Jan 2010 02:25:16 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201001310225.o0V2PG6f079260@svn.freebsd.org> From: Edward Tomasz Napierala Date: Sun, 31 Jan 2010 02:25: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: r203270 - stable/8/tools/regression/acltools X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 02:25:16 -0000 Author: trasz Date: Sun Jan 31 02:25:15 2010 New Revision: 203270 URL: http://svn.freebsd.org/changeset/base/203270 Log: MFC r201048: Make tests for ACL preservation by mv(1) and cp(1) more complete and easier to follow. Modified: stable/8/tools/regression/acltools/tools-crossfs.test Directory Properties: stable/8/tools/regression/acltools/ (props changed) Modified: stable/8/tools/regression/acltools/tools-crossfs.test ============================================================================== --- stable/8/tools/regression/acltools/tools-crossfs.test Sun Jan 31 02:23:53 2010 (r203269) +++ stable/8/tools/regression/acltools/tools-crossfs.test Sun Jan 31 02:25:15 2010 (r203270) @@ -56,17 +56,14 @@ $ getfacl -nq posix/xxx > group::r-- > other::r-- -$ rm posix/xxx - -# mv without any ACLs. -$ chmod 456 nfs4/xxx -$ mv nfs4/xxx posix/ +# mv with POSIX.1e ACLs. +$ rm -f posix/xxx +$ rm -f posix/yyy +$ touch posix/xxx +$ chmod 456 posix/xxx $ ls -l posix/xxx | cut -d' ' -f1 > -r--r-xrw- - -# mv with POSIX.1e ACLs. $ setfacl -m u:42:x,g:43:w posix/xxx -$ rm -f posix/yyy $ mv posix/xxx posix/yyy $ getfacl -nq posix/yyy > user::r-- @@ -75,9 +72,30 @@ $ getfacl -nq posix/yyy > group:43:-w- > mask::rwx > other::rw- +$ ls -l posix/yyy | cut -d' ' -f1 +> -r--rwxrw-+ + +# mv from POSIX.1e to none. +$ rm -f posix/xxx +$ rm -f none/xxx +$ touch posix/xxx +$ chmod 345 posix/xxx +$ setfacl -m u:42:x,g:43:w posix/xxx +$ ls -l posix/xxx | cut -d' ' -f1 +> --wxrwxr-x+ +$ mv posix/xxx none/xxx +> mv: failed to set acl entries for none/xxx: Operation not supported +$ ls -l none/xxx | cut -d' ' -f1 +> --wxrwxr-x # mv from POSIX.1e to NFSv4. +$ rm -f posix/xxx $ rm -f nfs4/xxx +$ touch posix/xxx +$ chmod 456 posix/xxx +$ setfacl -m u:42:x,g:43:w posix/xxx +$ ls -l posix/xxx | cut -d' ' -f1 +> -r--rwxrw-+ $ mv posix/yyy nfs4/xxx > mv: failed to set acl entries for nfs4/xxx: Invalid argument $ getfacl -nq nfs4/xxx @@ -87,37 +105,82 @@ $ getfacl -nq nfs4/xxx > group@:rwxp----------:------:allow > everyone@:--x----A-W-Co-:------:deny > everyone@:rw-p--a-R-c--s:------:allow +$ ls -l nfs4/xxx | cut -d' ' -f1 +> -r--rwxrw- # mv with NFSv4 ACLs. -$ setfacl -a0 u:42:x:allow,g:43:w:allow nfs4/xxx +$ rm -f nfs4/xxx $ rm -f nfs4/yyy +$ touch nfs4/xxx +$ setfacl -a0 u:42:x:allow,g:43:w:allow nfs4/xxx $ mv nfs4/xxx nfs4/yyy $ getfacl -nq nfs4/yyy > user:42:--x-----------:------:allow > group:43:-w------------:------:allow -> owner@:-wxp----------:------:deny -> owner@:r------A-W-Co-:------:allow -> group@:--------------:------:deny -> group@:rwxp----------:------:allow -> everyone@:--x----A-W-Co-:------:deny -> everyone@:rw-p--a-R-c--s:------:allow +> owner@:--x-----------:------:deny +> owner@:rw-p---A-W-Co-:------:allow +> group@:-wxp----------:------:deny +> group@:r-------------:------:allow +> everyone@:-wxp---A-W-Co-:------:deny +> everyone@:r-----a-R-c--s:------:allow +$ ls -l nfs4/yyy | cut -d' ' -f1 +> -rw-r--r--+ -# mv from NFSv4 to POSIX.1e. +# mv from NFSv4 to POSIX.1e without any ACLs. +$ rm -f nfs4/xxx $ rm -f posix/xxx -$ mv nfs4/yyy posix/xxx -> mv: failed to set acl entries for posix/xxx: Invalid argument +$ touch nfs4/xxx +$ chmod 456 nfs4/xxx +$ ls -l nfs4/xxx | cut -d' ' -f1 +> -r--r-xrw- +$ mv nfs4/xxx posix/xxx $ ls -l posix/xxx | cut -d' ' -f1 -> -r--rwxrw- +> -r--r-xrw- -# mv from POSIX.1e to none. -$ setfacl -m u:42:x,g:43:w posix/xxx -$ mv posix/xxx none/xxx +# mv from NFSv4 to none. +$ rm -f nfs4/xxx +$ rm -f none/xxx +$ touch nfs4/xxx +$ chmod 345 nfs4/xxx +$ ls -l nfs4/xxx | cut -d' ' -f1 +> --wxr--r-x +$ setfacl -a0 u:42:x:allow,g:43:w:allow nfs4/xxx +$ ls -l nfs4/xxx | cut -d' ' -f1 +> --wxr--r-x+ +$ mv nfs4/xxx none/xxx > mv: failed to set acl entries for none/xxx: Operation not supported $ ls -l none/xxx | cut -d' ' -f1 -> -r--rwxrw- +> --wxr--r-x + +# mv from NFSv4 to POSIX.1e. +$ rm -f nfs4/xxx +$ rm -f posix/xxx +$ touch nfs4/xxx +$ chmod 345 nfs4/xxx +$ ls -l nfs4/xxx | cut -d' ' -f1 +> --wxr--r-x +$ setfacl -a0 u:42:x:allow,g:43:w:allow nfs4/xxx +$ ls -l nfs4/xxx | cut -d' ' -f1 +> --wxr--r-x+ +$ mv nfs4/xxx posix/xxx +> mv: failed to set acl entries for posix/xxx: Invalid argument +$ ls -l posix/xxx | cut -d' ' -f1 +> --wxr--r-x # cp with POSIX.1e ACLs. $ rm -f posix/xxx +$ rm -f posix/yyy +$ touch posix/xxx +$ setfacl -m u:42:x,g:43:w posix/xxx +$ ls -l posix/xxx | cut -d' ' -f1 +> -rw-rwxr--+ +$ cp posix/xxx posix/yyy +$ ls -l posix/yyy | cut -d' ' -f1 +> -rw-r-xr-- + +# cp -p with POSIX.1e ACLs. +$ rm -f posix/xxx +$ rm -f posix/yyy $ touch posix/xxx $ setfacl -m u:42:x,g:43:w posix/xxx $ getfacl -nq posix/xxx @@ -127,15 +190,8 @@ $ getfacl -nq posix/xxx > group:43:-w- > mask::rwx > other::r-- - -$ rm -f posix/yyy -$ cp posix/xxx posix/yyy -$ getfacl -nq posix/yyy -> user::rw- -> group::r-x -> other::r-- - -$ rm -f posix/yyy +$ ls -l posix/xxx | cut -d' ' -f1 +> -rw-rwxr--+ $ cp -p posix/xxx posix/yyy $ getfacl -nq posix/yyy > user::rw- @@ -144,35 +200,132 @@ $ getfacl -nq posix/yyy > group:43:-w- > mask::rwx > other::r-- +$ ls -l posix/yyy | cut -d' ' -f1 +> -rw-rwxr--+ -# mv from POSIX.1e to NFSv4. +# cp from POSIX.1e to none. +$ rm -f posix/xxx +$ rm -f none/xxx +$ touch posix/xxx +$ setfacl -m u:42:x,g:43:w posix/xxx +$ ls -l posix/xxx | cut -d' ' -f1 +> -rw-rwxr--+ +$ cp posix/xxx none/xxx +$ ls -l none/xxx | cut -d' ' -f1 +> -rw-r-xr-- + +# cp -p from POSIX.1e to none. +$ rm -f posix/xxx +$ rm -f none/xxx +$ touch posix/xxx +$ setfacl -m u:42:x,g:43:w posix/xxx +$ ls -l posix/xxx | cut -d' ' -f1 +> -rw-rwxr--+ +$ cp -p posix/xxx none/xxx +> cp: failed to set acl entries for none/xxx: Operation not supported +$ ls -l none/xxx | cut -d' ' -f1 +> -rw-rwxr-- + +# cp from POSIX.1e to NFSv4. +$ rm -f posix/xxx +$ rm -f nfs4/xxx +$ touch posix/xxx +$ setfacl -m u:42:x,g:43:w posix/xxx +$ ls -l posix/xxx | cut -d' ' -f1 +> -rw-rwxr--+ +$ cp posix/xxx nfs4/xxx +$ ls -l nfs4/xxx | cut -d' ' -f1 +> -rw-r-xr-- + +# cp -p from POSIX.1e to NFSv4. +$ rm -f posix/xxx $ rm -f nfs4/xxx +$ touch posix/xxx +$ setfacl -m u:42:x,g:43:w posix/xxx +$ ls -l posix/xxx | cut -d' ' -f1 +> -rw-rwxr--+ $ cp -p posix/xxx nfs4/xxx > cp: failed to set acl entries for nfs4/xxx: Invalid argument $ ls -l nfs4/xxx | cut -d' ' -f1 > -rw-rwxr-- # cp with NFSv4 ACLs. +$ rm -f nfs4/xxx +$ rm -f nfs4/yyy +$ touch nfs4/xxx +$ chmod 543 nfs4/xxx $ setfacl -a0 u:42:x:allow,g:43:w:allow nfs4/xxx +$ ls -l nfs4/xxx | cut -d' ' -f1 +> -r-xr---wx+ +$ cp nfs4/xxx nfs4/yyy +$ ls -l nfs4/yyy | cut -d' ' -f1 +> -r-xr----x + +# cp -p with NFSv4 ACLs. +$ rm -f nfs4/xxx $ rm -f nfs4/yyy +$ touch nfs4/xxx +$ chmod 543 nfs4/xxx +$ setfacl -a0 u:42:x:allow,g:43:w:allow nfs4/xxx $ cp -p nfs4/xxx nfs4/yyy $ getfacl -nq nfs4/yyy > user:42:--x-----------:------:allow > group:43:-w------------:------:allow -> owner@:--x-----------:------:deny -> owner@:rw-p---A-W-Co-:------:allow -> group@:--------------:------:deny -> group@:rwxp----------:------:allow -> everyone@:-wxp---A-W-Co-:------:deny -> everyone@:r-----a-R-c--s:------:allow +> owner@:-w-p----------:------:deny +> owner@:r-x----A-W-Co-:------:allow +> group@:-wxp----------:------:deny +> group@:r-------------:------:allow +> everyone@:r------A-W-Co-:------:deny +> everyone@:-wxp--a-R-c--s:------:allow +$ ls -l nfs4/yyy | cut -d' ' -f1 +> -r-xr---wx+ + +# cp from NFSv4 to none. +$ rm -f nfs4/xxx +$ rm -f none/xxx +$ touch nfs4/xxx +$ chmod 543 nfs4/xxx +$ setfacl -a0 u:42:x:allow,g:43:w:allow nfs4/xxx +$ ls -l nfs4/xxx | cut -d' ' -f1 +> -r-xr---wx+ +$ cp nfs4/xxx none/xxx +$ ls -l none/xxx | cut -d' ' -f1 +> -r-xr----x + +# cp -p from NFSv4 to none. +$ rm -f nfs4/xxx +$ rm -f none/xxx +$ touch nfs4/xxx +$ chmod 543 nfs4/xxx +$ setfacl -a0 u:42:x:allow,g:43:w:allow nfs4/xxx +$ ls -l nfs4/xxx | cut -d' ' -f1 +> -r-xr---wx+ +$ cp -p nfs4/xxx none/xxx +> cp: failed to set acl entries for none/xxx: Operation not supported +$ ls -l none/xxx | cut -d' ' -f1 +> -r-xr---wx # cp from NFSv4 to POSIX.1e. +$ rm -f nfs4/xxx $ rm -f posix/xxx +$ touch nfs4/xxx +$ chmod 543 nfs4/xxx +$ setfacl -a0 u:42:x:allow,g:43:w:allow nfs4/xxx +$ ls -l nfs4/xxx | cut -d' ' -f1 +> -r-xr---wx+ +$ cp nfs4/xxx posix/xxx +$ ls -l posix/xxx | cut -d' ' -f1 +> -r-xr----x + +# cp -p from NFSv4 to POSIX.1e. +$ rm -f nfs4/xxx +$ rm -f posix/xxx +$ touch nfs4/xxx +$ chmod 543 nfs4/xxx +$ setfacl -a0 u:42:x:allow,g:43:w:allow nfs4/xxx +$ ls -l nfs4/xxx | cut -d' ' -f1 +> -r-xr---wx+ $ cp -p nfs4/xxx posix/xxx > cp: failed to set acl entries for posix/xxx: Invalid argument $ ls -l posix/xxx | cut -d' ' -f1 -> -rw-rwxr-- - -$ cp -p nfs4/yyy none/xxx -> cp: failed to set acl entries for none/xxx: Operation not supported - +> -r-xr---wx From owner-svn-src-all@FreeBSD.ORG Sun Jan 31 08:16:38 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 48BA4106566B; Sun, 31 Jan 2010 08:16:38 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 37F848FC17; Sun, 31 Jan 2010 08:16:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0V8Gc8o056333; Sun, 31 Jan 2010 08:16:38 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0V8GcLM056331; Sun, 31 Jan 2010 08:16:38 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201001310816.o0V8GcLM056331@svn.freebsd.org> From: Hiroki Sato Date: Sun, 31 Jan 2010 08:16:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203272 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 08:16:38 -0000 Author: hrs Date: Sun Jan 31 08:16:37 2010 New Revision: 203272 URL: http://svn.freebsd.org/changeset/base/203272 Log: - Check if_type of "addm " before setting the interface's MTU to the if_bridge(4) interface. This fixes a bug that MTU value of "addm " is used even when it is invalid for the if_bridge(4) member: # ifconfig bridge0 create # ifconfig bridge0 bridge0: flags=8802 metric 0 mtu 1500 ... # ifconfig bridge0 addm lo0 ifconfig: BRDGADD lo0: Invalid argument # ifconfig bridge0 bridge0: flags=8802 metric 0 mtu 16384 ... - Do not ignore MTU value of an interface even when if_type == IFT_GIF. This fixes MTU mismatch when an if_bridge(4) interface has a gif(4) interface and no other interface as the member, and it is directly used for L2 communication with EtherIP tunneling enabled. - Implement SIOCSIFMTU ioctl. Changing the MTU is allowed only when all members have the same MTU value. Modified: head/sys/net/if_bridge.c Modified: head/sys/net/if_bridge.c ============================================================================== --- head/sys/net/if_bridge.c Sun Jan 31 03:06:12 2010 (r203271) +++ head/sys/net/if_bridge.c Sun Jan 31 08:16:37 2010 (r203272) @@ -683,6 +683,8 @@ static int bridge_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { struct bridge_softc *sc = ifp->if_softc; + struct ifreq *ifr = (struct ifreq *)data; + struct bridge_iflist *bif; struct thread *td = curthread; union { struct ifbreq ifbreq; @@ -772,10 +774,29 @@ bridge_ioctl(struct ifnet *ifp, u_long c break; case SIOCSIFMTU: - /* Do not allow the MTU to be changed on the bridge */ - error = EINVAL; + if (ifr->ifr_mtu < 576) { + error = EINVAL; + break; + } + if (LIST_EMPTY(&sc->sc_iflist)) { + sc->sc_ifp->if_mtu = ifr->ifr_mtu; + break; + } + BRIDGE_LOCK(sc); + LIST_FOREACH(bif, &sc->sc_iflist, bif_next) { + if (bif->bif_ifp->if_mtu != ifr->ifr_mtu) { + log(LOG_NOTICE, "%s: invalid MTU: %lu(%s)" + " != %d\n", sc->sc_ifp->if_xname, + bif->bif_ifp->if_mtu, + bif->bif_ifp->if_xname, ifr->ifr_mtu); + error = EINVAL; + break; + } + } + if (!error) + sc->sc_ifp->if_mtu = ifr->ifr_mtu; + BRIDGE_UNLOCK(sc); break; - default: /* * drop the lock as ether_ioctl() will call bridge_start() and @@ -989,17 +1010,6 @@ bridge_ioctl_add(struct bridge_softc *sc if (ifs == bif->bif_ifp) return (EBUSY); - /* Allow the first Ethernet member to define the MTU */ - if (ifs->if_type != IFT_GIF) { - if (LIST_EMPTY(&sc->sc_iflist)) - sc->sc_ifp->if_mtu = ifs->if_mtu; - else if (sc->sc_ifp->if_mtu != ifs->if_mtu) { - if_printf(sc->sc_ifp, "invalid MTU for %s\n", - ifs->if_xname); - return (EINVAL); - } - } - if (ifs->if_bridge == sc) return (EEXIST); @@ -1025,6 +1035,16 @@ bridge_ioctl_add(struct bridge_softc *sc goto out; } + /* Allow the first Ethernet member to define the MTU */ + if (LIST_EMPTY(&sc->sc_iflist)) + sc->sc_ifp->if_mtu = ifs->if_mtu; + else if (sc->sc_ifp->if_mtu != ifs->if_mtu) { + if_printf(sc->sc_ifp, "invalid MTU: %lu(%s) != %lu\n", + ifs->if_mtu, ifs->if_xname, sc->sc_ifp->if_mtu); + error = EINVAL; + goto out; + } + /* * Assign the interface's MAC address to the bridge if it's the first * member and the MAC address of the bridge has not been changed from From owner-svn-src-all@FreeBSD.ORG Sun Jan 31 11:30:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 147291065670; Sun, 31 Jan 2010 11:30:29 +0000 (UTC) (envelope-from syrinx@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 027788FC18; Sun, 31 Jan 2010 11:30:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0VBUSlv010465; Sun, 31 Jan 2010 11:30:28 GMT (envelope-from syrinx@svn.freebsd.org) Received: (from syrinx@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0VBUSLj010461; Sun, 31 Jan 2010 11:30:28 GMT (envelope-from syrinx@svn.freebsd.org) Message-Id: <201001311130.o0VBUSLj010461@svn.freebsd.org> From: Shteryana Shopova Date: Sun, 31 Jan 2010 11:30: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: r203274 - in stable/8/sys: net net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 11:30:29 -0000 Author: syrinx Date: Sun Jan 31 11:30:28 2010 New Revision: 203274 URL: http://svn.freebsd.org/changeset/base/203274 Log: MFC r202935: While flushing the multicast filter of an interface, do not zero the relevant ifmultiaddr structures' reference to the parent interface, unless the parent interface is really detaching. While here, program only link layer multicast filters to a wlan's hardware parent interface. PR: kern/142391, kern/142392 Reviewed by: sam, rpaulo, bms Modified: stable/8/sys/net/if.c stable/8/sys/net/if_var.h stable/8/sys/net80211/ieee80211_ioctl.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/net/if.c ============================================================================== --- stable/8/sys/net/if.c Sun Jan 31 11:20:27 2010 (r203273) +++ stable/8/sys/net/if.c Sun Jan 31 11:30:28 2010 (r203274) @@ -773,9 +773,10 @@ if_purgeaddrs(struct ifnet *ifp) } /* - * Remove any multicast network addresses from an interface. + * Remove any multicast network addresses from an interface when an ifnet + * is going away. */ -void +static void if_purgemaddrs(struct ifnet *ifp) { struct ifmultiaddr *ifma; @@ -3005,6 +3006,22 @@ if_delmulti(struct ifnet *ifp, struct so } /* + * Delete all multicast group membership for an interface. + * Should be used to quickly flush all multicast filters. + */ +void +if_delallmulti(struct ifnet *ifp) +{ + struct ifmultiaddr *ifma; + struct ifmultiaddr *next; + + IF_ADDR_LOCK(ifp); + TAILQ_FOREACH_SAFE(ifma, &ifp->if_multiaddrs, ifma_link, next) + if_delmulti_locked(ifp, ifma, 0); + IF_ADDR_UNLOCK(ifp); +} + +/* * Delete a multicast group membership by group membership pointer. * Network-layer protocol domains must use this routine. * Modified: stable/8/sys/net/if_var.h ============================================================================== --- stable/8/sys/net/if_var.h Sun Jan 31 11:20:27 2010 (r203273) +++ stable/8/sys/net/if_var.h Sun Jan 31 11:30:28 2010 (r203274) @@ -832,7 +832,7 @@ void if_delmulti_ifma(struct ifmultiaddr void if_detach(struct ifnet *); void if_vmove(struct ifnet *, struct vnet *); void if_purgeaddrs(struct ifnet *); -void if_purgemaddrs(struct ifnet *); +void if_delallmulti(struct ifnet *); void if_down(struct ifnet *); struct ifmultiaddr * if_findmulti(struct ifnet *, struct sockaddr *); Modified: stable/8/sys/net80211/ieee80211_ioctl.c ============================================================================== --- stable/8/sys/net80211/ieee80211_ioctl.c Sun Jan 31 11:20:27 2010 (r203273) +++ stable/8/sys/net80211/ieee80211_ioctl.c Sun Jan 31 11:30:28 2010 (r203274) @@ -3199,15 +3199,18 @@ ieee80211_ioctl_updatemulti(struct ieee8 void *ioctl; IEEE80211_LOCK(ic); - if_purgemaddrs(parent); + if_delallmulti(parent); ioctl = parent->if_ioctl; /* XXX WAR if_allmulti */ parent->if_ioctl = NULL; TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next) { struct ifnet *ifp = vap->iv_ifp; struct ifmultiaddr *ifma; - TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) + TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { + if (ifma->ifma_addr->sa_family != AF_LINK) + continue; (void) if_addmulti(parent, ifma->ifma_addr, NULL); + } } parent->if_ioctl = ioctl; ieee80211_runtask(ic, &ic->ic_mcast_task); From owner-svn-src-all@FreeBSD.ORG Sun Jan 31 11:48:26 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 144421065672; Sun, 31 Jan 2010 11:48:26 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 02DDA8FC28; Sun, 31 Jan 2010 11:48:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0VBmPQL014563; Sun, 31 Jan 2010 11:48:25 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0VBmPeE014560; Sun, 31 Jan 2010 11:48:25 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001311148.o0VBmPeE014560@svn.freebsd.org> From: Ed Schouten Date: Sun, 31 Jan 2010 11:48:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203277 - head/sbin/mknod X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 11:48:26 -0000 Author: ed Date: Sun Jan 31 11:48:25 2010 New Revision: 203277 URL: http://svn.freebsd.org/changeset/base/203277 Log: Allow mknod(8) to be only invoked with a pathname as an argument. In 99% of the cases people just want to recreate device nodes they removed from /dev. There is no reason to pass the additional "c 0 0" anymore. Also slightly improve the manpage. Remove references to non-existent device names and platforms. Modified: head/sbin/mknod/mknod.8 head/sbin/mknod/mknod.c Modified: head/sbin/mknod/mknod.8 ============================================================================== --- head/sbin/mknod/mknod.8 Sun Jan 31 11:36:04 2010 (r203276) +++ head/sbin/mknod/mknod.8 Sun Jan 31 11:48:25 2010 (r203277) @@ -28,7 +28,7 @@ .\" @(#)mknod.8 8.2 (Berkeley) 12/11/93 .\" $FreeBSD$ .\" -.Dd October 31, 2009 +.Dd January 31, 2010 .Dt MKNOD 8 .Os .Sh NAME @@ -37,6 +37,8 @@ .Sh SYNOPSIS .Nm .Ar name +.Nm +.Ar name .Op Cm b | c .Ar major minor .Op Ar owner : Ns Ar group @@ -52,14 +54,14 @@ systems. The .Nm utility creates device special files. -To make nodes manually, the four required arguments are: +To make nodes manually, the arguments are: .Pp .Bl -tag -width indent .It Ar name Device name, for example -.Dq sd -for a SCSI disk on an HP300 or a -.Dq pty +.Pa /dev/da0 +for a SCSI disk or +.Pa /dev/pts/0 for pseudo-terminals. .It Cm b | c Type of device. @@ -110,13 +112,13 @@ The .Nm utility can be used to recreate deleted device nodes under a .Xr devfs 5 -mount point by invoking it using dummy arguments. +mount point by invoking it with only a filename as an argument. Example: .Pp -.Dl "mknod cd0 c 0 0" +.Dl "mknod /dev/cd0" .Pp where -.Dq Li cd0 +.Pa /dev/cd0 is the name of the deleted device node. .Sh COMPATIBILITY The Modified: head/sbin/mknod/mknod.c ============================================================================== --- head/sbin/mknod/mknod.c Sun Jan 31 11:36:04 2010 (r203276) +++ head/sbin/mknod/mknod.c Sun Jan 31 11:48:25 2010 (r203277) @@ -61,7 +61,8 @@ usage(void) { (void)fprintf(stderr, - "usage: mknod name [b | c] major minor [owner:group]\n"); + "usage: mknod name\n" + " mknod name [b | c] major minor [owner:group]\n"); exit(1); } @@ -115,31 +116,36 @@ main(int argc, char **argv) char *cp, *endp; long mymajor, myminor; - if (argc != 5 && argc != 6) + if (argc != 2 && argc != 5 && argc != 6) usage(); - mode = 0666; - if (argv[2][0] == 'c') - mode |= S_IFCHR; - else if (argv[2][0] == 'b') - mode |= S_IFBLK; - else - errx(1, "node must be type 'b' or 'c'"); - - errno = 0; - mymajor = (long)strtoul(argv[3], &endp, 0); - if (endp == argv[3] || *endp != '\0') - errx(1, "%s: non-numeric major number", argv[3]); - range_error = errno; - errno = 0; - myminor = (long)strtoul(argv[4], &endp, 0); - if (endp == argv[4] || *endp != '\0') - errx(1, "%s: non-numeric minor number", argv[4]); - range_error |= errno; - dev = makedev(mymajor, myminor); - if (range_error || major(dev) != (u_int) mymajor || - (long)(u_int)minor(dev) != myminor) - errx(1, "major or minor number too large"); + if (argc >= 5) { + mode = 0666; + if (argv[2][0] == 'c') + mode |= S_IFCHR; + else if (argv[2][0] == 'b') + mode |= S_IFBLK; + else + errx(1, "node must be type 'b' or 'c'"); + + errno = 0; + mymajor = (long)strtoul(argv[3], &endp, 0); + if (endp == argv[3] || *endp != '\0') + errx(1, "%s: non-numeric major number", argv[3]); + range_error = errno; + errno = 0; + myminor = (long)strtoul(argv[4], &endp, 0); + if (endp == argv[4] || *endp != '\0') + errx(1, "%s: non-numeric minor number", argv[4]); + range_error |= errno; + dev = makedev(mymajor, myminor); + if (range_error || major(dev) != (u_int) mymajor || + (long)(u_int)minor(dev) != myminor) + errx(1, "major or minor number too large"); + } else { + mode = 0666 | S_IFCHR; + dev = 0; + } uid = gid = -1; if (6 == argc) { From owner-svn-src-all@FreeBSD.ORG Sun Jan 31 13:39:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F1899106566B; Sun, 31 Jan 2010 13:39:08 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E01408FC1D; Sun, 31 Jan 2010 13:39:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0VDd82g039157; Sun, 31 Jan 2010 13:39:08 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0VDd8kB039155; Sun, 31 Jan 2010 13:39:08 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201001311339.o0VDd8kB039155@svn.freebsd.org> From: Rui Paulo Date: Sun, 31 Jan 2010 13:39:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203285 - head/sys/modules/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 13:39:09 -0000 Author: rpaulo Date: Sun Jan 31 13:39:08 2010 New Revision: 203285 URL: http://svn.freebsd.org/changeset/base/203285 Log: Build 928x files too. Modified: head/sys/modules/ath/Makefile Modified: head/sys/modules/ath/Makefile ============================================================================== --- head/sys/modules/ath/Makefile Sun Jan 31 13:01:02 2010 (r203284) +++ head/sys/modules/ath/Makefile Sun Jan 31 13:39:08 2010 (r203285) @@ -37,7 +37,7 @@ ATH_RATE?= sample # tx rate control alg KMOD= if_ath SRCS= if_ath.c if_ath_pci.c # NB: v3 eeprom support used by both AR5211 and AR5212; just include it -SRCS+= ah_osdep.c ah.c ah_regdomain.c ah_eeprom_v3.c +SRCS+= ah_osdep.c ah.c ah_regdomain.c ah_eeprom_v3.c ah_eeprom_v4k.c SRCS+= device_if.h bus_if.h pci_if.h opt_inet.h opt_ath.h opt_ah.h opt_wlan.h # @@ -89,6 +89,7 @@ SRCS+= ah_eeprom_v14.c \ ar5416_misc.c ar5416_phy.c ar5416_power.c ar5416_recv.c \ ar5416_reset.c ar5416_xmit.c SRCS+= ar9160_attach.c +SRCS+= ar9280_attach.c # RF backend for 5416 and 9160 SRCS+= ar2133.c From owner-svn-src-all@FreeBSD.ORG Sun Jan 31 14:25:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8C5011065670; Sun, 31 Jan 2010 14:25:09 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7A8CC8FC16; Sun, 31 Jan 2010 14:25:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0VEP9Ge049238; Sun, 31 Jan 2010 14:25:09 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0VEP94M049236; Sun, 31 Jan 2010 14:25:09 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201001311425.o0VEP94M049236@svn.freebsd.org> From: Rui Paulo Date: Sun, 31 Jan 2010 14:25:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203286 - head/sys/modules/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 14:25:09 -0000 Author: rpaulo Date: Sun Jan 31 14:25:09 2010 New Revision: 203286 URL: http://svn.freebsd.org/changeset/base/203286 Log: Improve previous commit and add missing ar9280.c Modified: head/sys/modules/ath/Makefile Modified: head/sys/modules/ath/Makefile ============================================================================== --- head/sys/modules/ath/Makefile Sun Jan 31 13:39:08 2010 (r203285) +++ head/sys/modules/ath/Makefile Sun Jan 31 14:25:09 2010 (r203286) @@ -37,7 +37,7 @@ ATH_RATE?= sample # tx rate control alg KMOD= if_ath SRCS= if_ath.c if_ath_pci.c # NB: v3 eeprom support used by both AR5211 and AR5212; just include it -SRCS+= ah_osdep.c ah.c ah_regdomain.c ah_eeprom_v3.c ah_eeprom_v4k.c +SRCS+= ah_osdep.c ah.c ah_regdomain.c ah_eeprom_v3.c SRCS+= device_if.h bus_if.h pci_if.h opt_inet.h opt_ath.h opt_ah.h opt_wlan.h # @@ -82,14 +82,14 @@ SRCS+= ar5413.c # NB: 9160 depends on 5416 but 5416 does not require 9160 # .PATH: ${.CURDIR}/../../dev/ath/ath_hal/ar5416 -SRCS+= ah_eeprom_v14.c \ +SRCS+= ah_eeprom_v14.c ah_eeprom_v4k.c \ ar5416_ani.c ar5416_attach.c ar5416_beacon.c ar5416_cal.c \ ar5416_cal_iq.c ar5416_cal_adcgain.c ar5416_cal_adcdc.c \ ar5416_eeprom.c ar5416_gpio.c ar5416_interrupts.c ar5416_keycache.c \ ar5416_misc.c ar5416_phy.c ar5416_power.c ar5416_recv.c \ ar5416_reset.c ar5416_xmit.c SRCS+= ar9160_attach.c -SRCS+= ar9280_attach.c +SRCS+= ar9280.c ar9280_attach.c # RF backend for 5416 and 9160 SRCS+= ar2133.c From owner-svn-src-all@FreeBSD.ORG Sun Jan 31 14:25:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CE9A6106568B; Sun, 31 Jan 2010 14:25:29 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BAACE8FC08; Sun, 31 Jan 2010 14:25:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0VEPTl6049355; Sun, 31 Jan 2010 14:25:29 GMT (envelope-from rnoland@svn.freebsd.org) Received: (from rnoland@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0VEPTEo049344; Sun, 31 Jan 2010 14:25:29 GMT (envelope-from rnoland@svn.freebsd.org) Message-Id: <201001311425.o0VEPTEo049344@svn.freebsd.org> From: Robert Noland Date: Sun, 31 Jan 2010 14:25:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203287 - in head/sys: conf dev/drm modules/drm/drm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 14:25:30 -0000 Author: rnoland Date: Sun Jan 31 14:25:29 2010 New Revision: 203287 URL: http://svn.freebsd.org/changeset/base/203287 Log: Import simple drm memory manager. This is required for the VIA driver and at least some parts are needed for GEM. MFC after: 2 weeks Added: head/sys/dev/drm/drm_hashtab.c (contents, props changed) head/sys/dev/drm/drm_hashtab.h (contents, props changed) head/sys/dev/drm/drm_mm.c (contents, props changed) head/sys/dev/drm/drm_mm.h (contents, props changed) head/sys/dev/drm/drm_sman.c (contents, props changed) head/sys/dev/drm/drm_sman.h (contents, props changed) Modified: head/sys/conf/files head/sys/dev/drm/drmP.h head/sys/dev/drm/drm_linux_list.h head/sys/dev/drm/drm_memory.c head/sys/dev/drm/i915_drv.c head/sys/dev/drm/i915_drv.h head/sys/modules/drm/drm/Makefile Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Sun Jan 31 14:25:09 2010 (r203286) +++ head/sys/conf/files Sun Jan 31 14:25:29 2010 (r203287) @@ -839,12 +839,15 @@ dev/drm/drm_dma.c optional drm dev/drm/drm_drawable.c optional drm dev/drm/drm_drv.c optional drm dev/drm/drm_fops.c optional drm +dev/drm/drm_hashtab.c optional drm dev/drm/drm_ioctl.c optional drm dev/drm/drm_irq.c optional drm dev/drm/drm_lock.c optional drm dev/drm/drm_memory.c optional drm +dev/drm/drm_mm.c optional drm dev/drm/drm_pci.c optional drm dev/drm/drm_scatter.c optional drm +dev/drm/drm_sman.c optional drm dev/drm/drm_sysctl.c optional drm dev/drm/drm_vm.c optional drm dev/drm/i915_dma.c optional i915drm Modified: head/sys/dev/drm/drmP.h ============================================================================== --- head/sys/dev/drm/drmP.h Sun Jan 31 14:25:09 2010 (r203286) +++ head/sys/dev/drm/drmP.h Sun Jan 31 14:25:29 2010 (r203287) @@ -91,9 +91,9 @@ struct drm_file; #include #include "dev/drm/drm.h" -#include "dev/drm/drm_linux_list.h" #include "dev/drm/drm_atomic.h" #include "dev/drm/drm_internal.h" +#include "dev/drm/drm_linux_list.h" #include #ifdef DRM_DEBUG @@ -147,6 +147,8 @@ MALLOC_DECLARE(DRM_MEM_AGPLISTS); MALLOC_DECLARE(DRM_MEM_CTXBITMAP); MALLOC_DECLARE(DRM_MEM_SGLISTS); MALLOC_DECLARE(DRM_MEM_DRAWABLE); +MALLOC_DECLARE(DRM_MEM_MM); +MALLOC_DECLARE(DRM_MEM_HASHTAB); SYSCTL_DECL(_hw_drm); @@ -193,6 +195,11 @@ typedef void irqreturn_t; #define IRQ_HANDLED /* nothing */ #define IRQ_NONE /* nothing */ +#define unlikely(x) __builtin_expect(!!(x), 0) +#define container_of(ptr, type, member) ({ \ + __typeof( ((type *)0)->member ) *__mptr = (ptr); \ + (type *)( (char *)__mptr - offsetof(type,member) );}) + enum { DRM_IS_NOT_AGP, DRM_IS_AGP, Added: head/sys/dev/drm/drm_hashtab.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/drm/drm_hashtab.c Sun Jan 31 14:25:29 2010 (r203287) @@ -0,0 +1,180 @@ +/************************************************************************** + * + * Copyright 2006 Tungsten Graphics, Inc., Bismarck, ND. USA. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sub license, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE + * USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * + **************************************************************************/ + +#include +__FBSDID("$FreeBSD$"); + +/* + * Simple open hash tab implementation. + * + * Authors: + * Thomas Hellström + */ + +#include "dev/drm/drmP.h" +#include "dev/drm/drm_hashtab.h" + +#include + +int drm_ht_create(struct drm_open_hash *ht, unsigned int order) +{ + ht->size = 1 << order; + ht->order = order; + ht->table = NULL; + ht->table = hashinit(ht->size, DRM_MEM_HASHTAB, &ht->mask); + if (!ht->table) { + DRM_ERROR("Out of memory for hash table\n"); + return -ENOMEM; + } + return 0; +} + +void drm_ht_verbose_list(struct drm_open_hash *ht, unsigned long key) +{ + struct drm_hash_item *entry; + struct drm_hash_item_list *h_list; + unsigned int hashed_key; + int count = 0; + + hashed_key = hash32_buf(&key, sizeof(key), ht->order); + DRM_DEBUG("Key is 0x%08lx, Hashed key is 0x%08x\n", key, hashed_key); + h_list = &ht->table[hashed_key & ht->mask]; + LIST_FOREACH(entry, h_list, head) + DRM_DEBUG("count %d, key: 0x%08lx\n", count++, entry->key); +} + +static struct drm_hash_item * +drm_ht_find_key(struct drm_open_hash *ht, unsigned long key) +{ + struct drm_hash_item *entry; + struct drm_hash_item_list *h_list; + unsigned int hashed_key; + + hashed_key = hash32_buf(&key, sizeof(key), ht->order); + h_list = &ht->table[hashed_key & ht->mask]; + LIST_FOREACH(entry, h_list, head) { + if (entry->key == key) + return entry; + if (entry->key > key) + break; + } + return NULL; +} + + +int drm_ht_insert_item(struct drm_open_hash *ht, struct drm_hash_item *item) +{ + struct drm_hash_item *entry, *parent; + struct drm_hash_item_list *h_list; + unsigned int hashed_key; + unsigned long key = item->key; + + hashed_key = hash32_buf(&key, sizeof(key), ht->order); + h_list = &ht->table[hashed_key & ht->mask]; + parent = NULL; + LIST_FOREACH(entry, h_list, head) { + if (entry->key == key) + return -EINVAL; + if (entry->key > key) + break; + parent = entry; + } + if (parent) { + LIST_INSERT_AFTER(parent, item, head); + } else { + LIST_INSERT_HEAD(h_list, item, head); + } + return 0; +} + +/* + * Just insert an item and return any "bits" bit key that hasn't been + * used before. + */ +int drm_ht_just_insert_please(struct drm_open_hash *ht, struct drm_hash_item *item, + unsigned long seed, int bits, int shift, + unsigned long add) +{ + int ret; + unsigned long mask = (1 << bits) - 1; + unsigned long first, unshifted_key = 0; + + unshifted_key = hash32_buf(&seed, sizeof(seed), unshifted_key); + first = unshifted_key; + do { + item->key = (unshifted_key << shift) + add; + ret = drm_ht_insert_item(ht, item); + if (ret) + unshifted_key = (unshifted_key + 1) & mask; + } while(ret && (unshifted_key != first)); + + if (ret) { + DRM_ERROR("Available key bit space exhausted\n"); + return -EINVAL; + } + return 0; +} + +int drm_ht_find_item(struct drm_open_hash *ht, unsigned long key, + struct drm_hash_item **item) +{ + struct drm_hash_item *entry; + + entry = drm_ht_find_key(ht, key); + if (!entry) + return -EINVAL; + + *item = entry; + return 0; +} + +int drm_ht_remove_key(struct drm_open_hash *ht, unsigned long key) +{ + struct drm_hash_item *entry; + + entry = drm_ht_find_key(ht, key); + if (entry) { + LIST_REMOVE(entry, head); + return 0; + } + return -EINVAL; +} + +int drm_ht_remove_item(struct drm_open_hash *ht, struct drm_hash_item *item) +{ + LIST_REMOVE(item, head); + return 0; +} + +void drm_ht_remove(struct drm_open_hash *ht) +{ + if (ht->table) { + hashdestroy(ht->table, DRM_MEM_HASHTAB, ht->mask); + ht->table = NULL; + } +} Added: head/sys/dev/drm/drm_hashtab.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/drm/drm_hashtab.h Sun Jan 31 14:25:29 2010 (r203287) @@ -0,0 +1,68 @@ +/************************************************************************** + * + * Copyright 2006 Tungsten Graphics, Inc., Bismack, ND. USA. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sub license, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE + * USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * + **************************************************************************/ + +#include +__FBSDID("$FreeBSD$"); + +/* + * Simple open hash tab implementation. + * + * Authors: + * Thomas Hellström + */ + +#ifndef DRM_HASHTAB_H +#define DRM_HASHTAB_H + +#define drm_hash_entry(_ptr, _type, _member) container_of(_ptr, _type, _member) + +struct drm_hash_item { + LIST_ENTRY(drm_hash_item) head; + unsigned long key; +}; + +struct drm_open_hash { + LIST_HEAD(drm_hash_item_list, drm_hash_item) *table; + unsigned int size; + unsigned int order; + unsigned long mask; +}; + +extern int drm_ht_create(struct drm_open_hash *ht, unsigned int order); +extern int drm_ht_insert_item(struct drm_open_hash *ht, struct drm_hash_item *item); +extern int drm_ht_just_insert_please(struct drm_open_hash *ht, struct drm_hash_item *item, + unsigned long seed, int bits, int shift, + unsigned long add); +extern int drm_ht_find_item(struct drm_open_hash *ht, unsigned long key, struct drm_hash_item **item); + +extern void drm_ht_verbose_list(struct drm_open_hash *ht, unsigned long key); +extern int drm_ht_remove_key(struct drm_open_hash *ht, unsigned long key); +extern int drm_ht_remove_item(struct drm_open_hash *ht, struct drm_hash_item *item); +extern void drm_ht_remove(struct drm_open_hash *ht); + +#endif Modified: head/sys/dev/drm/drm_linux_list.h ============================================================================== --- head/sys/dev/drm/drm_linux_list.h Sun Jan 31 14:25:09 2010 (r203286) +++ head/sys/dev/drm/drm_linux_list.h Sun Jan 31 14:25:29 2010 (r203287) @@ -32,12 +32,15 @@ #include __FBSDID("$FreeBSD$"); +#ifndef _DRM_LINUX_LIST_H_ +#define _DRM_LINUX_LIST_H_ + struct list_head { struct list_head *next, *prev; }; -/* Cheat, assume the list_head is at the start of the struct */ -#define list_entry(entry, type, member) (type *)(entry) +#define list_entry(ptr, type, member) container_of(ptr,type,member) +#define hlist_entry(ptr, type, member) container_of(ptr,type,member) static __inline__ void INIT_LIST_HEAD(struct list_head *head) { @@ -51,6 +54,14 @@ list_empty(struct list_head *head) { } static __inline__ void +list_add(struct list_head *new, struct list_head *head) { + (head)->next->prev = new; + (new)->next = (head)->next; + (new)->prev = head; + (head)->next = new; +} + +static __inline__ void list_add_tail(struct list_head *entry, struct list_head *head) { (entry)->prev = (head)->prev; (entry)->next = head; @@ -64,6 +75,13 @@ list_del(struct list_head *entry) { (entry)->prev->next = (entry)->next; } +static __inline__ void +list_del_init(struct list_head *entry) { + (entry)->next->prev = (entry)->prev; + (entry)->prev->next = (entry)->next; + INIT_LIST_HEAD(entry); +} + #define list_for_each(entry, head) \ for (entry = (head)->next; entry != head; entry = (entry)->next) @@ -76,3 +94,17 @@ list_del(struct list_head *entry) { entry != head; \ entry = temp, temp = entry->next) +/** + * list_for_each_entry_safe - iterate over list of given type safe against removal of list entry + * @pos: the type * to use as a loop cursor. + * @n: another type * to use as temporary storage + * @head: the head for your list. + * @member: the name of the list_struct within the struct. + */ +#define list_for_each_entry_safe(pos, n, head, member) \ + for (pos = list_entry((head)->next, __typeof(*pos), member), \ + n = list_entry(pos->member.next, __typeof(*pos), member); \ + &pos->member != (head); \ + pos = n, n = list_entry(n->member.next, __typeof(*n), member)) + +#endif /* _DRM_LINUX_LIST_H_ */ Modified: head/sys/dev/drm/drm_memory.c ============================================================================== --- head/sys/dev/drm/drm_memory.c Sun Jan 31 14:25:09 2010 (r203286) +++ head/sys/dev/drm/drm_memory.c Sun Jan 31 14:25:29 2010 (r203287) @@ -60,6 +60,8 @@ MALLOC_DEFINE(DRM_MEM_CTXBITMAP, "drm_ct "DRM CTXBITMAP Data Structures"); MALLOC_DEFINE(DRM_MEM_SGLISTS, "drm_sglists", "DRM SGLISTS Data Structures"); MALLOC_DEFINE(DRM_MEM_DRAWABLE, "drm_drawable", "DRM DRAWABLE Data Structures"); +MALLOC_DEFINE(DRM_MEM_MM, "drm_sman", "DRM MEMORY MANAGER Data Structures"); +MALLOC_DEFINE(DRM_MEM_HASHTAB, "drm_hashtab", "DRM HASHTABLE Data Structures"); void drm_mem_init(void) { Added: head/sys/dev/drm/drm_mm.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/drm/drm_mm.c Sun Jan 31 14:25:29 2010 (r203287) @@ -0,0 +1,368 @@ +/************************************************************************** + * + * Copyright 2006 Tungsten Graphics, Inc., Bismarck, ND., USA. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sub license, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE + * USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * + **************************************************************************/ + +#include +__FBSDID("$FreeBSD$"); + +/* + * Generic simple memory manager implementation. Intended to be used as a base + * class implementation for more advanced memory managers. + * + * Note that the algorithm used is quite simple and there might be substantial + * performance gains if a smarter free list is implemented. Currently it is just an + * unordered stack of free regions. This could easily be improved if an RB-tree + * is used instead. At least if we expect heavy fragmentation. + * + * Aligned allocations can also see improvement. + * + * Authors: + * Thomas Hellström + */ + +#include "dev/drm/drmP.h" +#include "dev/drm/drm_mm.h" + +#define MM_UNUSED_TARGET 4 + +unsigned long drm_mm_tail_space(struct drm_mm *mm) +{ + struct list_head *tail_node; + struct drm_mm_node *entry; + + tail_node = mm->ml_entry.prev; + entry = list_entry(tail_node, struct drm_mm_node, ml_entry); + if (!entry->free) + return 0; + + return entry->size; +} + +int drm_mm_remove_space_from_tail(struct drm_mm *mm, unsigned long size) +{ + struct list_head *tail_node; + struct drm_mm_node *entry; + + tail_node = mm->ml_entry.prev; + entry = list_entry(tail_node, struct drm_mm_node, ml_entry); + if (!entry->free) + return -ENOMEM; + + if (entry->size <= size) + return -ENOMEM; + + entry->size -= size; + return 0; +} + +static struct drm_mm_node *drm_mm_kmalloc(struct drm_mm *mm, int atomic) +{ + struct drm_mm_node *child; + + if (atomic) + child = malloc(sizeof(*child), DRM_MEM_MM, M_NOWAIT); + else + child = malloc(sizeof(*child), DRM_MEM_MM, M_WAITOK); + + if (unlikely(child == NULL)) { + mtx_lock(&mm->unused_lock); + if (list_empty(&mm->unused_nodes)) + child = NULL; + else { + child = + list_entry(mm->unused_nodes.next, + struct drm_mm_node, fl_entry); + list_del(&child->fl_entry); + --mm->num_unused; + } + mtx_unlock(&mm->unused_lock); + } + return child; +} + +int drm_mm_pre_get(struct drm_mm *mm) +{ + struct drm_mm_node *node; + + mtx_lock(&mm->unused_lock); + while (mm->num_unused < MM_UNUSED_TARGET) { + mtx_unlock(&mm->unused_lock); + node = malloc(sizeof(*node), DRM_MEM_MM, M_WAITOK); + mtx_lock(&mm->unused_lock); + + if (unlikely(node == NULL)) { + int ret = (mm->num_unused < 2) ? -ENOMEM : 0; + mtx_unlock(&mm->unused_lock); + return ret; + } + ++mm->num_unused; + list_add_tail(&node->fl_entry, &mm->unused_nodes); + } + mtx_unlock(&mm->unused_lock); + return 0; +} + +static int drm_mm_create_tail_node(struct drm_mm *mm, + unsigned long start, + unsigned long size, int atomic) +{ + struct drm_mm_node *child; + + child = drm_mm_kmalloc(mm, atomic); + if (unlikely(child == NULL)) + return -ENOMEM; + + child->free = 1; + child->size = size; + child->start = start; + child->mm = mm; + + list_add_tail(&child->ml_entry, &mm->ml_entry); + list_add_tail(&child->fl_entry, &mm->fl_entry); + + return 0; +} + +int drm_mm_add_space_to_tail(struct drm_mm *mm, unsigned long size, int atomic) +{ + struct list_head *tail_node; + struct drm_mm_node *entry; + + tail_node = mm->ml_entry.prev; + entry = list_entry(tail_node, struct drm_mm_node, ml_entry); + if (!entry->free) { + return drm_mm_create_tail_node(mm, entry->start + entry->size, + size, atomic); + } + entry->size += size; + return 0; +} + +static struct drm_mm_node *drm_mm_split_at_start(struct drm_mm_node *parent, + unsigned long size, + int atomic) +{ + struct drm_mm_node *child; + + child = drm_mm_kmalloc(parent->mm, atomic); + if (unlikely(child == NULL)) + return NULL; + + INIT_LIST_HEAD(&child->fl_entry); + + child->free = 0; + child->size = size; + child->start = parent->start; + child->mm = parent->mm; + + list_add_tail(&child->ml_entry, &parent->ml_entry); + INIT_LIST_HEAD(&child->fl_entry); + + parent->size -= size; + parent->start += size; + return child; +} + + +struct drm_mm_node *drm_mm_get_block_generic(struct drm_mm_node *node, + unsigned long size, + unsigned alignment, + int atomic) +{ + + struct drm_mm_node *align_splitoff = NULL; + unsigned tmp = 0; + + if (alignment) + tmp = node->start % alignment; + + if (tmp) { + align_splitoff = + drm_mm_split_at_start(node, alignment - tmp, atomic); + if (unlikely(align_splitoff == NULL)) + return NULL; + } + + if (node->size == size) { + list_del_init(&node->fl_entry); + node->free = 0; + } else { + node = drm_mm_split_at_start(node, size, atomic); + } + + if (align_splitoff) + drm_mm_put_block(align_splitoff); + + return node; +} + +/* + * Put a block. Merge with the previous and / or next block if they are free. + * Otherwise add to the free stack. + */ + +void drm_mm_put_block(struct drm_mm_node *cur) +{ + + struct drm_mm *mm = cur->mm; + struct list_head *cur_head = &cur->ml_entry; + struct list_head *root_head = &mm->ml_entry; + struct drm_mm_node *prev_node = NULL; + struct drm_mm_node *next_node; + + int merged = 0; + + if (cur_head->prev != root_head) { + prev_node = + list_entry(cur_head->prev, struct drm_mm_node, ml_entry); + if (prev_node->free) { + prev_node->size += cur->size; + merged = 1; + } + } + if (cur_head->next != root_head) { + next_node = + list_entry(cur_head->next, struct drm_mm_node, ml_entry); + if (next_node->free) { + if (merged) { + prev_node->size += next_node->size; + list_del(&next_node->ml_entry); + list_del(&next_node->fl_entry); + if (mm->num_unused < MM_UNUSED_TARGET) { + list_add(&next_node->fl_entry, + &mm->unused_nodes); + ++mm->num_unused; + } else + free(next_node, DRM_MEM_MM); + } else { + next_node->size += cur->size; + next_node->start = cur->start; + merged = 1; + } + } + } + if (!merged) { + cur->free = 1; + list_add(&cur->fl_entry, &mm->fl_entry); + } else { + list_del(&cur->ml_entry); + if (mm->num_unused < MM_UNUSED_TARGET) { + list_add(&cur->fl_entry, &mm->unused_nodes); + ++mm->num_unused; + } else + free(cur, DRM_MEM_MM); + } +} + +struct drm_mm_node *drm_mm_search_free(const struct drm_mm *mm, + unsigned long size, + unsigned alignment, int best_match) +{ + struct list_head *list; + const struct list_head *free_stack = &mm->fl_entry; + struct drm_mm_node *entry; + struct drm_mm_node *best; + unsigned long best_size; + unsigned wasted; + + best = NULL; + best_size = ~0UL; + + list_for_each(list, free_stack) { + entry = list_entry(list, struct drm_mm_node, fl_entry); + wasted = 0; + + if (entry->size < size) + continue; + + if (alignment) { + register unsigned tmp = entry->start % alignment; + if (tmp) + wasted += alignment - tmp; + } + + if (entry->size >= size + wasted) { + if (!best_match) + return entry; + if (size < best_size) { + best = entry; + best_size = entry->size; + } + } + } + + return best; +} + +int drm_mm_clean(struct drm_mm * mm) +{ + struct list_head *head = &mm->ml_entry; + + return (head->next->next == head); +} + +int drm_mm_init(struct drm_mm * mm, unsigned long start, unsigned long size) +{ + INIT_LIST_HEAD(&mm->ml_entry); + INIT_LIST_HEAD(&mm->fl_entry); + INIT_LIST_HEAD(&mm->unused_nodes); + mm->num_unused = 0; + mtx_init(&mm->unused_lock, "drm_unused", NULL, MTX_DEF); + + return drm_mm_create_tail_node(mm, start, size, 0); +} + +void drm_mm_takedown(struct drm_mm * mm) +{ + struct list_head *bnode = mm->fl_entry.next; + struct drm_mm_node *entry; + struct drm_mm_node *next; + + entry = list_entry(bnode, struct drm_mm_node, fl_entry); + + if (entry->ml_entry.next != &mm->ml_entry || + entry->fl_entry.next != &mm->fl_entry) { + DRM_ERROR("Memory manager not clean. Delaying takedown\n"); + return; + } + + list_del(&entry->fl_entry); + list_del(&entry->ml_entry); + free(entry, DRM_MEM_MM); + + mtx_lock(&mm->unused_lock); + list_for_each_entry_safe(entry, next, &mm->unused_nodes, fl_entry) { + list_del(&entry->fl_entry); + free(entry, DRM_MEM_MM); + --mm->num_unused; + } + mtx_unlock(&mm->unused_lock); + + mtx_destroy(&mm->unused_lock); + + KASSERT(mm->num_unused == 0, ("num_unused != 0")); +} Added: head/sys/dev/drm/drm_mm.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/drm/drm_mm.h Sun Jan 31 14:25:29 2010 (r203287) @@ -0,0 +1,100 @@ +/************************************************************************** + * + * Copyright 2006-2008 Tungsten Graphics, Inc., Cedar Park, TX. USA. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sub license, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE + * USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * + **************************************************************************/ + +#include +__FBSDID("$FreeBSD$"); + +/* + * Authors: + * Thomas Hellstrom + */ + +#ifndef _DRM_MM_H_ +#define _DRM_MM_H_ + +#include "dev/drm/drm_linux_list.h" + +struct drm_mm_node { + struct list_head fl_entry; + struct list_head ml_entry; + int free; + unsigned long start; + unsigned long size; + struct drm_mm *mm; + void *private; +}; + +struct drm_mm { + struct list_head fl_entry; + struct list_head ml_entry; + struct list_head unused_nodes; + int num_unused; + struct mtx unused_lock; +}; + +/* + * Basic range manager support (drm_mm.c) + */ +extern struct drm_mm_node *drm_mm_get_block_generic(struct drm_mm_node *node, + unsigned long size, + unsigned alignment, + int atomic); +static inline struct drm_mm_node *drm_mm_get_block(struct drm_mm_node *parent, + unsigned long size, + unsigned alignment) +{ + return drm_mm_get_block_generic(parent, size, alignment, 0); +} +static inline struct drm_mm_node *drm_mm_get_block_atomic(struct drm_mm_node *parent, + unsigned long size, + unsigned alignment) +{ + return drm_mm_get_block_generic(parent, size, alignment, 1); +} +extern void drm_mm_put_block(struct drm_mm_node *cur); +extern struct drm_mm_node *drm_mm_search_free(const struct drm_mm *mm, + unsigned long size, + unsigned alignment, + int best_match); +extern int drm_mm_init(struct drm_mm *mm, unsigned long start, + unsigned long size); +extern void drm_mm_takedown(struct drm_mm *mm); +extern int drm_mm_clean(struct drm_mm *mm); +extern unsigned long drm_mm_tail_space(struct drm_mm *mm); +extern int drm_mm_remove_space_from_tail(struct drm_mm *mm, + unsigned long size); +extern int drm_mm_add_space_to_tail(struct drm_mm *mm, + unsigned long size, int atomic); +extern int drm_mm_pre_get(struct drm_mm *mm); + +static inline struct drm_mm *drm_get_mm(struct drm_mm_node *block) +{ + return block->mm; +} + +#endif Added: head/sys/dev/drm/drm_sman.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/drm/drm_sman.c Sun Jan 31 14:25:29 2010 (r203287) @@ -0,0 +1,352 @@ +/************************************************************************** + * + * Copyright 2006 Tungsten Graphics, Inc., Bismarck., ND., USA. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sub license, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE + * USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * + **************************************************************************/ + +#include +__FBSDID("$FreeBSD$"); + +/* + * Simple memory manager interface that keeps track on allocate regions on a + * per "owner" basis. All regions associated with an "owner" can be released + * with a simple call. Typically if the "owner" exists. The owner is any + * "unsigned long" identifier. Can typically be a pointer to a file private + * struct or a context identifier. + * + * Authors: + * Thomas Hellström + */ + +#include "dev/drm/drmP.h" +#include "dev/drm/drm_sman.h" + +struct drm_owner_item { + struct drm_hash_item owner_hash; + struct list_head sman_list; + struct list_head mem_blocks; +}; + +void drm_sman_takedown(struct drm_sman * sman) +{ + drm_ht_remove(&sman->user_hash_tab); + drm_ht_remove(&sman->owner_hash_tab); + if (sman->mm) + drm_free(sman->mm, sman->num_managers * sizeof(*sman->mm), + DRM_MEM_MM); +} + +int +drm_sman_init(struct drm_sman * sman, unsigned int num_managers, + unsigned int user_order, unsigned int owner_order) +{ + int ret = 0; + + sman->mm = (struct drm_sman_mm *) drm_calloc(num_managers, + sizeof(*sman->mm), DRM_MEM_MM); + if (!sman->mm) { + ret = -ENOMEM; + goto out; + } + sman->num_managers = num_managers; + INIT_LIST_HEAD(&sman->owner_items); + ret = drm_ht_create(&sman->owner_hash_tab, owner_order); + if (ret) + goto out1; + ret = drm_ht_create(&sman->user_hash_tab, user_order); + if (!ret) + goto out; + + drm_ht_remove(&sman->owner_hash_tab); +out1: + drm_free(sman->mm, num_managers * sizeof(*sman->mm), DRM_MEM_MM); +out: + return ret; +} + +static void *drm_sman_mm_allocate(void *private, unsigned long size, + unsigned alignment) +{ + struct drm_mm *mm = (struct drm_mm *) private; + struct drm_mm_node *tmp; + + tmp = drm_mm_search_free(mm, size, alignment, 1); + if (!tmp) { + return NULL; + } + tmp = drm_mm_get_block(tmp, size, alignment); + return tmp; +} + +static void drm_sman_mm_free(void *private, void *ref) +{ + struct drm_mm_node *node = (struct drm_mm_node *) ref; + + drm_mm_put_block(node); +} + +static void drm_sman_mm_destroy(void *private) +{ + struct drm_mm *mm = (struct drm_mm *) private; + drm_mm_takedown(mm); + drm_free(mm, sizeof(*mm), DRM_MEM_MM); +} + +static unsigned long drm_sman_mm_offset(void *private, void *ref) +{ + struct drm_mm_node *node = (struct drm_mm_node *) ref; + return node->start; +} + +int +drm_sman_set_range(struct drm_sman * sman, unsigned int manager, + unsigned long start, unsigned long size) +{ + struct drm_sman_mm *sman_mm; + struct drm_mm *mm; + int ret; + + KASSERT(manager < sman->num_managers, ("Invalid manager")); + + sman_mm = &sman->mm[manager]; + mm = malloc(sizeof(*mm), DRM_MEM_MM, M_WAITOK | M_ZERO); + if (!mm) { + return -ENOMEM; + } + sman_mm->private = mm; + ret = drm_mm_init(mm, start, size); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Jan 31 14:28:50 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 52556106566B; Sun, 31 Jan 2010 14:28:50 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: from mail-ew0-f211.google.com (mail-ew0-f211.google.com [209.85.219.211]) by mx1.freebsd.org (Postfix) with ESMTP id 5F7918FC0C; Sun, 31 Jan 2010 14:28:49 +0000 (UTC) Received: by ewy3 with SMTP id 3so1265ewy.33 for ; Sun, 31 Jan 2010 06:28:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:subject:mime-version :content-type:from:in-reply-to:date:cc:content-transfer-encoding :message-id:references:to:x-mailer; bh=ZjCi6Urtcrg84vN1jADIWY7gx2h8TzcZednqD8bOQS4=; b=w0nSfC0lcTPsw8fRYy39gp+ayDdiYI7i/49aPzgTTpIu43+2dheUYMNpXibbg8lTKH q2R77YxwZOp1WhqMKEPSJSwJdHRgv+C7STcA/sx0ceFijrgFjNirnnMK3KN8zd0etPbt id7uy5SmbW5hmfvAfU0F2sFxW/exe73jrFW/s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; b=xczRAncgYz3AK1Jx9m2bRiKe8nrW2PZxm/oJ/MwFiV+gWXGUR8jnoSkoR51olGflIM dMXEZHNfZeXYQELQ3W/KEEWJK59ulU3z0HnmL3QG2elLy0PEMWbWWGAPpRure1fth1OQ YuLRGTyRqxkpgLvuUpASHmdRHfkk/Yc7mOL5M= Received: by 10.213.97.4 with SMTP id j4mr3086403ebn.9.1264948128156; Sun, 31 Jan 2010 06:28:48 -0800 (PST) Received: from ?10.0.10.4? (54.81.54.77.rev.vodafone.pt [77.54.81.54]) by mx.google.com with ESMTPS id 24sm7707000eyx.46.2010.01.31.06.28.46 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 31 Jan 2010 06:28:47 -0800 (PST) Sender: Rui Paulo Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: text/plain; charset=us-ascii From: Rui Paulo In-Reply-To: <201001300424.o0U4O370082276@svn.freebsd.org> Date: Sun, 31 Jan 2010 14:28:44 +0000 Content-Transfer-Encoding: 7bit Message-Id: References: <201001300424.o0U4O370082276@svn.freebsd.org> To: Marcel Moolenaar X-Mailer: Apple Mail (2.1077) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r203181 - in head/lib: . libefi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 14:28:50 -0000 On 30 Jan 2010, at 04:24, Marcel Moolenaar wrote: > Author: marcel > Date: Sat Jan 30 04:24:03 2010 > New Revision: 203181 > URL: http://svn.freebsd.org/changeset/base/203181 > > Log: > Introduce libefi -- a library around EFI runtime services and protocols. > This first commit brings 3 functions for enumerating, retrieving, > adding, removing and modifying EFI variables. The immediate use of these > include the insertion of a new boot option as part of the installation > process. Thanks! -- Rui Paulo From owner-svn-src-all@FreeBSD.ORG Sun Jan 31 14:30:40 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 069B5106566B; Sun, 31 Jan 2010 14:30:40 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E6DC98FC18; Sun, 31 Jan 2010 14:30:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0VEUdfR050571; Sun, 31 Jan 2010 14:30:39 GMT (envelope-from rnoland@svn.freebsd.org) Received: (from rnoland@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0VEUdfv050565; Sun, 31 Jan 2010 14:30:39 GMT (envelope-from rnoland@svn.freebsd.org) Message-Id: <201001311430.o0VEUdfv050565@svn.freebsd.org> From: Robert Noland Date: Sun, 31 Jan 2010 14:30:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203288 - in head/sys: amd64/conf conf dev/drm i386/conf modules/drm modules/drm/via X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 14:30:40 -0000 Author: rnoland Date: Sun Jan 31 14:30:39 2010 New Revision: 203288 URL: http://svn.freebsd.org/changeset/base/203288 Log: Welcome drm support for VIA unichrome chips. MFC after: 2 weeks Added: head/sys/dev/drm/via_3d_reg.h (contents, props changed) head/sys/dev/drm/via_dma.c (contents, props changed) head/sys/dev/drm/via_dmablit.c (contents, props changed) head/sys/dev/drm/via_dmablit.h (contents, props changed) head/sys/dev/drm/via_drm.h (contents, props changed) head/sys/dev/drm/via_drv.c (contents, props changed) head/sys/dev/drm/via_drv.h (contents, props changed) head/sys/dev/drm/via_irq.c (contents, props changed) head/sys/dev/drm/via_map.c (contents, props changed) head/sys/dev/drm/via_mm.c (contents, props changed) head/sys/dev/drm/via_verifier.c (contents, props changed) head/sys/dev/drm/via_verifier.h (contents, props changed) head/sys/dev/drm/via_video.c (contents, props changed) head/sys/modules/drm/via/ head/sys/modules/drm/via/Makefile (contents, props changed) Modified: head/sys/amd64/conf/NOTES head/sys/conf/files head/sys/dev/drm/drmP.h head/sys/i386/conf/NOTES head/sys/modules/drm/Makefile Modified: head/sys/amd64/conf/NOTES ============================================================================== --- head/sys/amd64/conf/NOTES Sun Jan 31 14:25:29 2010 (r203287) +++ head/sys/amd64/conf/NOTES Sun Jan 31 14:30:39 2010 (r203288) @@ -263,6 +263,7 @@ device radeondrm # ATI Radeon device savagedrm # S3 Savage3D, Savage4 device sisdrm # SiS 300/305, 540, 630 device tdfxdrm # 3dfx Voodoo 3/4/5 and Banshee +device viadrm # VIA options DRM_DEBUG # Include debug printfs (slow) # Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Sun Jan 31 14:25:29 2010 (r203287) +++ head/sys/conf/files Sun Jan 31 14:30:39 2010 (r203288) @@ -886,6 +886,14 @@ dev/drm/sis_drv.c optional sisdrm dev/drm/sis_ds.c optional sisdrm dev/drm/sis_mm.c optional sisdrm dev/drm/tdfx_drv.c optional tdfxdrm +dev/drm/via_dma.c optional viadrm +dev/drm/via_dmablit.c optional viadrm +dev/drm/via_drv.c optional viadrm +dev/drm/via_irq.c optional viadrm +dev/drm/via_map.c optional viadrm +dev/drm/via_mm.c optional viadrm +dev/drm/via_verifier.c optional viadrm +dev/drm/via_video.c optional viadrm dev/ed/if_ed.c optional ed dev/ed/if_ed_novell.c optional ed dev/ed/if_ed_rtl80x9.c optional ed Modified: head/sys/dev/drm/drmP.h ============================================================================== --- head/sys/dev/drm/drmP.h Sun Jan 31 14:25:29 2010 (r203287) +++ head/sys/dev/drm/drmP.h Sun Jan 31 14:30:39 2010 (r203288) @@ -60,13 +60,17 @@ struct drm_file; #include #include #include +#include #include #include +#include #include #include #include #include #include +#include +#include #include #include #include Added: head/sys/dev/drm/via_3d_reg.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/drm/via_3d_reg.h Sun Jan 31 14:30:39 2010 (r203288) @@ -0,0 +1,1653 @@ +/*- + * Copyright 1998-2003 VIA Technologies, Inc. All Rights Reserved. + * Copyright 2001-2003 S3 Graphics, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sub license, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * VIA, S3 GRAPHICS, AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#ifndef VIA_3D_REG_H +#define VIA_3D_REG_H +#define HC_REG_BASE 0x0400 + +#define HC_REG_TRANS_SPACE 0x0040 + +#define HC_ParaN_MASK 0xffffffff +#define HC_Para_MASK 0x00ffffff +#define HC_SubA_MASK 0xff000000 +#define HC_SubA_SHIFT 24 +/* Transmission Setting + */ +#define HC_REG_TRANS_SET 0x003c +#define HC_ParaSubType_MASK 0xff000000 +#define HC_ParaType_MASK 0x00ff0000 +#define HC_ParaOS_MASK 0x0000ff00 +#define HC_ParaAdr_MASK 0x000000ff +#define HC_ParaSubType_SHIFT 24 +#define HC_ParaType_SHIFT 16 +#define HC_ParaOS_SHIFT 8 +#define HC_ParaAdr_SHIFT 0 + +#define HC_ParaType_CmdVdata 0x0000 +#define HC_ParaType_NotTex 0x0001 +#define HC_ParaType_Tex 0x0002 +#define HC_ParaType_Palette 0x0003 +#define HC_ParaType_PreCR 0x0010 +#define HC_ParaType_Auto 0x00fe + +/* Transmission Space + */ +#define HC_REG_Hpara0 0x0040 +#define HC_REG_HpataAF 0x02fc + +/* Read + */ +#define HC_REG_HREngSt 0x0000 +#define HC_REG_HRFIFOempty 0x0004 +#define HC_REG_HRFIFOfull 0x0008 +#define HC_REG_HRErr 0x000c +#define HC_REG_FIFOstatus 0x0010 +/* HC_REG_HREngSt 0x0000 + */ +#define HC_HDASZC_MASK 0x00010000 +#define HC_HSGEMI_MASK 0x0000f000 +#define HC_HLGEMISt_MASK 0x00000f00 +#define HC_HCRSt_MASK 0x00000080 +#define HC_HSE0St_MASK 0x00000040 +#define HC_HSE1St_MASK 0x00000020 +#define HC_HPESt_MASK 0x00000010 +#define HC_HXESt_MASK 0x00000008 +#define HC_HBESt_MASK 0x00000004 +#define HC_HE2St_MASK 0x00000002 +#define HC_HE3St_MASK 0x00000001 +/* HC_REG_HRFIFOempty 0x0004 + */ +#define HC_HRZDempty_MASK 0x00000010 +#define HC_HRTXAempty_MASK 0x00000008 +#define HC_HRTXDempty_MASK 0x00000004 +#define HC_HWZDempty_MASK 0x00000002 +#define HC_HWCDempty_MASK 0x00000001 +/* HC_REG_HRFIFOfull 0x0008 + */ +#define HC_HRZDfull_MASK 0x00000010 +#define HC_HRTXAfull_MASK 0x00000008 +#define HC_HRTXDfull_MASK 0x00000004 +#define HC_HWZDfull_MASK 0x00000002 +#define HC_HWCDfull_MASK 0x00000001 +/* HC_REG_HRErr 0x000c + */ +#define HC_HAGPCMErr_MASK 0x80000000 +#define HC_HAGPCMErrC_MASK 0x70000000 +/* HC_REG_FIFOstatus 0x0010 + */ +#define HC_HRFIFOATall_MASK 0x80000000 +#define HC_HRFIFOATbusy_MASK 0x40000000 +#define HC_HRATFGMDo_MASK 0x00000100 +#define HC_HRATFGMDi_MASK 0x00000080 +#define HC_HRATFRZD_MASK 0x00000040 +#define HC_HRATFRTXA_MASK 0x00000020 +#define HC_HRATFRTXD_MASK 0x00000010 +#define HC_HRATFWZD_MASK 0x00000008 +#define HC_HRATFWCD_MASK 0x00000004 +#define HC_HRATTXTAG_MASK 0x00000002 +#define HC_HRATTXCH_MASK 0x00000001 + +/* AGP Command Setting + */ +#define HC_SubA_HAGPBstL 0x0060 +#define HC_SubA_HAGPBendL 0x0061 +#define HC_SubA_HAGPCMNT 0x0062 +#define HC_SubA_HAGPBpL 0x0063 +#define HC_SubA_HAGPBpH 0x0064 +/* HC_SubA_HAGPCMNT 0x0062 + */ +#define HC_HAGPCMNT_MASK 0x00800000 +#define HC_HCmdErrClr_MASK 0x00400000 +#define HC_HAGPBendH_MASK 0x0000ff00 +#define HC_HAGPBstH_MASK 0x000000ff +#define HC_HAGPBendH_SHIFT 8 +#define HC_HAGPBstH_SHIFT 0 +/* HC_SubA_HAGPBpL 0x0063 + */ +#define HC_HAGPBpL_MASK 0x00fffffc +#define HC_HAGPBpID_MASK 0x00000003 +#define HC_HAGPBpID_PAUSE 0x00000000 +#define HC_HAGPBpID_JUMP 0x00000001 +#define HC_HAGPBpID_STOP 0x00000002 +/* HC_SubA_HAGPBpH 0x0064 + */ +#define HC_HAGPBpH_MASK 0x00ffffff + +/* Miscellaneous Settings + */ +#define HC_SubA_HClipTB 0x0070 +#define HC_SubA_HClipLR 0x0071 +#define HC_SubA_HFPClipTL 0x0072 +#define HC_SubA_HFPClipBL 0x0073 +#define HC_SubA_HFPClipLL 0x0074 +#define HC_SubA_HFPClipRL 0x0075 +#define HC_SubA_HFPClipTBH 0x0076 +#define HC_SubA_HFPClipLRH 0x0077 +#define HC_SubA_HLP 0x0078 +#define HC_SubA_HLPRF 0x0079 +#define HC_SubA_HSolidCL 0x007a +#define HC_SubA_HPixGC 0x007b +#define HC_SubA_HSPXYOS 0x007c +#define HC_SubA_HVertexCNT 0x007d + +#define HC_HClipT_MASK 0x00fff000 +#define HC_HClipT_SHIFT 12 +#define HC_HClipB_MASK 0x00000fff +#define HC_HClipB_SHIFT 0 +#define HC_HClipL_MASK 0x00fff000 +#define HC_HClipL_SHIFT 12 +#define HC_HClipR_MASK 0x00000fff +#define HC_HClipR_SHIFT 0 +#define HC_HFPClipBH_MASK 0x0000ff00 +#define HC_HFPClipBH_SHIFT 8 +#define HC_HFPClipTH_MASK 0x000000ff +#define HC_HFPClipTH_SHIFT 0 +#define HC_HFPClipRH_MASK 0x0000ff00 +#define HC_HFPClipRH_SHIFT 8 +#define HC_HFPClipLH_MASK 0x000000ff +#define HC_HFPClipLH_SHIFT 0 +#define HC_HSolidCH_MASK 0x000000ff +#define HC_HPixGC_MASK 0x00800000 +#define HC_HSPXOS_MASK 0x00fff000 +#define HC_HSPXOS_SHIFT 12 +#define HC_HSPYOS_MASK 0x00000fff + +/* Command + * Command A + */ +#define HC_HCmdHeader_MASK 0xfe000000 /*0xffe00000 */ +#define HC_HE3Fire_MASK 0x00100000 +#define HC_HPMType_MASK 0x000f0000 +#define HC_HEFlag_MASK 0x0000e000 +#define HC_HShading_MASK 0x00001c00 +#define HC_HPMValidN_MASK 0x00000200 +#define HC_HPLEND_MASK 0x00000100 +#define HC_HVCycle_MASK 0x000000ff +#define HC_HVCycle_Style_MASK 0x000000c0 +#define HC_HVCycle_ChgA_MASK 0x00000030 +#define HC_HVCycle_ChgB_MASK 0x0000000c +#define HC_HVCycle_ChgC_MASK 0x00000003 +#define HC_HPMType_Point 0x00000000 +#define HC_HPMType_Line 0x00010000 +#define HC_HPMType_Tri 0x00020000 +#define HC_HPMType_TriWF 0x00040000 +#define HC_HEFlag_NoAA 0x00000000 +#define HC_HEFlag_ab 0x00008000 +#define HC_HEFlag_bc 0x00004000 +#define HC_HEFlag_ca 0x00002000 +#define HC_HShading_Solid 0x00000000 +#define HC_HShading_FlatA 0x00000400 +#define HC_HShading_FlatB 0x00000800 +#define HC_HShading_FlatC 0x00000c00 +#define HC_HShading_Gouraud 0x00001000 +#define HC_HVCycle_Full 0x00000000 +#define HC_HVCycle_AFP 0x00000040 +#define HC_HVCycle_One 0x000000c0 +#define HC_HVCycle_NewA 0x00000000 +#define HC_HVCycle_AA 0x00000010 +#define HC_HVCycle_AB 0x00000020 +#define HC_HVCycle_AC 0x00000030 +#define HC_HVCycle_NewB 0x00000000 +#define HC_HVCycle_BA 0x00000004 +#define HC_HVCycle_BB 0x00000008 +#define HC_HVCycle_BC 0x0000000c +#define HC_HVCycle_NewC 0x00000000 +#define HC_HVCycle_CA 0x00000001 +#define HC_HVCycle_CB 0x00000002 +#define HC_HVCycle_CC 0x00000003 + +/* Command B + */ +#define HC_HLPrst_MASK 0x00010000 +#define HC_HLLastP_MASK 0x00008000 +#define HC_HVPMSK_MASK 0x00007f80 +#define HC_HBFace_MASK 0x00000040 +#define HC_H2nd1VT_MASK 0x0000003f +#define HC_HVPMSK_X 0x00004000 +#define HC_HVPMSK_Y 0x00002000 +#define HC_HVPMSK_Z 0x00001000 +#define HC_HVPMSK_W 0x00000800 +#define HC_HVPMSK_Cd 0x00000400 +#define HC_HVPMSK_Cs 0x00000200 +#define HC_HVPMSK_S 0x00000100 +#define HC_HVPMSK_T 0x00000080 + +/* Enable Setting + */ +#define HC_SubA_HEnable 0x0000 +#define HC_HenTXEnvMap_MASK 0x00200000 +#define HC_HenVertexCNT_MASK 0x00100000 +#define HC_HenCPUDAZ_MASK 0x00080000 +#define HC_HenDASZWC_MASK 0x00040000 +#define HC_HenFBCull_MASK 0x00020000 +#define HC_HenCW_MASK 0x00010000 +#define HC_HenAA_MASK 0x00008000 +#define HC_HenST_MASK 0x00004000 +#define HC_HenZT_MASK 0x00002000 +#define HC_HenZW_MASK 0x00001000 +#define HC_HenAT_MASK 0x00000800 +#define HC_HenAW_MASK 0x00000400 +#define HC_HenSP_MASK 0x00000200 +#define HC_HenLP_MASK 0x00000100 +#define HC_HenTXCH_MASK 0x00000080 +#define HC_HenTXMP_MASK 0x00000040 +#define HC_HenTXPP_MASK 0x00000020 +#define HC_HenTXTR_MASK 0x00000010 +#define HC_HenCS_MASK 0x00000008 +#define HC_HenFOG_MASK 0x00000004 +#define HC_HenABL_MASK 0x00000002 +#define HC_HenDT_MASK 0x00000001 + +/* Z Setting + */ +#define HC_SubA_HZWBBasL 0x0010 +#define HC_SubA_HZWBBasH 0x0011 +#define HC_SubA_HZWBType 0x0012 +#define HC_SubA_HZBiasL 0x0013 +#define HC_SubA_HZWBend 0x0014 +#define HC_SubA_HZWTMD 0x0015 +#define HC_SubA_HZWCDL 0x0016 +#define HC_SubA_HZWCTAGnum 0x0017 +#define HC_SubA_HZCYNum 0x0018 +#define HC_SubA_HZWCFire 0x0019 +/* HC_SubA_HZWBType + */ +#define HC_HZWBType_MASK 0x00800000 +#define HC_HZBiasedWB_MASK 0x00400000 +#define HC_HZONEasFF_MASK 0x00200000 +#define HC_HZOONEasFF_MASK 0x00100000 +#define HC_HZWBFM_MASK 0x00030000 +#define HC_HZWBLoc_MASK 0x0000c000 +#define HC_HZWBPit_MASK 0x00003fff +#define HC_HZWBFM_16 0x00000000 +#define HC_HZWBFM_32 0x00020000 +#define HC_HZWBFM_24 0x00030000 +#define HC_HZWBLoc_Local 0x00000000 +#define HC_HZWBLoc_SyS 0x00004000 +/* HC_SubA_HZWBend + */ +#define HC_HZWBend_MASK 0x00ffe000 +#define HC_HZBiasH_MASK 0x000000ff +#define HC_HZWBend_SHIFT 10 +/* HC_SubA_HZWTMD + */ +#define HC_HZWTMD_MASK 0x00070000 +#define HC_HEBEBias_MASK 0x00007f00 +#define HC_HZNF_MASK 0x000000ff +#define HC_HZWTMD_NeverPass 0x00000000 +#define HC_HZWTMD_LT 0x00010000 +#define HC_HZWTMD_EQ 0x00020000 +#define HC_HZWTMD_LE 0x00030000 +#define HC_HZWTMD_GT 0x00040000 +#define HC_HZWTMD_NE 0x00050000 +#define HC_HZWTMD_GE 0x00060000 +#define HC_HZWTMD_AllPass 0x00070000 +#define HC_HEBEBias_SHIFT 8 +/* HC_SubA_HZWCDL 0x0016 + */ +#define HC_HZWCDL_MASK 0x00ffffff +/* HC_SubA_HZWCTAGnum 0x0017 + */ +#define HC_HZWCTAGnum_MASK 0x00ff0000 +#define HC_HZWCTAGnum_SHIFT 16 +#define HC_HZWCDH_MASK 0x000000ff +#define HC_HZWCDH_SHIFT 0 +/* HC_SubA_HZCYNum 0x0018 + */ +#define HC_HZCYNum_MASK 0x00030000 +#define HC_HZCYNum_SHIFT 16 +#define HC_HZWCQWnum_MASK 0x00003fff +#define HC_HZWCQWnum_SHIFT 0 +/* HC_SubA_HZWCFire 0x0019 + */ +#define HC_ZWCFire_MASK 0x00010000 +#define HC_HZWCQWnumLast_MASK 0x00003fff +#define HC_HZWCQWnumLast_SHIFT 0 + +/* Stencil Setting + */ +#define HC_SubA_HSTREF 0x0023 +#define HC_SubA_HSTMD 0x0024 +/* HC_SubA_HSBFM + */ +#define HC_HSBFM_MASK 0x00030000 +#define HC_HSBLoc_MASK 0x0000c000 +#define HC_HSBPit_MASK 0x00003fff +/* HC_SubA_HSTREF + */ +#define HC_HSTREF_MASK 0x00ff0000 +#define HC_HSTOPMSK_MASK 0x0000ff00 +#define HC_HSTBMSK_MASK 0x000000ff +#define HC_HSTREF_SHIFT 16 +#define HC_HSTOPMSK_SHIFT 8 +/* HC_SubA_HSTMD + */ +#define HC_HSTMD_MASK 0x00070000 +#define HC_HSTOPSF_MASK 0x000001c0 +#define HC_HSTOPSPZF_MASK 0x00000038 +#define HC_HSTOPSPZP_MASK 0x00000007 +#define HC_HSTMD_NeverPass 0x00000000 +#define HC_HSTMD_LT 0x00010000 +#define HC_HSTMD_EQ 0x00020000 +#define HC_HSTMD_LE 0x00030000 +#define HC_HSTMD_GT 0x00040000 +#define HC_HSTMD_NE 0x00050000 +#define HC_HSTMD_GE 0x00060000 +#define HC_HSTMD_AllPass 0x00070000 +#define HC_HSTOPSF_KEEP 0x00000000 +#define HC_HSTOPSF_ZERO 0x00000040 +#define HC_HSTOPSF_REPLACE 0x00000080 +#define HC_HSTOPSF_INCRSAT 0x000000c0 +#define HC_HSTOPSF_DECRSAT 0x00000100 +#define HC_HSTOPSF_INVERT 0x00000140 +#define HC_HSTOPSF_INCR 0x00000180 +#define HC_HSTOPSF_DECR 0x000001c0 +#define HC_HSTOPSPZF_KEEP 0x00000000 +#define HC_HSTOPSPZF_ZERO 0x00000008 +#define HC_HSTOPSPZF_REPLACE 0x00000010 +#define HC_HSTOPSPZF_INCRSAT 0x00000018 +#define HC_HSTOPSPZF_DECRSAT 0x00000020 +#define HC_HSTOPSPZF_INVERT 0x00000028 +#define HC_HSTOPSPZF_INCR 0x00000030 +#define HC_HSTOPSPZF_DECR 0x00000038 +#define HC_HSTOPSPZP_KEEP 0x00000000 +#define HC_HSTOPSPZP_ZERO 0x00000001 +#define HC_HSTOPSPZP_REPLACE 0x00000002 +#define HC_HSTOPSPZP_INCRSAT 0x00000003 +#define HC_HSTOPSPZP_DECRSAT 0x00000004 +#define HC_HSTOPSPZP_INVERT 0x00000005 +#define HC_HSTOPSPZP_INCR 0x00000006 +#define HC_HSTOPSPZP_DECR 0x00000007 + +/* Alpha Setting + */ +#define HC_SubA_HABBasL 0x0030 +#define HC_SubA_HABBasH 0x0031 +#define HC_SubA_HABFM 0x0032 +#define HC_SubA_HATMD 0x0033 +#define HC_SubA_HABLCsat 0x0034 +#define HC_SubA_HABLCop 0x0035 +#define HC_SubA_HABLAsat 0x0036 +#define HC_SubA_HABLAop 0x0037 +#define HC_SubA_HABLRCa 0x0038 +#define HC_SubA_HABLRFCa 0x0039 +#define HC_SubA_HABLRCbias 0x003a +#define HC_SubA_HABLRCb 0x003b +#define HC_SubA_HABLRFCb 0x003c +#define HC_SubA_HABLRAa 0x003d +#define HC_SubA_HABLRAb 0x003e +/* HC_SubA_HABFM + */ +#define HC_HABFM_MASK 0x00030000 +#define HC_HABLoc_MASK 0x0000c000 +#define HC_HABPit_MASK 0x000007ff +/* HC_SubA_HATMD + */ +#define HC_HATMD_MASK 0x00000700 +#define HC_HATREF_MASK 0x000000ff +#define HC_HATMD_NeverPass 0x00000000 +#define HC_HATMD_LT 0x00000100 +#define HC_HATMD_EQ 0x00000200 +#define HC_HATMD_LE 0x00000300 +#define HC_HATMD_GT 0x00000400 +#define HC_HATMD_NE 0x00000500 +#define HC_HATMD_GE 0x00000600 +#define HC_HATMD_AllPass 0x00000700 +/* HC_SubA_HABLCsat + */ +#define HC_HABLCsat_MASK 0x00010000 +#define HC_HABLCa_MASK 0x0000fc00 +#define HC_HABLCa_C_MASK 0x0000c000 +#define HC_HABLCa_OPC_MASK 0x00003c00 +#define HC_HABLFCa_MASK 0x000003f0 +#define HC_HABLFCa_C_MASK 0x00000300 +#define HC_HABLFCa_OPC_MASK 0x000000f0 +#define HC_HABLCbias_MASK 0x0000000f +#define HC_HABLCbias_C_MASK 0x00000008 +#define HC_HABLCbias_OPC_MASK 0x00000007 +/*-- Define the input color. + */ +#define HC_XC_Csrc 0x00000000 +#define HC_XC_Cdst 0x00000001 +#define HC_XC_Asrc 0x00000002 +#define HC_XC_Adst 0x00000003 +#define HC_XC_Fog 0x00000004 +#define HC_XC_HABLRC 0x00000005 +#define HC_XC_minSrcDst 0x00000006 +#define HC_XC_maxSrcDst 0x00000007 +#define HC_XC_mimAsrcInvAdst 0x00000008 +#define HC_XC_OPC 0x00000000 +#define HC_XC_InvOPC 0x00000010 +#define HC_XC_OPCp5 0x00000020 +/*-- Define the input Alpha + */ +#define HC_XA_OPA 0x00000000 +#define HC_XA_InvOPA 0x00000010 +#define HC_XA_OPAp5 0x00000020 +#define HC_XA_0 0x00000000 +#define HC_XA_Asrc 0x00000001 +#define HC_XA_Adst 0x00000002 +#define HC_XA_Fog 0x00000003 +#define HC_XA_minAsrcFog 0x00000004 +#define HC_XA_minAsrcAdst 0x00000005 +#define HC_XA_maxAsrcFog 0x00000006 +#define HC_XA_maxAsrcAdst 0x00000007 +#define HC_XA_HABLRA 0x00000008 +#define HC_XA_minAsrcInvAdst 0x00000008 +#define HC_XA_HABLFRA 0x00000009 +/*-- + */ +#define HC_HABLCa_OPC (HC_XC_OPC << 10) +#define HC_HABLCa_InvOPC (HC_XC_InvOPC << 10) +#define HC_HABLCa_OPCp5 (HC_XC_OPCp5 << 10) +#define HC_HABLCa_Csrc (HC_XC_Csrc << 10) +#define HC_HABLCa_Cdst (HC_XC_Cdst << 10) +#define HC_HABLCa_Asrc (HC_XC_Asrc << 10) +#define HC_HABLCa_Adst (HC_XC_Adst << 10) +#define HC_HABLCa_Fog (HC_XC_Fog << 10) +#define HC_HABLCa_HABLRCa (HC_XC_HABLRC << 10) +#define HC_HABLCa_minSrcDst (HC_XC_minSrcDst << 10) +#define HC_HABLCa_maxSrcDst (HC_XC_maxSrcDst << 10) +#define HC_HABLFCa_OPC (HC_XC_OPC << 4) +#define HC_HABLFCa_InvOPC (HC_XC_InvOPC << 4) +#define HC_HABLFCa_OPCp5 (HC_XC_OPCp5 << 4) +#define HC_HABLFCa_Csrc (HC_XC_Csrc << 4) +#define HC_HABLFCa_Cdst (HC_XC_Cdst << 4) +#define HC_HABLFCa_Asrc (HC_XC_Asrc << 4) +#define HC_HABLFCa_Adst (HC_XC_Adst << 4) +#define HC_HABLFCa_Fog (HC_XC_Fog << 4) +#define HC_HABLFCa_HABLRCa (HC_XC_HABLRC << 4) +#define HC_HABLFCa_minSrcDst (HC_XC_minSrcDst << 4) +#define HC_HABLFCa_maxSrcDst (HC_XC_maxSrcDst << 4) +#define HC_HABLFCa_mimAsrcInvAdst (HC_XC_mimAsrcInvAdst << 4) +#define HC_HABLCbias_HABLRCbias 0x00000000 +#define HC_HABLCbias_Asrc 0x00000001 +#define HC_HABLCbias_Adst 0x00000002 +#define HC_HABLCbias_Fog 0x00000003 +#define HC_HABLCbias_Cin 0x00000004 +/* HC_SubA_HABLCop 0x0035 + */ +#define HC_HABLdot_MASK 0x00010000 +#define HC_HABLCop_MASK 0x00004000 +#define HC_HABLCb_MASK 0x00003f00 +#define HC_HABLCb_C_MASK 0x00003000 +#define HC_HABLCb_OPC_MASK 0x00000f00 +#define HC_HABLFCb_MASK 0x000000fc +#define HC_HABLFCb_C_MASK 0x000000c0 +#define HC_HABLFCb_OPC_MASK 0x0000003c +#define HC_HABLCshift_MASK 0x00000003 +#define HC_HABLCb_OPC (HC_XC_OPC << 8) +#define HC_HABLCb_InvOPC (HC_XC_InvOPC << 8) +#define HC_HABLCb_OPCp5 (HC_XC_OPCp5 << 8) +#define HC_HABLCb_Csrc (HC_XC_Csrc << 8) +#define HC_HABLCb_Cdst (HC_XC_Cdst << 8) +#define HC_HABLCb_Asrc (HC_XC_Asrc << 8) +#define HC_HABLCb_Adst (HC_XC_Adst << 8) +#define HC_HABLCb_Fog (HC_XC_Fog << 8) +#define HC_HABLCb_HABLRCa (HC_XC_HABLRC << 8) +#define HC_HABLCb_minSrcDst (HC_XC_minSrcDst << 8) +#define HC_HABLCb_maxSrcDst (HC_XC_maxSrcDst << 8) +#define HC_HABLFCb_OPC (HC_XC_OPC << 2) +#define HC_HABLFCb_InvOPC (HC_XC_InvOPC << 2) +#define HC_HABLFCb_OPCp5 (HC_XC_OPCp5 << 2) +#define HC_HABLFCb_Csrc (HC_XC_Csrc << 2) +#define HC_HABLFCb_Cdst (HC_XC_Cdst << 2) +#define HC_HABLFCb_Asrc (HC_XC_Asrc << 2) +#define HC_HABLFCb_Adst (HC_XC_Adst << 2) +#define HC_HABLFCb_Fog (HC_XC_Fog << 2) +#define HC_HABLFCb_HABLRCb (HC_XC_HABLRC << 2) +#define HC_HABLFCb_minSrcDst (HC_XC_minSrcDst << 2) +#define HC_HABLFCb_maxSrcDst (HC_XC_maxSrcDst << 2) +#define HC_HABLFCb_mimAsrcInvAdst (HC_XC_mimAsrcInvAdst << 2) +/* HC_SubA_HABLAsat 0x0036 + */ +#define HC_HABLAsat_MASK 0x00010000 +#define HC_HABLAa_MASK 0x0000fc00 +#define HC_HABLAa_A_MASK 0x0000c000 +#define HC_HABLAa_OPA_MASK 0x00003c00 +#define HC_HABLFAa_MASK 0x000003f0 +#define HC_HABLFAa_A_MASK 0x00000300 +#define HC_HABLFAa_OPA_MASK 0x000000f0 +#define HC_HABLAbias_MASK 0x0000000f +#define HC_HABLAbias_A_MASK 0x00000008 +#define HC_HABLAbias_OPA_MASK 0x00000007 +#define HC_HABLAa_OPA (HC_XA_OPA << 10) +#define HC_HABLAa_InvOPA (HC_XA_InvOPA << 10) +#define HC_HABLAa_OPAp5 (HC_XA_OPAp5 << 10) +#define HC_HABLAa_0 (HC_XA_0 << 10) +#define HC_HABLAa_Asrc (HC_XA_Asrc << 10) +#define HC_HABLAa_Adst (HC_XA_Adst << 10) +#define HC_HABLAa_Fog (HC_XA_Fog << 10) +#define HC_HABLAa_minAsrcFog (HC_XA_minAsrcFog << 10) +#define HC_HABLAa_minAsrcAdst (HC_XA_minAsrcAdst << 10) +#define HC_HABLAa_maxAsrcFog (HC_XA_maxAsrcFog << 10) +#define HC_HABLAa_maxAsrcAdst (HC_XA_maxAsrcAdst << 10) +#define HC_HABLAa_HABLRA (HC_XA_HABLRA << 10) +#define HC_HABLFAa_OPA (HC_XA_OPA << 4) +#define HC_HABLFAa_InvOPA (HC_XA_InvOPA << 4) +#define HC_HABLFAa_OPAp5 (HC_XA_OPAp5 << 4) +#define HC_HABLFAa_0 (HC_XA_0 << 4) +#define HC_HABLFAa_Asrc (HC_XA_Asrc << 4) +#define HC_HABLFAa_Adst (HC_XA_Adst << 4) +#define HC_HABLFAa_Fog (HC_XA_Fog << 4) +#define HC_HABLFAa_minAsrcFog (HC_XA_minAsrcFog << 4) +#define HC_HABLFAa_minAsrcAdst (HC_XA_minAsrcAdst << 4) +#define HC_HABLFAa_maxAsrcFog (HC_XA_maxAsrcFog << 4) +#define HC_HABLFAa_maxAsrcAdst (HC_XA_maxAsrcAdst << 4) +#define HC_HABLFAa_minAsrcInvAdst (HC_XA_minAsrcInvAdst << 4) +#define HC_HABLFAa_HABLFRA (HC_XA_HABLFRA << 4) +#define HC_HABLAbias_HABLRAbias 0x00000000 +#define HC_HABLAbias_Asrc 0x00000001 +#define HC_HABLAbias_Adst 0x00000002 +#define HC_HABLAbias_Fog 0x00000003 +#define HC_HABLAbias_Aaa 0x00000004 +/* HC_SubA_HABLAop 0x0037 + */ +#define HC_HABLAop_MASK 0x00004000 +#define HC_HABLAb_MASK 0x00003f00 +#define HC_HABLAb_OPA_MASK 0x00000f00 +#define HC_HABLFAb_MASK 0x000000fc +#define HC_HABLFAb_OPA_MASK 0x0000003c +#define HC_HABLAshift_MASK 0x00000003 +#define HC_HABLAb_OPA (HC_XA_OPA << 8) +#define HC_HABLAb_InvOPA (HC_XA_InvOPA << 8) +#define HC_HABLAb_OPAp5 (HC_XA_OPAp5 << 8) +#define HC_HABLAb_0 (HC_XA_0 << 8) +#define HC_HABLAb_Asrc (HC_XA_Asrc << 8) +#define HC_HABLAb_Adst (HC_XA_Adst << 8) +#define HC_HABLAb_Fog (HC_XA_Fog << 8) +#define HC_HABLAb_minAsrcFog (HC_XA_minAsrcFog << 8) +#define HC_HABLAb_minAsrcAdst (HC_XA_minAsrcAdst << 8) +#define HC_HABLAb_maxAsrcFog (HC_XA_maxAsrcFog << 8) +#define HC_HABLAb_maxAsrcAdst (HC_XA_maxAsrcAdst << 8) +#define HC_HABLAb_HABLRA (HC_XA_HABLRA << 8) +#define HC_HABLFAb_OPA (HC_XA_OPA << 2) +#define HC_HABLFAb_InvOPA (HC_XA_InvOPA << 2) +#define HC_HABLFAb_OPAp5 (HC_XA_OPAp5 << 2) +#define HC_HABLFAb_0 (HC_XA_0 << 2) +#define HC_HABLFAb_Asrc (HC_XA_Asrc << 2) +#define HC_HABLFAb_Adst (HC_XA_Adst << 2) +#define HC_HABLFAb_Fog (HC_XA_Fog << 2) +#define HC_HABLFAb_minAsrcFog (HC_XA_minAsrcFog << 2) +#define HC_HABLFAb_minAsrcAdst (HC_XA_minAsrcAdst << 2) +#define HC_HABLFAb_maxAsrcFog (HC_XA_maxAsrcFog << 2) +#define HC_HABLFAb_maxAsrcAdst (HC_XA_maxAsrcAdst << 2) +#define HC_HABLFAb_minAsrcInvAdst (HC_XA_minAsrcInvAdst << 2) +#define HC_HABLFAb_HABLFRA (HC_XA_HABLFRA << 2) +/* HC_SubA_HABLRAa 0x003d + */ +#define HC_HABLRAa_MASK 0x00ff0000 +#define HC_HABLRFAa_MASK 0x0000ff00 +#define HC_HABLRAbias_MASK 0x000000ff +#define HC_HABLRAa_SHIFT 16 +#define HC_HABLRFAa_SHIFT 8 +/* HC_SubA_HABLRAb 0x003e + */ +#define HC_HABLRAb_MASK 0x0000ff00 +#define HC_HABLRFAb_MASK 0x000000ff +#define HC_HABLRAb_SHIFT 8 + +/* Destination Setting + */ +#define HC_SubA_HDBBasL 0x0040 +#define HC_SubA_HDBBasH 0x0041 +#define HC_SubA_HDBFM 0x0042 +#define HC_SubA_HFBBMSKL 0x0043 +#define HC_SubA_HROP 0x0044 +/* HC_SubA_HDBFM 0x0042 + */ +#define HC_HDBFM_MASK 0x001f0000 +#define HC_HDBLoc_MASK 0x0000c000 +#define HC_HDBPit_MASK 0x00003fff +#define HC_HDBFM_RGB555 0x00000000 +#define HC_HDBFM_RGB565 0x00010000 +#define HC_HDBFM_ARGB4444 0x00020000 +#define HC_HDBFM_ARGB1555 0x00030000 +#define HC_HDBFM_BGR555 0x00040000 +#define HC_HDBFM_BGR565 0x00050000 +#define HC_HDBFM_ABGR4444 0x00060000 +#define HC_HDBFM_ABGR1555 0x00070000 +#define HC_HDBFM_ARGB0888 0x00080000 +#define HC_HDBFM_ARGB8888 0x00090000 +#define HC_HDBFM_ABGR0888 0x000a0000 +#define HC_HDBFM_ABGR8888 0x000b0000 +#define HC_HDBLoc_Local 0x00000000 +#define HC_HDBLoc_Sys 0x00004000 +/* HC_SubA_HROP 0x0044 + */ +#define HC_HROP_MASK 0x00000f00 +#define HC_HFBBMSKH_MASK 0x000000ff +#define HC_HROP_BLACK 0x00000000 +#define HC_HROP_DPon 0x00000100 +#define HC_HROP_DPna 0x00000200 +#define HC_HROP_Pn 0x00000300 +#define HC_HROP_PDna 0x00000400 +#define HC_HROP_Dn 0x00000500 +#define HC_HROP_DPx 0x00000600 +#define HC_HROP_DPan 0x00000700 +#define HC_HROP_DPa 0x00000800 +#define HC_HROP_DPxn 0x00000900 +#define HC_HROP_D 0x00000a00 +#define HC_HROP_DPno 0x00000b00 +#define HC_HROP_P 0x00000c00 +#define HC_HROP_PDno 0x00000d00 +#define HC_HROP_DPo 0x00000e00 +#define HC_HROP_WHITE 0x00000f00 + +/* Fog Setting + */ +#define HC_SubA_HFogLF 0x0050 +#define HC_SubA_HFogCL 0x0051 +#define HC_SubA_HFogCH 0x0052 +#define HC_SubA_HFogStL 0x0053 +#define HC_SubA_HFogStH 0x0054 +#define HC_SubA_HFogOOdMF 0x0055 +#define HC_SubA_HFogOOdEF 0x0056 +#define HC_SubA_HFogEndL 0x0057 +#define HC_SubA_HFogDenst 0x0058 +/* HC_SubA_FogLF 0x0050 + */ +#define HC_FogLF_MASK 0x00000010 +#define HC_FogEq_MASK 0x00000008 +#define HC_FogMD_MASK 0x00000007 +#define HC_FogMD_LocalFog 0x00000000 +#define HC_FogMD_LinearFog 0x00000002 +#define HC_FogMD_ExponentialFog 0x00000004 +#define HC_FogMD_Exponential2Fog 0x00000005 +/* #define HC_FogMD_FogTable 0x00000003 */ + +/* HC_SubA_HFogDenst 0x0058 + */ +#define HC_FogDenst_MASK 0x001fff00 +#define HC_FogEndL_MASK 0x000000ff + +/* Texture subtype definitions + */ +#define HC_SubType_Tex0 0x00000000 +#define HC_SubType_Tex1 0x00000001 +#define HC_SubType_TexGeneral 0x000000fe + +/* Attribute of texture n + */ +#define HC_SubA_HTXnL0BasL 0x0000 +#define HC_SubA_HTXnL1BasL 0x0001 +#define HC_SubA_HTXnL2BasL 0x0002 +#define HC_SubA_HTXnL3BasL 0x0003 +#define HC_SubA_HTXnL4BasL 0x0004 +#define HC_SubA_HTXnL5BasL 0x0005 +#define HC_SubA_HTXnL6BasL 0x0006 +#define HC_SubA_HTXnL7BasL 0x0007 +#define HC_SubA_HTXnL8BasL 0x0008 +#define HC_SubA_HTXnL9BasL 0x0009 +#define HC_SubA_HTXnLaBasL 0x000a +#define HC_SubA_HTXnLbBasL 0x000b +#define HC_SubA_HTXnLcBasL 0x000c +#define HC_SubA_HTXnLdBasL 0x000d +#define HC_SubA_HTXnLeBasL 0x000e +#define HC_SubA_HTXnLfBasL 0x000f +#define HC_SubA_HTXnL10BasL 0x0010 +#define HC_SubA_HTXnL11BasL 0x0011 +#define HC_SubA_HTXnL012BasH 0x0020 +#define HC_SubA_HTXnL345BasH 0x0021 +#define HC_SubA_HTXnL678BasH 0x0022 +#define HC_SubA_HTXnL9abBasH 0x0023 +#define HC_SubA_HTXnLcdeBasH 0x0024 +#define HC_SubA_HTXnLf1011BasH 0x0025 +#define HC_SubA_HTXnL0Pit 0x002b +#define HC_SubA_HTXnL1Pit 0x002c +#define HC_SubA_HTXnL2Pit 0x002d +#define HC_SubA_HTXnL3Pit 0x002e +#define HC_SubA_HTXnL4Pit 0x002f +#define HC_SubA_HTXnL5Pit 0x0030 +#define HC_SubA_HTXnL6Pit 0x0031 +#define HC_SubA_HTXnL7Pit 0x0032 +#define HC_SubA_HTXnL8Pit 0x0033 +#define HC_SubA_HTXnL9Pit 0x0034 +#define HC_SubA_HTXnLaPit 0x0035 +#define HC_SubA_HTXnLbPit 0x0036 +#define HC_SubA_HTXnLcPit 0x0037 +#define HC_SubA_HTXnLdPit 0x0038 +#define HC_SubA_HTXnLePit 0x0039 +#define HC_SubA_HTXnLfPit 0x003a +#define HC_SubA_HTXnL10Pit 0x003b +#define HC_SubA_HTXnL11Pit 0x003c +#define HC_SubA_HTXnL0_5WE 0x004b +#define HC_SubA_HTXnL6_bWE 0x004c +#define HC_SubA_HTXnLc_11WE 0x004d +#define HC_SubA_HTXnL0_5HE 0x0051 +#define HC_SubA_HTXnL6_bHE 0x0052 +#define HC_SubA_HTXnLc_11HE 0x0053 +#define HC_SubA_HTXnL0OS 0x0077 +#define HC_SubA_HTXnTB 0x0078 +#define HC_SubA_HTXnMPMD 0x0079 +#define HC_SubA_HTXnCLODu 0x007a +#define HC_SubA_HTXnFM 0x007b +#define HC_SubA_HTXnTRCH 0x007c +#define HC_SubA_HTXnTRCL 0x007d +#define HC_SubA_HTXnTBC 0x007e +#define HC_SubA_HTXnTRAH 0x007f +#define HC_SubA_HTXnTBLCsat 0x0080 +#define HC_SubA_HTXnTBLCop 0x0081 +#define HC_SubA_HTXnTBLMPfog 0x0082 +#define HC_SubA_HTXnTBLAsat 0x0083 +#define HC_SubA_HTXnTBLRCa 0x0085 +#define HC_SubA_HTXnTBLRCb 0x0086 +#define HC_SubA_HTXnTBLRCc 0x0087 +#define HC_SubA_HTXnTBLRCbias 0x0088 +#define HC_SubA_HTXnTBLRAa 0x0089 +#define HC_SubA_HTXnTBLRFog 0x008a +#define HC_SubA_HTXnBumpM00 0x0090 +#define HC_SubA_HTXnBumpM01 0x0091 +#define HC_SubA_HTXnBumpM10 0x0092 +#define HC_SubA_HTXnBumpM11 0x0093 +#define HC_SubA_HTXnLScale 0x0094 +#define HC_SubA_HTXSMD 0x0000 +/* HC_SubA_HTXnL012BasH 0x0020 + */ +#define HC_HTXnL0BasH_MASK 0x000000ff +#define HC_HTXnL1BasH_MASK 0x0000ff00 +#define HC_HTXnL2BasH_MASK 0x00ff0000 +#define HC_HTXnL1BasH_SHIFT 8 +#define HC_HTXnL2BasH_SHIFT 16 +/* HC_SubA_HTXnL345BasH 0x0021 + */ +#define HC_HTXnL3BasH_MASK 0x000000ff +#define HC_HTXnL4BasH_MASK 0x0000ff00 +#define HC_HTXnL5BasH_MASK 0x00ff0000 +#define HC_HTXnL4BasH_SHIFT 8 +#define HC_HTXnL5BasH_SHIFT 16 +/* HC_SubA_HTXnL678BasH 0x0022 + */ +#define HC_HTXnL6BasH_MASK 0x000000ff +#define HC_HTXnL7BasH_MASK 0x0000ff00 +#define HC_HTXnL8BasH_MASK 0x00ff0000 +#define HC_HTXnL7BasH_SHIFT 8 +#define HC_HTXnL8BasH_SHIFT 16 +/* HC_SubA_HTXnL9abBasH 0x0023 + */ +#define HC_HTXnL9BasH_MASK 0x000000ff +#define HC_HTXnLaBasH_MASK 0x0000ff00 +#define HC_HTXnLbBasH_MASK 0x00ff0000 +#define HC_HTXnLaBasH_SHIFT 8 +#define HC_HTXnLbBasH_SHIFT 16 +/* HC_SubA_HTXnLcdeBasH 0x0024 + */ +#define HC_HTXnLcBasH_MASK 0x000000ff +#define HC_HTXnLdBasH_MASK 0x0000ff00 +#define HC_HTXnLeBasH_MASK 0x00ff0000 +#define HC_HTXnLdBasH_SHIFT 8 +#define HC_HTXnLeBasH_SHIFT 16 +/* HC_SubA_HTXnLcdeBasH 0x0025 + */ +#define HC_HTXnLfBasH_MASK 0x000000ff +#define HC_HTXnL10BasH_MASK 0x0000ff00 +#define HC_HTXnL11BasH_MASK 0x00ff0000 +#define HC_HTXnL10BasH_SHIFT 8 +#define HC_HTXnL11BasH_SHIFT 16 +/* HC_SubA_HTXnL0Pit 0x002b + */ +#define HC_HTXnLnPit_MASK 0x00003fff +#define HC_HTXnEnPit_MASK 0x00080000 +#define HC_HTXnLnPitE_MASK 0x00f00000 +#define HC_HTXnLnPitE_SHIFT 20 +/* HC_SubA_HTXnL0_5WE 0x004b + */ +#define HC_HTXnL0WE_MASK 0x0000000f +#define HC_HTXnL1WE_MASK 0x000000f0 +#define HC_HTXnL2WE_MASK 0x00000f00 +#define HC_HTXnL3WE_MASK 0x0000f000 +#define HC_HTXnL4WE_MASK 0x000f0000 +#define HC_HTXnL5WE_MASK 0x00f00000 +#define HC_HTXnL1WE_SHIFT 4 +#define HC_HTXnL2WE_SHIFT 8 +#define HC_HTXnL3WE_SHIFT 12 +#define HC_HTXnL4WE_SHIFT 16 +#define HC_HTXnL5WE_SHIFT 20 +/* HC_SubA_HTXnL6_bWE 0x004c + */ +#define HC_HTXnL6WE_MASK 0x0000000f +#define HC_HTXnL7WE_MASK 0x000000f0 +#define HC_HTXnL8WE_MASK 0x00000f00 +#define HC_HTXnL9WE_MASK 0x0000f000 +#define HC_HTXnLaWE_MASK 0x000f0000 +#define HC_HTXnLbWE_MASK 0x00f00000 +#define HC_HTXnL7WE_SHIFT 4 +#define HC_HTXnL8WE_SHIFT 8 +#define HC_HTXnL9WE_SHIFT 12 +#define HC_HTXnLaWE_SHIFT 16 +#define HC_HTXnLbWE_SHIFT 20 +/* HC_SubA_HTXnLc_11WE 0x004d + */ +#define HC_HTXnLcWE_MASK 0x0000000f +#define HC_HTXnLdWE_MASK 0x000000f0 +#define HC_HTXnLeWE_MASK 0x00000f00 +#define HC_HTXnLfWE_MASK 0x0000f000 +#define HC_HTXnL10WE_MASK 0x000f0000 +#define HC_HTXnL11WE_MASK 0x00f00000 +#define HC_HTXnLdWE_SHIFT 4 +#define HC_HTXnLeWE_SHIFT 8 +#define HC_HTXnLfWE_SHIFT 12 +#define HC_HTXnL10WE_SHIFT 16 +#define HC_HTXnL11WE_SHIFT 20 +/* HC_SubA_HTXnL0_5HE 0x0051 + */ +#define HC_HTXnL0HE_MASK 0x0000000f +#define HC_HTXnL1HE_MASK 0x000000f0 +#define HC_HTXnL2HE_MASK 0x00000f00 +#define HC_HTXnL3HE_MASK 0x0000f000 +#define HC_HTXnL4HE_MASK 0x000f0000 +#define HC_HTXnL5HE_MASK 0x00f00000 +#define HC_HTXnL1HE_SHIFT 4 +#define HC_HTXnL2HE_SHIFT 8 +#define HC_HTXnL3HE_SHIFT 12 +#define HC_HTXnL4HE_SHIFT 16 +#define HC_HTXnL5HE_SHIFT 20 +/* HC_SubA_HTXnL6_bHE 0x0052 + */ +#define HC_HTXnL6HE_MASK 0x0000000f +#define HC_HTXnL7HE_MASK 0x000000f0 +#define HC_HTXnL8HE_MASK 0x00000f00 +#define HC_HTXnL9HE_MASK 0x0000f000 +#define HC_HTXnLaHE_MASK 0x000f0000 +#define HC_HTXnLbHE_MASK 0x00f00000 +#define HC_HTXnL7HE_SHIFT 4 +#define HC_HTXnL8HE_SHIFT 8 +#define HC_HTXnL9HE_SHIFT 12 +#define HC_HTXnLaHE_SHIFT 16 +#define HC_HTXnLbHE_SHIFT 20 +/* HC_SubA_HTXnLc_11HE 0x0053 + */ +#define HC_HTXnLcHE_MASK 0x0000000f +#define HC_HTXnLdHE_MASK 0x000000f0 +#define HC_HTXnLeHE_MASK 0x00000f00 +#define HC_HTXnLfHE_MASK 0x0000f000 +#define HC_HTXnL10HE_MASK 0x000f0000 +#define HC_HTXnL11HE_MASK 0x00f00000 +#define HC_HTXnLdHE_SHIFT 4 +#define HC_HTXnLeHE_SHIFT 8 +#define HC_HTXnLfHE_SHIFT 12 +#define HC_HTXnL10HE_SHIFT 16 +#define HC_HTXnL11HE_SHIFT 20 +/* HC_SubA_HTXnL0OS 0x0077 + */ +#define HC_HTXnL0OS_MASK 0x003ff000 +#define HC_HTXnLVmax_MASK 0x00000fc0 +#define HC_HTXnLVmin_MASK 0x0000003f +#define HC_HTXnL0OS_SHIFT 12 +#define HC_HTXnLVmax_SHIFT 6 +/* HC_SubA_HTXnTB 0x0078 + */ +#define HC_HTXnTB_MASK 0x00f00000 +#define HC_HTXnFLSe_MASK 0x0000e000 +#define HC_HTXnFLSs_MASK 0x00001c00 +#define HC_HTXnFLTe_MASK 0x00000380 +#define HC_HTXnFLTs_MASK 0x00000070 +#define HC_HTXnFLDs_MASK 0x0000000f +#define HC_HTXnTB_NoTB 0x00000000 +#define HC_HTXnTB_TBC_S 0x00100000 +#define HC_HTXnTB_TBC_T 0x00200000 +#define HC_HTXnTB_TB_S 0x00400000 +#define HC_HTXnTB_TB_T 0x00800000 +#define HC_HTXnFLSe_Nearest 0x00000000 +#define HC_HTXnFLSe_Linear 0x00002000 +#define HC_HTXnFLSe_NonLinear 0x00004000 +#define HC_HTXnFLSe_Sharp 0x00008000 +#define HC_HTXnFLSe_Flat_Gaussian_Cubic 0x0000c000 +#define HC_HTXnFLSs_Nearest 0x00000000 +#define HC_HTXnFLSs_Linear 0x00000400 +#define HC_HTXnFLSs_NonLinear 0x00000800 +#define HC_HTXnFLSs_Flat_Gaussian_Cubic 0x00001800 +#define HC_HTXnFLTe_Nearest 0x00000000 +#define HC_HTXnFLTe_Linear 0x00000080 +#define HC_HTXnFLTe_NonLinear 0x00000100 +#define HC_HTXnFLTe_Sharp 0x00000180 +#define HC_HTXnFLTe_Flat_Gaussian_Cubic 0x00000300 +#define HC_HTXnFLTs_Nearest 0x00000000 +#define HC_HTXnFLTs_Linear 0x00000010 +#define HC_HTXnFLTs_NonLinear 0x00000020 +#define HC_HTXnFLTs_Flat_Gaussian_Cubic 0x00000060 +#define HC_HTXnFLDs_Tex0 0x00000000 +#define HC_HTXnFLDs_Nearest 0x00000001 +#define HC_HTXnFLDs_Linear 0x00000002 +#define HC_HTXnFLDs_NonLinear 0x00000003 +#define HC_HTXnFLDs_Dither 0x00000004 +#define HC_HTXnFLDs_ConstLOD 0x00000005 +#define HC_HTXnFLDs_Ani 0x00000006 +#define HC_HTXnFLDs_AniDither 0x00000007 +/* HC_SubA_HTXnMPMD 0x0079 + */ +#define HC_HTXnMPMD_SMASK 0x00070000 +#define HC_HTXnMPMD_TMASK 0x00380000 +#define HC_HTXnLODDTf_MASK 0x00000007 +#define HC_HTXnXY2ST_MASK 0x00000008 +#define HC_HTXnMPMD_Tsingle 0x00000000 +#define HC_HTXnMPMD_Tclamp 0x00080000 +#define HC_HTXnMPMD_Trepeat 0x00100000 +#define HC_HTXnMPMD_Tmirror 0x00180000 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Jan 31 14:35:50 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 240321065695; Sun, 31 Jan 2010 14:35:50 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 129968FC1E; Sun, 31 Jan 2010 14:35:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0VEZnJO051763; Sun, 31 Jan 2010 14:35:49 GMT (envelope-from rnoland@svn.freebsd.org) Received: (from rnoland@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0VEZnxi051761; Sun, 31 Jan 2010 14:35:49 GMT (envelope-from rnoland@svn.freebsd.org) Message-Id: <201001311435.o0VEZnxi051761@svn.freebsd.org> From: Robert Noland Date: Sun, 31 Jan 2010 14:35:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203289 - head/sys/i386/i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 14:35:50 -0000 Author: rnoland Date: Sun Jan 31 14:35:49 2010 New Revision: 203289 URL: http://svn.freebsd.org/changeset/base/203289 Log: Enable MTRR on all VIA CPUs that claim support. This may not be entirely correct either, but the existing check is bogus. I have both a C3 and a C7 that fail this check, but work fine. MFC after: 2 weeks Modified: head/sys/i386/i386/i686_mem.c Modified: head/sys/i386/i386/i686_mem.c ============================================================================== --- head/sys/i386/i386/i686_mem.c Sun Jan 31 14:30:39 2010 (r203288) +++ head/sys/i386/i386/i686_mem.c Sun Jan 31 14:35:49 2010 (r203289) @@ -707,11 +707,8 @@ i686_mem_drvinit(void *unused) switch (cpu_vendor_id) { case CPU_VENDOR_INTEL: case CPU_VENDOR_AMD: - break; case CPU_VENDOR_CENTAUR: - if (cpu_exthigh >= 0x80000008) - break; - /* FALLTHROUGH */ + break; default: return; } From owner-svn-src-all@FreeBSD.ORG Sun Jan 31 14:51:05 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3B67E1065672; Sun, 31 Jan 2010 14:51:05 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 29C918FC14; Sun, 31 Jan 2010 14:51:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0VEp50B055102; Sun, 31 Jan 2010 14:51:05 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0VEp50a055100; Sun, 31 Jan 2010 14:51:05 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001311451.o0VEp50a055100@svn.freebsd.org> From: Ed Schouten Date: Sun, 31 Jan 2010 14:51:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203290 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 14:51:05 -0000 Author: ed Date: Sun Jan 31 14:51:04 2010 New Revision: 203290 URL: http://svn.freebsd.org/changeset/base/203290 Log: Perform some cleanups to devname(3). - Make sure the mode argument is either a character or a block device. - Use S_IS*() instead of checking S_IF*-flags by hand. - Don't use kern.devname when the argument is already NODEV. - Always call snprintf with the proper amount of arguments corresponding with the format. - Perform some whitespace fixes. Tabs instead of 4 spaces, missing space for return statement. - Remove unneeded includes. Modified: head/lib/libc/gen/devname.c Modified: head/lib/libc/gen/devname.c ============================================================================== --- head/lib/libc/gen/devname.c Sun Jan 31 14:35:49 2010 (r203289) +++ head/lib/libc/gen/devname.c Sun Jan 31 14:51:04 2010 (r203290) @@ -36,10 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include #include -#include #include #include #include @@ -49,22 +46,22 @@ devname_r(dev_t dev, mode_t type, char * { int i; size_t j; - char *r; - if ((type & S_IFMT) == S_IFCHR) { + if (dev == NODEV || !(S_ISCHR(type) || S_ISBLK(dev))) { + strlcpy(buf, "#NODEV", len); + return (buf); + } + + if (S_ISCHR(type)) { j = len; i = sysctlbyname("kern.devname", buf, &j, &dev, sizeof (dev)); if (i == 0) - return (buf); + return (buf); } /* Finally just format it */ - if (dev == NODEV) - r = "#NODEV"; - else - r = "#%c:%d:0x%x"; - snprintf(buf, len, r, - (type & S_IFMT) == S_IFCHR ? 'C' : 'B', major(dev), minor(dev)); + snprintf(buf, len, "#%c:%d:0x%x", + S_ISCHR(type) ? 'C' : 'B', major(dev), minor(dev)); return (buf); } @@ -73,5 +70,5 @@ devname(dev_t dev, mode_t type) { static char buf[SPECNAMELEN + 1]; - return(devname_r(dev, type, buf, sizeof(buf))); + return (devname_r(dev, type, buf, sizeof(buf))); } From owner-svn-src-all@FreeBSD.ORG Sun Jan 31 15:07:38 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AEDAC10656A4; Sun, 31 Jan 2010 15:07:38 +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 9CA888FC0A; Sun, 31 Jan 2010 15:07:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0VF7cEY058739; Sun, 31 Jan 2010 15:07:38 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0VF7cwK058737; Sun, 31 Jan 2010 15:07:38 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201001311507.o0VF7cwK058737@svn.freebsd.org> From: Jaakko Heinonen Date: Sun, 31 Jan 2010 15: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: r203291 - stable/8/bin/ls X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 15:07:38 -0000 Author: jh Date: Sun Jan 31 15:07:38 2010 New Revision: 203291 URL: http://svn.freebsd.org/changeset/base/203291 Log: MFC r202944: Print full path in the error message. It's possible that fts(3) provides an empty fts_name and reporting the full path is more appropriate especially with the -R option. PR: bin/107515 Approved by: trasz (mentor) Modified: stable/8/bin/ls/ls.c Directory Properties: stable/8/bin/ls/ (props changed) Modified: stable/8/bin/ls/ls.c ============================================================================== --- stable/8/bin/ls/ls.c Sun Jan 31 14:51:04 2010 (r203290) +++ stable/8/bin/ls/ls.c Sun Jan 31 15:07:38 2010 (r203291) @@ -508,7 +508,7 @@ traverse(int argc, char *argv[], int opt break; case FTS_DNR: case FTS_ERR: - warnx("%s: %s", p->fts_name, strerror(p->fts_errno)); + warnx("%s: %s", p->fts_path, strerror(p->fts_errno)); rval = 1; break; case FTS_D: From owner-svn-src-all@FreeBSD.ORG Sun Jan 31 15:19:16 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BDEB5106566B; Sun, 31 Jan 2010 15:19:16 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AC4D78FC08; Sun, 31 Jan 2010 15:19:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0VFJG1o061291; Sun, 31 Jan 2010 15:19:16 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0VFJGkx061289; Sun, 31 Jan 2010 15:19:16 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001311519.o0VFJGkx061289@svn.freebsd.org> From: Ed Schouten Date: Sun, 31 Jan 2010 15:19:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203292 - head/sys/fs/devfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 15:19:16 -0000 Author: ed Date: Sun Jan 31 15:19:16 2010 New Revision: 203292 URL: http://svn.freebsd.org/changeset/base/203292 Log: Properly use dev_refl()/dev_rel() in kern.devname. While there, perform some clean-up fixes. Update some stale comments on struct cdev * instead of dev_t and devfs_random(). Also add some missing whitespace. MFC after: 1 week Modified: head/sys/fs/devfs/devfs_devs.c Modified: head/sys/fs/devfs/devfs_devs.c ============================================================================== --- head/sys/fs/devfs/devfs_devs.c Sun Jan 31 15:07:38 2010 (r203291) +++ head/sys/fs/devfs/devfs_devs.c Sun Jan 31 15:19:16 2010 (r203292) @@ -72,8 +72,8 @@ SYSCTL_UINT(_vfs_devfs, OID_AUTO, rule_d &devfs_rule_depth, 0, "Max depth of ruleset include"); /* - * Helper sysctl for devname(3). We're given a struct cdev * and return - * the name, if any, registered by the device driver. + * Helper sysctl for devname(3). We're given a dev_t and return the + * name, if any, registered by the device driver. */ static int sysctl_devname(SYSCTL_HANDLER_ARGS) @@ -81,23 +81,26 @@ sysctl_devname(SYSCTL_HANDLER_ARGS) int error; dev_t ud; struct cdev_priv *cdp; + struct cdev *dev; error = SYSCTL_IN(req, &ud, sizeof (ud)); if (error) return (error); if (ud == NODEV) - return(EINVAL); -/* - ud ^ devfs_random(); -*/ + return (EINVAL); + dev = NULL; dev_lock(); TAILQ_FOREACH(cdp, &cdevp_list, cdp_list) - if (cdp->cdp_inode == ud) + if (cdp->cdp_inode == ud) { + dev = &cdp->cdp_c; + dev_refl(dev); break; + } dev_unlock(); - if (cdp == NULL) - return(ENOENT); - return(SYSCTL_OUT(req, cdp->cdp_c.si_name, strlen(cdp->cdp_c.si_name) + 1)); + if (dev == NULL) + return (ENOENT); + error = SYSCTL_OUT(req, dev->si_name, strlen(dev->si_name) + 1); + dev_rel(dev); return (error); } From owner-svn-src-all@FreeBSD.ORG Sun Jan 31 17:17:25 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 35669106566C; Sun, 31 Jan 2010 17:17:25 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0A24B8FC21; Sun, 31 Jan 2010 17:17:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0VHHO6P087373; Sun, 31 Jan 2010 17:17:24 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0VHHOWM087371; Sun, 31 Jan 2010 17:17:24 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001311717.o0VHHOWM087371@svn.freebsd.org> From: Marius Strobl Date: Sun, 31 Jan 2010 17:17:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203295 - stable/8/sys/sparc64/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 17:17:25 -0000 Author: marius Date: Sun Jan 31 17:17:24 2010 New Revision: 203295 URL: http://svn.freebsd.org/changeset/base/203295 Log: MFC: r203094 - Zero the MSI/MSI-X queue argument, otherwise mtx_init(9) can panic indicating an already initialized lock. - Check for an empty MSI/MSI-X queue entry before asserting that we have received a MSI/MSI-X message in order to not panic in case of stray MSI/ MSI-X queue interrupts which may happen in case of using an interrupt handler rather than a filter. Modified: stable/8/sys/sparc64/pci/fire.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/sparc64/pci/fire.c ============================================================================== --- stable/8/sys/sparc64/pci/fire.c Sun Jan 31 16:04:23 2010 (r203294) +++ stable/8/sys/sparc64/pci/fire.c Sun Jan 31 17:17:24 2010 (r203295) @@ -852,7 +852,7 @@ fire_intr_register(struct fire_softc *sc return (ENXIO); fica = malloc((ino >= FO_EQ_FIRST_INO && ino <= FO_EQ_LAST_INO) ? sizeof(struct fire_msiqarg) : sizeof(struct fire_icarg), M_DEVBUF, - M_NOWAIT); + M_NOWAIT | M_ZERO); if (fica == NULL) return (ENOMEM); fica->fica_sc = sc; @@ -1838,13 +1838,13 @@ fire_msiq_common(struct intr_vector *iv, qrec = &fmqa->fmqa_base[head]; word0 = qrec->fomqr_word0; for (;;) { + if (__predict_false((word0 & FO_MQR_WORD0_FMT_TYPE_MASK) == 0)) + break; KASSERT((word0 & FO_MQR_WORD0_FMT_TYPE_MSI64) != 0 || (word0 & FO_MQR_WORD0_FMT_TYPE_MSI32) != 0, ("%s: received non-MSI/MSI-X message in event queue %d " "(word0 %#llx)", device_get_nameunit(dev), msiq, (unsigned long long)word0)); - if (__predict_false((word0 & FO_MQR_WORD0_FMT_TYPE_MASK) == 0)) - break; msi = (word0 & FO_MQR_WORD0_DATA0_MASK) >> FO_MQR_WORD0_DATA0_SHFT; /* From owner-svn-src-all@FreeBSD.ORG Sun Jan 31 17:43:22 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8EB1510656A4; Sun, 31 Jan 2010 17:43:22 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7CC248FC17; Sun, 31 Jan 2010 17:43:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0VHhMRj093097; Sun, 31 Jan 2010 17:43:22 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0VHhMno093094; Sun, 31 Jan 2010 17:43:22 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001311743.o0VHhMno093094@svn.freebsd.org> From: Marius Strobl Date: Sun, 31 Jan 2010 17:43: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: r203296 - stable/8/sys/fs/cd9660 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 17:43:22 -0000 Author: marius Date: Sun Jan 31 17:43:22 2010 New Revision: 203296 URL: http://svn.freebsd.org/changeset/base/203296 Log: MFC: r202903 On LP64 struct ifid is 64-bit aligned while struct fid is 32-bit aligned so on architectures with strict alignment requirements we can't just simply cast the latter to the former but need to copy it bytewise instead. PR: 143010 Modified: stable/8/sys/fs/cd9660/cd9660_vfsops.c stable/8/sys/fs/cd9660/cd9660_vnops.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/fs/cd9660/cd9660_vfsops.c ============================================================================== --- stable/8/sys/fs/cd9660/cd9660_vfsops.c Sun Jan 31 17:17:24 2010 (r203295) +++ stable/8/sys/fs/cd9660/cd9660_vfsops.c Sun Jan 31 17:43:22 2010 (r203296) @@ -589,17 +589,19 @@ cd9660_fhtovp(mp, fhp, vpp) struct fid *fhp; struct vnode **vpp; { - struct ifid *ifhp = (struct ifid *)fhp; + struct ifid ifh; struct iso_node *ip; struct vnode *nvp; int error; + memcpy(&ifh, fhp, sizeof(ifh)); + #ifdef ISOFS_DBG printf("fhtovp: ino %d, start %ld\n", - ifhp->ifid_ino, ifhp->ifid_start); + ifh.ifid_ino, ifh.ifid_start); #endif - if ((error = VFS_VGET(mp, ifhp->ifid_ino, LK_EXCLUSIVE, &nvp)) != 0) { + if ((error = VFS_VGET(mp, ifh.ifid_ino, LK_EXCLUSIVE, &nvp)) != 0) { *vpp = NULLVP; return (error); } Modified: stable/8/sys/fs/cd9660/cd9660_vnops.c ============================================================================== --- stable/8/sys/fs/cd9660/cd9660_vnops.c Sun Jan 31 17:17:24 2010 (r203295) +++ stable/8/sys/fs/cd9660/cd9660_vnops.c Sun Jan 31 17:43:22 2010 (r203296) @@ -819,20 +819,25 @@ cd9660_vptofh(ap) struct fid *a_fhp; } */ *ap; { + struct ifid ifh; struct iso_node *ip = VTOI(ap->a_vp); - struct ifid *ifhp; - ifhp = (struct ifid *)ap->a_fhp; - ifhp->ifid_len = sizeof(struct ifid); + ifh.ifid_len = sizeof(struct ifid); - ifhp->ifid_ino = ip->i_number; - ifhp->ifid_start = ip->iso_start; + ifh.ifid_ino = ip->i_number; + ifh.ifid_start = ip->iso_start; + /* + * This intentionally uses sizeof(ifh) in order to not copy stack + * garbage on ILP32. + */ + memcpy(ap->a_fhp, &ifh, sizeof(ifh)); #ifdef ISOFS_DBG printf("vptofh: ino %d, start %ld\n", - ifhp->ifid_ino,ifhp->ifid_start); + ifh.ifid_ino, ifh.ifid_start); #endif - return 0; + + return (0); } /* From owner-svn-src-all@FreeBSD.ORG Sun Jan 31 18:25:57 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 707851065672; Sun, 31 Jan 2010 18:25:57 +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 5E6BF8FC08; Sun, 31 Jan 2010 18:25:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0VIPvRo002604; Sun, 31 Jan 2010 18:25:57 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0VIPvBh002601; Sun, 31 Jan 2010 18:25:57 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201001311825.o0VIPvBh002601@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 31 Jan 2010 18:25:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203297 - in stable/8/sys: kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 18:25:57 -0000 Author: kib Date: Sun Jan 31 18:25:57 2010 New Revision: 203297 URL: http://svn.freebsd.org/changeset/base/203297 Log: MFC r202881: Staticise sigqueue manipulation functions used only in kern_sig.c. Modified: stable/8/sys/kern/kern_sig.c stable/8/sys/sys/signalvar.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/kern/kern_sig.c ============================================================================== --- stable/8/sys/kern/kern_sig.c Sun Jan 31 17:43:22 2010 (r203296) +++ stable/8/sys/kern/kern_sig.c Sun Jan 31 18:25:57 2010 (r203297) @@ -275,7 +275,7 @@ sigqueue_init(sigqueue_t *list, struct p * 0 - signal not found * others - signal number */ -int +static int sigqueue_get(sigqueue_t *sq, int signo, ksiginfo_t *si) { struct proc *p = sq->sq_proc; @@ -337,7 +337,7 @@ sigqueue_take(ksiginfo_t *ksi) SIGDELSET(sq->sq_signals, ksi->ksi_signo); } -int +static int sigqueue_add(sigqueue_t *sq, int signo, ksiginfo_t *si) { struct proc *p = sq->sq_proc; @@ -422,7 +422,7 @@ sigqueue_flush(sigqueue_t *sq) SIGEMPTYSET(sq->sq_kill); } -void +static void sigqueue_collect_set(sigqueue_t *sq, sigset_t *set) { ksiginfo_t *ksi; @@ -434,7 +434,7 @@ sigqueue_collect_set(sigqueue_t *sq, sig SIGSETOR(*set, sq->sq_kill); } -void +static void sigqueue_move_set(sigqueue_t *src, sigqueue_t *dst, sigset_t *setp) { sigset_t tmp, set; @@ -478,7 +478,7 @@ sigqueue_move_set(sigqueue_t *src, sigqu sigqueue_collect_set(src, &src->sq_signals); } -void +static void sigqueue_move(sigqueue_t *src, sigqueue_t *dst, int signo) { sigset_t set; @@ -488,7 +488,7 @@ sigqueue_move(sigqueue_t *src, sigqueue_ sigqueue_move_set(src, dst, &set); } -void +static void sigqueue_delete_set(sigqueue_t *sq, sigset_t *set) { struct proc *p = sq->sq_proc; @@ -522,7 +522,7 @@ sigqueue_delete(sigqueue_t *sq, int sign } /* Remove a set of signals for a process */ -void +static void sigqueue_delete_set_proc(struct proc *p, sigset_t *set) { sigqueue_t worklist; @@ -549,7 +549,7 @@ sigqueue_delete_proc(struct proc *p, int sigqueue_delete_set_proc(p, &set); } -void +static void sigqueue_delete_stopmask_proc(struct proc *p) { sigset_t set; Modified: stable/8/sys/sys/signalvar.h ============================================================================== --- stable/8/sys/sys/signalvar.h Sun Jan 31 17:43:22 2010 (r203296) +++ stable/8/sys/sys/signalvar.h Sun Jan 31 18:25:57 2010 (r203297) @@ -355,18 +355,10 @@ void ksiginfo_free(ksiginfo_t *); void sigqueue_init(struct sigqueue *queue, struct proc *p); void sigqueue_flush(struct sigqueue *queue); void sigqueue_delete_proc(struct proc *p, int sig); -void sigqueue_delete_set(struct sigqueue *queue, sigset_t *set); void sigqueue_delete(struct sigqueue *queue, int sig); -void sigqueue_move_set(struct sigqueue *src, sigqueue_t *dst, sigset_t *); -int sigqueue_get(struct sigqueue *queue, int sig, ksiginfo_t *info); -int sigqueue_add(struct sigqueue *queue, int sig, ksiginfo_t *info); -void sigqueue_collect_set(struct sigqueue *queue, sigset_t *set); -void sigqueue_move(struct sigqueue *, struct sigqueue *, int sig); -void sigqueue_delete_set_proc(struct proc *, sigset_t *); -void sigqueue_delete_stopmask_proc(struct proc *); void sigqueue_take(ksiginfo_t *ksi); int kern_sigtimedwait(struct thread *, sigset_t, - ksiginfo_t *, struct timespec *); + ksiginfo_t *, struct timespec *); int kern_sigprocmask(struct thread *td, int how, sigset_t *set, sigset_t *oset, int flags); /* From owner-svn-src-all@FreeBSD.ORG Sun Jan 31 18:38:04 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 441A71065693; Sun, 31 Jan 2010 18:38:04 +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 30D3F8FC1A; Sun, 31 Jan 2010 18:38:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0VIc4ue005309; Sun, 31 Jan 2010 18:38:04 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0VIc3PC005301; Sun, 31 Jan 2010 18:38:04 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201001311838.o0VIc3PC005301@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 31 Jan 2010 18:38: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: r203298 - in stable/8: include lib/libc/compat-43 sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 18:38:04 -0000 Author: kib Date: Sun Jan 31 18:38:03 2010 New Revision: 203298 URL: http://svn.freebsd.org/changeset/base/203298 Log: MFC r199827: Implement sighold, sigignore, sigpause, sigrelse, sigset functions. MFC r200881 (by cognet): Don't name parameters. Modified: stable/8/include/signal.h stable/8/lib/libc/compat-43/Makefile.inc stable/8/lib/libc/compat-43/Symbol.map stable/8/lib/libc/compat-43/sigcompat.c stable/8/lib/libc/compat-43/sigpause.2 stable/8/sys/sys/signal.h stable/8/sys/sys/signalvar.h Directory Properties: stable/8/include/ (props changed) stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/include/signal.h ============================================================================== --- stable/8/include/signal.h Sun Jan 31 18:25:57 2010 (r203297) +++ stable/8/include/signal.h Sun Jan 31 18:38:03 2010 (r203298) @@ -99,7 +99,12 @@ int sigwaitinfo(const sigset_t * __restr #if __XSI_VISIBLE int killpg(__pid_t, int); int sigaltstack(const stack_t * __restrict, stack_t * __restrict); +int sighold(int); +int sigignore(int); int sigpause(int); +int sigrelse(int); +void (*sigset(int, void (*)(int)))(int); +int xsi_sigpause(int); #endif #if __XSI_VISIBLE >= 600 Modified: stable/8/lib/libc/compat-43/Makefile.inc ============================================================================== --- stable/8/lib/libc/compat-43/Makefile.inc Sun Jan 31 18:25:57 2010 (r203297) +++ stable/8/lib/libc/compat-43/Makefile.inc Sun Jan 31 18:38:03 2010 (r203298) @@ -13,6 +13,11 @@ MAN+= creat.2 killpg.2 sigpause.2 sigset MAN+= gethostid.3 setruid.3 MLINKS+=gethostid.3 sethostid.3 +MLINKS+=sigpause.2 sighold.2 +MLINKS+=sigpause.2 sigignore.2 +MLINKS+=sigpause.2 sigrelse.2 +MLINKS+=sigpause.2 sigset.2 +MLINKS+=sigpause.2 xsi_sigpause.2 MLINKS+=setruid.3 setrgid.3 MLINKS+=sigsetmask.2 sigblock.2 Modified: stable/8/lib/libc/compat-43/Symbol.map ============================================================================== --- stable/8/lib/libc/compat-43/Symbol.map Sun Jan 31 18:25:57 2010 (r203297) +++ stable/8/lib/libc/compat-43/Symbol.map Sun Jan 31 18:38:03 2010 (r203298) @@ -17,6 +17,14 @@ FBSD_1.0 { sigvec; }; +FBSD_1.2 { + sighold; + sigignore; + sigrelse; + sigset; + xsi_sigpause; +}; + FBSDprivate_1.0 { __creat; _creat; Modified: stable/8/lib/libc/compat-43/sigcompat.c ============================================================================== --- stable/8/lib/libc/compat-43/sigcompat.c Sun Jan 31 18:25:57 2010 (r203297) +++ stable/8/lib/libc/compat-43/sigcompat.c Sun Jan 31 18:38:03 2010 (r203298) @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include "namespace.h" #include #include +#include #include "un-namespace.h" #include "libc_private.h" @@ -97,8 +98,7 @@ sigblock(mask) } int -sigpause(mask) - int mask; +sigpause(int mask) { sigset_t set; @@ -106,3 +106,84 @@ sigpause(mask) set.__bits[0] = mask; return (_sigsuspend(&set)); } + +int +xsi_sigpause(int sig) +{ + sigset_t set; + + sigemptyset(&set); + sigaddset(&set, sig); + return (_sigsuspend(&set)); +} + +int +sighold(int sig) +{ + sigset_t set; + + sigemptyset(&set); + sigaddset(&set, sig); + return (_sigprocmask(SIG_BLOCK, &set, NULL)); +} + +int +sigignore(int sig) +{ + struct sigaction sa; + + bzero(&sa, sizeof(sa)); + sa.sa_handler = SIG_IGN; + return (_sigaction(sig, &sa, NULL)); +} + +int +sigrelse(int sig) +{ + sigset_t set; + + sigemptyset(&set); + sigaddset(&set, sig); + return (_sigprocmask(SIG_UNBLOCK, &set, NULL)); +} + +void +(*sigset(int sig, void (*disp)(int)))(int) +{ + sigset_t set, pset; + struct sigaction sa, psa; + int error; + + sigemptyset(&set); + sigaddset(&set, sig); + error = _sigprocmask(SIG_BLOCK, NULL, &pset); + if (error == -1) + return (SIG_ERR); + if ((__sighandler_t *)disp == SIG_HOLD) { + error = _sigprocmask(SIG_BLOCK, &set, &pset); + if (error == -1) + return (SIG_ERR); + if (sigismember(&pset, sig)) + return (SIG_HOLD); + else { + error = _sigaction(sig, NULL, &psa); + if (error == -1) + return (SIG_ERR); + return (psa.sa_handler); + } + } else { + error = _sigprocmask(SIG_UNBLOCK, &set, &pset); + if (error == -1) + return (SIG_ERR); + } + + bzero(&sa, sizeof(sa)); + sa.sa_handler = disp; + error = _sigaction(sig, &sa, &psa); + if (error == -1) + return (SIG_ERR); + if (sigismember(&pset, sig)) + return (SIG_HOLD); + else + return (psa.sa_handler); +} Modified: stable/8/lib/libc/compat-43/sigpause.2 ============================================================================== --- stable/8/lib/libc/compat-43/sigpause.2 Sun Jan 31 18:25:57 2010 (r203297) +++ stable/8/lib/libc/compat-43/sigpause.2 Sun Jan 31 18:38:03 2010 (r203298) @@ -28,21 +28,118 @@ .\" @(#)sigpause.2 8.1 (Berkeley) 6/2/93 .\" $FreeBSD$ .\" +.\" Part of the content of the man page was derived from +.\" The Open Group Base Specifications Issue 7 +.\" IEEE Std 1003.1-2008 +.\" .Dd June 2, 1993 .Dt SIGPAUSE 2 .Os .Sh NAME -.Nm sigpause -.Nd atomically release blocked signals and wait for interrupt +.Nm sighold , +.Nm sigignore , +.Nm sigpause , +.Nm sigrelse , +.Nm sigset +.Nd legacy interface for signal management .Sh LIBRARY .Lb libc .Sh SYNOPSIS .In signal.h .Ft int +.Fn sighold "int sig" +.Ft int +.Fn sigignore "int sig" +.Ft int +.Fn xsi_sigpause "int sigmask" +.Ft int +.Fn sigrelse "int sig" +.Ft void (*)(int) +.Fn sigset "int" "void (*disp)(int)" +.Ft int .Fn sigpause "int sigmask" .Sh DESCRIPTION .Sy This interface is made obsolete by -.Xr sigsuspend 2 . +.Xr sigsuspend 2 +.Sy and +.Xr sigaction 2 +.Pp +The +.Fn sigset +function modifies signal dispositions. +The +.Fa sig +argument specifies the signal, which may be any signal except +.Dv SIGKILL +and +.Dv SIGSTOP . +The +.Fa disp +argument specifies the signal's disposition, +which may be +.Dv SIG_DFL , +.Dv SIG_IGN , +or the address of a signal handler. +If +.Fn sigset +is used, and +.Fa disp +is the address of a signal handler, the +system adds +.Fa sig +to the signal mask of the calling process before executing the signal +handler; when the signal handler returns, the system restores the +signal mask of the calling process to its state prior to the delivery +of the signal. +In addition, if +.Fn sigset +is used, and +.Fa disp +is equal to +.Dv SIG_HOLD , +.Fa sig +is added to the signal +mask of the calling process and +.Fa sig 's +disposition remains unchanged. +If +.Fn sigset +is used, and +.Fa disp +is not equal to +.Dv SIG_HOLD , +.Fa sig +is removed from the signal mask of the calling process. +.Pp +The +.Fn sighold +function adds +.Fa sig +to the signal mask of the calling process. +.Pp +The +.Fn sigrelse +function removes +.Fa sig +from the signal mask of the calling process. +.Pp +The +.Fn sigignore +function sets the disposition of +.Fa sig +to +.Dv SIG_IGN . +.Pp +The +.Fn xsi_sigpause +function removes +.Fa sig +from the signal mask of the calling process and suspend the calling process +until a signal is received. +The +.Fn xsi_sigpause +function restores the signal mask of the process to its original state before +returning. .Pp The .Fn sigpause @@ -57,13 +154,47 @@ The argument is usually 0 to indicate that no signals are to be blocked. +.Sh RETURN VALUES The .Fn sigpause -function -always terminates by being interrupted, returning -1 with +and +.Fn xsi_sigpause +functions +always terminate by being interrupted, returning -1 with .Va errno set to -.Er EINTR +.Er EINTR . +.Pp +Upon successful completion, +.Fn sigset +returns +.Dv SIG_HOLD +if the signal had been blocked and the signal's previous disposition if +it had not been blocked. +Otherwise, +.Dv SIG_ERR is returned and +.Va errno +set to indicate the error. +.Pp +For all other functions, upon successful completion, 0 is returned. +Otherwise, -1 is returned and +.Va errno +is set to indicate the error: +.Bl -tag -width Er +.It Bq Er EINVAL +The +.Fa sig +argument +is not a valid signal number. +.It Bq Er EINVAL +For +.Fn sigset +and +.Fn sigignore +functions, an attempt was made to catch or ignore +.Dv SIGKILL +or +.Dv SIGSTOP . .Sh SEE ALSO .Xr kill 2 , .Xr sigaction 2 , @@ -85,9 +216,26 @@ and was copied from there into the .Pq Tn XSI option of .St -p1003.1-2001 . +.Fx +implements it under the name +.Fn xsi_sigpause . +The +.Fn sighold , +.Fn sigignore , +.Fn sigrelse +and +.Fn sigset +functions are implemented for compatibility with +.Sy System V +and +.Sy XSI +interfaces. .Sh HISTORY The .Fn sigpause function appeared in .Bx 4.2 and has been deprecated. +All other functions appeared in +.Fx 9.0 +and were deprecated before being implemented. Modified: stable/8/sys/sys/signal.h ============================================================================== --- stable/8/sys/sys/signal.h Sun Jan 31 18:25:57 2010 (r203297) +++ stable/8/sys/sys/signal.h Sun Jan 31 18:38:03 2010 (r203298) @@ -119,9 +119,8 @@ #define SIG_DFL ((__sighandler_t *)0) #define SIG_IGN ((__sighandler_t *)1) #define SIG_ERR ((__sighandler_t *)-1) -/* - * XXX missing SIG_HOLD. - */ +/* #define SIG_CATCH ((__sighandler_t *)2) See signalvar.h */ +#define SIG_HOLD ((__sighandler_t *)3) /*- * Type of a signal handling function. Modified: stable/8/sys/sys/signalvar.h ============================================================================== --- stable/8/sys/sys/signalvar.h Sun Jan 31 18:25:57 2010 (r203297) +++ stable/8/sys/sys/signalvar.h Sun Jan 31 18:38:03 2010 (r203298) @@ -97,7 +97,7 @@ typedef void __osiginfohandler_t(int, os /* additional signal action values, used only temporarily/internally */ #define SIG_CATCH ((__sighandler_t *)2) -#define SIG_HOLD ((__sighandler_t *)3) +/* #define SIG_HOLD ((__sighandler_t *)3) See signal.h */ /* * get signal action for process and signal; currently only for current process From owner-svn-src-all@FreeBSD.ORG Sun Jan 31 18:41:00 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D9F531065694; Sun, 31 Jan 2010 18:41:00 +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 C91E38FC12; Sun, 31 Jan 2010 18:41:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0VIf0Rk005998; Sun, 31 Jan 2010 18:41:00 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0VIf0mM005996; Sun, 31 Jan 2010 18:41:00 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201001311841.o0VIf0mM005996@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 31 Jan 2010 18:41: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: r203299 - stable/8/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 18:41:01 -0000 Author: kib Date: Sun Jan 31 18:41:00 2010 New Revision: 203299 URL: http://svn.freebsd.org/changeset/base/203299 Log: Bump __FreeBSD_version for sigpause(3) addition. Modified: stable/8/sys/sys/param.h Modified: stable/8/sys/sys/param.h ============================================================================== --- stable/8/sys/sys/param.h Sun Jan 31 18:38:03 2010 (r203298) +++ stable/8/sys/sys/param.h Sun Jan 31 18:41:00 2010 (r203299) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 800501 /* Master, propagated to newvers */ +#define __FreeBSD_version 800502 /* Master, propagated to newvers */ #ifndef LOCORE #include From owner-svn-src-all@FreeBSD.ORG Sun Jan 31 18:59:03 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E9B48106566B; Sun, 31 Jan 2010 18:59:03 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D43588FC1A; Sun, 31 Jan 2010 18:59:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0VIx314010095; Sun, 31 Jan 2010 18:59:03 GMT (envelope-from gshapiro@svn.freebsd.org) Received: (from gshapiro@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0VIx3tA010076; Sun, 31 Jan 2010 18:59:03 GMT (envelope-from gshapiro@svn.freebsd.org) Message-Id: <201001311859.o0VIx3tA010076@svn.freebsd.org> From: Gregory Neil Shapiro Date: Sun, 31 Jan 2010 18:59: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: r203300 - in stable/8/contrib/sendmail: . cf cf/cf cf/feature cf/m4 contrib doc/op include/libmilter include/sm libmilter libmilter/docs libsm libsmdb libsmutil praliases src vacation X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 18:59:04 -0000 Author: gshapiro Date: Sun Jan 31 18:59:03 2010 New Revision: 203300 URL: http://svn.freebsd.org/changeset/base/203300 Log: MFC: Merge sendmail 8.14.4 Modified: stable/8/contrib/sendmail/CACerts stable/8/contrib/sendmail/LICENSE stable/8/contrib/sendmail/PGPKEYS stable/8/contrib/sendmail/README stable/8/contrib/sendmail/RELEASE_NOTES stable/8/contrib/sendmail/cf/README stable/8/contrib/sendmail/cf/cf/submit.cf stable/8/contrib/sendmail/cf/feature/ldap_routing.m4 stable/8/contrib/sendmail/cf/m4/cfhead.m4 stable/8/contrib/sendmail/cf/m4/proto.m4 stable/8/contrib/sendmail/cf/m4/version.m4 stable/8/contrib/sendmail/contrib/qtool.pl stable/8/contrib/sendmail/contrib/smcontrol.pl stable/8/contrib/sendmail/doc/op/op.me stable/8/contrib/sendmail/include/libmilter/mfapi.h stable/8/contrib/sendmail/include/libmilter/mfdef.h stable/8/contrib/sendmail/include/sm/conf.h stable/8/contrib/sendmail/include/sm/ldap.h stable/8/contrib/sendmail/include/sm/sem.h stable/8/contrib/sendmail/libmilter/Makefile.m4 stable/8/contrib/sendmail/libmilter/comm.c stable/8/contrib/sendmail/libmilter/docs/api.html stable/8/contrib/sendmail/libmilter/docs/overview.html stable/8/contrib/sendmail/libmilter/docs/smfi_addheader.html stable/8/contrib/sendmail/libmilter/docs/smfi_chgheader.html stable/8/contrib/sendmail/libmilter/docs/smfi_insheader.html stable/8/contrib/sendmail/libmilter/engine.c stable/8/contrib/sendmail/libmilter/example.c stable/8/contrib/sendmail/libmilter/handler.c stable/8/contrib/sendmail/libmilter/libmilter.h stable/8/contrib/sendmail/libmilter/listener.c stable/8/contrib/sendmail/libmilter/main.c stable/8/contrib/sendmail/libmilter/worker.c stable/8/contrib/sendmail/libsm/debug.c stable/8/contrib/sendmail/libsm/ldap.c stable/8/contrib/sendmail/libsm/mbdb.c stable/8/contrib/sendmail/libsm/sem.c stable/8/contrib/sendmail/libsm/t-sem.c stable/8/contrib/sendmail/libsmdb/smdb1.c stable/8/contrib/sendmail/libsmdb/smdb2.c stable/8/contrib/sendmail/libsmutil/safefile.c stable/8/contrib/sendmail/praliases/praliases.8 stable/8/contrib/sendmail/praliases/praliases.c stable/8/contrib/sendmail/src/Makefile.m4 stable/8/contrib/sendmail/src/README stable/8/contrib/sendmail/src/TRACEFLAGS stable/8/contrib/sendmail/src/collect.c stable/8/contrib/sendmail/src/conf.c stable/8/contrib/sendmail/src/conf.h stable/8/contrib/sendmail/src/daemon.c stable/8/contrib/sendmail/src/deliver.c stable/8/contrib/sendmail/src/envelope.c stable/8/contrib/sendmail/src/headers.c stable/8/contrib/sendmail/src/main.c stable/8/contrib/sendmail/src/map.c stable/8/contrib/sendmail/src/milter.c stable/8/contrib/sendmail/src/queue.c stable/8/contrib/sendmail/src/ratectrl.c stable/8/contrib/sendmail/src/readcf.c stable/8/contrib/sendmail/src/savemail.c stable/8/contrib/sendmail/src/sendmail.8 stable/8/contrib/sendmail/src/sendmail.h stable/8/contrib/sendmail/src/sfsasl.c stable/8/contrib/sendmail/src/srvrsmtp.c stable/8/contrib/sendmail/src/tls.c stable/8/contrib/sendmail/src/usersmtp.c stable/8/contrib/sendmail/src/util.c stable/8/contrib/sendmail/src/version.c stable/8/contrib/sendmail/vacation/vacation.c Directory Properties: stable/8/contrib/sendmail/ (props changed) Modified: stable/8/contrib/sendmail/CACerts ============================================================================== --- stable/8/contrib/sendmail/CACerts Sun Jan 31 18:41:00 2010 (r203299) +++ stable/8/contrib/sendmail/CACerts Sun Jan 31 18:59:03 2010 (r203300) @@ -1,4 +1,4 @@ -# $Id: CACerts,v 8.3 2007/06/11 22:04:46 ca Exp $ +# $Id: CACerts,v 8.4 2009/06/26 05:46:10 ca Exp $ # This file contains some CA certificates that are used to sign the # certificates of mail servers of members of the sendmail consortium # who may reply to questions etc sent to sendmail.org. @@ -11,73 +11,6 @@ Certificate: Version: 3 (0x2) Serial Number: 0 (0x0) Signature Algorithm: md5WithRSAEncryption - Issuer: C=US, ST=California, L=Berkeley, O=Sendmail Consortium, CN=Certificate Authority/emailAddress=certificates@sendmail.org - Validity - Not Before: Feb 1 21:51:47 2003 GMT - Not After : Jan 31 21:51:47 2008 GMT - Subject: C=US, ST=California, L=Berkeley, O=Sendmail Consortium, CN=Certificate Authority/emailAddress=certificates@sendmail.org - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - RSA Public Key: (1024 bit) - Modulus (1024 bit): - 00:9a:fb:dc:4c:a3:58:21:1b:84:78:0a:53:56:b3: - 8d:84:05:b7:db:dd:d7:81:ea:dd:c1:ab:d4:be:d9: - 2b:12:e0:6d:3a:31:d5:f0:7b:13:fc:d8:da:09:0b: - 71:11:8e:b9:48:c4:ab:ae:f5:9c:4c:e2:04:27:8e: - c8:03:3a:aa:00:8b:46:f2:79:09:ae:65:b2:9a:66: - e7:ac:a9:ea:32:f7:4a:4e:fd:da:41:48:34:5a:9d: - b0:42:ea:55:40:17:27:5e:67:9e:e5:ce:dc:84:6d: - 1d:48:37:23:11:68:9d:a8:d4:58:02:05:ea:88:35: - bd:0d:b6:28:d5:cd:d4:d8:95 - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Subject Key Identifier: - DE:CD:6E:B8:89:34:06:3D:E9:CD:A7:FE:45:4F:4E:FB:E1:8D:E7:79 - X509v3 Authority Key Identifier: - keyid:DE:CD:6E:B8:89:34:06:3D:E9:CD:A7:FE:45:4F:4E:FB:E1:8D:E7:79 - DirName:/C=US/ST=California/L=Berkeley/O=Sendmail Consortium/CN=Certificate Authority/emailAddress=certificates@sendmail.org - serial:00 - - X509v3 Basic Constraints: - CA:TRUE - Signature Algorithm: md5WithRSAEncryption - 66:92:b9:57:17:3b:6a:0e:72:b1:85:29:53:9f:11:68:a0:0d: - 79:43:d0:7c:48:73:b9:71:09:50:08:02:03:0b:28:0c:33:9a: - 00:ac:94:69:4f:bc:0f:45:6b:f5:3a:ca:6a:87:a1:7f:28:f7: - 9a:c4:b6:b0:f3:dc:a3:eb:42:95:9f:99:19:f8:b8:84:6d:f1: - 1d:bc:9f:f0:a0:cc:60:2d:00:6b:17:55:33:16:85:d1:73:e1: - 00:59:89:33:19:c4:2e:29:5a:39:a7:0e:e7:9b:d2:4c:c7:b9: - 7d:6a:3e:b4:00:83:86:d3:16:28:fd:ad:55:65:60:4e:14:02: - 46:d3 ------BEGIN CERTIFICATE----- -MIIDsDCCAxmgAwIBAgIBADANBgkqhkiG9w0BAQQFADCBnTELMAkGA1UEBhMCVVMx -EzARBgNVBAgTCkNhbGlmb3JuaWExETAPBgNVBAcTCEJlcmtlbGV5MRwwGgYDVQQK -ExNTZW5kbWFpbCBDb25zb3J0aXVtMR4wHAYDVQQDExVDZXJ0aWZpY2F0ZSBBdXRo -b3JpdHkxKDAmBgkqhkiG9w0BCQEWGWNlcnRpZmljYXRlc0BzZW5kbWFpbC5vcmcw -HhcNMDMwMjAxMjE1MTQ3WhcNMDgwMTMxMjE1MTQ3WjCBnTELMAkGA1UEBhMCVVMx -EzARBgNVBAgTCkNhbGlmb3JuaWExETAPBgNVBAcTCEJlcmtlbGV5MRwwGgYDVQQK -ExNTZW5kbWFpbCBDb25zb3J0aXVtMR4wHAYDVQQDExVDZXJ0aWZpY2F0ZSBBdXRo -b3JpdHkxKDAmBgkqhkiG9w0BCQEWGWNlcnRpZmljYXRlc0BzZW5kbWFpbC5vcmcw -gZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAJr73EyjWCEbhHgKU1azjYQFt9vd -14Hq3cGr1L7ZKxLgbTox1fB7E/zY2gkLcRGOuUjEq671nEziBCeOyAM6qgCLRvJ5 -Ca5lsppm56yp6jL3Sk792kFINFqdsELqVUAXJ15nnuXO3IRtHUg3IxFonajUWAIF -6og1vQ22KNXN1NiVAgMBAAGjgf0wgfowHQYDVR0OBBYEFN7NbriJNAY96c2n/kVP -Tvvhjed5MIHKBgNVHSMEgcIwgb+AFN7NbriJNAY96c2n/kVPTvvhjed5oYGjpIGg -MIGdMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTERMA8GA1UEBxMI -QmVya2VsZXkxHDAaBgNVBAoTE1NlbmRtYWlsIENvbnNvcnRpdW0xHjAcBgNVBAMT -FUNlcnRpZmljYXRlIEF1dGhvcml0eTEoMCYGCSqGSIb3DQEJARYZY2VydGlmaWNh -dGVzQHNlbmRtYWlsLm9yZ4IBADAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBAUA -A4GBAGaSuVcXO2oOcrGFKVOfEWigDXlD0HxIc7lxCVAIAgMLKAwzmgCslGlPvA9F -a/U6ymqHoX8o95rEtrDz3KPrQpWfmRn4uIRt8R28n/CgzGAtAGsXVTMWhdFz4QBZ -iTMZxC4pWjmnDueb0kzHuX1qPrQAg4bTFij9rVVlYE4UAkbT ------END CERTIFICATE----- - - -Certificate: - Data: - Version: 3 (0x2) - Serial Number: 0 (0x0) - Signature Algorithm: md5WithRSAEncryption Issuer: C=US, ST=Illinois, L=De Kalb, O=Northern Illinois University, OU=Computer Science, CN=Neil Rickert/emailAddress=rickert@cs.niu.edu Validity Not Before: May 12 00:40:50 2000 GMT @@ -144,93 +77,93 @@ Certificate: Data: Version: 3 (0x2) Serial Number: - fa:7c:2c:80:29:3f:c2:64 + c2:3c:61:67:3b:0a:cc:5e Signature Algorithm: md5WithRSAEncryption - Issuer: C=US, ST=California, L=Berkeley, O=Endmail Org, OU=MTA, CN=Claus Assmann CA RSA 2007/emailAddress=ca+ca-rsa2007@esmtp.org + Issuer: C=US, ST=California, L=Berkeley, O=Endmail Org, OU=MTA, CN=Claus Assmann CA RSA 2009/emailAddress=ca+ca-rsa2009@esmtp.org Validity - Not Before: May 4 02:07:56 2007 GMT - Not After : May 3 02:07:56 2010 GMT - Subject: C=US, ST=California, L=Berkeley, O=Endmail Org, OU=MTA, CN=Claus Assmann CA RSA 2007/emailAddress=ca+ca-rsa2007@esmtp.org + Not Before: May 14 04:42:18 2009 GMT + Not After : May 13 04:42:18 2012 GMT + Subject: C=US, ST=California, L=Berkeley, O=Endmail Org, OU=MTA, CN=Claus Assmann CA RSA 2009/emailAddress=ca+ca-rsa2009@esmtp.org Subject Public Key Info: Public Key Algorithm: rsaEncryption RSA Public Key: (2048 bit) Modulus (2048 bit): - 00:b0:28:91:31:af:82:ce:72:ef:36:ab:7d:e9:b1: - f5:77:66:38:4b:38:1f:5f:3d:12:d3:c8:fd:9a:f4: - d4:f6:b8:90:f9:26:5f:29:f7:43:f9:34:ec:65:62: - 01:bb:64:f1:5d:ea:75:04:3d:92:65:60:a2:06:62: - fa:88:ca:d8:20:50:c8:1e:38:53:b5:18:dd:b7:bd: - c7:08:35:4c:d9:dc:c6:97:56:37:b6:65:33:74:5a: - b2:c3:85:08:2b:b7:26:70:ff:38:02:1a:67:6a:d0: - 49:18:10:4b:f8:db:af:06:9c:b1:a8:82:a1:b1:75: - d2:52:9b:53:0c:ca:a7:e3:15:38:79:6d:a1:f5:ef: - 7c:8b:fd:bd:04:78:f9:e8:1e:b9:92:ea:74:d7:45: - 1e:4c:c8:bd:f4:5c:fc:1a:7f:e7:31:c6:ab:cb:78: - c7:4d:2f:b5:72:10:35:27:4a:1a:fa:53:19:f8:a7: - 59:63:eb:e9:15:ab:dc:71:69:8c:42:1c:96:4e:89: - 80:66:c9:9e:21:d5:3d:08:19:74:a5:f5:07:a0:ae: - de:79:af:fd:42:c2:79:7e:8c:f8:39:22:3b:c3:c4: - 58:3b:d0:0d:e6:a9:11:b6:a2:cd:2e:e5:16:66:fd: - 7e:65:33:94:b0:36:80:27:f5:80:76:a9:e5:df:f2: - cf:ef + 00:d5:f8:d3:48:38:75:df:2e:6b:8b:c4:8d:1d:41: + 5e:ad:4b:96:3d:48:c2:dc:e5:ff:61:98:95:32:03: + e9:b6:71:5a:68:31:bc:e1:5c:aa:0e:70:a7:bc:51: + b7:13:6a:78:54:ae:a6:d0:44:49:1b:5e:37:5b:59: + 20:01:47:a7:ec:41:4c:11:79:8c:25:c1:1b:c0:ed: + 85:b2:de:0f:10:9f:e7:b2:a3:c4:f1:fc:85:51:aa: + d6:68:49:51:3e:04:e1:eb:e9:cd:87:1b:d0:9d:97: + 7b:4c:e1:1e:b1:6a:be:01:0a:a9:97:9a:50:89:e3: + 66:06:4c:07:cb:7e:99:70:13:e8:b4:9c:e7:e6:52: + 38:c0:64:90:42:d0:f5:cf:22:46:22:60:e9:34:70: + 1d:e3:d1:13:33:3a:31:ba:13:06:a8:c2:34:90:47: + c5:a1:bd:2d:7d:98:21:70:de:22:d0:13:11:e5:08: + dd:a0:77:0b:df:34:a7:07:55:de:5a:71:f6:6c:9e: + ec:f7:45:75:1f:22:a9:84:06:c6:4f:84:3d:4e:05: + d7:e4:e5:98:41:61:7b:8e:c9:3b:a6:ed:31:80:7d: + fd:fa:f0:dc:b7:07:82:b8:ec:27:20:39:5f:78:95: + f1:0d:93:8d:f9:4d:21:08:fd:72:89:01:ff:2c:a0: + 71:9d Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - B2:49:6B:52:45:EE:90:36:D2:79:47:03:33:D9:A0:BA:80:50:DA:1C + A7:61:FA:31:AF:A8:E2:5E:93:B6:84:9E:74:08:A2:76:50:87:69:7C X509v3 Authority Key Identifier: - keyid:B2:49:6B:52:45:EE:90:36:D2:79:47:03:33:D9:A0:BA:80:50:DA:1C - DirName:/C=US/ST=California/L=Berkeley/O=Endmail Org/OU=MTA/CN=Claus Assmann CA RSA 2007/emailAddress=ca+ca-rsa2007@esmtp.org - serial:FA:7C:2C:80:29:3F:C2:64 + keyid:A7:61:FA:31:AF:A8:E2:5E:93:B6:84:9E:74:08:A2:76:50:87:69:7C + DirName:/C=US/ST=California/L=Berkeley/O=Endmail Org/OU=MTA/CN=Claus Assmann CA RSA 2009/emailAddress=ca+ca-rsa2009@esmtp.org + serial:C2:3C:61:67:3B:0A:CC:5E X509v3 Basic Constraints: - CA:TRUE + CA:TRUE X509v3 Subject Alternative Name: - email:ca+ca-rsa2007@esmtp.org + email:ca+ca-rsa2009@esmtp.org X509v3 Issuer Alternative Name: - email:ca+ca-rsa2007@esmtp.org + email:ca+ca-rsa2009@esmtp.org Signature Algorithm: md5WithRSAEncryption - 98:98:7c:d3:d0:5b:72:47:15:e6:22:68:bb:78:0e:78:66:e9: - 56:16:d8:bc:9d:5a:dc:27:29:fb:91:2d:6a:21:35:18:56:b4: - 4f:2a:09:c0:08:6f:9a:59:2b:2e:72:9a:fb:50:ba:c7:a9:91: - a0:f9:6c:be:cf:78:42:43:02:70:53:97:ba:6a:e3:da:17:e8: - 1f:c7:3a:5b:e7:bc:eb:e5:24:4c:f5:cf:61:34:1e:20:ed:17: - 63:ef:81:d3:9e:25:fe:cc:05:19:cc:8a:82:c9:4c:3a:b5:6b: - 49:51:76:46:02:aa:60:bb:c4:b9:61:48:33:da:79:8d:46:a3: - 06:20:98:f3:b2:db:3b:ad:c9:1d:0e:97:3d:b7:14:19:d3:7d: - 04:8b:6a:81:e0:11:5b:e1:35:a3:ff:2f:11:86:1c:31:85:7a: - fd:3f:36:ef:99:25:46:2e:b0:cb:43:45:4a:ec:be:d3:3f:a4: - 77:9b:79:cc:ce:92:63:a5:d9:ed:db:a0:9d:5d:7c:d7:80:f6: - c9:41:fb:02:96:8e:fd:f3:da:05:9d:81:a7:25:da:26:35:3b: - a9:0c:8c:f5:a7:5d:48:ec:87:c7:7a:60:51:76:f2:de:9b:14: - 2b:55:8a:43:df:99:19:f3:eb:e7:03:e6:a7:a2:a2:28:dd:d5: - 07:6a:3f:f7 + b3:38:e0:da:a8:07:d8:cc:b8:4d:8c:20:a6:06:2c:f8:27:db: + 8e:28:0f:39:bd:d9:24:c7:9f:e0:4d:d6:b6:63:42:36:0f:d8: + 70:41:e7:9e:a2:24:64:05:ea:85:97:ac:f2:cc:c2:a6:71:bb: + 30:21:c1:c7:c4:54:34:1d:30:09:f0:9b:74:27:93:59:12:4c: + 53:0b:8c:3e:d0:39:ed:4a:d0:d9:66:24:d8:e7:e5:9c:a8:6d: + 5f:56:5d:9a:91:fe:1b:7d:b9:7c:79:9e:1c:b9:71:74:14:f8: + 0c:30:50:f9:b1:22:56:a8:4d:6f:4b:9b:e5:8a:81:33:1b:77: + 75:f6:d8:ce:d4:90:34:86:34:d1:86:75:a9:e1:23:e6:af:c1: + 8e:28:97:47:20:4d:1b:57:09:39:f4:56:01:d2:87:43:3e:29: + f6:c4:5b:7d:8f:9e:bd:ad:36:79:cf:09:70:43:30:21:98:23: + 31:c8:0d:39:ee:77:e1:4a:44:1a:5c:79:2f:6c:ec:8a:3c:db: + 99:a0:11:bc:1a:46:24:51:e7:75:d6:9a:db:ad:dd:55:d4:dd: + ca:81:a0:10:77:96:91:9c:76:30:38:18:f0:82:43:b3:7c:41: + 64:4c:4e:da:66:22:67:cf:b7:d7:10:ba:ed:f4:6d:43:59:00: + d0:82:1e:07 -----BEGIN CERTIFICATE----- -MIIFJzCCBA+gAwIBAgIJAPp8LIApP8JkMA0GCSqGSIb3DQEBBAUAMIGlMQswCQYD +MIIFJzCCBA+gAwIBAgIJAMI8YWc7CsxeMA0GCSqGSIb3DQEBBAUAMIGlMQswCQYD VQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTERMA8GA1UEBxMIQmVya2VsZXkx FDASBgNVBAoTC0VuZG1haWwgT3JnMQwwCgYDVQQLEwNNVEExIjAgBgNVBAMTGUNs -YXVzIEFzc21hbm4gQ0EgUlNBIDIwMDcxJjAkBgkqhkiG9w0BCQEWF2NhK2NhLXJz -YTIwMDdAZXNtdHAub3JnMB4XDTA3MDUwNDAyMDc1NloXDTEwMDUwMzAyMDc1Nlow +YXVzIEFzc21hbm4gQ0EgUlNBIDIwMDkxJjAkBgkqhkiG9w0BCQEWF2NhK2NhLXJz +YTIwMDlAZXNtdHAub3JnMB4XDTA5MDUxNDA0NDIxOFoXDTEyMDUxMzA0NDIxOFow gaUxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMREwDwYDVQQHEwhC ZXJrZWxleTEUMBIGA1UEChMLRW5kbWFpbCBPcmcxDDAKBgNVBAsTA01UQTEiMCAG -A1UEAxMZQ2xhdXMgQXNzbWFubiBDQSBSU0EgMjAwNzEmMCQGCSqGSIb3DQEJARYX -Y2ErY2EtcnNhMjAwN0Blc210cC5vcmcwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw -ggEKAoIBAQCwKJExr4LOcu82q33psfV3ZjhLOB9fPRLTyP2a9NT2uJD5Jl8p90P5 -NOxlYgG7ZPFd6nUEPZJlYKIGYvqIytggUMgeOFO1GN23vccINUzZ3MaXVje2ZTN0 -WrLDhQgrtyZw/zgCGmdq0EkYEEv4268GnLGogqGxddJSm1MMyqfjFTh5baH173yL -/b0EePnoHrmS6nTXRR5MyL30XPwaf+cxxqvLeMdNL7VyEDUnShr6Uxn4p1lj6+kV -q9xxaYxCHJZOiYBmyZ4h1T0IGXSl9Qegrt55r/1Cwnl+jPg5IjvDxFg70A3mqRG2 -os0u5RZm/X5lM5SwNoAn9YB2qeXf8s/vAgMBAAGjggFWMIIBUjAdBgNVHQ4EFgQU -sklrUkXukDbSeUcDM9mguoBQ2hwwgdoGA1UdIwSB0jCBz4AUsklrUkXukDbSeUcD -M9mguoBQ2hyhgaukgagwgaUxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9y +A1UEAxMZQ2xhdXMgQXNzbWFubiBDQSBSU0EgMjAwOTEmMCQGCSqGSIb3DQEJARYX +Y2ErY2EtcnNhMjAwOUBlc210cC5vcmcwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw +ggEKAoIBAQDV+NNIOHXfLmuLxI0dQV6tS5Y9SMLc5f9hmJUyA+m2cVpoMbzhXKoO +cKe8UbcTanhUrqbQREkbXjdbWSABR6fsQUwReYwlwRvA7YWy3g8Qn+eyo8Tx/IVR +qtZoSVE+BOHr6c2HG9Cdl3tM4R6xar4BCqmXmlCJ42YGTAfLfplwE+i0nOfmUjjA +ZJBC0PXPIkYiYOk0cB3j0RMzOjG6EwaowjSQR8WhvS19mCFw3iLQExHlCN2gdwvf +NKcHVd5acfZsnuz3RXUfIqmEBsZPhD1OBdfk5ZhBYXuOyTum7TGAff368Ny3B4K4 +7CcgOV94lfENk435TSEI/XKJAf8soHGdAgMBAAGjggFWMIIBUjAdBgNVHQ4EFgQU +p2H6Ma+o4l6TtoSedAiidlCHaXwwgdoGA1UdIwSB0jCBz4AUp2H6Ma+o4l6TtoSe +dAiidlCHaXyhgaukgagwgaUxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9y bmlhMREwDwYDVQQHEwhCZXJrZWxleTEUMBIGA1UEChMLRW5kbWFpbCBPcmcxDDAK -BgNVBAsTA01UQTEiMCAGA1UEAxMZQ2xhdXMgQXNzbWFubiBDQSBSU0EgMjAwNzEm -MCQGCSqGSIb3DQEJARYXY2ErY2EtcnNhMjAwN0Blc210cC5vcmeCCQD6fCyAKT/C -ZDAMBgNVHRMEBTADAQH/MCIGA1UdEQQbMBmBF2NhK2NhLXJzYTIwMDdAZXNtdHAu -b3JnMCIGA1UdEgQbMBmBF2NhK2NhLXJzYTIwMDdAZXNtdHAub3JnMA0GCSqGSIb3 -DQEBBAUAA4IBAQCYmHzT0FtyRxXmImi7eA54ZulWFti8nVrcJyn7kS1qITUYVrRP -KgnACG+aWSsucpr7ULrHqZGg+Wy+z3hCQwJwU5e6auPaF+gfxzpb57zr5SRM9c9h -NB4g7Rdj74HTniX+zAUZzIqCyUw6tWtJUXZGAqpgu8S5YUgz2nmNRqMGIJjzsts7 -rckdDpc9txQZ030Ei2qB4BFb4TWj/y8RhhwxhXr9PzbvmSVGLrDLQ0VK7L7TP6R3 -m3nMzpJjpdnt26CdXXzXgPbJQfsClo7989oFnYGnJdomNTupDIz1p11I7IfHemBR -dvLemxQrVYpD35kZ8+vnA+anoqIo3dUHaj/3 +BgNVBAsTA01UQTEiMCAGA1UEAxMZQ2xhdXMgQXNzbWFubiBDQSBSU0EgMjAwOTEm +MCQGCSqGSIb3DQEJARYXY2ErY2EtcnNhMjAwOUBlc210cC5vcmeCCQDCPGFnOwrM +XjAMBgNVHRMEBTADAQH/MCIGA1UdEQQbMBmBF2NhK2NhLXJzYTIwMDlAZXNtdHAu +b3JnMCIGA1UdEgQbMBmBF2NhK2NhLXJzYTIwMDlAZXNtdHAub3JnMA0GCSqGSIb3 +DQEBBAUAA4IBAQCzOODaqAfYzLhNjCCmBiz4J9uOKA85vdkkx5/gTda2Y0I2D9hw +QeeeoiRkBeqFl6zyzMKmcbswIcHHxFQ0HTAJ8Jt0J5NZEkxTC4w+0DntStDZZiTY +5+WcqG1fVl2akf4bfbl8eZ4cuXF0FPgMMFD5sSJWqE1vS5vlioEzG3d19tjO1JA0 +hjTRhnWp4SPmr8GOKJdHIE0bVwk59FYB0odDPin2xFt9j569rTZ5zwlwQzAhmCMx +yA057nfhSkQaXHkvbOyKPNuZoBG8GkYkUed11prbrd1V1N3KgaAQd5aRnHYwOBjw +gkOzfEFkTE7aZiJnz7fXELrt9G1DWQDQgh4H -----END CERTIFICATE----- Modified: stable/8/contrib/sendmail/LICENSE ============================================================================== --- stable/8/contrib/sendmail/LICENSE Sun Jan 31 18:41:00 2010 (r203299) +++ stable/8/contrib/sendmail/LICENSE Sun Jan 31 18:59:03 2010 (r203300) @@ -1,7 +1,7 @@ SENDMAIL LICENSE The following license terms and conditions apply, unless a different -license is obtained from Sendmail, Inc., 6425 Christie Ave, Fourth Floor, +license is obtained from Sendmail, Inc., 6475 Christie Ave, Suite 350, Emeryville, CA 94608, USA, or by electronic mail at license@sendmail.com. License Terms: @@ -33,7 +33,7 @@ each of the following conditions is met: forth as paragraph 6 below, in the documentation and/or other materials provided with the distribution. For the purposes of binary distribution the "Copyright Notice" refers to the following language: - "Copyright (c) 1998-2004 Sendmail, Inc. All rights reserved." + "Copyright (c) 1998-2009 Sendmail, Inc. All rights reserved." 4. Neither the name of Sendmail, Inc. nor the University of California nor the names of their contributors may be used to endorse or promote @@ -76,4 +76,4 @@ each of the following conditions is met: (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -$Revision: 8.13 $, Last updated $Date: 2004/05/11 23:57:57 $ +$Revision: 8.15 $, Last updated $Date: 2009/03/04 19:58:04 $ Modified: stable/8/contrib/sendmail/PGPKEYS ============================================================================== --- stable/8/contrib/sendmail/PGPKEYS Sun Jan 31 18:41:00 2010 (r203299) +++ stable/8/contrib/sendmail/PGPKEYS Sun Jan 31 18:59:03 2010 (r203300) @@ -142,6 +142,79 @@ gpExpdV7qPrw9k01j5rod5PjZlG8zV0= -----END PGP PUBLIC KEY BLOCK----- Type Bits KeyID Created Expires Algorithm Use +pub 1024 0xA77F2429 2009-01-01 ---------- RSA Sign & Encrypt +f16 Fingerprint16 = 33 3A 62 61 2C F3 21 AA 4E 87 47 F2 2F 2C 40 4D +uid Sendmail Signing Key/2009 + +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.4.8 (OpenBSD) + +mQCNA0lcVHwAAAEEAM7aXDJHNH3g0oxbsSUjqRiKh47W4srnfEYREj2Q26AXWzXE +BSyfl6QMRLbSVNIiPOWlMPbZWjCx4c1TNsj3TiiklCcievlvbAPVa3kY2hZ6pmyU +czJq4S/mT1lt+uPOCjvKxo8OLQoFuJMTIS+Ya7LVjW7fJD5yrhKJbpunfyQpAAUR +tDFTZW5kbWFpbCBTaWduaW5nIEtleS8yMDA5IDxzZW5kbWFpbEBTZW5kbWFpbC5P +Ukc+iQCVAwUQSVxUfBKJbpunfyQpAQHirwP+JvK4cBqtw9rxSZ0whmC1N4a2r24f +SH2WDC1zNNeiCHg93udKs3PKLPm688U+WxiaSsrGQXQlGojx7jn1XggTPOG+SteJ +JP/Ea9buJK9KaLaniUm84XxHxa71y3v3+SfhJMpJioY4G6qKqfLZFzmpiwUTvtLR +B9LfWvzvUUHJSTyJAJUDBRBJXFY9wZwdJRLTRh0BAcrBBACYcnhE8cx5eA8WqTR4 +2CVZgxxrIMOrqda+hdpSgsRjUEWRpb5+Es1hfM3OLXqbsywCTUvxeoymVYQr3aSP +sbm+rQ4l6gf7ibpiVZA6vDxh0EfwNYE+aI3AoW03ODoCAaj+utOjGdqzIcec0RpS +zXPI1gWW3sBck95KsiDUYmXYTIkAlQMFEElcVkzvWJZk1DLhnQEByUIEAKOdWew/ +M75xyVbugMGUZnAJrTZPKu9y3V3TLqyET3rGYfLjt6M4R+99j+mkhmi2rOckM9VV +30kvjW9BBarnr13XoMVTtLneoLaVrbMw4aZHRkTdRL14LIj+w1jzEKXDwYylJbGZ +UlmZn7lFkJrLIaBDmQl7GswBJRJvFLQbdzzMiQCVAwUQSVxWVW9Sk9ijm6ZVAQHr +DQP9ECF56TGI8YRPVOzZJzUyOmiMAouRoJ74aWfM8TA2Q8gVtedDc6IHiNzcVjq4 +jOZuMgb1KTPPF/TwWL5MHIFldsMdJ/i0Rml+x4h3Ff+8ZYlJgFBylUmx++nW1rbc +nn9RS/Es+zKsDOnTN5fTFo3br1z2saLnuXNB+SuJmSC8i2CJAJUDBRBJXFZgnBy9 +4uNcVjUBAcdaA/9ur7HbueufNbvr0HoDbhBijagbeqRrzmYtsOtYUfBGEtc5JiNH +r7NIAM66Tog8p9ZZA+qOaGHvujecBOTlokLpPKvcQngOz7c53z3Yop90TnMytUL2 +IExcuCdH4BMy72R5nH5YY5pMqb7pFjcyGDDIM8cxMgbZ3gzvbPDHZMUQ6okAlQMF +EElcVmc4IttHzDdPLQEBJ/0EANME79+Z/BItRKlSgzH52JBGGQZrZi57Pz+hJ+du +K7RgSkhpsXnk1kELvig5TCd2YaDZXoZwUrJLObVKAMI4lpGNTkZlzRRrFXcx4Q14 +YPJ/nay5jkqHvR9neKTsifzdsPVLi9nUDBMtURIQo5yn5AYMloiDzw/HpNGvkk92 +ITqwiQCVAwUQSVxWbolpYrhnjAoDAQHLDgP+L+Od/CoHaVUpsZld1SJKwvelIe1S +wT8SBqppQyDbKw0ZczetUSASt+g8OqJKD88I2no5mjEmHx0lncoKJ06qxpJBIu7A +lbByeE9i8Bn52YKhPGka4AwA3DOm5yR967BncOf/zY65t83hocZL1uKQeHW8wnpR +x3o+RBz2354phxyJAJUDBRBJXFZ2IYPhsTlvB4kBARKHA/sHFkKAvCo5Hto2CJWF +gyBCJUsUuHCaQTkfL4IspkIBjmrsr2KKe0WQUqIlebhhWzVhgYsc8AXZil+pLahC +L9CNQVQpoPKD3mit2+Vsi8254QxQjeYD3jUQT1C6uq6l9IORdIxYah9DNBNHCgwX +PuTMmpU1JQj6haKhGa1kbaQq2IkAlQMFEElcVn3I1e0plfYXcQEB2TYD+wYXb+sU +0vmG51lVWj2BPMvv/lbfzU6KnqXNCD2ra0yu6C83WHNFXEz+JuLYlzLnaKm8DJI/ +SFBZZIxpUaoaFHyGrjbWrDI6oMfvp/dMnJjfibNbmZuVIl2z0TKO98jiJ/+/9e/5 +AtCsSFfyZ6FSTtAHbG1ZOJvhPBub9aELiUCiiQCVAwUQSVxWknCgJE0e+ZJRAQHz +NQP7BYHJwViDWqp9c5DmxM6vHrVq/wsDyPgm52+QpopErCRt2iTpocldHQG/9ZdE +0ENn6PhI49xobh+m0HfoZZ+Cr4LPU7g2ftmEtrxtDN1BYdNQHZLZStUp7A8SsLgL +2IvYSI9iKAmQoWQTAOECDD41o1BOnnM1eraeUyqdmZaFm8iJAJUDBRBJXFaZHnuz +yK+VliUBAVgdBACmbsAKzbNnvfaTCJxqhaJI5uNDCdH7rgoCHEJR4aefPY89Do7b +ixLCyW4wUr7pxqvf/xbEGJHNCG5WnmncXBCnoEVqmHb7J9vQw1o3K6pRPqtTjVBR +VEUUK4xe6ZIOft3FOI5fKAPO5Vc9NlxPDjSJcjR6+B//TpecZ2L9A/Dp+4kAlQMF +EElcVqGXQwEYcJO4QQEBl1YD/AsMu6g/4KiwelIz2rDzm4wzvsQm+cYm47hv2IHV +Fkx5f8mS6um39+4J/FHni7i2bfSuHpRn1RdURR7Gebu7HKYfGTNLNYyKt7U/6VFb +ylDxUTS32sier3GlDrlJrBQ+VDIG4dUaioKoKUXxBhEVzAZrvkYhaiGWIl/K4zz5 +C1qdiQCVAwUQSVxWqdiq8Mr2swcpAQFzwgP9FJOM0MysHIjq/KihatPjerxhud6j +bd1Zo/tIKybvPsJNaeTeR+0IKm+vbAWtYL5oBc2wxgdQAs8tUi5SryK1otMAJ6sj +KNN+QxIp2FEumzReGRo+hCETiusjD9Abbh1L9L7FOkhGhH+m6fBVQIYUytmMFpnQ +qn17I9DVPxpwob+JAJUDBRBJXFa9wCnKQBb0zOkBAd0BA/9yRRB2waP3duE2rYKF +Obsbs3XXOQHEl/rjpIHVmYIqqRSglmlTEXwjKJeCEN9q0PRiazhztEhVJWP8ORRP +fkjlscP25T4A4tMC1F49biMak5MI2ffawVkUVsjIWFF/vFQIqKl4JG8SI/r4Oxep +yaozkowCJX3zZtkEfB2Id1nU9IkAlQMFEElcV0e92o/WP+p9/QEBxQID/R4E3pRI +isTe5RJotQKcsQKo3y+8KkmvfZQ6d3h/n4anq6bs1rRrWKqL6XoM7Nc5teLR3QaW +CVTssPtt3P06WqMm8Ct25iZ8dIyqRN0d0k5dJ6d5Qp4WSCL0TmTQ7wO4q9aCOhGK +YFKCP3i2v8zCOhuqk2pLeOYxl6f912COvmwSiQCVAwUQSVxXVXxLZ22gDhVjAQFU +WAP/TjyHxNVsptLRcFRfMCi9fjkrftbma00pzIaj9d6Ybxt6nMQ8C8TCTrurkXpq +9kGIrFVndsovql8++Y9VsDeh/vLX65mZl8FEVFvbl38+YSYeB44upadibU6uB0iL +zFz6da6gZmm/NENX3UCldIWv35L33EFotQ9GxTn8b0MQnY2JAJUDBRBJXFdl1uCh +/k++Kt0BAQ39BACfVZaig8loIuKosYh5Ydcefe0NZTZOCgPZ+mAzShEeBIN/btA0 ++jMXfu6tEgqUKQnyKCXZcPoZwY9Y0hOqGT2AIkWmZHJ/uKrzXIAcwUTS0TQV1k5x +mHPkZmvr55JDYp/JIbxIZ8QTpTuEzlymow12qMOUhPkL/wOQET9duDMKzokAlQMF +EEli68zPHrUDIjJ6AQEBzacD/RPBzReBSsVar0+B4xEW0i11LKV2Q7gH+y256IDX +3SxML4+GZM9FmEMVhlTbHPOE2rfwFvLrMxCmIqGHjMccJRZpV9OFpXa8z15FRDmJ +U01qOITDcIAiIPgGamifxMOYG4+spaj2sxLGnY/6aowhjh1XNbQPuJ6laNq7bz50 +wzfu +=RCyv +-----END PGP PUBLIC KEY BLOCK----- + +Type Bits KeyID Created Expires Algorithm Use pub 1024 0xF6B30729 2008-01-18 ---------- RSA Sign & Encrypt f16 Fingerprint16 = 07 FB 9A F9 F7 94 4B E4 0F 28 D1 8E 23 6F A2 B0 uid Sendmail Signing Key/2008 @@ -1792,4 +1865,4 @@ DnF3FZZEzV7oqPwC2jzv/1dD6GFhtgy0cnyoPGUJ =nES8 -----END PGP PUBLIC KEY BLOCK----- -$Revision: 8.26 $, Last updated $Date: 2008/01/22 06:20:27 $ +$Revision: 8.29 $, Last updated $Date: 2009/01/06 05:59:03 $ Modified: stable/8/contrib/sendmail/README ============================================================================== --- stable/8/contrib/sendmail/README Sun Jan 31 18:41:00 2010 (r203299) +++ stable/8/contrib/sendmail/README Sun Jan 31 18:59:03 2010 (r203300) @@ -38,6 +38,7 @@ the latest updates. 4. Read cf/README. Sendmail is a trademark of Sendmail, Inc. +US Patent Numbers 6865671, 6986037. +-----------------------+ | DIRECTORY PERMISSIONS | @@ -464,4 +465,4 @@ sendmail Source for the sendmail program test Some test scripts (currently only for compilation aids). vacation Source for the vacation program. NOT PART OF SENDMAIL! -$Revision: 8.94 $, Last updated $Date: 2008/02/12 16:40:05 $ +$Revision: 8.95 $, Last updated $Date: 2009/04/10 17:49:18 $ Modified: stable/8/contrib/sendmail/RELEASE_NOTES ============================================================================== --- stable/8/contrib/sendmail/RELEASE_NOTES Sun Jan 31 18:41:00 2010 (r203299) +++ stable/8/contrib/sendmail/RELEASE_NOTES Sun Jan 31 18:59:03 2010 (r203300) @@ -1,11 +1,96 @@ SENDMAIL RELEASE NOTES - $Id: RELEASE_NOTES,v 8.1926 2008/05/03 03:34:26 ca Exp $ + $Id: RELEASE_NOTES,v 8.1963 2009/12/23 04:43:46 ca Exp $ This listing shows the version of the sendmail binary, the version of the sendmail configuration files, the date of release, and a summary of the changes in that release. +8.14.4/8.14.4 2009/12/30 + SECURITY: Handle bogus certificates containing NUL characters + in CNs by placing a string indicating a bad certificate + in the {cn_subject} or {cn_issuer} macro. Patch inspired + by Matthias Andree's changes for fetchmail. + During the generation of a queue identifier an integer overflow + could occur which might result in bogus characters + being used. Based on patch from John Vannoy of + Pepperdine University. + The value of headers, e.g., Precedence, Content-Type, et.al., + was not processed correctly. Patch from Per Hedeland. + Between 8.11.7 and 8.12.0 the length limitation on a return + path was erroneously reduced from MAXNAME (256) to + MAXSHORTSTR (203). Patch from John Gardiner Myers + of Proofpoint; the problem was also noted by Steve + Hubert of University of Washington. + Prevent a crash when a hostname lookup returns a seemingly + valid result which contains a NULL pointer (this seems + to be happening on some Linux versions). + The process title was missing the current load average when + the MTA was delaying connections due to DelayLA. + Patch from Dick St.Peters of NetHeaven. + Do not reset the number of queue entries in shared memory if + only some of them are processed. + Fix overflow of an internal array when parsing some replies + from a milter. Problem found by Scott Rotondo + of Sun Microsystems. + If STARTTLS is turned off in the server (via M=S) then it + would not be initialized for use in the client either. + Patch from Kazuteru Okahashi of IIJ. + If a Diffie-Hellman cipher is selected for STARTTLS, the + handshake could fail with some TLS implementations + because the prime used by the server is not long enough. + Note: the initialization of the DSA/DH parameters for + the server can take a significant amount of time on slow + machines. This can be turned off by setting DHParameters + to none or a file (see doc/op/op.me). Patch from + Petr Lampa of the Brno University of Technology. + Fix handling of `b' modifier for DaemonPortOptions on little + endian machines for loopback address. Patch from + John Beck of Sun Microsystems. + Fix a potential memory leak in libsmdb/smdb1.c found by parfait. + Based on patch from Jonathan Gray of OpenBSD. + If a milter sets the reply code to "421" during the transfer + of the body, the SMTP server will terminate the SMTP session + with that error to match the behavior of the other callbacks. + Return EX_IOERR (instead of 0) if a mail submission fails due to + missing disk space in the mail queue. Based on patch + from Martin Poole of RedHat. + CONFIG: Using FEATURE(`ldap_routing')'s `nodomain' argument would + cause addresses not found in LDAP to be misparsed. + CONFIG: Using a CN restriction did not work for TLS_Clt as it + referred to a wrong macro. Patch from John Gardiner + Myers of Proofpoint. + CONFIG: The option relaytofulladdress of FEATURE(`access_db') + did not work if FEATURE(`relay_hosts_only') is used too. + Problem noted by Kristian Shaw. + CONFIG: The internal function lower() was broken and hence + strcasecmp() did not work either, which could cause + problems for some FEATURE()s if upper case arguments + were used. Patch from Vesa-Matti J Kari of the + University of Helsinki. + LIBMILTER: Fix internal check whether a milter application + is compiled against the same version of libmilter as + it is linked against (especially useful for dynamic + libraries). + LIBMILTER: Fix memory leak that occurred when smfi_setsymlist() + was used. Based on patch by Dan Lukes. + LIBMILTER: Document the effect of SMFIP_HDR_LEADSPC for filters + which add, insert, or replace headers. From Benjamin + Pineau. + LIBMILTER: Fix error messages which refer to "select()" to be + correct if SM_CONF_POLL is used. Based on patch from + John Nemeth. + LIBSM: Fix handling of LDAP search failures where the error is + carried in the search result itself, such as seen with + OpenLDAP proxy servers. + VACATION: Do not refer to a local variable outside its scope. + Based on patch from Mark Costlow of Southwest Cyberport. + Portability: + Enable HAVE_NANOSLEEP for SunOS 5.11. Patch from + John Beck of Sun Microsystems. + Drop NISPLUS from default SunOS 5.11 map definitions. + Patch from John Beck of Sun Microsystems. + 8.14.3/8.14.3 2008/05/03 During ruleset processing the generation of a key for a map lookup and the parsing of the default value was broken @@ -37,7 +122,7 @@ summary of the changes in that release. Support shared libraries in Darwin 8 and 9. Patch from Chris Behrens of Concentric. Add support for SCO OpenServer 6, patch from Boyd Gerber. - DEVTOOLS: Clarify that confSHAREDLIBDIR requires a trailing path. + DEVTOOLS: Clarify that confSHAREDLIBDIR requires a trailing slash. Added Files: devtools/OS/Darwin.9.x devtools/OS/OSR.i386 Modified: stable/8/contrib/sendmail/cf/README ============================================================================== --- stable/8/contrib/sendmail/cf/README Sun Jan 31 18:41:00 2010 (r203299) +++ stable/8/contrib/sendmail/cf/README Sun Jan 31 18:59:03 2010 (r203300) @@ -3142,7 +3142,7 @@ starts with '+' and the items are separa extensions are: CN:name name must match ${cn_subject} -CN ${server_name} must match ${cn_subject} +CN ${client_name}/${server_name} must match ${cn_subject} CS:name name must match ${cert_subject} CI:name name must match ${cert_issuer} @@ -4701,4 +4701,4 @@ M4 DIVERSIONS 8 DNS based blacklists 9 special local rulesets (1 and 2) -$Revision: 8.724 $, Last updated $Date: 2008/02/15 23:05:32 $ +$Revision: 8.727 $, Last updated $Date: 2009/05/07 23:46:17 $ Modified: stable/8/contrib/sendmail/cf/cf/submit.cf ============================================================================== --- stable/8/contrib/sendmail/cf/cf/submit.cf Sun Jan 31 18:41:00 2010 (r203299) +++ stable/8/contrib/sendmail/cf/cf/submit.cf Sun Jan 31 18:59:03 2010 (r203300) @@ -1,5 +1,5 @@ # -# Copyright (c) 1998-2004 Sendmail, Inc. and its suppliers. +# Copyright (c) 1998-2004, 2009 Sendmail, Inc. and its suppliers. # All rights reserved. # Copyright (c) 1983, 1995 Eric P. Allman. All rights reserved. # Copyright (c) 1988, 1993 @@ -16,8 +16,8 @@ ##### ##### SENDMAIL CONFIGURATION FILE ##### -##### built by ca@wiz.smi.sendmail.com on Fri May 2 20:39:00 PDT 2008 -##### in /extra/home/ca/sm-8.14.3/OpenSource/sendmail-8.14.3/cf/cf +##### built by ca@wiz.smi.sendmail.com on Tue Dec 22 20:49:09 PST 2009 +##### in /extra/home/ca/sm-8.14.4/OpenSource/sendmail-8.14.4/cf/cf ##### using ../ as configuration include directory ##### ###################################################################### @@ -27,7 +27,7 @@ ###################################################################### ###################################################################### -##### $Id: cfhead.m4,v 8.116 2004/01/28 22:02:22 ca Exp $ ##### +##### $Id: cfhead.m4,v 8.120 2009/01/23 22:39:21 ca Exp $ ##### ##### $Id: cf.m4,v 8.32 1999/02/07 07:26:14 gshapiro Exp $ ##### ##### $Id: submit.mc,v 8.14 2006/04/05 05:54:41 ca Exp $ ##### ##### $Id: msp.m4,v 1.33 2004/02/09 22:32:38 ca Exp $ ##### @@ -35,7 +35,7 @@ ##### $Id: no_default_msa.m4,v 8.2 2001/02/14 05:03:22 gshapiro Exp $ ##### -##### $Id: proto.m4,v 8.734 2008/01/24 23:42:01 ca Exp $ ##### +##### $Id: proto.m4,v 8.741 2009/12/11 00:04:53 ca Exp $ ##### # level 10 config file format V10/Berkeley @@ -114,7 +114,7 @@ D{MTAHost}[127.0.0.1] # Configuration version number -DZ8.14.3/Submit +DZ8.14.4/Submit ############### @@ -440,6 +440,7 @@ O RunAsUser=smmsp # once the threshold number of recipients have been rejected #O BadRcptThrottle=0 + # shall we get local names from our installed interfaces? O DontProbeInterfaces=True @@ -500,6 +501,7 @@ O PidFile=/var/spool/clientmqueue/sm-cli # SMTP STARTTLS server options #O TLSSrvOptions + # Input mail filters #O InputMailFilters Modified: stable/8/contrib/sendmail/cf/feature/ldap_routing.m4 ============================================================================== --- stable/8/contrib/sendmail/cf/feature/ldap_routing.m4 Sun Jan 31 18:41:00 2010 (r203299) +++ stable/8/contrib/sendmail/cf/feature/ldap_routing.m4 Sun Jan 31 18:59:03 2010 (r203300) @@ -1,6 +1,6 @@ divert(-1) # -# Copyright (c) 1999-2002, 2004, 2007 Sendmail, Inc. and its suppliers. +# Copyright (c) 1999-2002, 2004, 2007, 2009 Sendmail, Inc. and its suppliers. # All rights reserved. # # By using this file, you agree to the terms and conditions set @@ -10,7 +10,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: ldap_routing.m4,v 8.15 2007/05/01 17:38:25 ca Exp $') +VERSIONID(`$Id: ldap_routing.m4,v 8.17 2009/06/26 21:11:08 ca Exp $') divert(-1) # Check first two arguments. If they aren't set, may need to warn in proto.m4 @@ -35,12 +35,40 @@ ifelse(len(X`'_ARG6_), `1', `define(`_LD _ARG6_, `tempfail', `define(`_LDAP_ROUTE_MAPTEMP_', `_TEMPFAIL_')', _ARG6_, `queue', `define(`_LDAP_ROUTE_MAPTEMP_', `_QUEUE_')') +define(`_ATMPF_', `')dnl +dnl check whether arg contains -T`'_ATMPF_ +dnl unless it is a sequence map or just LDAP +dnl note: this does not work if ARG1 begins with space(s), however, as +dnl we issue a warning, hopefully the user will fix it... +ifelse(defn(`_ARG1_'), `', `', + defn(`_ARG1_'), `LDAP', `', + `ifelse(index(_ARG1_, `sequence '), `0', `', + `ifelse(index(_ARG1_, _ATMPF_), `-1', + `errprint(`*** WARNING: missing -T'_ATMPF_` in first argument of FEATURE(`ldap_routing') +') + define(`_ABP_', index(_ARG1_, ` ')) + define(`_NARG1_', `substr(_ARG1_, 0, _ABP_) -T'_ATMPF_` substr(_ARG1_, _ABP_)') + ') + ') + ') +ifelse(defn(`_ARG2_'), `', `', + defn(`_ARG2_'), `LDAP', `', + `ifelse(index(_ARG2_, `sequence '), `0', `', + `ifelse(index(_ARG2_, _ATMPF_), `-1', + `errprint(`*** WARNING: missing -T'_ATMPF_` in second argument of FEATURE(`ldap_routing') +') + define(`_ABP_', index(_ARG2_, ` ')) + define(`_NARG2_', `substr(_ARG2_, 0, _ABP_) -T'_ATMPF_` substr(_ARG2_, _ABP_)') + ') + ') + ') + LOCAL_CONFIG # LDAP routing maps Kldapmh ifelse(len(X`'_ARG1_), `1', `ldap -1 -T -v mailHost -k (&(objectClass=inetLocalMailRecipient)(mailLocalAddress=%0))', - `_ARG1_') + defn(`_NARG1_'), `', `_ARG1_', `_NARG1_') Kldapmra ifelse(len(X`'_ARG2_), `1', `ldap -1 -T -v mailRoutingAddress -k (&(objectClass=inetLocalMailRecipient)(mailLocalAddress=%0))', - `_ARG2_') + defn(`_NARG2_'), `', `_ARG2_', `_NARG2_') Modified: stable/8/contrib/sendmail/cf/m4/cfhead.m4 ============================================================================== --- stable/8/contrib/sendmail/cf/m4/cfhead.m4 Sun Jan 31 18:41:00 2010 (r203299) +++ stable/8/contrib/sendmail/cf/m4/cfhead.m4 Sun Jan 31 18:59:03 2010 (r203300) @@ -1,5 +1,5 @@ # -# Copyright (c) 1998-2004 Sendmail, Inc. and its suppliers. +# Copyright (c) 1998-2004, 2009 Sendmail, Inc. and its suppliers. # All rights reserved. # Copyright (c) 1983, 1995 Eric P. Allman. All rights reserved. # Copyright (c) 1988, 1993 @@ -49,7 +49,7 @@ define(`OSTYPE', define(`_ARG_', $2) include(_CF_DIR_`'ostype/$1.m4)POPDIVERT`'') ## helpful functions -define(`lower', `translit(`$1', `ABCDEFGHIJKLMNOPQRSTUVWXYZ', `abcdefghijklmnopqrstuvwx')') +define(`lower', `translit(`$1', `ABCDEFGHIJKLMNOPQRSTUVWXYZ', `abcdefghijklmnopqrstuvwxyz')') define(`strcasecmp', `ifelse(lower($1), lower($2), `1', `0')') ## access to further arguments in FEATURE/HACK define(`_ACC_ARG_1_',`$1') @@ -308,4 +308,4 @@ define(`confMILTER_MACROS_EOM', `{msg_id divert(0)dnl -VERSIONID(`$Id: cfhead.m4,v 8.116 2004/01/28 22:02:22 ca Exp $') +VERSIONID(`$Id: cfhead.m4,v 8.120 2009/01/23 22:39:21 ca Exp $') Modified: stable/8/contrib/sendmail/cf/m4/proto.m4 ============================================================================== --- stable/8/contrib/sendmail/cf/m4/proto.m4 Sun Jan 31 18:41:00 2010 (r203299) +++ stable/8/contrib/sendmail/cf/m4/proto.m4 Sun Jan 31 18:59:03 2010 (r203300) @@ -1,6 +1,6 @@ divert(-1) # -# Copyright (c) 1998-2007 Sendmail, Inc. and its suppliers. +# Copyright (c) 1998-2009 Sendmail, Inc. and its suppliers. # All rights reserved. # Copyright (c) 1983, 1995 Eric P. Allman. All rights reserved. # Copyright (c) 1988, 1993 @@ -13,7 +13,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: proto.m4,v 8.734 2008/01/24 23:42:01 ca Exp $') +VERSIONID(`$Id: proto.m4,v 8.741 2009/12/11 00:04:53 ca Exp $') # level CF_LEVEL config file format V`'CF_LEVEL/ifdef(`VENDOR_NAME', `VENDOR_NAME', `Berkeley') @@ -580,6 +580,7 @@ _OPTION(MaxRecipientsPerMessage, `confMA # once the threshold number of recipients have been rejected _OPTION(BadRcptThrottle, `confBAD_RCPT_THROTTLE', `0') + # shall we get local names from our installed interfaces? _OPTION(DontProbeInterfaces, `confDONT_PROBE_INTERFACES', `False') @@ -640,6 +641,7 @@ _OPTION(AuthMaxBits, `confAUTH_MAX_BITS' # SMTP STARTTLS server options _OPTION(TLSSrvOptions, `confTLS_SRV_OPTIONS', `') + # Input mail filters _OPTION(InputMailFilters, `confINPUT_MAIL_FILTERS', `') @@ -1509,7 +1511,9 @@ ifdef(`_LDAP_ROUTE_DETAIL_', # try without +detail R<> <> <$+> <$+ + $* @ $+> <> $@ $>LDAPExpand <$1> <$2 @ $4> <+$3>')dnl -ifdef(`_LDAP_ROUTE_NODOMAIN_', `dnl', ` +ifdef(`_LDAP_ROUTE_NODOMAIN_', ` +# pretend we did the @domain lookup +R<> <> <$+> <$+ @ $+> <$*> $: <> <> <$1> <@ $3> <$4>', ` # if still no mailRoutingAddress and no mailHost, # try @domain ifelse(_LDAP_ROUTE_DETAIL_, `_PRESERVE_', `dnl @@ -2139,7 +2143,10 @@ R$+ < @ $=w > $@ RELAY ifdef(`_RELAY_HOSTS_ONLY_', `R$+ < @ $=R > $@ RELAY ifdef(`_ACCESS_TABLE_', `dnl -R$+ < @ $+ > $: <$(access To:$2 $: ? $)> <$1 < @ $2 >> +ifdef(`_RELAY_FULL_ADDR_', `dnl +R$+ < @ $+ > $: <$(access To:$1@$2 $: ? $)> <$1 < @ $2 >> +R <$+ < @ $+ >> $: <$(access To:$2 $: ? $)> <$1 < @ $2 >>',` +R$+ < @ $+ > $: <$(access To:$2 $: ? $)> <$1 < @ $2 >>') dnl workspace: > R <$+ < @ $+ >> $: <$(access $2 $: ? $)> <$1 < @ $2 >>',`dnl')', `R$+ < @ $* $=R > $@ RELAY @@ -2691,7 +2698,7 @@ R$* $#$* $#$2 R$* $* $: $1', `dnl') ifdef(`_ACCESS_TABLE_', `dnl dnl store name of other side -R$* $: $(macro {TLS_Name} $@ $&{server_name} $) $1 +R$* $: $(macro {TLS_Name} $@ $&{client_name} $) $1 dnl ignore second arg for now dnl maybe use it to distinguish permanent/temporary error? dnl if MAIL: permanent (STARTTLS has not been offered) Modified: stable/8/contrib/sendmail/cf/m4/version.m4 ============================================================================== --- stable/8/contrib/sendmail/cf/m4/version.m4 Sun Jan 31 18:41:00 2010 (r203299) +++ stable/8/contrib/sendmail/cf/m4/version.m4 Sun Jan 31 18:59:03 2010 (r203300) @@ -1,6 +1,6 @@ divert(-1) # -# Copyright (c) 1998-2008 Sendmail, Inc. and its suppliers. +# Copyright (c) 1998-2009 Sendmail, Inc. and its suppliers. # All rights reserved. # Copyright (c) 1983 Eric P. Allman. All rights reserved. # Copyright (c) 1988, 1993 @@ -11,8 +11,8 @@ divert(-1) # the sendmail distribution. # # -VERSIONID(`$Id: version.m4,v 8.195 2008/04/17 17:04:30 ca Exp $') +VERSIONID(`$Id: version.m4,v 8.205 2009/12/23 04:43:09 ca Exp $') # divert(0) # Configuration version number -DZ8.14.3`'ifdef(`confCF_VERSION', `/confCF_VERSION') +DZ8.14.4`'ifdef(`confCF_VERSION', `/confCF_VERSION') Modified: stable/8/contrib/sendmail/contrib/qtool.pl ============================================================================== --- stable/8/contrib/sendmail/contrib/qtool.pl Sun Jan 31 18:41:00 2010 (r203299) +++ stable/8/contrib/sendmail/contrib/qtool.pl Sun Jan 31 18:59:03 2010 (r203300) @@ -3,7 +3,7 @@ ## Copyright (c) 1998-2002 Sendmail, Inc. and its suppliers. ## All rights reserved. ## -## $Id: qtool.pl,v 8.29 2007/02/16 01:12:08 ca Exp $ +## $Id: qtool.pl,v 8.30 2009/03/04 16:57:30 ca Exp $ ## use strict; use File::Basename; @@ -450,7 +450,7 @@ sub unlock_file ## ## Parameters: ## src_name -- The name of the file to be move. -## dst_nome -- The name of the place to move it to. +## dst_name -- The name of the place to move it to. ## ## Returns: ## error_string -- If undef then no problem. Otherwise it is a @@ -1193,7 +1193,7 @@ sub bounce ## ## This Condition Class checks the modification time of the ## source file and returns true if the file's modification time is -## older than the number of seconds the class was initialzed with. +## older than the number of seconds the class was initialized with. ## package OlderThan; @@ -1286,7 +1286,7 @@ sub check_move ## Eval ## ## Takes a perl expression and evaluates it. The ControlFile object -## for the source QueuedMessage is avaliable through the name '$msg'. +## for the source QueuedMessage is available through the name '$msg'. ## package Eval; Modified: stable/8/contrib/sendmail/contrib/smcontrol.pl ============================================================================== --- stable/8/contrib/sendmail/contrib/smcontrol.pl Sun Jan 31 18:41:00 2010 (r203299) +++ stable/8/contrib/sendmail/contrib/smcontrol.pl Sun Jan 31 18:59:03 2010 (r203300) @@ -1,4 +1,6 @@ -#!/usr/local/bin/perl -w +#!/usr/bin/perl -w + +# $Id: smcontrol.pl,v 8.8 2008/07/21 21:31:43 ca Exp $ use strict; use Getopt::Std; Modified: stable/8/contrib/sendmail/doc/op/op.me ============================================================================== --- stable/8/contrib/sendmail/doc/op/op.me Sun Jan 31 18:41:00 2010 (r203299) +++ stable/8/contrib/sendmail/doc/op/op.me Sun Jan 31 18:59:03 2010 (r203300) @@ -9,7 +9,7 @@ .\" the sendmail distribution. .\" .\" -.\" $Id: op.me,v 8.741 2007/06/22 23:08:59 ca Exp $ +.\" $Id: op.me,v 8.745 2009/12/13 04:12:46 ca Exp $ .\" .\" eqn op.me | pic | troff -me .\" @@ -90,13 +90,14 @@ Sendmail, Inc. .de Ve Version \\$2 .. -.Ve $Revision: 8.741 $ +.Ve $Revision: 8.745 $ .rm Ve .sp For Sendmail Version 8.14 .)l .(f Sendmail is a trademark of Sendmail, Inc. +US Patent Numbers 6865671, 6986037. .)f .sp 2 .pp @@ -4952,9 +4953,21 @@ as "(may be forged)". .ip ${cn_issuer} The CN (common name) of the CA that signed the presented certificate (STARTTLS only). +Note: if the CN cannot be extracted properly it will be replaced by +one of these strings based on the encountered error: +.(b +.ta 25n +BadCertificateContainsNUL CN contains a NUL character +BadCertificateTooLong CN is too long +BadCertificateUnknown CN could not be extracted +.)b +In the last case, some other (unspecific) error occurred. .ip ${cn_subject} The CN (common name) of the presented certificate (STARTTLS only). +See +.b ${cn_issuer} +for possible replacements. .ip ${currHeader} Header value as quoted string (possibly truncated to @@ -5130,7 +5143,7 @@ The total number of incoming connections by ConnectionRateWindowSize. .ip ${verify} The result of the verification of the presented cert; -only defined after STARTTLS has been used. +only defined after STARTTLS has been used (or attempted). Possible values are: .(b .ta 13n @@ -6710,10 +6723,25 @@ CRL checking requires at least OpenSSL v Note: if a CRLFile is specified but the file is unusable, STARTTLS is disabled. .ip DHParameters -File with DH parameters for STARTTLS. +Possible values are: +.(b +.ta 1i +5 use 512 bit prime +1 use 1024 bit prime +none do not use Diffie-Hellman +NAME load prime from file +.)b This is only required if a ciphersuite containing DSA/DH is used. -This is only for people with a good knowledge of TLS, all others -can ignore this option. +If ``5'' is selected, then precomputed, fixed primes are used. +This is the default for the client side. +If ``1'' is selected, then prime values are computed during startup. +This is the default for the server side. +Note: this operation can take a significant amount of time on a +slow machine (several seconds), but it is only done once at startup. +If ``none'' is selected, then TLS ciphersuites containing DSA/DH +cannot be used. +If a file name is specified (which must be an absolute path), +then the primes are read from it. .ip DaemonPortOptions=\fIoptions\fP [O] Set server SMTP options. @@ -11435,7 +11463,7 @@ replace it with a blank sheet for double .\".sz 10 .\"Eric Allman .\".sp -.\"Version $Revision: 8.741 $ +.\"Version $Revision: 8.745 $ .\".ce 0 .bp 3 .ce Modified: stable/8/contrib/sendmail/include/libmilter/mfapi.h ============================================================================== --- stable/8/contrib/sendmail/include/libmilter/mfapi.h Sun Jan 31 18:41:00 2010 (r203299) +++ stable/8/contrib/sendmail/include/libmilter/mfapi.h Sun Jan 31 18:59:03 2010 (r203300) @@ -7,7 +7,7 @@ * the sendmail distribution. * * - * $Id: mfapi.h,v 8.78 2008/02/27 22:30:34 ca Exp $ + * $Id: mfapi.h,v 8.80 2009/11/06 00:57:08 ca Exp $ */ /* @@ -18,7 +18,14 @@ # define _LIBMILTER_MFAPI_H 1 #ifndef SMFI_VERSION -# define SMFI_VERSION 0x01000001 /* libmilter version number */ +# if _FFR_MDS_NEGOTIATE +# define SMFI_VERSION 0x01000002 /* libmilter version number */ + + /* first libmilter version that has MDS support */ +# define SMFI_VERSION_MDS 0x01000002 +# else /* _FFR_MDS_NEGOTIATE */ +# define SMFI_VERSION 0x01000001 /* libmilter version number */ +# endif /* _FFR_MDS_NEGOTIATE */ #endif /* ! SMFI_VERSION */ #define SM_LM_VRS_MAJOR(v) (((v) & 0x7f000000) >> 24) @@ -163,9 +170,7 @@ LIBMILTER_API int smfi_setdbg __P((int)) LIBMILTER_API int smfi_settimeout __P((int)); LIBMILTER_API int smfi_setconn __P((char *)); LIBMILTER_API int smfi_stop __P((void)); -#if _FFR_MAXDATASIZE LIBMILTER_API size_t smfi_setmaxdatasize __P((size_t)); -#endif /* _FFR_MAXDATASIZE */ LIBMILTER_API int smfi_version __P((unsigned int *, unsigned int *, unsigned int *)); /* Modified: stable/8/contrib/sendmail/include/libmilter/mfdef.h ============================================================================== --- stable/8/contrib/sendmail/include/libmilter/mfdef.h Sun Jan 31 18:41:00 2010 (r203299) +++ stable/8/contrib/sendmail/include/libmilter/mfdef.h Sun Jan 31 18:59:03 2010 (r203300) @@ -7,7 +7,7 @@ * the sendmail distribution. * * - * $Id: mfdef.h,v 8.38 2007/03/27 18:53:48 ca Exp $ + * $Id: mfdef.h,v 8.39 2009/11/06 00:57:08 ca Exp $ */ /* @@ -27,6 +27,12 @@ #define MILTER_CHUNK_SIZE 65535 /* body chunk size */ #define MILTER_MAX_DATA_SIZE 65535 /* default milter command data limit */ +#if _FFR_MDS_NEGOTIATE +# define MILTER_MDS_64K ((64 * 1024) - 1) +# define MILTER_MDS_256K ((256 * 1024) - 1) +# define MILTER_MDS_1M ((1024 * 1024) - 1) +#endif /* _FFR_MDS_NEGOTIATE */ + /* These apply to SMFIF_* flags */ #define SMFI_V1_ACTS 0x0000000FL /* The actions of V1 filter */ #define SMFI_V2_ACTS 0x0000003FL /* The actions of V2 filter */ @@ -100,6 +106,9 @@ #define SMFIP_NR_EOH 0x00040000L /* No reply for eoh */ #define SMFIP_NR_BODY 0x00080000L /* No reply for body chunk */ #define SMFIP_HDR_LEADSPC 0x00100000L /* header value leading space */ +#define SMFIP_MDS_256K 0x10000000L /* MILTER_MAX_DATA_SIZE=256K */ +#define SMFIP_MDS_1M 0x20000000L /* MILTER_MAX_DATA_SIZE=1M */ +/* #define SMFIP_ 0x40000000L reserved: see SMFI_INTERNAL*/ #define SMFI_V1_PROT 0x0000003FL /* The protocol of V1 filter */ #define SMFI_V2_PROT 0x0000007FL /* The protocol of V2 filter */ @@ -107,4 +116,11 @@ /* all defined protocol bits */ #define SMFI_CURR_PROT 0x001FFFFFL +/* internal flags: only used between MTA and libmilter */ +#define SMFI_INTERNAL 0x70000000L + +#if _FFR_MILTER_CHECK +# define SMFIP_TEST 0x80000000L +#endif /* _FFR_MILTER_CHECK */ + #endif /* !_LIBMILTER_MFDEF_H */ Modified: stable/8/contrib/sendmail/include/sm/conf.h ============================================================================== --- stable/8/contrib/sendmail/include/sm/conf.h Sun Jan 31 18:41:00 2010 (r203299) +++ stable/8/contrib/sendmail/include/sm/conf.h Sun Jan 31 18:59:03 2010 (r203300) @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998-2007 Sendmail, Inc. and its suppliers. + * Copyright (c) 1998-2009 Sendmail, Inc. and its suppliers. * All rights reserved. * Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved. * Copyright (c) 1988, 1993 @@ -10,7 +10,7 @@ * the sendmail distribution. * * - * $Id: conf.h,v 1.134 2007/09/24 23:05:37 ca Exp $ + * $Id: conf.h,v 1.139 2009/06/16 23:41:32 ca Exp $ */ /* @@ -460,6 +460,7 @@ typedef int pid_t; # endif /* SOLARIS >= 21000 || (SOLARIS < 10000 && SOLARIS >= 210) */ # if SOLARIS >= 21100 || (SOLARIS < 10000 && SOLARIS >= 211) # define GETLDAPALIASBYNAME_VERSION 2 /* changed in S11 */ +# define HAVE_NANOSLEEP 1 /* moved from librt to libc in S11 */ # endif /* SOLARIS >= 21100 || (SOLARIS < 10000 && SOLARIS >= 211) */ # ifndef HASGETUSERSHELL # define HASGETUSERSHELL 0 /* getusershell(3) causes core dumps pre-2.7 */ @@ -1021,6 +1022,10 @@ extern unsigned int sleepX __P((unsigned # define SMRSH_PATH "/bin:/usr/bin" # endif /* ! SMRSH_PATH */ # endif /* __FreeBSD_version >= 330000 */ +# if __FreeBSD_version >= 430000 /* 4.3.0-release and later */ +# define SOCKADDR_LEN_T socklen_t /* e.g., arg#3 to accept, getsockname */ +# define SOCKOPT_LEN_T socklen_t /* arg#5 to getsockopt */ +# endif /* __FreeBSD_version >= 430000 */ # define USESYSCTL 1 /* use sysctl(3) for getting ncpus */ # include *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Jan 31 19:00:39 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 67F221065693; Sun, 31 Jan 2010 19:00:39 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 56B178FC15; Sun, 31 Jan 2010 19:00:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0VJ0dlP010515; Sun, 31 Jan 2010 19:00:39 GMT (envelope-from gshapiro@svn.freebsd.org) Received: (from gshapiro@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0VJ0dvc010513; Sun, 31 Jan 2010 19:00:39 GMT (envelope-from gshapiro@svn.freebsd.org) Message-Id: <201001311900.o0VJ0dvc010513@svn.freebsd.org> From: Gregory Neil Shapiro Date: Sun, 31 Jan 2010 19:00:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203301 - stable/8/contrib/sendmail X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 19:00:39 -0000 Author: gshapiro Date: Sun Jan 31 19:00:39 2010 New Revision: 203301 URL: http://svn.freebsd.org/changeset/base/203301 Log: MFC: Update FreeBSD information Modified: stable/8/contrib/sendmail/FREEBSD-upgrade Directory Properties: stable/8/contrib/sendmail/ (props changed) Modified: stable/8/contrib/sendmail/FREEBSD-upgrade ============================================================================== --- stable/8/contrib/sendmail/FREEBSD-upgrade Sun Jan 31 18:59:03 2010 (r203300) +++ stable/8/contrib/sendmail/FREEBSD-upgrade Sun Jan 31 19:00:39 2010 (r203301) @@ -1,6 +1,6 @@ $FreeBSD$ -sendmail 8.14.3 +sendmail 8.14.4 originals can be found at: ftp://ftp.sendmail.org/pub/sendmail/ For the import of sendmail, the following directories were renamed: @@ -110,4 +110,4 @@ infrastructure in FreeBSD: usr.sbin/mailwrapper/Makefile gshapiro@FreeBSD.org -27-August-2008 +25-January-2010 From owner-svn-src-all@FreeBSD.ORG Sun Jan 31 19:04:53 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 274171065670; Sun, 31 Jan 2010 19:04:53 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 15B538FC1D; Sun, 31 Jan 2010 19:04:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0VJ4qMS011555; Sun, 31 Jan 2010 19:04:52 GMT (envelope-from gshapiro@svn.freebsd.org) Received: (from gshapiro@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0VJ4q07011552; Sun, 31 Jan 2010 19:04:52 GMT (envelope-from gshapiro@svn.freebsd.org) Message-Id: <201001311904.o0VJ4q07011552@svn.freebsd.org> From: Gregory Neil Shapiro Date: Sun, 31 Jan 2010 19:04: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: r203302 - in stable/8/etc: . sendmail X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 19:04:53 -0000 Author: gshapiro Date: Sun Jan 31 19:04:52 2010 New Revision: 203302 URL: http://svn.freebsd.org/changeset/base/203302 Log: MFC: Minor changes to force commit these files so new freebsd*.cf files are built to use the new sendmail-8.14.4/cf tree. Modified: stable/8/etc/sendmail/freebsd.mc stable/8/etc/sendmail/freebsd.submit.mc Directory Properties: stable/8/etc/ (props changed) stable/8/etc/services (props changed) Modified: stable/8/etc/sendmail/freebsd.mc ============================================================================== --- stable/8/etc/sendmail/freebsd.mc Sun Jan 31 19:00:39 2010 (r203301) +++ stable/8/etc/sendmail/freebsd.mc Sun Jan 31 19:04:52 2010 (r203302) @@ -34,7 +34,7 @@ divert(-1) # # -# This is a generic configuration file for FreeBSD 5.X and later systems. +# This is a generic configuration file for FreeBSD 6.X and later systems. # If you want to customize it, copy it to a name appropriate for your # environment and do the modifications there. # Modified: stable/8/etc/sendmail/freebsd.submit.mc ============================================================================== --- stable/8/etc/sendmail/freebsd.submit.mc Sun Jan 31 19:00:39 2010 (r203301) +++ stable/8/etc/sendmail/freebsd.submit.mc Sun Jan 31 19:04:52 2010 (r203302) @@ -25,3 +25,4 @@ define(`confBIND_OPTS', `WorkAroundBroke dnl dnl If you use IPv6 only, change [127.0.0.1] to [IPv6:::1] FEATURE(`msp', `[127.0.0.1]')dnl + From owner-svn-src-all@FreeBSD.ORG Sun Jan 31 19:12:25 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DB1351065679; Sun, 31 Jan 2010 19:12:24 +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 C3D3F8FC17; Sun, 31 Jan 2010 19:12:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0VJCODb013289; Sun, 31 Jan 2010 19:12:24 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0VJCOEh013284; Sun, 31 Jan 2010 19:12:24 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201001311912.o0VJCOEh013284@svn.freebsd.org> From: Rick Macklem Date: Sun, 31 Jan 2010 19:12:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203303 - head/sys/fs/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 19:12:25 -0000 Author: rmacklem Date: Sun Jan 31 19:12:24 2010 New Revision: 203303 URL: http://svn.freebsd.org/changeset/base/203303 Log: Patch the experimental NFS client so that there is a timeout for negative name cache entries in a manner analogous to r202767 for the regular NFS client. Also, make the code in nfs_lookup() compatible with that of the regular client and replace the sysctl variable that enabled negative name caching with the mount point option. MFC after: 2 weeks Modified: head/sys/fs/nfsclient/nfs_clvfsops.c head/sys/fs/nfsclient/nfs_clvnops.c head/sys/fs/nfsclient/nfsmount.h head/sys/fs/nfsclient/nfsnode.h Modified: head/sys/fs/nfsclient/nfs_clvfsops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvfsops.c Sun Jan 31 19:04:52 2010 (r203302) +++ head/sys/fs/nfsclient/nfs_clvfsops.c Sun Jan 31 19:12:24 2010 (r203303) @@ -99,7 +99,7 @@ static void nfs_decode_args(struct mount struct nfs_args *argp, struct ucred *, struct thread *); static int mountnfs(struct nfs_args *, struct mount *, struct sockaddr *, char *, u_char *, u_char *, u_char *, - struct vnode **, struct ucred *, struct thread *); + struct vnode **, struct ucred *, struct thread *, int); static vfs_mount_t nfs_mount; static vfs_cmount_t nfs_cmount; static vfs_unmount_t nfs_unmount; @@ -498,7 +498,7 @@ nfs_mountdiskless(char *path, nam = sodupsockaddr((struct sockaddr *)sin, M_WAITOK); if ((error = mountnfs(args, mp, nam, path, NULL, NULL, NULL, vpp, - td->td_ucred, td)) != 0) { + td->td_ucred, td, NFS_DEFAULT_NEGNAMETIMEO)) != 0) { printf("nfs_mountroot: mount %s on /: %d\n", path, error); return (error); } @@ -669,6 +669,7 @@ static const char *nfs_opts[] = { "from" "retrans", "acregmin", "acregmax", "acdirmin", "acdirmax", "resvport", "readahead", "hostname", "timeout", "addr", "fh", "nfsv3", "sec", "principal", "nfsv4", "gssname", "allgssname", "dirpath", + "negnametimeo", NULL }; /* @@ -717,6 +718,7 @@ nfs_mount(struct mount *mp) char hst[MNAMELEN]; u_char nfh[NFSX_FHMAX], krbname[100], dirpath[100], srvkrbname[100]; char *opt, *name, *secname; + int negnametimeo = NFS_DEFAULT_NEGNAMETIMEO; if (vfs_filteropt(mp->mnt_optnew, nfs_opts)) { error = EINVAL; @@ -891,6 +893,16 @@ nfs_mount(struct mount *mp) } args.flags |= NFSMNT_TIMEO; } + if (vfs_getopt(mp->mnt_optnew, "negnametimeo", (void **)&opt, NULL) + == 0) { + ret = sscanf(opt, "%d", &negnametimeo); + if (ret != 1 || negnametimeo < 0) { + vfs_mount_error(mp, "illegal negnametimeo: %s", + opt); + error = EINVAL; + goto out; + } + } if (vfs_getopt(mp->mnt_optnew, "sec", (void **) &secname, NULL) == 0) nfs_sec_name(secname, &args.flags); @@ -990,7 +1002,7 @@ nfs_mount(struct mount *mp) args.fh = nfh; error = mountnfs(&args, mp, nam, hst, krbname, dirpath, srvkrbname, - &vp, td->td_ucred, td); + &vp, td->td_ucred, td, negnametimeo); out: if (!error) { MNT_ILOCK(mp); @@ -1033,7 +1045,8 @@ nfs_cmount(struct mntarg *ma, void *data static int mountnfs(struct nfs_args *argp, struct mount *mp, struct sockaddr *nam, char *hst, u_char *krbname, u_char *dirpath, u_char *srvkrbname, - struct vnode **vpp, struct ucred *cred, struct thread *td) + struct vnode **vpp, struct ucred *cred, struct thread *td, + int negnametimeo) { struct nfsmount *nmp; struct nfsnode *np; @@ -1101,6 +1114,7 @@ mountnfs(struct nfs_args *argp, struct m vfs_getnewfsid(mp); nmp->nm_mountp = mp; mtx_init(&nmp->nm_mtx, "NFSmount lock", NULL, MTX_DEF | MTX_DUPOK); + nmp->nm_negnametimeo = negnametimeo; nfs_decode_args(mp, nmp, argp, cred, td); Modified: head/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvnops.c Sun Jan 31 19:04:52 2010 (r203302) +++ head/sys/fs/nfsclient/nfs_clvnops.c Sun Jan 31 19:12:24 2010 (r203303) @@ -220,10 +220,6 @@ int newnfs_directio_enable = 0; SYSCTL_INT(_vfs_newnfs, OID_AUTO, directio_enable, CTLFLAG_RW, &newnfs_directio_enable, 0, "Enable NFS directio"); -static int newnfs_neglookup_enable = 1; -SYSCTL_INT(_vfs_newnfs, OID_AUTO, neglookup_enable, CTLFLAG_RW, - &newnfs_neglookup_enable, 0, "Enable NFS negative lookup caching"); - /* * This sysctl allows other processes to mmap a file that has been opened * O_DIRECT by a process. In general, having processes mmap the file while @@ -702,11 +698,11 @@ nfs_close(struct vop_close_args *ap) * enabled. (What does this have to do with negative lookup * caching? Well nothing, except it was reported by the * same user that needed negative lookup caching and I wanted - * there to be a way to disable it via sysctl to see if it + * there to be a way to disable it to see if it * is the cause of some caching/coherency issue that might * crop up.) */ - if (newnfs_neglookup_enable == 0) + if (VFSTONFS(vp->v_mount)->nm_negnametimeo == 0) np->n_attrstamp = 0; if (np->n_flag & NWRITEERR) { np->n_flag &= ~NWRITEERR; @@ -996,6 +992,8 @@ nfs_lookup(struct vop_lookup_args *ap) struct thread *td = cnp->cn_thread; struct nfsfh *nfhp; struct nfsvattr dnfsva, nfsva; + struct vattr vattr; + time_t dmtime; *vpp = NULLVP; if ((flags & ISLASTCN) && (mp->mnt_flag & MNT_RDONLY) && @@ -1016,37 +1014,68 @@ nfs_lookup(struct vop_lookup_args *ap) if ((error = VOP_ACCESS(dvp, VEXEC, cnp->cn_cred, td)) != 0) return (error); - if ((error = cache_lookup(dvp, vpp, cnp)) && - (error != ENOENT || newnfs_neglookup_enable != 0)) { - struct vattr vattr; - - if (error == ENOENT) { - if (!VOP_GETATTR(dvp, &vattr, cnp->cn_cred) && - vattr.va_mtime.tv_sec == np->n_dmtime) { - NFSINCRGLOBAL(newnfsstats.lookupcache_hits); - return (ENOENT); - } - cache_purge_negative(dvp); - np->n_dmtime = 0; - } else { - newvp = *vpp; - if (nfscl_nodeleg(newvp, 0) == 0 || - (!VOP_GETATTR(newvp, &vattr, cnp->cn_cred) && - vattr.va_ctime.tv_sec==VTONFS(newvp)->n_ctime)) { - NFSINCRGLOBAL(newnfsstats.lookupcache_hits); - if (cnp->cn_nameiop != LOOKUP && - (flags & ISLASTCN)) - cnp->cn_flags |= SAVENAME; - return (0); - } - cache_purge(newvp); - if (dvp != newvp) - vput(newvp); - else - vrele(newvp); - *vpp = NULLVP; + error = cache_lookup(dvp, vpp, cnp); + if (error > 0 && error != ENOENT) + return (error); + if (error == -1) { + /* + * We only accept a positive hit in the cache if the + * change time of the file matches our cached copy. + * Otherwise, we discard the cache entry and fallback + * to doing a lookup RPC. + */ + newvp = *vpp; + if (nfscl_nodeleg(newvp, 0) == 0 || + (!VOP_GETATTR(newvp, &vattr, cnp->cn_cred) + && vattr.va_ctime.tv_sec == VTONFS(newvp)->n_ctime)) { + NFSINCRGLOBAL(newnfsstats.lookupcache_hits); + if (cnp->cn_nameiop != LOOKUP && + (flags & ISLASTCN)) + cnp->cn_flags |= SAVENAME; + return (0); } + cache_purge(newvp); + if (dvp != newvp) + vput(newvp); + else + vrele(newvp); + *vpp = NULLVP; + } else if (error == ENOENT) { + if (dvp->v_iflag & VI_DOOMED) + return (ENOENT); + /* + * We only accept a negative hit in the cache if the + * modification time of the parent directory matches + * our cached copy. Otherwise, we discard all of the + * negative cache entries for this directory. We also + * only trust -ve cache entries for less than + * nm_negative_namecache_timeout seconds. + */ + if ((u_int)(ticks - np->n_dmtime_ticks) < + (nmp->nm_negnametimeo * hz) && + VOP_GETATTR(dvp, &vattr, cnp->cn_cred) == 0 && + vattr.va_mtime.tv_sec == np->n_dmtime) { + NFSINCRGLOBAL(newnfsstats.lookupcache_hits); + return (ENOENT); + } + cache_purge_negative(dvp); + mtx_lock(&np->n_mtx); + np->n_dmtime = 0; + mtx_unlock(&np->n_mtx); } + + /* + * Cache the modification time of the parent directory in case + * the lookup fails and results in adding the first negative + * name cache entry for the directory. Since this is reading + * a single time_t, don't bother with locking. The + * modification time may be a bit stale, but it must be read + * before performing the lookup RPC to prevent a race where + * another lookup updates the timestamp on the directory after + * the lookup RPC has been performed on the server but before + * n_dmtime is set at the end of this function. + */ + dmtime = np->n_vattr.na_mtime.tv_sec; error = 0; newvp = NULLVP; NFSINCRGLOBAL(newnfsstats.lookupcache_misses); @@ -1056,29 +1085,60 @@ nfs_lookup(struct vop_lookup_args *ap) if (dattrflag) (void) nfscl_loadattrcache(&dvp, &dnfsva, NULL, NULL, 0, 1); if (error) { - if (newnfs_neglookup_enable != 0 && - error == ENOENT && (cnp->cn_flags & MAKEENTRY) && - cnp->cn_nameiop != CREATE) { - if (np->n_dmtime == 0) - np->n_dmtime = np->n_vattr.na_mtime.tv_sec; - cache_enter(dvp, NULL, cnp); - } if (newvp != NULLVP) { vput(newvp); *vpp = NULLVP; } + + if (error != ENOENT) { + if (NFS_ISV4(dvp)) + error = nfscl_maperr(td, error, (uid_t)0, + (gid_t)0); + return (error); + } + + /* The requested file was not found. */ if ((cnp->cn_nameiop == CREATE || cnp->cn_nameiop == RENAME) && - (flags & ISLASTCN) && error == ENOENT) { + (flags & ISLASTCN)) { + /* + * XXX: UFS does a full VOP_ACCESS(dvp, + * VWRITE) here instead of just checking + * MNT_RDONLY. + */ if (mp->mnt_flag & MNT_RDONLY) - error = EROFS; - else - error = EJUSTRETURN; - } - if (cnp->cn_nameiop != LOOKUP && (flags & ISLASTCN)) + return (EROFS); cnp->cn_flags |= SAVENAME; - if (NFS_ISV4(dvp)) - error = nfscl_maperr(td, error, (uid_t)0, (gid_t)0); - return (error); + return (EJUSTRETURN); + } + + if ((cnp->cn_flags & MAKEENTRY) && cnp->cn_nameiop != CREATE) { + /* + * Maintain n_dmtime as the modification time + * of the parent directory when the oldest -ve + * name cache entry for this directory was + * added. If a -ve cache entry has already + * been added with a newer modification time + * by a concurrent lookup, then don't bother + * adding a cache entry. The modification + * time of the directory might have changed + * due to the file this lookup failed to find + * being created. In that case a subsequent + * lookup would incorrectly use the entry + * added here instead of doing an extra + * lookup. + */ + mtx_lock(&np->n_mtx); + if (np->n_dmtime <= dmtime) { + if (np->n_dmtime == 0) { + np->n_dmtime = dmtime; + np->n_dmtime_ticks = ticks; + } + mtx_unlock(&np->n_mtx); + cache_enter(dvp, NULL, cnp); + } else + mtx_unlock(&np->n_mtx); + } + return (ENOENT); } /* @@ -1829,7 +1889,7 @@ nfs_link(struct vop_link_args *ap) * but if negative caching is enabled, then the system * must care about lookup caching hit rate, so... */ - if (newnfs_neglookup_enable != 0 && + if (VFSTONFS(vp->v_mount)->nm_negnametimeo != 0 && (cnp->cn_flags & MAKEENTRY)) cache_enter(tdvp, vp, cnp); if (error && NFS_ISV4(vp)) @@ -1893,7 +1953,7 @@ nfs_symlink(struct vop_symlink_args *ap) * but if negative caching is enabled, then the system * must care about lookup caching hit rate, so... */ - if (newnfs_neglookup_enable != 0 && + if (VFSTONFS(dvp->v_mount)->nm_negnametimeo != 0 && (cnp->cn_flags & MAKEENTRY)) cache_enter(dvp, newvp, cnp); *ap->a_vpp = newvp; @@ -1973,7 +2033,7 @@ nfs_mkdir(struct vop_mkdir_args *ap) * but if negative caching is enabled, then the system * must care about lookup caching hit rate, so... */ - if (newnfs_neglookup_enable != 0 && + if (VFSTONFS(dvp->v_mount)->nm_negnametimeo != 0 && (cnp->cn_flags & MAKEENTRY)) cache_enter(dvp, newvp, cnp); *ap->a_vpp = newvp; Modified: head/sys/fs/nfsclient/nfsmount.h ============================================================================== --- head/sys/fs/nfsclient/nfsmount.h Sun Jan 31 19:04:52 2010 (r203302) +++ head/sys/fs/nfsclient/nfsmount.h Sun Jan 31 19:12:24 2010 (r203303) @@ -69,6 +69,7 @@ struct nfsmount { u_int64_t nm_maxfilesize; /* maximum file size */ int nm_tprintf_initial_delay; /* initial delay */ int nm_tprintf_delay; /* interval for messages */ + int nm_negnametimeo; /* timeout for -ve entries (sec) */ /* Newnfs additions */ struct nfsclclient *nm_clp; @@ -99,6 +100,10 @@ struct nfsmount { */ #define VFSTONFS(mp) ((struct nfsmount *)((mp)->mnt_data)) +#ifndef NFS_DEFAULT_NEGNAMETIMEO +#define NFS_DEFAULT_NEGNAMETIMEO 60 +#endif + #endif /* _KERNEL */ #endif /* _NFSCLIENT_NFSMOUNT_H_ */ Modified: head/sys/fs/nfsclient/nfsnode.h ============================================================================== --- head/sys/fs/nfsclient/nfsnode.h Sun Jan 31 19:04:52 2010 (r203302) +++ head/sys/fs/nfsclient/nfsnode.h Sun Jan 31 19:12:24 2010 (r203303) @@ -108,6 +108,7 @@ struct nfsnode { struct timespec n_mtime; /* Prev modify time. */ time_t n_ctime; /* Prev create time. */ time_t n_dmtime; /* Prev dir modify time. */ + int n_dmtime_ticks; /* Tick of -ve cache entry */ time_t n_expiry; /* Lease expiry time */ struct nfsfh *n_fhp; /* NFS File Handle */ struct vnode *n_vnode; /* associated vnode */ From owner-svn-src-all@FreeBSD.ORG Sun Jan 31 19:15:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A5F621065695; Sun, 31 Jan 2010 19:15:47 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 946DB8FC26; Sun, 31 Jan 2010 19:15:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0VJFlq7014083; Sun, 31 Jan 2010 19:15:47 GMT (envelope-from gshapiro@svn.freebsd.org) Received: (from gshapiro@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0VJFl65014081; Sun, 31 Jan 2010 19:15:47 GMT (envelope-from gshapiro@svn.freebsd.org) Message-Id: <201001311915.o0VJFl65014081@svn.freebsd.org> From: Gregory Neil Shapiro Date: Sun, 31 Jan 2010 19:15:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203304 - stable/7/contrib/sendmail/src X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 19:15:47 -0000 Author: gshapiro Date: Sun Jan 31 19:15:47 2010 New Revision: 203304 URL: http://svn.freebsd.org/changeset/base/203304 Log: MFC: Merge from vendor dist: Bring in a change already in the sendmail repository that will allow sendmail to be built with the c99 compiler. Approved by: re (kensmith) Modified: stable/7/contrib/sendmail/src/sendmail.h Directory Properties: stable/7/contrib/sendmail/ (props changed) Modified: stable/7/contrib/sendmail/src/sendmail.h ============================================================================== --- stable/7/contrib/sendmail/src/sendmail.h Sun Jan 31 19:12:24 2010 (r203303) +++ stable/7/contrib/sendmail/src/sendmail.h Sun Jan 31 19:15:47 2010 (r203304) @@ -2642,7 +2642,7 @@ extern void unsetenv __P((char *)); /* update file system information: +/- some blocks */ #if SM_CONF_SHM -extern void upd_qs __P((ENVELOPE *, bool, bool, char *)); +extern void upd_qs __P((ENVELOPE *, int, int, char *)); # define updfs(e, count, space, where) upd_qs(e, count, space, where) #else /* SM_CONF_SHM */ # define updfs(e, count, space, where) From owner-svn-src-all@FreeBSD.ORG Sun Jan 31 19:17:13 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D2686106566C; Sun, 31 Jan 2010 19:17:13 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9B83E8FC0C; Sun, 31 Jan 2010 19:17:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0VJHDuI014490; Sun, 31 Jan 2010 19:17:13 GMT (envelope-from gshapiro@svn.freebsd.org) Received: (from gshapiro@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0VJHD6R014470; Sun, 31 Jan 2010 19:17:13 GMT (envelope-from gshapiro@svn.freebsd.org) Message-Id: <201001311917.o0VJHD6R014470@svn.freebsd.org> From: Gregory Neil Shapiro Date: Sun, 31 Jan 2010 19:17:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203305 - in stable/7/contrib/sendmail: . cf cf/cf cf/feature cf/m4 contrib doc/op include/libmilter include/sm libmilter libmilter/docs libsm libsmdb libsmutil praliases src vacation X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 19:17:13 -0000 Author: gshapiro Date: Sun Jan 31 19:17:12 2010 New Revision: 203305 URL: http://svn.freebsd.org/changeset/base/203305 Log: MFC: Merge sendmail 8.14.4 Approved by: re (kensmith) Modified: stable/7/contrib/sendmail/CACerts stable/7/contrib/sendmail/LICENSE stable/7/contrib/sendmail/PGPKEYS stable/7/contrib/sendmail/README stable/7/contrib/sendmail/RELEASE_NOTES stable/7/contrib/sendmail/cf/README stable/7/contrib/sendmail/cf/cf/submit.cf stable/7/contrib/sendmail/cf/feature/ldap_routing.m4 stable/7/contrib/sendmail/cf/m4/cfhead.m4 stable/7/contrib/sendmail/cf/m4/proto.m4 stable/7/contrib/sendmail/cf/m4/version.m4 stable/7/contrib/sendmail/contrib/qtool.pl stable/7/contrib/sendmail/contrib/smcontrol.pl stable/7/contrib/sendmail/doc/op/op.me stable/7/contrib/sendmail/include/libmilter/mfapi.h stable/7/contrib/sendmail/include/libmilter/mfdef.h stable/7/contrib/sendmail/include/sm/conf.h stable/7/contrib/sendmail/include/sm/ldap.h stable/7/contrib/sendmail/include/sm/sem.h stable/7/contrib/sendmail/libmilter/Makefile.m4 stable/7/contrib/sendmail/libmilter/comm.c stable/7/contrib/sendmail/libmilter/docs/api.html stable/7/contrib/sendmail/libmilter/docs/overview.html stable/7/contrib/sendmail/libmilter/docs/smfi_addheader.html stable/7/contrib/sendmail/libmilter/docs/smfi_chgheader.html stable/7/contrib/sendmail/libmilter/docs/smfi_insheader.html stable/7/contrib/sendmail/libmilter/engine.c stable/7/contrib/sendmail/libmilter/example.c stable/7/contrib/sendmail/libmilter/handler.c stable/7/contrib/sendmail/libmilter/libmilter.h stable/7/contrib/sendmail/libmilter/listener.c stable/7/contrib/sendmail/libmilter/main.c stable/7/contrib/sendmail/libmilter/worker.c stable/7/contrib/sendmail/libsm/debug.c stable/7/contrib/sendmail/libsm/ldap.c stable/7/contrib/sendmail/libsm/mbdb.c stable/7/contrib/sendmail/libsm/sem.c stable/7/contrib/sendmail/libsm/t-sem.c stable/7/contrib/sendmail/libsmdb/smdb1.c stable/7/contrib/sendmail/libsmdb/smdb2.c stable/7/contrib/sendmail/libsmutil/safefile.c stable/7/contrib/sendmail/praliases/praliases.8 stable/7/contrib/sendmail/praliases/praliases.c stable/7/contrib/sendmail/src/Makefile.m4 stable/7/contrib/sendmail/src/README stable/7/contrib/sendmail/src/TRACEFLAGS stable/7/contrib/sendmail/src/collect.c stable/7/contrib/sendmail/src/conf.c stable/7/contrib/sendmail/src/conf.h stable/7/contrib/sendmail/src/daemon.c stable/7/contrib/sendmail/src/deliver.c stable/7/contrib/sendmail/src/envelope.c stable/7/contrib/sendmail/src/headers.c stable/7/contrib/sendmail/src/main.c stable/7/contrib/sendmail/src/map.c stable/7/contrib/sendmail/src/milter.c stable/7/contrib/sendmail/src/queue.c stable/7/contrib/sendmail/src/ratectrl.c stable/7/contrib/sendmail/src/readcf.c stable/7/contrib/sendmail/src/savemail.c stable/7/contrib/sendmail/src/sendmail.8 stable/7/contrib/sendmail/src/sendmail.h stable/7/contrib/sendmail/src/sfsasl.c stable/7/contrib/sendmail/src/srvrsmtp.c stable/7/contrib/sendmail/src/tls.c stable/7/contrib/sendmail/src/usersmtp.c stable/7/contrib/sendmail/src/util.c stable/7/contrib/sendmail/src/version.c stable/7/contrib/sendmail/vacation/vacation.c Directory Properties: stable/7/contrib/sendmail/ (props changed) Modified: stable/7/contrib/sendmail/CACerts ============================================================================== --- stable/7/contrib/sendmail/CACerts Sun Jan 31 19:15:47 2010 (r203304) +++ stable/7/contrib/sendmail/CACerts Sun Jan 31 19:17:12 2010 (r203305) @@ -1,4 +1,4 @@ -# $Id: CACerts,v 8.3 2007/06/11 22:04:46 ca Exp $ +# $Id: CACerts,v 8.4 2009/06/26 05:46:10 ca Exp $ # This file contains some CA certificates that are used to sign the # certificates of mail servers of members of the sendmail consortium # who may reply to questions etc sent to sendmail.org. @@ -11,73 +11,6 @@ Certificate: Version: 3 (0x2) Serial Number: 0 (0x0) Signature Algorithm: md5WithRSAEncryption - Issuer: C=US, ST=California, L=Berkeley, O=Sendmail Consortium, CN=Certificate Authority/emailAddress=certificates@sendmail.org - Validity - Not Before: Feb 1 21:51:47 2003 GMT - Not After : Jan 31 21:51:47 2008 GMT - Subject: C=US, ST=California, L=Berkeley, O=Sendmail Consortium, CN=Certificate Authority/emailAddress=certificates@sendmail.org - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - RSA Public Key: (1024 bit) - Modulus (1024 bit): - 00:9a:fb:dc:4c:a3:58:21:1b:84:78:0a:53:56:b3: - 8d:84:05:b7:db:dd:d7:81:ea:dd:c1:ab:d4:be:d9: - 2b:12:e0:6d:3a:31:d5:f0:7b:13:fc:d8:da:09:0b: - 71:11:8e:b9:48:c4:ab:ae:f5:9c:4c:e2:04:27:8e: - c8:03:3a:aa:00:8b:46:f2:79:09:ae:65:b2:9a:66: - e7:ac:a9:ea:32:f7:4a:4e:fd:da:41:48:34:5a:9d: - b0:42:ea:55:40:17:27:5e:67:9e:e5:ce:dc:84:6d: - 1d:48:37:23:11:68:9d:a8:d4:58:02:05:ea:88:35: - bd:0d:b6:28:d5:cd:d4:d8:95 - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Subject Key Identifier: - DE:CD:6E:B8:89:34:06:3D:E9:CD:A7:FE:45:4F:4E:FB:E1:8D:E7:79 - X509v3 Authority Key Identifier: - keyid:DE:CD:6E:B8:89:34:06:3D:E9:CD:A7:FE:45:4F:4E:FB:E1:8D:E7:79 - DirName:/C=US/ST=California/L=Berkeley/O=Sendmail Consortium/CN=Certificate Authority/emailAddress=certificates@sendmail.org - serial:00 - - X509v3 Basic Constraints: - CA:TRUE - Signature Algorithm: md5WithRSAEncryption - 66:92:b9:57:17:3b:6a:0e:72:b1:85:29:53:9f:11:68:a0:0d: - 79:43:d0:7c:48:73:b9:71:09:50:08:02:03:0b:28:0c:33:9a: - 00:ac:94:69:4f:bc:0f:45:6b:f5:3a:ca:6a:87:a1:7f:28:f7: - 9a:c4:b6:b0:f3:dc:a3:eb:42:95:9f:99:19:f8:b8:84:6d:f1: - 1d:bc:9f:f0:a0:cc:60:2d:00:6b:17:55:33:16:85:d1:73:e1: - 00:59:89:33:19:c4:2e:29:5a:39:a7:0e:e7:9b:d2:4c:c7:b9: - 7d:6a:3e:b4:00:83:86:d3:16:28:fd:ad:55:65:60:4e:14:02: - 46:d3 ------BEGIN CERTIFICATE----- -MIIDsDCCAxmgAwIBAgIBADANBgkqhkiG9w0BAQQFADCBnTELMAkGA1UEBhMCVVMx -EzARBgNVBAgTCkNhbGlmb3JuaWExETAPBgNVBAcTCEJlcmtlbGV5MRwwGgYDVQQK -ExNTZW5kbWFpbCBDb25zb3J0aXVtMR4wHAYDVQQDExVDZXJ0aWZpY2F0ZSBBdXRo -b3JpdHkxKDAmBgkqhkiG9w0BCQEWGWNlcnRpZmljYXRlc0BzZW5kbWFpbC5vcmcw -HhcNMDMwMjAxMjE1MTQ3WhcNMDgwMTMxMjE1MTQ3WjCBnTELMAkGA1UEBhMCVVMx -EzARBgNVBAgTCkNhbGlmb3JuaWExETAPBgNVBAcTCEJlcmtlbGV5MRwwGgYDVQQK -ExNTZW5kbWFpbCBDb25zb3J0aXVtMR4wHAYDVQQDExVDZXJ0aWZpY2F0ZSBBdXRo -b3JpdHkxKDAmBgkqhkiG9w0BCQEWGWNlcnRpZmljYXRlc0BzZW5kbWFpbC5vcmcw -gZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAJr73EyjWCEbhHgKU1azjYQFt9vd -14Hq3cGr1L7ZKxLgbTox1fB7E/zY2gkLcRGOuUjEq671nEziBCeOyAM6qgCLRvJ5 -Ca5lsppm56yp6jL3Sk792kFINFqdsELqVUAXJ15nnuXO3IRtHUg3IxFonajUWAIF -6og1vQ22KNXN1NiVAgMBAAGjgf0wgfowHQYDVR0OBBYEFN7NbriJNAY96c2n/kVP -Tvvhjed5MIHKBgNVHSMEgcIwgb+AFN7NbriJNAY96c2n/kVPTvvhjed5oYGjpIGg -MIGdMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTERMA8GA1UEBxMI -QmVya2VsZXkxHDAaBgNVBAoTE1NlbmRtYWlsIENvbnNvcnRpdW0xHjAcBgNVBAMT -FUNlcnRpZmljYXRlIEF1dGhvcml0eTEoMCYGCSqGSIb3DQEJARYZY2VydGlmaWNh -dGVzQHNlbmRtYWlsLm9yZ4IBADAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBAUA -A4GBAGaSuVcXO2oOcrGFKVOfEWigDXlD0HxIc7lxCVAIAgMLKAwzmgCslGlPvA9F -a/U6ymqHoX8o95rEtrDz3KPrQpWfmRn4uIRt8R28n/CgzGAtAGsXVTMWhdFz4QBZ -iTMZxC4pWjmnDueb0kzHuX1qPrQAg4bTFij9rVVlYE4UAkbT ------END CERTIFICATE----- - - -Certificate: - Data: - Version: 3 (0x2) - Serial Number: 0 (0x0) - Signature Algorithm: md5WithRSAEncryption Issuer: C=US, ST=Illinois, L=De Kalb, O=Northern Illinois University, OU=Computer Science, CN=Neil Rickert/emailAddress=rickert@cs.niu.edu Validity Not Before: May 12 00:40:50 2000 GMT @@ -144,93 +77,93 @@ Certificate: Data: Version: 3 (0x2) Serial Number: - fa:7c:2c:80:29:3f:c2:64 + c2:3c:61:67:3b:0a:cc:5e Signature Algorithm: md5WithRSAEncryption - Issuer: C=US, ST=California, L=Berkeley, O=Endmail Org, OU=MTA, CN=Claus Assmann CA RSA 2007/emailAddress=ca+ca-rsa2007@esmtp.org + Issuer: C=US, ST=California, L=Berkeley, O=Endmail Org, OU=MTA, CN=Claus Assmann CA RSA 2009/emailAddress=ca+ca-rsa2009@esmtp.org Validity - Not Before: May 4 02:07:56 2007 GMT - Not After : May 3 02:07:56 2010 GMT - Subject: C=US, ST=California, L=Berkeley, O=Endmail Org, OU=MTA, CN=Claus Assmann CA RSA 2007/emailAddress=ca+ca-rsa2007@esmtp.org + Not Before: May 14 04:42:18 2009 GMT + Not After : May 13 04:42:18 2012 GMT + Subject: C=US, ST=California, L=Berkeley, O=Endmail Org, OU=MTA, CN=Claus Assmann CA RSA 2009/emailAddress=ca+ca-rsa2009@esmtp.org Subject Public Key Info: Public Key Algorithm: rsaEncryption RSA Public Key: (2048 bit) Modulus (2048 bit): - 00:b0:28:91:31:af:82:ce:72:ef:36:ab:7d:e9:b1: - f5:77:66:38:4b:38:1f:5f:3d:12:d3:c8:fd:9a:f4: - d4:f6:b8:90:f9:26:5f:29:f7:43:f9:34:ec:65:62: - 01:bb:64:f1:5d:ea:75:04:3d:92:65:60:a2:06:62: - fa:88:ca:d8:20:50:c8:1e:38:53:b5:18:dd:b7:bd: - c7:08:35:4c:d9:dc:c6:97:56:37:b6:65:33:74:5a: - b2:c3:85:08:2b:b7:26:70:ff:38:02:1a:67:6a:d0: - 49:18:10:4b:f8:db:af:06:9c:b1:a8:82:a1:b1:75: - d2:52:9b:53:0c:ca:a7:e3:15:38:79:6d:a1:f5:ef: - 7c:8b:fd:bd:04:78:f9:e8:1e:b9:92:ea:74:d7:45: - 1e:4c:c8:bd:f4:5c:fc:1a:7f:e7:31:c6:ab:cb:78: - c7:4d:2f:b5:72:10:35:27:4a:1a:fa:53:19:f8:a7: - 59:63:eb:e9:15:ab:dc:71:69:8c:42:1c:96:4e:89: - 80:66:c9:9e:21:d5:3d:08:19:74:a5:f5:07:a0:ae: - de:79:af:fd:42:c2:79:7e:8c:f8:39:22:3b:c3:c4: - 58:3b:d0:0d:e6:a9:11:b6:a2:cd:2e:e5:16:66:fd: - 7e:65:33:94:b0:36:80:27:f5:80:76:a9:e5:df:f2: - cf:ef + 00:d5:f8:d3:48:38:75:df:2e:6b:8b:c4:8d:1d:41: + 5e:ad:4b:96:3d:48:c2:dc:e5:ff:61:98:95:32:03: + e9:b6:71:5a:68:31:bc:e1:5c:aa:0e:70:a7:bc:51: + b7:13:6a:78:54:ae:a6:d0:44:49:1b:5e:37:5b:59: + 20:01:47:a7:ec:41:4c:11:79:8c:25:c1:1b:c0:ed: + 85:b2:de:0f:10:9f:e7:b2:a3:c4:f1:fc:85:51:aa: + d6:68:49:51:3e:04:e1:eb:e9:cd:87:1b:d0:9d:97: + 7b:4c:e1:1e:b1:6a:be:01:0a:a9:97:9a:50:89:e3: + 66:06:4c:07:cb:7e:99:70:13:e8:b4:9c:e7:e6:52: + 38:c0:64:90:42:d0:f5:cf:22:46:22:60:e9:34:70: + 1d:e3:d1:13:33:3a:31:ba:13:06:a8:c2:34:90:47: + c5:a1:bd:2d:7d:98:21:70:de:22:d0:13:11:e5:08: + dd:a0:77:0b:df:34:a7:07:55:de:5a:71:f6:6c:9e: + ec:f7:45:75:1f:22:a9:84:06:c6:4f:84:3d:4e:05: + d7:e4:e5:98:41:61:7b:8e:c9:3b:a6:ed:31:80:7d: + fd:fa:f0:dc:b7:07:82:b8:ec:27:20:39:5f:78:95: + f1:0d:93:8d:f9:4d:21:08:fd:72:89:01:ff:2c:a0: + 71:9d Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - B2:49:6B:52:45:EE:90:36:D2:79:47:03:33:D9:A0:BA:80:50:DA:1C + A7:61:FA:31:AF:A8:E2:5E:93:B6:84:9E:74:08:A2:76:50:87:69:7C X509v3 Authority Key Identifier: - keyid:B2:49:6B:52:45:EE:90:36:D2:79:47:03:33:D9:A0:BA:80:50:DA:1C - DirName:/C=US/ST=California/L=Berkeley/O=Endmail Org/OU=MTA/CN=Claus Assmann CA RSA 2007/emailAddress=ca+ca-rsa2007@esmtp.org - serial:FA:7C:2C:80:29:3F:C2:64 + keyid:A7:61:FA:31:AF:A8:E2:5E:93:B6:84:9E:74:08:A2:76:50:87:69:7C + DirName:/C=US/ST=California/L=Berkeley/O=Endmail Org/OU=MTA/CN=Claus Assmann CA RSA 2009/emailAddress=ca+ca-rsa2009@esmtp.org + serial:C2:3C:61:67:3B:0A:CC:5E X509v3 Basic Constraints: - CA:TRUE + CA:TRUE X509v3 Subject Alternative Name: - email:ca+ca-rsa2007@esmtp.org + email:ca+ca-rsa2009@esmtp.org X509v3 Issuer Alternative Name: - email:ca+ca-rsa2007@esmtp.org + email:ca+ca-rsa2009@esmtp.org Signature Algorithm: md5WithRSAEncryption - 98:98:7c:d3:d0:5b:72:47:15:e6:22:68:bb:78:0e:78:66:e9: - 56:16:d8:bc:9d:5a:dc:27:29:fb:91:2d:6a:21:35:18:56:b4: - 4f:2a:09:c0:08:6f:9a:59:2b:2e:72:9a:fb:50:ba:c7:a9:91: - a0:f9:6c:be:cf:78:42:43:02:70:53:97:ba:6a:e3:da:17:e8: - 1f:c7:3a:5b:e7:bc:eb:e5:24:4c:f5:cf:61:34:1e:20:ed:17: - 63:ef:81:d3:9e:25:fe:cc:05:19:cc:8a:82:c9:4c:3a:b5:6b: - 49:51:76:46:02:aa:60:bb:c4:b9:61:48:33:da:79:8d:46:a3: - 06:20:98:f3:b2:db:3b:ad:c9:1d:0e:97:3d:b7:14:19:d3:7d: - 04:8b:6a:81:e0:11:5b:e1:35:a3:ff:2f:11:86:1c:31:85:7a: - fd:3f:36:ef:99:25:46:2e:b0:cb:43:45:4a:ec:be:d3:3f:a4: - 77:9b:79:cc:ce:92:63:a5:d9:ed:db:a0:9d:5d:7c:d7:80:f6: - c9:41:fb:02:96:8e:fd:f3:da:05:9d:81:a7:25:da:26:35:3b: - a9:0c:8c:f5:a7:5d:48:ec:87:c7:7a:60:51:76:f2:de:9b:14: - 2b:55:8a:43:df:99:19:f3:eb:e7:03:e6:a7:a2:a2:28:dd:d5: - 07:6a:3f:f7 + b3:38:e0:da:a8:07:d8:cc:b8:4d:8c:20:a6:06:2c:f8:27:db: + 8e:28:0f:39:bd:d9:24:c7:9f:e0:4d:d6:b6:63:42:36:0f:d8: + 70:41:e7:9e:a2:24:64:05:ea:85:97:ac:f2:cc:c2:a6:71:bb: + 30:21:c1:c7:c4:54:34:1d:30:09:f0:9b:74:27:93:59:12:4c: + 53:0b:8c:3e:d0:39:ed:4a:d0:d9:66:24:d8:e7:e5:9c:a8:6d: + 5f:56:5d:9a:91:fe:1b:7d:b9:7c:79:9e:1c:b9:71:74:14:f8: + 0c:30:50:f9:b1:22:56:a8:4d:6f:4b:9b:e5:8a:81:33:1b:77: + 75:f6:d8:ce:d4:90:34:86:34:d1:86:75:a9:e1:23:e6:af:c1: + 8e:28:97:47:20:4d:1b:57:09:39:f4:56:01:d2:87:43:3e:29: + f6:c4:5b:7d:8f:9e:bd:ad:36:79:cf:09:70:43:30:21:98:23: + 31:c8:0d:39:ee:77:e1:4a:44:1a:5c:79:2f:6c:ec:8a:3c:db: + 99:a0:11:bc:1a:46:24:51:e7:75:d6:9a:db:ad:dd:55:d4:dd: + ca:81:a0:10:77:96:91:9c:76:30:38:18:f0:82:43:b3:7c:41: + 64:4c:4e:da:66:22:67:cf:b7:d7:10:ba:ed:f4:6d:43:59:00: + d0:82:1e:07 -----BEGIN CERTIFICATE----- -MIIFJzCCBA+gAwIBAgIJAPp8LIApP8JkMA0GCSqGSIb3DQEBBAUAMIGlMQswCQYD +MIIFJzCCBA+gAwIBAgIJAMI8YWc7CsxeMA0GCSqGSIb3DQEBBAUAMIGlMQswCQYD VQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTERMA8GA1UEBxMIQmVya2VsZXkx FDASBgNVBAoTC0VuZG1haWwgT3JnMQwwCgYDVQQLEwNNVEExIjAgBgNVBAMTGUNs -YXVzIEFzc21hbm4gQ0EgUlNBIDIwMDcxJjAkBgkqhkiG9w0BCQEWF2NhK2NhLXJz -YTIwMDdAZXNtdHAub3JnMB4XDTA3MDUwNDAyMDc1NloXDTEwMDUwMzAyMDc1Nlow +YXVzIEFzc21hbm4gQ0EgUlNBIDIwMDkxJjAkBgkqhkiG9w0BCQEWF2NhK2NhLXJz +YTIwMDlAZXNtdHAub3JnMB4XDTA5MDUxNDA0NDIxOFoXDTEyMDUxMzA0NDIxOFow gaUxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMREwDwYDVQQHEwhC ZXJrZWxleTEUMBIGA1UEChMLRW5kbWFpbCBPcmcxDDAKBgNVBAsTA01UQTEiMCAG -A1UEAxMZQ2xhdXMgQXNzbWFubiBDQSBSU0EgMjAwNzEmMCQGCSqGSIb3DQEJARYX -Y2ErY2EtcnNhMjAwN0Blc210cC5vcmcwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw -ggEKAoIBAQCwKJExr4LOcu82q33psfV3ZjhLOB9fPRLTyP2a9NT2uJD5Jl8p90P5 -NOxlYgG7ZPFd6nUEPZJlYKIGYvqIytggUMgeOFO1GN23vccINUzZ3MaXVje2ZTN0 -WrLDhQgrtyZw/zgCGmdq0EkYEEv4268GnLGogqGxddJSm1MMyqfjFTh5baH173yL -/b0EePnoHrmS6nTXRR5MyL30XPwaf+cxxqvLeMdNL7VyEDUnShr6Uxn4p1lj6+kV -q9xxaYxCHJZOiYBmyZ4h1T0IGXSl9Qegrt55r/1Cwnl+jPg5IjvDxFg70A3mqRG2 -os0u5RZm/X5lM5SwNoAn9YB2qeXf8s/vAgMBAAGjggFWMIIBUjAdBgNVHQ4EFgQU -sklrUkXukDbSeUcDM9mguoBQ2hwwgdoGA1UdIwSB0jCBz4AUsklrUkXukDbSeUcD -M9mguoBQ2hyhgaukgagwgaUxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9y +A1UEAxMZQ2xhdXMgQXNzbWFubiBDQSBSU0EgMjAwOTEmMCQGCSqGSIb3DQEJARYX +Y2ErY2EtcnNhMjAwOUBlc210cC5vcmcwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw +ggEKAoIBAQDV+NNIOHXfLmuLxI0dQV6tS5Y9SMLc5f9hmJUyA+m2cVpoMbzhXKoO +cKe8UbcTanhUrqbQREkbXjdbWSABR6fsQUwReYwlwRvA7YWy3g8Qn+eyo8Tx/IVR +qtZoSVE+BOHr6c2HG9Cdl3tM4R6xar4BCqmXmlCJ42YGTAfLfplwE+i0nOfmUjjA +ZJBC0PXPIkYiYOk0cB3j0RMzOjG6EwaowjSQR8WhvS19mCFw3iLQExHlCN2gdwvf +NKcHVd5acfZsnuz3RXUfIqmEBsZPhD1OBdfk5ZhBYXuOyTum7TGAff368Ny3B4K4 +7CcgOV94lfENk435TSEI/XKJAf8soHGdAgMBAAGjggFWMIIBUjAdBgNVHQ4EFgQU +p2H6Ma+o4l6TtoSedAiidlCHaXwwgdoGA1UdIwSB0jCBz4AUp2H6Ma+o4l6TtoSe +dAiidlCHaXyhgaukgagwgaUxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9y bmlhMREwDwYDVQQHEwhCZXJrZWxleTEUMBIGA1UEChMLRW5kbWFpbCBPcmcxDDAK -BgNVBAsTA01UQTEiMCAGA1UEAxMZQ2xhdXMgQXNzbWFubiBDQSBSU0EgMjAwNzEm -MCQGCSqGSIb3DQEJARYXY2ErY2EtcnNhMjAwN0Blc210cC5vcmeCCQD6fCyAKT/C -ZDAMBgNVHRMEBTADAQH/MCIGA1UdEQQbMBmBF2NhK2NhLXJzYTIwMDdAZXNtdHAu -b3JnMCIGA1UdEgQbMBmBF2NhK2NhLXJzYTIwMDdAZXNtdHAub3JnMA0GCSqGSIb3 -DQEBBAUAA4IBAQCYmHzT0FtyRxXmImi7eA54ZulWFti8nVrcJyn7kS1qITUYVrRP -KgnACG+aWSsucpr7ULrHqZGg+Wy+z3hCQwJwU5e6auPaF+gfxzpb57zr5SRM9c9h -NB4g7Rdj74HTniX+zAUZzIqCyUw6tWtJUXZGAqpgu8S5YUgz2nmNRqMGIJjzsts7 -rckdDpc9txQZ030Ei2qB4BFb4TWj/y8RhhwxhXr9PzbvmSVGLrDLQ0VK7L7TP6R3 -m3nMzpJjpdnt26CdXXzXgPbJQfsClo7989oFnYGnJdomNTupDIz1p11I7IfHemBR -dvLemxQrVYpD35kZ8+vnA+anoqIo3dUHaj/3 +BgNVBAsTA01UQTEiMCAGA1UEAxMZQ2xhdXMgQXNzbWFubiBDQSBSU0EgMjAwOTEm +MCQGCSqGSIb3DQEJARYXY2ErY2EtcnNhMjAwOUBlc210cC5vcmeCCQDCPGFnOwrM +XjAMBgNVHRMEBTADAQH/MCIGA1UdEQQbMBmBF2NhK2NhLXJzYTIwMDlAZXNtdHAu +b3JnMCIGA1UdEgQbMBmBF2NhK2NhLXJzYTIwMDlAZXNtdHAub3JnMA0GCSqGSIb3 +DQEBBAUAA4IBAQCzOODaqAfYzLhNjCCmBiz4J9uOKA85vdkkx5/gTda2Y0I2D9hw +QeeeoiRkBeqFl6zyzMKmcbswIcHHxFQ0HTAJ8Jt0J5NZEkxTC4w+0DntStDZZiTY +5+WcqG1fVl2akf4bfbl8eZ4cuXF0FPgMMFD5sSJWqE1vS5vlioEzG3d19tjO1JA0 +hjTRhnWp4SPmr8GOKJdHIE0bVwk59FYB0odDPin2xFt9j569rTZ5zwlwQzAhmCMx +yA057nfhSkQaXHkvbOyKPNuZoBG8GkYkUed11prbrd1V1N3KgaAQd5aRnHYwOBjw +gkOzfEFkTE7aZiJnz7fXELrt9G1DWQDQgh4H -----END CERTIFICATE----- Modified: stable/7/contrib/sendmail/LICENSE ============================================================================== --- stable/7/contrib/sendmail/LICENSE Sun Jan 31 19:15:47 2010 (r203304) +++ stable/7/contrib/sendmail/LICENSE Sun Jan 31 19:17:12 2010 (r203305) @@ -1,7 +1,7 @@ SENDMAIL LICENSE The following license terms and conditions apply, unless a different -license is obtained from Sendmail, Inc., 6425 Christie Ave, Fourth Floor, +license is obtained from Sendmail, Inc., 6475 Christie Ave, Suite 350, Emeryville, CA 94608, USA, or by electronic mail at license@sendmail.com. License Terms: @@ -33,7 +33,7 @@ each of the following conditions is met: forth as paragraph 6 below, in the documentation and/or other materials provided with the distribution. For the purposes of binary distribution the "Copyright Notice" refers to the following language: - "Copyright (c) 1998-2004 Sendmail, Inc. All rights reserved." + "Copyright (c) 1998-2009 Sendmail, Inc. All rights reserved." 4. Neither the name of Sendmail, Inc. nor the University of California nor the names of their contributors may be used to endorse or promote @@ -76,4 +76,4 @@ each of the following conditions is met: (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -$Revision: 8.13 $, Last updated $Date: 2004/05/11 23:57:57 $ +$Revision: 8.15 $, Last updated $Date: 2009/03/04 19:58:04 $ Modified: stable/7/contrib/sendmail/PGPKEYS ============================================================================== --- stable/7/contrib/sendmail/PGPKEYS Sun Jan 31 19:15:47 2010 (r203304) +++ stable/7/contrib/sendmail/PGPKEYS Sun Jan 31 19:17:12 2010 (r203305) @@ -142,6 +142,79 @@ gpExpdV7qPrw9k01j5rod5PjZlG8zV0= -----END PGP PUBLIC KEY BLOCK----- Type Bits KeyID Created Expires Algorithm Use +pub 1024 0xA77F2429 2009-01-01 ---------- RSA Sign & Encrypt +f16 Fingerprint16 = 33 3A 62 61 2C F3 21 AA 4E 87 47 F2 2F 2C 40 4D +uid Sendmail Signing Key/2009 + +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.4.8 (OpenBSD) + +mQCNA0lcVHwAAAEEAM7aXDJHNH3g0oxbsSUjqRiKh47W4srnfEYREj2Q26AXWzXE +BSyfl6QMRLbSVNIiPOWlMPbZWjCx4c1TNsj3TiiklCcievlvbAPVa3kY2hZ6pmyU +czJq4S/mT1lt+uPOCjvKxo8OLQoFuJMTIS+Ya7LVjW7fJD5yrhKJbpunfyQpAAUR +tDFTZW5kbWFpbCBTaWduaW5nIEtleS8yMDA5IDxzZW5kbWFpbEBTZW5kbWFpbC5P +Ukc+iQCVAwUQSVxUfBKJbpunfyQpAQHirwP+JvK4cBqtw9rxSZ0whmC1N4a2r24f +SH2WDC1zNNeiCHg93udKs3PKLPm688U+WxiaSsrGQXQlGojx7jn1XggTPOG+SteJ +JP/Ea9buJK9KaLaniUm84XxHxa71y3v3+SfhJMpJioY4G6qKqfLZFzmpiwUTvtLR +B9LfWvzvUUHJSTyJAJUDBRBJXFY9wZwdJRLTRh0BAcrBBACYcnhE8cx5eA8WqTR4 +2CVZgxxrIMOrqda+hdpSgsRjUEWRpb5+Es1hfM3OLXqbsywCTUvxeoymVYQr3aSP +sbm+rQ4l6gf7ibpiVZA6vDxh0EfwNYE+aI3AoW03ODoCAaj+utOjGdqzIcec0RpS +zXPI1gWW3sBck95KsiDUYmXYTIkAlQMFEElcVkzvWJZk1DLhnQEByUIEAKOdWew/ +M75xyVbugMGUZnAJrTZPKu9y3V3TLqyET3rGYfLjt6M4R+99j+mkhmi2rOckM9VV +30kvjW9BBarnr13XoMVTtLneoLaVrbMw4aZHRkTdRL14LIj+w1jzEKXDwYylJbGZ +UlmZn7lFkJrLIaBDmQl7GswBJRJvFLQbdzzMiQCVAwUQSVxWVW9Sk9ijm6ZVAQHr +DQP9ECF56TGI8YRPVOzZJzUyOmiMAouRoJ74aWfM8TA2Q8gVtedDc6IHiNzcVjq4 +jOZuMgb1KTPPF/TwWL5MHIFldsMdJ/i0Rml+x4h3Ff+8ZYlJgFBylUmx++nW1rbc +nn9RS/Es+zKsDOnTN5fTFo3br1z2saLnuXNB+SuJmSC8i2CJAJUDBRBJXFZgnBy9 +4uNcVjUBAcdaA/9ur7HbueufNbvr0HoDbhBijagbeqRrzmYtsOtYUfBGEtc5JiNH +r7NIAM66Tog8p9ZZA+qOaGHvujecBOTlokLpPKvcQngOz7c53z3Yop90TnMytUL2 +IExcuCdH4BMy72R5nH5YY5pMqb7pFjcyGDDIM8cxMgbZ3gzvbPDHZMUQ6okAlQMF +EElcVmc4IttHzDdPLQEBJ/0EANME79+Z/BItRKlSgzH52JBGGQZrZi57Pz+hJ+du +K7RgSkhpsXnk1kELvig5TCd2YaDZXoZwUrJLObVKAMI4lpGNTkZlzRRrFXcx4Q14 +YPJ/nay5jkqHvR9neKTsifzdsPVLi9nUDBMtURIQo5yn5AYMloiDzw/HpNGvkk92 +ITqwiQCVAwUQSVxWbolpYrhnjAoDAQHLDgP+L+Od/CoHaVUpsZld1SJKwvelIe1S +wT8SBqppQyDbKw0ZczetUSASt+g8OqJKD88I2no5mjEmHx0lncoKJ06qxpJBIu7A +lbByeE9i8Bn52YKhPGka4AwA3DOm5yR967BncOf/zY65t83hocZL1uKQeHW8wnpR +x3o+RBz2354phxyJAJUDBRBJXFZ2IYPhsTlvB4kBARKHA/sHFkKAvCo5Hto2CJWF +gyBCJUsUuHCaQTkfL4IspkIBjmrsr2KKe0WQUqIlebhhWzVhgYsc8AXZil+pLahC +L9CNQVQpoPKD3mit2+Vsi8254QxQjeYD3jUQT1C6uq6l9IORdIxYah9DNBNHCgwX +PuTMmpU1JQj6haKhGa1kbaQq2IkAlQMFEElcVn3I1e0plfYXcQEB2TYD+wYXb+sU +0vmG51lVWj2BPMvv/lbfzU6KnqXNCD2ra0yu6C83WHNFXEz+JuLYlzLnaKm8DJI/ +SFBZZIxpUaoaFHyGrjbWrDI6oMfvp/dMnJjfibNbmZuVIl2z0TKO98jiJ/+/9e/5 +AtCsSFfyZ6FSTtAHbG1ZOJvhPBub9aELiUCiiQCVAwUQSVxWknCgJE0e+ZJRAQHz +NQP7BYHJwViDWqp9c5DmxM6vHrVq/wsDyPgm52+QpopErCRt2iTpocldHQG/9ZdE +0ENn6PhI49xobh+m0HfoZZ+Cr4LPU7g2ftmEtrxtDN1BYdNQHZLZStUp7A8SsLgL +2IvYSI9iKAmQoWQTAOECDD41o1BOnnM1eraeUyqdmZaFm8iJAJUDBRBJXFaZHnuz +yK+VliUBAVgdBACmbsAKzbNnvfaTCJxqhaJI5uNDCdH7rgoCHEJR4aefPY89Do7b +ixLCyW4wUr7pxqvf/xbEGJHNCG5WnmncXBCnoEVqmHb7J9vQw1o3K6pRPqtTjVBR +VEUUK4xe6ZIOft3FOI5fKAPO5Vc9NlxPDjSJcjR6+B//TpecZ2L9A/Dp+4kAlQMF +EElcVqGXQwEYcJO4QQEBl1YD/AsMu6g/4KiwelIz2rDzm4wzvsQm+cYm47hv2IHV +Fkx5f8mS6um39+4J/FHni7i2bfSuHpRn1RdURR7Gebu7HKYfGTNLNYyKt7U/6VFb +ylDxUTS32sier3GlDrlJrBQ+VDIG4dUaioKoKUXxBhEVzAZrvkYhaiGWIl/K4zz5 +C1qdiQCVAwUQSVxWqdiq8Mr2swcpAQFzwgP9FJOM0MysHIjq/KihatPjerxhud6j +bd1Zo/tIKybvPsJNaeTeR+0IKm+vbAWtYL5oBc2wxgdQAs8tUi5SryK1otMAJ6sj +KNN+QxIp2FEumzReGRo+hCETiusjD9Abbh1L9L7FOkhGhH+m6fBVQIYUytmMFpnQ +qn17I9DVPxpwob+JAJUDBRBJXFa9wCnKQBb0zOkBAd0BA/9yRRB2waP3duE2rYKF +Obsbs3XXOQHEl/rjpIHVmYIqqRSglmlTEXwjKJeCEN9q0PRiazhztEhVJWP8ORRP +fkjlscP25T4A4tMC1F49biMak5MI2ffawVkUVsjIWFF/vFQIqKl4JG8SI/r4Oxep +yaozkowCJX3zZtkEfB2Id1nU9IkAlQMFEElcV0e92o/WP+p9/QEBxQID/R4E3pRI +isTe5RJotQKcsQKo3y+8KkmvfZQ6d3h/n4anq6bs1rRrWKqL6XoM7Nc5teLR3QaW +CVTssPtt3P06WqMm8Ct25iZ8dIyqRN0d0k5dJ6d5Qp4WSCL0TmTQ7wO4q9aCOhGK +YFKCP3i2v8zCOhuqk2pLeOYxl6f912COvmwSiQCVAwUQSVxXVXxLZ22gDhVjAQFU +WAP/TjyHxNVsptLRcFRfMCi9fjkrftbma00pzIaj9d6Ybxt6nMQ8C8TCTrurkXpq +9kGIrFVndsovql8++Y9VsDeh/vLX65mZl8FEVFvbl38+YSYeB44upadibU6uB0iL +zFz6da6gZmm/NENX3UCldIWv35L33EFotQ9GxTn8b0MQnY2JAJUDBRBJXFdl1uCh +/k++Kt0BAQ39BACfVZaig8loIuKosYh5Ydcefe0NZTZOCgPZ+mAzShEeBIN/btA0 ++jMXfu6tEgqUKQnyKCXZcPoZwY9Y0hOqGT2AIkWmZHJ/uKrzXIAcwUTS0TQV1k5x +mHPkZmvr55JDYp/JIbxIZ8QTpTuEzlymow12qMOUhPkL/wOQET9duDMKzokAlQMF +EEli68zPHrUDIjJ6AQEBzacD/RPBzReBSsVar0+B4xEW0i11LKV2Q7gH+y256IDX +3SxML4+GZM9FmEMVhlTbHPOE2rfwFvLrMxCmIqGHjMccJRZpV9OFpXa8z15FRDmJ +U01qOITDcIAiIPgGamifxMOYG4+spaj2sxLGnY/6aowhjh1XNbQPuJ6laNq7bz50 +wzfu +=RCyv +-----END PGP PUBLIC KEY BLOCK----- + +Type Bits KeyID Created Expires Algorithm Use pub 1024 0xF6B30729 2008-01-18 ---------- RSA Sign & Encrypt f16 Fingerprint16 = 07 FB 9A F9 F7 94 4B E4 0F 28 D1 8E 23 6F A2 B0 uid Sendmail Signing Key/2008 @@ -1792,4 +1865,4 @@ DnF3FZZEzV7oqPwC2jzv/1dD6GFhtgy0cnyoPGUJ =nES8 -----END PGP PUBLIC KEY BLOCK----- -$Revision: 8.26 $, Last updated $Date: 2008/01/22 06:20:27 $ +$Revision: 8.29 $, Last updated $Date: 2009/01/06 05:59:03 $ Modified: stable/7/contrib/sendmail/README ============================================================================== --- stable/7/contrib/sendmail/README Sun Jan 31 19:15:47 2010 (r203304) +++ stable/7/contrib/sendmail/README Sun Jan 31 19:17:12 2010 (r203305) @@ -38,6 +38,7 @@ the latest updates. 4. Read cf/README. Sendmail is a trademark of Sendmail, Inc. +US Patent Numbers 6865671, 6986037. +-----------------------+ | DIRECTORY PERMISSIONS | @@ -464,4 +465,4 @@ sendmail Source for the sendmail program test Some test scripts (currently only for compilation aids). vacation Source for the vacation program. NOT PART OF SENDMAIL! -$Revision: 8.94 $, Last updated $Date: 2008/02/12 16:40:05 $ +$Revision: 8.95 $, Last updated $Date: 2009/04/10 17:49:18 $ Modified: stable/7/contrib/sendmail/RELEASE_NOTES ============================================================================== --- stable/7/contrib/sendmail/RELEASE_NOTES Sun Jan 31 19:15:47 2010 (r203304) +++ stable/7/contrib/sendmail/RELEASE_NOTES Sun Jan 31 19:17:12 2010 (r203305) @@ -1,11 +1,96 @@ SENDMAIL RELEASE NOTES - $Id: RELEASE_NOTES,v 8.1926 2008/05/03 03:34:26 ca Exp $ + $Id: RELEASE_NOTES,v 8.1963 2009/12/23 04:43:46 ca Exp $ This listing shows the version of the sendmail binary, the version of the sendmail configuration files, the date of release, and a summary of the changes in that release. +8.14.4/8.14.4 2009/12/30 + SECURITY: Handle bogus certificates containing NUL characters + in CNs by placing a string indicating a bad certificate + in the {cn_subject} or {cn_issuer} macro. Patch inspired + by Matthias Andree's changes for fetchmail. + During the generation of a queue identifier an integer overflow + could occur which might result in bogus characters + being used. Based on patch from John Vannoy of + Pepperdine University. + The value of headers, e.g., Precedence, Content-Type, et.al., + was not processed correctly. Patch from Per Hedeland. + Between 8.11.7 and 8.12.0 the length limitation on a return + path was erroneously reduced from MAXNAME (256) to + MAXSHORTSTR (203). Patch from John Gardiner Myers + of Proofpoint; the problem was also noted by Steve + Hubert of University of Washington. + Prevent a crash when a hostname lookup returns a seemingly + valid result which contains a NULL pointer (this seems + to be happening on some Linux versions). + The process title was missing the current load average when + the MTA was delaying connections due to DelayLA. + Patch from Dick St.Peters of NetHeaven. + Do not reset the number of queue entries in shared memory if + only some of them are processed. + Fix overflow of an internal array when parsing some replies + from a milter. Problem found by Scott Rotondo + of Sun Microsystems. + If STARTTLS is turned off in the server (via M=S) then it + would not be initialized for use in the client either. + Patch from Kazuteru Okahashi of IIJ. + If a Diffie-Hellman cipher is selected for STARTTLS, the + handshake could fail with some TLS implementations + because the prime used by the server is not long enough. + Note: the initialization of the DSA/DH parameters for + the server can take a significant amount of time on slow + machines. This can be turned off by setting DHParameters + to none or a file (see doc/op/op.me). Patch from + Petr Lampa of the Brno University of Technology. + Fix handling of `b' modifier for DaemonPortOptions on little + endian machines for loopback address. Patch from + John Beck of Sun Microsystems. + Fix a potential memory leak in libsmdb/smdb1.c found by parfait. + Based on patch from Jonathan Gray of OpenBSD. + If a milter sets the reply code to "421" during the transfer + of the body, the SMTP server will terminate the SMTP session + with that error to match the behavior of the other callbacks. + Return EX_IOERR (instead of 0) if a mail submission fails due to + missing disk space in the mail queue. Based on patch + from Martin Poole of RedHat. + CONFIG: Using FEATURE(`ldap_routing')'s `nodomain' argument would + cause addresses not found in LDAP to be misparsed. + CONFIG: Using a CN restriction did not work for TLS_Clt as it + referred to a wrong macro. Patch from John Gardiner + Myers of Proofpoint. + CONFIG: The option relaytofulladdress of FEATURE(`access_db') + did not work if FEATURE(`relay_hosts_only') is used too. + Problem noted by Kristian Shaw. + CONFIG: The internal function lower() was broken and hence + strcasecmp() did not work either, which could cause + problems for some FEATURE()s if upper case arguments + were used. Patch from Vesa-Matti J Kari of the + University of Helsinki. + LIBMILTER: Fix internal check whether a milter application + is compiled against the same version of libmilter as + it is linked against (especially useful for dynamic + libraries). + LIBMILTER: Fix memory leak that occurred when smfi_setsymlist() + was used. Based on patch by Dan Lukes. + LIBMILTER: Document the effect of SMFIP_HDR_LEADSPC for filters + which add, insert, or replace headers. From Benjamin + Pineau. + LIBMILTER: Fix error messages which refer to "select()" to be + correct if SM_CONF_POLL is used. Based on patch from + John Nemeth. + LIBSM: Fix handling of LDAP search failures where the error is + carried in the search result itself, such as seen with + OpenLDAP proxy servers. + VACATION: Do not refer to a local variable outside its scope. + Based on patch from Mark Costlow of Southwest Cyberport. + Portability: + Enable HAVE_NANOSLEEP for SunOS 5.11. Patch from + John Beck of Sun Microsystems. + Drop NISPLUS from default SunOS 5.11 map definitions. + Patch from John Beck of Sun Microsystems. + 8.14.3/8.14.3 2008/05/03 During ruleset processing the generation of a key for a map lookup and the parsing of the default value was broken @@ -37,7 +122,7 @@ summary of the changes in that release. Support shared libraries in Darwin 8 and 9. Patch from Chris Behrens of Concentric. Add support for SCO OpenServer 6, patch from Boyd Gerber. - DEVTOOLS: Clarify that confSHAREDLIBDIR requires a trailing path. + DEVTOOLS: Clarify that confSHAREDLIBDIR requires a trailing slash. Added Files: devtools/OS/Darwin.9.x devtools/OS/OSR.i386 Modified: stable/7/contrib/sendmail/cf/README ============================================================================== --- stable/7/contrib/sendmail/cf/README Sun Jan 31 19:15:47 2010 (r203304) +++ stable/7/contrib/sendmail/cf/README Sun Jan 31 19:17:12 2010 (r203305) @@ -3142,7 +3142,7 @@ starts with '+' and the items are separa extensions are: CN:name name must match ${cn_subject} -CN ${server_name} must match ${cn_subject} +CN ${client_name}/${server_name} must match ${cn_subject} CS:name name must match ${cert_subject} CI:name name must match ${cert_issuer} @@ -4701,4 +4701,4 @@ M4 DIVERSIONS 8 DNS based blacklists 9 special local rulesets (1 and 2) -$Revision: 8.724 $, Last updated $Date: 2008/02/15 23:05:32 $ +$Revision: 8.727 $, Last updated $Date: 2009/05/07 23:46:17 $ Modified: stable/7/contrib/sendmail/cf/cf/submit.cf ============================================================================== --- stable/7/contrib/sendmail/cf/cf/submit.cf Sun Jan 31 19:15:47 2010 (r203304) +++ stable/7/contrib/sendmail/cf/cf/submit.cf Sun Jan 31 19:17:12 2010 (r203305) @@ -1,5 +1,5 @@ # -# Copyright (c) 1998-2004 Sendmail, Inc. and its suppliers. +# Copyright (c) 1998-2004, 2009 Sendmail, Inc. and its suppliers. # All rights reserved. # Copyright (c) 1983, 1995 Eric P. Allman. All rights reserved. # Copyright (c) 1988, 1993 @@ -16,8 +16,8 @@ ##### ##### SENDMAIL CONFIGURATION FILE ##### -##### built by ca@wiz.smi.sendmail.com on Fri May 2 20:39:00 PDT 2008 -##### in /extra/home/ca/sm-8.14.3/OpenSource/sendmail-8.14.3/cf/cf +##### built by ca@wiz.smi.sendmail.com on Tue Dec 22 20:49:09 PST 2009 +##### in /extra/home/ca/sm-8.14.4/OpenSource/sendmail-8.14.4/cf/cf ##### using ../ as configuration include directory ##### ###################################################################### @@ -27,7 +27,7 @@ ###################################################################### ###################################################################### -##### $Id: cfhead.m4,v 8.116 2004/01/28 22:02:22 ca Exp $ ##### +##### $Id: cfhead.m4,v 8.120 2009/01/23 22:39:21 ca Exp $ ##### ##### $Id: cf.m4,v 8.32 1999/02/07 07:26:14 gshapiro Exp $ ##### ##### $Id: submit.mc,v 8.14 2006/04/05 05:54:41 ca Exp $ ##### ##### $Id: msp.m4,v 1.33 2004/02/09 22:32:38 ca Exp $ ##### @@ -35,7 +35,7 @@ ##### $Id: no_default_msa.m4,v 8.2 2001/02/14 05:03:22 gshapiro Exp $ ##### -##### $Id: proto.m4,v 8.734 2008/01/24 23:42:01 ca Exp $ ##### +##### $Id: proto.m4,v 8.741 2009/12/11 00:04:53 ca Exp $ ##### # level 10 config file format V10/Berkeley @@ -114,7 +114,7 @@ D{MTAHost}[127.0.0.1] # Configuration version number -DZ8.14.3/Submit +DZ8.14.4/Submit ############### @@ -440,6 +440,7 @@ O RunAsUser=smmsp # once the threshold number of recipients have been rejected #O BadRcptThrottle=0 + # shall we get local names from our installed interfaces? O DontProbeInterfaces=True @@ -500,6 +501,7 @@ O PidFile=/var/spool/clientmqueue/sm-cli # SMTP STARTTLS server options #O TLSSrvOptions + # Input mail filters #O InputMailFilters Modified: stable/7/contrib/sendmail/cf/feature/ldap_routing.m4 ============================================================================== --- stable/7/contrib/sendmail/cf/feature/ldap_routing.m4 Sun Jan 31 19:15:47 2010 (r203304) +++ stable/7/contrib/sendmail/cf/feature/ldap_routing.m4 Sun Jan 31 19:17:12 2010 (r203305) @@ -1,6 +1,6 @@ divert(-1) # -# Copyright (c) 1999-2002, 2004, 2007 Sendmail, Inc. and its suppliers. +# Copyright (c) 1999-2002, 2004, 2007, 2009 Sendmail, Inc. and its suppliers. # All rights reserved. # # By using this file, you agree to the terms and conditions set @@ -10,7 +10,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: ldap_routing.m4,v 8.15 2007/05/01 17:38:25 ca Exp $') +VERSIONID(`$Id: ldap_routing.m4,v 8.17 2009/06/26 21:11:08 ca Exp $') divert(-1) # Check first two arguments. If they aren't set, may need to warn in proto.m4 @@ -35,12 +35,40 @@ ifelse(len(X`'_ARG6_), `1', `define(`_LD _ARG6_, `tempfail', `define(`_LDAP_ROUTE_MAPTEMP_', `_TEMPFAIL_')', _ARG6_, `queue', `define(`_LDAP_ROUTE_MAPTEMP_', `_QUEUE_')') +define(`_ATMPF_', `')dnl +dnl check whether arg contains -T`'_ATMPF_ +dnl unless it is a sequence map or just LDAP +dnl note: this does not work if ARG1 begins with space(s), however, as +dnl we issue a warning, hopefully the user will fix it... +ifelse(defn(`_ARG1_'), `', `', + defn(`_ARG1_'), `LDAP', `', + `ifelse(index(_ARG1_, `sequence '), `0', `', + `ifelse(index(_ARG1_, _ATMPF_), `-1', + `errprint(`*** WARNING: missing -T'_ATMPF_` in first argument of FEATURE(`ldap_routing') +') + define(`_ABP_', index(_ARG1_, ` ')) + define(`_NARG1_', `substr(_ARG1_, 0, _ABP_) -T'_ATMPF_` substr(_ARG1_, _ABP_)') + ') + ') + ') +ifelse(defn(`_ARG2_'), `', `', + defn(`_ARG2_'), `LDAP', `', + `ifelse(index(_ARG2_, `sequence '), `0', `', + `ifelse(index(_ARG2_, _ATMPF_), `-1', + `errprint(`*** WARNING: missing -T'_ATMPF_` in second argument of FEATURE(`ldap_routing') +') + define(`_ABP_', index(_ARG2_, ` ')) + define(`_NARG2_', `substr(_ARG2_, 0, _ABP_) -T'_ATMPF_` substr(_ARG2_, _ABP_)') + ') + ') + ') + LOCAL_CONFIG # LDAP routing maps Kldapmh ifelse(len(X`'_ARG1_), `1', `ldap -1 -T -v mailHost -k (&(objectClass=inetLocalMailRecipient)(mailLocalAddress=%0))', - `_ARG1_') + defn(`_NARG1_'), `', `_ARG1_', `_NARG1_') Kldapmra ifelse(len(X`'_ARG2_), `1', `ldap -1 -T -v mailRoutingAddress -k (&(objectClass=inetLocalMailRecipient)(mailLocalAddress=%0))', - `_ARG2_') + defn(`_NARG2_'), `', `_ARG2_', `_NARG2_') Modified: stable/7/contrib/sendmail/cf/m4/cfhead.m4 ============================================================================== --- stable/7/contrib/sendmail/cf/m4/cfhead.m4 Sun Jan 31 19:15:47 2010 (r203304) +++ stable/7/contrib/sendmail/cf/m4/cfhead.m4 Sun Jan 31 19:17:12 2010 (r203305) @@ -1,5 +1,5 @@ # -# Copyright (c) 1998-2004 Sendmail, Inc. and its suppliers. +# Copyright (c) 1998-2004, 2009 Sendmail, Inc. and its suppliers. # All rights reserved. # Copyright (c) 1983, 1995 Eric P. Allman. All rights reserved. # Copyright (c) 1988, 1993 @@ -49,7 +49,7 @@ define(`OSTYPE', define(`_ARG_', $2) include(_CF_DIR_`'ostype/$1.m4)POPDIVERT`'') ## helpful functions -define(`lower', `translit(`$1', `ABCDEFGHIJKLMNOPQRSTUVWXYZ', `abcdefghijklmnopqrstuvwx')') +define(`lower', `translit(`$1', `ABCDEFGHIJKLMNOPQRSTUVWXYZ', `abcdefghijklmnopqrstuvwxyz')') define(`strcasecmp', `ifelse(lower($1), lower($2), `1', `0')') ## access to further arguments in FEATURE/HACK define(`_ACC_ARG_1_',`$1') @@ -308,4 +308,4 @@ define(`confMILTER_MACROS_EOM', `{msg_id divert(0)dnl -VERSIONID(`$Id: cfhead.m4,v 8.116 2004/01/28 22:02:22 ca Exp $') +VERSIONID(`$Id: cfhead.m4,v 8.120 2009/01/23 22:39:21 ca Exp $') Modified: stable/7/contrib/sendmail/cf/m4/proto.m4 ============================================================================== --- stable/7/contrib/sendmail/cf/m4/proto.m4 Sun Jan 31 19:15:47 2010 (r203304) +++ stable/7/contrib/sendmail/cf/m4/proto.m4 Sun Jan 31 19:17:12 2010 (r203305) @@ -1,6 +1,6 @@ divert(-1) # -# Copyright (c) 1998-2007 Sendmail, Inc. and its suppliers. +# Copyright (c) 1998-2009 Sendmail, Inc. and its suppliers. # All rights reserved. # Copyright (c) 1983, 1995 Eric P. Allman. All rights reserved. # Copyright (c) 1988, 1993 @@ -13,7 +13,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: proto.m4,v 8.734 2008/01/24 23:42:01 ca Exp $') +VERSIONID(`$Id: proto.m4,v 8.741 2009/12/11 00:04:53 ca Exp $') # level CF_LEVEL config file format V`'CF_LEVEL/ifdef(`VENDOR_NAME', `VENDOR_NAME', `Berkeley') @@ -580,6 +580,7 @@ _OPTION(MaxRecipientsPerMessage, `confMA # once the threshold number of recipients have been rejected _OPTION(BadRcptThrottle, `confBAD_RCPT_THROTTLE', `0') + # shall we get local names from our installed interfaces? _OPTION(DontProbeInterfaces, `confDONT_PROBE_INTERFACES', `False') @@ -640,6 +641,7 @@ _OPTION(AuthMaxBits, `confAUTH_MAX_BITS' # SMTP STARTTLS server options _OPTION(TLSSrvOptions, `confTLS_SRV_OPTIONS', `') + # Input mail filters _OPTION(InputMailFilters, `confINPUT_MAIL_FILTERS', `') @@ -1509,7 +1511,9 @@ ifdef(`_LDAP_ROUTE_DETAIL_', # try without +detail R<> <> <$+> <$+ + $* @ $+> <> $@ $>LDAPExpand <$1> <$2 @ $4> <+$3>')dnl -ifdef(`_LDAP_ROUTE_NODOMAIN_', `dnl', ` +ifdef(`_LDAP_ROUTE_NODOMAIN_', ` +# pretend we did the @domain lookup +R<> <> <$+> <$+ @ $+> <$*> $: <> <> <$1> <@ $3> <$4>', ` # if still no mailRoutingAddress and no mailHost, # try @domain ifelse(_LDAP_ROUTE_DETAIL_, `_PRESERVE_', `dnl @@ -2139,7 +2143,10 @@ R$+ < @ $=w > $@ RELAY ifdef(`_RELAY_HOSTS_ONLY_', `R$+ < @ $=R > $@ RELAY ifdef(`_ACCESS_TABLE_', `dnl -R$+ < @ $+ > $: <$(access To:$2 $: ? $)> <$1 < @ $2 >> +ifdef(`_RELAY_FULL_ADDR_', `dnl +R$+ < @ $+ > $: <$(access To:$1@$2 $: ? $)> <$1 < @ $2 >> +R <$+ < @ $+ >> $: <$(access To:$2 $: ? $)> <$1 < @ $2 >>',` +R$+ < @ $+ > $: <$(access To:$2 $: ? $)> <$1 < @ $2 >>') dnl workspace: > R <$+ < @ $+ >> $: <$(access $2 $: ? $)> <$1 < @ $2 >>',`dnl')', `R$+ < @ $* $=R > $@ RELAY @@ -2691,7 +2698,7 @@ R$* $#$* $#$2 R$* $* $: $1', `dnl') ifdef(`_ACCESS_TABLE_', `dnl dnl store name of other side -R$* $: $(macro {TLS_Name} $@ $&{server_name} $) $1 +R$* $: $(macro {TLS_Name} $@ $&{client_name} $) $1 dnl ignore second arg for now dnl maybe use it to distinguish permanent/temporary error? dnl if MAIL: permanent (STARTTLS has not been offered) Modified: stable/7/contrib/sendmail/cf/m4/version.m4 ============================================================================== --- stable/7/contrib/sendmail/cf/m4/version.m4 Sun Jan 31 19:15:47 2010 (r203304) +++ stable/7/contrib/sendmail/cf/m4/version.m4 Sun Jan 31 19:17:12 2010 (r203305) @@ -1,6 +1,6 @@ divert(-1) # -# Copyright (c) 1998-2008 Sendmail, Inc. and its suppliers. +# Copyright (c) 1998-2009 Sendmail, Inc. and its suppliers. # All rights reserved. # Copyright (c) 1983 Eric P. Allman. All rights reserved. # Copyright (c) 1988, 1993 @@ -11,8 +11,8 @@ divert(-1) # the sendmail distribution. # # -VERSIONID(`$Id: version.m4,v 8.195 2008/04/17 17:04:30 ca Exp $') +VERSIONID(`$Id: version.m4,v 8.205 2009/12/23 04:43:09 ca Exp $') # divert(0) # Configuration version number -DZ8.14.3`'ifdef(`confCF_VERSION', `/confCF_VERSION') +DZ8.14.4`'ifdef(`confCF_VERSION', `/confCF_VERSION') Modified: stable/7/contrib/sendmail/contrib/qtool.pl ============================================================================== --- stable/7/contrib/sendmail/contrib/qtool.pl Sun Jan 31 19:15:47 2010 (r203304) +++ stable/7/contrib/sendmail/contrib/qtool.pl Sun Jan 31 19:17:12 2010 (r203305) @@ -3,7 +3,7 @@ ## Copyright (c) 1998-2002 Sendmail, Inc. and its suppliers. ## All rights reserved. ## -## $Id: qtool.pl,v 8.29 2007/02/16 01:12:08 ca Exp $ +## $Id: qtool.pl,v 8.30 2009/03/04 16:57:30 ca Exp $ ## use strict; use File::Basename; @@ -450,7 +450,7 @@ sub unlock_file ## ## Parameters: ## src_name -- The name of the file to be move. -## dst_nome -- The name of the place to move it to. +## dst_name -- The name of the place to move it to. ## ## Returns: ## error_string -- If undef then no problem. Otherwise it is a @@ -1193,7 +1193,7 @@ sub bounce ## ## This Condition Class checks the modification time of the ## source file and returns true if the file's modification time is -## older than the number of seconds the class was initialzed with. +## older than the number of seconds the class was initialized with. ## package OlderThan; @@ -1286,7 +1286,7 @@ sub check_move ## Eval ## ## Takes a perl expression and evaluates it. The ControlFile object -## for the source QueuedMessage is avaliable through the name '$msg'. +## for the source QueuedMessage is available through the name '$msg'. ## package Eval; Modified: stable/7/contrib/sendmail/contrib/smcontrol.pl ============================================================================== --- stable/7/contrib/sendmail/contrib/smcontrol.pl Sun Jan 31 19:15:47 2010 (r203304) +++ stable/7/contrib/sendmail/contrib/smcontrol.pl Sun Jan 31 19:17:12 2010 (r203305) @@ -1,4 +1,6 @@ -#!/usr/local/bin/perl -w +#!/usr/bin/perl -w + +# $Id: smcontrol.pl,v 8.8 2008/07/21 21:31:43 ca Exp $ use strict; use Getopt::Std; Modified: stable/7/contrib/sendmail/doc/op/op.me ============================================================================== --- stable/7/contrib/sendmail/doc/op/op.me Sun Jan 31 19:15:47 2010 (r203304) +++ stable/7/contrib/sendmail/doc/op/op.me Sun Jan 31 19:17:12 2010 (r203305) @@ -9,7 +9,7 @@ .\" the sendmail distribution. .\" .\" -.\" $Id: op.me,v 8.741 2007/06/22 23:08:59 ca Exp $ +.\" $Id: op.me,v 8.745 2009/12/13 04:12:46 ca Exp $ .\" .\" eqn op.me | pic | troff -me .\" @@ -90,13 +90,14 @@ Sendmail, Inc. .de Ve Version \\$2 .. -.Ve $Revision: 8.741 $ +.Ve $Revision: 8.745 $ .rm Ve .sp For Sendmail Version 8.14 .)l .(f Sendmail is a trademark of Sendmail, Inc. +US Patent Numbers 6865671, 6986037. .)f .sp 2 .pp @@ -4952,9 +4953,21 @@ as "(may be forged)". .ip ${cn_issuer} The CN (common name) of the CA that signed the presented certificate (STARTTLS only). +Note: if the CN cannot be extracted properly it will be replaced by +one of these strings based on the encountered error: +.(b +.ta 25n +BadCertificateContainsNUL CN contains a NUL character +BadCertificateTooLong CN is too long +BadCertificateUnknown CN could not be extracted +.)b +In the last case, some other (unspecific) error occurred. .ip ${cn_subject} The CN (common name) of the presented certificate (STARTTLS only). +See +.b ${cn_issuer} +for possible replacements. .ip ${currHeader} Header value as quoted string (possibly truncated to @@ -5130,7 +5143,7 @@ The total number of incoming connections by ConnectionRateWindowSize. .ip ${verify} The result of the verification of the presented cert; -only defined after STARTTLS has been used. +only defined after STARTTLS has been used (or attempted). Possible values are: .(b .ta 13n @@ -6710,10 +6723,25 @@ CRL checking requires at least OpenSSL v Note: if a CRLFile is specified but the file is unusable, STARTTLS is disabled. .ip DHParameters -File with DH parameters for STARTTLS. +Possible values are: +.(b +.ta 1i +5 use 512 bit prime +1 use 1024 bit prime +none do not use Diffie-Hellman +NAME load prime from file +.)b This is only required if a ciphersuite containing DSA/DH is used. -This is only for people with a good knowledge of TLS, all others -can ignore this option. +If ``5'' is selected, then precomputed, fixed primes are used. +This is the default for the client side. +If ``1'' is selected, then prime values are computed during startup. +This is the default for the server side. +Note: this operation can take a significant amount of time on a +slow machine (several seconds), but it is only done once at startup. +If ``none'' is selected, then TLS ciphersuites containing DSA/DH +cannot be used. +If a file name is specified (which must be an absolute path), +then the primes are read from it. .ip DaemonPortOptions=\fIoptions\fP [O] Set server SMTP options. @@ -11435,7 +11463,7 @@ replace it with a blank sheet for double .\".sz 10 .\"Eric Allman .\".sp -.\"Version $Revision: 8.741 $ +.\"Version $Revision: 8.745 $ .\".ce 0 .bp 3 .ce Modified: stable/7/contrib/sendmail/include/libmilter/mfapi.h ============================================================================== --- stable/7/contrib/sendmail/include/libmilter/mfapi.h Sun Jan 31 19:15:47 2010 (r203304) +++ stable/7/contrib/sendmail/include/libmilter/mfapi.h Sun Jan 31 19:17:12 2010 (r203305) @@ -7,7 +7,7 @@ * the sendmail distribution. * * - * $Id: mfapi.h,v 8.78 2008/02/27 22:30:34 ca Exp $ + * $Id: mfapi.h,v 8.80 2009/11/06 00:57:08 ca Exp $ */ /* @@ -18,7 +18,14 @@ # define _LIBMILTER_MFAPI_H 1 #ifndef SMFI_VERSION -# define SMFI_VERSION 0x01000001 /* libmilter version number */ +# if _FFR_MDS_NEGOTIATE +# define SMFI_VERSION 0x01000002 /* libmilter version number */ + + /* first libmilter version that has MDS support */ +# define SMFI_VERSION_MDS 0x01000002 +# else /* _FFR_MDS_NEGOTIATE */ +# define SMFI_VERSION 0x01000001 /* libmilter version number */ +# endif /* _FFR_MDS_NEGOTIATE */ #endif /* ! SMFI_VERSION */ #define SM_LM_VRS_MAJOR(v) (((v) & 0x7f000000) >> 24) @@ -163,9 +170,7 @@ LIBMILTER_API int smfi_setdbg __P((int)) LIBMILTER_API int smfi_settimeout __P((int)); LIBMILTER_API int smfi_setconn __P((char *)); LIBMILTER_API int smfi_stop __P((void)); -#if _FFR_MAXDATASIZE LIBMILTER_API size_t smfi_setmaxdatasize __P((size_t)); -#endif /* _FFR_MAXDATASIZE */ LIBMILTER_API int smfi_version __P((unsigned int *, unsigned int *, unsigned int *)); /* Modified: stable/7/contrib/sendmail/include/libmilter/mfdef.h ============================================================================== --- stable/7/contrib/sendmail/include/libmilter/mfdef.h Sun Jan 31 19:15:47 2010 (r203304) +++ stable/7/contrib/sendmail/include/libmilter/mfdef.h Sun Jan 31 19:17:12 2010 (r203305) @@ -7,7 +7,7 @@ * the sendmail distribution. * * - * $Id: mfdef.h,v 8.38 2007/03/27 18:53:48 ca Exp $ + * $Id: mfdef.h,v 8.39 2009/11/06 00:57:08 ca Exp $ */ /* @@ -27,6 +27,12 @@ #define MILTER_CHUNK_SIZE 65535 /* body chunk size */ #define MILTER_MAX_DATA_SIZE 65535 /* default milter command data limit */ +#if _FFR_MDS_NEGOTIATE +# define MILTER_MDS_64K ((64 * 1024) - 1) +# define MILTER_MDS_256K ((256 * 1024) - 1) +# define MILTER_MDS_1M ((1024 * 1024) - 1) +#endif /* _FFR_MDS_NEGOTIATE */ + /* These apply to SMFIF_* flags */ #define SMFI_V1_ACTS 0x0000000FL /* The actions of V1 filter */ #define SMFI_V2_ACTS 0x0000003FL /* The actions of V2 filter */ @@ -100,6 +106,9 @@ #define SMFIP_NR_EOH 0x00040000L /* No reply for eoh */ #define SMFIP_NR_BODY 0x00080000L /* No reply for body chunk */ #define SMFIP_HDR_LEADSPC 0x00100000L /* header value leading space */ +#define SMFIP_MDS_256K 0x10000000L /* MILTER_MAX_DATA_SIZE=256K */ +#define SMFIP_MDS_1M 0x20000000L /* MILTER_MAX_DATA_SIZE=1M */ +/* #define SMFIP_ 0x40000000L reserved: see SMFI_INTERNAL*/ #define SMFI_V1_PROT 0x0000003FL /* The protocol of V1 filter */ #define SMFI_V2_PROT 0x0000007FL /* The protocol of V2 filter */ @@ -107,4 +116,11 @@ /* all defined protocol bits */ #define SMFI_CURR_PROT 0x001FFFFFL +/* internal flags: only used between MTA and libmilter */ +#define SMFI_INTERNAL 0x70000000L + +#if _FFR_MILTER_CHECK +# define SMFIP_TEST 0x80000000L +#endif /* _FFR_MILTER_CHECK */ + #endif /* !_LIBMILTER_MFDEF_H */ Modified: stable/7/contrib/sendmail/include/sm/conf.h ============================================================================== --- stable/7/contrib/sendmail/include/sm/conf.h Sun Jan 31 19:15:47 2010 (r203304) +++ stable/7/contrib/sendmail/include/sm/conf.h Sun Jan 31 19:17:12 2010 (r203305) @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998-2007 Sendmail, Inc. and its suppliers. + * Copyright (c) 1998-2009 Sendmail, Inc. and its suppliers. * All rights reserved. * Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved. * Copyright (c) 1988, 1993 @@ -10,7 +10,7 @@ * the sendmail distribution. * * - * $Id: conf.h,v 1.134 2007/09/24 23:05:37 ca Exp $ + * $Id: conf.h,v 1.139 2009/06/16 23:41:32 ca Exp $ */ /* @@ -460,6 +460,7 @@ typedef int pid_t; # endif /* SOLARIS >= 21000 || (SOLARIS < 10000 && SOLARIS >= 210) */ # if SOLARIS >= 21100 || (SOLARIS < 10000 && SOLARIS >= 211) # define GETLDAPALIASBYNAME_VERSION 2 /* changed in S11 */ +# define HAVE_NANOSLEEP 1 /* moved from librt to libc in S11 */ # endif /* SOLARIS >= 21100 || (SOLARIS < 10000 && SOLARIS >= 211) */ # ifndef HASGETUSERSHELL # define HASGETUSERSHELL 0 /* getusershell(3) causes core dumps pre-2.7 */ @@ -1021,6 +1022,10 @@ extern unsigned int sleepX __P((unsigned # define SMRSH_PATH "/bin:/usr/bin" # endif /* ! SMRSH_PATH */ # endif /* __FreeBSD_version >= 330000 */ +# if __FreeBSD_version >= 430000 /* 4.3.0-release and later */ +# define SOCKADDR_LEN_T socklen_t /* e.g., arg#3 to accept, getsockname */ +# define SOCKOPT_LEN_T socklen_t /* arg#5 to getsockopt */ +# endif /* __FreeBSD_version >= 430000 */ # define USESYSCTL 1 /* use sysctl(3) for getting ncpus */ # include *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Jan 31 19:18:52 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D332B1065672; Sun, 31 Jan 2010 19:18:52 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C22F98FC25; Sun, 31 Jan 2010 19:18:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0VJIqt3014935; Sun, 31 Jan 2010 19:18:52 GMT (envelope-from gshapiro@svn.freebsd.org) Received: (from gshapiro@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0VJIqvc014933; Sun, 31 Jan 2010 19:18:52 GMT (envelope-from gshapiro@svn.freebsd.org) Message-Id: <201001311918.o0VJIqvc014933@svn.freebsd.org> From: Gregory Neil Shapiro Date: Sun, 31 Jan 2010 19:18:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203306 - stable/7/contrib/sendmail X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 19:18:52 -0000 Author: gshapiro Date: Sun Jan 31 19:18:52 2010 New Revision: 203306 URL: http://svn.freebsd.org/changeset/base/203306 Log: MFC: Update FreeBSD information Approved by: re (kensmith) Modified: stable/7/contrib/sendmail/FREEBSD-upgrade Directory Properties: stable/7/contrib/sendmail/ (props changed) Modified: stable/7/contrib/sendmail/FREEBSD-upgrade ============================================================================== --- stable/7/contrib/sendmail/FREEBSD-upgrade Sun Jan 31 19:17:12 2010 (r203305) +++ stable/7/contrib/sendmail/FREEBSD-upgrade Sun Jan 31 19:18:52 2010 (r203306) @@ -1,6 +1,6 @@ $FreeBSD$ -sendmail 8.14.3 +sendmail 8.14.4 originals can be found at: ftp://ftp.sendmail.org/pub/sendmail/ For the import of sendmail, the following directories were renamed: @@ -110,4 +110,4 @@ infrastructure in FreeBSD: usr.sbin/mailwrapper/Makefile gshapiro@FreeBSD.org -27-August-2008 +25-January-2010 From owner-svn-src-all@FreeBSD.ORG Sun Jan 31 19:21:03 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A9C801065718; Sun, 31 Jan 2010 19:21:03 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 983BC8FC3C; Sun, 31 Jan 2010 19:21:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0VJL3Cn015475; Sun, 31 Jan 2010 19:21:03 GMT (envelope-from gshapiro@svn.freebsd.org) Received: (from gshapiro@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0VJL3N0015472; Sun, 31 Jan 2010 19:21:03 GMT (envelope-from gshapiro@svn.freebsd.org) Message-Id: <201001311921.o0VJL3N0015472@svn.freebsd.org> From: Gregory Neil Shapiro Date: Sun, 31 Jan 2010 19:21:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203307 - stable/7/etc/sendmail X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 19:21:03 -0000 Author: gshapiro Date: Sun Jan 31 19:21:03 2010 New Revision: 203307 URL: http://svn.freebsd.org/changeset/base/203307 Log: MFC: Minor changes to force commit these files so new freebsd*.cf files are built to use the new sendmail-8.14.4/cf tree. Approved by: re (kensmith) Modified: stable/7/etc/sendmail/freebsd.mc stable/7/etc/sendmail/freebsd.submit.mc Directory Properties: stable/7/etc/ (props changed) Modified: stable/7/etc/sendmail/freebsd.mc ============================================================================== --- stable/7/etc/sendmail/freebsd.mc Sun Jan 31 19:18:52 2010 (r203306) +++ stable/7/etc/sendmail/freebsd.mc Sun Jan 31 19:21:03 2010 (r203307) @@ -34,7 +34,7 @@ divert(-1) # # -# This is a generic configuration file for FreeBSD 5.X and later systems. +# This is a generic configuration file for FreeBSD 6.X and later systems. # If you want to customize it, copy it to a name appropriate for your # environment and do the modifications there. # Modified: stable/7/etc/sendmail/freebsd.submit.mc ============================================================================== --- stable/7/etc/sendmail/freebsd.submit.mc Sun Jan 31 19:18:52 2010 (r203306) +++ stable/7/etc/sendmail/freebsd.submit.mc Sun Jan 31 19:21:03 2010 (r203307) @@ -25,3 +25,4 @@ define(`confBIND_OPTS', `WorkAroundBroke dnl dnl If you use IPv6 only, change [127.0.0.1] to [IPv6:::1] FEATURE(`msp', `[127.0.0.1]')dnl + From owner-svn-src-all@FreeBSD.ORG Sun Jan 31 19:29:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B37901065672; Sun, 31 Jan 2010 19:29:51 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A1F878FC1B; Sun, 31 Jan 2010 19:29:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0VJTpMd017474; Sun, 31 Jan 2010 19:29:51 GMT (envelope-from gshapiro@svn.freebsd.org) Received: (from gshapiro@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0VJTph7017472; Sun, 31 Jan 2010 19:29:51 GMT (envelope-from gshapiro@svn.freebsd.org) Message-Id: <201001311929.o0VJTph7017472@svn.freebsd.org> From: Gregory Neil Shapiro Date: Sun, 31 Jan 2010 19:29:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203308 - stable/6/contrib/sendmail/src X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 19:29:51 -0000 Author: gshapiro Date: Sun Jan 31 19:29:51 2010 New Revision: 203308 URL: http://svn.freebsd.org/changeset/base/203308 Log: MFC: Merge from vendor dist: Bring in a change already in the sendmail repository that will allow sendmail to be built with the c99 compiler. Modified: stable/6/contrib/sendmail/src/sendmail.h Directory Properties: stable/6/contrib/sendmail/ (props changed) Modified: stable/6/contrib/sendmail/src/sendmail.h ============================================================================== --- stable/6/contrib/sendmail/src/sendmail.h Sun Jan 31 19:21:03 2010 (r203307) +++ stable/6/contrib/sendmail/src/sendmail.h Sun Jan 31 19:29:51 2010 (r203308) @@ -2642,7 +2642,7 @@ extern void unsetenv __P((char *)); /* update file system information: +/- some blocks */ #if SM_CONF_SHM -extern void upd_qs __P((ENVELOPE *, bool, bool, char *)); +extern void upd_qs __P((ENVELOPE *, int, int, char *)); # define updfs(e, count, space, where) upd_qs(e, count, space, where) #else /* SM_CONF_SHM */ # define updfs(e, count, space, where) From owner-svn-src-all@FreeBSD.ORG Sun Jan 31 19:30:48 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0EDE0106566C; Sun, 31 Jan 2010 19:30:48 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ED6708FC24; Sun, 31 Jan 2010 19:30:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0VJUluk017746; Sun, 31 Jan 2010 19:30:47 GMT (envelope-from gshapiro@svn.freebsd.org) Received: (from gshapiro@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0VJUlrU017727; Sun, 31 Jan 2010 19:30:47 GMT (envelope-from gshapiro@svn.freebsd.org) Message-Id: <201001311930.o0VJUlrU017727@svn.freebsd.org> From: Gregory Neil Shapiro Date: Sun, 31 Jan 2010 19:30:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203309 - in stable/6/contrib/sendmail: . cf cf/cf cf/feature cf/m4 contrib doc/op include/libmilter include/sm libmilter libmilter/docs libsm libsmdb libsmutil praliases src vacation X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 19:30:48 -0000 Author: gshapiro Date: Sun Jan 31 19:30:47 2010 New Revision: 203309 URL: http://svn.freebsd.org/changeset/base/203309 Log: MFC: Merge sendmail 8.14.4 Modified: stable/6/contrib/sendmail/CACerts stable/6/contrib/sendmail/LICENSE stable/6/contrib/sendmail/PGPKEYS stable/6/contrib/sendmail/README stable/6/contrib/sendmail/RELEASE_NOTES stable/6/contrib/sendmail/cf/README stable/6/contrib/sendmail/cf/cf/submit.cf stable/6/contrib/sendmail/cf/feature/ldap_routing.m4 stable/6/contrib/sendmail/cf/m4/cfhead.m4 stable/6/contrib/sendmail/cf/m4/proto.m4 stable/6/contrib/sendmail/cf/m4/version.m4 stable/6/contrib/sendmail/contrib/qtool.pl stable/6/contrib/sendmail/contrib/smcontrol.pl stable/6/contrib/sendmail/doc/op/op.me stable/6/contrib/sendmail/include/libmilter/mfapi.h stable/6/contrib/sendmail/include/libmilter/mfdef.h stable/6/contrib/sendmail/include/sm/conf.h stable/6/contrib/sendmail/include/sm/ldap.h stable/6/contrib/sendmail/include/sm/sem.h stable/6/contrib/sendmail/libmilter/Makefile.m4 stable/6/contrib/sendmail/libmilter/comm.c stable/6/contrib/sendmail/libmilter/docs/api.html stable/6/contrib/sendmail/libmilter/docs/overview.html stable/6/contrib/sendmail/libmilter/docs/smfi_addheader.html stable/6/contrib/sendmail/libmilter/docs/smfi_chgheader.html stable/6/contrib/sendmail/libmilter/docs/smfi_insheader.html stable/6/contrib/sendmail/libmilter/engine.c stable/6/contrib/sendmail/libmilter/example.c stable/6/contrib/sendmail/libmilter/handler.c stable/6/contrib/sendmail/libmilter/libmilter.h stable/6/contrib/sendmail/libmilter/listener.c stable/6/contrib/sendmail/libmilter/main.c stable/6/contrib/sendmail/libmilter/worker.c stable/6/contrib/sendmail/libsm/debug.c stable/6/contrib/sendmail/libsm/ldap.c stable/6/contrib/sendmail/libsm/mbdb.c stable/6/contrib/sendmail/libsm/sem.c stable/6/contrib/sendmail/libsm/t-sem.c stable/6/contrib/sendmail/libsmdb/smdb1.c stable/6/contrib/sendmail/libsmdb/smdb2.c stable/6/contrib/sendmail/libsmutil/safefile.c stable/6/contrib/sendmail/praliases/praliases.8 stable/6/contrib/sendmail/praliases/praliases.c stable/6/contrib/sendmail/src/Makefile.m4 stable/6/contrib/sendmail/src/README stable/6/contrib/sendmail/src/TRACEFLAGS stable/6/contrib/sendmail/src/collect.c stable/6/contrib/sendmail/src/conf.c stable/6/contrib/sendmail/src/conf.h stable/6/contrib/sendmail/src/daemon.c stable/6/contrib/sendmail/src/deliver.c stable/6/contrib/sendmail/src/envelope.c stable/6/contrib/sendmail/src/headers.c stable/6/contrib/sendmail/src/main.c stable/6/contrib/sendmail/src/map.c stable/6/contrib/sendmail/src/milter.c stable/6/contrib/sendmail/src/queue.c stable/6/contrib/sendmail/src/ratectrl.c stable/6/contrib/sendmail/src/readcf.c stable/6/contrib/sendmail/src/savemail.c stable/6/contrib/sendmail/src/sendmail.8 stable/6/contrib/sendmail/src/sendmail.h stable/6/contrib/sendmail/src/sfsasl.c stable/6/contrib/sendmail/src/srvrsmtp.c stable/6/contrib/sendmail/src/tls.c stable/6/contrib/sendmail/src/usersmtp.c stable/6/contrib/sendmail/src/util.c stable/6/contrib/sendmail/src/version.c stable/6/contrib/sendmail/vacation/vacation.c Directory Properties: stable/6/contrib/sendmail/ (props changed) Modified: stable/6/contrib/sendmail/CACerts ============================================================================== --- stable/6/contrib/sendmail/CACerts Sun Jan 31 19:29:51 2010 (r203308) +++ stable/6/contrib/sendmail/CACerts Sun Jan 31 19:30:47 2010 (r203309) @@ -1,4 +1,4 @@ -# $Id: CACerts,v 8.3 2007/06/11 22:04:46 ca Exp $ +# $Id: CACerts,v 8.4 2009/06/26 05:46:10 ca Exp $ # This file contains some CA certificates that are used to sign the # certificates of mail servers of members of the sendmail consortium # who may reply to questions etc sent to sendmail.org. @@ -11,73 +11,6 @@ Certificate: Version: 3 (0x2) Serial Number: 0 (0x0) Signature Algorithm: md5WithRSAEncryption - Issuer: C=US, ST=California, L=Berkeley, O=Sendmail Consortium, CN=Certificate Authority/emailAddress=certificates@sendmail.org - Validity - Not Before: Feb 1 21:51:47 2003 GMT - Not After : Jan 31 21:51:47 2008 GMT - Subject: C=US, ST=California, L=Berkeley, O=Sendmail Consortium, CN=Certificate Authority/emailAddress=certificates@sendmail.org - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - RSA Public Key: (1024 bit) - Modulus (1024 bit): - 00:9a:fb:dc:4c:a3:58:21:1b:84:78:0a:53:56:b3: - 8d:84:05:b7:db:dd:d7:81:ea:dd:c1:ab:d4:be:d9: - 2b:12:e0:6d:3a:31:d5:f0:7b:13:fc:d8:da:09:0b: - 71:11:8e:b9:48:c4:ab:ae:f5:9c:4c:e2:04:27:8e: - c8:03:3a:aa:00:8b:46:f2:79:09:ae:65:b2:9a:66: - e7:ac:a9:ea:32:f7:4a:4e:fd:da:41:48:34:5a:9d: - b0:42:ea:55:40:17:27:5e:67:9e:e5:ce:dc:84:6d: - 1d:48:37:23:11:68:9d:a8:d4:58:02:05:ea:88:35: - bd:0d:b6:28:d5:cd:d4:d8:95 - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Subject Key Identifier: - DE:CD:6E:B8:89:34:06:3D:E9:CD:A7:FE:45:4F:4E:FB:E1:8D:E7:79 - X509v3 Authority Key Identifier: - keyid:DE:CD:6E:B8:89:34:06:3D:E9:CD:A7:FE:45:4F:4E:FB:E1:8D:E7:79 - DirName:/C=US/ST=California/L=Berkeley/O=Sendmail Consortium/CN=Certificate Authority/emailAddress=certificates@sendmail.org - serial:00 - - X509v3 Basic Constraints: - CA:TRUE - Signature Algorithm: md5WithRSAEncryption - 66:92:b9:57:17:3b:6a:0e:72:b1:85:29:53:9f:11:68:a0:0d: - 79:43:d0:7c:48:73:b9:71:09:50:08:02:03:0b:28:0c:33:9a: - 00:ac:94:69:4f:bc:0f:45:6b:f5:3a:ca:6a:87:a1:7f:28:f7: - 9a:c4:b6:b0:f3:dc:a3:eb:42:95:9f:99:19:f8:b8:84:6d:f1: - 1d:bc:9f:f0:a0:cc:60:2d:00:6b:17:55:33:16:85:d1:73:e1: - 00:59:89:33:19:c4:2e:29:5a:39:a7:0e:e7:9b:d2:4c:c7:b9: - 7d:6a:3e:b4:00:83:86:d3:16:28:fd:ad:55:65:60:4e:14:02: - 46:d3 ------BEGIN CERTIFICATE----- -MIIDsDCCAxmgAwIBAgIBADANBgkqhkiG9w0BAQQFADCBnTELMAkGA1UEBhMCVVMx -EzARBgNVBAgTCkNhbGlmb3JuaWExETAPBgNVBAcTCEJlcmtlbGV5MRwwGgYDVQQK -ExNTZW5kbWFpbCBDb25zb3J0aXVtMR4wHAYDVQQDExVDZXJ0aWZpY2F0ZSBBdXRo -b3JpdHkxKDAmBgkqhkiG9w0BCQEWGWNlcnRpZmljYXRlc0BzZW5kbWFpbC5vcmcw -HhcNMDMwMjAxMjE1MTQ3WhcNMDgwMTMxMjE1MTQ3WjCBnTELMAkGA1UEBhMCVVMx -EzARBgNVBAgTCkNhbGlmb3JuaWExETAPBgNVBAcTCEJlcmtlbGV5MRwwGgYDVQQK -ExNTZW5kbWFpbCBDb25zb3J0aXVtMR4wHAYDVQQDExVDZXJ0aWZpY2F0ZSBBdXRo -b3JpdHkxKDAmBgkqhkiG9w0BCQEWGWNlcnRpZmljYXRlc0BzZW5kbWFpbC5vcmcw -gZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAJr73EyjWCEbhHgKU1azjYQFt9vd -14Hq3cGr1L7ZKxLgbTox1fB7E/zY2gkLcRGOuUjEq671nEziBCeOyAM6qgCLRvJ5 -Ca5lsppm56yp6jL3Sk792kFINFqdsELqVUAXJ15nnuXO3IRtHUg3IxFonajUWAIF -6og1vQ22KNXN1NiVAgMBAAGjgf0wgfowHQYDVR0OBBYEFN7NbriJNAY96c2n/kVP -Tvvhjed5MIHKBgNVHSMEgcIwgb+AFN7NbriJNAY96c2n/kVPTvvhjed5oYGjpIGg -MIGdMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTERMA8GA1UEBxMI -QmVya2VsZXkxHDAaBgNVBAoTE1NlbmRtYWlsIENvbnNvcnRpdW0xHjAcBgNVBAMT -FUNlcnRpZmljYXRlIEF1dGhvcml0eTEoMCYGCSqGSIb3DQEJARYZY2VydGlmaWNh -dGVzQHNlbmRtYWlsLm9yZ4IBADAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBAUA -A4GBAGaSuVcXO2oOcrGFKVOfEWigDXlD0HxIc7lxCVAIAgMLKAwzmgCslGlPvA9F -a/U6ymqHoX8o95rEtrDz3KPrQpWfmRn4uIRt8R28n/CgzGAtAGsXVTMWhdFz4QBZ -iTMZxC4pWjmnDueb0kzHuX1qPrQAg4bTFij9rVVlYE4UAkbT ------END CERTIFICATE----- - - -Certificate: - Data: - Version: 3 (0x2) - Serial Number: 0 (0x0) - Signature Algorithm: md5WithRSAEncryption Issuer: C=US, ST=Illinois, L=De Kalb, O=Northern Illinois University, OU=Computer Science, CN=Neil Rickert/emailAddress=rickert@cs.niu.edu Validity Not Before: May 12 00:40:50 2000 GMT @@ -144,93 +77,93 @@ Certificate: Data: Version: 3 (0x2) Serial Number: - fa:7c:2c:80:29:3f:c2:64 + c2:3c:61:67:3b:0a:cc:5e Signature Algorithm: md5WithRSAEncryption - Issuer: C=US, ST=California, L=Berkeley, O=Endmail Org, OU=MTA, CN=Claus Assmann CA RSA 2007/emailAddress=ca+ca-rsa2007@esmtp.org + Issuer: C=US, ST=California, L=Berkeley, O=Endmail Org, OU=MTA, CN=Claus Assmann CA RSA 2009/emailAddress=ca+ca-rsa2009@esmtp.org Validity - Not Before: May 4 02:07:56 2007 GMT - Not After : May 3 02:07:56 2010 GMT - Subject: C=US, ST=California, L=Berkeley, O=Endmail Org, OU=MTA, CN=Claus Assmann CA RSA 2007/emailAddress=ca+ca-rsa2007@esmtp.org + Not Before: May 14 04:42:18 2009 GMT + Not After : May 13 04:42:18 2012 GMT + Subject: C=US, ST=California, L=Berkeley, O=Endmail Org, OU=MTA, CN=Claus Assmann CA RSA 2009/emailAddress=ca+ca-rsa2009@esmtp.org Subject Public Key Info: Public Key Algorithm: rsaEncryption RSA Public Key: (2048 bit) Modulus (2048 bit): - 00:b0:28:91:31:af:82:ce:72:ef:36:ab:7d:e9:b1: - f5:77:66:38:4b:38:1f:5f:3d:12:d3:c8:fd:9a:f4: - d4:f6:b8:90:f9:26:5f:29:f7:43:f9:34:ec:65:62: - 01:bb:64:f1:5d:ea:75:04:3d:92:65:60:a2:06:62: - fa:88:ca:d8:20:50:c8:1e:38:53:b5:18:dd:b7:bd: - c7:08:35:4c:d9:dc:c6:97:56:37:b6:65:33:74:5a: - b2:c3:85:08:2b:b7:26:70:ff:38:02:1a:67:6a:d0: - 49:18:10:4b:f8:db:af:06:9c:b1:a8:82:a1:b1:75: - d2:52:9b:53:0c:ca:a7:e3:15:38:79:6d:a1:f5:ef: - 7c:8b:fd:bd:04:78:f9:e8:1e:b9:92:ea:74:d7:45: - 1e:4c:c8:bd:f4:5c:fc:1a:7f:e7:31:c6:ab:cb:78: - c7:4d:2f:b5:72:10:35:27:4a:1a:fa:53:19:f8:a7: - 59:63:eb:e9:15:ab:dc:71:69:8c:42:1c:96:4e:89: - 80:66:c9:9e:21:d5:3d:08:19:74:a5:f5:07:a0:ae: - de:79:af:fd:42:c2:79:7e:8c:f8:39:22:3b:c3:c4: - 58:3b:d0:0d:e6:a9:11:b6:a2:cd:2e:e5:16:66:fd: - 7e:65:33:94:b0:36:80:27:f5:80:76:a9:e5:df:f2: - cf:ef + 00:d5:f8:d3:48:38:75:df:2e:6b:8b:c4:8d:1d:41: + 5e:ad:4b:96:3d:48:c2:dc:e5:ff:61:98:95:32:03: + e9:b6:71:5a:68:31:bc:e1:5c:aa:0e:70:a7:bc:51: + b7:13:6a:78:54:ae:a6:d0:44:49:1b:5e:37:5b:59: + 20:01:47:a7:ec:41:4c:11:79:8c:25:c1:1b:c0:ed: + 85:b2:de:0f:10:9f:e7:b2:a3:c4:f1:fc:85:51:aa: + d6:68:49:51:3e:04:e1:eb:e9:cd:87:1b:d0:9d:97: + 7b:4c:e1:1e:b1:6a:be:01:0a:a9:97:9a:50:89:e3: + 66:06:4c:07:cb:7e:99:70:13:e8:b4:9c:e7:e6:52: + 38:c0:64:90:42:d0:f5:cf:22:46:22:60:e9:34:70: + 1d:e3:d1:13:33:3a:31:ba:13:06:a8:c2:34:90:47: + c5:a1:bd:2d:7d:98:21:70:de:22:d0:13:11:e5:08: + dd:a0:77:0b:df:34:a7:07:55:de:5a:71:f6:6c:9e: + ec:f7:45:75:1f:22:a9:84:06:c6:4f:84:3d:4e:05: + d7:e4:e5:98:41:61:7b:8e:c9:3b:a6:ed:31:80:7d: + fd:fa:f0:dc:b7:07:82:b8:ec:27:20:39:5f:78:95: + f1:0d:93:8d:f9:4d:21:08:fd:72:89:01:ff:2c:a0: + 71:9d Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - B2:49:6B:52:45:EE:90:36:D2:79:47:03:33:D9:A0:BA:80:50:DA:1C + A7:61:FA:31:AF:A8:E2:5E:93:B6:84:9E:74:08:A2:76:50:87:69:7C X509v3 Authority Key Identifier: - keyid:B2:49:6B:52:45:EE:90:36:D2:79:47:03:33:D9:A0:BA:80:50:DA:1C - DirName:/C=US/ST=California/L=Berkeley/O=Endmail Org/OU=MTA/CN=Claus Assmann CA RSA 2007/emailAddress=ca+ca-rsa2007@esmtp.org - serial:FA:7C:2C:80:29:3F:C2:64 + keyid:A7:61:FA:31:AF:A8:E2:5E:93:B6:84:9E:74:08:A2:76:50:87:69:7C + DirName:/C=US/ST=California/L=Berkeley/O=Endmail Org/OU=MTA/CN=Claus Assmann CA RSA 2009/emailAddress=ca+ca-rsa2009@esmtp.org + serial:C2:3C:61:67:3B:0A:CC:5E X509v3 Basic Constraints: - CA:TRUE + CA:TRUE X509v3 Subject Alternative Name: - email:ca+ca-rsa2007@esmtp.org + email:ca+ca-rsa2009@esmtp.org X509v3 Issuer Alternative Name: - email:ca+ca-rsa2007@esmtp.org + email:ca+ca-rsa2009@esmtp.org Signature Algorithm: md5WithRSAEncryption - 98:98:7c:d3:d0:5b:72:47:15:e6:22:68:bb:78:0e:78:66:e9: - 56:16:d8:bc:9d:5a:dc:27:29:fb:91:2d:6a:21:35:18:56:b4: - 4f:2a:09:c0:08:6f:9a:59:2b:2e:72:9a:fb:50:ba:c7:a9:91: - a0:f9:6c:be:cf:78:42:43:02:70:53:97:ba:6a:e3:da:17:e8: - 1f:c7:3a:5b:e7:bc:eb:e5:24:4c:f5:cf:61:34:1e:20:ed:17: - 63:ef:81:d3:9e:25:fe:cc:05:19:cc:8a:82:c9:4c:3a:b5:6b: - 49:51:76:46:02:aa:60:bb:c4:b9:61:48:33:da:79:8d:46:a3: - 06:20:98:f3:b2:db:3b:ad:c9:1d:0e:97:3d:b7:14:19:d3:7d: - 04:8b:6a:81:e0:11:5b:e1:35:a3:ff:2f:11:86:1c:31:85:7a: - fd:3f:36:ef:99:25:46:2e:b0:cb:43:45:4a:ec:be:d3:3f:a4: - 77:9b:79:cc:ce:92:63:a5:d9:ed:db:a0:9d:5d:7c:d7:80:f6: - c9:41:fb:02:96:8e:fd:f3:da:05:9d:81:a7:25:da:26:35:3b: - a9:0c:8c:f5:a7:5d:48:ec:87:c7:7a:60:51:76:f2:de:9b:14: - 2b:55:8a:43:df:99:19:f3:eb:e7:03:e6:a7:a2:a2:28:dd:d5: - 07:6a:3f:f7 + b3:38:e0:da:a8:07:d8:cc:b8:4d:8c:20:a6:06:2c:f8:27:db: + 8e:28:0f:39:bd:d9:24:c7:9f:e0:4d:d6:b6:63:42:36:0f:d8: + 70:41:e7:9e:a2:24:64:05:ea:85:97:ac:f2:cc:c2:a6:71:bb: + 30:21:c1:c7:c4:54:34:1d:30:09:f0:9b:74:27:93:59:12:4c: + 53:0b:8c:3e:d0:39:ed:4a:d0:d9:66:24:d8:e7:e5:9c:a8:6d: + 5f:56:5d:9a:91:fe:1b:7d:b9:7c:79:9e:1c:b9:71:74:14:f8: + 0c:30:50:f9:b1:22:56:a8:4d:6f:4b:9b:e5:8a:81:33:1b:77: + 75:f6:d8:ce:d4:90:34:86:34:d1:86:75:a9:e1:23:e6:af:c1: + 8e:28:97:47:20:4d:1b:57:09:39:f4:56:01:d2:87:43:3e:29: + f6:c4:5b:7d:8f:9e:bd:ad:36:79:cf:09:70:43:30:21:98:23: + 31:c8:0d:39:ee:77:e1:4a:44:1a:5c:79:2f:6c:ec:8a:3c:db: + 99:a0:11:bc:1a:46:24:51:e7:75:d6:9a:db:ad:dd:55:d4:dd: + ca:81:a0:10:77:96:91:9c:76:30:38:18:f0:82:43:b3:7c:41: + 64:4c:4e:da:66:22:67:cf:b7:d7:10:ba:ed:f4:6d:43:59:00: + d0:82:1e:07 -----BEGIN CERTIFICATE----- -MIIFJzCCBA+gAwIBAgIJAPp8LIApP8JkMA0GCSqGSIb3DQEBBAUAMIGlMQswCQYD +MIIFJzCCBA+gAwIBAgIJAMI8YWc7CsxeMA0GCSqGSIb3DQEBBAUAMIGlMQswCQYD VQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTERMA8GA1UEBxMIQmVya2VsZXkx FDASBgNVBAoTC0VuZG1haWwgT3JnMQwwCgYDVQQLEwNNVEExIjAgBgNVBAMTGUNs -YXVzIEFzc21hbm4gQ0EgUlNBIDIwMDcxJjAkBgkqhkiG9w0BCQEWF2NhK2NhLXJz -YTIwMDdAZXNtdHAub3JnMB4XDTA3MDUwNDAyMDc1NloXDTEwMDUwMzAyMDc1Nlow +YXVzIEFzc21hbm4gQ0EgUlNBIDIwMDkxJjAkBgkqhkiG9w0BCQEWF2NhK2NhLXJz +YTIwMDlAZXNtdHAub3JnMB4XDTA5MDUxNDA0NDIxOFoXDTEyMDUxMzA0NDIxOFow gaUxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMREwDwYDVQQHEwhC ZXJrZWxleTEUMBIGA1UEChMLRW5kbWFpbCBPcmcxDDAKBgNVBAsTA01UQTEiMCAG -A1UEAxMZQ2xhdXMgQXNzbWFubiBDQSBSU0EgMjAwNzEmMCQGCSqGSIb3DQEJARYX -Y2ErY2EtcnNhMjAwN0Blc210cC5vcmcwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw -ggEKAoIBAQCwKJExr4LOcu82q33psfV3ZjhLOB9fPRLTyP2a9NT2uJD5Jl8p90P5 -NOxlYgG7ZPFd6nUEPZJlYKIGYvqIytggUMgeOFO1GN23vccINUzZ3MaXVje2ZTN0 -WrLDhQgrtyZw/zgCGmdq0EkYEEv4268GnLGogqGxddJSm1MMyqfjFTh5baH173yL -/b0EePnoHrmS6nTXRR5MyL30XPwaf+cxxqvLeMdNL7VyEDUnShr6Uxn4p1lj6+kV -q9xxaYxCHJZOiYBmyZ4h1T0IGXSl9Qegrt55r/1Cwnl+jPg5IjvDxFg70A3mqRG2 -os0u5RZm/X5lM5SwNoAn9YB2qeXf8s/vAgMBAAGjggFWMIIBUjAdBgNVHQ4EFgQU -sklrUkXukDbSeUcDM9mguoBQ2hwwgdoGA1UdIwSB0jCBz4AUsklrUkXukDbSeUcD -M9mguoBQ2hyhgaukgagwgaUxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9y +A1UEAxMZQ2xhdXMgQXNzbWFubiBDQSBSU0EgMjAwOTEmMCQGCSqGSIb3DQEJARYX +Y2ErY2EtcnNhMjAwOUBlc210cC5vcmcwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw +ggEKAoIBAQDV+NNIOHXfLmuLxI0dQV6tS5Y9SMLc5f9hmJUyA+m2cVpoMbzhXKoO +cKe8UbcTanhUrqbQREkbXjdbWSABR6fsQUwReYwlwRvA7YWy3g8Qn+eyo8Tx/IVR +qtZoSVE+BOHr6c2HG9Cdl3tM4R6xar4BCqmXmlCJ42YGTAfLfplwE+i0nOfmUjjA +ZJBC0PXPIkYiYOk0cB3j0RMzOjG6EwaowjSQR8WhvS19mCFw3iLQExHlCN2gdwvf +NKcHVd5acfZsnuz3RXUfIqmEBsZPhD1OBdfk5ZhBYXuOyTum7TGAff368Ny3B4K4 +7CcgOV94lfENk435TSEI/XKJAf8soHGdAgMBAAGjggFWMIIBUjAdBgNVHQ4EFgQU +p2H6Ma+o4l6TtoSedAiidlCHaXwwgdoGA1UdIwSB0jCBz4AUp2H6Ma+o4l6TtoSe +dAiidlCHaXyhgaukgagwgaUxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9y bmlhMREwDwYDVQQHEwhCZXJrZWxleTEUMBIGA1UEChMLRW5kbWFpbCBPcmcxDDAK -BgNVBAsTA01UQTEiMCAGA1UEAxMZQ2xhdXMgQXNzbWFubiBDQSBSU0EgMjAwNzEm -MCQGCSqGSIb3DQEJARYXY2ErY2EtcnNhMjAwN0Blc210cC5vcmeCCQD6fCyAKT/C -ZDAMBgNVHRMEBTADAQH/MCIGA1UdEQQbMBmBF2NhK2NhLXJzYTIwMDdAZXNtdHAu -b3JnMCIGA1UdEgQbMBmBF2NhK2NhLXJzYTIwMDdAZXNtdHAub3JnMA0GCSqGSIb3 -DQEBBAUAA4IBAQCYmHzT0FtyRxXmImi7eA54ZulWFti8nVrcJyn7kS1qITUYVrRP -KgnACG+aWSsucpr7ULrHqZGg+Wy+z3hCQwJwU5e6auPaF+gfxzpb57zr5SRM9c9h -NB4g7Rdj74HTniX+zAUZzIqCyUw6tWtJUXZGAqpgu8S5YUgz2nmNRqMGIJjzsts7 -rckdDpc9txQZ030Ei2qB4BFb4TWj/y8RhhwxhXr9PzbvmSVGLrDLQ0VK7L7TP6R3 -m3nMzpJjpdnt26CdXXzXgPbJQfsClo7989oFnYGnJdomNTupDIz1p11I7IfHemBR -dvLemxQrVYpD35kZ8+vnA+anoqIo3dUHaj/3 +BgNVBAsTA01UQTEiMCAGA1UEAxMZQ2xhdXMgQXNzbWFubiBDQSBSU0EgMjAwOTEm +MCQGCSqGSIb3DQEJARYXY2ErY2EtcnNhMjAwOUBlc210cC5vcmeCCQDCPGFnOwrM +XjAMBgNVHRMEBTADAQH/MCIGA1UdEQQbMBmBF2NhK2NhLXJzYTIwMDlAZXNtdHAu +b3JnMCIGA1UdEgQbMBmBF2NhK2NhLXJzYTIwMDlAZXNtdHAub3JnMA0GCSqGSIb3 +DQEBBAUAA4IBAQCzOODaqAfYzLhNjCCmBiz4J9uOKA85vdkkx5/gTda2Y0I2D9hw +QeeeoiRkBeqFl6zyzMKmcbswIcHHxFQ0HTAJ8Jt0J5NZEkxTC4w+0DntStDZZiTY +5+WcqG1fVl2akf4bfbl8eZ4cuXF0FPgMMFD5sSJWqE1vS5vlioEzG3d19tjO1JA0 +hjTRhnWp4SPmr8GOKJdHIE0bVwk59FYB0odDPin2xFt9j569rTZ5zwlwQzAhmCMx +yA057nfhSkQaXHkvbOyKPNuZoBG8GkYkUed11prbrd1V1N3KgaAQd5aRnHYwOBjw +gkOzfEFkTE7aZiJnz7fXELrt9G1DWQDQgh4H -----END CERTIFICATE----- Modified: stable/6/contrib/sendmail/LICENSE ============================================================================== --- stable/6/contrib/sendmail/LICENSE Sun Jan 31 19:29:51 2010 (r203308) +++ stable/6/contrib/sendmail/LICENSE Sun Jan 31 19:30:47 2010 (r203309) @@ -1,7 +1,7 @@ SENDMAIL LICENSE The following license terms and conditions apply, unless a different -license is obtained from Sendmail, Inc., 6425 Christie Ave, Fourth Floor, +license is obtained from Sendmail, Inc., 6475 Christie Ave, Suite 350, Emeryville, CA 94608, USA, or by electronic mail at license@sendmail.com. License Terms: @@ -33,7 +33,7 @@ each of the following conditions is met: forth as paragraph 6 below, in the documentation and/or other materials provided with the distribution. For the purposes of binary distribution the "Copyright Notice" refers to the following language: - "Copyright (c) 1998-2004 Sendmail, Inc. All rights reserved." + "Copyright (c) 1998-2009 Sendmail, Inc. All rights reserved." 4. Neither the name of Sendmail, Inc. nor the University of California nor the names of their contributors may be used to endorse or promote @@ -76,4 +76,4 @@ each of the following conditions is met: (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -$Revision: 8.13 $, Last updated $Date: 2004/05/11 23:57:57 $ +$Revision: 8.15 $, Last updated $Date: 2009/03/04 19:58:04 $ Modified: stable/6/contrib/sendmail/PGPKEYS ============================================================================== --- stable/6/contrib/sendmail/PGPKEYS Sun Jan 31 19:29:51 2010 (r203308) +++ stable/6/contrib/sendmail/PGPKEYS Sun Jan 31 19:30:47 2010 (r203309) @@ -142,6 +142,79 @@ gpExpdV7qPrw9k01j5rod5PjZlG8zV0= -----END PGP PUBLIC KEY BLOCK----- Type Bits KeyID Created Expires Algorithm Use +pub 1024 0xA77F2429 2009-01-01 ---------- RSA Sign & Encrypt +f16 Fingerprint16 = 33 3A 62 61 2C F3 21 AA 4E 87 47 F2 2F 2C 40 4D +uid Sendmail Signing Key/2009 + +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.4.8 (OpenBSD) + +mQCNA0lcVHwAAAEEAM7aXDJHNH3g0oxbsSUjqRiKh47W4srnfEYREj2Q26AXWzXE +BSyfl6QMRLbSVNIiPOWlMPbZWjCx4c1TNsj3TiiklCcievlvbAPVa3kY2hZ6pmyU +czJq4S/mT1lt+uPOCjvKxo8OLQoFuJMTIS+Ya7LVjW7fJD5yrhKJbpunfyQpAAUR +tDFTZW5kbWFpbCBTaWduaW5nIEtleS8yMDA5IDxzZW5kbWFpbEBTZW5kbWFpbC5P +Ukc+iQCVAwUQSVxUfBKJbpunfyQpAQHirwP+JvK4cBqtw9rxSZ0whmC1N4a2r24f +SH2WDC1zNNeiCHg93udKs3PKLPm688U+WxiaSsrGQXQlGojx7jn1XggTPOG+SteJ +JP/Ea9buJK9KaLaniUm84XxHxa71y3v3+SfhJMpJioY4G6qKqfLZFzmpiwUTvtLR +B9LfWvzvUUHJSTyJAJUDBRBJXFY9wZwdJRLTRh0BAcrBBACYcnhE8cx5eA8WqTR4 +2CVZgxxrIMOrqda+hdpSgsRjUEWRpb5+Es1hfM3OLXqbsywCTUvxeoymVYQr3aSP +sbm+rQ4l6gf7ibpiVZA6vDxh0EfwNYE+aI3AoW03ODoCAaj+utOjGdqzIcec0RpS +zXPI1gWW3sBck95KsiDUYmXYTIkAlQMFEElcVkzvWJZk1DLhnQEByUIEAKOdWew/ +M75xyVbugMGUZnAJrTZPKu9y3V3TLqyET3rGYfLjt6M4R+99j+mkhmi2rOckM9VV +30kvjW9BBarnr13XoMVTtLneoLaVrbMw4aZHRkTdRL14LIj+w1jzEKXDwYylJbGZ +UlmZn7lFkJrLIaBDmQl7GswBJRJvFLQbdzzMiQCVAwUQSVxWVW9Sk9ijm6ZVAQHr +DQP9ECF56TGI8YRPVOzZJzUyOmiMAouRoJ74aWfM8TA2Q8gVtedDc6IHiNzcVjq4 +jOZuMgb1KTPPF/TwWL5MHIFldsMdJ/i0Rml+x4h3Ff+8ZYlJgFBylUmx++nW1rbc +nn9RS/Es+zKsDOnTN5fTFo3br1z2saLnuXNB+SuJmSC8i2CJAJUDBRBJXFZgnBy9 +4uNcVjUBAcdaA/9ur7HbueufNbvr0HoDbhBijagbeqRrzmYtsOtYUfBGEtc5JiNH +r7NIAM66Tog8p9ZZA+qOaGHvujecBOTlokLpPKvcQngOz7c53z3Yop90TnMytUL2 +IExcuCdH4BMy72R5nH5YY5pMqb7pFjcyGDDIM8cxMgbZ3gzvbPDHZMUQ6okAlQMF +EElcVmc4IttHzDdPLQEBJ/0EANME79+Z/BItRKlSgzH52JBGGQZrZi57Pz+hJ+du +K7RgSkhpsXnk1kELvig5TCd2YaDZXoZwUrJLObVKAMI4lpGNTkZlzRRrFXcx4Q14 +YPJ/nay5jkqHvR9neKTsifzdsPVLi9nUDBMtURIQo5yn5AYMloiDzw/HpNGvkk92 +ITqwiQCVAwUQSVxWbolpYrhnjAoDAQHLDgP+L+Od/CoHaVUpsZld1SJKwvelIe1S +wT8SBqppQyDbKw0ZczetUSASt+g8OqJKD88I2no5mjEmHx0lncoKJ06qxpJBIu7A +lbByeE9i8Bn52YKhPGka4AwA3DOm5yR967BncOf/zY65t83hocZL1uKQeHW8wnpR +x3o+RBz2354phxyJAJUDBRBJXFZ2IYPhsTlvB4kBARKHA/sHFkKAvCo5Hto2CJWF +gyBCJUsUuHCaQTkfL4IspkIBjmrsr2KKe0WQUqIlebhhWzVhgYsc8AXZil+pLahC +L9CNQVQpoPKD3mit2+Vsi8254QxQjeYD3jUQT1C6uq6l9IORdIxYah9DNBNHCgwX +PuTMmpU1JQj6haKhGa1kbaQq2IkAlQMFEElcVn3I1e0plfYXcQEB2TYD+wYXb+sU +0vmG51lVWj2BPMvv/lbfzU6KnqXNCD2ra0yu6C83WHNFXEz+JuLYlzLnaKm8DJI/ +SFBZZIxpUaoaFHyGrjbWrDI6oMfvp/dMnJjfibNbmZuVIl2z0TKO98jiJ/+/9e/5 +AtCsSFfyZ6FSTtAHbG1ZOJvhPBub9aELiUCiiQCVAwUQSVxWknCgJE0e+ZJRAQHz +NQP7BYHJwViDWqp9c5DmxM6vHrVq/wsDyPgm52+QpopErCRt2iTpocldHQG/9ZdE +0ENn6PhI49xobh+m0HfoZZ+Cr4LPU7g2ftmEtrxtDN1BYdNQHZLZStUp7A8SsLgL +2IvYSI9iKAmQoWQTAOECDD41o1BOnnM1eraeUyqdmZaFm8iJAJUDBRBJXFaZHnuz +yK+VliUBAVgdBACmbsAKzbNnvfaTCJxqhaJI5uNDCdH7rgoCHEJR4aefPY89Do7b +ixLCyW4wUr7pxqvf/xbEGJHNCG5WnmncXBCnoEVqmHb7J9vQw1o3K6pRPqtTjVBR +VEUUK4xe6ZIOft3FOI5fKAPO5Vc9NlxPDjSJcjR6+B//TpecZ2L9A/Dp+4kAlQMF +EElcVqGXQwEYcJO4QQEBl1YD/AsMu6g/4KiwelIz2rDzm4wzvsQm+cYm47hv2IHV +Fkx5f8mS6um39+4J/FHni7i2bfSuHpRn1RdURR7Gebu7HKYfGTNLNYyKt7U/6VFb +ylDxUTS32sier3GlDrlJrBQ+VDIG4dUaioKoKUXxBhEVzAZrvkYhaiGWIl/K4zz5 +C1qdiQCVAwUQSVxWqdiq8Mr2swcpAQFzwgP9FJOM0MysHIjq/KihatPjerxhud6j +bd1Zo/tIKybvPsJNaeTeR+0IKm+vbAWtYL5oBc2wxgdQAs8tUi5SryK1otMAJ6sj +KNN+QxIp2FEumzReGRo+hCETiusjD9Abbh1L9L7FOkhGhH+m6fBVQIYUytmMFpnQ +qn17I9DVPxpwob+JAJUDBRBJXFa9wCnKQBb0zOkBAd0BA/9yRRB2waP3duE2rYKF +Obsbs3XXOQHEl/rjpIHVmYIqqRSglmlTEXwjKJeCEN9q0PRiazhztEhVJWP8ORRP +fkjlscP25T4A4tMC1F49biMak5MI2ffawVkUVsjIWFF/vFQIqKl4JG8SI/r4Oxep +yaozkowCJX3zZtkEfB2Id1nU9IkAlQMFEElcV0e92o/WP+p9/QEBxQID/R4E3pRI +isTe5RJotQKcsQKo3y+8KkmvfZQ6d3h/n4anq6bs1rRrWKqL6XoM7Nc5teLR3QaW +CVTssPtt3P06WqMm8Ct25iZ8dIyqRN0d0k5dJ6d5Qp4WSCL0TmTQ7wO4q9aCOhGK +YFKCP3i2v8zCOhuqk2pLeOYxl6f912COvmwSiQCVAwUQSVxXVXxLZ22gDhVjAQFU +WAP/TjyHxNVsptLRcFRfMCi9fjkrftbma00pzIaj9d6Ybxt6nMQ8C8TCTrurkXpq +9kGIrFVndsovql8++Y9VsDeh/vLX65mZl8FEVFvbl38+YSYeB44upadibU6uB0iL +zFz6da6gZmm/NENX3UCldIWv35L33EFotQ9GxTn8b0MQnY2JAJUDBRBJXFdl1uCh +/k++Kt0BAQ39BACfVZaig8loIuKosYh5Ydcefe0NZTZOCgPZ+mAzShEeBIN/btA0 ++jMXfu6tEgqUKQnyKCXZcPoZwY9Y0hOqGT2AIkWmZHJ/uKrzXIAcwUTS0TQV1k5x +mHPkZmvr55JDYp/JIbxIZ8QTpTuEzlymow12qMOUhPkL/wOQET9duDMKzokAlQMF +EEli68zPHrUDIjJ6AQEBzacD/RPBzReBSsVar0+B4xEW0i11LKV2Q7gH+y256IDX +3SxML4+GZM9FmEMVhlTbHPOE2rfwFvLrMxCmIqGHjMccJRZpV9OFpXa8z15FRDmJ +U01qOITDcIAiIPgGamifxMOYG4+spaj2sxLGnY/6aowhjh1XNbQPuJ6laNq7bz50 +wzfu +=RCyv +-----END PGP PUBLIC KEY BLOCK----- + +Type Bits KeyID Created Expires Algorithm Use pub 1024 0xF6B30729 2008-01-18 ---------- RSA Sign & Encrypt f16 Fingerprint16 = 07 FB 9A F9 F7 94 4B E4 0F 28 D1 8E 23 6F A2 B0 uid Sendmail Signing Key/2008 @@ -1792,4 +1865,4 @@ DnF3FZZEzV7oqPwC2jzv/1dD6GFhtgy0cnyoPGUJ =nES8 -----END PGP PUBLIC KEY BLOCK----- -$Revision: 8.26 $, Last updated $Date: 2008/01/22 06:20:27 $ +$Revision: 8.29 $, Last updated $Date: 2009/01/06 05:59:03 $ Modified: stable/6/contrib/sendmail/README ============================================================================== --- stable/6/contrib/sendmail/README Sun Jan 31 19:29:51 2010 (r203308) +++ stable/6/contrib/sendmail/README Sun Jan 31 19:30:47 2010 (r203309) @@ -38,6 +38,7 @@ the latest updates. 4. Read cf/README. Sendmail is a trademark of Sendmail, Inc. +US Patent Numbers 6865671, 6986037. +-----------------------+ | DIRECTORY PERMISSIONS | @@ -464,4 +465,4 @@ sendmail Source for the sendmail program test Some test scripts (currently only for compilation aids). vacation Source for the vacation program. NOT PART OF SENDMAIL! -$Revision: 8.94 $, Last updated $Date: 2008/02/12 16:40:05 $ +$Revision: 8.95 $, Last updated $Date: 2009/04/10 17:49:18 $ Modified: stable/6/contrib/sendmail/RELEASE_NOTES ============================================================================== --- stable/6/contrib/sendmail/RELEASE_NOTES Sun Jan 31 19:29:51 2010 (r203308) +++ stable/6/contrib/sendmail/RELEASE_NOTES Sun Jan 31 19:30:47 2010 (r203309) @@ -1,11 +1,96 @@ SENDMAIL RELEASE NOTES - $Id: RELEASE_NOTES,v 8.1926 2008/05/03 03:34:26 ca Exp $ + $Id: RELEASE_NOTES,v 8.1963 2009/12/23 04:43:46 ca Exp $ This listing shows the version of the sendmail binary, the version of the sendmail configuration files, the date of release, and a summary of the changes in that release. +8.14.4/8.14.4 2009/12/30 + SECURITY: Handle bogus certificates containing NUL characters + in CNs by placing a string indicating a bad certificate + in the {cn_subject} or {cn_issuer} macro. Patch inspired + by Matthias Andree's changes for fetchmail. + During the generation of a queue identifier an integer overflow + could occur which might result in bogus characters + being used. Based on patch from John Vannoy of + Pepperdine University. + The value of headers, e.g., Precedence, Content-Type, et.al., + was not processed correctly. Patch from Per Hedeland. + Between 8.11.7 and 8.12.0 the length limitation on a return + path was erroneously reduced from MAXNAME (256) to + MAXSHORTSTR (203). Patch from John Gardiner Myers + of Proofpoint; the problem was also noted by Steve + Hubert of University of Washington. + Prevent a crash when a hostname lookup returns a seemingly + valid result which contains a NULL pointer (this seems + to be happening on some Linux versions). + The process title was missing the current load average when + the MTA was delaying connections due to DelayLA. + Patch from Dick St.Peters of NetHeaven. + Do not reset the number of queue entries in shared memory if + only some of them are processed. + Fix overflow of an internal array when parsing some replies + from a milter. Problem found by Scott Rotondo + of Sun Microsystems. + If STARTTLS is turned off in the server (via M=S) then it + would not be initialized for use in the client either. + Patch from Kazuteru Okahashi of IIJ. + If a Diffie-Hellman cipher is selected for STARTTLS, the + handshake could fail with some TLS implementations + because the prime used by the server is not long enough. + Note: the initialization of the DSA/DH parameters for + the server can take a significant amount of time on slow + machines. This can be turned off by setting DHParameters + to none or a file (see doc/op/op.me). Patch from + Petr Lampa of the Brno University of Technology. + Fix handling of `b' modifier for DaemonPortOptions on little + endian machines for loopback address. Patch from + John Beck of Sun Microsystems. + Fix a potential memory leak in libsmdb/smdb1.c found by parfait. + Based on patch from Jonathan Gray of OpenBSD. + If a milter sets the reply code to "421" during the transfer + of the body, the SMTP server will terminate the SMTP session + with that error to match the behavior of the other callbacks. + Return EX_IOERR (instead of 0) if a mail submission fails due to + missing disk space in the mail queue. Based on patch + from Martin Poole of RedHat. + CONFIG: Using FEATURE(`ldap_routing')'s `nodomain' argument would + cause addresses not found in LDAP to be misparsed. + CONFIG: Using a CN restriction did not work for TLS_Clt as it + referred to a wrong macro. Patch from John Gardiner + Myers of Proofpoint. + CONFIG: The option relaytofulladdress of FEATURE(`access_db') + did not work if FEATURE(`relay_hosts_only') is used too. + Problem noted by Kristian Shaw. + CONFIG: The internal function lower() was broken and hence + strcasecmp() did not work either, which could cause + problems for some FEATURE()s if upper case arguments + were used. Patch from Vesa-Matti J Kari of the + University of Helsinki. + LIBMILTER: Fix internal check whether a milter application + is compiled against the same version of libmilter as + it is linked against (especially useful for dynamic + libraries). + LIBMILTER: Fix memory leak that occurred when smfi_setsymlist() + was used. Based on patch by Dan Lukes. + LIBMILTER: Document the effect of SMFIP_HDR_LEADSPC for filters + which add, insert, or replace headers. From Benjamin + Pineau. + LIBMILTER: Fix error messages which refer to "select()" to be + correct if SM_CONF_POLL is used. Based on patch from + John Nemeth. + LIBSM: Fix handling of LDAP search failures where the error is + carried in the search result itself, such as seen with + OpenLDAP proxy servers. + VACATION: Do not refer to a local variable outside its scope. + Based on patch from Mark Costlow of Southwest Cyberport. + Portability: + Enable HAVE_NANOSLEEP for SunOS 5.11. Patch from + John Beck of Sun Microsystems. + Drop NISPLUS from default SunOS 5.11 map definitions. + Patch from John Beck of Sun Microsystems. + 8.14.3/8.14.3 2008/05/03 During ruleset processing the generation of a key for a map lookup and the parsing of the default value was broken @@ -37,7 +122,7 @@ summary of the changes in that release. Support shared libraries in Darwin 8 and 9. Patch from Chris Behrens of Concentric. Add support for SCO OpenServer 6, patch from Boyd Gerber. - DEVTOOLS: Clarify that confSHAREDLIBDIR requires a trailing path. + DEVTOOLS: Clarify that confSHAREDLIBDIR requires a trailing slash. Added Files: devtools/OS/Darwin.9.x devtools/OS/OSR.i386 Modified: stable/6/contrib/sendmail/cf/README ============================================================================== --- stable/6/contrib/sendmail/cf/README Sun Jan 31 19:29:51 2010 (r203308) +++ stable/6/contrib/sendmail/cf/README Sun Jan 31 19:30:47 2010 (r203309) @@ -3142,7 +3142,7 @@ starts with '+' and the items are separa extensions are: CN:name name must match ${cn_subject} -CN ${server_name} must match ${cn_subject} +CN ${client_name}/${server_name} must match ${cn_subject} CS:name name must match ${cert_subject} CI:name name must match ${cert_issuer} @@ -4701,4 +4701,4 @@ M4 DIVERSIONS 8 DNS based blacklists 9 special local rulesets (1 and 2) -$Revision: 8.724 $, Last updated $Date: 2008/02/15 23:05:32 $ +$Revision: 8.727 $, Last updated $Date: 2009/05/07 23:46:17 $ Modified: stable/6/contrib/sendmail/cf/cf/submit.cf ============================================================================== --- stable/6/contrib/sendmail/cf/cf/submit.cf Sun Jan 31 19:29:51 2010 (r203308) +++ stable/6/contrib/sendmail/cf/cf/submit.cf Sun Jan 31 19:30:47 2010 (r203309) @@ -1,5 +1,5 @@ # -# Copyright (c) 1998-2004 Sendmail, Inc. and its suppliers. +# Copyright (c) 1998-2004, 2009 Sendmail, Inc. and its suppliers. # All rights reserved. # Copyright (c) 1983, 1995 Eric P. Allman. All rights reserved. # Copyright (c) 1988, 1993 @@ -16,8 +16,8 @@ ##### ##### SENDMAIL CONFIGURATION FILE ##### -##### built by ca@wiz.smi.sendmail.com on Fri May 2 20:39:00 PDT 2008 -##### in /extra/home/ca/sm-8.14.3/OpenSource/sendmail-8.14.3/cf/cf +##### built by ca@wiz.smi.sendmail.com on Tue Dec 22 20:49:09 PST 2009 +##### in /extra/home/ca/sm-8.14.4/OpenSource/sendmail-8.14.4/cf/cf ##### using ../ as configuration include directory ##### ###################################################################### @@ -27,7 +27,7 @@ ###################################################################### ###################################################################### -##### $Id: cfhead.m4,v 8.116 2004/01/28 22:02:22 ca Exp $ ##### +##### $Id: cfhead.m4,v 8.120 2009/01/23 22:39:21 ca Exp $ ##### ##### $Id: cf.m4,v 8.32 1999/02/07 07:26:14 gshapiro Exp $ ##### ##### $Id: submit.mc,v 8.14 2006/04/05 05:54:41 ca Exp $ ##### ##### $Id: msp.m4,v 1.33 2004/02/09 22:32:38 ca Exp $ ##### @@ -35,7 +35,7 @@ ##### $Id: no_default_msa.m4,v 8.2 2001/02/14 05:03:22 gshapiro Exp $ ##### -##### $Id: proto.m4,v 8.734 2008/01/24 23:42:01 ca Exp $ ##### +##### $Id: proto.m4,v 8.741 2009/12/11 00:04:53 ca Exp $ ##### # level 10 config file format V10/Berkeley @@ -114,7 +114,7 @@ D{MTAHost}[127.0.0.1] # Configuration version number -DZ8.14.3/Submit +DZ8.14.4/Submit ############### @@ -440,6 +440,7 @@ O RunAsUser=smmsp # once the threshold number of recipients have been rejected #O BadRcptThrottle=0 + # shall we get local names from our installed interfaces? O DontProbeInterfaces=True @@ -500,6 +501,7 @@ O PidFile=/var/spool/clientmqueue/sm-cli # SMTP STARTTLS server options #O TLSSrvOptions + # Input mail filters #O InputMailFilters Modified: stable/6/contrib/sendmail/cf/feature/ldap_routing.m4 ============================================================================== --- stable/6/contrib/sendmail/cf/feature/ldap_routing.m4 Sun Jan 31 19:29:51 2010 (r203308) +++ stable/6/contrib/sendmail/cf/feature/ldap_routing.m4 Sun Jan 31 19:30:47 2010 (r203309) @@ -1,6 +1,6 @@ divert(-1) # -# Copyright (c) 1999-2002, 2004, 2007 Sendmail, Inc. and its suppliers. +# Copyright (c) 1999-2002, 2004, 2007, 2009 Sendmail, Inc. and its suppliers. # All rights reserved. # # By using this file, you agree to the terms and conditions set @@ -10,7 +10,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: ldap_routing.m4,v 8.15 2007/05/01 17:38:25 ca Exp $') +VERSIONID(`$Id: ldap_routing.m4,v 8.17 2009/06/26 21:11:08 ca Exp $') divert(-1) # Check first two arguments. If they aren't set, may need to warn in proto.m4 @@ -35,12 +35,40 @@ ifelse(len(X`'_ARG6_), `1', `define(`_LD _ARG6_, `tempfail', `define(`_LDAP_ROUTE_MAPTEMP_', `_TEMPFAIL_')', _ARG6_, `queue', `define(`_LDAP_ROUTE_MAPTEMP_', `_QUEUE_')') +define(`_ATMPF_', `')dnl +dnl check whether arg contains -T`'_ATMPF_ +dnl unless it is a sequence map or just LDAP +dnl note: this does not work if ARG1 begins with space(s), however, as +dnl we issue a warning, hopefully the user will fix it... +ifelse(defn(`_ARG1_'), `', `', + defn(`_ARG1_'), `LDAP', `', + `ifelse(index(_ARG1_, `sequence '), `0', `', + `ifelse(index(_ARG1_, _ATMPF_), `-1', + `errprint(`*** WARNING: missing -T'_ATMPF_` in first argument of FEATURE(`ldap_routing') +') + define(`_ABP_', index(_ARG1_, ` ')) + define(`_NARG1_', `substr(_ARG1_, 0, _ABP_) -T'_ATMPF_` substr(_ARG1_, _ABP_)') + ') + ') + ') +ifelse(defn(`_ARG2_'), `', `', + defn(`_ARG2_'), `LDAP', `', + `ifelse(index(_ARG2_, `sequence '), `0', `', + `ifelse(index(_ARG2_, _ATMPF_), `-1', + `errprint(`*** WARNING: missing -T'_ATMPF_` in second argument of FEATURE(`ldap_routing') +') + define(`_ABP_', index(_ARG2_, ` ')) + define(`_NARG2_', `substr(_ARG2_, 0, _ABP_) -T'_ATMPF_` substr(_ARG2_, _ABP_)') + ') + ') + ') + LOCAL_CONFIG # LDAP routing maps Kldapmh ifelse(len(X`'_ARG1_), `1', `ldap -1 -T -v mailHost -k (&(objectClass=inetLocalMailRecipient)(mailLocalAddress=%0))', - `_ARG1_') + defn(`_NARG1_'), `', `_ARG1_', `_NARG1_') Kldapmra ifelse(len(X`'_ARG2_), `1', `ldap -1 -T -v mailRoutingAddress -k (&(objectClass=inetLocalMailRecipient)(mailLocalAddress=%0))', - `_ARG2_') + defn(`_NARG2_'), `', `_ARG2_', `_NARG2_') Modified: stable/6/contrib/sendmail/cf/m4/cfhead.m4 ============================================================================== --- stable/6/contrib/sendmail/cf/m4/cfhead.m4 Sun Jan 31 19:29:51 2010 (r203308) +++ stable/6/contrib/sendmail/cf/m4/cfhead.m4 Sun Jan 31 19:30:47 2010 (r203309) @@ -1,5 +1,5 @@ # -# Copyright (c) 1998-2004 Sendmail, Inc. and its suppliers. +# Copyright (c) 1998-2004, 2009 Sendmail, Inc. and its suppliers. # All rights reserved. # Copyright (c) 1983, 1995 Eric P. Allman. All rights reserved. # Copyright (c) 1988, 1993 @@ -49,7 +49,7 @@ define(`OSTYPE', define(`_ARG_', $2) include(_CF_DIR_`'ostype/$1.m4)POPDIVERT`'') ## helpful functions -define(`lower', `translit(`$1', `ABCDEFGHIJKLMNOPQRSTUVWXYZ', `abcdefghijklmnopqrstuvwx')') +define(`lower', `translit(`$1', `ABCDEFGHIJKLMNOPQRSTUVWXYZ', `abcdefghijklmnopqrstuvwxyz')') define(`strcasecmp', `ifelse(lower($1), lower($2), `1', `0')') ## access to further arguments in FEATURE/HACK define(`_ACC_ARG_1_',`$1') @@ -308,4 +308,4 @@ define(`confMILTER_MACROS_EOM', `{msg_id divert(0)dnl -VERSIONID(`$Id: cfhead.m4,v 8.116 2004/01/28 22:02:22 ca Exp $') +VERSIONID(`$Id: cfhead.m4,v 8.120 2009/01/23 22:39:21 ca Exp $') Modified: stable/6/contrib/sendmail/cf/m4/proto.m4 ============================================================================== --- stable/6/contrib/sendmail/cf/m4/proto.m4 Sun Jan 31 19:29:51 2010 (r203308) +++ stable/6/contrib/sendmail/cf/m4/proto.m4 Sun Jan 31 19:30:47 2010 (r203309) @@ -1,6 +1,6 @@ divert(-1) # -# Copyright (c) 1998-2007 Sendmail, Inc. and its suppliers. +# Copyright (c) 1998-2009 Sendmail, Inc. and its suppliers. # All rights reserved. # Copyright (c) 1983, 1995 Eric P. Allman. All rights reserved. # Copyright (c) 1988, 1993 @@ -13,7 +13,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: proto.m4,v 8.734 2008/01/24 23:42:01 ca Exp $') +VERSIONID(`$Id: proto.m4,v 8.741 2009/12/11 00:04:53 ca Exp $') # level CF_LEVEL config file format V`'CF_LEVEL/ifdef(`VENDOR_NAME', `VENDOR_NAME', `Berkeley') @@ -580,6 +580,7 @@ _OPTION(MaxRecipientsPerMessage, `confMA # once the threshold number of recipients have been rejected _OPTION(BadRcptThrottle, `confBAD_RCPT_THROTTLE', `0') + # shall we get local names from our installed interfaces? _OPTION(DontProbeInterfaces, `confDONT_PROBE_INTERFACES', `False') @@ -640,6 +641,7 @@ _OPTION(AuthMaxBits, `confAUTH_MAX_BITS' # SMTP STARTTLS server options _OPTION(TLSSrvOptions, `confTLS_SRV_OPTIONS', `') + # Input mail filters _OPTION(InputMailFilters, `confINPUT_MAIL_FILTERS', `') @@ -1509,7 +1511,9 @@ ifdef(`_LDAP_ROUTE_DETAIL_', # try without +detail R<> <> <$+> <$+ + $* @ $+> <> $@ $>LDAPExpand <$1> <$2 @ $4> <+$3>')dnl -ifdef(`_LDAP_ROUTE_NODOMAIN_', `dnl', ` +ifdef(`_LDAP_ROUTE_NODOMAIN_', ` +# pretend we did the @domain lookup +R<> <> <$+> <$+ @ $+> <$*> $: <> <> <$1> <@ $3> <$4>', ` # if still no mailRoutingAddress and no mailHost, # try @domain ifelse(_LDAP_ROUTE_DETAIL_, `_PRESERVE_', `dnl @@ -2139,7 +2143,10 @@ R$+ < @ $=w > $@ RELAY ifdef(`_RELAY_HOSTS_ONLY_', `R$+ < @ $=R > $@ RELAY ifdef(`_ACCESS_TABLE_', `dnl -R$+ < @ $+ > $: <$(access To:$2 $: ? $)> <$1 < @ $2 >> +ifdef(`_RELAY_FULL_ADDR_', `dnl +R$+ < @ $+ > $: <$(access To:$1@$2 $: ? $)> <$1 < @ $2 >> +R <$+ < @ $+ >> $: <$(access To:$2 $: ? $)> <$1 < @ $2 >>',` +R$+ < @ $+ > $: <$(access To:$2 $: ? $)> <$1 < @ $2 >>') dnl workspace: > R <$+ < @ $+ >> $: <$(access $2 $: ? $)> <$1 < @ $2 >>',`dnl')', `R$+ < @ $* $=R > $@ RELAY @@ -2691,7 +2698,7 @@ R$* $#$* $#$2 R$* $* $: $1', `dnl') ifdef(`_ACCESS_TABLE_', `dnl dnl store name of other side -R$* $: $(macro {TLS_Name} $@ $&{server_name} $) $1 +R$* $: $(macro {TLS_Name} $@ $&{client_name} $) $1 dnl ignore second arg for now dnl maybe use it to distinguish permanent/temporary error? dnl if MAIL: permanent (STARTTLS has not been offered) Modified: stable/6/contrib/sendmail/cf/m4/version.m4 ============================================================================== --- stable/6/contrib/sendmail/cf/m4/version.m4 Sun Jan 31 19:29:51 2010 (r203308) +++ stable/6/contrib/sendmail/cf/m4/version.m4 Sun Jan 31 19:30:47 2010 (r203309) @@ -1,6 +1,6 @@ divert(-1) # -# Copyright (c) 1998-2008 Sendmail, Inc. and its suppliers. +# Copyright (c) 1998-2009 Sendmail, Inc. and its suppliers. # All rights reserved. # Copyright (c) 1983 Eric P. Allman. All rights reserved. # Copyright (c) 1988, 1993 @@ -11,8 +11,8 @@ divert(-1) # the sendmail distribution. # # -VERSIONID(`$Id: version.m4,v 8.195 2008/04/17 17:04:30 ca Exp $') +VERSIONID(`$Id: version.m4,v 8.205 2009/12/23 04:43:09 ca Exp $') # divert(0) # Configuration version number -DZ8.14.3`'ifdef(`confCF_VERSION', `/confCF_VERSION') +DZ8.14.4`'ifdef(`confCF_VERSION', `/confCF_VERSION') Modified: stable/6/contrib/sendmail/contrib/qtool.pl ============================================================================== --- stable/6/contrib/sendmail/contrib/qtool.pl Sun Jan 31 19:29:51 2010 (r203308) +++ stable/6/contrib/sendmail/contrib/qtool.pl Sun Jan 31 19:30:47 2010 (r203309) @@ -3,7 +3,7 @@ ## Copyright (c) 1998-2002 Sendmail, Inc. and its suppliers. ## All rights reserved. ## -## $Id: qtool.pl,v 8.29 2007/02/16 01:12:08 ca Exp $ +## $Id: qtool.pl,v 8.30 2009/03/04 16:57:30 ca Exp $ ## use strict; use File::Basename; @@ -450,7 +450,7 @@ sub unlock_file ## ## Parameters: ## src_name -- The name of the file to be move. -## dst_nome -- The name of the place to move it to. +## dst_name -- The name of the place to move it to. ## ## Returns: ## error_string -- If undef then no problem. Otherwise it is a @@ -1193,7 +1193,7 @@ sub bounce ## ## This Condition Class checks the modification time of the ## source file and returns true if the file's modification time is -## older than the number of seconds the class was initialzed with. +## older than the number of seconds the class was initialized with. ## package OlderThan; @@ -1286,7 +1286,7 @@ sub check_move ## Eval ## ## Takes a perl expression and evaluates it. The ControlFile object -## for the source QueuedMessage is avaliable through the name '$msg'. +## for the source QueuedMessage is available through the name '$msg'. ## package Eval; Modified: stable/6/contrib/sendmail/contrib/smcontrol.pl ============================================================================== --- stable/6/contrib/sendmail/contrib/smcontrol.pl Sun Jan 31 19:29:51 2010 (r203308) +++ stable/6/contrib/sendmail/contrib/smcontrol.pl Sun Jan 31 19:30:47 2010 (r203309) @@ -1,4 +1,6 @@ -#!/usr/local/bin/perl -w +#!/usr/bin/perl -w + +# $Id: smcontrol.pl,v 8.8 2008/07/21 21:31:43 ca Exp $ use strict; use Getopt::Std; Modified: stable/6/contrib/sendmail/doc/op/op.me ============================================================================== --- stable/6/contrib/sendmail/doc/op/op.me Sun Jan 31 19:29:51 2010 (r203308) +++ stable/6/contrib/sendmail/doc/op/op.me Sun Jan 31 19:30:47 2010 (r203309) @@ -9,7 +9,7 @@ .\" the sendmail distribution. .\" .\" -.\" $Id: op.me,v 8.741 2007/06/22 23:08:59 ca Exp $ +.\" $Id: op.me,v 8.745 2009/12/13 04:12:46 ca Exp $ .\" .\" eqn op.me | pic | troff -me .\" @@ -90,13 +90,14 @@ Sendmail, Inc. .de Ve Version \\$2 .. -.Ve $Revision: 8.741 $ +.Ve $Revision: 8.745 $ .rm Ve .sp For Sendmail Version 8.14 .)l .(f Sendmail is a trademark of Sendmail, Inc. +US Patent Numbers 6865671, 6986037. .)f .sp 2 .pp @@ -4952,9 +4953,21 @@ as "(may be forged)". .ip ${cn_issuer} The CN (common name) of the CA that signed the presented certificate (STARTTLS only). +Note: if the CN cannot be extracted properly it will be replaced by +one of these strings based on the encountered error: +.(b +.ta 25n +BadCertificateContainsNUL CN contains a NUL character +BadCertificateTooLong CN is too long +BadCertificateUnknown CN could not be extracted +.)b +In the last case, some other (unspecific) error occurred. .ip ${cn_subject} The CN (common name) of the presented certificate (STARTTLS only). +See +.b ${cn_issuer} +for possible replacements. .ip ${currHeader} Header value as quoted string (possibly truncated to @@ -5130,7 +5143,7 @@ The total number of incoming connections by ConnectionRateWindowSize. .ip ${verify} The result of the verification of the presented cert; -only defined after STARTTLS has been used. +only defined after STARTTLS has been used (or attempted). Possible values are: .(b .ta 13n @@ -6710,10 +6723,25 @@ CRL checking requires at least OpenSSL v Note: if a CRLFile is specified but the file is unusable, STARTTLS is disabled. .ip DHParameters -File with DH parameters for STARTTLS. +Possible values are: +.(b +.ta 1i +5 use 512 bit prime +1 use 1024 bit prime +none do not use Diffie-Hellman +NAME load prime from file +.)b This is only required if a ciphersuite containing DSA/DH is used. -This is only for people with a good knowledge of TLS, all others -can ignore this option. +If ``5'' is selected, then precomputed, fixed primes are used. +This is the default for the client side. +If ``1'' is selected, then prime values are computed during startup. +This is the default for the server side. +Note: this operation can take a significant amount of time on a +slow machine (several seconds), but it is only done once at startup. +If ``none'' is selected, then TLS ciphersuites containing DSA/DH +cannot be used. +If a file name is specified (which must be an absolute path), +then the primes are read from it. .ip DaemonPortOptions=\fIoptions\fP [O] Set server SMTP options. @@ -11435,7 +11463,7 @@ replace it with a blank sheet for double .\".sz 10 .\"Eric Allman .\".sp -.\"Version $Revision: 8.741 $ +.\"Version $Revision: 8.745 $ .\".ce 0 .bp 3 .ce Modified: stable/6/contrib/sendmail/include/libmilter/mfapi.h ============================================================================== --- stable/6/contrib/sendmail/include/libmilter/mfapi.h Sun Jan 31 19:29:51 2010 (r203308) +++ stable/6/contrib/sendmail/include/libmilter/mfapi.h Sun Jan 31 19:30:47 2010 (r203309) @@ -7,7 +7,7 @@ * the sendmail distribution. * * - * $Id: mfapi.h,v 8.78 2008/02/27 22:30:34 ca Exp $ + * $Id: mfapi.h,v 8.80 2009/11/06 00:57:08 ca Exp $ */ /* @@ -18,7 +18,14 @@ # define _LIBMILTER_MFAPI_H 1 #ifndef SMFI_VERSION -# define SMFI_VERSION 0x01000001 /* libmilter version number */ +# if _FFR_MDS_NEGOTIATE +# define SMFI_VERSION 0x01000002 /* libmilter version number */ + + /* first libmilter version that has MDS support */ +# define SMFI_VERSION_MDS 0x01000002 +# else /* _FFR_MDS_NEGOTIATE */ +# define SMFI_VERSION 0x01000001 /* libmilter version number */ +# endif /* _FFR_MDS_NEGOTIATE */ #endif /* ! SMFI_VERSION */ #define SM_LM_VRS_MAJOR(v) (((v) & 0x7f000000) >> 24) @@ -163,9 +170,7 @@ LIBMILTER_API int smfi_setdbg __P((int)) LIBMILTER_API int smfi_settimeout __P((int)); LIBMILTER_API int smfi_setconn __P((char *)); LIBMILTER_API int smfi_stop __P((void)); -#if _FFR_MAXDATASIZE LIBMILTER_API size_t smfi_setmaxdatasize __P((size_t)); -#endif /* _FFR_MAXDATASIZE */ LIBMILTER_API int smfi_version __P((unsigned int *, unsigned int *, unsigned int *)); /* Modified: stable/6/contrib/sendmail/include/libmilter/mfdef.h ============================================================================== --- stable/6/contrib/sendmail/include/libmilter/mfdef.h Sun Jan 31 19:29:51 2010 (r203308) +++ stable/6/contrib/sendmail/include/libmilter/mfdef.h Sun Jan 31 19:30:47 2010 (r203309) @@ -7,7 +7,7 @@ * the sendmail distribution. * * - * $Id: mfdef.h,v 8.38 2007/03/27 18:53:48 ca Exp $ + * $Id: mfdef.h,v 8.39 2009/11/06 00:57:08 ca Exp $ */ /* @@ -27,6 +27,12 @@ #define MILTER_CHUNK_SIZE 65535 /* body chunk size */ #define MILTER_MAX_DATA_SIZE 65535 /* default milter command data limit */ +#if _FFR_MDS_NEGOTIATE +# define MILTER_MDS_64K ((64 * 1024) - 1) +# define MILTER_MDS_256K ((256 * 1024) - 1) +# define MILTER_MDS_1M ((1024 * 1024) - 1) +#endif /* _FFR_MDS_NEGOTIATE */ + /* These apply to SMFIF_* flags */ #define SMFI_V1_ACTS 0x0000000FL /* The actions of V1 filter */ #define SMFI_V2_ACTS 0x0000003FL /* The actions of V2 filter */ @@ -100,6 +106,9 @@ #define SMFIP_NR_EOH 0x00040000L /* No reply for eoh */ #define SMFIP_NR_BODY 0x00080000L /* No reply for body chunk */ #define SMFIP_HDR_LEADSPC 0x00100000L /* header value leading space */ +#define SMFIP_MDS_256K 0x10000000L /* MILTER_MAX_DATA_SIZE=256K */ +#define SMFIP_MDS_1M 0x20000000L /* MILTER_MAX_DATA_SIZE=1M */ +/* #define SMFIP_ 0x40000000L reserved: see SMFI_INTERNAL*/ #define SMFI_V1_PROT 0x0000003FL /* The protocol of V1 filter */ #define SMFI_V2_PROT 0x0000007FL /* The protocol of V2 filter */ @@ -107,4 +116,11 @@ /* all defined protocol bits */ #define SMFI_CURR_PROT 0x001FFFFFL +/* internal flags: only used between MTA and libmilter */ +#define SMFI_INTERNAL 0x70000000L + +#if _FFR_MILTER_CHECK +# define SMFIP_TEST 0x80000000L +#endif /* _FFR_MILTER_CHECK */ + #endif /* !_LIBMILTER_MFDEF_H */ Modified: stable/6/contrib/sendmail/include/sm/conf.h ============================================================================== --- stable/6/contrib/sendmail/include/sm/conf.h Sun Jan 31 19:29:51 2010 (r203308) +++ stable/6/contrib/sendmail/include/sm/conf.h Sun Jan 31 19:30:47 2010 (r203309) @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998-2007 Sendmail, Inc. and its suppliers. + * Copyright (c) 1998-2009 Sendmail, Inc. and its suppliers. * All rights reserved. * Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved. * Copyright (c) 1988, 1993 @@ -10,7 +10,7 @@ * the sendmail distribution. * * - * $Id: conf.h,v 1.134 2007/09/24 23:05:37 ca Exp $ + * $Id: conf.h,v 1.139 2009/06/16 23:41:32 ca Exp $ */ /* @@ -460,6 +460,7 @@ typedef int pid_t; # endif /* SOLARIS >= 21000 || (SOLARIS < 10000 && SOLARIS >= 210) */ # if SOLARIS >= 21100 || (SOLARIS < 10000 && SOLARIS >= 211) # define GETLDAPALIASBYNAME_VERSION 2 /* changed in S11 */ +# define HAVE_NANOSLEEP 1 /* moved from librt to libc in S11 */ # endif /* SOLARIS >= 21100 || (SOLARIS < 10000 && SOLARIS >= 211) */ # ifndef HASGETUSERSHELL # define HASGETUSERSHELL 0 /* getusershell(3) causes core dumps pre-2.7 */ @@ -1021,6 +1022,10 @@ extern unsigned int sleepX __P((unsigned # define SMRSH_PATH "/bin:/usr/bin" # endif /* ! SMRSH_PATH */ # endif /* __FreeBSD_version >= 330000 */ +# if __FreeBSD_version >= 430000 /* 4.3.0-release and later */ +# define SOCKADDR_LEN_T socklen_t /* e.g., arg#3 to accept, getsockname */ +# define SOCKOPT_LEN_T socklen_t /* arg#5 to getsockopt */ +# endif /* __FreeBSD_version >= 430000 */ # define USESYSCTL 1 /* use sysctl(3) for getting ncpus */ # include *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Jan 31 19:33:26 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3A14F106566C; Sun, 31 Jan 2010 19:33:26 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 102138FC0A; Sun, 31 Jan 2010 19:33:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0VJXPuG018356; Sun, 31 Jan 2010 19:33:25 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0VJXPku018353; Sun, 31 Jan 2010 19:33:25 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201001311933.o0VJXPku018353@svn.freebsd.org> From: Gavin Atkinson Date: Sun, 31 Jan 2010 19:33:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203310 - head/sbin/sysctl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 19:33:26 -0000 Author: gavin Date: Sun Jan 31 19:33:25 2010 New Revision: 203310 URL: http://svn.freebsd.org/changeset/base/203310 Log: Implement the "-i" option to sysctl(8), to ignore failures while retrieving individual OIDs. This allows the same list of OIDs to be passed to sysctl(8) across different systems where particular OIDs may not exist, and still get as much information as possible from them. PR: bin/123644 Submitted by: dhw Approved by: ed (mentor) MFC after: 2 weeks Modified: head/sbin/sysctl/sysctl.8 head/sbin/sysctl/sysctl.c Modified: head/sbin/sysctl/sysctl.8 ============================================================================== --- head/sbin/sysctl/sysctl.8 Sun Jan 31 19:30:47 2010 (r203309) +++ head/sbin/sysctl/sysctl.8 Sun Jan 31 19:33:25 2010 (r203310) @@ -28,7 +28,7 @@ .\" From: @(#)sysctl.8 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd November 28, 2007 +.Dd January 31, 2010 .Dt SYSCTL 8 .Os .Sh NAME @@ -82,6 +82,12 @@ or is specified, or a variable is being set. .It Fl h Format output for human, rather than machine, readability. +.It Fl i +Ignore unknown OIDs. +The purpose is to make use of +.Nm +for collecting data from a variety of machines (not all of which +are necessarily running exactly the same software) easier. .It Fl N Show only variable names, not their values. This is particularly useful with shells that offer programmable Modified: head/sbin/sysctl/sysctl.c ============================================================================== --- head/sbin/sysctl/sysctl.c Sun Jan 31 19:30:47 2010 (r203309) +++ head/sbin/sysctl/sysctl.c Sun Jan 31 19:33:25 2010 (r203310) @@ -58,8 +58,8 @@ static const char rcsid[] = #include #include -static int aflag, bflag, dflag, eflag, hflag, Nflag, nflag, oflag; -static int qflag, xflag, warncount; +static int aflag, bflag, dflag, eflag, hflag, iflag; +static int Nflag, nflag, oflag, qflag, xflag, warncount; static int oidfmt(int *, int, char *, u_int *); static void parse(char *); @@ -89,7 +89,7 @@ main(int argc, char **argv) setbuf(stdout,0); setbuf(stderr,0); - while ((ch = getopt(argc, argv, "AabdehNnoqwxX")) != -1) { + while ((ch = getopt(argc, argv, "AabdehiNnoqwxX")) != -1) { switch (ch) { case 'A': /* compatibility */ @@ -110,6 +110,9 @@ main(int argc, char **argv) case 'h': hflag = 1; break; + case 'i': + iflag = 1; + break; case 'N': Nflag = 1; break; @@ -187,6 +190,8 @@ parse(char *string) len = name2oid(bufp, mib); if (len < 0) { + if (iflag) + return; if (qflag) exit(1); else From owner-svn-src-all@FreeBSD.ORG Sun Jan 31 19:36:59 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8EDE1106566C; Sun, 31 Jan 2010 19:36:59 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7D8F68FC0C; Sun, 31 Jan 2010 19:36:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0VJaxYg019253; Sun, 31 Jan 2010 19:36:59 GMT (envelope-from gshapiro@svn.freebsd.org) Received: (from gshapiro@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0VJaxua019251; Sun, 31 Jan 2010 19:36:59 GMT (envelope-from gshapiro@svn.freebsd.org) Message-Id: <201001311936.o0VJaxua019251@svn.freebsd.org> From: Gregory Neil Shapiro Date: Sun, 31 Jan 2010 19:36:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203311 - stable/6/contrib/sendmail X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 19:36:59 -0000 Author: gshapiro Date: Sun Jan 31 19:36:59 2010 New Revision: 203311 URL: http://svn.freebsd.org/changeset/base/203311 Log: MFC: Update FreeBSD information Modified: stable/6/contrib/sendmail/FREEBSD-upgrade Directory Properties: stable/6/contrib/sendmail/ (props changed) Modified: stable/6/contrib/sendmail/FREEBSD-upgrade ============================================================================== --- stable/6/contrib/sendmail/FREEBSD-upgrade Sun Jan 31 19:33:25 2010 (r203310) +++ stable/6/contrib/sendmail/FREEBSD-upgrade Sun Jan 31 19:36:59 2010 (r203311) @@ -1,6 +1,6 @@ $FreeBSD$ -sendmail 8.14.3 +sendmail 8.14.4 originals can be found at: ftp://ftp.sendmail.org/pub/sendmail/ For the import of sendmail, the following directories were renamed: @@ -110,4 +110,4 @@ infrastructure in FreeBSD: usr.sbin/mailwrapper/Makefile gshapiro@FreeBSD.org -27-August-2008 +25-January-2010 From owner-svn-src-all@FreeBSD.ORG Sun Jan 31 19:38:58 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AA64F106568D; Sun, 31 Jan 2010 19:38:58 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9910D8FC16; Sun, 31 Jan 2010 19:38:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0VJcwCe019748; Sun, 31 Jan 2010 19:38:58 GMT (envelope-from gshapiro@svn.freebsd.org) Received: (from gshapiro@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0VJcwvQ019745; Sun, 31 Jan 2010 19:38:58 GMT (envelope-from gshapiro@svn.freebsd.org) Message-Id: <201001311938.o0VJcwvQ019745@svn.freebsd.org> From: Gregory Neil Shapiro Date: Sun, 31 Jan 2010 19:38:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203312 - stable/6/etc/sendmail X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 19:38:58 -0000 Author: gshapiro Date: Sun Jan 31 19:38:58 2010 New Revision: 203312 URL: http://svn.freebsd.org/changeset/base/203312 Log: MFC: Minor changes to force commit these files so new freebsd*.cf files are built to use the new sendmail-8.14.4/cf tree. Modified: stable/6/etc/sendmail/freebsd.mc stable/6/etc/sendmail/freebsd.submit.mc Directory Properties: stable/6/etc/ (props changed) Modified: stable/6/etc/sendmail/freebsd.mc ============================================================================== --- stable/6/etc/sendmail/freebsd.mc Sun Jan 31 19:36:59 2010 (r203311) +++ stable/6/etc/sendmail/freebsd.mc Sun Jan 31 19:38:58 2010 (r203312) @@ -34,7 +34,7 @@ divert(-1) # # -# This is a generic configuration file for FreeBSD 5.X and later systems. +# This is a generic configuration file for FreeBSD 6.X and later systems. # If you want to customize it, copy it to a name appropriate for your # environment and do the modifications there. # Modified: stable/6/etc/sendmail/freebsd.submit.mc ============================================================================== --- stable/6/etc/sendmail/freebsd.submit.mc Sun Jan 31 19:36:59 2010 (r203311) +++ stable/6/etc/sendmail/freebsd.submit.mc Sun Jan 31 19:38:58 2010 (r203312) @@ -25,3 +25,4 @@ define(`confBIND_OPTS', `WorkAroundBroke dnl dnl If you use IPv6 only, change [127.0.0.1] to [IPv6:::1] FEATURE(`msp', `[127.0.0.1]')dnl + From owner-svn-src-all@FreeBSD.ORG Sun Jan 31 19:41:59 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0A5FB1065670; Sun, 31 Jan 2010 19:41:59 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D3E548FC12; Sun, 31 Jan 2010 19:41:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0VJfwAU020452; Sun, 31 Jan 2010 19:41:58 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0VJfwLB020450; Sun, 31 Jan 2010 19:41:58 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201001311941.o0VJfwLB020450@svn.freebsd.org> From: Gavin Atkinson Date: Sun, 31 Jan 2010 19:41: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: r203313 - stable/8/sys/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 19:41:59 -0000 Author: gavin Date: Sun Jan 31 19:41:58 2010 New Revision: 203313 URL: http://svn.freebsd.org/changeset/base/203313 Log: Merge r202931 from head: Add support for four more nfsmb controllers, shipping on at least the ASUS Atom ION boards. PR: kern/142571 Submitted by: oliver Approved by: ed (mentor, implicit) Modified: stable/8/sys/pci/nfsmb.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/pci/nfsmb.c ============================================================================== --- stable/8/sys/pci/nfsmb.c Sun Jan 31 19:38:58 2010 (r203312) +++ stable/8/sys/pci/nfsmb.c Sun Jan 31 19:41:58 2010 (r203313) @@ -65,6 +65,10 @@ static int nfsmb_debug = 0; #define NFSMB_DEVICEID_NF4_55_SMB 0x0368 #define NFSMB_DEVICEID_NF4_61_SMB 0x03eb #define NFSMB_DEVICEID_NF4_65_SMB 0x0446 +#define NFSMB_DEVICEID_NF4_67_SMB 0x0542 +#define NFSMB_DEVICEID_NF4_73_SMB 0x07d8 +#define NFSMB_DEVICEID_NF4_78S_SMB 0x0752 +#define NFSMB_DEVICEID_NF4_79_SMB 0x0aa2 /* PCI Configuration space registers */ #define NF2PCI_SMBASE_1 PCIR_BAR(4) @@ -158,6 +162,10 @@ nfsmb_probe(device_t dev) case NFSMB_DEVICEID_NF4_55_SMB: case NFSMB_DEVICEID_NF4_61_SMB: case NFSMB_DEVICEID_NF4_65_SMB: + case NFSMB_DEVICEID_NF4_67_SMB: + case NFSMB_DEVICEID_NF4_73_SMB: + case NFSMB_DEVICEID_NF4_78S_SMB: + case NFSMB_DEVICEID_NF4_79_SMB: device_set_desc(dev, "nForce2/3/4 MCP SMBus Controller"); return (BUS_PROBE_DEFAULT); } @@ -245,6 +253,10 @@ nfsmb_attach(device_t dev) case NFSMB_DEVICEID_NF4_55_SMB: case NFSMB_DEVICEID_NF4_61_SMB: case NFSMB_DEVICEID_NF4_65_SMB: + case NFSMB_DEVICEID_NF4_67_SMB: + case NFSMB_DEVICEID_NF4_73_SMB: + case NFSMB_DEVICEID_NF4_78S_SMB: + case NFSMB_DEVICEID_NF4_79_SMB: /* Trying to add secondary device as slave */ nfsmb_sc->subdev = device_add_child(dev, "nfsmb", -1); if (!nfsmb_sc->subdev) { From owner-svn-src-all@FreeBSD.ORG Sun Jan 31 19:47:38 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D4B7C106568B; Sun, 31 Jan 2010 19:47:38 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C44F98FC12; Sun, 31 Jan 2010 19:47:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0VJlcxi021750; Sun, 31 Jan 2010 19:47:38 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0VJlcjT021748; Sun, 31 Jan 2010 19:47:38 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201001311947.o0VJlcjT021748@svn.freebsd.org> From: Marcel Moolenaar Date: Sun, 31 Jan 2010 19:47:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203314 - head/lib/libefi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 19:47:38 -0000 Author: marcel Date: Sun Jan 31 19:47:38 2010 New Revision: 203314 URL: http://svn.freebsd.org/changeset/base/203314 Log: The EFI vendor UUID for FreeBSD variables is called EFI_FREEBSD_VARIABLE and not EFI_FREEBSD_VENDOR (cf. EFI_GLOBAL_VARIABLE). Modified: head/lib/libefi/libefi.3 Modified: head/lib/libefi/libefi.3 ============================================================================== --- head/lib/libefi/libefi.3 Sun Jan 31 19:41:58 2010 (r203313) +++ head/lib/libefi/libefi.3 Sun Jan 31 19:47:38 2010 (r203314) @@ -97,7 +97,7 @@ to 0. The vendor UUID is used to avoid collisions between variable names of different vendors. Variables created for use by FreeBSD should use the -.Nm EFI_FREEBSD_VENDOR +.Nm EFI_FREEBSD_VARIABLE UUID as defined in the .Nm libefi header file. From owner-svn-src-all@FreeBSD.ORG Sun Jan 31 19:56:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA83B1065670; Sun, 31 Jan 2010 19:56:37 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D9C5E8FC0C; Sun, 31 Jan 2010 19:56:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0VJubHt023742; Sun, 31 Jan 2010 19:56:37 GMT (envelope-from gshapiro@svn.freebsd.org) Received: (from gshapiro@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0VJubqo023740; Sun, 31 Jan 2010 19:56:37 GMT (envelope-from gshapiro@svn.freebsd.org) Message-Id: <201001311956.o0VJubqo023740@svn.freebsd.org> From: Gregory Neil Shapiro Date: Sun, 31 Jan 2010 19:56:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203315 - head/release/doc/en_US.ISO8859-1/relnotes X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 19:56:38 -0000 Author: gshapiro Date: Sun Jan 31 19:56:37 2010 New Revision: 203315 URL: http://svn.freebsd.org/changeset/base/203315 Log: Note sendmail 8.14.4 upgrade Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.sgml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.sgml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.sgml Sun Jan 31 19:47:38 2010 (r203314) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.sgml Sun Jan 31 19:56:37 2010 (r203315) @@ -468,7 +468,7 @@ Figwort release to the Hydrangea release. sendmail has been updated from - 8.14.1 to 8.14.3. + 8.14.1 to 8.14.4. The timezone database has been updated from the tzdata2008h release to From owner-svn-src-all@FreeBSD.ORG Sun Jan 31 19:57:28 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7AEDA106568B; Sun, 31 Jan 2010 19:57:28 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 694DE8FC14; Sun, 31 Jan 2010 19:57:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0VJvSx5023974; Sun, 31 Jan 2010 19:57:28 GMT (envelope-from gshapiro@svn.freebsd.org) Received: (from gshapiro@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0VJvSYH023972; Sun, 31 Jan 2010 19:57:28 GMT (envelope-from gshapiro@svn.freebsd.org) Message-Id: <201001311957.o0VJvSYH023972@svn.freebsd.org> From: Gregory Neil Shapiro Date: Sun, 31 Jan 2010 19:57: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: r203316 - stable/8/release/doc/en_US.ISO8859-1/relnotes X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 19:57:28 -0000 Author: gshapiro Date: Sun Jan 31 19:57:28 2010 New Revision: 203316 URL: http://svn.freebsd.org/changeset/base/203316 Log: Note sendmail 8.14.4 upgrade. Modified: stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Modified: stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml ============================================================================== --- stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Sun Jan 31 19:56:37 2010 (r203315) +++ stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Sun Jan 31 19:57:28 2010 (r203316) @@ -2401,7 +2401,7 @@ options NFSD # for NFS serverISC BIND 9.4.3. sendmail has been updated from - version 8.14.2 to version 8.14.3. + version 8.14.2 to version 8.14.4. From owner-svn-src-all@FreeBSD.ORG Sun Jan 31 20:01:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2A7C71065670; Sun, 31 Jan 2010 20:01:29 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 18CC18FC18; Sun, 31 Jan 2010 20:01:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0VK1S2G024922; Sun, 31 Jan 2010 20:01:28 GMT (envelope-from gshapiro@svn.freebsd.org) Received: (from gshapiro@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0VK1Sn9024920; Sun, 31 Jan 2010 20:01:28 GMT (envelope-from gshapiro@svn.freebsd.org) Message-Id: <201001312001.o0VK1Sn9024920@svn.freebsd.org> From: Gregory Neil Shapiro Date: Sun, 31 Jan 2010 20:01:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203317 - stable/7/release/doc/en_US.ISO8859-1/relnotes X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 20:01:29 -0000 Author: gshapiro Date: Sun Jan 31 20:01:28 2010 New Revision: 203317 URL: http://svn.freebsd.org/changeset/base/203317 Log: Note sendmail 8.14.4 upgrade Approved by: re (kensmith) Modified: stable/7/release/doc/en_US.ISO8859-1/relnotes/article.sgml Modified: stable/7/release/doc/en_US.ISO8859-1/relnotes/article.sgml ============================================================================== --- stable/7/release/doc/en_US.ISO8859-1/relnotes/article.sgml Sun Jan 31 19:57:28 2010 (r203316) +++ stable/7/release/doc/en_US.ISO8859-1/relnotes/article.sgml Sun Jan 31 20:01:28 2010 (r203317) @@ -199,7 +199,8 @@ Contributed Software - + sendmail has been updated from + version 8.14.3 to version 8.14.4. From owner-svn-src-all@FreeBSD.ORG Sun Jan 31 20:02:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 384681065670; Sun, 31 Jan 2010 20:02:43 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 268FA8FC0A; Sun, 31 Jan 2010 20:02:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0VK2h51025223; Sun, 31 Jan 2010 20:02:43 GMT (envelope-from gshapiro@svn.freebsd.org) Received: (from gshapiro@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0VK2hOq025221; Sun, 31 Jan 2010 20:02:43 GMT (envelope-from gshapiro@svn.freebsd.org) Message-Id: <201001312002.o0VK2hOq025221@svn.freebsd.org> From: Gregory Neil Shapiro Date: Sun, 31 Jan 2010 20:02:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203318 - stable/6/release/doc/en_US.ISO8859-1/relnotes/common X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 20:02:43 -0000 Author: gshapiro Date: Sun Jan 31 20:02:42 2010 New Revision: 203318 URL: http://svn.freebsd.org/changeset/base/203318 Log: Note sendmail 8.14.4 upgrade Modified: stable/6/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml Modified: stable/6/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml ============================================================================== --- stable/6/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml Sun Jan 31 20:01:28 2010 (r203317) +++ stable/6/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml Sun Jan 31 20:02:42 2010 (r203318) @@ -196,7 +196,8 @@ Contributed Software - + sendmail has been updated to + version 8.14.4. From owner-svn-src-all@FreeBSD.ORG Sun Jan 31 21:18:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 34F4C1065679; Sun, 31 Jan 2010 21:18:23 +0000 (UTC) (envelope-from weongyo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2263F8FC21; Sun, 31 Jan 2010 21:18:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0VLINeW041838; Sun, 31 Jan 2010 21:18:23 GMT (envelope-from weongyo@svn.freebsd.org) Received: (from weongyo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0VLINKJ041832; Sun, 31 Jan 2010 21:18:23 GMT (envelope-from weongyo@svn.freebsd.org) Message-Id: <201001312118.o0VLINKJ041832@svn.freebsd.org> From: Weongyo Jeong Date: Sun, 31 Jan 2010 21:18:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203319 - in head/sys: dev/siba modules/siba_bwn X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 21:18:23 -0000 Author: weongyo Date: Sun Jan 31 21:18:22 2010 New Revision: 203319 URL: http://svn.freebsd.org/changeset/base/203319 Log: Adds siba_bwn module which is used with bwn(4). Main purpose of this module is to distinguish parts of Silicon Backplane and of Broadcom Wireless. Added: head/sys/dev/siba/siba_bwn.c (contents, props changed) head/sys/dev/siba/siba_core.c (contents, props changed) head/sys/modules/siba_bwn/ head/sys/modules/siba_bwn/Makefile (contents, props changed) Modified: head/sys/dev/siba/siba.c head/sys/dev/siba/siba_cc.c head/sys/dev/siba/siba_ids.h head/sys/dev/siba/siba_pcib.c head/sys/dev/siba/sibareg.h head/sys/dev/siba/sibavar.h Modified: head/sys/dev/siba/siba.c ============================================================================== --- head/sys/dev/siba/siba.c Sun Jan 31 20:02:42 2010 (r203318) +++ head/sys/dev/siba/siba.c Sun Jan 31 21:18:22 2010 (r203319) @@ -37,9 +37,9 @@ __FBSDID("$FreeBSD$"); #include -#include -#include #include +#include +#include /* * TODO: De-mipsify this code. @@ -77,7 +77,7 @@ static struct siba_devid siba_devids[] = "MIPS core" }, { SIBA_VID_BROADCOM, SIBA_DEVID_ETHERNET, SIBA_REV_ANY, "Ethernet core" }, - { SIBA_VID_BROADCOM, SIBA_DEVID_USB, SIBA_REV_ANY, + { SIBA_VID_BROADCOM, SIBA_DEVID_USB11_HOSTDEV, SIBA_REV_ANY, "USB host controller" }, { SIBA_VID_BROADCOM, SIBA_DEVID_IPSEC, SIBA_REV_ANY, "IPSEC accelerator" }, @@ -103,7 +103,6 @@ static struct siba_devid * static struct resource_list * siba_get_reslist(device_t, device_t); static uint8_t siba_getirq(uint16_t); -static uint8_t siba_getncores(uint16_t); static int siba_print_all_resources(device_t dev); static int siba_print_child(device_t, device_t); static int siba_probe(device_t); @@ -112,30 +111,7 @@ int siba_read_ivar(device_t, device_t, static struct siba_devinfo * siba_setup_devinfo(device_t, uint8_t); int siba_write_ivar(device_t, device_t, int, uintptr_t); - -/* - * Earlier ChipCommon revisions have hardcoded number of cores - * present dependent on the ChipCommon ID. - */ -static uint8_t -siba_getncores(uint16_t ccid) -{ - uint8_t ncores; - - switch (ccid) { - case SIBA_CCID_SENTRY5: - ncores = 7; - break; - case SIBA_CCID_BCM4710: - case SIBA_CCID_BCM4704: - ncores = 9; - break; - default: - ncores = 0; - } - - return (ncores); -} +uint8_t siba_getncores(device_t, uint16_t); /* * On the Sentry5, the system bus IRQs are the same as the @@ -156,7 +132,7 @@ siba_getirq(uint16_t devid) case SIBA_DEVID_IPSEC: irq = 2; break; - case SIBA_DEVID_USB: + case SIBA_DEVID_USB11_HOSTDEV: irq = 3; break; case SIBA_DEVID_PCI: @@ -188,7 +164,7 @@ siba_probe(device_t dev) uint16_t ccid; int rid; - sc->sc_dev = dev; + sc->siba_dev = dev; //rman_debug = 1; /* XXX */ @@ -197,24 +173,24 @@ siba_probe(device_t dev) * was compiled with. */ rid = MIPS_MEM_RID; - sc->sc_mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, + sc->siba_mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); - if (sc->sc_mem == NULL) { + if (sc->siba_mem_res == NULL) { device_printf(dev, "unable to allocate probe aperture\n"); return (ENXIO); } - sc->sc_bt = rman_get_bustag(sc->sc_mem); - sc->sc_bh = rman_get_bushandle(sc->sc_mem); - sc->sc_maddr = rman_get_start(sc->sc_mem); - sc->sc_msize = rman_get_size(sc->sc_mem); + sc->siba_mem_bt = rman_get_bustag(sc->siba_mem_res); + sc->siba_mem_bh = rman_get_bushandle(sc->siba_mem_res); + sc->siba_maddr = rman_get_start(sc->siba_mem_res); + sc->siba_msize = rman_get_size(sc->siba_mem_res); if (siba_debug) { device_printf(dev, "start %08x len %08x\n", - sc->sc_maddr, sc->sc_msize); + sc->siba_maddr, sc->siba_msize); } - idlo = siba_read_4(sc, 0, SIBA_CORE_IDLO); - idhi = siba_read_4(sc, 0, SIBA_CORE_IDHI); + idlo = siba_mips_read_4(sc, 0, SIBA_IDLOW); + idhi = siba_mips_read_4(sc, 0, SIBA_IDHIGH); ccid = ((idhi & 0x8ff0) >> 4); if (siba_debug) { device_printf(dev, "idlo = %08x\n", idlo); @@ -256,7 +232,7 @@ siba_probe(device_t dev) uint16_t cc_id; uint16_t cc_rev; - ccidreg = siba_read_4(sc, 0, SIBA_CC_CCID); + ccidreg = siba_mips_read_4(sc, 0, SIBA_CC_CHIPID); cc_id = (ccidreg & SIBA_CC_IDMASK); cc_rev = (ccidreg & SIBA_CC_REVMASK) >> SIBA_CC_REVSHIFT; if (siba_debug) { @@ -264,9 +240,9 @@ siba_probe(device_t dev) ccidreg, cc_id, cc_rev); } - sc->sc_ncores = siba_getncores(cc_id); + sc->siba_ncores = siba_getncores(dev, cc_id); if (siba_debug) { - device_printf(dev, "%d cores detected.\n", sc->sc_ncores); + device_printf(dev, "%d cores detected.\n", sc->siba_ncores); } /* @@ -275,36 +251,38 @@ siba_probe(device_t dev) */ rid = MIPS_MEM_RID; int result; - result = bus_release_resource(dev, SYS_RES_MEMORY, rid, sc->sc_mem); + result = bus_release_resource(dev, SYS_RES_MEMORY, rid, + sc->siba_mem_res); if (result != 0) { device_printf(dev, "error %d releasing resource\n", result); return (ENXIO); } uint32_t total; - total = sc->sc_ncores * SIBA_CORE_LEN; + total = sc->siba_ncores * SIBA_CORE_LEN; /* XXX Don't allocate the entire window until we * enumerate the bus. Once the bus has been enumerated, * and instance variables/children instantiated + populated, * release the resource so children may attach. */ - sc->sc_mem = bus_alloc_resource(dev, SYS_RES_MEMORY, &rid, - sc->sc_maddr, sc->sc_maddr + total - 1, total, RF_ACTIVE); - if (sc->sc_mem == NULL) { + sc->siba_mem_res = bus_alloc_resource(dev, SYS_RES_MEMORY, &rid, + sc->siba_maddr, sc->siba_maddr + total - 1, total, RF_ACTIVE); + if (sc->siba_mem_res == NULL) { device_printf(dev, "unable to allocate entire aperture\n"); return (ENXIO); } - sc->sc_bt = rman_get_bustag(sc->sc_mem); - sc->sc_bh = rman_get_bushandle(sc->sc_mem); - sc->sc_maddr = rman_get_start(sc->sc_mem); - sc->sc_msize = rman_get_size(sc->sc_mem); + sc->siba_mem_bt = rman_get_bustag(sc->siba_mem_res); + sc->siba_mem_bh = rman_get_bushandle(sc->siba_mem_res); + sc->siba_maddr = rman_get_start(sc->siba_mem_res); + sc->siba_msize = rman_get_size(sc->siba_mem_res); if (siba_debug) { device_printf(dev, "after remapping: start %08x len %08x\n", - sc->sc_maddr, sc->sc_msize); + sc->siba_maddr, sc->siba_msize); } - bus_set_resource(dev, SYS_RES_MEMORY, rid, sc->sc_maddr, sc->sc_msize); + bus_set_resource(dev, SYS_RES_MEMORY, rid, sc->siba_maddr, + sc->siba_msize); /* * We need a manager for the space we claim on nexus to @@ -313,12 +291,13 @@ siba_probe(device_t dev) * otherwise it may be claimed elsewhere. * XXX move to softc */ - mem_rman.rm_start = sc->sc_maddr; - mem_rman.rm_end = sc->sc_maddr + sc->sc_msize - 1; + mem_rman.rm_start = sc->siba_maddr; + mem_rman.rm_end = sc->siba_maddr + sc->siba_msize - 1; mem_rman.rm_type = RMAN_ARRAY; mem_rman.rm_descr = "SiBa I/O memory addresses"; if (rman_init(&mem_rman) != 0 || - rman_manage_region(&mem_rman, mem_rman.rm_start, mem_rman.rm_end) != 0) { + rman_manage_region(&mem_rman, mem_rman.rm_start, + mem_rman.rm_end) != 0) { panic("%s: mem_rman", __func__); } @@ -344,7 +323,7 @@ siba_attach(device_t dev) * NB: only one core may be mapped at any time if the siba bus * is the child of a PCI or PCMCIA bus. */ - for (idx = 0; idx < sc->sc_ncores; idx++) { + for (idx = 0; idx < sc->siba_ncores; idx++) { sdi = siba_setup_devinfo(dev, idx); child = device_add_child(dev, NULL, -1); if (child == NULL) @@ -483,13 +462,14 @@ siba_setup_devinfo(device_t dev, uint8_t sdi = malloc(sizeof(*sdi), M_DEVBUF, M_WAITOK | M_ZERO); resource_list_init(&sdi->sdi_rl); - idlo = siba_read_4(sc, idx, SIBA_CORE_IDLO); - idhi = siba_read_4(sc, idx, SIBA_CORE_IDHI); + idlo = siba_mips_read_4(sc, idx, SIBA_IDLOW); + idhi = siba_mips_read_4(sc, idx, SIBA_IDHIGH); - vendorid = (idhi & SIBA_IDHIGH_VC) >> SIBA_IDHIGH_VC_SHIFT; + vendorid = (idhi & SIBA_IDHIGH_VENDORMASK) >> + SIBA_IDHIGH_VENDOR_SHIFT; devid = ((idhi & 0x8ff0) >> 4); - rev = (idhi & SIBA_IDHIGH_RCLO); - rev |= (idhi & SIBA_IDHIGH_RCHI) >> SIBA_IDHIGH_RCHI_SHIFT; + rev = (idhi & SIBA_IDHIGH_REVLO); + rev |= (idhi & SIBA_IDHIGH_REVHI) >> SIBA_IDHIGH_REVHI_SHIFT; sdi->sdi_vid = vendorid; sdi->sdi_devid = devid; @@ -500,7 +480,7 @@ siba_setup_devinfo(device_t dev, uint8_t /* * Determine memory window on bus and irq if one is needed. */ - baseaddr = sc->sc_maddr + (idx * SIBA_CORE_LEN); + baseaddr = sc->siba_maddr + (idx * SIBA_CORE_LEN); resource_list_add(&sdi->sdi_rl, SYS_RES_MEMORY, MIPS_MEM_RID, /* XXX */ baseaddr, baseaddr + SIBA_CORE_LEN - 1, SIBA_CORE_LEN); Added: head/sys/dev/siba/siba_bwn.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/siba/siba_bwn.c Sun Jan 31 21:18:22 2010 (r203319) @@ -0,0 +1,366 @@ +/*- + * Copyright (c) 2009-2010 Weongyo Jeong + * 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, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any + * redistribution must be conditioned upon including a substantially + * similar Disclaimer requirement for further binary redistribution. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY + * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES. + */ + +#include +__FBSDID("$FreeBSD$"); + +/* + * Sonics Silicon Backplane front-end for bwn(4). + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include + +#include +#include +#include + +/* + * PCI glue. + */ + +struct siba_bwn_softc { + /* Child driver using MSI. */ + device_t ssc_msi_child; + struct siba_softc ssc_siba; +}; + +#define BS_BAR 0x10 +#define PCI_VENDOR_BROADCOM 0x14e4 +#define N(a) (sizeof(a) / sizeof(a[0])) + +static const struct siba_dev { + uint16_t vid; + uint16_t did; + const char *desc; +} siba_devices[] = { + { PCI_VENDOR_BROADCOM, 0x4301, "Broadcom BCM4301 802.11b Wireless" }, + { PCI_VENDOR_BROADCOM, 0x4306, "Unknown" }, + { PCI_VENDOR_BROADCOM, 0x4307, "Broadcom BCM4307 802.11b Wireless" }, + { PCI_VENDOR_BROADCOM, 0x4311, "Broadcom BCM4311 802.11b/g Wireless" }, + { PCI_VENDOR_BROADCOM, 0x4312, + "Broadcom BCM4312 802.11a/b/g Wireless" }, + { PCI_VENDOR_BROADCOM, 0x4315, "Broadcom BCM4312 802.11b/g Wireless" }, + { PCI_VENDOR_BROADCOM, 0x4318, "Broadcom BCM4318 802.11b/g Wireless" }, + { PCI_VENDOR_BROADCOM, 0x4319, + "Broadcom BCM4318 802.11a/b/g Wireless" }, + { PCI_VENDOR_BROADCOM, 0x4320, "Broadcom BCM4306 802.11b/g Wireless" }, + { PCI_VENDOR_BROADCOM, 0x4321, "Broadcom BCM4306 802.11a Wireless" }, + { PCI_VENDOR_BROADCOM, 0x4324, + "Broadcom BCM4309 802.11a/b/g Wireless" }, + { PCI_VENDOR_BROADCOM, 0x4325, "Broadcom BCM4306 802.11b/g Wireless" }, + { PCI_VENDOR_BROADCOM, 0x4328, "Unknown" }, + { PCI_VENDOR_BROADCOM, 0x4329, "Unknown" }, + { PCI_VENDOR_BROADCOM, 0x432b, "Unknown" } +}; + +device_t siba_add_child(device_t, struct siba_softc *, int, const char *, + int); +int siba_core_attach(struct siba_softc *); +int siba_core_detach(struct siba_softc *); +int siba_core_suspend(struct siba_softc *); +int siba_core_resume(struct siba_softc *); + +static int +siba_bwn_probe(device_t dev) +{ + int i; + uint16_t did, vid; + + did = pci_get_device(dev); + vid = pci_get_vendor(dev); + + for (i = 0; i < N(siba_devices); i++) { + if (siba_devices[i].did == did && siba_devices[i].vid == vid) { + device_set_desc(dev, siba_devices[i].desc); + return (BUS_PROBE_DEFAULT); + } + } + return (ENXIO); +} + +static int +siba_bwn_attach(device_t dev) +{ + struct siba_bwn_softc *ssc = device_get_softc(dev); + struct siba_softc *siba = &ssc->ssc_siba; + + siba->siba_dev = dev; + siba->siba_type = SIBA_TYPE_PCI; + + /* + * Enable bus mastering. + */ + pci_enable_busmaster(dev); + + /* + * Setup memory-mapping of PCI registers. + */ + siba->siba_mem_rid = SIBA_PCIR_BAR; + siba->siba_mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, + &siba->siba_mem_rid, RF_ACTIVE); + if (siba->siba_mem_res == NULL) { + device_printf(dev, "cannot map register space\n"); + return (ENXIO); + } + siba->siba_mem_bt = rman_get_bustag(siba->siba_mem_res); + siba->siba_mem_bh = rman_get_bushandle(siba->siba_mem_res); + + /* Get more PCI information */ + siba->siba_pci_did = pci_get_device(dev); + siba->siba_pci_vid = pci_get_vendor(dev); + siba->siba_pci_subvid = pci_get_subvendor(dev); + siba->siba_pci_subdid = pci_get_subdevice(dev); + + return (siba_core_attach(siba)); +} + +static int +siba_bwn_detach(device_t dev) +{ + struct siba_bwn_softc *ssc = device_get_softc(dev); + struct siba_softc *siba = &ssc->ssc_siba; + + /* check if device was removed */ + siba->siba_invalid = !bus_child_present(dev); + + pci_disable_busmaster(dev); + bus_generic_detach(dev); + siba_core_detach(siba); + + bus_release_resource(dev, SYS_RES_MEMORY, BS_BAR, siba->siba_mem_res); + + return (0); +} + +static int +siba_bwn_shutdown(device_t dev) +{ + device_t *devlistp; + int devcnt, error = 0, i; + + error = device_get_children(dev, &devlistp, &devcnt); + if (error != 0) + return (error); + + for (i = 0 ; i < devcnt ; i++) + device_shutdown(devlistp[i]); + free(devlistp, M_TEMP); + return (0); +} + +static int +siba_bwn_suspend(device_t dev) +{ + struct siba_bwn_softc *ssc = device_get_softc(dev); + struct siba_softc *siba = &ssc->ssc_siba; + device_t *devlistp; + int devcnt, error = 0, i, j; + + error = device_get_children(dev, &devlistp, &devcnt); + if (error != 0) + return (error); + + for (i = 0 ; i < devcnt ; i++) { + error = DEVICE_SUSPEND(devlistp[i]); + if (error) { + for (j = 0; j < i; i++) + DEVICE_RESUME(devlistp[j]); + return (error); + } + } + free(devlistp, M_TEMP); + return (siba_core_suspend(siba)); +} + +static int +siba_bwn_resume(device_t dev) +{ + struct siba_bwn_softc *ssc = device_get_softc(dev); + struct siba_softc *siba = &ssc->ssc_siba; + device_t *devlistp; + int devcnt, error = 0, i; + + error = siba_core_resume(siba); + if (error != 0) + return (error); + + error = device_get_children(dev, &devlistp, &devcnt); + if (error != 0) + return (error); + + for (i = 0 ; i < devcnt ; i++) + DEVICE_RESUME(devlistp[i]); + free(devlistp, M_TEMP); + return (0); +} + +static device_t +siba_bwn_add_child(device_t dev, int order, const char *name, int unit) +{ + struct siba_bwn_softc *ssc = device_get_softc(dev); + struct siba_softc *siba = &ssc->ssc_siba; + + return (siba_add_child(dev, siba, order, name, unit)); +} + +/* proxying to the parent */ +static struct resource * +siba_bwn_alloc_resource(device_t dev, device_t child, int type, int *rid, + u_long start, u_long end, u_long count, u_int flags) +{ + + return (BUS_ALLOC_RESOURCE(device_get_parent(dev), dev, + type, rid, start, end, count, flags)); +} + +/* proxying to the parent */ +static int +siba_bwn_release_resource(device_t dev, device_t child, int type, + int rid, struct resource *r) +{ + + return (BUS_RELEASE_RESOURCE(device_get_parent(dev), dev, type, + rid, r)); +} + +/* proxying to the parent */ +static int +siba_bwn_setup_intr(device_t dev, device_t child, struct resource *irq, + int flags, driver_filter_t *filter, driver_intr_t *intr, void *arg, + void **cookiep) +{ + + return (BUS_SETUP_INTR(device_get_parent(dev), dev, irq, flags, + filter, intr, arg, cookiep)); +} + +/* proxying to the parent */ +static int +siba_bwn_teardown_intr(device_t dev, device_t child, struct resource *irq, + void *cookie) +{ + + return (BUS_TEARDOWN_INTR(device_get_parent(dev), dev, irq, cookie)); +} + +static int +siba_bwn_find_extcap(device_t dev, device_t child, int capability, + int *capreg) +{ + + return (pci_find_extcap(dev, capability, capreg)); +} + +static int +siba_bwn_alloc_msi(device_t dev, device_t child, int *count) +{ + struct siba_bwn_softc *ssc; + int error; + + ssc = device_get_softc(dev); + if (ssc->ssc_msi_child != NULL) + return (EBUSY); + error = pci_alloc_msi(dev, count); + if (error == 0) + ssc->ssc_msi_child = child; + return (error); +} + +static int +siba_bwn_release_msi(device_t dev, device_t child) +{ + struct siba_bwn_softc *ssc; + int error; + + ssc = device_get_softc(dev); + if (ssc->ssc_msi_child != child) + return (ENXIO); + error = pci_release_msi(dev); + if (error == 0) + ssc->ssc_msi_child = NULL; + return (error); +} + +static int +siba_bwn_msi_count(device_t dev, device_t child) +{ + + return (pci_msi_count(dev)); +} + +static device_method_t siba_bwn_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, siba_bwn_probe), + DEVMETHOD(device_attach, siba_bwn_attach), + DEVMETHOD(device_detach, siba_bwn_detach), + DEVMETHOD(device_shutdown, siba_bwn_shutdown), + DEVMETHOD(device_suspend, siba_bwn_suspend), + DEVMETHOD(device_resume, siba_bwn_resume), + + /* Bus interface */ + DEVMETHOD(bus_add_child, siba_bwn_add_child), + DEVMETHOD(bus_alloc_resource, siba_bwn_alloc_resource), + DEVMETHOD(bus_release_resource, siba_bwn_release_resource), + DEVMETHOD(bus_setup_intr, siba_bwn_setup_intr), + DEVMETHOD(bus_teardown_intr, siba_bwn_teardown_intr), + + /* PCI interface */ + DEVMETHOD(pci_find_extcap, siba_bwn_find_extcap), + DEVMETHOD(pci_alloc_msi, siba_bwn_alloc_msi), + DEVMETHOD(pci_release_msi, siba_bwn_release_msi), + DEVMETHOD(pci_msi_count, siba_bwn_msi_count), + + { 0,0 } +}; +static driver_t siba_bwn_driver = { + "siba_bwn", + siba_bwn_methods, + sizeof(struct siba_bwn_softc) +}; +static devclass_t siba_bwn_devclass; +DRIVER_MODULE(siba_bwn, pci, siba_bwn_driver, siba_bwn_devclass, 0, 0); +MODULE_VERSION(siba_bwn, 1); Modified: head/sys/dev/siba/siba_cc.c ============================================================================== --- head/sys/dev/siba/siba_cc.c Sun Jan 31 20:02:42 2010 (r203318) +++ head/sys/dev/siba/siba_cc.c Sun Jan 31 21:18:22 2010 (r203319) @@ -55,9 +55,9 @@ __FBSDID("$FreeBSD$"); #include -#include -#include #include +#include +#include static int siba_cc_attach(device_t); static int siba_cc_probe(device_t); Added: head/sys/dev/siba/siba_core.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/siba/siba_core.c Sun Jan 31 21:18:22 2010 (r203319) @@ -0,0 +1,2007 @@ +/*- + * Copyright (c) 2009-2010 Weongyo Jeong + * 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, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any + * redistribution must be conditioned upon including a substantially + * similar Disclaimer requirement for further binary redistribution. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY + * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES. + */ + +#include +__FBSDID("$FreeBSD$"); + +/* + * the Sonics Silicon Backplane driver. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include + +#include +#include +#include + +#ifdef SIBA_DEBUG +enum { + SIBA_DEBUG_SCAN = 0x00000001, /* scan */ + SIBA_DEBUG_PMU = 0x00000002, /* PMU */ + SIBA_DEBUG_PLL = 0x00000004, /* PLL */ + SIBA_DEBUG_SWITCHCORE = 0x00000008, /* switching core */ + SIBA_DEBUG_SPROM = 0x00000010, /* SPROM */ + SIBA_DEBUG_CORE = 0x00000020, /* handling cores */ + SIBA_DEBUG_ANY = 0xffffffff +}; +#define DPRINTF(siba, m, fmt, ...) do { \ + if (siba->siba_debug & (m)) \ + printf(fmt, __VA_ARGS__); \ +} while (0) +#else +#define DPRINTF(siba, m, fmt, ...) do { (void) siba; } while (0) +#endif +#define N(a) (sizeof(a) / sizeof(a[0])) + +static void siba_pci_gpio(struct siba_softc *, uint32_t, int); +static void siba_scan(struct siba_softc *); +static int siba_switchcore(struct siba_softc *, uint8_t); +static int siba_pci_switchcore_sub(struct siba_softc *, uint8_t); +static uint32_t siba_scan_read_4(struct siba_softc *, uint8_t, uint16_t); +static uint16_t siba_dev2chipid(struct siba_softc *); +static uint16_t siba_pci_read_2(struct siba_dev_softc *, uint16_t); +static uint32_t siba_pci_read_4(struct siba_dev_softc *, uint16_t); +static void siba_pci_write_2(struct siba_dev_softc *, uint16_t, uint16_t); +static void siba_pci_write_4(struct siba_dev_softc *, uint16_t, uint32_t); +static void siba_cc_clock(struct siba_cc *, + enum siba_clock); +static void siba_cc_pmu_init(struct siba_cc *); +static void siba_cc_power_init(struct siba_cc *); +static void siba_cc_powerup_delay(struct siba_cc *); +static int siba_cc_clockfreq(struct siba_cc *, int); +static void siba_cc_pmu1_pll0_init(struct siba_cc *, uint32_t); +static void siba_cc_pmu0_pll0_init(struct siba_cc *, uint32_t); +static enum siba_clksrc siba_cc_clksrc(struct siba_cc *); +static const struct siba_cc_pmu1_plltab *siba_cc_pmu1_plltab_find(uint32_t); +static uint32_t siba_cc_pll_read(struct siba_cc *, uint32_t); +static void siba_cc_pll_write(struct siba_cc *, uint32_t, + uint32_t); +static const struct siba_cc_pmu0_plltab * + siba_cc_pmu0_plltab_findentry(uint32_t); +static int siba_pci_sprom(struct siba_softc *, struct siba_sprom *); +static int siba_sprom_read(struct siba_softc *, uint16_t *, uint16_t); +static int sprom_check_crc(const uint16_t *, size_t); +static uint8_t siba_crc8(uint8_t, uint8_t); +static void siba_sprom_r123(struct siba_sprom *, const uint16_t *); +static void siba_sprom_r45(struct siba_sprom *, const uint16_t *); +static void siba_sprom_r8(struct siba_sprom *, const uint16_t *); +static int8_t siba_sprom_r123_antgain(uint8_t, const uint16_t *, uint16_t, + uint16_t); +static uint32_t siba_tmslow_reject_bitmask(struct siba_dev_softc *); +static uint32_t siba_pcicore_read_4(struct siba_pci *, uint16_t); +static void siba_pcicore_write_4(struct siba_pci *, uint16_t, uint32_t); +static uint32_t siba_pcie_read(struct siba_pci *, uint32_t); +static void siba_pcie_write(struct siba_pci *, uint32_t, uint32_t); +static void siba_pcie_mdio_write(struct siba_pci *, uint8_t, uint8_t, + uint16_t); +static void siba_pci_read_multi_1(struct siba_dev_softc *, void *, size_t, + uint16_t); +static void siba_pci_read_multi_2(struct siba_dev_softc *, void *, size_t, + uint16_t); +static void siba_pci_read_multi_4(struct siba_dev_softc *, void *, size_t, + uint16_t); +static void siba_pci_write_multi_1(struct siba_dev_softc *, const void *, + size_t, uint16_t); +static void siba_pci_write_multi_2(struct siba_dev_softc *, const void *, + size_t, uint16_t); +static void siba_pci_write_multi_4(struct siba_dev_softc *, const void *, + size_t, uint16_t); +static const char *siba_core_name(uint16_t); +static void siba_pcicore_init(struct siba_pci *); +device_t siba_add_child(device_t, struct siba_softc *, int, const char *, + int); +int siba_core_attach(struct siba_softc *); +int siba_core_detach(struct siba_softc *); +int siba_core_suspend(struct siba_softc *); +int siba_core_resume(struct siba_softc *); +uint8_t siba_getncores(device_t, uint16_t); + +static const struct siba_bus_ops siba_pci_ops = { + .read_2 = siba_pci_read_2, + .read_4 = siba_pci_read_4, + .write_2 = siba_pci_write_2, + .write_4 = siba_pci_write_4, + .read_multi_1 = siba_pci_read_multi_1, + .read_multi_2 = siba_pci_read_multi_2, + .read_multi_4 = siba_pci_read_multi_4, + .write_multi_1 = siba_pci_write_multi_1, + .write_multi_2 = siba_pci_write_multi_2, + .write_multi_4 = siba_pci_write_multi_4, +}; + +static const struct siba_cc_pmu_res_updown siba_cc_pmu_4325_updown[] = + SIBA_CC_PMU_4325_RES_UPDOWN; +static const struct siba_cc_pmu_res_depend siba_cc_pmu_4325_depend[] = + SIBA_CC_PMU_4325_RES_DEPEND; +static const struct siba_cc_pmu_res_updown siba_cc_pmu_4328_updown[] = + SIBA_CC_PMU_4328_RES_UPDOWN; +static const struct siba_cc_pmu_res_depend siba_cc_pmu_4328_depend[] = + SIBA_CC_PMU_4328_RES_DEPEND; +static const struct siba_cc_pmu0_plltab siba_cc_pmu0_plltab[] = + SIBA_CC_PMU0_PLLTAB_ENTRY; +static const struct siba_cc_pmu1_plltab siba_cc_pmu1_plltab[] = + SIBA_CC_PMU1_PLLTAB_ENTRY; + +int +siba_core_attach(struct siba_softc *siba) +{ + struct siba_cc *scc; + int error; + + KASSERT(siba->siba_type == SIBA_TYPE_PCI, + ("unsupported BUS type (%#x)", siba->siba_type)); + + siba->siba_ops = &siba_pci_ops; + + siba_pci_gpio(siba, SIBA_GPIO_CRYSTAL | SIBA_GPIO_PLL, 1); + siba_scan(siba); + + /* XXX init PCI or PCMCIA host devices */ + + siba_powerup(siba, 0); + + /* init ChipCommon */ + scc = &siba->siba_cc; + if (scc->scc_dev != NULL) { + siba_cc_pmu_init(scc); + siba_cc_power_init(scc); + siba_cc_clock(scc, SIBA_CLOCK_FAST); + siba_cc_powerup_delay(scc); + } + + /* fetch various internal informations for PCI */ + siba->siba_board_vendor = pci_read_config(siba->siba_dev, + PCIR_SUBVEND_0, 2); + siba->siba_board_type = pci_read_config(siba->siba_dev, PCIR_SUBDEV_0, + 2); + siba->siba_board_rev = pci_read_config(siba->siba_dev, PCIR_REVID, 2); + error = siba_pci_sprom(siba, &siba->siba_sprom); + if (error) { + siba_powerdown(siba); + return (error); + } + + siba_powerdown(siba); + return (0); +} + +int +siba_core_detach(struct siba_softc *siba) +{ + device_t *devlistp; + int devcnt, error = 0, i; + + error = device_get_children(siba->siba_dev, &devlistp, &devcnt); + if (error != 0) + return (0); + + for ( i = 0 ; i < devcnt ; i++) + device_delete_child(siba->siba_dev, devlistp[i]); + free(devlistp, M_TEMP); + return (0); +} + +static void +siba_pci_gpio(struct siba_softc *siba, uint32_t what, int on) +{ + uint32_t in, out; + uint16_t status; + + if (siba->siba_type != SIBA_TYPE_PCI) + return; + + out = pci_read_config(siba->siba_dev, SIBA_GPIO_OUT, 4); + if (on == 0) { + if (what & SIBA_GPIO_PLL) + out |= SIBA_GPIO_PLL; + if (what & SIBA_GPIO_CRYSTAL) + out &= ~SIBA_GPIO_CRYSTAL; + pci_write_config(siba->siba_dev, SIBA_GPIO_OUT, out, 4); + pci_write_config(siba->siba_dev, SIBA_GPIO_OUT_EN, + pci_read_config(siba->siba_dev, + SIBA_GPIO_OUT_EN, 4) | what, 4); + return; + } + + in = pci_read_config(siba->siba_dev, SIBA_GPIO_IN, 4); + if ((in & SIBA_GPIO_CRYSTAL) != SIBA_GPIO_CRYSTAL) { + if (what & SIBA_GPIO_CRYSTAL) { + out |= SIBA_GPIO_CRYSTAL; + if (what & SIBA_GPIO_PLL) + out |= SIBA_GPIO_PLL; + pci_write_config(siba->siba_dev, SIBA_GPIO_OUT, out, 4); + pci_write_config(siba->siba_dev, + SIBA_GPIO_OUT_EN, pci_read_config(siba->siba_dev, + SIBA_GPIO_OUT_EN, 4) | what, 4); + DELAY(1000); + } + if (what & SIBA_GPIO_PLL) { + out &= ~SIBA_GPIO_PLL; + pci_write_config(siba->siba_dev, SIBA_GPIO_OUT, out, 4); + DELAY(5000); + } + } + + status = pci_read_config(siba->siba_dev, PCIR_STATUS, 2); + status &= ~PCIM_STATUS_STABORT; + pci_write_config(siba->siba_dev, PCIR_STATUS, status, 2); +} + +static void +siba_scan(struct siba_softc *siba) +{ + struct siba_dev_softc *sd; + uint32_t idhi, tmp; + int base, dev_i = 0, error, i, is_pcie, n_80211 = 0, n_cc = 0, + n_pci = 0; + + KASSERT(siba->siba_type == SIBA_TYPE_PCI, + ("unsupported BUS type (%#x)", siba->siba_type)); + + siba->siba_ndevs = 0; + error = siba_switchcore(siba, 0); /* need the first core */ + if (error) + return; + + idhi = siba_scan_read_4(siba, 0, SIBA_IDHIGH); + if (SIBA_IDHIGH_CORECODE(idhi) == SIBA_DEVID_CHIPCOMMON) { + tmp = siba_scan_read_4(siba, 0, SIBA_CC_CHIPID); + siba->siba_chipid = SIBA_CC_ID(tmp); + siba->siba_chiprev = SIBA_CC_REV(tmp); + siba->siba_chippkg = SIBA_CC_PKG(tmp); + if (SIBA_IDHIGH_REV(idhi) >= 4) + siba->siba_ndevs = SIBA_CC_NCORES(tmp); + siba->siba_cc.scc_caps = siba_scan_read_4(siba, 0, + SIBA_CC_CAPS); + } else { + if (siba->siba_type == SIBA_TYPE_PCI) { + siba->siba_chipid = siba_dev2chipid(siba); + siba->siba_chiprev = pci_read_config(siba->siba_dev, + PCIR_REVID, 2); + siba->siba_chippkg = 0; + } else { + siba->siba_chipid = 0x4710; + siba->siba_chiprev = 0; + siba->siba_chippkg = 0; + } + } + if (siba->siba_ndevs == 0) + siba->siba_ndevs = siba_getncores(siba->siba_dev, + siba->siba_chipid); + if (siba->siba_ndevs > SIBA_MAX_CORES) { + device_printf(siba->siba_dev, + "too many siba cores (max %d %d)\n", + SIBA_MAX_CORES, siba->siba_ndevs); + return; + } + + /* looking basic information about each cores/devices */ + for (i = 0; i < siba->siba_ndevs; i++) { + error = siba_switchcore(siba, i); + if (error) + return; + sd = &(siba->siba_devs[dev_i]); + idhi = siba_scan_read_4(siba, i, SIBA_IDHIGH); + sd->sd_bus = siba; + sd->sd_id.sd_device = SIBA_IDHIGH_CORECODE(idhi); + sd->sd_id.sd_rev = SIBA_IDHIGH_REV(idhi); + sd->sd_id.sd_vendor = SIBA_IDHIGH_VENDOR(idhi); + sd->sd_ops = siba->siba_ops; + sd->sd_coreidx = i; + + DPRINTF(siba, SIBA_DEBUG_SCAN, + "core %d (%s) found (cc %#xrev %#x vendor %#x)\n", + i, siba_core_name(sd->sd_id.sd_device), + sd->sd_id.sd_device, sd->sd_id.sd_rev, sd->sd_id.vendor); + + switch (sd->sd_id.sd_device) { + case SIBA_DEVID_CHIPCOMMON: + n_cc++; + if (n_cc > 1) { + device_printf(siba->siba_dev, + "warn: multiple ChipCommon\n"); + break; + } + siba->siba_cc.scc_dev = sd; + break; + case SIBA_DEVID_80211: + n_80211++; + if (n_80211 > 1) { + device_printf(siba->siba_dev, + "warn: multiple 802.11 core\n"); + continue; + } + break; + case SIBA_DEVID_PCI: + case SIBA_DEVID_PCIE: + n_pci++; + error = pci_find_extcap(siba->siba_dev, PCIY_EXPRESS, + &base); + is_pcie = (error == 0) ? 1 : 0; + + if (n_pci > 1) { + device_printf(siba->siba_dev, + "warn: multiple PCI(E) cores\n"); + break; + } + if (sd->sd_id.sd_device == SIBA_DEVID_PCI && + is_pcie == 1) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Jan 31 21:22:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1FF9B106566C; Sun, 31 Jan 2010 21:22:46 +0000 (UTC) (envelope-from weongyo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EAC7A8FC14; Sun, 31 Jan 2010 21:22:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0VLMjLe042844; Sun, 31 Jan 2010 21:22:45 GMT (envelope-from weongyo@svn.freebsd.org) Received: (from weongyo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0VLMjSn042842; Sun, 31 Jan 2010 21:22:45 GMT (envelope-from weongyo@svn.freebsd.org) Message-Id: <201001312122.o0VLMjSn042842@svn.freebsd.org> From: Weongyo Jeong Date: Sun, 31 Jan 2010 21:22:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203320 - head/sys/modules X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 21:22:46 -0000 Author: weongyo Date: Sun Jan 31 21:22:45 2010 New Revision: 203320 URL: http://svn.freebsd.org/changeset/base/203320 Log: Hook up the siba_bwn module to the build. Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Sun Jan 31 21:18:22 2010 (r203319) +++ head/sys/modules/Makefile Sun Jan 31 21:22:45 2010 (r203320) @@ -249,6 +249,7 @@ SUBDIR= ${_3dfx} \ sdhci \ sem \ sf \ + siba_bwn \ siis \ sis \ sk \ From owner-svn-src-all@FreeBSD.ORG Sun Jan 31 21:45:14 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CA023106568B; Sun, 31 Jan 2010 21:45:14 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B96CD8FC19; Sun, 31 Jan 2010 21:45:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0VLjEt6047846; Sun, 31 Jan 2010 21:45:14 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0VLjEeA047841; Sun, 31 Jan 2010 21:45:14 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201001312145.o0VLjEeA047841@svn.freebsd.org> From: Bruce Cran Date: Sun, 31 Jan 2010 21:45:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203322 - head/lib/libc/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 21:45:14 -0000 Author: brucec Date: Sun Jan 31 21:45:14 2010 New Revision: 203322 URL: http://svn.freebsd.org/changeset/base/203322 Log: Fix typo of ENOTCONN. Add missing RETURN VALUES section in sctp_opt_info(3). Approved by: rrs (mentor) Modified: head/lib/libc/net/sctp_opt_info.3 head/lib/libc/net/sctp_recvmsg.3 head/lib/libc/net/sctp_send.3 head/lib/libc/net/sctp_sendmsg.3 Modified: head/lib/libc/net/sctp_opt_info.3 ============================================================================== --- head/lib/libc/net/sctp_opt_info.3 Sun Jan 31 21:39:25 2010 (r203321) +++ head/lib/libc/net/sctp_opt_info.3 Sun Jan 31 21:45:14 2010 (r203322) @@ -87,6 +87,8 @@ socket options. .Dv SCTP_PEER_AUTH_CHUNKS .Pp .Dv SCTP_LOCAL_AUTH_CHUNKS +.Sh RETURN VALUES +The call returns 0 on success and -1 upon error. .Sh ERRORS The .Fn sctp_opt_info Modified: head/lib/libc/net/sctp_recvmsg.3 ============================================================================== --- head/lib/libc/net/sctp_recvmsg.3 Sun Jan 31 21:39:25 2010 (r203321) +++ head/lib/libc/net/sctp_recvmsg.3 Sun Jan 31 21:45:14 2010 (r203322) @@ -269,7 +269,7 @@ This generally indicates that the interf but may be caused by transient congestion. .It Bq Er EHOSTUNREACH The remote host was unreachable. -.It Bq Er ENOTCON +.It Bq Er ENOTCONN On a one-to-one style socket no association exists. .It Bq Er ECONNRESET An abort was received by the stack while the user was Modified: head/lib/libc/net/sctp_send.3 ============================================================================== --- head/lib/libc/net/sctp_send.3 Sun Jan 31 21:39:25 2010 (r203321) +++ head/lib/libc/net/sctp_send.3 Sun Jan 31 21:45:14 2010 (r203322) @@ -319,7 +319,7 @@ This generally indicates that the interf but may be caused by transient congestion. .It Bq Er EHOSTUNREACH The remote host was unreachable. -.It Bq Er ENOTCON +.It Bq Er ENOTCONN On a one-to-one style socket no association exists. .It Bq Er ECONNRESET An abort was received by the stack while the user was Modified: head/lib/libc/net/sctp_sendmsg.3 ============================================================================== --- head/lib/libc/net/sctp_sendmsg.3 Sun Jan 31 21:39:25 2010 (r203321) +++ head/lib/libc/net/sctp_sendmsg.3 Sun Jan 31 21:45:14 2010 (r203322) @@ -296,7 +296,7 @@ This generally indicates that the interf but may be caused by transient congestion. .It Bq Er EHOSTUNREACH The remote host was unreachable. -.It Bq Er ENOTCON +.It Bq Er ENOTCONN On a one-to-one style socket no association exists. .It Bq Er ECONNRESET An abort was received by the stack while the user was From owner-svn-src-all@FreeBSD.ORG Sun Jan 31 21:47:40 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2E3421065679; Sun, 31 Jan 2010 21:47:40 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1E4718FC1F; Sun, 31 Jan 2010 21:47:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0VLle9M048417; Sun, 31 Jan 2010 21:47:40 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0VLle51048415; Sun, 31 Jan 2010 21:47:40 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201001312147.o0VLle51048415@svn.freebsd.org> From: Bruce Cran Date: Sun, 31 Jan 2010 21:47:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203323 - head/lib/libc/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 21:47:40 -0000 Author: brucec Date: Sun Jan 31 21:47:39 2010 New Revision: 203323 URL: http://svn.freebsd.org/changeset/base/203323 Log: Remove extra semicolon. Approved by: rrs (mentor) Modified: head/lib/libc/net/sctp_sys_calls.c Modified: head/lib/libc/net/sctp_sys_calls.c ============================================================================== --- head/lib/libc/net/sctp_sys_calls.c Sun Jan 31 21:45:14 2010 (r203322) +++ head/lib/libc/net/sctp_sys_calls.c Sun Jan 31 21:47:39 2010 (r203323) @@ -784,7 +784,7 @@ sctp_sendx(int sd, const void *msg, size free(buf); if (ret != 0) { if (errno == EALREADY) { - no_end_cx = 1;; + no_end_cx = 1; goto continue_send; } return (ret); From owner-svn-src-all@FreeBSD.ORG Sun Jan 31 22:16:27 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DD2FB1065692; Sun, 31 Jan 2010 22:16:27 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B24CD8FC19; Sun, 31 Jan 2010 22:16:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0VMGRFl054870; Sun, 31 Jan 2010 22:16:27 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0VMGRGI054867; Sun, 31 Jan 2010 22:16:27 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001312216.o0VMGRGI054867@svn.freebsd.org> From: Marius Strobl Date: Sun, 31 Jan 2010 22:16:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203326 - stable/7/sys/fs/cd9660 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 22:16:28 -0000 Author: marius Date: Sun Jan 31 22:16:27 2010 New Revision: 203326 URL: http://svn.freebsd.org/changeset/base/203326 Log: MFC: r202903 On LP64 struct ifid is 64-bit aligned while struct fid is 32-bit aligned so on architectures with strict alignment requirements we can't just simply cast the latter to the former but need to copy it bytewise instead. PR: 143010 Approved by: re (kib) Modified: stable/7/sys/fs/cd9660/cd9660_vfsops.c stable/7/sys/fs/cd9660/cd9660_vnops.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/fs/cd9660/cd9660_vfsops.c ============================================================================== --- stable/7/sys/fs/cd9660/cd9660_vfsops.c Sun Jan 31 22:08:52 2010 (r203325) +++ stable/7/sys/fs/cd9660/cd9660_vfsops.c Sun Jan 31 22:16:27 2010 (r203326) @@ -596,17 +596,19 @@ cd9660_fhtovp(mp, fhp, vpp) struct fid *fhp; struct vnode **vpp; { - struct ifid *ifhp = (struct ifid *)fhp; + struct ifid ifh; struct iso_node *ip; struct vnode *nvp; int error; + memcpy(&ifh, fhp, sizeof(ifh)); + #ifdef ISOFS_DBG printf("fhtovp: ino %d, start %ld\n", - ifhp->ifid_ino, ifhp->ifid_start); + ifh.ifid_ino, ifh.ifid_start); #endif - if ((error = VFS_VGET(mp, ifhp->ifid_ino, LK_EXCLUSIVE, &nvp)) != 0) { + if ((error = VFS_VGET(mp, ifh.ifid_ino, LK_EXCLUSIVE, &nvp)) != 0) { *vpp = NULLVP; return (error); } Modified: stable/7/sys/fs/cd9660/cd9660_vnops.c ============================================================================== --- stable/7/sys/fs/cd9660/cd9660_vnops.c Sun Jan 31 22:08:52 2010 (r203325) +++ stable/7/sys/fs/cd9660/cd9660_vnops.c Sun Jan 31 22:16:27 2010 (r203326) @@ -828,20 +828,25 @@ cd9660_vptofh(ap) struct fid *a_fhp; } */ *ap; { + struct ifid ifh; struct iso_node *ip = VTOI(ap->a_vp); - struct ifid *ifhp; - ifhp = (struct ifid *)ap->a_fhp; - ifhp->ifid_len = sizeof(struct ifid); + ifh.ifid_len = sizeof(struct ifid); - ifhp->ifid_ino = ip->i_number; - ifhp->ifid_start = ip->iso_start; + ifh.ifid_ino = ip->i_number; + ifh.ifid_start = ip->iso_start; + /* + * This intentionally uses sizeof(ifh) in order to not copy stack + * garbage on ILP32. + */ + memcpy(ap->a_fhp, &ifh, sizeof(ifh)); #ifdef ISOFS_DBG printf("vptofh: ino %d, start %ld\n", - ifhp->ifid_ino,ifhp->ifid_start); + ifh.ifid_ino, ifh.ifid_start); #endif - return 0; + + return (0); } /* From owner-svn-src-all@FreeBSD.ORG Sun Jan 31 22:21:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DCBDA106568D; Sun, 31 Jan 2010 22:21:08 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CB8478FC25; Sun, 31 Jan 2010 22:21:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0VML8Fk055991; Sun, 31 Jan 2010 22:21:08 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0VML8ng055989; Sun, 31 Jan 2010 22:21:08 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001312221.o0VML8ng055989@svn.freebsd.org> From: Marius Strobl Date: Sun, 31 Jan 2010 22:21:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203327 - stable/7/sys/sparc64/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 22:21:09 -0000 Author: marius Date: Sun Jan 31 22:21:08 2010 New Revision: 203327 URL: http://svn.freebsd.org/changeset/base/203327 Log: MFC: r203094 - Zero the MSI/MSI-X queue argument, otherwise mtx_init(9) can panic indicating an already initialized lock. - Check for an empty MSI/MSI-X queue entry before asserting that we have received a MSI/MSI-X message in order to not panic in case of stray MSI/ MSI-X queue interrupts which may happen in case of using an interrupt handler rather than a filter. Approved by: re (kib) Modified: stable/7/sys/sparc64/pci/fire.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/sparc64/pci/fire.c ============================================================================== --- stable/7/sys/sparc64/pci/fire.c Sun Jan 31 22:16:27 2010 (r203326) +++ stable/7/sys/sparc64/pci/fire.c Sun Jan 31 22:21:08 2010 (r203327) @@ -851,7 +851,7 @@ fire_intr_register(struct fire_softc *sc return (ENXIO); fica = malloc((ino >= FO_EQ_FIRST_INO && ino <= FO_EQ_LAST_INO) ? sizeof(struct fire_msiqarg) : sizeof(struct fire_icarg), M_DEVBUF, - M_NOWAIT); + M_NOWAIT | M_ZERO); if (fica == NULL) return (ENOMEM); fica->fica_sc = sc; @@ -1837,13 +1837,13 @@ fire_msiq_common(struct intr_vector *iv, qrec = &fmqa->fmqa_base[head]; word0 = qrec->fomqr_word0; for (;;) { + if (__predict_false((word0 & FO_MQR_WORD0_FMT_TYPE_MASK) == 0)) + break; KASSERT((word0 & FO_MQR_WORD0_FMT_TYPE_MSI64) != 0 || (word0 & FO_MQR_WORD0_FMT_TYPE_MSI32) != 0, ("%s: received non-MSI/MSI-X message in event queue %d " "(word0 %#llx)", device_get_nameunit(dev), msiq, (unsigned long long)word0)); - if (__predict_false((word0 & FO_MQR_WORD0_FMT_TYPE_MASK) == 0)) - break; msi = (word0 & FO_MQR_WORD0_DATA0_MASK) >> FO_MQR_WORD0_DATA0_SHFT; /* From owner-svn-src-all@FreeBSD.ORG Sun Jan 31 22:31:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BAE3B1065676; Sun, 31 Jan 2010 22:31:01 +0000 (UTC) (envelope-from csjp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AA4728FC1A; Sun, 31 Jan 2010 22:31:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0VMV1UA058157; Sun, 31 Jan 2010 22:31:01 GMT (envelope-from csjp@svn.freebsd.org) Received: (from csjp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0VMV1TK058155; Sun, 31 Jan 2010 22:31:01 GMT (envelope-from csjp@svn.freebsd.org) Message-Id: <201001312231.o0VMV1TK058155@svn.freebsd.org> From: "Christian S.J. Peron" Date: Sun, 31 Jan 2010 22:31:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203328 - head/sys/security/audit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 22:31:01 -0000 Author: csjp Date: Sun Jan 31 22:31:01 2010 New Revision: 203328 URL: http://svn.freebsd.org/changeset/base/203328 Log: Make sure we convert audit records that were produced as the result of the closefrom(2) syscall. Modified: head/sys/security/audit/audit_bsm.c Modified: head/sys/security/audit/audit_bsm.c ============================================================================== --- head/sys/security/audit/audit_bsm.c Sun Jan 31 22:21:08 2010 (r203327) +++ head/sys/security/audit/audit_bsm.c Sun Jan 31 22:31:01 2010 (r203328) @@ -842,6 +842,13 @@ kaudit_to_bsm(struct kaudit_record *kar, UPATH1_VNODE1_TOKENS; break; + case AUE_CLOSEFROM: + if (ARG_IS_VALID(kar, ARG_FD)) { + tok = au_to_arg32(1, "fd", ar->ar_arg_fd); + kau_write(rec, tok); + } + break; + case AUE_CORE: if (ARG_IS_VALID(kar, ARG_SIGNUM)) { tok = au_to_arg32(1, "signal", ar->ar_arg_signum); From owner-svn-src-all@FreeBSD.ORG Sun Jan 31 23:16:11 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 40841106566C; Sun, 31 Jan 2010 23:16:11 +0000 (UTC) (envelope-from jasone@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2DB038FC19; Sun, 31 Jan 2010 23:16:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0VNGBwK068125; Sun, 31 Jan 2010 23:16:11 GMT (envelope-from jasone@svn.freebsd.org) Received: (from jasone@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0VNGBLo068121; Sun, 31 Jan 2010 23:16:11 GMT (envelope-from jasone@svn.freebsd.org) Message-Id: <201001312316.o0VNGBLo068121@svn.freebsd.org> From: Jason Evans Date: Sun, 31 Jan 2010 23:16:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203329 - head/lib/libc/stdlib X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 23:16:11 -0000 Author: jasone Date: Sun Jan 31 23:16:10 2010 New Revision: 203329 URL: http://svn.freebsd.org/changeset/base/203329 Log: Fix bugs: * Fix a race in chunk_dealloc_dss(). * Check for allocation failure before zeroing memory in base_calloc(). Merge enhancements from a divergent version of jemalloc: * Convert thread-specific caching from magazines to an algorithm that is more tunable, and implement incremental GC. * Add support for medium size classes, [4KiB..32KiB], 2KiB apart by default. * Add dirty page tracking for pages within active small/medium object runs. This allows malloc to track precisely which pages are in active use, which makes dirty page purging more effective. * Base maximum dirty page count on proportion of active memory. * Use optional zeroing in arena_chunk_alloc() to avoid needless zeroing of chunks. This is useful in the context of DSS allocation, since a long-lived application may commonly recycle chunks. * Increase the default chunk size from 1MiB to 4MiB. Remove feature: * Remove the dynamic rebalancing code, since thread caching reduces its utility. Added: head/lib/libc/stdlib/ql.h (contents, props changed) head/lib/libc/stdlib/qr.h (contents, props changed) Modified: head/lib/libc/stdlib/malloc.3 head/lib/libc/stdlib/malloc.c Modified: head/lib/libc/stdlib/malloc.3 ============================================================================== --- head/lib/libc/stdlib/malloc.3 Sun Jan 31 22:31:01 2010 (r203328) +++ head/lib/libc/stdlib/malloc.3 Sun Jan 31 23:16:10 2010 (r203329) @@ -32,7 +32,7 @@ .\" @(#)malloc.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd September 26, 2009 +.Dd January 31, 2010 .Dt MALLOC 3 .Os .Sh NAME @@ -55,9 +55,7 @@ .Ft const char * .Va _malloc_options ; .Ft void -.Fo \*(lp*_malloc_message\*(rp -.Fa "const char *p1" "const char *p2" "const char *p3" "const char *p4" -.Fc +.Fn \*(lp*_malloc_message\*(rp "const char *p1" "const char *p2" "const char *p3" "const char *p4" .In malloc_np.h .Ft size_t .Fn malloc_usable_size "const void *ptr" @@ -124,7 +122,9 @@ will free the passed pointer when the re This is a .Fx specific API designed to ease the problems with traditional coding styles -for realloc causing memory leaks in libraries. +for +.Fn realloc +causing memory leaks in libraries. .Pp The .Fn free @@ -184,18 +184,6 @@ flags being set) become fatal. The process will call .Xr abort 3 in these cases. -.It B -Double/halve the per-arena lock contention threshold at which a thread is -randomly re-assigned to an arena. -This dynamic load balancing tends to push threads away from highly contended -arenas, which avoids worst case contention scenarios in which threads -disproportionately utilize arenas. -However, due to the highly dynamic load that applications may place on the -allocator, it is impossible for the allocator to know in advance how sensitive -it should be to contention over arenas. -Therefore, some applications may benefit from increasing or decreasing this -threshold parameter. -This option is not available for some configurations (non-PIC). .It C Double/halve the size of the maximum size class that is a multiple of the cacheline size (64). @@ -209,44 +197,62 @@ This option is enabled by default. See the .Dq M option for related information and interactions. +.It E +Double/halve the size of the maximum medium size class. +The valid range is from one page to one half chunk. +The default value is 32 KiB. .It F -Double/halve the per-arena maximum number of dirty unused pages that are -allowed to accumulate before informing the kernel about at least half of those -pages via +Halve/double the per-arena minimum ratio of active to dirty pages. +Some dirty unused pages may be allowed to accumulate, within the limit set by +the ratio, before informing the kernel about at least half of those pages via .Xr madvise 2 . This provides the kernel with sufficient information to recycle dirty pages if physical memory becomes scarce and the pages remain unused. -The default is 512 pages per arena; -.Ev MALLOC_OPTIONS=10f -will prevent any dirty unused pages from accumulating. +The default minimum ratio is 32:1; +.Ev MALLOC_OPTIONS=6F +will disable dirty page purging. .It G -When there are multiple threads, use thread-specific caching for objects that -are smaller than one page. -This option is enabled by default. -Thread-specific caching allows many allocations to be satisfied without -performing any thread synchronization, at the cost of increased memory use. +Double/halve the approximate interval (counted in terms of +thread-specific cache allocation/deallocation events) between full +thread-specific cache garbage collection sweeps. +Garbage collection is actually performed incrementally, one size +class at a time, in order to avoid large collection pauses. +The default sweep interval is 8192; +.Ev JEMALLOC_OPTIONS=14g +will disable garbage collection. +.It H +Double/halve the number of thread-specific cache slots per size +class. +When there are multiple threads, each thread uses a +thread-specific cache for small and medium objects. +Thread-specific caching allows many allocations to be satisfied +without performing any thread synchronization, at the cost of +increased memory use. See the -.Dq R +.Dq G option for related tuning information. -This option is not available for some configurations (non-PIC). +The default number of cache slots is 128; +.Ev JEMALLOC_OPTIONS=7h +will disable thread-specific caching. +Note that one cache slot per size class is not a valid +configuration due to implementation details. .It J Each byte of new memory allocated by .Fn malloc , -.Fn realloc +.Fn realloc , or .Fn reallocf will be initialized to 0xa5. All memory returned by .Fn free , -.Fn realloc +.Fn realloc , or .Fn reallocf will be initialized to 0x5a. This is intended for debugging and will impact performance negatively. .It K Double/halve the virtual memory chunk size. -The default chunk size is the maximum of 1 MB and the largest -page size that is less than or equal to 4 MB. +The default chunk size is 4 MiB. .It M Use .Xr mmap 2 @@ -279,14 +285,6 @@ Double/halve the size of the maximum siz quantum (8 or 16 bytes, depending on architecture). Above this size, cacheline spacing is used for size classes. The default value is 128 bytes. -.It R -Double/halve magazine size, which approximately doubles/halves the number of -rounds in each magazine. -Magazines are used by the thread-specific caching machinery to acquire and -release objects in bulk. -Increasing the magazine size decreases locking overhead, at the expense of -increased memory usage. -This option is not available for some configurations (non-PIC). .It U Generate .Dq utrace @@ -297,8 +295,7 @@ Consult the source for details on this o .It V Attempting to allocate zero bytes will return a .Dv NULL -pointer instead of -a valid pointer. +pointer instead of a valid pointer. (The default behavior is to make a minimal allocation and return a pointer to it.) This option is provided for System V compatibility. @@ -306,21 +303,20 @@ This option is incompatible with the .Dq X option. .It X -Rather than return failure for any allocation function, -display a diagnostic message on -.Dv stderr -and cause the program to drop -core (using +Rather than return failure for any allocation function, display a diagnostic +message on +.Dv STDERR_FILENO +and cause the program to drop core (using .Xr abort 3 ) . -This option should be set at compile time by including the following in -the source code: +This option should be set at compile time by including the following in the +source code: .Bd -literal -offset indent _malloc_options = "X"; .Ed .It Z Each byte of new memory allocated by .Fn malloc , -.Fn realloc +.Fn realloc , or .Fn reallocf will be initialized to 0. @@ -378,9 +374,9 @@ improve performance, mainly due to reduc However, it may make sense to reduce the number of arenas if an application does not make much use of the allocation functions. .Pp -In addition to multiple arenas, this allocator supports thread-specific -caching for small objects (smaller than one page), in order to make it -possible to completely avoid synchronization for most small allocation requests. +In addition to multiple arenas, this allocator supports thread-specific caching +for small and medium objects, in order to make it possible to completely avoid +synchronization for most small and medium allocation requests. Such caching allows very fast allocation in the common case, but it increases memory usage and fragmentation, since a bounded number of objects can remain allocated in each thread cache. @@ -391,23 +387,27 @@ Chunks are always aligned to multiples o This alignment makes it possible to find metadata for user objects very quickly. .Pp -User objects are broken into three categories according to size: small, large, -and huge. +User objects are broken into four categories according to size: small, medium, +large, and huge. Small objects are smaller than one page. +Medium objects range from one page to an upper limit determined at run time (see +the +.Dq E +option). Large objects are smaller than the chunk size. Huge objects are a multiple of the chunk size. -Small and large objects are managed by arenas; huge objects are managed +Small, medium, and large objects are managed by arenas; huge objects are managed separately in a single data structure that is shared by all threads. Huge objects are used by applications infrequently enough that this single data structure is not a scalability issue. .Pp Each chunk that is managed by an arena tracks its contents as runs of -contiguous pages (unused, backing a set of small objects, or backing one large -object). +contiguous pages (unused, backing a set of small or medium objects, or backing +one large object). The combination of chunk alignment and chunk page maps makes it possible to determine all metadata regarding small and large allocations in constant time. .Pp -Small objects are managed in groups by page runs. +Small and medium objects are managed in groups by page runs. Each run maintains a bitmap that tracks which regions are in use. Allocation requests that are no more than half the quantum (8 or 16, depending on architecture) are rounded up to the nearest power of two. @@ -419,10 +419,17 @@ Allocation requests that are more than t class, but no more than the minimum subpage-multiple size class (see the .Dq C option) are rounded up to the nearest multiple of the cacheline size (64). -Allocation requests that are more than the minimum subpage-multiple size class -are rounded up to the nearest multiple of the subpage size (256). -Allocation requests that are more than one page, but small enough to fit in -an arena-managed chunk (see the +Allocation requests that are more than the minimum subpage-multiple size class, +but no more than the maximum subpage-multiple size class are rounded up to the +nearest multiple of the subpage size (256). +Allocation requests that are more than the maximum subpage-multiple size class, +but no more than the maximum medium size class (see the +.Dq M +option) are rounded up to the nearest medium size class; spacing is an +automatically determined power of two and ranges from the subpage size to the +page size. +Allocation requests that are more than the maximum medium size class, but small +enough to fit in an arena-managed chunk (see the .Dq K option), are rounded up to the nearest run size. Allocation requests that are too large to fit in an arena-managed chunk are @@ -480,13 +487,12 @@ option is set, all warnings are treated .Pp The .Va _malloc_message -variable allows the programmer to override the function which emits -the text strings forming the errors and warnings if for some reason -the -.Dv stderr +variable allows the programmer to override the function which emits the text +strings forming the errors and warnings if for some reason the +.Dv STDERR_FILENO file descriptor is not suitable for this. -Please note that doing anything which tries to allocate memory in -this function is likely to result in a crash or deadlock. +Please note that doing anything which tries to allocate memory in this function +is likely to result in a crash or deadlock. .Pp All messages are prefixed by .Dq Ao Ar progname Ac Ns Li : (malloc) . Modified: head/lib/libc/stdlib/malloc.c ============================================================================== --- head/lib/libc/stdlib/malloc.c Sun Jan 31 22:31:01 2010 (r203328) +++ head/lib/libc/stdlib/malloc.c Sun Jan 31 23:16:10 2010 (r203329) @@ -1,5 +1,5 @@ /*- - * Copyright (C) 2006-2008 Jason Evans . + * Copyright (C) 2006-2010 Jason Evans . * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -47,58 +47,67 @@ * * Allocation requests are rounded up to the nearest size class, and no record * of the original request size is maintained. Allocations are broken into - * categories according to size class. Assuming runtime defaults, 4 kB pages + * categories according to size class. Assuming runtime defaults, 4 KiB pages * and a 16 byte quantum on a 32-bit system, the size classes in each category * are as follows: * - * |=======================================| - * | Category | Subcategory | Size | - * |=======================================| - * | Small | Tiny | 2 | - * | | | 4 | - * | | | 8 | - * | |------------------+---------| - * | | Quantum-spaced | 16 | - * | | | 32 | - * | | | 48 | - * | | | ... | - * | | | 96 | - * | | | 112 | - * | | | 128 | - * | |------------------+---------| - * | | Cacheline-spaced | 192 | - * | | | 256 | - * | | | 320 | - * | | | 384 | - * | | | 448 | - * | | | 512 | - * | |------------------+---------| - * | | Sub-page | 760 | - * | | | 1024 | - * | | | 1280 | - * | | | ... | - * | | | 3328 | - * | | | 3584 | - * | | | 3840 | - * |=======================================| - * | Large | 4 kB | - * | | 8 kB | - * | | 12 kB | - * | | ... | - * | | 1012 kB | - * | | 1016 kB | - * | | 1020 kB | - * |=======================================| - * | Huge | 1 MB | - * | | 2 MB | - * | | 3 MB | - * | | ... | - * |=======================================| + * |========================================| + * | Category | Subcategory | Size | + * |========================================| + * | Small | Tiny | 2 | + * | | | 4 | + * | | | 8 | + * | |------------------+----------| + * | | Quantum-spaced | 16 | + * | | | 32 | + * | | | 48 | + * | | | ... | + * | | | 96 | + * | | | 112 | + * | | | 128 | + * | |------------------+----------| + * | | Cacheline-spaced | 192 | + * | | | 256 | + * | | | 320 | + * | | | 384 | + * | | | 448 | + * | | | 512 | + * | |------------------+----------| + * | | Sub-page | 760 | + * | | | 1024 | + * | | | 1280 | + * | | | ... | + * | | | 3328 | + * | | | 3584 | + * | | | 3840 | + * |========================================| + * | Medium | 4 KiB | + * | | 6 KiB | + * | | 8 KiB | + * | | ... | + * | | 28 KiB | + * | | 30 KiB | + * | | 32 KiB | + * |========================================| + * | Large | 36 KiB | + * | | 40 KiB | + * | | 44 KiB | + * | | ... | + * | | 1012 KiB | + * | | 1016 KiB | + * | | 1020 KiB | + * |========================================| + * | Huge | 1 MiB | + * | | 2 MiB | + * | | 3 MiB | + * | | ... | + * |========================================| * - * A different mechanism is used for each category: + * Different mechanisms are used accoding to category: * - * Small : Each size class is segregated into its own set of runs. Each run - * maintains a bitmap of which regions are free/allocated. + * Small/medium : Each size class is segregated into its own set of runs. + * Each run maintains a bitmap of which regions are + * free/allocated. * * Large : Each allocation is backed by a dedicated run. Metadata are stored * in the associated arena chunk header maps. @@ -134,18 +143,11 @@ #define MALLOC_TINY /* - * MALLOC_MAG enables a magazine-based thread-specific caching layer for small + * MALLOC_TCACHE enables a thread-specific caching layer for small and medium * objects. This makes it possible to allocate/deallocate objects without any * locking when the cache is in the steady state. */ -#define MALLOC_MAG - -/* - * MALLOC_BALANCE enables monitoring of arena lock contention and dynamically - * re-balances arena load if exponentially averaged contention exceeds a - * certain threshold. - */ -#define MALLOC_BALANCE +#define MALLOC_TCACHE /* * MALLOC_DSS enables use of sbrk(2) to allocate chunks from the data storage @@ -166,7 +168,6 @@ __FBSDID("$FreeBSD$"); #include "namespace.h" #include #include -#include #include #include #include @@ -185,6 +186,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -192,18 +194,11 @@ __FBSDID("$FreeBSD$"); #include "un-namespace.h" -#ifdef MALLOC_DEBUG -# ifdef NDEBUG -# undef NDEBUG -# endif -#else -# ifndef NDEBUG -# define NDEBUG -# endif -#endif -#include - #include "rb.h" +#if (defined(MALLOC_TCACHE) && defined(MALLOC_STATS)) +#include "qr.h" +#include "ql.h" +#endif #ifdef MALLOC_DEBUG /* Disable inlining to make debugging easier. */ @@ -214,55 +209,57 @@ __FBSDID("$FreeBSD$"); #define STRERROR_BUF 64 /* - * Minimum alignment of allocations is 2^QUANTUM_2POW bytes. + * Minimum alignment of allocations is 2^LG_QUANTUM bytes. */ #ifdef __i386__ -# define QUANTUM_2POW 4 -# define SIZEOF_PTR_2POW 2 +# define LG_QUANTUM 4 +# define LG_SIZEOF_PTR 2 # define CPU_SPINWAIT __asm__ volatile("pause") #endif #ifdef __ia64__ -# define QUANTUM_2POW 4 -# define SIZEOF_PTR_2POW 3 +# define LG_QUANTUM 4 +# define LG_SIZEOF_PTR 3 #endif #ifdef __alpha__ -# define QUANTUM_2POW 4 -# define SIZEOF_PTR_2POW 3 +# define LG_QUANTUM 4 +# define LG_SIZEOF_PTR 3 # define NO_TLS #endif #ifdef __sparc64__ -# define QUANTUM_2POW 4 -# define SIZEOF_PTR_2POW 3 +# define LG_QUANTUM 4 +# define LG_SIZEOF_PTR 3 # define NO_TLS #endif #ifdef __amd64__ -# define QUANTUM_2POW 4 -# define SIZEOF_PTR_2POW 3 +# define LG_QUANTUM 4 +# define LG_SIZEOF_PTR 3 # define CPU_SPINWAIT __asm__ volatile("pause") #endif #ifdef __arm__ -# define QUANTUM_2POW 3 -# define SIZEOF_PTR_2POW 2 +# define LG_QUANTUM 3 +# define LG_SIZEOF_PTR 2 # define NO_TLS #endif #ifdef __mips__ -# define QUANTUM_2POW 3 -# define SIZEOF_PTR_2POW 2 +# define LG_QUANTUM 3 +# define LG_SIZEOF_PTR 2 # define NO_TLS #endif #ifdef __powerpc__ -# define QUANTUM_2POW 4 -# define SIZEOF_PTR_2POW 2 +# define LG_QUANTUM 4 +#endif +#ifdef __s390x__ +# define LG_QUANTUM 4 #endif -#define QUANTUM ((size_t)(1U << QUANTUM_2POW)) +#define QUANTUM ((size_t)(1U << LG_QUANTUM)) #define QUANTUM_MASK (QUANTUM - 1) -#define SIZEOF_PTR (1U << SIZEOF_PTR_2POW) +#define SIZEOF_PTR (1U << LG_SIZEOF_PTR) -/* sizeof(int) == (1U << SIZEOF_INT_2POW). */ -#ifndef SIZEOF_INT_2POW -# define SIZEOF_INT_2POW 2 +/* sizeof(int) == (1U << LG_SIZEOF_INT). */ +#ifndef LG_SIZEOF_INT +# define LG_SIZEOF_INT 2 #endif /* We can't use TLS in non-PIC programs, since TLS relies on loader magic. */ @@ -271,13 +268,9 @@ __FBSDID("$FreeBSD$"); #endif #ifdef NO_TLS - /* MALLOC_MAG requires TLS. */ -# ifdef MALLOC_MAG -# undef MALLOC_MAG -# endif - /* MALLOC_BALANCE requires TLS. */ -# ifdef MALLOC_BALANCE -# undef MALLOC_BALANCE + /* MALLOC_TCACHE requires TLS. */ +# ifdef MALLOC_TCACHE +# undef MALLOC_TCACHE # endif #endif @@ -285,17 +278,24 @@ __FBSDID("$FreeBSD$"); * Size and alignment of memory chunks that are allocated by the OS's virtual * memory system. */ -#define CHUNK_2POW_DEFAULT 20 +#define LG_CHUNK_DEFAULT 22 -/* Maximum number of dirty pages per arena. */ -#define DIRTY_MAX_DEFAULT (1U << 9) +/* + * The minimum ratio of active:dirty pages per arena is computed as: + * + * (nactive >> opt_lg_dirty_mult) >= ndirty + * + * So, supposing that opt_lg_dirty_mult is 5, there can be no less than 32 + * times as many active pages as dirty pages. + */ +#define LG_DIRTY_MULT_DEFAULT 5 /* * Maximum size of L1 cache line. This is used to avoid cache line aliasing. * In addition, this controls the spacing of cacheline-spaced size classes. */ -#define CACHELINE_2POW 6 -#define CACHELINE ((size_t)(1U << CACHELINE_2POW)) +#define LG_CACHELINE 6 +#define CACHELINE ((size_t)(1U << LG_CACHELINE)) #define CACHELINE_MASK (CACHELINE - 1) /* @@ -305,13 +305,13 @@ __FBSDID("$FreeBSD$"); * There must be at least 4 subpages per page, due to the way size classes are * handled. */ -#define SUBPAGE_2POW 8 -#define SUBPAGE ((size_t)(1U << SUBPAGE_2POW)) +#define LG_SUBPAGE 8 +#define SUBPAGE ((size_t)(1U << LG_SUBPAGE)) #define SUBPAGE_MASK (SUBPAGE - 1) #ifdef MALLOC_TINY /* Smallest size class to support. */ -# define TINY_MIN_2POW 1 +# define LG_TINY_MIN 1 #endif /* @@ -319,14 +319,20 @@ __FBSDID("$FreeBSD$"); * a power of 2. Above this size, allocations are rounded up to the nearest * power of 2. */ -#define QSPACE_MAX_2POW_DEFAULT 7 +#define LG_QSPACE_MAX_DEFAULT 7 /* * Maximum size class that is a multiple of the cacheline, but not (necessarily) * a power of 2. Above this size, allocations are rounded up to the nearest * power of 2. */ -#define CSPACE_MAX_2POW_DEFAULT 9 +#define LG_CSPACE_MAX_DEFAULT 9 + +/* + * Maximum medium size class. This must not be more than 1/4 of a chunk + * (LG_MEDIUM_MAX_DEFAULT <= LG_CHUNK_DEFAULT - 2). + */ +#define LG_MEDIUM_MAX_DEFAULT 15 /* * RUN_MAX_OVRHD indicates maximum desired run header overhead. Runs are sized @@ -350,7 +356,10 @@ __FBSDID("$FreeBSD$"); #define RUN_MAX_OVRHD_RELAX 0x00001800U /* Put a cap on small object run size. This overrides RUN_MAX_OVRHD. */ -#define RUN_MAX_SMALL (12 * PAGE_SIZE) +#define RUN_MAX_SMALL \ + (arena_maxclass <= (1U << (CHUNK_MAP_LG_PG_RANGE + PAGE_SHIFT)) \ + ? arena_maxclass : (1U << (CHUNK_MAP_LG_PG_RANGE + \ + PAGE_SHIFT))) /* * Hyper-threaded CPUs may need a special instruction inside spin loops in @@ -366,40 +375,21 @@ __FBSDID("$FreeBSD$"); * potential for priority inversion deadlock. Backing off past a certain point * can actually waste time. */ -#define SPIN_LIMIT_2POW 11 - -/* - * Conversion from spinning to blocking is expensive; we use (1U << - * BLOCK_COST_2POW) to estimate how many more times costly blocking is than - * worst-case spinning. - */ -#define BLOCK_COST_2POW 4 - -#ifdef MALLOC_MAG - /* - * Default magazine size, in bytes. max_rounds is calculated to make - * optimal use of the space, leaving just enough room for the magazine - * header. - */ -# define MAG_SIZE_2POW_DEFAULT 9 -#endif +#define LG_SPIN_LIMIT 11 -#ifdef MALLOC_BALANCE +#ifdef MALLOC_TCACHE /* - * We use an exponential moving average to track recent lock contention, - * where the size of the history window is N, and alpha=2/(N+1). - * - * Due to integer math rounding, very small values here can cause - * substantial degradation in accuracy, thus making the moving average decay - * faster than it would with precise calculation. + * Default number of cache slots for each bin in the thread cache (0: + * disabled). */ -# define BALANCE_ALPHA_INV_2POW 9 - +# define LG_TCACHE_NSLOTS_DEFAULT 7 /* - * Threshold value for the exponential moving contention average at which to - * re-assign a thread. + * (1U << opt_lg_tcache_gc_sweep) is the approximate number of + * allocation events between full GC sweeps (-1: disabled). Integer + * rounding may cause the actual number to be slightly higher, since GC is + * performed incrementally. */ -# define BALANCE_THRESHOLD_DEFAULT (1U << (SPIN_LIMIT_2POW-4)) +# define LG_TCACHE_GC_SWEEP_DEFAULT 13 #endif /******************************************************************************/ @@ -426,6 +416,17 @@ static malloc_mutex_t init_lock = {_SPIN #ifdef MALLOC_STATS +#ifdef MALLOC_TCACHE +typedef struct tcache_bin_stats_s tcache_bin_stats_t; +struct tcache_bin_stats_s { + /* + * Number of allocation requests that corresponded to the size of this + * bin. + */ + uint64_t nrequests; +}; +#endif + typedef struct malloc_bin_stats_s malloc_bin_stats_t; struct malloc_bin_stats_s { /* @@ -434,9 +435,12 @@ struct malloc_bin_stats_s { */ uint64_t nrequests; -#ifdef MALLOC_MAG - /* Number of magazine reloads from this bin. */ - uint64_t nmags; +#ifdef MALLOC_TCACHE + /* Number of tcache fills from this bin. */ + uint64_t nfills; + + /* Number of tcache flushes to this bin. */ + uint64_t nflushes; #endif /* Total number of runs created for this bin's size class. */ @@ -449,10 +453,24 @@ struct malloc_bin_stats_s { uint64_t reruns; /* High-water mark for this bin. */ - unsigned long highruns; + size_t highruns; /* Current number of runs in this bin. */ - unsigned long curruns; + size_t curruns; +}; + +typedef struct malloc_large_stats_s malloc_large_stats_t; +struct malloc_large_stats_s { + /* + * Number of allocation requests that corresponded to this size class. + */ + uint64_t nrequests; + + /* High-water mark for this size class. */ + size_t highruns; + + /* Current number of runs of this size class. */ + size_t curruns; }; typedef struct arena_stats_s arena_stats_t; @@ -474,14 +492,21 @@ struct arena_stats_s { uint64_t nmalloc_small; uint64_t ndalloc_small; + size_t allocated_medium; + uint64_t nmalloc_medium; + uint64_t ndalloc_medium; + size_t allocated_large; uint64_t nmalloc_large; uint64_t ndalloc_large; -#ifdef MALLOC_BALANCE - /* Number of times this arena reassigned a thread due to contention. */ - uint64_t nbalance; -#endif + /* + * One element for each possible size class, including sizes that + * overlap with bin size classes. This is necessary because ipalloc() + * sometimes has to use such large objects in order to assure proper + * alignment. + */ + malloc_large_stats_t *lstats; }; typedef struct chunk_stats_s chunk_stats_t; @@ -490,14 +515,14 @@ struct chunk_stats_s { uint64_t nchunks; /* High-water mark for number of chunks allocated. */ - unsigned long highchunks; + size_t highchunks; /* * Current number of chunks allocated. This value isn't maintained for * any other purpose, so keep track of it in order to be able to set * highchunks. */ - unsigned long curchunks; + size_t curchunks; }; #endif /* #ifdef MALLOC_STATS */ @@ -550,14 +575,14 @@ struct arena_chunk_map_s { * Run address (or size) and various flags are stored together. The bit * layout looks like (assuming 32-bit system): * - * ???????? ???????? ????---- ---kdzla + * ???????? ???????? ????cccc ccccdzla * * ? : Unallocated: Run address for first/last pages, unset for internal * pages. - * Small: Run address. + * Small/medium: Don't care. * Large: Run size for first page, unset for trailing pages. * - : Unused. - * k : key? + * c : refcount (could overflow for PAGE_SIZE >= 128 KiB) * d : dirty? * z : zeroed? * l : large? @@ -565,7 +590,7 @@ struct arena_chunk_map_s { * * Following are example bit patterns for the three types of runs. * - * r : run address + * p : run page offset * s : run size * x : don't care * - : 0 @@ -576,10 +601,10 @@ struct arena_chunk_map_s { * xxxxxxxx xxxxxxxx xxxx---- ----d--- * ssssssss ssssssss ssss---- -----z-- * - * Small: - * rrrrrrrr rrrrrrrr rrrr---- -------a - * rrrrrrrr rrrrrrrr rrrr---- -------a - * rrrrrrrr rrrrrrrr rrrr---- -------a + * Small/medium: + * pppppppp ppppcccc cccccccc cccc---a + * pppppppp ppppcccc cccccccc cccc---a + * pppppppp ppppcccc cccccccc cccc---a * * Large: * ssssssss ssssssss ssss---- ------la @@ -587,11 +612,19 @@ struct arena_chunk_map_s { * -------- -------- -------- ------la */ size_t bits; -#define CHUNK_MAP_KEY ((size_t)0x10U) -#define CHUNK_MAP_DIRTY ((size_t)0x08U) -#define CHUNK_MAP_ZEROED ((size_t)0x04U) -#define CHUNK_MAP_LARGE ((size_t)0x02U) -#define CHUNK_MAP_ALLOCATED ((size_t)0x01U) +#define CHUNK_MAP_PG_MASK ((size_t)0xfff00000U) +#define CHUNK_MAP_PG_SHIFT 20 +#define CHUNK_MAP_LG_PG_RANGE 12 + +#define CHUNK_MAP_RC_MASK ((size_t)0xffff0U) +#define CHUNK_MAP_RC_ONE ((size_t)0x00010U) + +#define CHUNK_MAP_FLAGS_MASK ((size_t)0xfU) +#define CHUNK_MAP_DIRTY ((size_t)0x8U) +#define CHUNK_MAP_ZEROED ((size_t)0x4U) +#define CHUNK_MAP_LARGE ((size_t)0x2U) +#define CHUNK_MAP_ALLOCATED ((size_t)0x1U) +#define CHUNK_MAP_KEY (CHUNK_MAP_DIRTY | CHUNK_MAP_ALLOCATED) }; typedef rb_tree(arena_chunk_map_t) arena_avail_tree_t; typedef rb_tree(arena_chunk_map_t) arena_run_tree_t; @@ -605,6 +638,13 @@ struct arena_chunk_s { /* Linkage for the arena's chunks_dirty tree. */ rb_node(arena_chunk_t) link_dirty; + /* + * True if the chunk is currently in the chunks_dirty tree, due to + * having at some point contained one or more dirty pages. Removal + * from chunks_dirty is lazy, so (dirtied && ndirty == 0) is possible. + */ + bool dirtied; + /* Number of dirty pages. */ size_t ndirty; @@ -670,6 +710,10 @@ struct arena_bin_s { #endif }; +#ifdef MALLOC_TCACHE +typedef struct tcache_s tcache_t; +#endif + struct arena_s { #ifdef MALLOC_DEBUG uint32_t magic; @@ -681,6 +725,13 @@ struct arena_s { #ifdef MALLOC_STATS arena_stats_t stats; +# ifdef MALLOC_TCACHE + /* + * List of tcaches for extant threads associated with this arena. + * Stats from these are merged incrementally, and at exit. + */ + ql_head(tcache_t) tcache_ql; +# endif #endif /* Tree of dirty-page-containing chunks this arena manages. */ @@ -698,6 +749,9 @@ struct arena_s { */ arena_chunk_t *spare; + /* Number of pages in active runs. */ + size_t nactive; + /* * Current count of pages within unused runs that are potentially * dirty, and for which madvise(... MADV_FREE) has not been called. By @@ -712,67 +766,77 @@ struct arena_s { */ arena_avail_tree_t runs_avail; -#ifdef MALLOC_BALANCE /* - * The arena load balancing machinery needs to keep track of how much - * lock contention there is. This value is exponentially averaged. - */ - uint32_t contention; -#endif - - /* - * bins is used to store rings of free regions of the following sizes, - * assuming a 16-byte quantum, 4kB page size, and default + * bins is used to store trees of free regions of the following sizes, + * assuming a 16-byte quantum, 4 KiB page size, and default * MALLOC_OPTIONS. * - * bins[i] | size | - * --------+------+ - * 0 | 2 | - * 1 | 4 | - * 2 | 8 | - * --------+------+ - * 3 | 16 | - * 4 | 32 | - * 5 | 48 | - * 6 | 64 | - * : : - * : : - * 33 | 496 | - * 34 | 512 | - * --------+------+ - * 35 | 1024 | - * 36 | 2048 | - * --------+------+ + * bins[i] | size | + * --------+--------+ + * 0 | 2 | + * 1 | 4 | + * 2 | 8 | + * --------+--------+ + * 3 | 16 | + * 4 | 32 | + * 5 | 48 | + * : : + * 8 | 96 | + * 9 | 112 | + * 10 | 128 | + * --------+--------+ + * 11 | 192 | + * 12 | 256 | + * 13 | 320 | + * 14 | 384 | + * 15 | 448 | + * 16 | 512 | + * --------+--------+ + * 17 | 768 | + * 18 | 1024 | + * 19 | 1280 | + * : : + * 27 | 3328 | + * 28 | 3584 | + * 29 | 3840 | + * --------+--------+ + * 30 | 4 KiB | + * 31 | 6 KiB | + * 33 | 8 KiB | + * : : + * 43 | 28 KiB | + * 44 | 30 KiB | + * 45 | 32 KiB | + * --------+--------+ */ arena_bin_t bins[1]; /* Dynamically sized. */ }; /******************************************************************************/ /* - * Magazine data structures. + * Thread cache data structures. */ -#ifdef MALLOC_MAG -typedef struct mag_s mag_t; -struct mag_s { - size_t binind; /* Index of associated bin. */ - size_t nrounds; - void *rounds[1]; /* Dynamically sized. */ -}; - *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Feb 1 08:30:40 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B24A7106566B; Mon, 1 Feb 2010 08:30:40 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-iw0-f198.google.com (mail-iw0-f198.google.com [209.85.223.198]) by mx1.freebsd.org (Postfix) with ESMTP id 55F5E8FC17; Mon, 1 Feb 2010 08:30:40 +0000 (UTC) Received: by iwn36 with SMTP id 36so4455957iwn.3 for ; Mon, 01 Feb 2010 00:30:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type; bh=lFehRuOYoKlh+l7Sjv3OieVIMIg10Ue7WEe7cjbb4yo=; b=OwCC7b6hX2m0ZuT3NgQNnnafyJqwplmAbmN2hpJrpJrqEWJG7r4oKYMWMrlNDLSeea oI9TwUF8GdZqxw82atW4vk3b5SMWEhMyxgHlSKXu9M3ZNpR2/2Nwh+OF3MztlhCJMcLb SUlhtema8uQywGaiEvfU11AeurICRsWh80DuE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=eXj3SJblcQJd3T6wcsSjuv+cT7JIqkXXkJrjDxtp3b3zjAafarYOHpqwGC1uFKKMpz 4P/qwP/9/b54iZ7PW5pBjMXt+8Cgdz/OSc9PkdFxSusDx9v6mGEFL0GTDXifsvG9kcGX WAcMN81Cyz5Ffz4TVnJTFu562WcyZMV3pHXPc= MIME-Version: 1.0 Sender: asmrookie@gmail.com Received: by 10.231.146.2 with SMTP id f2mr473971ibv.23.1265013039465; Mon, 01 Feb 2010 00:30:39 -0800 (PST) In-Reply-To: <20100130164145.GB77522@alchemy.franken.de> References: <201001231554.o0NFsMbx049837@svn.freebsd.org> <3bbf2fe11001252310r408a6be4j9bc42618394b3e3d@mail.gmail.com> <20100127215904.GF40779@alchemy.franken.de> <3bbf2fe11001280216p705ed94ev61abc4be654f8cc1@mail.gmail.com> <20100130144036.GA77522@alchemy.franken.de> <3bbf2fe11001300722v7dc4e53cvc94cddd60997c79b@mail.gmail.com> <20100130164145.GB77522@alchemy.franken.de> Date: Mon, 1 Feb 2010 09:30:39 +0100 X-Google-Sender-Auth: 5fb25c7c3b8ca849 Message-ID: <3bbf2fe11002010030j65c6cecdxb82ebf45a13abfc7@mail.gmail.com> From: Attilio Rao To: Marius Strobl Content-Type: text/plain; charset=UTF-8 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Rob Farmer , src-committers@freebsd.org Subject: Re: svn commit: r202889 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2010 08:30:40 -0000 2010/1/30 Marius Strobl : > On Sat, Jan 30, 2010 at 04:22:47PM +0100, Attilio Rao wrote: >> 2010/1/30 Marius Strobl : >> > >> > I think the idea behind using sched_lock in the sparc64 code is >> > to piggyback on it for protecting the pmap and take advantage of >> > the fact that it's held across cpu_switch() anyway. If that's >> > correct it should be possible to replace it with a separate >> > spinlock dedicated to protecting the pmap or given that due to >> > the macro madness involved in mtx_{,un}lock_spin() it's hard to >> > properly call these from asm by calling spinlock_{enter,exit}() >> > directly. >> >> Even if that is the case there is no reason to not call >> thread_lock()/thread_unlock() (which will acquire the correct >> sched_lock or do the handover in the sched_4bsd in the right way) and >> keep an unified spinlock in order to keep cpu_switch() simple and >> still offering pmap protection over context switches. >> > > It's not clear to me what threads to use in order to get this > to work the right way, for pmap_release() I'd use curthread and > for pmap_activate() I'd just pass td on to thread_{,un}lock()? > Whould the general approach of using thread_{,un}lock() for pmap > protection also do the right thing in case of ULE? I loooked briefly at the protected paths and I guess what you really want is to use a dedicated global spinlock (because you are going to access to the pmap of all CPUs, not only the one where you are running into) which doesn't necessary need to be sched_lock (cpushead is not sched_lock protected btw). Maybe something more fancy may be done, but that's simple enough and working. Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-svn-src-all@FreeBSD.ORG Mon Feb 1 09:29:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4C6FC106566C; Mon, 1 Feb 2010 09:29:33 +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 20C7C8FC0A; Mon, 1 Feb 2010 09:29:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o119TX2J002816; Mon, 1 Feb 2010 09:29:33 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o119TXB8002814; Mon, 1 Feb 2010 09:29:33 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201002010929.o119TXB8002814@svn.freebsd.org> From: Xin LI Date: Mon, 1 Feb 2010 09:29: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: r203333 - stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2010 09:29:33 -0000 Author: delphij Date: Mon Feb 1 09:29:32 2010 New Revision: 203333 URL: http://svn.freebsd.org/changeset/base/203333 Log: Reduce diff against OpenSolaris - move Giant acquire/release to zfs_znode.c. As a side effect this also eliminates two potential Giant leaks. Approved by: pjd Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c Mon Feb 1 01:06:36 2010 (r203332) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c Mon Feb 1 09:29:32 2010 (r203333) @@ -557,9 +557,6 @@ zfs_rmnode(znode_t *zp) dmu_tx_t *tx; uint64_t acl_obj; int error; - int vfslocked; - - vfslocked = VFS_LOCK_GIANT(zfsvfs->z_vfs); ASSERT(zp->z_phys->zp_links == 0); @@ -593,7 +590,6 @@ zfs_rmnode(znode_t *zp) */ zfs_znode_dmu_fini(zp); zfs_znode_free(zp); - VFS_UNLOCK_GIANT(vfslocked); return; } } @@ -666,7 +662,6 @@ zfs_rmnode(znode_t *zp) out: if (xzp) VN_RELE(ZTOV(xzp)); - VFS_UNLOCK_GIANT(vfslocked); } static uint64_t Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Mon Feb 1 01:06:36 2010 (r203332) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Mon Feb 1 09:29:32 2010 (r203333) @@ -1017,6 +1017,7 @@ zfs_zinactive(znode_t *zp) vnode_t *vp = ZTOV(zp); zfsvfs_t *zfsvfs = zp->z_zfsvfs; uint64_t z_id = zp->z_id; + int vfslocked; ASSERT(zp->z_dbuf && zp->z_phys); @@ -1049,7 +1050,9 @@ zfs_zinactive(znode_t *zp) ZFS_OBJ_HOLD_EXIT(zfsvfs, z_id); ASSERT(vp->v_count == 0); vrecycle(vp, curthread); + vfslocked = VFS_LOCK_GIANT(zfsvfs->z_vfs); zfs_rmnode(zp); + VFS_UNLOCK_GIANT(vfslocked); return; } mutex_exit(&zp->z_lock); From owner-svn-src-all@FreeBSD.ORG Mon Feb 1 09:57:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DB31E1065679; Mon, 1 Feb 2010 09:57:43 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CA8758FC17; Mon, 1 Feb 2010 09:57:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o119vhBc009113; Mon, 1 Feb 2010 09:57:43 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o119vhGb009111; Mon, 1 Feb 2010 09:57:43 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201002010957.o119vhGb009111@svn.freebsd.org> From: Marius Strobl Date: Mon, 1 Feb 2010 09:57:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203334 - head/sys/sun4v/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2010 09:57:43 -0000 Author: marius Date: Mon Feb 1 09:57:43 2010 New Revision: 203334 URL: http://svn.freebsd.org/changeset/base/203334 Log: Merge r157224 from sparc64: Sync with the other archs and declare the memory location referenced by the address argument of the bus_space_write_multi_*() familiy as const. Modified: head/sys/sun4v/include/bus.h Modified: head/sys/sun4v/include/bus.h ============================================================================== --- head/sys/sun4v/include/bus.h Mon Feb 1 09:29:32 2010 (r203333) +++ head/sys/sun4v/include/bus.h Mon Feb 1 09:57:43 2010 (r203334) @@ -316,7 +316,7 @@ bus_space_write_8(bus_space_tag_t t, bus static __inline void bus_space_write_multi_1(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, - uint8_t *a, size_t c) + const uint8_t *a, size_t c) { while (c-- > 0) @@ -325,7 +325,7 @@ bus_space_write_multi_1(bus_space_tag_t static __inline void bus_space_write_multi_2(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, - uint16_t *a, size_t c) + const uint16_t *a, size_t c) { while (c-- > 0) @@ -334,7 +334,7 @@ bus_space_write_multi_2(bus_space_tag_t static __inline void bus_space_write_multi_4(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, - uint32_t *a, size_t c) + const uint32_t *a, size_t c) { while (c-- > 0) @@ -343,7 +343,7 @@ bus_space_write_multi_4(bus_space_tag_t static __inline void bus_space_write_multi_8(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, - uint64_t *a, size_t c) + const uint64_t *a, size_t c) { while (c-- > 0) From owner-svn-src-all@FreeBSD.ORG Mon Feb 1 10:18:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2C10C106566C; Mon, 1 Feb 2010 10:18:01 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1ACBA8FC0A; Mon, 1 Feb 2010 10:18:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o11AI0Ao015743; Mon, 1 Feb 2010 10:18:00 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o11AI0K9015740; Mon, 1 Feb 2010 10:18:00 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201002011018.o11AI0K9015740@svn.freebsd.org> From: Marius Strobl Date: Mon, 1 Feb 2010 10:18:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203335 - in head/sys/sun4v: include sun4v X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2010 10:18:01 -0000 Author: marius Date: Mon Feb 1 10:18:00 2010 New Revision: 203335 URL: http://svn.freebsd.org/changeset/base/203335 Log: Merge r177565 from sparc64: - Const'ify the bus_stream_asi and bus_type_asi arrays. - Replace hard-coded functions names missed in bus_machdep.c with __func__. - Break some long lines. Modified: head/sys/sun4v/include/bus.h head/sys/sun4v/sun4v/bus_machdep.c Modified: head/sys/sun4v/include/bus.h ============================================================================== --- head/sys/sun4v/include/bus.h Mon Feb 1 09:57:43 2010 (r203334) +++ head/sys/sun4v/include/bus.h Mon Feb 1 10:18:00 2010 (r203335) @@ -96,8 +96,8 @@ #define PCI_MEMORY_BUS_SPACE 4 #define LAST_BUS_SPACE 5 -extern int bus_type_asi[]; -extern int bus_stream_asi[]; +extern const int bus_type_asi[]; +extern const int bus_stream_asi[]; #define __BUS_SPACE_HAS_STREAM_METHODS 1 Modified: head/sys/sun4v/sun4v/bus_machdep.c ============================================================================== --- head/sys/sun4v/sun4v/bus_machdep.c Mon Feb 1 09:57:43 2010 (r203334) +++ head/sys/sun4v/sun4v/bus_machdep.c Mon Feb 1 10:18:00 2010 (r203335) @@ -95,7 +95,7 @@ * from: @(#)machdep.c 8.6 (Berkeley) 1/14/94 * from: NetBSD: machdep.c,v 1.111 2001/09/15 07:13:40 eeh Exp * and - * from: FreeBSD: src/sys/i386/i386/busdma_machdep.c,v 1.24 2001/08/15 + * from: FreeBSD: src/sys/i386/i386/busdma_machdep.c,v 1.24 2001/08/15 */ #include @@ -129,8 +129,8 @@ __FBSDID("$FreeBSD$"); static void nexus_bus_barrier(bus_space_tag_t, bus_space_handle_t, bus_size_t, bus_size_t, int); -/* ASI's for bus access. */ -int bus_type_asi[] = { +/* ASIs for bus access */ +const int bus_type_asi[] = { ASI_REAL_IO, /* nexus */ ASI_REAL_IO, /* SBus */ ASI_REAL_IO_L, /* PCI configuration space */ @@ -139,7 +139,7 @@ int bus_type_asi[] = { 0 }; -int bus_stream_asi[] = { +const int bus_stream_asi[] = { ASI_REAL_IO, /* nexus */ ASI_REAL_IO, /* SBus */ ASI_REAL_IO, /* PCI configuration space */ @@ -249,7 +249,7 @@ bus_dma_tag_create(bus_dma_tag_t parent, newtag->dt_segments = NULL; - /* Take into account any restrictions imposed by our parent tag */ + /* Take into account any restrictions imposed by our parent tag. */ if (parent != NULL) { newtag->dt_lowaddr = ulmin(parent->dt_lowaddr, newtag->dt_lowaddr); @@ -551,8 +551,7 @@ nexus_dmamap_load_uio(bus_dma_tag_t dmat if (uio->uio_segflg == UIO_USERSPACE) { td = uio->uio_td; - KASSERT(td != NULL, - ("nexus_dmamap_load_uio: USERSPACE but no proc")); + KASSERT(td != NULL, ("%s: USERSPACE but no proc", __func__)); } nsegs = 0; @@ -652,9 +651,9 @@ nexus_dmamem_alloc(bus_dma_tag_t dmat, v *vaddr = malloc(dmat->dt_maxsize, M_DEVBUF, mflags); } else { /* - * XXX: Use contigmalloc until it is merged into this facility - * and handles multi-seg allocations. Nobody is doing multi-seg - * allocations yet though. + * XXX use contigmalloc until it is merged into this + * facility and handles multi-seg allocations. Nobody + * is doing multi-seg allocations yet though. */ *vaddr = contigmalloc(dmat->dt_maxsize, M_DEVBUF, mflags, 0ul, dmat->dt_lowaddr, @@ -795,8 +794,8 @@ sparc64_bus_mem_unmap(void *bh, bus_size } /* - * Fake up a bus tag, for use by console drivers in early boot when the regular - * means to allocate resources are not yet available. + * Fake up a bus tag, for use by console drivers in early boot when the + * regular means to allocate resources are not yet available. * Addr is the physical address of the desired start of the handle. */ bus_space_handle_t From owner-svn-src-all@FreeBSD.ORG Mon Feb 1 10:45:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 567801065670; Mon, 1 Feb 2010 10:45:24 +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 451B78FC14; Mon, 1 Feb 2010 10:45:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o11AjOsH021896; Mon, 1 Feb 2010 10:45:24 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o11AjOrD021894; Mon, 1 Feb 2010 10:45:24 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201002011045.o11AjOrD021894@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 1 Feb 2010 10:45:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203336 - stable/8/sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2010 10:45:24 -0000 Author: kib Date: Mon Feb 1 10:45:23 2010 New Revision: 203336 URL: http://svn.freebsd.org/changeset/base/203336 Log: MFC r203175: The MAP_ENTRY_NEEDS_COPY flag belongs to protoeflags, cow variable uses different namespace. Modified: stable/8/sys/vm/vm_map.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/vm/vm_map.c ============================================================================== --- stable/8/sys/vm/vm_map.c Mon Feb 1 10:18:00 2010 (r203335) +++ stable/8/sys/vm/vm_map.c Mon Feb 1 10:45:23 2010 (r203336) @@ -1136,7 +1136,7 @@ vm_map_insert(vm_map_t map, vm_object_t ((protoeflags & MAP_ENTRY_NEEDS_COPY) || object == NULL))) { if (!(cow & MAP_ACC_CHARGED) && !swap_reserve(end - start)) return (KERN_RESOURCE_SHORTAGE); - KASSERT(object == NULL || (cow & MAP_ENTRY_NEEDS_COPY) || + KASSERT(object == NULL || (protoeflags & MAP_ENTRY_NEEDS_COPY) || object->uip == NULL, ("OVERCOMMIT: vm_map_insert o %p", object)); uip = curthread->td_ucred->cr_ruidinfo; From owner-svn-src-all@FreeBSD.ORG Mon Feb 1 11:05:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C828A106566B; Mon, 1 Feb 2010 11:05:19 +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 9C2138FC12; Mon, 1 Feb 2010 11:05:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o11B5JVO026385; Mon, 1 Feb 2010 11:05:19 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o11B5JoE026382; Mon, 1 Feb 2010 11:05:19 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201002011105.o11B5JoE026382@svn.freebsd.org> From: Xin LI Date: Mon, 1 Feb 2010 11:05:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203338 - stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2010 11:05:20 -0000 Author: delphij Date: Mon Feb 1 11:05:19 2010 New Revision: 203338 URL: http://svn.freebsd.org/changeset/base/203338 Log: MFC r201406: Reduce diff against OpenSolaris - move Giant acquire/release to zfs_znode.c. As a side effect this also eliminates two potential Giant leaks. Approved by: re (kib) Modified: stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c ============================================================================== --- stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c Mon Feb 1 10:56:12 2010 (r203337) +++ stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c Mon Feb 1 11:05:19 2010 (r203338) @@ -557,9 +557,6 @@ zfs_rmnode(znode_t *zp) dmu_tx_t *tx; uint64_t acl_obj; int error; - int vfslocked; - - vfslocked = VFS_LOCK_GIANT(zfsvfs->z_vfs); ASSERT(zp->z_phys->zp_links == 0); @@ -593,7 +590,6 @@ zfs_rmnode(znode_t *zp) */ zfs_znode_dmu_fini(zp); zfs_znode_free(zp); - VFS_UNLOCK_GIANT(vfslocked); return; } } @@ -666,7 +662,6 @@ zfs_rmnode(znode_t *zp) out: if (xzp) VN_RELE(ZTOV(xzp)); - VFS_UNLOCK_GIANT(vfslocked); } static uint64_t Modified: stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c ============================================================================== --- stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Mon Feb 1 10:56:12 2010 (r203337) +++ stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Mon Feb 1 11:05:19 2010 (r203338) @@ -1023,6 +1023,7 @@ zfs_zinactive(znode_t *zp) vnode_t *vp = ZTOV(zp); zfsvfs_t *zfsvfs = zp->z_zfsvfs; uint64_t z_id = zp->z_id; + int vfslocked; ASSERT(zp->z_dbuf && zp->z_phys); @@ -1055,7 +1056,9 @@ zfs_zinactive(znode_t *zp) ZFS_OBJ_HOLD_EXIT(zfsvfs, z_id); ASSERT(vp->v_count == 0); vrecycle(vp, curthread); + vfslocked = VFS_LOCK_GIANT(zfsvfs->z_vfs); zfs_rmnode(zp); + VFS_UNLOCK_GIANT(vfslocked); return; } mutex_exit(&zp->z_lock); From owner-svn-src-all@FreeBSD.ORG Mon Feb 1 12:43:05 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 289171065670; Mon, 1 Feb 2010 12:43:05 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 152F28FC0C; Mon, 1 Feb 2010 12:43:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o11Ch5H0050269; Mon, 1 Feb 2010 12:43:05 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o11Ch5KV050267; Mon, 1 Feb 2010 12:43:05 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201002011243.o11Ch5KV050267@svn.freebsd.org> From: Marius Strobl Date: Mon, 1 Feb 2010 12:43:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203341 - head/sys/sun4v/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2010 12:43:05 -0000 Author: marius Date: Mon Feb 1 12:43:04 2010 New Revision: 203341 URL: http://svn.freebsd.org/changeset/base/203341 Log: Merge r178860 from sparc64: - Remove the BUS_HANDLE_MIN checking in the __BUS_DEBUG_ACCESS macro; for UPA it should have fulfilled its purpose by now and Fireplane- and JBus-based machines are way to messy in organization to implement something equivalent. - Fix a bunch of style(9) bugs. Modified: head/sys/sun4v/include/bus.h Modified: head/sys/sun4v/include/bus.h ============================================================================== --- head/sys/sun4v/include/bus.h Mon Feb 1 12:06:37 2010 (r203340) +++ head/sys/sun4v/include/bus.h Mon Feb 1 12:43:04 2010 (r203341) @@ -81,7 +81,6 @@ #include #include -#include /* * Nexus and SBus spaces are non-cached and big endian @@ -99,27 +98,24 @@ extern const int bus_type_asi[]; extern const int bus_stream_asi[]; -#define __BUS_SPACE_HAS_STREAM_METHODS 1 +#define __BUS_SPACE_HAS_STREAM_METHODS 1 -#define BUS_SPACE_MAXSIZE_24BIT 0xFFFFFF -#define BUS_SPACE_MAXSIZE_32BIT 0xFFFFFFFF -#define BUS_SPACE_MAXSIZE 0xFFFFFFFFFFFFFFFF -#define BUS_SPACE_MAXADDR_24BIT 0xFFFFFF -#define BUS_SPACE_MAXADDR_32BIT 0xFFFFFFFF -#define BUS_SPACE_MAXADDR 0xFFFFFFFF +#define BUS_SPACE_MAXSIZE_24BIT 0xFFFFFF +#define BUS_SPACE_MAXSIZE_32BIT 0xFFFFFFFF +#define BUS_SPACE_MAXSIZE 0xFFFFFFFFFFFFFFFF +#define BUS_SPACE_MAXADDR_24BIT 0xFFFFFF +#define BUS_SPACE_MAXADDR_32BIT 0xFFFFFFFF +#define BUS_SPACE_MAXADDR 0xFFFFFFFF -#define BUS_SPACE_UNRESTRICTED (~0) +#define BUS_SPACE_UNRESTRICTED (~0) -/* - * Access methods for bus resources and address space. - */ struct bus_space_tag { void *bst_cookie; bus_space_tag_t bst_parent; int bst_type; void (*bst_bus_barrier)(bus_space_tag_t, bus_space_handle_t, - bus_size_t, bus_size_t, int); + bus_size_t, bus_size_t, int); }; /* @@ -135,13 +131,11 @@ static int bus_space_subregion(bus_space */ static __inline int bus_space_map(bus_space_tag_t t, bus_addr_t addr, - bus_size_t size, int flags, - bus_space_handle_t *bshp); + bus_size_t size, int flags, bus_space_handle_t *bshp); static __inline int bus_space_map(bus_space_tag_t t __unused, bus_addr_t addr, - bus_size_t size __unused, int flags __unused, - bus_space_handle_t *bshp) + bus_size_t size __unused, int flags __unused, bus_space_handle_t *bshp) { *bshp = addr; @@ -152,24 +146,26 @@ bus_space_map(bus_space_tag_t t __unused * Unmap a region of device bus space. */ static __inline void bus_space_unmap(bus_space_tag_t t, bus_space_handle_t bsh, - bus_size_t size); + bus_size_t size); static __inline void bus_space_unmap(bus_space_tag_t t __unused, bus_space_handle_t bsh __unused, - bus_size_t size __unused) + bus_size_t size __unused) { + } /* This macro finds the first "upstream" implementation of method `f' */ -#define _BS_CALL(t,f) \ +#define _BS_CALL(t,f) \ while (t->f == NULL) \ - t = t->bst_parent; \ + t = t->bst_parent; \ return (*(t)->f) static __inline void bus_space_barrier(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, bus_size_t s, int f) { + _BS_CALL(t, bst_bus_barrier)(t, h, o, s, f); } @@ -177,20 +173,21 @@ static __inline int bus_space_subregion(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, bus_size_t s, bus_space_handle_t *hp) { + *hp = h + o; return (0); } /* flags for bus space map functions */ -#define BUS_SPACE_MAP_CACHEABLE 0x0001 -#define BUS_SPACE_MAP_LINEAR 0x0002 -#define BUS_SPACE_MAP_READONLY 0x0004 -#define BUS_SPACE_MAP_PREFETCHABLE 0x0008 +#define BUS_SPACE_MAP_CACHEABLE 0x0001 +#define BUS_SPACE_MAP_LINEAR 0x0002 +#define BUS_SPACE_MAP_READONLY 0x0004 +#define BUS_SPACE_MAP_PREFETCHABLE 0x0008 /* placeholders for bus functions... */ -#define BUS_SPACE_MAP_BUS1 0x0100 -#define BUS_SPACE_MAP_BUS2 0x0200 -#define BUS_SPACE_MAP_BUS3 0x0400 -#define BUS_SPACE_MAP_BUS4 0x0800 +#define BUS_SPACE_MAP_BUS1 0x0100 +#define BUS_SPACE_MAP_BUS2 0x0200 +#define BUS_SPACE_MAP_BUS3 0x0400 +#define BUS_SPACE_MAP_BUS4 0x0800 /* flags for bus_space_barrier() */ #define BUS_SPACE_BARRIER_READ 0x01 /* force read barrier */ @@ -198,13 +195,9 @@ bus_space_subregion(bus_space_tag_t t, b #ifdef BUS_SPACE_DEBUG #define KTR_BUS KTR_CT2 -#define BUS_HANDLE_MIN UPA_MEMSTART #define __BUS_DEBUG_ACCESS(h, o, desc, sz) do { \ CTR4(KTR_BUS, "bus space: %s %d: handle %#lx, offset %#lx", \ (desc), (sz), (h), (o)); \ - if ((h) + (o) < BUS_HANDLE_MIN) \ - panic("bus space access at %#lx out of range", \ - (h) + (o)); \ } while (0) #else #define __BUS_DEBUG_ACCESS(h, o, desc, sz) @@ -388,97 +381,109 @@ bus_space_set_multi_8(bus_space_tag_t t, static __inline void bus_space_read_region_1(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, - u_int8_t *a, bus_size_t c) + uint8_t *a, bus_size_t c) { + for (; c; a++, c--, o++) *a = bus_space_read_1(t, h, o); } static __inline void bus_space_read_region_2(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, - u_int16_t *a, bus_size_t c) + uint16_t *a, bus_size_t c) { - for (; c; a++, c--, o+=2) + + for (; c; a++, c--, o += 2) *a = bus_space_read_2(t, h, o); } static __inline void bus_space_read_region_4(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, - u_int32_t *a, bus_size_t c) + uint32_t *a, bus_size_t c) { - for (; c; a++, c--, o+=4) + + for (; c; a++, c--, o += 4) *a = bus_space_read_4(t, h, o); } static __inline void bus_space_read_region_8(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, - u_int64_t *a, bus_size_t c) + uint64_t *a, bus_size_t c) { - for (; c; a++, c--, o+=8) + + for (; c; a++, c--, o += 8) *a = bus_space_read_8(t, h, o); } static __inline void bus_space_write_region_1(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, - const u_int8_t *a, bus_size_t c) + const uint8_t *a, bus_size_t c) { + for (; c; a++, c--, o++) bus_space_write_1(t, h, o, *a); } static __inline void bus_space_write_region_2(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, - const u_int16_t *a, bus_size_t c) + const uint16_t *a, bus_size_t c) { - for (; c; a++, c--, o+=2) + + for (; c; a++, c--, o += 2) bus_space_write_2(t, h, o, *a); } static __inline void bus_space_write_region_4(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, - const u_int32_t *a, bus_size_t c) + const uint32_t *a, bus_size_t c) { - for (; c; a++, c--, o+=4) + + for (; c; a++, c--, o += 4) bus_space_write_4(t, h, o, *a); } static __inline void bus_space_write_region_8(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, - const u_int64_t *a, bus_size_t c) + const uint64_t *a, bus_size_t c) { - for (; c; a++, c--, o+=8) + + for (; c; a++, c--, o += 8) bus_space_write_8(t, h, o, *a); } static __inline void bus_space_set_region_1(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, - const u_int8_t v, bus_size_t c) + const uint8_t v, bus_size_t c) { + for (; c; c--, o++) bus_space_write_1(t, h, o, v); } static __inline void bus_space_set_region_2(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, - const u_int16_t v, bus_size_t c) + const uint16_t v, bus_size_t c) { - for (; c; c--, o+=2) + + for (; c; c--, o += 2) bus_space_write_2(t, h, o, v); } static __inline void bus_space_set_region_4(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, - const u_int32_t v, bus_size_t c) + const uint32_t v, bus_size_t c) { - for (; c; c--, o+=4) + + for (; c; c--, o += 4) bus_space_write_4(t, h, o, v); } static __inline void bus_space_set_region_8(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, - const u_int64_t v, bus_size_t c) + const uint64_t v, bus_size_t c) { - for (; c; c--, o+=8) + + for (; c; c--, o += 8) bus_space_write_8(t, h, o, v); } @@ -486,6 +491,7 @@ static __inline void bus_space_copy_region_1(bus_space_tag_t t, bus_space_handle_t h1, bus_size_t o1, bus_space_handle_t h2, bus_size_t o2, bus_size_t c) { + for (; c; c--, o1++, o2++) bus_space_write_1(t, h1, o1, bus_space_read_1(t, h2, o2)); } @@ -494,7 +500,8 @@ static __inline void bus_space_copy_region_2(bus_space_tag_t t, bus_space_handle_t h1, bus_size_t o1, bus_space_handle_t h2, bus_size_t o2, bus_size_t c) { - for (; c; c--, o1+=2, o2+=2) + + for (; c; c--, o1 += 2, o2 += 2) bus_space_write_2(t, h1, o1, bus_space_read_2(t, h2, o2)); } @@ -502,7 +509,8 @@ static __inline void bus_space_copy_region_4(bus_space_tag_t t, bus_space_handle_t h1, bus_size_t o1, bus_space_handle_t h2, bus_size_t o2, bus_size_t c) { - for (; c; c--, o1+=4, o2+=4) + + for (; c; c--, o1 += 4, o2 += 4) bus_space_write_4(t, h1, o1, bus_space_read_4(t, h2, o2)); } @@ -510,7 +518,8 @@ static __inline void bus_space_copy_region_8(bus_space_tag_t t, bus_space_handle_t h1, bus_size_t o1, bus_space_handle_t h2, bus_size_t o2, bus_size_t c) { - for (; c; c--, o1+=8, o2+=8) + + for (; c; c--, o1 += 8, o2 += 8) bus_space_write_8(t, h1, o1, bus_space_read_8(t, h2, o2)); } @@ -692,7 +701,7 @@ bus_space_set_multi_stream_8(bus_space_t static __inline void bus_space_read_region_stream_1(bus_space_tag_t t, bus_space_handle_t h, - bus_size_t o, u_int8_t *a, bus_size_t c) + bus_size_t o, uint8_t *a, bus_size_t c) { for (; c; a++, c--, o++) @@ -701,34 +710,34 @@ bus_space_read_region_stream_1(bus_space static __inline void bus_space_read_region_stream_2(bus_space_tag_t t, bus_space_handle_t h, - bus_size_t o, u_int16_t *a, bus_size_t c) + bus_size_t o, uint16_t *a, bus_size_t c) { - for (; c; a++, c--, o+=2) + for (; c; a++, c--, o += 2) *a = bus_space_read_stream_2(t, h, o); } static __inline void bus_space_read_region_stream_4(bus_space_tag_t t, bus_space_handle_t h, - bus_size_t o, u_int32_t *a, bus_size_t c) + bus_size_t o, uint32_t *a, bus_size_t c) { - for (; c; a++, c--, o+=4) + for (; c; a++, c--, o += 4) *a = bus_space_read_stream_4(t, h, o); } static __inline void bus_space_read_region_stream_8(bus_space_tag_t t, bus_space_handle_t h, - bus_size_t o, u_int64_t *a, bus_size_t c) + bus_size_t o, uint64_t *a, bus_size_t c) { - for (; c; a++, c--, o+=8) + for (; c; a++, c--, o += 8) *a = bus_space_read_stream_8(t, h, o); } static __inline void bus_space_write_region_stream_1(bus_space_tag_t t, bus_space_handle_t h, - bus_size_t o, const u_int8_t *a, bus_size_t c) + bus_size_t o, const uint8_t *a, bus_size_t c) { for (; c; a++, c--, o++) @@ -737,34 +746,34 @@ bus_space_write_region_stream_1(bus_spac static __inline void bus_space_write_region_stream_2(bus_space_tag_t t, bus_space_handle_t h, - bus_size_t o, const u_int16_t *a, bus_size_t c) + bus_size_t o, const uint16_t *a, bus_size_t c) { - for (; c; a++, c--, o+=2) + for (; c; a++, c--, o += 2) bus_space_write_stream_2(t, h, o, *a); } static __inline void bus_space_write_region_stream_4(bus_space_tag_t t, bus_space_handle_t h, - bus_size_t o, const u_int32_t *a, bus_size_t c) + bus_size_t o, const uint32_t *a, bus_size_t c) { - for (; c; a++, c--, o+=4) + for (; c; a++, c--, o += 4) bus_space_write_stream_4(t, h, o, *a); } static __inline void bus_space_write_region_stream_8(bus_space_tag_t t, bus_space_handle_t h, - bus_size_t o, const u_int64_t *a, bus_size_t c) + bus_size_t o, const uint64_t *a, bus_size_t c) { - for (; c; a++, c--, o+=8) + for (; c; a++, c--, o += 8) bus_space_write_stream_8(t, h, o, *a); } static __inline void bus_space_set_region_stream_1(bus_space_tag_t t, bus_space_handle_t h, - bus_size_t o, const u_int8_t v, bus_size_t c) + bus_size_t o, const uint8_t v, bus_size_t c) { for (; c; c--, o++) @@ -773,28 +782,28 @@ bus_space_set_region_stream_1(bus_space_ static __inline void bus_space_set_region_stream_2(bus_space_tag_t t, bus_space_handle_t h, - bus_size_t o, const u_int16_t v, bus_size_t c) + bus_size_t o, const uint16_t v, bus_size_t c) { - for (; c; c--, o+=2) + for (; c; c--, o += 2) bus_space_write_stream_2(t, h, o, v); } static __inline void bus_space_set_region_stream_4(bus_space_tag_t t, bus_space_handle_t h, - bus_size_t o, const u_int32_t v, bus_size_t c) + bus_size_t o, const uint32_t v, bus_size_t c) { - for (; c; c--, o+=4) + for (; c; c--, o += 4) bus_space_write_stream_4(t, h, o, v); } static __inline void bus_space_set_region_stream_8(bus_space_tag_t t, bus_space_handle_t h, - bus_size_t o, const u_int64_t v, bus_size_t c) + bus_size_t o, const uint64_t v, bus_size_t c) { - for (; c; c--, o+=8) + for (; c; c--, o += 8) bus_space_write_stream_8(t, h, o, v); } @@ -813,7 +822,7 @@ bus_space_copy_region_stream_2(bus_space bus_size_t o1, bus_space_handle_t h2, bus_size_t o2, bus_size_t c) { - for (; c; c--, o1+=2, o2+=2) + for (; c; c--, o1 += 2, o2 += 2) bus_space_write_stream_2(t, h1, o1, bus_space_read_stream_2(t, h2, o2)); } @@ -823,7 +832,7 @@ bus_space_copy_region_stream_4(bus_space bus_size_t o1, bus_space_handle_t h2, bus_size_t o2, bus_size_t c) { - for (; c; c--, o1+=4, o2+=4) + for (; c; c--, o1 += 4, o2 += 4) bus_space_write_stream_4(t, h1, o1, bus_space_read_stream_4(t, h2, o2)); } @@ -833,7 +842,7 @@ bus_space_copy_region_stream_8(bus_space bus_size_t o1, bus_space_handle_t h2, bus_size_t o2, bus_size_t c) { - for (; c; c--, o1+=8, o2+=8) + for (; c; c--, o1 += 8, o2 += 8) bus_space_write_stream_8(t, h1, o1, bus_space_read_8(t, h2, o2)); } From owner-svn-src-all@FreeBSD.ORG Mon Feb 1 13:30:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C0FA106566C; Mon, 1 Feb 2010 13:30:07 +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 5A8DD8FC16; Mon, 1 Feb 2010 13:30:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o11DU7Oq062878; Mon, 1 Feb 2010 13:30:07 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o11DU72V062877; Mon, 1 Feb 2010 13:30:07 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <201002011330.o11DU72V062877@svn.freebsd.org> From: Hajimu UMEMOTO Date: Mon, 1 Feb 2010 13:30:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203342 - head/etc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2010 13:30:07 -0000 Author: ume Date: Mon Feb 1 13:30:06 2010 New Revision: 203342 URL: http://svn.freebsd.org/changeset/base/203342 Log: ManageSieve has been added as port 4190: http://www.iana.org/assignments/port-numbers Obtained from: http://www.iana.org/assignments/port-numbers MFC after: 3 day Modified: head/etc/services Modified: head/etc/services ============================================================================== --- head/etc/services Mon Feb 1 12:43:04 2010 (r203341) +++ head/etc/services Mon Feb 1 13:30:06 2010 (r203342) @@ -2225,6 +2225,8 @@ nuts_dem 4132/tcp #NUTS Daemon nuts_dem 4132/udp #NUTS Daemon nuts_bootp 4133/tcp #NUTS Bootp Server nuts_bootp 4133/udp #NUTS Bootp Server +sieve 4190/tcp #ManageSieve Protocol +sieve 4190/udp #ManageSieve Protocol rwhois 4321/tcp #Remote Who Is rwhois 4321/udp #Remote Who Is unicall 4343/tcp From owner-svn-src-all@FreeBSD.ORG Mon Feb 1 14:13:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D9256106566B; Mon, 1 Feb 2010 14:13:44 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ADA0B8FC0C; Mon, 1 Feb 2010 14:13:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o11EDi01074659; Mon, 1 Feb 2010 14:13:44 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o11EDiPm074656; Mon, 1 Feb 2010 14:13:44 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201002011413.o11EDiPm074656@svn.freebsd.org> From: Luigi Rizzo Date: Mon, 1 Feb 2010 14:13:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203343 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2010 14:13:44 -0000 Author: luigi Date: Mon Feb 1 14:13:44 2010 New Revision: 203343 URL: http://svn.freebsd.org/changeset/base/203343 Log: use u_char instead of u_int for short bitfields. For our compiler the two constructs are completely equivalent, but some compilers (including MSC and tcc) use the base type for alignment, which in the cases touched here result in aligning the bitfields to 32 bit instead of the 8 bit that is meant here. Note that almost all other headers where small bitfields are used have u_int8_t instead of u_int. MFC after: 3 days Modified: head/sys/netinet/ip.h head/sys/netinet/tcp.h Modified: head/sys/netinet/ip.h ============================================================================== --- head/sys/netinet/ip.h Mon Feb 1 13:30:06 2010 (r203342) +++ head/sys/netinet/ip.h Mon Feb 1 14:13:44 2010 (r203343) @@ -48,11 +48,11 @@ */ struct ip { #if BYTE_ORDER == LITTLE_ENDIAN - u_int ip_hl:4, /* header length */ + u_char ip_hl:4, /* header length */ ip_v:4; /* version */ #endif #if BYTE_ORDER == BIG_ENDIAN - u_int ip_v:4, /* version */ + u_char ip_v:4, /* version */ ip_hl:4; /* header length */ #endif u_char ip_tos; /* type of service */ @@ -142,11 +142,11 @@ struct ip_timestamp { u_char ipt_len; /* size of structure (variable) */ u_char ipt_ptr; /* index of current entry */ #if BYTE_ORDER == LITTLE_ENDIAN - u_int ipt_flg:4, /* flags, see below */ + u_char ipt_flg:4, /* flags, see below */ ipt_oflw:4; /* overflow counter */ #endif #if BYTE_ORDER == BIG_ENDIAN - u_int ipt_oflw:4, /* overflow counter */ + u_char ipt_oflw:4, /* overflow counter */ ipt_flg:4; /* flags, see below */ #endif union ipt_timestamp { Modified: head/sys/netinet/tcp.h ============================================================================== --- head/sys/netinet/tcp.h Mon Feb 1 13:30:06 2010 (r203342) +++ head/sys/netinet/tcp.h Mon Feb 1 14:13:44 2010 (r203343) @@ -52,11 +52,11 @@ struct tcphdr { tcp_seq th_seq; /* sequence number */ tcp_seq th_ack; /* acknowledgement number */ #if BYTE_ORDER == LITTLE_ENDIAN - u_int th_x2:4, /* (unused) */ + u_char th_x2:4, /* (unused) */ th_off:4; /* data offset */ #endif #if BYTE_ORDER == BIG_ENDIAN - u_int th_off:4, /* data offset */ + u_char th_off:4, /* data offset */ th_x2:4; /* (unused) */ #endif u_char th_flags; From owner-svn-src-all@FreeBSD.ORG Mon Feb 1 14:49:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B19B0106568F; Mon, 1 Feb 2010 14:49:49 +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 83DC48FC22; Mon, 1 Feb 2010 14:49:49 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 3C89A46B38; Mon, 1 Feb 2010 09:49:49 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 503038A021; Mon, 1 Feb 2010 09:49:48 -0500 (EST) From: John Baldwin To: Robert Noland Date: Mon, 1 Feb 2010 08:18:48 -0500 User-Agent: KMail/1.12.1 (FreeBSD/7.2-CBSD-20100120; KDE/4.3.1; amd64; ; ) References: <201001311435.o0VEZnxi051761@svn.freebsd.org> In-Reply-To: <201001311435.o0VEZnxi051761@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201002010818.48500.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Mon, 01 Feb 2010 09:49:48 -0500 (EST) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.3 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r203289 - head/sys/i386/i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2010 14:49:49 -0000 On Sunday 31 January 2010 9:35:49 am Robert Noland wrote: > Author: rnoland > Date: Sun Jan 31 14:35:49 2010 > New Revision: 203289 > URL: http://svn.freebsd.org/changeset/base/203289 > > Log: > Enable MTRR on all VIA CPUs that claim support. > > This may not be entirely correct either, but the existing check is > bogus. I have both a C3 and a C7 that fail this check, but work fine. > > MFC after: 2 weeks Should this be merged to sys/amd64/amd64/amd64_mem.c as well? -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Feb 1 15:22:22 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ECF8210656A4; Mon, 1 Feb 2010 15:22: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 DB2688FC23; Mon, 1 Feb 2010 15:22:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o11FMMQn092929; Mon, 1 Feb 2010 15:22:22 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o11FMMSw092927; Mon, 1 Feb 2010 15:22:22 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201002011522.o11FMMSw092927@svn.freebsd.org> From: Alexander Motin Date: Mon, 1 Feb 2010 15:22:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203347 - head/sys/dev/ata/chipsets X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2010 15:22:23 -0000 Author: mav Date: Mon Feb 1 15:22:22 2010 New Revision: 203347 URL: http://svn.freebsd.org/changeset/base/203347 Log: NetCell is a PCI hardware RAID without cable and mode setting. Modified: head/sys/dev/ata/chipsets/ata-netcell.c Modified: head/sys/dev/ata/chipsets/ata-netcell.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-netcell.c Mon Feb 1 14:51:11 2010 (r203346) +++ head/sys/dev/ata/chipsets/ata-netcell.c Mon Feb 1 15:22:22 2010 (r203347) @@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$"); /* local prototypes */ static int ata_netcell_chipinit(device_t dev); static int ata_netcell_ch_attach(device_t dev); +static int ata_netcell_setmode(device_t dev, int target, int mode); /* * NetCell chipset support functions @@ -80,7 +81,7 @@ ata_netcell_chipinit(device_t dev) return ENXIO; ctlr->ch_attach = ata_netcell_ch_attach; - ctlr->setmode = ata_generic_setmode; + ctlr->setmode = ata_netcell_setmode; return 0; } @@ -95,7 +96,16 @@ ata_netcell_ch_attach(device_t dev) /* the NetCell only supports 16 bit PIO transfers */ ch->flags |= ATA_USE_16BIT; + /* It is a hardware RAID without cable. */ + ch->flags |= ATA_CHECKS_CABLE; return 0; } +static int +ata_netcell_setmode(device_t dev, int target, int mode) +{ + + return (min(mode, ATA_UDMA6)); +} + ATA_DECLARE_DRIVER(ata_netcell); From owner-svn-src-all@FreeBSD.ORG Mon Feb 1 16:01:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ECCCC1065679; Mon, 1 Feb 2010 16:01:53 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail09.syd.optusnet.com.au (mail09.syd.optusnet.com.au [211.29.132.190]) by mx1.freebsd.org (Postfix) with ESMTP id 66E598FC1D; Mon, 1 Feb 2010 16:01:52 +0000 (UTC) Received: from besplex.bde.org (c122-106-174-165.carlnfd1.nsw.optusnet.com.au [122.106.174.165]) by mail09.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o11G1npt017284 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 2 Feb 2010 03:01:50 +1100 Date: Tue, 2 Feb 2010 03:01:49 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Luigi Rizzo In-Reply-To: <201002011413.o11EDiPm074656@svn.freebsd.org> Message-ID: <20100202012830.B1230@besplex.bde.org> References: <201002011413.o11EDiPm074656@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r203343 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2010 16:01:54 -0000 On Mon, 1 Feb 2010, Luigi Rizzo wrote: > Log: > use u_char instead of u_int for short bitfields. This clobbers my ip.h rev.1.15 and tcp.h rev.1.9 (1998), which fixed the type of these struct members. In C, bit-fields have type _Bool, int, signed int or unsigned int. Other types are unporortable (common extensions; C99 J.5.8). > For our compiler the two constructs are completely equivalent, but > some compilers (including MSC and tcc) use the base type for alignment, > which in the cases touched here result in aligning the bitfields > to 32 bit instead of the 8 bit that is meant here. Not quite true. gcc also uses the base type for alignment, but doesn't document the details AFAIK. The alignment requirements for the base type bogusly affects the alignment of the struct: the struct is padded at the end as if the base type is use for a non-bit-field struct member. Thus sizeof(struct { int8_t m:1; }) == 1; /* on normal 32-bit arches */ sizeof(struct { int16_t m:1; }) == 2; /* on normal 32-bit arches */ sizeof(struct { int_32_t m:1; }) == 4; /* on normal 32-bit arches */ sizeof(struct { int64_t m:1; }) == 8; /* on 64-bit arches */. However, gcc is not so broken as to give this excessive alignment for the bit-fields themselves. Thus sizeof(struct c { char c[3]; int_32_t m:1; }) == 4; The other compilers apparently extend the broken alignment to the bit-fields themselves. This is permitted by C99, but it is unwanted and is especially undesirable since C99 requires the _Bool/int/u_int type and doesn't provide any control over the alignment. C99 doesn't even require the alignment of bitfields to be documented AFAICS. It says that the alignment is "unspecified" (meaning surely that C99 doesn't specify it and not so surely that implementations document it, but implementations should document it). Anyway, the alignment is too MD to depend on, so bit-fields are simply unusable to lay out structs where the layout must be precise. (It is technically impossible to control the layout of a struct even without bit-fields, but only bit-fields are certain to cause problems.) > Note that almost all other headers where small bitfields > are used have u_int8_t instead of u_int. There is a lot of broken code out there, and now a lot in FreeBSD, though I fixed all instances of this bug in FreeBSD GENERIC during 1993-1998. > MFC after: 3 days Backout after: < 3 days. > Modified: > head/sys/netinet/ip.h > head/sys/netinet/tcp.h > > Modified: head/sys/netinet/ip.h > ============================================================================== > --- head/sys/netinet/ip.h Mon Feb 1 13:30:06 2010 (r203342) > +++ head/sys/netinet/ip.h Mon Feb 1 14:13:44 2010 (r203343) > @@ -48,11 +48,11 @@ > */ > struct ip { > #if BYTE_ORDER == LITTLE_ENDIAN > - u_int ip_hl:4, /* header length */ > + u_char ip_hl:4, /* header length */ > ip_v:4; /* version */ > #endif > #if BYTE_ORDER == BIG_ENDIAN > - u_int ip_v:4, /* version */ > + u_char ip_v:4, /* version */ > ip_hl:4; /* header length */ > #endif > u_char ip_tos; /* type of service */ > @@ -142,11 +142,11 @@ struct ip_timestamp { > u_char ipt_len; /* size of structure (variable) */ > u_char ipt_ptr; /* index of current entry */ > #if BYTE_ORDER == LITTLE_ENDIAN > - u_int ipt_flg:4, /* flags, see below */ > + u_char ipt_flg:4, /* flags, see below */ > ipt_oflw:4; /* overflow counter */ > #endif > #if BYTE_ORDER == BIG_ENDIAN > - u_int ipt_oflw:4, /* overflow counter */ > + u_char ipt_oflw:4, /* overflow counter */ > ipt_flg:4; /* flags, see below */ > #endif > union ipt_timestamp { > struct ip normally doesn't cause any problems, since although it doesn't contain any ints which would force its size to a multiple of 4 to satisyf alignment requirements, it happens to have size a multiple of 4 anyway (20). Thus gcc's bogus alignment for the struct doesn't change anything. The other compilers are apparently more broken. It is not easy to fix broken declarations in central headers like this. wollman tried to do it for some of the above in rev.1.7 (IP_VHL), but failed, and the attempt was axed in rev.1.20. Rev.1.20 also introduced related unportability, ugliness and pessimizations for struct ip -- it added the __packed directive. This was spelled unportably using __attribute__ ((); the unportability was fixed in 1.21. Using __packed results in all accesses to members of the struct being done as if the struct has alignment 1. On i386, this is only slightly slower for accessing the shorts in struct ip, but on machines with strict alignment requirements the compiler has to generate slower code to access the shorts a byte at a time and there may be atomicity issues. Rev.1.30 attempted to fix this by also adding the __aligned(4) attribute. I haven't checked that this works. It adds additional unportability and ugliness. Apparently the unportable ugliness of __packed and __aligned is not enough to actually work for the other compilers. If __packed is unavailable, then it should cause a syntax error. If it is available, then it should actually work, and actually working involves not padding the bit-fields. Then __aligned(4) is needed less strongly to clean up the mess from using __packed. > Modified: head/sys/netinet/tcp.h > ============================================================================== > --- head/sys/netinet/tcp.h Mon Feb 1 13:30:06 2010 (r203342) > +++ head/sys/netinet/tcp.h Mon Feb 1 14:13:44 2010 (r203343) > @@ -52,11 +52,11 @@ struct tcphdr { > tcp_seq th_seq; /* sequence number */ > tcp_seq th_ack; /* acknowledgement number */ > #if BYTE_ORDER == LITTLE_ENDIAN > - u_int th_x2:4, /* (unused) */ > + u_char th_x2:4, /* (unused) */ > th_off:4; /* data offset */ > #endif > #if BYTE_ORDER == BIG_ENDIAN > - u_int th_off:4, /* data offset */ > + u_char th_off:4, /* data offset */ > th_x2:4; /* (unused) */ > #endif > u_char th_flags; > struct tcphdr has some uint32_t's in it, so again the bogus gcc alignment has no effect (but things need to be packed even more carefully to avoid padding; fortunately, the wire layout happens to align everything). struct tcphdr hasn't been affected by the __packed/__aligned(4) unportable ugliness. Bruce From owner-svn-src-all@FreeBSD.ORG Mon Feb 1 16:02:14 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E4C5010656A4; Mon, 1 Feb 2010 16:02:14 +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 D26578FC2B; Mon, 1 Feb 2010 16:02:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o11G2EKw003711; Mon, 1 Feb 2010 16:02:14 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o11G2EGh003709; Mon, 1 Feb 2010 16:02:14 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201002011602.o11G2EGh003709@svn.freebsd.org> From: Jaakko Heinonen Date: Mon, 1 Feb 2010 16:02: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: r203348 - stable/8/sbin/mdconfig X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2010 16:02:15 -0000 Author: jh Date: Mon Feb 1 16:02:14 2010 New Revision: 203348 URL: http://svn.freebsd.org/changeset/base/203348 Log: MFC r202573: Print sizes up to INT64_MAX in md_prthumanval(). PR: bin/125365 Approved by: trasz (mentor) Modified: stable/8/sbin/mdconfig/mdconfig.c Directory Properties: stable/8/sbin/mdconfig/ (props changed) Modified: stable/8/sbin/mdconfig/mdconfig.c ============================================================================== --- stable/8/sbin/mdconfig/mdconfig.c Mon Feb 1 15:22:22 2010 (r203347) +++ stable/8/sbin/mdconfig/mdconfig.c Mon Feb 1 16:02:14 2010 (r203348) @@ -454,14 +454,15 @@ static void md_prthumanval(char *length) { char buf[6]; - uint64_t bytes; + uintmax_t bytes; char *endptr; - bytes = strtoul(length, &endptr, 10); - if (bytes == (unsigned)ULONG_MAX || *endptr != '\0') + errno = 0; + bytes = strtoumax(length, &endptr, 10); + if (errno != 0 || *endptr != '\0' || bytes > INT64_MAX) return; - humanize_number(buf, sizeof(buf) - (bytes < 0 ? 0 : 1), - bytes, "", HN_AUTOSCALE, HN_B | HN_NOSPACE | HN_DECIMAL); + humanize_number(buf, sizeof(buf), (int64_t)bytes, "", + HN_AUTOSCALE, HN_B | HN_NOSPACE | HN_DECIMAL); (void)printf("%6s", buf); } From owner-svn-src-all@FreeBSD.ORG Mon Feb 1 16:13:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C5E6D106566B; Mon, 1 Feb 2010 16:13:56 +0000 (UTC) (envelope-from wkoszek@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B3AF48FC0C; Mon, 1 Feb 2010 16:13:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o11GDu7N006534; Mon, 1 Feb 2010 16:13:56 GMT (envelope-from wkoszek@svn.freebsd.org) Received: (from wkoszek@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o11GDu7X006531; Mon, 1 Feb 2010 16:13:56 GMT (envelope-from wkoszek@svn.freebsd.org) Message-Id: <201002011613.o11GDu7X006531@svn.freebsd.org> From: "Wojciech A. Koszek" Date: Mon, 1 Feb 2010 16:13:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203349 - in head/share/examples/kld: cdev/test syscall/test X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2010 16:13:56 -0000 Author: wkoszek Date: Mon Feb 1 16:13:56 2010 New Revision: 203349 URL: http://svn.freebsd.org/changeset/base/203349 Log: Conform style.Makefile(5) and replace = and += with ?=, which lets you to override WARNS. Reported by: and uqs@ Modified: head/share/examples/kld/cdev/test/Makefile head/share/examples/kld/syscall/test/Makefile Modified: head/share/examples/kld/cdev/test/Makefile ============================================================================== --- head/share/examples/kld/cdev/test/Makefile Mon Feb 1 16:02:14 2010 (r203348) +++ head/share/examples/kld/cdev/test/Makefile Mon Feb 1 16:13:56 2010 (r203349) @@ -68,7 +68,7 @@ # PROG= testcdev NO_MAN= -WARNS= 5 +WARNS?= 5 MODSTAT= /sbin/kldstat Modified: head/share/examples/kld/syscall/test/Makefile ============================================================================== --- head/share/examples/kld/syscall/test/Makefile Mon Feb 1 16:02:14 2010 (r203348) +++ head/share/examples/kld/syscall/test/Makefile Mon Feb 1 16:13:56 2010 (r203349) @@ -3,6 +3,6 @@ PROG= call NO_MAN= -WARNS+= 5 +WARNS?= 5 .include From owner-svn-src-all@FreeBSD.ORG Mon Feb 1 17:26:58 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C8ED0106568D; Mon, 1 Feb 2010 17:26:58 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B76F38FC19; Mon, 1 Feb 2010 17:26:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o11HQwaC022637; Mon, 1 Feb 2010 17:26:58 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o11HQwZc022635; Mon, 1 Feb 2010 17:26:58 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201002011726.o11HQwZc022635@svn.freebsd.org> From: Marcel Moolenaar Date: Mon, 1 Feb 2010 17:26:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203350 - head/sys/powerpc/mpc85xx X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2010 17:26:58 -0000 Author: marcel Date: Mon Feb 1 17:26:58 2010 New Revision: 203350 URL: http://svn.freebsd.org/changeset/base/203350 Log: Use the capability pointer to indicate whether the host controller is PCI Express, rather than a bit-field (boolean). Saving the capability pointer this way makes access to capability-specific configuration registers easy and efficient. Modified: head/sys/powerpc/mpc85xx/pci_ocp.c Modified: head/sys/powerpc/mpc85xx/pci_ocp.c ============================================================================== --- head/sys/powerpc/mpc85xx/pci_ocp.c Mon Feb 1 16:13:56 2010 (r203349) +++ head/sys/powerpc/mpc85xx/pci_ocp.c Mon Feb 1 17:26:58 2010 (r203350) @@ -94,7 +94,7 @@ struct pci_ocp_softc { int sc_rid; int sc_busnr; - int sc_pcie:1; + uint8_t sc_pcie_cap; /* Devices that need special attention. */ int sc_devfn_tundra; @@ -168,7 +168,7 @@ pci_ocp_cfgread(struct pci_ocp_softc *sc addr |= (slot & 0x1f) << 11; addr |= (func & 0x7) << 8; addr |= reg & 0xfc; - if (sc->sc_pcie) + if (sc->sc_pcie_cap) addr |= (reg & 0xf00) << 16; bus_space_write_4(sc->sc_bst, sc->sc_bsh, REG_CFG_ADDR, addr); @@ -206,7 +206,7 @@ pci_ocp_cfgwrite(struct pci_ocp_softc *s addr |= (slot & 0x1f) << 11; addr |= (func & 0x7) << 8; addr |= reg & 0xfc; - if (sc->sc_pcie) + if (sc->sc_pcie_cap) addr |= (reg & 0xf00) << 16; bus_space_write_4(sc->sc_bst, sc->sc_bsh, REG_CFG_ADDR, addr); @@ -261,7 +261,7 @@ pci_ocp_maxslots(device_t dev) { struct pci_ocp_softc *sc = device_get_softc(dev); - return ((sc->sc_pcie) ? 0 : 30); + return ((sc->sc_pcie_cap) ? 0 : 30); } static uint32_t @@ -271,7 +271,7 @@ pci_ocp_read_config(device_t dev, u_int struct pci_ocp_softc *sc = device_get_softc(dev); u_int devfn; - if (bus == sc->sc_busnr && !sc->sc_pcie && slot < 10) + if (bus == sc->sc_busnr && !sc->sc_pcie_cap && slot < 10) return (~0); devfn = DEVFN(bus, slot, func); if (devfn == sc->sc_devfn_tundra) @@ -287,7 +287,7 @@ pci_ocp_write_config(device_t dev, u_int { struct pci_ocp_softc *sc = device_get_softc(dev); - if (bus == sc->sc_busnr && !sc->sc_pcie && slot < 10) + if (bus == sc->sc_busnr && !sc->sc_pcie_cap && slot < 10) return; pci_ocp_cfgwrite(sc, bus, slot, func, reg, val, bytes); } @@ -302,6 +302,7 @@ pci_ocp_probe(device_t dev) u_long start, size; uintptr_t devtype; uint32_t cfgreg; + uint8_t capptr; int error; parent = device_get_parent(dev); @@ -341,19 +342,19 @@ pci_ocp_probe(device_t dev) goto out; type = "PCI"; - cfgreg = pci_ocp_cfgread(sc, 0, 0, 0, PCIR_CAP_PTR, 1); - while (cfgreg != 0) { - cfgreg = pci_ocp_cfgread(sc, 0, 0, 0, cfgreg, 2); + capptr = pci_ocp_cfgread(sc, 0, 0, 0, PCIR_CAP_PTR, 1); + while (capptr != 0) { + cfgreg = pci_ocp_cfgread(sc, 0, 0, 0, capptr, 2); switch (cfgreg & 0xff) { case PCIY_PCIX: /* PCI-X */ type = "PCI-X"; break; case PCIY_EXPRESS: /* PCI Express */ type = "PCI Express"; - sc->sc_pcie = 1; + sc->sc_pcie_cap = capptr; break; } - cfgreg = (cfgreg >> 8) & 0xff; + capptr = (cfgreg >> 8) & 0xff; } error = bus_get_resource(dev, SYS_RES_MEMORY, 1, &start, &size); @@ -738,7 +739,7 @@ pci_ocp_attach(device_t dev) sc->sc_devfn_tundra = -1; sc->sc_devfn_via_ide = -1; - maxslot = (sc->sc_pcie) ? 1 : 31; + maxslot = (sc->sc_pcie_cap) ? 1 : 31; pci_ocp_init(sc, sc->sc_busnr, maxslot); device_add_child(dev, "pci", -1); From owner-svn-src-all@FreeBSD.ORG Mon Feb 1 17:36:48 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E13E71065672; Mon, 1 Feb 2010 17:36:48 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D08028FC08; Mon, 1 Feb 2010 17:36:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o11Ham8x024854; Mon, 1 Feb 2010 17:36:48 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o11HamNe024852; Mon, 1 Feb 2010 17:36:48 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201002011736.o11HamNe024852@svn.freebsd.org> From: Alan Cox Date: Mon, 1 Feb 2010 17:36:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203351 - head/sys/i386/i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2010 17:36:49 -0000 Author: alc Date: Mon Feb 1 17:36:48 2010 New Revision: 203351 URL: http://svn.freebsd.org/changeset/base/203351 Log: Change the default value for the flag enabling superpage mapping and promotion to "on". Modified: head/sys/i386/i386/pmap.c Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Mon Feb 1 17:26:58 2010 (r203350) +++ head/sys/i386/i386/pmap.c Mon Feb 1 17:36:48 2010 (r203351) @@ -217,7 +217,7 @@ static int pat_works = 0; /* Is page at SYSCTL_NODE(_vm, OID_AUTO, pmap, CTLFLAG_RD, 0, "VM/pmap parameters"); -static int pg_ps_enabled; +static int pg_ps_enabled = 1; SYSCTL_INT(_vm_pmap, OID_AUTO, pg_ps_enabled, CTLFLAG_RDTUN, &pg_ps_enabled, 0, "Are large page mappings enabled?"); From owner-svn-src-all@FreeBSD.ORG Mon Feb 1 17:48:26 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 43342106566B; Mon, 1 Feb 2010 17:48:26 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id E87F68FC0A; Mon, 1 Feb 2010 17:48:25 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o11Hb9Ng033968; Mon, 1 Feb 2010 10:37:09 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Mon, 01 Feb 2010 10:38:03 -0700 (MST) Message-Id: <20100201.103803.850602504823287588.imp@bsdimp.com> To: brde@optusnet.com.au From: "M. Warner Losh" In-Reply-To: <20100202012830.B1230@besplex.bde.org> References: <201002011413.o11EDiPm074656@svn.freebsd.org> <20100202012830.B1230@besplex.bde.org> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, luigi@FreeBSD.org, src-committers@FreeBSD.org, svn-src-all@FreeBSD.org Subject: Re: svn commit: r203343 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2010 17:48:26 -0000 I concur with Bruce's assessment. Leave well enough alone. We don't support those other compilers in the rest of the tree. In particular, ARM generally gets broken when people naively monkey with these sorts of thing. I'll be quite put-out if this is another such change. Did you test it? Warner In message: <20100202012830.B1230@besplex.bde.org> Bruce Evans writes: : On Mon, 1 Feb 2010, Luigi Rizzo wrote: : : > Log: : > use u_char instead of u_int for short bitfields. : : This clobbers my ip.h rev.1.15 and tcp.h rev.1.9 (1998), which fixed : the type of these struct members. In C, bit-fields have type _Bool, : int, signed int or unsigned int. Other types are unporortable : (common extensions; C99 J.5.8). : : > For our compiler the two constructs are completely equivalent, but : > some compilers (including MSC and tcc) use the base type for : > alignment, : > which in the cases touched here result in aligning the bitfields : > to 32 bit instead of the 8 bit that is meant here. : : Not quite true. gcc also uses the base type for alignment, but : doesn't : document the details AFAIK. The alignment requirements for the base : type : bogusly affects the alignment of the struct: the struct is padded at : the : end as if the base type is use for a non-bit-field struct member. : Thus : : sizeof(struct { int8_t m:1; }) == 1; /* on normal 32-bit arches */ : sizeof(struct { int16_t m:1; }) == 2; /* on normal 32-bit arches */ : sizeof(struct { int_32_t m:1; }) == 4; /* on normal 32-bit arches */ : sizeof(struct { int64_t m:1; }) == 8; /* on 64-bit arches */. : : However, gcc is not so broken as to give this excessive alignment for : the bit-fields themselves. Thus : : sizeof(struct c { char c[3]; int_32_t m:1; }) == 4; : : The other compilers apparently extend the broken alignment to the : bit-fields themselves. This is permitted by C99, but it is unwanted : and is especially undesirable since C99 requires the _Bool/int/u_int : type and doesn't provide any control over the alignment. : : C99 doesn't even require the alignment of bitfields to be documented : AFAICS. It says that the alignment is "unspecified" (meaning surely : that C99 doesn't specify it and not so surely that implementations : document it, but implementations should document it). Anyway, the : alignment is too MD to depend on, so bit-fields are simply unusable : to lay out structs where the layout must be precise. (It is : technically : impossible to control the layout of a struct even without bit-fields, : but only bit-fields are certain to cause problems.) : : > Note that almost all other headers where small bitfields : > are used have u_int8_t instead of u_int. : : There is a lot of broken code out there, and now a lot in FreeBSD, : though : I fixed all instances of this bug in FreeBSD GENERIC during 1993-1998. : : > MFC after: 3 days : : Backout after: < 3 days. : : > Modified: : > head/sys/netinet/ip.h : > head/sys/netinet/tcp.h : > : > Modified: head/sys/netinet/ip.h : > ============================================================================== : > --- head/sys/netinet/ip.h Mon Feb 1 13:30:06 2010 (r203342) : > +++ head/sys/netinet/ip.h Mon Feb 1 14:13:44 2010 (r203343) : > @@ -48,11 +48,11 @@ : > */ : > struct ip { : > #if BYTE_ORDER == LITTLE_ENDIAN : > - u_int ip_hl:4, /* header length */ : > + u_char ip_hl:4, /* header length */ : > ip_v:4; /* version */ : > #endif : > #if BYTE_ORDER == BIG_ENDIAN : > - u_int ip_v:4, /* version */ : > + u_char ip_v:4, /* version */ : > ip_hl:4; /* header length */ : > #endif : > u_char ip_tos; /* type of service */ : > @@ -142,11 +142,11 @@ struct ip_timestamp { : > u_char ipt_len; /* size of structure (variable) */ : > u_char ipt_ptr; /* index of current entry */ : > #if BYTE_ORDER == LITTLE_ENDIAN : > - u_int ipt_flg:4, /* flags, see below */ : > + u_char ipt_flg:4, /* flags, see below */ : > ipt_oflw:4; /* overflow counter */ : > #endif : > #if BYTE_ORDER == BIG_ENDIAN : > - u_int ipt_oflw:4, /* overflow counter */ : > + u_char ipt_oflw:4, /* overflow counter */ : > ipt_flg:4; /* flags, see below */ : > #endif : > union ipt_timestamp { : > : : struct ip normally doesn't cause any problems, since although it : doesn't : contain any ints which would force its size to a multiple of 4 to : satisyf alignment requirements, it happens to have size a multiple of : 4 : anyway (20). Thus gcc's bogus alignment for the struct doesn't change : anything. The other compilers are apparently more broken. : : It is not easy to fix broken declarations in central headers like : this. : wollman tried to do it for some of the above in rev.1.7 (IP_VHL), but : failed, and the attempt was axed in rev.1.20. : : Rev.1.20 also introduced related unportability, ugliness and : pessimizations : for struct ip -- it added the __packed directive. This was spelled : unportably using __attribute__ ((); the unportability was fixed in : 1.21. Using __packed results in all accesses to members of the struct : being done as if the struct has alignment 1. On i386, this is only : slightly slower for accessing the shorts in struct ip, but on machines : with strict alignment requirements the compiler has to generate slower : code to access the shorts a byte at a time and there may be atomicity : issues. : : Rev.1.30 attempted to fix this by also adding the __aligned(4) : attribute. : I haven't checked that this works. It adds additional unportability : and : ugliness. : : Apparently the unportable ugliness of __packed and __aligned is not : enough : to actually work for the other compilers. If __packed is unavailable, : then it should cause a syntax error. If it is available, then it : should : actually work, and actually working involves not padding the : bit-fields. : Then __aligned(4) is needed less strongly to clean up the mess from : using : __packed. : : > Modified: head/sys/netinet/tcp.h : > ============================================================================== : > --- head/sys/netinet/tcp.h Mon Feb 1 13:30:06 2010 (r203342) : > +++ head/sys/netinet/tcp.h Mon Feb 1 14:13:44 2010 (r203343) : > @@ -52,11 +52,11 @@ struct tcphdr { : > tcp_seq th_seq; /* sequence number */ : > tcp_seq th_ack; /* acknowledgement number */ : > #if BYTE_ORDER == LITTLE_ENDIAN : > - u_int th_x2:4, /* (unused) */ : > + u_char th_x2:4, /* (unused) */ : > th_off:4; /* data offset */ : > #endif : > #if BYTE_ORDER == BIG_ENDIAN : > - u_int th_off:4, /* data offset */ : > + u_char th_off:4, /* data offset */ : > th_x2:4; /* (unused) */ : > #endif : > u_char th_flags; : > : : struct tcphdr has some uint32_t's in it, so again the bogus gcc : alignment : has no effect (but things need to be packed even more carefully to : avoid : padding; fortunately, the wire layout happens to align everything). : : struct tcphdr hasn't been affected by the __packed/__aligned(4) : unportable ugliness. : : Bruce : From owner-svn-src-all@FreeBSD.ORG Mon Feb 1 17:51:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B26B4106568D; Mon, 1 Feb 2010 17:51:01 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8835B8FC18; Mon, 1 Feb 2010 17:51:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o11Hp1Np027990; Mon, 1 Feb 2010 17:51:01 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o11Hp1pl027988; Mon, 1 Feb 2010 17:51:01 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201002011751.o11Hp1pl027988@svn.freebsd.org> From: Marcel Moolenaar Date: Mon, 1 Feb 2010 17:51:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203352 - head/sys/powerpc/mpc85xx X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2010 17:51:01 -0000 Author: marcel Date: Mon Feb 1 17:51:01 2010 New Revision: 203352 URL: http://svn.freebsd.org/changeset/base/203352 Log: Make PCI Express host controllers functional, by: 1. checking whether there's a link before initializing devices on the bus. When there's no link any access onto the bus will wedge the CPU. 2. synthesizing the class & subclass so that the host controller appears as a standard PCI bridge, rather than a PowerPC CPU. Modified: head/sys/powerpc/mpc85xx/pci_ocp.c Modified: head/sys/powerpc/mpc85xx/pci_ocp.c ============================================================================== --- head/sys/powerpc/mpc85xx/pci_ocp.c Mon Feb 1 17:36:48 2010 (r203351) +++ head/sys/powerpc/mpc85xx/pci_ocp.c Mon Feb 1 17:51:01 2010 (r203352) @@ -76,6 +76,9 @@ __FBSDID("$FreeBSD$"); #define REG_PIWBEAR(n) (0x0e0c - 0x20 * (n)) #define REG_PIWAR(n) (0x0e10 - 0x20 * (n)) +#define PCIR_FSL_LTSSM 0x404 +#define FSL_LTSSM_L0 0x16 + #define DEVFN(b, s, f) ((b << 16) | (s << 8) | f) struct pci_ocp_softc { @@ -274,6 +277,18 @@ pci_ocp_read_config(device_t dev, u_int if (bus == sc->sc_busnr && !sc->sc_pcie_cap && slot < 10) return (~0); devfn = DEVFN(bus, slot, func); + /* + * For the host controller itself, pretend to be a standard + * PCI bridge, rather than a PowerPC processor. That way the + * generic PCI code will enumerate all subordinate busses + * and devices as usual. + */ + if (sc->sc_pcie_cap && devfn == 0) { + if (reg == PCIR_CLASS && bytes == 1) + return (PCIC_BRIDGE); + if (reg == PCIR_SUBCLASS && bytes == 1) + return (PCIS_BRIDGE_PCI); + } if (devfn == sc->sc_devfn_tundra) return (~0); if (devfn == sc->sc_devfn_via_ide && reg == PCIR_INTPIN) @@ -739,6 +754,17 @@ pci_ocp_attach(device_t dev) sc->sc_devfn_tundra = -1; sc->sc_devfn_via_ide = -1; + /* + * PCI Express host controllers require a link. We don't + * fail the attach if there's no link, but we also don't + * create a child pci(4) device. + */ + if (sc->sc_pcie_cap) { + cfgreg = pci_ocp_cfgread(sc, 0, 0, 0, PCIR_FSL_LTSSM, 4); + if (cfgreg < FSL_LTSSM_L0) + return (0); + } + maxslot = (sc->sc_pcie_cap) ? 1 : 31; pci_ocp_init(sc, sc->sc_busnr, maxslot); From owner-svn-src-all@FreeBSD.ORG Mon Feb 1 17:58:03 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C40F1065693; Mon, 1 Feb 2010 17:58:03 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 2C8E58FC22; Mon, 1 Feb 2010 17:58:03 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o11HigY1034051; Mon, 1 Feb 2010 10:44:42 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Mon, 01 Feb 2010 10:45:37 -0700 (MST) Message-Id: <20100201.104537.578650865272929831.imp@bsdimp.com> To: brde@optusnet.com.au From: "M. Warner Losh" In-Reply-To: <20100202012830.B1230@besplex.bde.org> References: <201002011413.o11EDiPm074656@svn.freebsd.org> <20100202012830.B1230@besplex.bde.org> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, luigi@FreeBSD.org, src-committers@FreeBSD.org, svn-src-all@FreeBSD.org Subject: Re: svn commit: r203343 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2010 17:58:03 -0000 In message: <20100202012830.B1230@besplex.bde.org> Bruce Evans writes: : Rev.1.30 attempted to fix this by also adding the __aligned(4) : attribute. : I haven't checked that this works. It adds additional unportability : and : ugliness. __packed is necessary for ARM where the rules of the ABI we use are such that this structure isn't properly packed otherwise.[*] __aligned(4) tells the compiler that pointers to this structure are 4-byte aligned, which helps on many platforms generate more optimal code. The root cause of all this mess is that 'C' doesn't have any good, easy ways to specify "on the wire" formats of structures. So we have to play these games to make the headers we snarfed off the wire match the C structs that we're using to access the fields in those structures. We are necessarily in unportability land here. It is only by the chance alignment of the x86 ABI and the wire format that the project was able to ignore the issue for so long... Warner [*] Of course, it could be argued that ARM should use a different and/or better ABI for newer cores, and I'd agree with that... But until that's fixed, we have to cope. From owner-svn-src-all@FreeBSD.ORG Mon Feb 1 18:27:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 61411106568B; Mon, 1 Feb 2010 18:27:19 +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 503548FC15; Mon, 1 Feb 2010 18:27:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o11IRJbp037193; Mon, 1 Feb 2010 18:27:19 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o11IRJva037191; Mon, 1 Feb 2010 18:27:19 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201002011827.o11IRJva037191@svn.freebsd.org> From: John Baldwin Date: Mon, 1 Feb 2010 18:27:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203353 - stable/7/sys/dev/e1000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2010 18:27:19 -0000 Author: jhb Date: Mon Feb 1 18:27:19 2010 New Revision: 203353 URL: http://svn.freebsd.org/changeset/base/203353 Log: MFC: Disable the alignment restrictions in the bus dma tags for RX and TX buffers. Recent fixes to bus dma exposed a bug somewhere (igb?) that caused igb(4) to no longer receive packets without this change. Approved by: re (kib) Modified: stable/7/sys/dev/e1000/if_igb.c Modified: stable/7/sys/dev/e1000/if_igb.c ============================================================================== --- stable/7/sys/dev/e1000/if_igb.c Mon Feb 1 17:51:01 2010 (r203352) +++ stable/7/sys/dev/e1000/if_igb.c Mon Feb 1 18:27:19 2010 (r203353) @@ -2767,7 +2767,7 @@ igb_allocate_transmit_buffers(struct tx_ * Setup DMA descriptor areas. */ if ((error = bus_dma_tag_create(NULL, /* parent */ - PAGE_SIZE, 0, /* alignment, bounds */ + 1, 0, /* alignment, bounds */ BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ @@ -3392,7 +3392,7 @@ igb_allocate_receive_buffers(struct rx_r } if ((error = bus_dma_tag_create(NULL, /* parent */ - PAGE_SIZE, 0, /* alignment, bounds */ + 1, 0, /* alignment, bounds */ BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ From owner-svn-src-all@FreeBSD.ORG Mon Feb 1 18:30:48 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 37A521065679; Mon, 1 Feb 2010 18:30:48 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id A3FD78FC26; Mon, 1 Feb 2010 18:30:47 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id EA111730A1; Mon, 1 Feb 2010 19:39:23 +0100 (CET) Date: Mon, 1 Feb 2010 19:39:23 +0100 From: Luigi Rizzo To: "M. Warner Losh" Message-ID: <20100201183923.GA32901@onelab2.iet.unipi.it> References: <201002011413.o11EDiPm074656@svn.freebsd.org> <20100202012830.B1230@besplex.bde.org> <20100201.103803.850602504823287588.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100201.103803.850602504823287588.imp@bsdimp.com> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@FreeBSD.org, luigi@FreeBSD.org, src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, brde@optusnet.com.au Subject: Re: svn commit: r203343 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2010 18:30:48 -0000 On Mon, Feb 01, 2010 at 10:38:03AM -0700, M. Warner Losh wrote: > I concur with Bruce's assessment. Leave well enough alone. We don't > support those other compilers in the rest of the tree. These are userland-visible system headers so the change is not for building the system but for building generic userland programs on FreeBSD with other compilers. This said (sorry, i did not yet see Bruce's comment except in your email) if i understand Bruce's comment well, the problem is that no matter how we code it, bitfield layout is non specified, and we need non-portable __packed and __align and actual verification that things work as we want with a given compiler. > In particular, ARM generally gets broken when people naively monkey > with these sorts of thing. I'll be quite put-out if this is another > such change. Did you test it? No i did not test it on ARM. But i cannot think how a compiler would pack a u_int bitfield to 1 byte and refuse to do the same with an u_char (or uint8_t if you like it better). At a quick test, bitfields declared using u_char or *int8_t grep -Er 'int8_t|u_char' ~/FreeBSD/head/sys | grep ':[1-9]' | grep -v .svn appear approximately 800 times in 60 files including a number of device drivers, sys/dev/ciss/cissreg.h, sys/dev/ciss/cissio.h, sys/dev/usb/usbdi.h and stuff that might be arm-related e.g. sys/dev/usb/controller/avr32dci.h sys/dev/usb/controller/atmegadci.h On these grounds (we already have 800 such instances, and my changes are meant to improve compatibility of our system) I'd like the changes to remain (possibly replacing u_char with uint8_t if that looks better). cheers luigi > Warner > > In message: <20100202012830.B1230@besplex.bde.org> > Bruce Evans writes: > : On Mon, 1 Feb 2010, Luigi Rizzo wrote: > : > : > Log: > : > use u_char instead of u_int for short bitfields. > : > : This clobbers my ip.h rev.1.15 and tcp.h rev.1.9 (1998), which fixed > : the type of these struct members. In C, bit-fields have type _Bool, > : int, signed int or unsigned int. Other types are unporortable > : (common extensions; C99 J.5.8). > : > : > For our compiler the two constructs are completely equivalent, but > : > some compilers (including MSC and tcc) use the base type for > : > alignment, > : > which in the cases touched here result in aligning the bitfields > : > to 32 bit instead of the 8 bit that is meant here. > : > : Not quite true. gcc also uses the base type for alignment, but > : doesn't > : document the details AFAIK. The alignment requirements for the base > : type > : bogusly affects the alignment of the struct: the struct is padded at > : the > : end as if the base type is use for a non-bit-field struct member. > : Thus > : > : sizeof(struct { int8_t m:1; }) == 1; /* on normal 32-bit arches */ > : sizeof(struct { int16_t m:1; }) == 2; /* on normal 32-bit arches */ > : sizeof(struct { int_32_t m:1; }) == 4; /* on normal 32-bit arches */ > : sizeof(struct { int64_t m:1; }) == 8; /* on 64-bit arches */. > : > : However, gcc is not so broken as to give this excessive alignment for > : the bit-fields themselves. Thus > : > : sizeof(struct c { char c[3]; int_32_t m:1; }) == 4; > : > : The other compilers apparently extend the broken alignment to the > : bit-fields themselves. This is permitted by C99, but it is unwanted > : and is especially undesirable since C99 requires the _Bool/int/u_int > : type and doesn't provide any control over the alignment. > : > : C99 doesn't even require the alignment of bitfields to be documented > : AFAICS. It says that the alignment is "unspecified" (meaning surely > : that C99 doesn't specify it and not so surely that implementations > : document it, but implementations should document it). Anyway, the > : alignment is too MD to depend on, so bit-fields are simply unusable > : to lay out structs where the layout must be precise. (It is > : technically > : impossible to control the layout of a struct even without bit-fields, > : but only bit-fields are certain to cause problems.) > : > : > Note that almost all other headers where small bitfields > : > are used have u_int8_t instead of u_int. > : > : There is a lot of broken code out there, and now a lot in FreeBSD, > : though > : I fixed all instances of this bug in FreeBSD GENERIC during 1993-1998. > : > : > MFC after: 3 days > : > : Backout after: < 3 days. > : > : > Modified: > : > head/sys/netinet/ip.h > : > head/sys/netinet/tcp.h > : > > : > Modified: head/sys/netinet/ip.h > : > ============================================================================== > : > --- head/sys/netinet/ip.h Mon Feb 1 13:30:06 2010 (r203342) > : > +++ head/sys/netinet/ip.h Mon Feb 1 14:13:44 2010 (r203343) > : > @@ -48,11 +48,11 @@ > : > */ > : > struct ip { > : > #if BYTE_ORDER == LITTLE_ENDIAN > : > - u_int ip_hl:4, /* header length */ > : > + u_char ip_hl:4, /* header length */ > : > ip_v:4; /* version */ > : > #endif > : > #if BYTE_ORDER == BIG_ENDIAN > : > - u_int ip_v:4, /* version */ > : > + u_char ip_v:4, /* version */ > : > ip_hl:4; /* header length */ > : > #endif > : > u_char ip_tos; /* type of service */ > : > @@ -142,11 +142,11 @@ struct ip_timestamp { > : > u_char ipt_len; /* size of structure (variable) */ > : > u_char ipt_ptr; /* index of current entry */ > : > #if BYTE_ORDER == LITTLE_ENDIAN > : > - u_int ipt_flg:4, /* flags, see below */ > : > + u_char ipt_flg:4, /* flags, see below */ > : > ipt_oflw:4; /* overflow counter */ > : > #endif > : > #if BYTE_ORDER == BIG_ENDIAN > : > - u_int ipt_oflw:4, /* overflow counter */ > : > + u_char ipt_oflw:4, /* overflow counter */ > : > ipt_flg:4; /* flags, see below */ > : > #endif > : > union ipt_timestamp { > : > > : > : struct ip normally doesn't cause any problems, since although it > : doesn't > : contain any ints which would force its size to a multiple of 4 to > : satisyf alignment requirements, it happens to have size a multiple of > : 4 > : anyway (20). Thus gcc's bogus alignment for the struct doesn't change > : anything. The other compilers are apparently more broken. > : > : It is not easy to fix broken declarations in central headers like > : this. > : wollman tried to do it for some of the above in rev.1.7 (IP_VHL), but > : failed, and the attempt was axed in rev.1.20. > : > : Rev.1.20 also introduced related unportability, ugliness and > : pessimizations > : for struct ip -- it added the __packed directive. This was spelled > : unportably using __attribute__ ((); the unportability was fixed in > : 1.21. Using __packed results in all accesses to members of the struct > : being done as if the struct has alignment 1. On i386, this is only > : slightly slower for accessing the shorts in struct ip, but on machines > : with strict alignment requirements the compiler has to generate slower > : code to access the shorts a byte at a time and there may be atomicity > : issues. > : > : Rev.1.30 attempted to fix this by also adding the __aligned(4) > : attribute. > : I haven't checked that this works. It adds additional unportability > : and > : ugliness. > : > : Apparently the unportable ugliness of __packed and __aligned is not > : enough > : to actually work for the other compilers. If __packed is unavailable, > : then it should cause a syntax error. If it is available, then it > : should > : actually work, and actually working involves not padding the > : bit-fields. > : Then __aligned(4) is needed less strongly to clean up the mess from > : using > : __packed. > : > : > Modified: head/sys/netinet/tcp.h > : > ============================================================================== > : > --- head/sys/netinet/tcp.h Mon Feb 1 13:30:06 2010 (r203342) > : > +++ head/sys/netinet/tcp.h Mon Feb 1 14:13:44 2010 (r203343) > : > @@ -52,11 +52,11 @@ struct tcphdr { > : > tcp_seq th_seq; /* sequence number */ > : > tcp_seq th_ack; /* acknowledgement number */ > : > #if BYTE_ORDER == LITTLE_ENDIAN > : > - u_int th_x2:4, /* (unused) */ > : > + u_char th_x2:4, /* (unused) */ > : > th_off:4; /* data offset */ > : > #endif > : > #if BYTE_ORDER == BIG_ENDIAN > : > - u_int th_off:4, /* data offset */ > : > + u_char th_off:4, /* data offset */ > : > th_x2:4; /* (unused) */ > : > #endif > : > u_char th_flags; > : > > : > : struct tcphdr has some uint32_t's in it, so again the bogus gcc > : alignment > : has no effect (but things need to be packed even more carefully to > : avoid > : padding; fortunately, the wire layout happens to align everything). > : > : struct tcphdr hasn't been affected by the __packed/__aligned(4) > : unportable ugliness. > : > : Bruce > : From owner-svn-src-all@FreeBSD.ORG Mon Feb 1 19:13:11 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4124A106568D; Mon, 1 Feb 2010 19:13:11 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id C6B348FC3F; Mon, 1 Feb 2010 19:13:10 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o11J2EUU035179; Mon, 1 Feb 2010 12:02:14 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Mon, 01 Feb 2010 12:03:07 -0700 (MST) Message-Id: <20100201.120307.4959786928951104.imp@bsdimp.com> To: rizzo@iet.unipi.it From: "M. Warner Losh" In-Reply-To: <20100201183923.GA32901@onelab2.iet.unipi.it> References: <20100202012830.B1230@besplex.bde.org> <20100201.103803.850602504823287588.imp@bsdimp.com> <20100201183923.GA32901@onelab2.iet.unipi.it> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, luigi@FreeBSD.org, src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, brde@optusnet.com.au Subject: Re: svn commit: r203343 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2010 19:13:11 -0000 In message: <20100201183923.GA32901@onelab2.iet.unipi.it> Luigi Rizzo writes: : On Mon, Feb 01, 2010 at 10:38:03AM -0700, M. Warner Losh wrote: : > I concur with Bruce's assessment. Leave well enough alone. We don't : > support those other compilers in the rest of the tree. : : These are userland-visible system headers so the change is not for : building the system but for building generic userland programs on : FreeBSD with other compilers. : : This said (sorry, i did not yet see Bruce's comment except in your : email) if i understand Bruce's comment well, the problem is that : no matter how we code it, bitfield layout is non specified, and we : need non-portable __packed and __align and actual verification : that things work as we want with a given compiler. Yes. The brief version is that the we're trying to capture the wire format in C, which provides no native way of doing that. The different byte ordering ifdefs, as well as the __packed and __aligned stuff tries to cope in a way we hope is the best. But my comment about not supporting these compilers is still relevant, I think. We have special code in sys/defs.h to support the compilers we do... So if we don't support the compiler the __packed and __aligned macros are just defined away... : > In particular, ARM generally gets broken when people naively monkey : > with these sorts of thing. I'll be quite put-out if this is another : > such change. Did you test it? : : No i did not test it on ARM. But i cannot think how a compiler : would pack a u_int bitfield to 1 byte and refuse to do the same : with an u_char (or uint8_t if you like it better). Right. I cannot think of how the current ARM ABI does some of the things that it does. : At a quick test, bitfields declared using u_char or *int8_t : : grep -Er 'int8_t|u_char' ~/FreeBSD/head/sys | grep ':[1-9]' | grep -v .svn : : appear approximately 800 times in 60 files including a number of : device drivers, sys/dev/ciss/cissreg.h, sys/dev/ciss/cissio.h, ciss isn't known to work on ARM... : sys/dev/usb/usbdi.h and stuff that might be arm-related e.g. : sys/dev/usb/controller/avr32dci.h sys/dev/usb/controller/atmegadci.h but these are... : On these grounds (we already have 800 such instances, and my : changes are meant to improve compatibility of our system) : I'd like the changes to remain (possibly replacing u_char with : uint8_t if that looks better). I'd like to at least verify that ARM works by actually testing it rather than just speculating that it likely is OK. I'll queue up a build or two to make sure. My main concern here is to make sure that things work, and we've had better luck with u_int to date... Warner : cheers : luigi : : : > Warner : > : > In message: <20100202012830.B1230@besplex.bde.org> : > Bruce Evans writes: : > : On Mon, 1 Feb 2010, Luigi Rizzo wrote: : > : : > : > Log: : > : > use u_char instead of u_int for short bitfields. : > : : > : This clobbers my ip.h rev.1.15 and tcp.h rev.1.9 (1998), which fixed : > : the type of these struct members. In C, bit-fields have type _Bool, : > : int, signed int or unsigned int. Other types are unporortable : > : (common extensions; C99 J.5.8). : > : : > : > For our compiler the two constructs are completely equivalent, but : > : > some compilers (including MSC and tcc) use the base type for : > : > alignment, : > : > which in the cases touched here result in aligning the bitfields : > : > to 32 bit instead of the 8 bit that is meant here. : > : : > : Not quite true. gcc also uses the base type for alignment, but : > : doesn't : > : document the details AFAIK. The alignment requirements for the base : > : type : > : bogusly affects the alignment of the struct: the struct is padded at : > : the : > : end as if the base type is use for a non-bit-field struct member. : > : Thus : > : : > : sizeof(struct { int8_t m:1; }) == 1; /* on normal 32-bit arches */ : > : sizeof(struct { int16_t m:1; }) == 2; /* on normal 32-bit arches */ : > : sizeof(struct { int_32_t m:1; }) == 4; /* on normal 32-bit arches */ : > : sizeof(struct { int64_t m:1; }) == 8; /* on 64-bit arches */. : > : : > : However, gcc is not so broken as to give this excessive alignment for : > : the bit-fields themselves. Thus : > : : > : sizeof(struct c { char c[3]; int_32_t m:1; }) == 4; : > : : > : The other compilers apparently extend the broken alignment to the : > : bit-fields themselves. This is permitted by C99, but it is unwanted : > : and is especially undesirable since C99 requires the _Bool/int/u_int : > : type and doesn't provide any control over the alignment. : > : : > : C99 doesn't even require the alignment of bitfields to be documented : > : AFAICS. It says that the alignment is "unspecified" (meaning surely : > : that C99 doesn't specify it and not so surely that implementations : > : document it, but implementations should document it). Anyway, the : > : alignment is too MD to depend on, so bit-fields are simply unusable : > : to lay out structs where the layout must be precise. (It is : > : technically : > : impossible to control the layout of a struct even without bit-fields, : > : but only bit-fields are certain to cause problems.) : > : : > : > Note that almost all other headers where small bitfields : > : > are used have u_int8_t instead of u_int. : > : : > : There is a lot of broken code out there, and now a lot in FreeBSD, : > : though : > : I fixed all instances of this bug in FreeBSD GENERIC during 1993-1998. : > : : > : > MFC after: 3 days : > : : > : Backout after: < 3 days. : > : : > : > Modified: : > : > head/sys/netinet/ip.h : > : > head/sys/netinet/tcp.h : > : > : > : > Modified: head/sys/netinet/ip.h : > : > ============================================================================== : > : > --- head/sys/netinet/ip.h Mon Feb 1 13:30:06 2010 (r203342) : > : > +++ head/sys/netinet/ip.h Mon Feb 1 14:13:44 2010 (r203343) : > : > @@ -48,11 +48,11 @@ : > : > */ : > : > struct ip { : > : > #if BYTE_ORDER == LITTLE_ENDIAN : > : > - u_int ip_hl:4, /* header length */ : > : > + u_char ip_hl:4, /* header length */ : > : > ip_v:4; /* version */ : > : > #endif : > : > #if BYTE_ORDER == BIG_ENDIAN : > : > - u_int ip_v:4, /* version */ : > : > + u_char ip_v:4, /* version */ : > : > ip_hl:4; /* header length */ : > : > #endif : > : > u_char ip_tos; /* type of service */ : > : > @@ -142,11 +142,11 @@ struct ip_timestamp { : > : > u_char ipt_len; /* size of structure (variable) */ : > : > u_char ipt_ptr; /* index of current entry */ : > : > #if BYTE_ORDER == LITTLE_ENDIAN : > : > - u_int ipt_flg:4, /* flags, see below */ : > : > + u_char ipt_flg:4, /* flags, see below */ : > : > ipt_oflw:4; /* overflow counter */ : > : > #endif : > : > #if BYTE_ORDER == BIG_ENDIAN : > : > - u_int ipt_oflw:4, /* overflow counter */ : > : > + u_char ipt_oflw:4, /* overflow counter */ : > : > ipt_flg:4; /* flags, see below */ : > : > #endif : > : > union ipt_timestamp { : > : > : > : : > : struct ip normally doesn't cause any problems, since although it : > : doesn't : > : contain any ints which would force its size to a multiple of 4 to : > : satisyf alignment requirements, it happens to have size a multiple of : > : 4 : > : anyway (20). Thus gcc's bogus alignment for the struct doesn't change : > : anything. The other compilers are apparently more broken. : > : : > : It is not easy to fix broken declarations in central headers like : > : this. : > : wollman tried to do it for some of the above in rev.1.7 (IP_VHL), but : > : failed, and the attempt was axed in rev.1.20. : > : : > : Rev.1.20 also introduced related unportability, ugliness and : > : pessimizations : > : for struct ip -- it added the __packed directive. This was spelled : > : unportably using __attribute__ ((); the unportability was fixed in : > : 1.21. Using __packed results in all accesses to members of the struct : > : being done as if the struct has alignment 1. On i386, this is only : > : slightly slower for accessing the shorts in struct ip, but on machines : > : with strict alignment requirements the compiler has to generate slower : > : code to access the shorts a byte at a time and there may be atomicity : > : issues. : > : : > : Rev.1.30 attempted to fix this by also adding the __aligned(4) : > : attribute. : > : I haven't checked that this works. It adds additional unportability : > : and : > : ugliness. : > : : > : Apparently the unportable ugliness of __packed and __aligned is not : > : enough : > : to actually work for the other compilers. If __packed is unavailable, : > : then it should cause a syntax error. If it is available, then it : > : should : > : actually work, and actually working involves not padding the : > : bit-fields. : > : Then __aligned(4) is needed less strongly to clean up the mess from : > : using : > : __packed. : > : : > : > Modified: head/sys/netinet/tcp.h : > : > ============================================================================== : > : > --- head/sys/netinet/tcp.h Mon Feb 1 13:30:06 2010 (r203342) : > : > +++ head/sys/netinet/tcp.h Mon Feb 1 14:13:44 2010 (r203343) : > : > @@ -52,11 +52,11 @@ struct tcphdr { : > : > tcp_seq th_seq; /* sequence number */ : > : > tcp_seq th_ack; /* acknowledgement number */ : > : > #if BYTE_ORDER == LITTLE_ENDIAN : > : > - u_int th_x2:4, /* (unused) */ : > : > + u_char th_x2:4, /* (unused) */ : > : > th_off:4; /* data offset */ : > : > #endif : > : > #if BYTE_ORDER == BIG_ENDIAN : > : > - u_int th_off:4, /* data offset */ : > : > + u_char th_off:4, /* data offset */ : > : > th_x2:4; /* (unused) */ : > : > #endif : > : > u_char th_flags; : > : > : > : : > : struct tcphdr has some uint32_t's in it, so again the bogus gcc : > : alignment : > : has no effect (but things need to be packed even more carefully to : > : avoid : > : padding; fortunately, the wire layout happens to align everything). : > : : > : struct tcphdr hasn't been affected by the __packed/__aligned(4) : > : unportable ugliness. : > : : > : Bruce : > : : : From owner-svn-src-all@FreeBSD.ORG Mon Feb 1 19:25:45 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 24FE6106568B; Mon, 1 Feb 2010 19:25:45 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id A62B18FC0A; Mon, 1 Feb 2010 19:25:44 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 775D6730A1; Mon, 1 Feb 2010 20:34:22 +0100 (CET) Date: Mon, 1 Feb 2010 20:34:22 +0100 From: Luigi Rizzo To: "M. Warner Losh" Message-ID: <20100201193422.GA33864@onelab2.iet.unipi.it> References: <20100202012830.B1230@besplex.bde.org> <20100201.103803.850602504823287588.imp@bsdimp.com> <20100201183923.GA32901@onelab2.iet.unipi.it> <20100201.120307.4959786928951104.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100201.120307.4959786928951104.imp@bsdimp.com> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@FreeBSD.org, luigi@FreeBSD.org, src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, brde@optusnet.com.au Subject: Re: svn commit: r203343 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2010 19:25:45 -0000 On Mon, Feb 01, 2010 at 12:03:07PM -0700, M. Warner Losh wrote: > In message: <20100201183923.GA32901@onelab2.iet.unipi.it> > Luigi Rizzo writes: > : On Mon, Feb 01, 2010 at 10:38:03AM -0700, M. Warner Losh wrote: > : > I concur with Bruce's assessment. Leave well enough alone. We don't > : > support those other compilers in the rest of the tree. > : > : These are userland-visible system headers so the change is not for > : building the system but for building generic userland programs on > : FreeBSD with other compilers. > : > : This said (sorry, i did not yet see Bruce's comment except in your > : email) if i understand Bruce's comment well, the problem is that > : no matter how we code it, bitfield layout is non specified, and we > : need non-portable __packed and __align and actual verification > : that things work as we want with a given compiler. > > Yes. The brief version is that the we're trying to capture the wire > format in C, which provides no native way of doing that. The > different byte ordering ifdefs, as well as the __packed and __aligned > stuff tries to cope in a way we hope is the best. > > But my comment about not supporting these compilers is still relevant, > I think. ... not 100% sure. > I think. We have special code in sys/defs.h to support the compilers > we do... So if we don't support the compiler the __packed and > __aligned macros are just defined away... yes and no > : > In particular, ARM generally gets broken when people naively monkey > : > with these sorts of thing. I'll be quite put-out if this is another > : > such change. Did you test it? > : > : No i did not test it on ARM. But i cannot think how a compiler > : would pack a u_int bitfield to 1 byte and refuse to do the same > : with an u_char (or uint8_t if you like it better). > > Right. I cannot think of how the current ARM ABI does some of the > things that it does. fair enough. I realize i myself said that we need "actual verification that things work as we want with a given compiler" but did not go further after the 'grep' below returnes so many relevant hits. > : At a quick test, bitfields declared using u_char or *int8_t > : > : grep -Er 'int8_t|u_char' ~/FreeBSD/head/sys | grep ':[1-9]' | grep -v .svn > : > : appear approximately 800 times in 60 files including a number of > : device drivers, sys/dev/ciss/cissreg.h, sys/dev/ciss/cissio.h, > > ciss isn't known to work on ARM... > > : sys/dev/usb/usbdi.h and stuff that might be arm-related e.g. > : sys/dev/usb/controller/avr32dci.h sys/dev/usb/controller/atmegadci.h > > but these are... > > : On these grounds (we already have 800 such instances, and my > : changes are meant to improve compatibility of our system) > : I'd like the changes to remain (possibly replacing u_char with > : uint8_t if that looks better). > > I'd like to at least verify that ARM works by actually testing it > rather than just speculating that it likely is OK. I'll queue up a > build or two to make sure. thanks a lot. > My main concern here is to make sure that things work, and we've had > better luck with u_int to date... i cannot comment on this -- certainly this specific change 12-15 years ago did not seem to be made to fix actual breakage. cheers luigi From owner-svn-src-all@FreeBSD.ORG Mon Feb 1 19:28:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 45256106568F; Mon, 1 Feb 2010 19:28:44 +0000 (UTC) (envelope-from jfv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 348DC8FC13; Mon, 1 Feb 2010 19:28:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o11JSiAb050726; Mon, 1 Feb 2010 19:28:44 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o11JSihs050723; Mon, 1 Feb 2010 19:28:44 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <201002011928.o11JSihs050723@svn.freebsd.org> From: Jack F Vogel Date: Mon, 1 Feb 2010 19:28:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203354 - head/sys/dev/e1000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2010 19:28:44 -0000 Author: jfv Date: Mon Feb 1 19:28:43 2010 New Revision: 203354 URL: http://svn.freebsd.org/changeset/base/203354 Log: A few minor changes: add altq option header, add missing conditional around a buf_ring call that will break 7.3, and thanks to Fabien Thomas add POLLING support for igb and a minor related fix in the em driver. Modified: head/sys/dev/e1000/if_em.c head/sys/dev/e1000/if_igb.c Modified: head/sys/dev/e1000/if_em.c ============================================================================== --- head/sys/dev/e1000/if_em.c Mon Feb 1 18:27:19 2010 (r203353) +++ head/sys/dev/e1000/if_em.c Mon Feb 1 19:28:43 2010 (r203354) @@ -35,6 +35,7 @@ #ifdef HAVE_KERNEL_OPTION_HEADERS #include "opt_device_polling.h" #include "opt_inet.h" +#include "opt_altq.h" #endif #include @@ -1545,13 +1546,13 @@ em_poll(struct ifnet *ifp, enum poll_cmd if (cmd == POLL_AND_CHECK_STATUS) { reg_icr = E1000_READ_REG(&adapter->hw, E1000_ICR); + /* Link status change */ if (reg_icr & (E1000_ICR_RXSEQ | E1000_ICR_LSC)) { - callout_stop(&adapter->timer); adapter->hw.mac.get_link_status = 1; em_update_link_status(adapter); - callout_reset(&adapter->timer, hz, - em_local_timer, adapter); } + if (reg_icr & E1000_ICR_RXO) + adapter->rx_overruns++; } EM_CORE_UNLOCK(adapter); Modified: head/sys/dev/e1000/if_igb.c ============================================================================== --- head/sys/dev/e1000/if_igb.c Mon Feb 1 18:27:19 2010 (r203353) +++ head/sys/dev/e1000/if_igb.c Mon Feb 1 19:28:43 2010 (r203354) @@ -36,6 +36,7 @@ #ifdef HAVE_KERNEL_OPTION_HEADERS #include "opt_device_polling.h" #include "opt_inet.h" +#include "opt_altq.h" #endif #include @@ -250,6 +251,10 @@ static void igb_handle_link(void *contex static void igb_msix_que(void *); static void igb_msix_link(void *); +#ifdef DEVICE_POLLING +static poll_handler_t igb_poll; +#endif /* POLLING */ + /********************************************************************* * FreeBSD Device Interface Entry Points *********************************************************************/ @@ -624,6 +629,11 @@ igb_detach(device_t dev) return (EBUSY); } +#ifdef DEVICE_POLLING + if (ifp->if_capenable & IFCAP_POLLING) + ether_poll_deregister(ifp); +#endif + IGB_CORE_LOCK(adapter); adapter->in_detach = 1; igb_stop(adapter); @@ -974,6 +984,9 @@ igb_ioctl(struct ifnet *ifp, u_long comm IGB_CORE_LOCK(adapter); igb_disable_intr(adapter); igb_set_multi(adapter); +#ifdef DEVICE_POLLING + if (!(ifp->if_capenable & IFCAP_POLLING)) +#endif igb_enable_intr(adapter); IGB_CORE_UNLOCK(adapter); } @@ -1000,6 +1013,26 @@ igb_ioctl(struct ifnet *ifp, u_long comm IOCTL_DEBUGOUT("ioctl rcv'd: SIOCSIFCAP (Set Capabilities)"); reinit = 0; mask = ifr->ifr_reqcap ^ ifp->if_capenable; +#ifdef DEVICE_POLLING + if (mask & IFCAP_POLLING) { + if (ifr->ifr_reqcap & IFCAP_POLLING) { + error = ether_poll_register(igb_poll, ifp); + if (error) + return (error); + IGB_CORE_LOCK(adapter); + igb_disable_intr(adapter); + ifp->if_capenable |= IFCAP_POLLING; + IGB_CORE_UNLOCK(adapter); + } else { + error = ether_poll_deregister(ifp); + /* Enable interrupt even in error case */ + IGB_CORE_LOCK(adapter); + igb_enable_intr(adapter); + ifp->if_capenable &= ~IFCAP_POLLING; + IGB_CORE_UNLOCK(adapter); + } + } +#endif if (mask & IFCAP_HWCSUM) { ifp->if_capenable ^= IFCAP_HWCSUM; reinit = 1; @@ -1123,8 +1156,19 @@ igb_init_locked(struct adapter *adapter) /* this clears any pending interrupts */ E1000_READ_REG(&adapter->hw, E1000_ICR); +#ifdef DEVICE_POLLING + /* + * Only enable interrupts if we are not polling, make sure + * they are off otherwise. + */ + if (ifp->if_capenable & IFCAP_POLLING) + igb_disable_intr(adapter); + else +#endif /* DEVICE_POLLING */ + { igb_enable_intr(adapter); E1000_WRITE_REG(&adapter->hw, E1000_ICS, E1000_ICS_LSC); + } /* Don't reset the phy next time init gets called */ adapter->hw.phy.reset_disable = TRUE; @@ -1201,6 +1245,9 @@ igb_handle_que(void *context, int pendin } /* Reenable this interrupt */ +#ifdef DEVICE_POLLING + if (!(ifp->if_capenable & IFCAP_POLLING)) +#endif E1000_WRITE_REG(&adapter->hw, E1000_EIMS, que->eims); } @@ -1257,6 +1304,63 @@ igb_irq_fast(void *arg) return FILTER_HANDLED; } +#ifdef DEVICE_POLLING +/********************************************************************* + * + * Legacy polling routine + * + *********************************************************************/ +#if __FreeBSD_version >= 800000 +#define POLL_RETURN_COUNT(a) (a) +static int +#else +#define POLL_RETURN_COUNT(a) +static void +#endif +igb_poll(struct ifnet *ifp, enum poll_cmd cmd, int count) +{ + struct adapter *adapter = ifp->if_softc; + struct rx_ring *rxr = adapter->rx_rings; + struct tx_ring *txr = adapter->tx_rings; + u32 reg_icr, rx_done = 0; + u32 loop = IGB_MAX_LOOP; + bool more; + + IGB_CORE_LOCK(adapter); + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) { + IGB_CORE_UNLOCK(adapter); + return POLL_RETURN_COUNT(rx_done); + } + + if (cmd == POLL_AND_CHECK_STATUS) { + reg_icr = E1000_READ_REG(&adapter->hw, E1000_ICR); + /* Link status change */ + if (reg_icr & (E1000_ICR_RXSEQ | E1000_ICR_LSC)) + taskqueue_enqueue(adapter->tq, &adapter->link_task); + + if (reg_icr & E1000_ICR_RXO) + adapter->rx_overruns++; + } + IGB_CORE_UNLOCK(adapter); + + /* TODO: rx_count */ + rx_done = igb_rxeof(rxr, count) ? 1 : 0; + + IGB_TX_LOCK(txr); + do { + more = igb_txeof(txr); + } while (loop-- && more); +#if __FreeBSD_version >= 800000 + if (!drbr_empty(ifp, txr->br)) + igb_mq_start_locked(ifp, txr, NULL); +#else + if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) + igb_start_locked(txr, ifp); +#endif + IGB_TX_UNLOCK(txr); + return POLL_RETURN_COUNT(rx_done); +} +#endif /* DEVICE_POLLING */ /********************************************************************* * @@ -1783,6 +1887,9 @@ igb_local_timer(void *arg) } /* Trigger an RX interrupt on all queues */ +#ifdef DEVICE_POLLING + if (!(ifp->if_capenable & IFCAP_POLLING)) +#endif E1000_WRITE_REG(&adapter->hw, E1000_EICS, adapter->rx_mask); callout_reset(&adapter->timer, hz, igb_local_timer, adapter); return; @@ -2544,6 +2651,9 @@ igb_setup_interface(device_t dev, struct ifp->if_capabilities |= IFCAP_LRO; ifp->if_capenable = ifp->if_capabilities; +#ifdef DEVICE_POLLING + ifp->if_capabilities |= IFCAP_POLLING; +#endif /* * Tell the upper layer(s) we support long frames. @@ -2808,7 +2918,9 @@ err_tx_desc: igb_dma_free(adapter, &txr->txdma); free(adapter->rx_rings, M_DEVBUF); rx_fail: +#if __FreeBSD_version >= 800000 buf_ring_free(txr->br, M_DEVBUF); +#endif free(adapter->tx_rings, M_DEVBUF); tx_fail: free(adapter->queues, M_DEVBUF); From owner-svn-src-all@FreeBSD.ORG Mon Feb 1 19:48:11 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 85CD410656A4; Mon, 1 Feb 2010 19:48:11 +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 57AA78FC29; Mon, 1 Feb 2010 19:48:11 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id B6AEC46B38; Mon, 1 Feb 2010 14:48:10 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id B7C868A021; Mon, 1 Feb 2010 14:48:09 -0500 (EST) From: John Baldwin To: Alan Cox Date: Mon, 1 Feb 2010 12:53:23 -0500 User-Agent: KMail/1.12.1 (FreeBSD/7.2-CBSD-20100120; KDE/4.3.1; amd64; ; ) References: <201002011736.o11HamNe024852@svn.freebsd.org> In-Reply-To: <201002011736.o11HamNe024852@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201002011253.23909.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Mon, 01 Feb 2010 14:48:09 -0500 (EST) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.3 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r203351 - head/sys/i386/i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2010 19:48:11 -0000 On Monday 01 February 2010 12:36:48 pm Alan Cox wrote: > Author: alc > Date: Mon Feb 1 17:36:48 2010 > New Revision: 203351 > URL: http://svn.freebsd.org/changeset/base/203351 > > Log: > Change the default value for the flag enabling superpage mapping and > promotion to "on". Woo! :) -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Feb 1 20:50:50 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4265A1065670; Mon, 1 Feb 2010 20:50:50 +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 3196E8FC27; Mon, 1 Feb 2010 20:50:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o11Koos2068923; Mon, 1 Feb 2010 20:50:50 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o11KooXs068921; Mon, 1 Feb 2010 20:50:50 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201002012050.o11KooXs068921@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 1 Feb 2010 20:50:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203355 - head/sys/dev/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2010 20:50:50 -0000 Author: yongari Date: Mon Feb 1 20:50:49 2010 New Revision: 203355 URL: http://svn.freebsd.org/changeset/base/203355 Log: Add more bit definitions to PCI express device control and device status register. Reviewed by: jhb Modified: head/sys/dev/pci/pcireg.h Modified: head/sys/dev/pci/pcireg.h ============================================================================== --- head/sys/dev/pci/pcireg.h Mon Feb 1 19:28:43 2010 (r203354) +++ head/sys/dev/pci/pcireg.h Mon Feb 1 20:50:49 2010 (r203355) @@ -605,9 +605,17 @@ #define PCIR_EXPRESS_DEVICE_CAP 0x4 #define PCIM_EXP_CAP_MAX_PAYLOAD 0x0007 #define PCIR_EXPRESS_DEVICE_CTL 0x8 +#define PCIM_EXP_CTL_RELAXED_ORD_ENABLE 0x0010 #define PCIM_EXP_CTL_MAX_PAYLOAD 0x00e0 +#define PCIM_EXP_CTL_NOSNOOP_ENABLE 0x0800 #define PCIM_EXP_CTL_MAX_READ_REQUEST 0x7000 #define PCIR_EXPRESS_DEVICE_STA 0xa +#define PCIM_EXP_STA_CORRECTABLE_ERROR 0x0001 +#define PCIM_EXP_STA_NON_FATAL_ERROR 0x0002 +#define PCIM_EXP_STA_FATAL_ERROR 0x0004 +#define PCIM_EXP_STA_UNSUPPORTED_REQ 0x0008 +#define PCIM_EXP_STA_AUX_POWER 0x0010 +#define PCIM_EXP_STA_TRANSACTION_PND 0x0020 #define PCIR_EXPRESS_LINK_CAP 0xc #define PCIM_LINK_CAP_MAX_SPEED 0x0000000f #define PCIM_LINK_CAP_MAX_WIDTH 0x000003f0 From owner-svn-src-all@FreeBSD.ORG Mon Feb 1 20:53:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6269C1065692; Mon, 1 Feb 2010 20:53:55 +0000 (UTC) (envelope-from joerg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4FD728FC16; Mon, 1 Feb 2010 20:53:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o11KrtaB069726; Mon, 1 Feb 2010 20:53:55 GMT (envelope-from joerg@svn.freebsd.org) Received: (from joerg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o11KrtLh069723; Mon, 1 Feb 2010 20:53:55 GMT (envelope-from joerg@svn.freebsd.org) Message-Id: <201002012053.o11KrtLh069723@svn.freebsd.org> From: Joerg Wunsch Date: Mon, 1 Feb 2010 20:53:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203356 - head/lib/libgpib X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2010 20:53:55 -0000 Author: joerg Date: Mon Feb 1 20:53:55 2010 New Revision: 203356 URL: http://svn.freebsd.org/changeset/base/203356 Log: Finally, document libgpib. MFC after: 3 days Added: head/lib/libgpib/gpib.3 (contents, props changed) Modified: head/lib/libgpib/Makefile Modified: head/lib/libgpib/Makefile ============================================================================== --- head/lib/libgpib/Makefile Mon Feb 1 20:50:49 2010 (r203355) +++ head/lib/libgpib/Makefile Mon Feb 1 20:53:55 2010 (r203356) @@ -6,4 +6,23 @@ INCS= gpib.h INCSDIR= ${INCLUDEDIR}/gpib SRCS= ibfoo.c +MAN= gpib.3 + +# MLINKS are only provided for functions that are actually +# implemented; update this if missing pieces have been filled in. +MLINKS+= gpib.3 ibclr.3 +MLINKS+= gpib.3 ibdev.3 +MLINKS+= gpib.3 ibdma.3 +MLINKS+= gpib.3 ibeos.3 +MLINKS+= gpib.3 ibeot.3 +MLINKS+= gpib.3 ibloc.3 +MLINKS+= gpib.3 ibonl.3 +MLINKS+= gpib.3 ibpad.3 +MLINKS+= gpib.3 ibrd.3 +MLINKS+= gpib.3 ibsad.3 +MLINKS+= gpib.3 ibsic.3 +MLINKS+= gpib.3 ibtmo.3 +MLINKS+= gpib.3 ibtrg.3 +MLINKS+= gpib.3 ibwrt.3 + .include Added: head/lib/libgpib/gpib.3 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libgpib/gpib.3 Mon Feb 1 20:53:55 2010 (r203356) @@ -0,0 +1,738 @@ +.\" Copyright (c) 2010, Joerg Wunsch +.\" 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 February 1, 2010 +.Dt GPIB 3 +.Os +.Sh NAME +.\" .Nm ibask , +.\" .Nm ibbna , +.\" .Nm ibcac , +.Nm ibclr , +.\" .Nm ibcmd , +.\" .Nm ibcmda , +.\" .Nm ibconfig , +.Nm ibdev , +.\" .Nm ibdiag , +.Nm ibdma , +.Nm ibeos , +.Nm ibeot , +.\" .Nm ibevent , +.\" .Nm ibfind , +.\" .Nm ibgts , +.\" .Nm ibist , +.\" .Nm iblines , +.\" .Nm ibllo , +.\" .Nm ibln , +.Nm ibloc , +.Nm ibonl , +.Nm ibpad , +.\" .Nm ibpct , +.\" .Nm ibpoke , +.\" .Nm ibppc , +.Nm ibrd , +.\" .Nm ibrda , +.\" .Nm ibrdf , +.\" .Nm ibrdkey , +.\" .Nm ibrpp , +.\" .Nm ibrsc , +.\" .Nm ibrsp , +.\" .Nm ibrsv , +.Nm ibsad , +.\" .Nm ibsgnl , +.Nm ibsic , +.\" .Nm ibsre , +.\" .Nm ibsrq , +.\" .Nm ibstop , +.Nm ibtmo , +.\" .Nm ibtrap , +.Nm ibtrg , +.\" .Nm ibwait , +.Nm ibwrt +.\" .Nm ibwrta , +.\" .Nm ibwrtf , +.\" .Nm ibwrtkey , +.\" .Nm ibxtrc +.Nd "GPIB library" +.Sh LIBRARY +.Lb libgpib +.Sh SYNOPSIS +.In gpib.h +.Pp +.Dv extern int ibcnt , +.Dv iberr , +.Dv ibsta ; +.Pp +.Ft int +.Fn ibask "int handle" "int option" "int *retval" +.Ft int +.Fn ibbna "int handle" "char *bdname" +.Ft int +.Fn ibcac "int handle" "int v" +.Ft int +.Fn ibclr "int handle" +.Ft int +.Fn ibcmd "int handle" "void *buffer" "long cnt" +.Ft int +.Fn ibcmda "int handle" "void *buffer" "long cnt" +.Ft int +.Fn ibconfig "int handle" "int option" "int value" +.Ft int +.Fn ibdev "int boardID" "int pad" "int sad" "int tmo" "int eot" "int eos" +.Ft int +.Fn ibdiag "int handle" "void *buffer" "long cnt" +.Ft int +.Fn ibdma "int handle" "int v" +.Ft int +.Fn ibeos "int handle" "int eos" +.Ft int +.Fn ibeot "int handle" "int eot" +.Ft int +.Fn ibevent "int handle" "short *event" +.Ft int +.Fn ibfind "char *bdname" +.Ft int +.Fn ibgts "int handle" "int v" +.Ft int +.Fn ibist "int handle" "int v" +.Ft int +.Fn iblines "int handle" "short *lines" +.Ft int +.Fn ibllo "int handle" +.Ft int +.Fn ibln "int handle" "int padval" "int sadval" "short *listenflag" +.Ft int +.Fn ibloc "int handle" +.Ft int +.Fn ibonl "int handle" "int v" +.Ft int +.Fn ibpad "int handle" "int pad" +.Ft int +.Fn ibpct "int handle" +.Ft int +.Fn ibpoke "int handle" "int option" "int value" +.Ft int +.Fn ibppc "int handle" "int v" +.Ft int +.Fn ibrd "int handle" "void *buffer" "long cnt" +.Ft int +.Fn ibrda "int handle" "void *buffer" "long cnt" +.Ft int +.Fn ibrdf "int handle" "char *flname" +.Ft int +.Fn ibrdkey "int handle" "void *buffer" "int cnt" +.Ft int +.Fn ibrpp "int handle" "char *ppr" +.Ft int +.Fn ibrsc "int handle" "int v" +.Ft int +.Fn ibrsp "int handle" "char *spr" +.Ft int +.Fn ibrsv "int handle" "int v" +.Ft int +.Fn ibsad "int handle" "int sad" +.Ft int +.Fn ibsgnl "int handle" "int v" +.Ft int +.Fn ibsic "int handle" +.Ft int +.Fn ibsre "int handle" "int v" +.Ft int +.Fn ibsrq "(*func) void)" +.Ft int +.Fn ibstop "int handle" +.Ft int +.Fn ibtmo "int handle" "int tmo" +.Ft int +.Fn ibtrap "int mask" "int mode" +.Ft int +.Fn ibtrg "int handle" +.Ft int +.Fn ibwait "int handle" "int mask" +.Ft int +.Fn ibwrt "int handle" "const void *buffer" "long cnt" +.Ft int +.Fn ibwrta "int handle" "const void *buffer" "long cnt" +.Ft int +.Fn ibwrtf "int handle" "const char *flname" +.Ft int +.Fn ibwrtkey "int handle" "const void *buffer" "int cnt" +.Ft int +.Fn ibxtrc "int handle" "void *buffer" "long cnt" +.Sh DESCRIPTION +The +.Nm +library provides access to the +.Xr gpib 4 +kernel devices. +.Ss Variable Description +The variable +.Dv ibcnt +contains the number of bytes transferred in the most recent call to +.Fn ibcmd , +.Fn ibrd , +or +.Fn ibwrt . +.Pp +The name +.Dv ibcntl +is an alias for +.Dv ibcnt , +provided for backwards compatibility. +.Pp +The variable +.Dv iberr +provides an error code for the most recent library call. +The possible error codes are: +.Bl -tag -offset indent -compact +.It EDVR +System error +.It ECIC +Not Active Controller +.It ENOL +Nobody listening +.It EADR +Controller not addressed +.It EARG +Invalid argument +.It ESAC +Not System Controller +.It EABO +I/O Aborted/Time out +.It ENEB +No such controller +.It EOIP +Async I/O in progress +.It ECAP +No such capability +.It EFSO +File system error +.It EBUS +Command byte xfer error +.It ESTB +Serial poll status byte lost +.It ESRQ +SRQ line stuck +.It ETAB +Table problem +.El +.Pp +The variable +.Dv ibsta +contains the controller status. +This is an ORed status value, with the following individual bit names: +.Bl -tag -offset indent -compact +.It ERR +Error +.It TIMO +Timeout +.It END +EOI/EOS +.It SRQI +SRQ +.It RQS +Device requests service +.It SPOLL +Serial Poll +.It EVENT +Event occured +.It CMPL +I/O complete +.It LOK +Lockout +.It REM +Remote +.It CIC +CIC +.It ATN +ATN +.It TACS +Talker +.It LACS +Listener +.It DTAS +Device trigger status +.It DCAS +Device clear state +.El +.Ss Function Description +.Pp +The function +.Fn ibdev +is used to open the GPIB device, and establish the parameters to +communicate with a particular bus device. The device is selected +by its primary address +.Fa pad , +a numerical value between 0 and 30, possibly additionally by its +secondary address +.Fa sad , +a numerical value between 96 and 126, or 0 to not use secondary +addressing. +The +.Fa tmo +value specifies the timeout to use when communicating with the device. +This can be any of the constants +.Dv TNONE , +.Dv T10us , +.Dv T30us , +.Dv T100us , +.Dv T300us , +.Dv T1ms , +.Dv T3ms , +.Dv T10ms , +.Dv T30ms , +.Dv T100ms , +.Dv T300ms , +.Dv T1s , +.Dv T3s , +.Dv T10s , +.Dv T30s , +.Dv T100s , +.Dv T300s , +or +.Dv T1000s . +The boolean parameter +.Fa eot +specifies whether the bus signal +.Li EOI +(end-or-identify) should be asserted when sending the last byte of a +message to the device. +Finally, the +.Fa eos +parameter determines whether any special character should be used to +identify the end of a device message when transferring messages on the +bus. +The lower 8 bits of +.Fa eos +are interpreted as an end-of-string character, +.Li EOS . +This character can be ORed with the following values: +.Bl -tag -compact -offset indent +.It Dv REOS +When receiving a message byte on the bus that matches the +.Li EOS +character, treat it as if the +.Li EOI +signal were asserted, and stop receiving. +.It Dv XEOS +When transmitting a message byte on the bus that matches the +.Li EOS +character, assert the +.Li EOI +bus signal by the same time, and stop sending. +.It Dv BIN +If set, include all 8 bits of the +.Li EOS +character in the comparison; if unset, compare only 7 bit ASCII +values. +.El +Passing 0 as +.Fa eos +will turn off any special character treatment, allowing for a fully +8-bit transparent communications channel to the device. +.Pp +The function +.Fn ibfind +is meant to find the +.Em board index +of a board identified by the name +.Fa bdname . +.Em This function is currently not implemented. +.Pp +All remaining functions take the handle returned by calling +.Fn ibdev +as their first argument +.Fa handle . +.Pp +The function +.Fn ibask +is used to query configuration values that have been set with +.Fn ibconfig . +.Em This function is currently not implemented. +.Pp +The function +.Fn ibbna +is meant to change the access board for the given device to +a new one, named +.Fa bdname . +.Em This function is currently not implemented. +.Pp +The function +.Fn ibcac +is used to become the active controller on the bus, by asserting the +.Li ATN +signal line. +.Em This function is currently not implemented. +.Pp +The function +.Fn ibclr +is used to transmit a +.Em Selected Device Clear +command to the device. +.Pp +The function +.Fn ibcmd +is used to directly write +.Fa cnt +GPIB command bytes from a buffer starting at +.Fa buffer +to the device. +.Em This function is currently not implemented. +.Pp +The function +.Fn ibcmda +does the same as +.Fn ibcmd +except it operates asynchronously, so it returns to the caller +immediately. +.Em This function is currently not implemented. +.Pp +The function +.Fn ibconfig +is used to set certain configuration parameters. +.Em This function is currently not implemented. +.Pp +The function +.Fn ibdiag +is obsolete, and not implemented. +.Pp +The function +.Fn ibdma +is used to enable or disable DMA transfers. +Parameter +.Fa v +is a boolean parameter indicating DMA transfers are to be used. +Depending on the hardware and operating system configuration, DMA +transfers might not be available for a particular access board. +.Pp +The function +.Fn ibeos +configures the end-of-string character. +See +.Fn ibdev +for an explanation. +.Pp +The function +.Fn ibeot +configures the assertion of the +.Li EOI +signal line when transmitting the last byte of a message; see +.Fn ibdev +for an explanation. +.Pp +The function +.Fn ibevent +is used to obtain an event from the board's event queue. +.Em This function is currently not implemented. +.Pp +The function +.Fn ibgts +makes the current controller the standby controller, by deasserting +the +.Li ATN +signal line. +.Em This function is currently not implemented. +.Pp +The function +.Fn ibist +sets the individual status bits of the controller to the value +.Fa v . +.Em This function is currently not implemented. +.Pp +The function +.Fn iblines +returns the status of the control and handshake bus lines into the +area pointed to by +.Fa lines . +.Em This function is currently not implemented. +.Pp +The function +.Fn ibllo +is obsolete, and not implemented. +.Pp +The function +.Fn ibln +checks for a listener at the primary address +.Fa padval +and the optional secondary address +.Fa sadval . +If a listener was found, the value pointed to by +.Fa listenflag +will be set to a non-zero value. +.Em This function is currently not implemented. +.Pp +The function +.Fn ibloc +turns the device into local mode. +.Pp +The function +.Fn ibonl +is used to close or reinitialize a device handle. +If parameter +.Fa v +is passed as zero, the handle will be closed, and cannot be used +again. +If it is passed as a non-zero value, all parameters of the handle +will be returned to their defaults; +.Em this functionality is currently unsupported. +.Pp +The function +.Fn ibpad +is used to change the primary address of the device being communicated +with to +.Fa pad . +See +.Fn ibdev +for an explanation. +.Pp +The function +.Fn ibpct +is used to make the device associated with the handle the +controller-in-charge. +.Em This function is currently not implemented. +.Pp +The function +.Fn ibpoke +is obsolete, and not implemented. +.Pp +The function +.Fn ibppc +is used to configure the parallel poll response to +.Fa v . +.Em This function is currently not implemented. +.Pp +The fucntion +.Fn ibrd +is used to receive +.Fa cnt +bytes from the device, and store it to the address passed as +.Fa buffer . +.Pp +The function +.Fn ibrda +behaves similar to +.Fn ibrd +except it operates asynchronously, and returns immediately to the +caller. +.Em This function is currently not implemented. +.Pp +The function +.Fn ibrdf +read data from the device, and appends it to the file with the name +.Fa flname . +.Em This function is currently not implemented. +.Pp +The function +.Fn ibrdkey +is obsolete, and not implemented. +.Pp +The function +.Fn ibrpp +performs a parallel poll, and stores the result at the location +pointed to by +.Fa ppr . +.Em This function is currently not implemented. +.Pp +The function +.Fn ibrsc +makes the board specified by the handle the +.Em system controller +if the argument +.Fa v +is non-zero. +.Em This function is currently not implemented. +.Pp +The function +.Fn ibrsp +conducts a serial poll, and stores the result in the byte pointed +to by +.Fa spr . +.Em This function is currently not implemented. +.Pp +The function +.Fn ibrsv +sets the serial poll response of the board to +.Fa v , +possibly requesting service from the controller if the SRQ bit (0x40) +is set. +.Em This function is currently not implemented. +.Pp +The function +.Fn ibsad +changes the secondary address of the device being communicated with to +.Fa sad . +See +.Fn ibdev +for an explanation. +.Pp +The function +.Fn ibsgnl +is obsolete, and not implemented. +.Pp +The function +.Fn ibsic +asserts the +.Em Interface Clear (IFC) +signal line on the bus for at least 100 microseconds. +This will make all devices attached to the bus to unlisten and untalk. +This function should only be executed on the system controller. +.Pp +The function +.Fn ibsre +asserts the +.Em Remote Enable (REN) +signal line on the bus if argument +.Fa v +is non-zero, or deasserts it otherwise. +.Em This function is currently not implemented. +.Pp +The function +.Fn ibsrq +is obsolete, and not implemented. +.Pp +The function +.Fn ibstop +stops or aborts any asynchronous I/O operation. +.Em This function is currently not implemented. +.Pp +The function +.Fn ibtmo +reconfigures the communication timeout. +See +.Fn ibdev +for an explanation. +.Pp +The function +.Fn ibtrap +is obsolete, and not implemented. +.Pp +The function +.Fn ibtrg +sends a +.Em Group Execute Trigger (GET) +command to the device. +.Pp +The function +.Fn ibwait +waits for a status condition as specified by +.Fa mask . +If +.Fa mask +is given as zero, it returns immediately. +.Em This function is currently not implemented. +.Pp +The function +.Fn ibwrt +is used to send +.Fa cnt +bytes to the device, starting at the address pointed to by +.Fa buffer . +.Pp +The function +.Fn ibwrta +performs the same operation as +.Fn ibwrt +in an asynchronous way, returning immediately to the caller. +.Em This function is currently not implemented. +.Pp +The function +.Fn ibwrtf +opens the file named by +.Fa flname , +and sends its contents to the device. +.Em This function is currently not implemented. +.Pp +The function +.Fn ibwrtkey +is obsolete, and not implemented +.Pp +The function +.Fn ibxtrc +is obsolete, and not implemented. +.Sh RETURN VALUES +The function +.Fn ibdev +returns a handle to be used for the remaining functions. +Upon failure, -1 is returned. +.Pp +All other functions return the value of the variable +.Dv ibsta . +.Sh DIAGNOSTICS +None. +.Sh COMPATIBILITY +The +.Nm +library tries to be compatible with the Linux GPIB library, +which in turn appears to be compatible with the GPIB library +shipped by National Instruments. +.Sh ERRORS +Errors in the functions above might set +.Dv errno +to one of these values: +.Bl -tag -width Er +.It Bq Er ENOENT +No such file or directory. +.It Bq Er EIO +Input/output error. +.It Bq Er ENXIO +Device not configured. +.It Bq Er E2BIG +Argument list too long. +.It Bq Er ENOMEM +Cannot allocate memory. +.It Bq Er EACCES +Permission denied. +.It Bq Er EFAULT +Bad address. +.It Bq Er EBUSY +Device busy. +.It Bq Er EINVAL +Invalid argument. +.It Bq Er ENFILE +Too many open files in system. +.It Bq Er EMFILE +Too many open files. +.It Bq Er EOPNOTSUPP +Operation not supported. +.El +.Sh SEE ALSO +.Xr gpib 4 +.Sh HISTORY +The +.Nm +library was written by +.An Poul-Henning Kamp +and first appeared in +.Fx 5.4 . +.Sh AUTHORS +This manual page was written by +.An J\(:org Wunsch . +.Sh BUGS +Currently, the library can only handle a single +.Xr gpib 4 +device with instance number 0. +.Pp +Many functions are currently not implemented, see above for details. From owner-svn-src-all@FreeBSD.ORG Mon Feb 1 20:54:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0C1B5106568D; Mon, 1 Feb 2010 20:54:46 +0000 (UTC) (envelope-from joerg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EF5198FC27; Mon, 1 Feb 2010 20:54:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o11Ksje2069971; Mon, 1 Feb 2010 20:54:45 GMT (envelope-from joerg@svn.freebsd.org) Received: (from joerg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o11KsjsL069969; Mon, 1 Feb 2010 20:54:45 GMT (envelope-from joerg@svn.freebsd.org) Message-Id: <201002012054.o11KsjsL069969@svn.freebsd.org> From: Joerg Wunsch Date: Mon, 1 Feb 2010 20:54:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203357 - head/gnu/usr.bin/groff/tmac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2010 20:54:46 -0000 Author: joerg Date: Mon Feb 1 20:54:45 2010 New Revision: 203357 URL: http://svn.freebsd.org/changeset/base/203357 Log: Add a libgpib to the list of known .Lb names. MFC after: 3 days Modified: head/gnu/usr.bin/groff/tmac/mdoc.local Modified: head/gnu/usr.bin/groff/tmac/mdoc.local ============================================================================== --- head/gnu/usr.bin/groff/tmac/mdoc.local Mon Feb 1 20:53:55 2010 (r203356) +++ head/gnu/usr.bin/groff/tmac/mdoc.local Mon Feb 1 20:54:45 2010 (r203357) @@ -46,6 +46,7 @@ .ds doc-str-Lb-libelf ELF Parsing Library (libelf, \-lelf) .ds doc-str-Lb-libfetch File Transfer Library (libfetch, \-lfetch) .ds doc-str-Lb-libgeom Userland API Library for kernel GEOM subsystem (libgeom, \-lgeom) +.ds doc-str-Lb-libgpib General-Purpose Instrument Bus (GPIB) library (libgpib, \-lgpib) .ds doc-str-Lb-libipx IPX Address Conversion Support Library (libipx, \-lipx) .ds doc-str-Lb-libjail Jail Library (libjail, \-ljail) .ds doc-str-Lb-libkiconv Kernel side iconv library (libkiconv, \-lkiconv) From owner-svn-src-all@FreeBSD.ORG Mon Feb 1 20:58:45 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A7530106566B; Mon, 1 Feb 2010 20:58: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 966CE8FC13; Mon, 1 Feb 2010 20:58:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o11Kwjv0070874; Mon, 1 Feb 2010 20:58:45 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o11KwjQK070872; Mon, 1 Feb 2010 20:58:45 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201002012058.o11KwjQK070872@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 1 Feb 2010 20:58:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203358 - head/sys/dev/bge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2010 20:58:45 -0000 Author: yongari Date: Mon Feb 1 20:58:45 2010 New Revision: 203358 URL: http://svn.freebsd.org/changeset/base/203358 Log: PCI express device status register has W1C feature. Writing 0 has no effect. Make sure to clear error bits by writing 1. [1] While I'm here use predefined value instead of hardcodig magic vlaue. Submitted by: msaitoh at NetBSD [1] Modified: head/sys/dev/bge/if_bge.c Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Mon Feb 1 20:54:45 2010 (r203357) +++ head/sys/dev/bge/if_bge.c Mon Feb 1 20:58:45 2010 (r203358) @@ -3136,14 +3136,17 @@ bge_reset(struct bge_softc *sc) devctl = pci_read_config(dev, sc->bge_expcap + PCIR_EXPRESS_DEVICE_CTL, 2); /* Clear enable no snoop and disable relaxed ordering. */ - devctl &= ~(0x0010 | 0x0800); + devctl &= ~(PCIM_EXP_CTL_RELAXED_ORD_ENABLE | + PCIM_EXP_CTL_NOSNOOP_ENABLE); /* Set PCIE max payload size to 128. */ devctl &= ~PCIM_EXP_CTL_MAX_PAYLOAD; pci_write_config(dev, sc->bge_expcap + PCIR_EXPRESS_DEVICE_CTL, devctl, 2); /* Clear error status. */ pci_write_config(dev, sc->bge_expcap + PCIR_EXPRESS_DEVICE_STA, - 0, 2); + PCIM_EXP_STA_CORRECTABLE_ERROR | + PCIM_EXP_STA_NON_FATAL_ERROR | PCIM_EXP_STA_FATAL_ERROR | + PCIM_EXP_STA_UNSUPPORTED_REQ, 2); } /* Reset some of the PCI state that got zapped by reset. */ From owner-svn-src-all@FreeBSD.ORG Mon Feb 1 21:01:21 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2740A106566C; Mon, 1 Feb 2010 21:01:21 +0000 (UTC) (envelope-from joerg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 165F68FC08; Mon, 1 Feb 2010 21:01:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o11L1K7m071502; Mon, 1 Feb 2010 21:01:20 GMT (envelope-from joerg@svn.freebsd.org) Received: (from joerg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o11L1Kcf071498; Mon, 1 Feb 2010 21:01:20 GMT (envelope-from joerg@svn.freebsd.org) Message-Id: <201002012101.o11L1Kcf071498@svn.freebsd.org> From: Joerg Wunsch Date: Mon, 1 Feb 2010 21:01:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203359 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2010 21:01:21 -0000 Author: joerg Date: Mon Feb 1 21:01:20 2010 New Revision: 203359 URL: http://svn.freebsd.org/changeset/base/203359 Log: Add xrefs to gpib(3), now that it exists. MFC after: 3 days Modified: head/share/man/man4/gpib.4 head/share/man/man4/pcii.4 head/share/man/man4/tnt4882.4 Modified: head/share/man/man4/gpib.4 ============================================================================== --- head/share/man/man4/gpib.4 Mon Feb 1 20:58:45 2010 (r203358) +++ head/share/man/man4/gpib.4 Mon Feb 1 21:01:20 2010 (r203359) @@ -87,7 +87,7 @@ When opening, an instrument can send dat bus in an unaddressed mode, for example hard-copy printer data. .El .Sh SEE ALSO -.\" .Xr libgpib 3 , +.Xr gpib 3 , .Xr pcii 4 , .Xr tnt4882 4 .Sh HISTORY Modified: head/share/man/man4/pcii.4 ============================================================================== --- head/share/man/man4/pcii.4 Mon Feb 1 20:58:45 2010 (r203358) +++ head/share/man/man4/pcii.4 Mon Feb 1 21:01:20 2010 (r203359) @@ -84,7 +84,7 @@ National Instruments GPIB-PCII/PCIIA (in Axiom AX5488 .El .Sh SEE ALSO -.\" .Xr libgpib 3 , +.Xr gpib 3 , .Xr gpib 4 , .Xr device.hints 5 .Sh HISTORY Modified: head/share/man/man4/tnt4882.4 ============================================================================== --- head/share/man/man4/tnt4882.4 Mon Feb 1 20:58:45 2010 (r203358) +++ head/share/man/man4/tnt4882.4 Mon Feb 1 21:01:20 2010 (r203359) @@ -43,7 +43,7 @@ the TNT4882 bus interface chip. This chip emulates a NEC \(mcPD7210 controller IC as the main interface between the host computer and the instrument bus. .Sh SEE ALSO -.\" .Xr libgpib 3 , +.Xr gpib 3 , .Xr gpib 4 , .Sh HISTORY The From owner-svn-src-all@FreeBSD.ORG Mon Feb 1 21:21:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 946911065676; Mon, 1 Feb 2010 21:21:10 +0000 (UTC) (envelope-from joerg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 81C968FC13; Mon, 1 Feb 2010 21:21:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o11LLAVt075896; Mon, 1 Feb 2010 21:21:10 GMT (envelope-from joerg@svn.freebsd.org) Received: (from joerg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o11LLAag075889; Mon, 1 Feb 2010 21:21:10 GMT (envelope-from joerg@svn.freebsd.org) Message-Id: <201002012121.o11LLAag075889@svn.freebsd.org> From: Joerg Wunsch Date: Mon, 1 Feb 2010 21:21:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203360 - head/sys/dev/ieee488 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2010 21:21:10 -0000 Author: joerg Date: Mon Feb 1 21:21:10 2010 New Revision: 203360 URL: http://svn.freebsd.org/changeset/base/203360 Log: GPIB overhaul, part #2: make the tnt4882 driver work with the newer TNT5004 IC. This involved a major rewrite of a number of things, as this chip no longer supports the NAT7210 legacy mode but requires the host to use the (more modern) FIFO mode. In theory, this also ought to work on the older TNT4882C chip. I'll probably add this as optional support (perhaps by a device.hints flag) later on. By now, FIFO mode is *only* activates iff a TNT5004 chip has been detected (where the old code didn't work at all), while everything else is supposed to use the old code. MFC after: 2 weeks Added: head/sys/dev/ieee488/tnt4882.h (contents, props changed) Modified: head/sys/dev/ieee488/ibfoo.c head/sys/dev/ieee488/pcii.c head/sys/dev/ieee488/tnt4882.c head/sys/dev/ieee488/upd7210.c head/sys/dev/ieee488/upd7210.h Modified: head/sys/dev/ieee488/ibfoo.c ============================================================================== --- head/sys/dev/ieee488/ibfoo.c Mon Feb 1 21:01:20 2010 (r203359) +++ head/sys/dev/ieee488/ibfoo.c Mon Feb 1 21:21:10 2010 (r203360) @@ -1,5 +1,6 @@ /*- * Copyright (c) 2005 Poul-Henning Kamp + * Copyright (c) 2010 Joerg Wunsch * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -40,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -53,6 +55,7 @@ __FBSDID("$FreeBSD$"); #define UPD7210_SW_DRIVER #include +#include static MALLOC_DEFINE(M_IBFOO, "IBFOO", "IBFOO"); @@ -94,7 +97,10 @@ struct ibfoo { PIO_IDATA, PIO_ODATA, PIO_CMD, - DMA_IDATA + DMA_IDATA, + FIFO_IDATA, + FIFO_ODATA, + FIFO_CMD } mode; struct timeval deadline; @@ -170,7 +176,7 @@ ib_set_errno(struct ibarg *ap, int errno } static int -gpib_ib_irq(struct upd7210 *u, int intr __unused) +gpib_ib_irq(struct upd7210 *u, int isr_3) { struct ibfoo *ib; @@ -211,11 +217,53 @@ gpib_ib_irq(struct upd7210 *u, int intr if (!(u->rreg[ISR1] & IXR1_ENDRX)) return (0); break; + case FIFO_IDATA: + if (!(isr_3 & 0x15)) + return (0); + while (ib->buflen != 0 && (isr_3 & 0x04 /* NEF */) != 0) { + *ib->buf = bus_read_1(u->reg_res[0], fifob); + ib->buf++; + ib->buflen--; + isr_3 = bus_read_1(u->reg_res[0], isr3); + } + if ((isr_3 & 0x01) != 0 /* xfr done */ || + (u->rreg[ISR1] & IXR1_ENDRX) != 0 || + ib->buflen == 0) + break; + if (isr_3 & 0x10) + /* xfr stopped */ + bus_write_1(u->reg_res[0], cmdr, 0x04); /* GO */ + upd7210_wr(u, AUXMR, AUXMR_RFD); + return (1); + case FIFO_CMD: + case FIFO_ODATA: + if (!(isr_3 & 0x19)) + return (0); + if (ib->buflen == 0) + /* xfr DONE */ + break; + while (ib->buflen != 0 && (isr_3 & 0x08 /* NFF */) != 0) { + bus_write_1(u->reg_res[0], fifob, *ib->buf); + ib->buf++; + ib->buflen--; + isr_3 = bus_read_1(u->reg_res[0], isr3); + } + if (isr_3 & 0x10) + /* xfr stopped */ + bus_write_1(u->reg_res[0], cmdr, 0x04); /* GO */ + if (ib->buflen == 0) + /* no more NFF interrupts wanted */ + bus_write_1(u->reg_res[0], imr3, 0x11); /* STOP IE, DONE IE */ + return (1); default: return (0); } upd7210_wr(u, IMR1, 0); upd7210_wr(u, IMR2, 0); + if (u->use_fifo) { + bus_write_1(u->reg_res[0], imr3, 0x00); + bus_write_1(u->reg_res[0], cmdr, 0x22); /* soft RESET */ + } ib->mode = BUSY; wakeup(&ib->buflen); return (1); @@ -227,6 +275,7 @@ gpib_ib_timeout(void *arg) struct upd7210 *u; struct ibfoo *ib; struct timeval tv; + u_int isr_3; u = arg; ib = u->ibfoo; @@ -241,7 +290,11 @@ gpib_ib_timeout(void *arg) if (ib->mode > BUSY) { upd7210_rd(u, ISR1); upd7210_rd(u, ISR2); - gpib_ib_irq(u, 2); + if (u->use_fifo) + isr_3 = bus_read_1(u->reg_res[0], isr3); + else + isr_3 = 0; + gpib_ib_irq(u, isr_3); } if (ib->mode != IDLE && timevalisset(&ib->deadline)) { getmicrouptime(&tv); @@ -249,6 +302,10 @@ gpib_ib_timeout(void *arg) ib_had_timeout(ib->ap); upd7210_wr(u, IMR1, 0); upd7210_wr(u, IMR2, 0); + if (u->use_fifo) { + bus_write_1(u->reg_res[0], imr3, 0x00); + bus_write_1(u->reg_res[0], cmdr, 0x22); /* soft RESET */ + } ib->mode = BUSY; wakeup(&ib->buflen); } @@ -280,6 +337,8 @@ gpib_ib_wait_xfer(struct upd7210 *u, str ib->buf = NULL; upd7210_wr(u, IMR1, 0); upd7210_wr(u, IMR2, 0); + if (u->use_fifo) + bus_write_1(u->reg_res[0], imr3, 0x00); } static void @@ -335,15 +394,31 @@ pio_cmd(struct upd7210 *u, u_char *cmd, ib->wrh = NULL; } mtx_lock(&u->mutex); - ib->mode = PIO_CMD; ib->buf = cmd; ib->buflen = len; - upd7210_wr(u, IMR2, IXR2_CO); - - gpib_ib_irq(u, 1); + if (u->use_fifo) { + /* TNT5004 or TNT4882 in FIFO mode */ + ib->mode = FIFO_CMD; + upd7210_wr(u, AUXMR, 0x51); /* holdoff immediately */ + bus_write_1(u->reg_res[0], cmdr, 0x10); /* reset FIFO */ + bus_write_1(u->reg_res[0], cfg, 0x80); /* CMD, xfer OUT, 8-bit FIFO */ + bus_write_1(u->reg_res[0], imr3, 0x19); /* STOP IE, NFF IE, DONE IE */ + bus_write_1(u->reg_res[0], cnt0, -len); + bus_write_1(u->reg_res[0], cnt1, (-len) >> 8); + bus_write_1(u->reg_res[0], cnt2, (-len) >> 16); + bus_write_1(u->reg_res[0], cnt3, (-len) >> 24); + bus_write_1(u->reg_res[0], cmdr, 0x04); /* GO */ + } else { + ib->mode = PIO_CMD; + upd7210_wr(u, IMR2, IXR2_CO); + gpib_ib_irq(u, 0); + } gpib_ib_wait_xfer(u, ib); + if (u->use_fifo) + bus_write_1(u->reg_res[0], cmdr, 0x08); /* STOP */ + mtx_unlock(&u->mutex); return (len - ib->buflen); } @@ -358,13 +433,32 @@ pio_odata(struct upd7210 *u, u_char *dat if (len == 0) return (0); mtx_lock(&u->mutex); - ib->mode = PIO_ODATA; ib->buf = data; ib->buflen = len; - upd7210_wr(u, IMR1, IXR1_DO); + if (u->use_fifo) { + /* TNT5004 or TNT4882 in FIFO mode */ + ib->mode = FIFO_ODATA; + bus_write_1(u->reg_res[0], cmdr, 0x10); /* reset FIFO */ + if (ib->doeoi) + bus_write_1(u->reg_res[0], cfg, 0x08); /* CCEN */ + else + bus_write_1(u->reg_res[0], cfg, 0x00); /* xfer OUT, 8-bit FIFO */ + bus_write_1(u->reg_res[0], imr3, 0x19); /* STOP IE, NFF IE, DONE IE */ + bus_write_1(u->reg_res[0], cnt0, -len); + bus_write_1(u->reg_res[0], cnt1, (-len) >> 8); + bus_write_1(u->reg_res[0], cnt2, (-len) >> 16); + bus_write_1(u->reg_res[0], cnt3, (-len) >> 24); + bus_write_1(u->reg_res[0], cmdr, 0x04); /* GO */ + } else { + ib->mode = PIO_ODATA; + upd7210_wr(u, IMR1, IXR1_DO); + } gpib_ib_wait_xfer(u, ib); + if (u->use_fifo) + bus_write_1(u->reg_res[0], cmdr, 0x08); /* STOP */ + mtx_unlock(&u->mutex); return (len - ib->buflen); } @@ -377,13 +471,30 @@ pio_idata(struct upd7210 *u, u_char *dat ib = u->ibfoo; mtx_lock(&u->mutex); - ib->mode = PIO_IDATA; ib->buf = data; ib->buflen = len; - upd7210_wr(u, IMR1, IXR1_DI); + if (u->use_fifo) { + /* TNT5004 or TNT4882 in FIFO mode */ + ib->mode = FIFO_IDATA; + bus_write_1(u->reg_res[0], cmdr, 0x10); /* reset FIFO */ + bus_write_1(u->reg_res[0], cfg, 0x20); /* xfer IN, 8-bit FIFO */ + bus_write_1(u->reg_res[0], cnt0, -len); + bus_write_1(u->reg_res[0], cnt1, (-len) >> 8); + bus_write_1(u->reg_res[0], cnt2, (-len) >> 16); + bus_write_1(u->reg_res[0], cnt3, (-len) >> 24); + bus_write_1(u->reg_res[0], cmdr, 0x04); /* GO */ + upd7210_wr(u, AUXMR, AUXMR_RFD); + bus_write_1(u->reg_res[0], imr3, 0x15); /* STOP IE, NEF IE, DONE IE */ + } else { + ib->mode = PIO_IDATA; + upd7210_wr(u, IMR1, IXR1_DI); + } gpib_ib_wait_xfer(u, ib); + if (u->use_fifo) + bus_write_1(u->reg_res[0], cmdr, 0x08); /* STOP */ + mtx_unlock(&u->mutex); return (len - ib->buflen); } @@ -826,6 +937,12 @@ gpib_ib_open(struct cdev *dev, int oflag upd7210_wr(u, AUXMR, C_AUXB + 3); upd7210_wr(u, AUXMR, C_AUXE + 0); upd7210_wr(u, AUXMR, AUXMR_PON); + if (u->use_fifo) { + bus_write_1(u->reg_res[0], imr3, 0x00); + bus_write_1(u->reg_res[0], cmdr, 0x22); /* soft reset */ + bus_write_1(u->reg_res[0], cmdr, 0x03); /* set system + * controller bit */ + } upd7210_wr(u, AUXMR, AUXMR_CIFC); DELAY(100); upd7210_wr(u, AUXMR, AUXMR_SIFC); @@ -856,6 +973,11 @@ gpib_ib_close(struct cdev *dev, int ofla ibdebug = 0; upd7210_wr(u, IMR1, 0x00); upd7210_wr(u, IMR2, 0x00); + if (u->use_fifo) { + bus_write_1(u->reg_res[0], imr3, 0x00); + bus_write_1(u->reg_res[0], cmdr, 0x02); /* clear system + * controller bit */ + } upd7210_wr(u, AUXMR, AUXMR_CRST); DELAY(10000); mtx_unlock(&u->mutex); Modified: head/sys/dev/ieee488/pcii.c ============================================================================== --- head/sys/dev/ieee488/pcii.c Mon Feb 1 21:01:20 2010 (r203359) +++ head/sys/dev/ieee488/pcii.c Mon Feb 1 21:21:10 2010 (r203360) @@ -238,6 +238,7 @@ pcii_attach(device_t dev) sc->upd7210.reg_offset[rid] = 0; } sc->upd7210.irq_clear_res = sc->res[10]; + sc->upd7210.use_fifo = 0; if (sc->res[1] == NULL) sc->upd7210.dmachan = -1; @@ -245,7 +246,9 @@ pcii_attach(device_t dev) sc->upd7210.dmachan = rman_get_start(sc->res[1]); upd7210attach(&sc->upd7210); - return (error); + device_printf(dev, "attached gpib%d\n", sc->upd7210.unit); + + return (0); } DRIVER_MODULE(pcii, isa, pcii_driver, pcii_devclass, 0, 0); Modified: head/sys/dev/ieee488/tnt4882.c ============================================================================== --- head/sys/dev/ieee488/tnt4882.c Mon Feb 1 21:01:20 2010 (r203359) +++ head/sys/dev/ieee488/tnt4882.c Mon Feb 1 21:21:10 2010 (r203360) @@ -1,5 +1,6 @@ /*- * Copyright (c) 2005 Poul-Henning Kamp + * Copyright (c) 2010 Joerg Wunsch * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -46,6 +47,7 @@ #define UPD7210_HW_DRIVER 1 #include +#include struct tnt_softc { int foo; @@ -62,55 +64,6 @@ static struct resource_spec tnt_res_spec { -1, 0 } }; -enum tnt4882reg { - dir = 0x00, - cdor = 0x00, - isr1 = 0x02, - imr1 = 0x02, - isr2 = 0x04, - imr2 = 0x04, - accwr = 0x05, - spsr = 0x06, - spmr = 0x06, - intr = 0x07, - adsr = 0x08, - admr = 0x08, - cnt2 = 0x09, - cptr = 0x0a, - auxmr = 0x0a, - tauxcr = 0x0a, /* 9914 mode register */ - cnt3 = 0x0b, - adr0 = 0x0c, - adr = 0x0c, - hssel = 0x0d, - adr1 = 0x0e, - eosr = 0x0e, - sts1 = 0x10, - cfg = 0x10, - dsr = 0x11, - sh_cnt = 0x11, - imr3 = 0x12, - hier = 0x13, - cnt0 = 0x14, - misc = 0x15, - cnt1 = 0x16, - csr = 0x17, - keyreg = 0x17, - fifob = 0x18, - fifoa = 0x19, - isr3 = 0x1a, - ccr = 0x1a, - sasr = 0x1b, - dcr = 0x1b, - sts2 = 0x1c, - cmdr = 0x1c, - isr0 = 0x1d, - imr0 = 0x1d, - timer = 0x1e, - bsr = 0x1f, - bcr = 0x1f -}; - struct tst { enum {RD, WT, xDELAY, END} action; @@ -276,6 +229,7 @@ tnt_attach(device_t dev) { struct tnt_softc *sc; int error, i; + uint8_t version; sc = device_get_softc(dev); @@ -286,7 +240,7 @@ tnt_attach(device_t dev) error = bus_setup_intr(dev, sc->res[2], INTR_TYPE_MISC | INTR_MPSAFE, NULL, upd7210intr, &sc->upd7210, &sc->intr_handler); - /* Necessary magic for MITE */ + /* IO Device Window Base Size Register (IODWBSR) */ bus_write_4(sc->res[0], 0xc0, rman_get_start(sc->res[1]) | 0x80); tst_exec(sc, tst_reset, "Reset"); @@ -298,6 +252,18 @@ tnt_attach(device_t dev) tst_exec(sc, tst_count0_1, "COUNT0:1"); tst_exec(sc, tst_reset, "Reset"); + version = bus_read_1(sc->res[1], csr); + version = (version >> 4) & 0x0f; + device_printf(dev, "Chip version 0x%02x (TNT%s)\n", + version, + version >= 4? "5004 or above": "4882"); + if (version >= 4) { + device_printf(dev, "Forcing FIFO mode\n"); + sc->upd7210.use_fifo = 1; + } else { + sc->upd7210.use_fifo = 0; + } + /* pass 7210 interrupts through */ bus_write_1(sc->res[1], imr3, 0x02); @@ -313,6 +279,11 @@ tnt_attach(device_t dev) sc->upd7210.irq_clear_res = NULL; upd7210attach(&sc->upd7210); + device_printf(dev, "attached gpib%d\n", sc->upd7210.unit); + + if (sc->upd7210.use_fifo) + bus_write_1(sc->res[0], hssel, 0x01); /* one-chip mode */ + return (0); } Added: head/sys/dev/ieee488/tnt4882.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/ieee488/tnt4882.h Mon Feb 1 21:21:10 2010 (r203360) @@ -0,0 +1,77 @@ +/*- + * Copyright (c) 2010 Joerg Wunsch + * 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$ + */ + +enum tnt4882reg { + dir = 0x00, + cdor = 0x00, + isr1 = 0x02, + imr1 = 0x02, + isr2 = 0x04, + imr2 = 0x04, + accwr = 0x05, + spsr = 0x06, + spmr = 0x06, + intr = 0x07, + adsr = 0x08, + admr = 0x08, + cnt2 = 0x09, + cptr = 0x0a, + auxmr = 0x0a, + tauxcr = 0x0a, /* 9914 mode register */ + cnt3 = 0x0b, + adr0 = 0x0c, + adr = 0x0c, + hssel = 0x0d, + adr1 = 0x0e, + eosr = 0x0e, + sts1 = 0x10, + cfg = 0x10, + dsr = 0x11, + sh_cnt = 0x11, + imr3 = 0x12, + hier = 0x13, + cnt0 = 0x14, + misc = 0x15, + cnt1 = 0x16, + csr = 0x17, + keyreg = 0x17, + fifob = 0x18, + fifoa = 0x19, + isr3 = 0x1a, + ccr = 0x1a, + sasr = 0x1b, + dcr = 0x1b, + sts2 = 0x1c, + cmdr = 0x1c, + isr0 = 0x1d, + imr0 = 0x1d, + timer = 0x1e, + bsr = 0x1f, + bcr = 0x1f +}; + Modified: head/sys/dev/ieee488/upd7210.c ============================================================================== --- head/sys/dev/ieee488/upd7210.c Mon Feb 1 21:01:20 2010 (r203359) +++ head/sys/dev/ieee488/upd7210.c Mon Feb 1 21:21:10 2010 (r203360) @@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$"); #define UPD7210_HW_DRIVER #define UPD7210_SW_DRIVER #include +#include static MALLOC_DEFINE(M_GPIB, "GPIB", "GPIB"); @@ -90,15 +91,20 @@ upd7210_wr(struct upd7210 *u, enum upd72 void upd7210intr(void *arg) { - u_int isr1, isr2; + u_int isr_1, isr_2, isr_3; struct upd7210 *u; u = arg; mtx_lock(&u->mutex); - isr1 = upd7210_rd(u, ISR1); - isr2 = upd7210_rd(u, ISR2); - if (isr1 != 0 || isr2 != 0) { - if (u->busy == 0 || u->irq == NULL || !u->irq(u, 1)) { + isr_1 = upd7210_rd(u, ISR1); + isr_2 = upd7210_rd(u, ISR2); + if (u->use_fifo) { + isr_3 = bus_read_1(u->reg_res[0], isr3); + } else { + isr_3 = 0; + } + if (isr_1 != 0 || isr_2 != 0 || isr_3 != 0) { + if (u->busy == 0 || u->irq == NULL || !u->irq(u, isr_3)) { #if 0 printf("upd7210intr [%02x %02x %02x", upd7210_rd(u, DIR), isr1, isr2); @@ -168,17 +174,38 @@ upd7210_goto_standby(struct upd7210 *u) /* Unaddressed Listen Only mode */ static int -gpib_l_irq(struct upd7210 *u, int intr __unused) +gpib_l_irq(struct upd7210 *u, int isr_3) { int i; + int have_data = 0; - if (u->rreg[ISR1] & 1) { + if (u->use_fifo) { + /* TNT5004 or TNT4882 in FIFO mode */ + if (isr_3 & 0x04) { + /* FIFO not empty */ + i = bus_read_1(u->reg_res[0], fifob); + have_data = 1; + bus_write_1(u->reg_res[0], cnt0, -1); + bus_write_1(u->reg_res[0], cnt1, (-1) >> 8); + bus_write_1(u->reg_res[0], cnt2, (-1) >> 16); + bus_write_1(u->reg_res[0], cnt3, (-1) >> 24); + bus_write_1(u->reg_res[0], cmdr, 0x04); /* GO */ + } + } else if (u->rreg[ISR1] & 1) { i = upd7210_rd(u, DIR); + have_data = 1; + } + + if (have_data) { u->buf[u->buf_wp++] = i; u->buf_wp &= (u->bufsize - 1); i = (u->buf_rp + u->bufsize - u->buf_wp) & (u->bufsize - 1); - if (i < 8) - upd7210_wr(u, IMR1, 0); + if (i < 8) { + if (u->use_fifo) + bus_write_1(u->reg_res[0], imr3, 0x00); + else + upd7210_wr(u, IMR1, 0); + } wakeup(u->buf); return (1); } @@ -206,15 +233,28 @@ gpib_l_open(struct cdev *dev, int oflags u->buf_wp = 0; u->buf_rp = 0; - upd7210_wr(u, AUXMR, AUXMR_CRST); + upd7210_wr(u, AUXMR, AUXMR_CRST); /* chip reset */ DELAY(10000); - upd7210_wr(u, AUXMR, C_ICR | 8); + upd7210_wr(u, AUXMR, C_ICR | 8); /* 8 MHz clock */ DELAY(1000); - upd7210_wr(u, ADR, 0x60); - upd7210_wr(u, ADR, 0xe0); - upd7210_wr(u, ADMR, 0x70); - upd7210_wr(u, AUXMR, AUXMR_PON); - upd7210_wr(u, IMR1, 0x01); + upd7210_wr(u, ADR, 0x60); /* ADR0: disable listener and talker 0 */ + upd7210_wr(u, ADR, 0xe0); /* ADR1: disable listener and talker 1 */ + upd7210_wr(u, ADMR, 0x70); /* listen-only (lon) */ + upd7210_wr(u, AUXMR, AUXMR_PON); /* immediate execute power-on (pon) */ + if (u->use_fifo) { + /* TNT5004 or TNT4882 in FIFO mode */ + bus_write_1(u->reg_res[0], cmdr, 0x10); /* reset FIFO */ + bus_write_1(u->reg_res[0], cfg, 0x20); /* xfer IN, 8-bit FIFO */ + bus_write_1(u->reg_res[0], cnt0, -1); + bus_write_1(u->reg_res[0], cnt1, (-1) >> 8); + bus_write_1(u->reg_res[0], cnt2, (-1) >> 16); + bus_write_1(u->reg_res[0], cnt3, (-1) >> 24); + bus_write_1(u->reg_res[0], cmdr, 0x04); /* GO */ + bus_write_1(u->reg_res[0], imr3, 0x04); /* NEF IE */ + } else { + /* µPD7210/NAT7210, or TNT4882 in non-FIFO mode */ + upd7210_wr(u, IMR1, 0x01); /* data in interrupt enable */ + } return (0); } @@ -227,6 +267,11 @@ gpib_l_close(struct cdev *dev, int oflag mtx_lock(&u->mutex); u->busy = 0; + if (u->use_fifo) { + /* TNT5004 or TNT4882 in FIFO mode */ + bus_write_1(u->reg_res[0], cmdr, 0x22); /* soft RESET */ + bus_write_1(u->reg_res[0], imr3, 0x00); + } upd7210_wr(u, AUXMR, AUXMR_CRST); DELAY(10000); upd7210_wr(u, IMR1, 0x00); @@ -271,8 +316,12 @@ gpib_l_read(struct cdev *dev, struct uio u->buf_rp += z; u->buf_rp &= (u->bufsize - 1); } - if (u->wreg[IMR1] == 0) - upd7210_wr(u, IMR1, 0x01); + if (u->use_fifo) { + bus_write_1(u->reg_res[0], imr3, 0x04); /* NFF IE */ + } else { + if (u->wreg[IMR1] == 0) + upd7210_wr(u, IMR1, 0x01); + } mtx_unlock(&u->mutex); return (error); } Modified: head/sys/dev/ieee488/upd7210.h ============================================================================== --- head/sys/dev/ieee488/upd7210.h Mon Feb 1 21:01:20 2010 (r203359) +++ head/sys/dev/ieee488/upd7210.h Mon Feb 1 21:21:10 2010 (r203360) @@ -53,6 +53,7 @@ struct upd7210 { u_int reg_offset[8]; int dmachan; int unit; + int use_fifo; /* private stuff */ struct mtx mutex; From owner-svn-src-all@FreeBSD.ORG Mon Feb 1 22:01:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 381BF1065670; Mon, 1 Feb 2010 22:01: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 263E28FC14; Mon, 1 Feb 2010 22:01:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o11M1nRi085004; Mon, 1 Feb 2010 22:01:49 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o11M1n9c085002; Mon, 1 Feb 2010 22:01:49 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201002012201.o11M1n9c085002@svn.freebsd.org> From: John Baldwin Date: Mon, 1 Feb 2010 22:01: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: r203361 - stable/8/sys/dev/nve X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2010 22:01:49 -0000 Author: jhb Date: Mon Feb 1 22:01:48 2010 New Revision: 203361 URL: http://svn.freebsd.org/changeset/base/203361 Log: MFC 203070: Initialize the ifnet before calling mii_phy_probe() as some phy drivers (e.g. e1000phy(4)) expect if_dname to be valid when they are probed. Modified: stable/8/sys/dev/nve/if_nve.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/nve/if_nve.c ============================================================================== --- stable/8/sys/dev/nve/if_nve.c Mon Feb 1 21:21:10 2010 (r203360) +++ stable/8/sys/dev/nve/if_nve.c Mon Feb 1 22:01:48 2010 (r203361) @@ -526,14 +526,6 @@ nve_attach(device_t dev) goto fail; } - /* Probe device for MII interface to PHY */ - DEBUGOUT(NVE_DEBUG_INIT, "nve: do mii_phy_probe\n"); - if (mii_phy_probe(dev, &sc->miibus, nve_ifmedia_upd, nve_ifmedia_sts)) { - device_printf(dev, "MII without any phy!\n"); - error = ENXIO; - goto fail; - } - /* Setup interface parameters */ ifp->if_softc = sc; if_initname(ifp, device_get_name(dev), device_get_unit(dev)); @@ -551,6 +543,14 @@ nve_attach(device_t dev) ifp->if_capabilities |= IFCAP_VLAN_MTU; ifp->if_capenable |= IFCAP_VLAN_MTU; + /* Probe device for MII interface to PHY */ + DEBUGOUT(NVE_DEBUG_INIT, "nve: do mii_phy_probe\n"); + if (mii_phy_probe(dev, &sc->miibus, nve_ifmedia_upd, nve_ifmedia_sts)) { + device_printf(dev, "MII without any phy!\n"); + error = ENXIO; + goto fail; + } + /* Attach to OS's managers. */ ether_ifattach(ifp, eaddr); From owner-svn-src-all@FreeBSD.ORG Mon Feb 1 22:16:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C8E911065670; Mon, 1 Feb 2010 22:16: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 B6F8C8FC0A; Mon, 1 Feb 2010 22:16:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o11MGiHO088414; Mon, 1 Feb 2010 22:16:44 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o11MGiKK088412; Mon, 1 Feb 2010 22:16:44 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201002012216.o11MGiKK088412@svn.freebsd.org> From: John Baldwin Date: Mon, 1 Feb 2010 22:16:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203362 - stable/7/sys/dev/nve X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2010 22:16:44 -0000 Author: jhb Date: Mon Feb 1 22:16:44 2010 New Revision: 203362 URL: http://svn.freebsd.org/changeset/base/203362 Log: MFC 203070: Initialize the ifnet before calling mii_phy_probe() as some phy drivers (e.g. e1000phy(4)) expect if_dname to be valid when they are probed. Approved by: re (kensmith) Modified: stable/7/sys/dev/nve/if_nve.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/nve/if_nve.c ============================================================================== --- stable/7/sys/dev/nve/if_nve.c Mon Feb 1 22:01:48 2010 (r203361) +++ stable/7/sys/dev/nve/if_nve.c Mon Feb 1 22:16:44 2010 (r203362) @@ -526,14 +526,6 @@ nve_attach(device_t dev) goto fail; } - /* Probe device for MII interface to PHY */ - DEBUGOUT(NVE_DEBUG_INIT, "nve: do mii_phy_probe\n"); - if (mii_phy_probe(dev, &sc->miibus, nve_ifmedia_upd, nve_ifmedia_sts)) { - device_printf(dev, "MII without any phy!\n"); - error = ENXIO; - goto fail; - } - /* Setup interface parameters */ ifp->if_softc = sc; if_initname(ifp, device_get_name(dev), device_get_unit(dev)); @@ -552,6 +544,14 @@ nve_attach(device_t dev) ifp->if_capabilities |= IFCAP_VLAN_MTU; ifp->if_capenable |= IFCAP_VLAN_MTU; + /* Probe device for MII interface to PHY */ + DEBUGOUT(NVE_DEBUG_INIT, "nve: do mii_phy_probe\n"); + if (mii_phy_probe(dev, &sc->miibus, nve_ifmedia_upd, nve_ifmedia_sts)) { + device_printf(dev, "MII without any phy!\n"); + error = ENXIO; + goto fail; + } + /* Attach to OS's managers. */ ether_ifattach(ifp, eaddr); From owner-svn-src-all@FreeBSD.ORG Mon Feb 1 23:32:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 56083106574B; Mon, 1 Feb 2010 23:32:44 +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 4488F8FC26; Mon, 1 Feb 2010 23:32:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o11NWiYE005120; Mon, 1 Feb 2010 23:32:44 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o11NWiL5005118; Mon, 1 Feb 2010 23:32:44 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201002012332.o11NWiL5005118@svn.freebsd.org> From: Xin LI Date: Mon, 1 Feb 2010 23:32:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203363 - svnadmin/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2010 23:32:44 -0000 Author: delphij Date: Mon Feb 1 23:32:43 2010 New Revision: 203363 URL: http://svn.freebsd.org/changeset/base/203363 Log: Gabor Kovesdan got the usual punishment by working too much on src/ world. He will work on integrating his previous Google SoC work at the beginning, I'll be his mentor. While I'm here sort the two files. Approved by: core Modified: svnadmin/conf/access svnadmin/conf/mentors Modified: svnadmin/conf/access ============================================================================== --- svnadmin/conf/access Mon Feb 1 22:16:44 2010 (r203362) +++ svnadmin/conf/access Mon Feb 1 23:32:43 2010 (r203363) @@ -39,8 +39,8 @@ brueffer bruno bushman bz -ceri cbzimmer +ceri charnier cognet cokane @@ -76,6 +76,7 @@ fabient fanf fjoe flz +gabor gad gallatin gavin Modified: svnadmin/conf/mentors ============================================================================== --- svnadmin/conf/mentors Mon Feb 1 22:16:44 2010 (r203362) +++ svnadmin/conf/mentors Mon Feb 1 23:32:43 2010 (r203363) @@ -10,10 +10,11 @@ # Sort by mentee login name. # Mentee Mentor Optional comment -cbzimmer sam brucec rrs +cbzimmer sam dchagin kib eri mlaier Co-mentor: thompsa +gabor delphij gavin ed ivoras gnn jh trasz Co-mentor: rwatson @@ -26,7 +27,7 @@ remko imp sbruno scottl snb dwmalone sson gnn -versus dds uqs philip +versus dds will ken zml dfr From owner-svn-src-all@FreeBSD.ORG Mon Feb 1 23:57:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C3281065676; Mon, 1 Feb 2010 23:57:43 +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 403168FC19; Mon, 1 Feb 2010 23:57:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o11NvhPE010619; Mon, 1 Feb 2010 23:57:43 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o11NvhMk010616; Mon, 1 Feb 2010 23:57:43 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201002012357.o11NvhMk010616@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 1 Feb 2010 23:57: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: r203364 - in stable/8/sys: dev/re pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2010 23:57:43 -0000 Author: yongari Date: Mon Feb 1 23:57:42 2010 New Revision: 203364 URL: http://svn.freebsd.org/changeset/base/203364 Log: MFC r203082: Add initial support for RTL8103E PCIe fastethernet. PR: kern/142974 Modified: stable/8/sys/dev/re/if_re.c stable/8/sys/pci/if_rlreg.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/re/if_re.c ============================================================================== --- stable/8/sys/dev/re/if_re.c Mon Feb 1 23:32:43 2010 (r203363) +++ stable/8/sys/dev/re/if_re.c Mon Feb 1 23:57:42 2010 (r203364) @@ -172,7 +172,7 @@ static struct rl_type re_devs[] = { { RT_VENDORID, RT_DEVICEID_8139, 0, "RealTek 8139C+ 10/100BaseTX" }, { RT_VENDORID, RT_DEVICEID_8101E, 0, - "RealTek 8101E/8102E/8102EL PCIe 10/100baseTX" }, + "RealTek 8101E/8102E/8102EL/8103E PCIe 10/100baseTX" }, { RT_VENDORID, RT_DEVICEID_8168, 0, "RealTek 8168/8168B/8168C/8168CP/8168D/8168DP/" "8111B/8111C/8111CP/8111DP PCIe Gigabit Ethernet" }, @@ -212,6 +212,7 @@ static struct rl_hwrev re_hwrevs[] = { { RL_HWREV_8102E, RL_8169, "8102E"}, { RL_HWREV_8102EL, RL_8169, "8102EL"}, { RL_HWREV_8102EL_SPIN1, RL_8169, "8102EL"}, + { RL_HWREV_8103E, RL_8169, "8103E"}, { RL_HWREV_8168_SPIN2, RL_8169, "8168"}, { RL_HWREV_8168_SPIN3, RL_8169, "8168"}, { RL_HWREV_8168C, RL_8169, "8168C/8111C"}, @@ -1268,6 +1269,12 @@ re_attach(device_t dev) RL_FLAG_PAR | RL_FLAG_DESCV2 | RL_FLAG_MACSTAT | RL_FLAG_FASTETHER | RL_FLAG_CMDSTOP | RL_FLAG_AUTOPAD; break; + case RL_HWREV_8103E: + sc->rl_flags |= RL_FLAG_NOJUMBO | RL_FLAG_PHYWAKE | + RL_FLAG_PAR | RL_FLAG_DESCV2 | RL_FLAG_MACSTAT | + RL_FLAG_FASTETHER | RL_FLAG_CMDSTOP | RL_FLAG_AUTOPAD | + RL_FLAG_MACSLEEP; + break; case RL_HWREV_8168_SPIN1: case RL_HWREV_8168_SPIN2: sc->rl_flags |= RL_FLAG_WOLRXENB; Modified: stable/8/sys/pci/if_rlreg.h ============================================================================== --- stable/8/sys/pci/if_rlreg.h Mon Feb 1 23:32:43 2010 (r203363) +++ stable/8/sys/pci/if_rlreg.h Mon Feb 1 23:57:42 2010 (r203364) @@ -166,6 +166,7 @@ #define RL_HWREV_8100E 0x30800000 #define RL_HWREV_8101E 0x34000000 #define RL_HWREV_8102E 0x34800000 +#define RL_HWREV_8103E 0x34C00000 #define RL_HWREV_8168_SPIN2 0x38000000 #define RL_HWREV_8168_SPIN3 0x38400000 #define RL_HWREV_8168C 0x3C000000 From owner-svn-src-all@FreeBSD.ORG Tue Feb 2 00:30:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F1B4A106566C; Tue, 2 Feb 2010 00:30:44 +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 8FF3D8FC29; Tue, 2 Feb 2010 00:30:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o120UiPg017965; Tue, 2 Feb 2010 00:30:44 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o120Uixb017963; Tue, 2 Feb 2010 00:30:44 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201002020030.o120Uixb017963@svn.freebsd.org> From: Xin LI Date: Tue, 2 Feb 2010 00:30:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203365 - head/contrib/netcat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2010 00:30:45 -0000 Author: delphij Date: Tue Feb 2 00:30:44 2010 New Revision: 203365 URL: http://svn.freebsd.org/changeset/base/203365 Log: Update the version number. Modified: head/contrib/netcat/FREEBSD-vendor Modified: head/contrib/netcat/FREEBSD-vendor ============================================================================== --- head/contrib/netcat/FREEBSD-vendor Mon Feb 1 23:57:42 2010 (r203364) +++ head/contrib/netcat/FREEBSD-vendor Tue Feb 2 00:30:44 2010 (r203365) @@ -1,5 +1,5 @@ # $FreeBSD$ Project: netcat (aka src/usr.bin/nc in OpenBSD) ProjectURL: http://www.openbsd.org/ -Version: 4.5 +Version: 4.6 License: BSD From owner-svn-src-all@FreeBSD.ORG Tue Feb 2 00:32:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B9EDC1065676; Tue, 2 Feb 2010 00:32:15 +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 A6C2B8FC20; Tue, 2 Feb 2010 00:32:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o120WFUu018380; Tue, 2 Feb 2010 00:32:15 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o120WFt9018376; Tue, 2 Feb 2010 00:32:15 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201002020032.o120WFt9018376@svn.freebsd.org> From: Xin LI Date: Tue, 2 Feb 2010 00:32: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: r203366 - stable/8/contrib/netcat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2010 00:32:15 -0000 Author: delphij Date: Tue Feb 2 00:32:15 2010 New Revision: 203366 URL: http://svn.freebsd.org/changeset/base/203366 Log: MFC r202640: Update to 4.6. Note: the -V option from OpenBSD is implemented using setfib(2) on FreeBSD. Modified: stable/8/contrib/netcat/FREEBSD-vendor stable/8/contrib/netcat/nc.1 stable/8/contrib/netcat/netcat.c Directory Properties: stable/8/contrib/netcat/ (props changed) Modified: stable/8/contrib/netcat/FREEBSD-vendor ============================================================================== --- stable/8/contrib/netcat/FREEBSD-vendor Tue Feb 2 00:30:44 2010 (r203365) +++ stable/8/contrib/netcat/FREEBSD-vendor Tue Feb 2 00:32:15 2010 (r203366) @@ -1,5 +1,5 @@ # $FreeBSD$ Project: netcat (aka src/usr.bin/nc in OpenBSD) ProjectURL: http://www.openbsd.org/ -Version: 4.4 +Version: 4.6 License: BSD Modified: stable/8/contrib/netcat/nc.1 ============================================================================== --- stable/8/contrib/netcat/nc.1 Tue Feb 2 00:30:44 2010 (r203365) +++ stable/8/contrib/netcat/nc.1 Tue Feb 2 00:32:15 2010 (r203366) @@ -1,4 +1,4 @@ -.\" $OpenBSD: nc.1,v 1.48 2008/09/19 13:24:41 sobrado Exp $ +.\" $OpenBSD: nc.1,v 1.50 2009/06/05 06:47:12 jmc Exp $ .\" .\" Copyright (c) 1996 David Sacerdote .\" All rights reserved. @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 6 2008 +.Dd June 5 2009 .Dt NC 1 .Os .Sh NAME @@ -46,6 +46,7 @@ .Op Fl p Ar source_port .Op Fl s Ar source_ip_address .Op Fl T Ar ToS +.Op Fl V Ar fib .Op Fl w Ar timeout .Op Fl X Ar proxy_protocol .Oo Xo @@ -208,6 +209,9 @@ to script telnet sessions. Specifies to use Unix Domain Sockets. .It Fl u Use UDP instead of the default option of TCP. +.It Fl V Ar fib +Set the routing table (FIB). +The default is 0. .It Fl v Have .Nm @@ -449,6 +453,7 @@ if the proxy requires it: .Ex -std .Sh SEE ALSO .Xr cat 1 , +.Xr setfib 1 , .Xr ssh 1 , .Xr tcp 4 .Sh AUTHORS Modified: stable/8/contrib/netcat/netcat.c ============================================================================== --- stable/8/contrib/netcat/netcat.c Tue Feb 2 00:30:44 2010 (r203365) +++ stable/8/contrib/netcat/netcat.c Tue Feb 2 00:32:15 2010 (r203366) @@ -1,4 +1,4 @@ -/* $OpenBSD: netcat.c,v 1.92 2008/09/19 13:24:41 sobrado Exp $ */ +/* $OpenBSD: netcat.c,v 1.93 2009/06/05 00:18:10 claudio Exp $ */ /* * Copyright (c) 2001 Eric Jackson * @@ -36,6 +36,7 @@ #include #include #include +#include #include #include @@ -94,6 +95,7 @@ int Iflag; /* TCP receive buffer siz int Oflag; /* TCP send buffer size */ int Sflag; /* TCP MD5 signature option */ int Tflag = -1; /* IP Type of Service */ +u_int rdomain; int timeout = -1; int family = AF_UNSPEC; @@ -124,6 +126,8 @@ int main(int argc, char *argv[]) { int ch, s, ret, socksv, ipsec_count; + int numfibs; + size_t intsize = sizeof(int); char *host, *uport; struct addrinfo hints; struct servent *sv; @@ -137,6 +141,7 @@ main(int argc, char *argv[]) { NULL, 0, NULL, 0 } }; + rdomain = 0; ret = 1; ipsec_count = 0; s = 0; @@ -146,7 +151,7 @@ main(int argc, char *argv[]) sv = NULL; while ((ch = getopt_long(argc, argv, - "46e:DEdhi:jklnoI:O:P:p:rSs:tT:Uuvw:X:x:z", + "46DdEe:hI:i:jklnO:oP:p:rSs:tT:UuV:vw:X:x:z", longopts, NULL)) != -1) { switch (ch) { case '4': @@ -229,6 +234,14 @@ main(int argc, char *argv[]) case 'u': uflag = 1; break; + case 'V': + if (sysctlbyname("net.fibs", &numfibs, &intsize, NULL, 0) == -1) + errx(1, "Multiple FIBS not supported"); + rdomain = (unsigned int)strtonum(optarg, 0, + numfibs - 1, &errstr); + if (errstr) + errx(1, "FIB %s: %s", errstr, optarg); + break; case 'v': vflag = 1; break; @@ -550,6 +563,11 @@ remote_connect(const char *host, const c add_ipsec_policy(s, ipsec_policy[1]); #endif + if (rdomain) { + if (setfib(rdomain) == -1) + err(1, "setfib"); + } + /* Bind to a local port or source address if specified. */ if (sflag || pflag) { struct addrinfo ahints, *ares; @@ -620,6 +638,11 @@ local_listen(char *host, char *port, str res0->ai_protocol)) < 0) continue; + if (rdomain) { + if (setfib(rdomain) == -1) + err(1, "setfib"); + } + ret = setsockopt(s, SOL_SOCKET, SO_REUSEPORT, &x, sizeof(x)); if (ret == -1) err(1, NULL); @@ -930,6 +953,7 @@ help(void) \t-t Answer TELNET negotiation\n\ \t-U Use UNIX domain socket\n\ \t-u UDP mode\n\ + \t-V fib Specify alternate routing table (FIB)\n\ \t-v Verbose\n\ \t-w secs\t Timeout for connects and final net reads\n\ \t-X proto Proxy protocol: \"4\", \"5\" (SOCKS) or \"connect\"\n\ @@ -974,8 +998,8 @@ usage(int ret) "usage: nc [-46DdhklnorStUuvz] [-I length] [-i interval] [-O length]\n" #endif "\t [-P proxy_username] [-p source_port] [-s source_ip_address] [-T ToS]\n" - "\t [-w timeout] [-X proxy_protocol] [-x proxy_address[:port]] [hostname]\n" - "\t [port]\n"); + "\t [-V fib] [-w timeout] [-X proxy_protocol]\n" + "\t [-x proxy_address[:port]] [hostname] [port]\n"); if (ret) exit(1); } From owner-svn-src-all@FreeBSD.ORG Tue Feb 2 00:56:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DC803106566C; Tue, 2 Feb 2010 00:56:10 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from gizmo.2hip.net (gizmo.2hip.net [64.74.207.195]) by mx1.freebsd.org (Postfix) with ESMTP id 948A78FC0A; Tue, 2 Feb 2010 00:56:10 +0000 (UTC) Received: from [192.168.1.4] (adsl-19-244-133.bna.bellsouth.net [68.19.244.133]) (authenticated bits=0) by gizmo.2hip.net (8.14.3/8.14.3) with ESMTP id o120u7Nj085208 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Mon, 1 Feb 2010 19:56:08 -0500 (EST) (envelope-from rnoland@FreeBSD.org) From: Robert Noland To: John Baldwin In-Reply-To: <201002010818.48500.jhb@freebsd.org> References: <201001311435.o0VEZnxi051761@svn.freebsd.org> <201002010818.48500.jhb@freebsd.org> Content-Type: text/plain Organization: FreeBSD Date: Mon, 01 Feb 2010 18:56:02 -0600 Message-Id: <1265072162.2869.83.camel@balrog.2hip.net> Mime-Version: 1.0 X-Mailer: Evolution 2.26.3 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00, FH_DATE_PAST_20XX, RDNS_DYNAMIC, SPF_SOFTFAIL autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on gizmo.2hip.net Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r203289 - head/sys/i386/i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2010 00:56:11 -0000 On Mon, 2010-02-01 at 08:18 -0500, John Baldwin wrote: > On Sunday 31 January 2010 9:35:49 am Robert Noland wrote: > > Author: rnoland > > Date: Sun Jan 31 14:35:49 2010 > > New Revision: 203289 > > URL: http://svn.freebsd.org/changeset/base/203289 > > > > Log: > > Enable MTRR on all VIA CPUs that claim support. > > > > This may not be entirely correct either, but the existing check is > > bogus. I have both a C3 and a C7 that fail this check, but work fine. > > > > MFC after: 2 weeks > > Should this be merged to sys/amd64/amd64/amd64_mem.c as well? Hrm... I was thinking it was a symlink back to i686_mem.c. I'll have a look, but none of my VIA boards can run amd64. robert. -- Robert Noland FreeBSD From owner-svn-src-all@FreeBSD.ORG Tue Feb 2 01:17:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C3A0B10656B3; Tue, 2 Feb 2010 01:17:33 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from gizmo.2hip.net (gizmo.2hip.net [64.74.207.195]) by mx1.freebsd.org (Postfix) with ESMTP id 47A288FC0C; Tue, 2 Feb 2010 01:17:32 +0000 (UTC) Received: from [192.168.1.4] (adsl-19-244-133.bna.bellsouth.net [68.19.244.133]) (authenticated bits=0) by gizmo.2hip.net (8.14.3/8.14.3) with ESMTP id o121HT6e085294 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Mon, 1 Feb 2010 20:17:30 -0500 (EST) (envelope-from rnoland@FreeBSD.org) From: Robert Noland To: John Baldwin In-Reply-To: <201002010818.48500.jhb@freebsd.org> References: <201001311435.o0VEZnxi051761@svn.freebsd.org> <201002010818.48500.jhb@freebsd.org> Content-Type: text/plain Organization: FreeBSD Date: Mon, 01 Feb 2010 19:17:24 -0600 Message-Id: <1265073444.2869.85.camel@balrog.2hip.net> Mime-Version: 1.0 X-Mailer: Evolution 2.26.3 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00, FH_DATE_PAST_20XX, RDNS_DYNAMIC, SPF_SOFTFAIL autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on gizmo.2hip.net Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r203289 - head/sys/i386/i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2010 01:17:33 -0000 On Mon, 2010-02-01 at 08:18 -0500, John Baldwin wrote: > On Sunday 31 January 2010 9:35:49 am Robert Noland wrote: > > Author: rnoland > > Date: Sun Jan 31 14:35:49 2010 > > New Revision: 203289 > > URL: http://svn.freebsd.org/changeset/base/203289 > > > > Log: > > Enable MTRR on all VIA CPUs that claim support. > > > > This may not be entirely correct either, but the existing check is > > bogus. I have both a C3 and a C7 that fail this check, but work fine. > > > > MFC after: 2 weeks > > Should this be merged to sys/amd64/amd64/amd64_mem.c as well? Ok, I'm going to commit this change as well, thanks for catching it. robert. -- Robert Noland FreeBSD From owner-svn-src-all@FreeBSD.ORG Tue Feb 2 01:20:34 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 06AB51065693; Tue, 2 Feb 2010 01:20:34 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E94D88FC08; Tue, 2 Feb 2010 01:20:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o121KXJV029117; Tue, 2 Feb 2010 01:20:33 GMT (envelope-from rnoland@svn.freebsd.org) Received: (from rnoland@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o121KXw2029115; Tue, 2 Feb 2010 01:20:33 GMT (envelope-from rnoland@svn.freebsd.org) Message-Id: <201002020120.o121KXw2029115@svn.freebsd.org> From: Robert Noland Date: Tue, 2 Feb 2010 01:20:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203367 - head/sys/amd64/amd64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2010 01:20:34 -0000 Author: rnoland Date: Tue Feb 2 01:20:33 2010 New Revision: 203367 URL: http://svn.freebsd.org/changeset/base/203367 Log: Enable MTRR on all VIA CPUs that claim support (amd64). This is the amd64 part of r203289. Noticed by: jhb MFC after: 2 weeks Modified: head/sys/amd64/amd64/amd64_mem.c Modified: head/sys/amd64/amd64/amd64_mem.c ============================================================================== --- head/sys/amd64/amd64/amd64_mem.c Tue Feb 2 00:32:15 2010 (r203366) +++ head/sys/amd64/amd64/amd64_mem.c Tue Feb 2 01:20:33 2010 (r203367) @@ -707,11 +707,8 @@ amd64_mem_drvinit(void *unused) switch (cpu_vendor_id) { case CPU_VENDOR_INTEL: case CPU_VENDOR_AMD: - break; case CPU_VENDOR_CENTAUR: - if (cpu_exthigh >= 0x80000008) - break; - /* FALLTHROUGH */ + break; default: return; } From owner-svn-src-all@FreeBSD.ORG Tue Feb 2 05:57:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E42551065679; Tue, 2 Feb 2010 05:57:42 +0000 (UTC) (envelope-from lulf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D2A678FC1E; Tue, 2 Feb 2010 05:57:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o125vgCL089849; Tue, 2 Feb 2010 05:57:42 GMT (envelope-from lulf@svn.freebsd.org) Received: (from lulf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o125vgTl089837; Tue, 2 Feb 2010 05:57:42 GMT (envelope-from lulf@svn.freebsd.org) Message-Id: <201002020557.o125vgTl089837@svn.freebsd.org> From: Ulf Lilleengen Date: Tue, 2 Feb 2010 05:57:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203368 - in head: contrib/csup usr.bin/csup X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2010 05:57:43 -0000 Author: lulf Date: Tue Feb 2 05:57:42 2010 New Revision: 203368 URL: http://svn.freebsd.org/changeset/base/203368 Log: - Add support for CVSup authentication mechanisms to csup. - Include a cpasswd script performing the same mechanisms as the cvpasswd utility from CVSup. PR: bin/114129 Submitted by: Petar Zhivkov Petrov MFC after: 1 month Added: head/contrib/csup/auth.c (contents, props changed) head/contrib/csup/auth.h (contents, props changed) head/contrib/csup/cpasswd.1 head/contrib/csup/cpasswd.sh (contents, props changed) Modified: head/contrib/csup/Makefile head/contrib/csup/TODO head/contrib/csup/config.h head/contrib/csup/csup.1 head/contrib/csup/main.c head/contrib/csup/proto.c head/usr.bin/csup/Makefile Modified: head/contrib/csup/Makefile ============================================================================== --- head/contrib/csup/Makefile Tue Feb 2 01:20:33 2010 (r203367) +++ head/contrib/csup/Makefile Tue Feb 2 05:57:42 2010 (r203368) @@ -7,7 +7,7 @@ MANDIR?= ${PREFIX}/man/man UNAME!= /usr/bin/uname -s PROG= csup -SRCS= attrstack.c config.c detailer.c diff.c fattr.c fixups.c fnmatch.c \ +SRCS= attrstack.c auth.c config.c detailer.c diff.c fattr.c fixups.c fnmatch.c \ globtree.c idcache.c keyword.c lister.c main.c misc.c mux.c parse.y \ pathcomp.c proto.c status.c stream.c threads.c token.l updater.c \ rcsfile.c rcsparse.c lex.rcs.c rsyncfile.c @@ -42,4 +42,7 @@ parse.h: y.tab.h DPADD= ${LIBCRYPTO} ${LIBZ} LDADD= -lcrypto -lz +SCRIPTS= cpasswd.sh +MAN= csup.1 cpasswd.1 + .include Modified: head/contrib/csup/TODO ============================================================================== --- head/contrib/csup/TODO Tue Feb 2 01:20:33 2010 (r203367) +++ head/contrib/csup/TODO Tue Feb 2 05:57:42 2010 (r203368) @@ -17,7 +17,6 @@ BUGS: MISSING FEATURES: -- Add support for authentication. - Add support for shell commands sent by the server. - Add missing support for various CVSup options : -D, -a (requires authentication support), -e and -E (requires shell commands support) Added: head/contrib/csup/auth.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/csup/auth.c Tue Feb 2 05:57:42 2010 (r203368) @@ -0,0 +1,331 @@ +/*- + * Copyright (c) 2003-2007, Petar Zhivkov Petrov + * 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$ + */ + +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "auth.h" +#include "config.h" +#include "misc.h" +#include "proto.h" +#include "stream.h" + +#define MD5_BYTES 16 + +/* This should be at least 2 * MD5_BYTES + 6 (length of "$md5$" + 1) */ +#define MD5_CHARS_MAX (2*(MD5_BYTES)+6) + +struct srvrecord { + char server[MAXHOSTNAMELEN]; + char client[256]; + char password[256]; +}; + +static int auth_domd5auth(struct config *); +static int auth_lookuprecord(char *, struct srvrecord *); +static int auth_parsetoken(char **, char *, int); +static void auth_makesecret(struct srvrecord *, char *); +static void auth_makeresponse(char *, char *, char *); +static void auth_readablesum(unsigned char *, char *); +static void auth_makechallenge(struct config *, char *); +static int auth_checkresponse(char *, char *, char *); + +int auth_login(struct config *config) +{ + struct stream *s; + char hostbuf[MAXHOSTNAMELEN]; + char *login, *host; + int error; + + s = config->server; + error = gethostname(hostbuf, sizeof(hostbuf)); + hostbuf[sizeof(hostbuf) - 1] = '\0'; + if (error) + host = NULL; + else + host = hostbuf; + login = getlogin(); + proto_printf(s, "USER %s %s\n", login != NULL ? login : "?", + host != NULL ? host : "?"); + stream_flush(s); + error = auth_domd5auth(config); + return (error); +} + +static int +auth_domd5auth(struct config *config) +{ + struct stream *s; + char *line, *cmd, *challenge, *realm, *client, *srvresponse, *msg; + char shrdsecret[MD5_CHARS_MAX], response[MD5_CHARS_MAX]; + char clichallenge[MD5_CHARS_MAX]; + struct srvrecord auth; + int error; + + lprintf(2, "MD5 authentication started\n"); + s = config->server; + line = stream_getln(s, NULL); + cmd = proto_get_ascii(&line); + realm = proto_get_ascii(&line); + challenge = proto_get_ascii(&line); + if (challenge == NULL || + line != NULL || + (strcmp(cmd, "AUTHMD5") != 0)) { + lprintf(-1, "Invalid server reply to USER\n"); + return (STATUS_FAILURE); + } + + client = NULL; + response[0] = clichallenge[0] = '.'; + response[1] = clichallenge[1] = 0; + if (config->reqauth || (strcmp(challenge, ".") != 0)) { + if (strcmp(realm, ".") == 0) { + lprintf(-1, "Authentication required, but not enabled on server\n"); + return (STATUS_FAILURE); + } + error = auth_lookuprecord(realm, &auth); + if (error != STATUS_SUCCESS) + return (error); + client = auth.client; + auth_makesecret(&auth, shrdsecret); + } + + if (strcmp(challenge, ".") != 0) + auth_makeresponse(challenge, shrdsecret, response); + if (config->reqauth) + auth_makechallenge(config, clichallenge); + proto_printf(s, "AUTHMD5 %s %s %s\n", + client == NULL ? "." : client, response, clichallenge); + stream_flush(s); + line = stream_getln(s, NULL); + cmd = proto_get_ascii(&line); + if (cmd == NULL || line == NULL) + goto bad; + if (strcmp(cmd, "OK") == 0) { + srvresponse = proto_get_ascii(&line); + if (srvresponse == NULL) + goto bad; + if (config->reqauth && + !auth_checkresponse(srvresponse, clichallenge, shrdsecret)) { + lprintf(-1, "Server failed to authenticate itself to client\n"); + return (STATUS_FAILURE); + } + lprintf(2, "MD5 authentication successfull\n"); + return (STATUS_SUCCESS); + } + if (strcmp(cmd, "!") == 0) { + msg = proto_get_rest(&line); + if (msg == NULL) + goto bad; + lprintf(-1, "Server error: %s\n", msg); + return (STATUS_FAILURE); + } +bad: + lprintf(-1, "Invalid server reply to AUTHMD5\n"); + return (STATUS_FAILURE); +} + +static int +auth_lookuprecord(char *server, struct srvrecord *auth) +{ + char *home, *line, authfile[FILENAME_MAX]; + struct stream *s; + int linenum = 0, error; + + home = getenv("HOME"); + if (home == NULL) { + lprintf(-1, "Environment variable \"HOME\" is not set\n"); + return (STATUS_FAILURE); + } + snprintf(authfile, sizeof(authfile), "%s/%s", home, AUTHFILE); + s = stream_open_file(authfile, O_RDONLY); + if (s == NULL) { + lprintf(-1, "Could not open file %s\n", authfile); + return (STATUS_FAILURE); + } + + while ((line = stream_getln(s, NULL)) != NULL) { + linenum++; + if (line[0] == '#' || line[0] == '\0') + continue; + error = auth_parsetoken(&line, auth->server, + sizeof(auth->server)); + if (error != STATUS_SUCCESS) { + lprintf(-1, "%s:%d Missng client name\n", authfile, linenum); + goto close; + } + /* Skip the rest of this line, it isn't what we are looking for. */ + if (strcmp(auth->server, server) != 0) + continue; + error = auth_parsetoken(&line, auth->client, + sizeof(auth->client)); + if (error != STATUS_SUCCESS) { + lprintf(-1, "%s:%d Missng password\n", authfile, linenum); + goto close; + } + error = auth_parsetoken(&line, auth->password, + sizeof(auth->password)); + if (error != STATUS_SUCCESS) { + lprintf(-1, "%s:%d Missng comment\n", authfile, linenum); + goto close; + } + stream_close(s); + lprintf(2, "Found authentication record for server \"%s\"\n", + server); + return (STATUS_SUCCESS); + } + lprintf(-1, "Unknown server \"%s\". Fix your %s\n", server , authfile); + memset(auth->password, 0, sizeof(auth->password)); +close: + stream_close(s); + return (STATUS_FAILURE); +} + +static int +auth_parsetoken(char **line, char *buf, int len) +{ + char *colon; + + colon = strchr(*line, ':'); + if (colon == NULL) + return (STATUS_FAILURE); + *colon = 0; + buf[len - 1] = 0; + strncpy(buf, *line, len - 1); + *line = colon + 1; + return (STATUS_SUCCESS); +} + +static void +auth_makesecret(struct srvrecord *auth, char *secret) +{ + char *s, ch; + const char *md5salt = "$md5$"; + unsigned char md5sum[MD5_BYTES]; + MD5_CTX md5; + + MD5_Init(&md5); + for (s = auth->client; *s != 0; ++s) { + ch = tolower(*s); + MD5_Update(&md5, &ch, 1); + } + MD5_Update(&md5, ":", 1); + for (s = auth->server; *s != 0; ++s) { + ch = tolower(*s); + MD5_Update(&md5, &ch, 1); + } + MD5_Update(&md5, ":", 1); + MD5_Update(&md5, auth->password, strlen(auth->password)); + MD5_Final(md5sum, &md5); + memset(secret, 0, sizeof(secret)); + strcpy(secret, md5salt); + auth_readablesum(md5sum, secret + strlen(md5salt)); +} + +static void +auth_makeresponse(char *challenge, char *sharedsecret, char *response) +{ + MD5_CTX md5; + unsigned char md5sum[MD5_BYTES]; + + MD5_Init(&md5); + MD5_Update(&md5, sharedsecret, strlen(sharedsecret)); + MD5_Update(&md5, ":", 1); + MD5_Update(&md5, challenge, strlen(challenge)); + MD5_Final(md5sum, &md5); + auth_readablesum(md5sum, response); +} + +/* + * Generates a challenge string which is an MD5 sum + * of a fairly random string. The purpose is to decrease + * the possibility of generating the same challenge + * string (even by different clients) more then once + * for the same server. + */ +static void +auth_makechallenge(struct config *config, char *challenge) +{ + MD5_CTX md5; + unsigned char md5sum[MD5_BYTES]; + char buf[128]; + struct timeval tv; + struct sockaddr_in laddr; + pid_t pid, ppid; + int error, addrlen; + + gettimeofday(&tv, NULL); + pid = getpid(); + ppid = getppid(); + srand(tv.tv_usec ^ tv.tv_sec ^ pid); + addrlen = sizeof(laddr); + error = getsockname(config->socket, (struct sockaddr *)&laddr, &addrlen); + if (error < 0) { + memset(&laddr, 0, sizeof(laddr)); + } + gettimeofday(&tv, NULL); + MD5_Init(&md5); + snprintf(buf, sizeof(buf), "%s:%ld:%ld:%ld:%d:%d", + inet_ntoa(laddr.sin_addr), tv.tv_sec, tv.tv_usec, random(), pid, ppid); + MD5_Update(&md5, buf, strlen(buf)); + MD5_Final(md5sum, &md5); + auth_readablesum(md5sum, challenge); +} + +static int +auth_checkresponse(char *response, char *challenge, char *secret) +{ + char correctresponse[MD5_CHARS_MAX]; + + auth_makeresponse(challenge, secret, correctresponse); + return (strcmp(response, correctresponse) == 0); +} + +static void +auth_readablesum(unsigned char *md5sum, char *readable) +{ + unsigned int i; + char *s = readable; + + for (i = 0; i < MD5_BYTES; ++i, s+=2) { + sprintf(s, "%.2x", md5sum[i]); + } +} + Added: head/contrib/csup/auth.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/csup/auth.h Tue Feb 2 05:57:42 2010 (r203368) @@ -0,0 +1,38 @@ +/*- + * Copyright (c) 2003-2007, Petar Zhivkov Petrov + * 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$ + */ +#ifndef _AUTH_H_ +#define _AUTH_H_ + +#define AUTHFILE ".csup/auth" /* user home relative */ + +struct config; + +int auth_login(struct config *); + +#endif /* !_AUTH_H_ */ + Modified: head/contrib/csup/config.h ============================================================================== --- head/contrib/csup/config.h Tue Feb 2 01:20:33 2010 (r203367) +++ head/contrib/csup/config.h Tue Feb 2 05:57:42 2010 (r203368) @@ -108,6 +108,7 @@ struct config { struct chan *chan1; struct stream *server; fattr_support_t fasupport; + int reqauth; }; struct config *config_init(const char *, struct coll *, int); Added: head/contrib/csup/cpasswd.1 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/csup/cpasswd.1 Tue Feb 2 05:57:42 2010 (r203368) @@ -0,0 +1,120 @@ +.\" Copyright 1999-2003 John D. Polstra. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgment: +.\" This product includes software developed by John D. Polstra. +.\" 4. The name of the author may not be used to endorse or promote products +.\" derived from this software without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.\" +.\" $Id: cvpasswd.1,v 1.4 2003/03/04 18:24:42 jdp Exp $ +.\" $FreeBSD $ +.\" +.Dd June 27, 2007 +.Os FreeBSD +.Dt CPASSWD 1 +.Sh NAME +.Nm cpasswd +.Nd scramble passwords for csup authentication +.Sh SYNOPSIS +.Nm +.Ar clientName +.Ar serverName +.Sh DESCRIPTION +The +.Nm +utility creates scrambled passwords for the +.Nm CVSup +server's authentication database. It is invoked with a client name +and a server name. +.Ar ClientName +is the name the client uses to gain access to the +server. By convention, e-mail addresses are used for all client +names, e.g., +.Ql BillyJoe@FreeBSD.ORG . +Client names are case-insensitive. +.Pp +.Ar ServerName +is the name of the +.Nm CVSup +server which the client wishes to access. By convention, +it is the canonical fully-qualified domain name of the server, e.g., +.Ql CVSup.FreeBSD.ORG . +This must agree with the server's own idea of its name. The name is +case-insensitive. +.Pp +To set up authentication for a given server, one must perform the +following steps: +.Bl -enum +.It +Obtain the official +.Ar serverName +from the administrator of the server or from some other source. +.It +Choose an appropriate +.Ar clientName . +It should be in the form of a valid e-mail address, to make it easy +for the server administrator to contact the user if necessary. +.It +Choose an arbitrary secret +.Ar password . +.It +Run +.Nm cpasswd , +and type in the +.Ar password +when prompted for it. The utility will print out a line to send +to the server administrator, and instruct you how to modify your +.Li $ Ns Ev HOME Ns Pa /.csup/auth +file. You should use a secure channel to send the line to the +server administrator. +.El +.Pp +Since +.Li $ Ns Ev HOME Ns Pa /.csup/auth +contains passwords, you should ensure that it is not readable by +anyone except yourself. +.Sh FILES +.Bl -tag -width $HOME/.csup/authxx -compact +.It Li $ Ns Ev HOME Ns Pa /.csup/auth +Authentication password file. +.El +.Sh SEE ALSO +.Xr csup 1 , +.Xr cvsup 1 , +.Xr cvsupd 8 . +.Pp +.Bd -literal +http://www.cvsup.org/ +.Ed +.Sh AUTHORS +.An -nosplit +.An Petar Zhivkov Petrov Aq pesho.petrov@gmail.com +is the author of +.Nm , +the rewrite of +.Nm cvpasswd . +.An John Polstra Aq jdp@polstra.com +is the author of +.Nm CVSup . +.Sh LEGALITIES +CVSup is a registered trademark of John D. Polstra. Added: head/contrib/csup/cpasswd.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/csup/cpasswd.sh Tue Feb 2 05:57:42 2010 (r203368) @@ -0,0 +1,135 @@ +#! /bin/sh +# +# Copyright 2007. Petar Zhivkov Petrov +# pesho.petrov@gmail.com +# +# $FreeBSD$ + +usage() { + echo "Usage: $0 clientName serverName" + echo " $0 -v" +} + +countChars() { + _count="`echo "$1" | sed -e "s/[^$2]//g" | tr -d "\n" | wc -c`" + return 0 +} + +readPassword() { + while [ true ]; do + stty -echo + read -p "$1" _password + stty echo + echo "" + countChars "$_password" ":" + if [ $_count != 0 ]; then + echo "Sorry, password must not contain \":\" characters" + echo "" + else + break + fi + done + return 0 +} + +makeSecret() { + local clientLower="`echo "$1" | tr "[:upper:]" "[:lower:]"`" + local serverLower="`echo "$2" | tr "[:upper:]" "[:lower:]"`" + local secret="`md5 -qs "$clientLower:$serverLower:$3"`" + _secret="\$md5\$$secret" +} + +if [ $# -eq 1 -a "X$1" = "X-v" ]; then + echo "Csup authentication key generator" + usage + exit +elif [ $# -ne 2 ]; then + usage + exit +fi + +clientName=$1 +serverName=$2 + +# +# Client name must contain exactly one '@' and at least one '.'. +# It must not contain a ':'. +# + +countChars "$clientName" "@" +aCount=$_count + +countChars "$clientName" "." +dotCount=$_count +if [ $aCount -ne 1 -o $dotCount -eq 0 ]; then + echo "Client name must have the form of an e-mail address," + echo "e.g., \"user@domain.com\"" + exit +fi + +countChars "$clientName" ":" +colonCount=$_count +if [ $colonCount -gt 0 ]; then + echo "Client name must not contain \":\" characters" + exit +fi + +# +# Server name must not contain '@' and must have at least one '.'. +# It also must not contain a ':'. +# + +countChars "$serverName" "@" +aCount=$_count + +countChars "$serverName" "." +dotCount=$_count +if [ $aCount != 0 -o $dotCount = 0 ]; then + echo "Server name must be a fully-qualified domain name." + echo "e.g., \"host.domain.com\"" + exit +fi + +countChars "$serverName" ":" +colonCount=$_count +if [ $colonCount -gt 0 ]; then + echo "Server name must not contain \":\" characters" + exit +fi + +# +# Ask for password and generate secret. +# + +while [ true ]; do + readPassword "Enter password: " + makeSecret "$clientName" "$serverName" "$_password" + secret=$_secret + + readPassword "Enter same password again: " + makeSecret "$clientName" "$serverName" "$_password" + secret2=$_secret + + if [ "X$secret" = "X$secret2" ]; then + break + else + echo "Passwords did not match. Try again." + echo "" + fi +done + +echo "" +echo "Send this line to the server administrator at $serverName:" +echo "-------------------------------------------------------------------------------" +echo "$clientName:$secret::" +echo "-------------------------------------------------------------------------------" +echo "Be sure to send it using a secure channel!" +echo "" +echo "Add this line to your file \"$HOME/.csup/auth\", replacing \"XXX\"" +echo "with the password you typed in:" +echo "-------------------------------------------------------------------------------" +echo "$serverName:$clientName:XXX:" +echo "-------------------------------------------------------------------------------" +echo "Make sure the file is readable and writable only by you!" +echo "" + Modified: head/contrib/csup/csup.1 ============================================================================== --- head/contrib/csup/csup.1 Tue Feb 2 01:20:33 2010 (r203367) +++ head/contrib/csup/csup.1 Tue Feb 2 05:57:42 2010 (r203368) @@ -32,7 +32,7 @@ .Nd network distribution package for CVS repositories .Sh SYNOPSIS .Nm -.Op Fl 146ksvzZ +.Op Fl 146aksvzZ .Op Fl A Ar addr .Op Fl b Ar base .Op Fl c Ar collDir @@ -106,6 +106,12 @@ to use IPv4 addresses only. Forces .Nm to use IPv6 addresses only. +.It Fl a +Requires the server to authenticate itself (prove its identity) to +the client. If authentication of the server fails, the update is +canceled. See +.Sx AUTHENTICATION , +below. .It Fl A Ar addr Specifies a local address to bind to when connecting to the server. The local address might be a hostname or a numeric host address string @@ -793,6 +799,102 @@ as well: .It .Pa /bar/stool/src-all/refuse.cvs:RELENG_3 .El +.Sh AUTHENTICATION +.Nm +implements an optional authentication mechanism which can be used by the +client and server to verify each other's identities. +Public CVSup servers normally do not enable authentication. +.Nm +users may ignore this section unless they have been informed +that authentication is required by the administrator of their server. +.Pp +The authentication subsystem uses a +challenge-response protocol which is immune to packet sniffing and +replay attacks. No passwords are sent over the network in either +direction. Both the client and the server can independently verify +the identities of each other. +.Pp +The file +.Li $ Ns Ev HOME Ns Pa /.csup/auth +holds the information used for authentication. This file contains a +record for each server that the client is allowed to access. Each +record occupies one line in the file. Lines beginning with +.Ql # +are ignored, as are lines containing only white space. White space is +significant everywhere else in the file. Fields are separated by +.Ql \&: +characters. +.Pp +Each record of the file has the following form: +.Bd -literal -offset indent +.Sm off +.Xo Ar serverName No : Ar clientName No : +.Ar password No : Ar comment +.Xc +.Sm on +.Ed +.Pp +All fields must be present even if some of them are empty. +.Ar ServerName +is the name of the server to which the record applies. By convention, +it is the canonical fully-qualified domain name of the server, e.g., +.Ql CVSup177.FreeBSD.ORG . +This must agree with the server's own idea of its name. The name is +case-insensitive. +.Pp +.Ar ClientName +is the name the client uses to gain access to the server. By +convention, e-mail addresses are used for all client names, e.g., +.Ql BillyJoe@FreeBSD.ORG . +Client names are case-insensitive. +.Pp +.Ar Password +is a secret string of characters that the client uses to prove its +identity. It may not contain any +.Ql \&: +or newline characters. +.Pp +.Ar Comment +may contain any additional information to identify the record. It +is not interpreted by the program. +.Pp +To set up authentication for a given server, one must perform the +following steps: +.Bl -enum +.It +Obtain the official +.Ar serverName +from the administrator of the server or from some other source. +.It +Choose an appropriate +.Ar clientName . +It should be in the form of a valid e-mail address, to make it easy +for the server administrator to contact the user if necessary. +.It +Choose an arbitrary secret +.Ar password . +.It +Run the +.Nm cpasswd +utility, and type in the +.Ar password +when prompted for it. The utility will print out a line to send +to the server administrator, and instruct you how to modify your +.Li $ Ns Ev HOME Ns Pa /.csup/auth +file. You should use a secure channel to send the line to the +server administrator. +.El +.Pp +Since +.Li $ Ns Ev HOME Ns Pa /.csup/auth +contains passwords, you should ensure that it is not readable by +anyone except yourself. +.Pp +Authentication works independently in both directions. The server +administrator controls whether you must prove your identity. +You control whether to check the server's identity, by means of the +.Fl a +command line option. .Sh csup AND FIREWALLS In its default mode, .Nm @@ -865,6 +967,7 @@ subdirectory. List files. .El .Sh SEE ALSO +.Xr cpasswd 1 , .Xr cvs 1 , .Xr rcsintro 1 , .Xr ssh 1 . Modified: head/contrib/csup/main.c ============================================================================== --- head/contrib/csup/main.c Tue Feb 2 01:20:33 2010 (r203367) +++ head/contrib/csup/main.c Tue Feb 2 05:57:42 2010 (r203368) @@ -60,6 +60,8 @@ usage(char *argv0) "(same as \"-r 0\")"); lprintf(-1, USAGE_OPTFMT, "-4", "Force usage of IPv4 addresses"); lprintf(-1, USAGE_OPTFMT, "-6", "Force usage of IPv6 addresses"); + lprintf(-1, USAGE_OPTFMT, "-a", + "Require server to authenticate itself to us"); lprintf(-1, USAGE_OPTFMT, "-A addr", "Bind local socket to a specific address"); lprintf(-1, USAGE_OPTFMT, "-b base", @@ -107,7 +109,7 @@ main(int argc, char *argv[]) struct stream *lock; char *argv0, *file, *lockfile; int family, error, lockfd, lflag, overridemask; - int c, i, deletelim, port, retries, status; + int c, i, deletelim, port, retries, status, reqauth; time_t nexttry; error = 0; @@ -124,9 +126,10 @@ main(int argc, char *argv[]) lockfile = NULL; override = coll_new(NULL); overridemask = 0; + reqauth = 0; while ((c = getopt(argc, argv, - "146A:b:c:d:gh:i:kl:L:p:P:r:svzZ")) != -1) { + "146aA:b:c:d:gh:i:kl:L:p:P:r:svzZ")) != -1) { switch (c) { case '1': retries = 0; @@ -137,6 +140,10 @@ main(int argc, char *argv[]) case '6': family = AF_INET6; break; + case 'a': + /* Require server authentication */ + reqauth = 1; + break; case 'A': error = getaddrinfo(optarg, NULL, NULL, &res); if (error) { @@ -303,6 +310,7 @@ main(int argc, char *argv[]) config->laddrlen = laddrlen; } config->deletelim = deletelim; + config->reqauth = reqauth; lprintf(2, "Connecting to %s\n", config->host); i = 0; Modified: head/contrib/csup/proto.c ============================================================================== --- head/contrib/csup/proto.c Tue Feb 2 01:20:33 2010 (r203367) +++ head/contrib/csup/proto.c Tue Feb 2 05:57:42 2010 (r203368) @@ -45,6 +45,7 @@ #include #include +#include "auth.h" #include "config.h" #include "detailer.h" #include "fattr.h" @@ -74,7 +75,6 @@ static void killer_stop(struct killer static int proto_waitconnect(int); static int proto_greet(struct config *); static int proto_negproto(struct config *); -static int proto_login(struct config *); static int proto_fileattr(struct config *); static int proto_xchgcoll(struct config *); static struct mux *proto_mux(struct config *); @@ -251,56 +251,6 @@ bad: return (STATUS_FAILURE); } -static int -proto_login(struct config *config) -{ - struct stream *s; - char hostbuf[MAXHOSTNAMELEN]; - char *line, *login, *host, *cmd, *realm, *challenge, *msg; - int error; - - s = config->server; - error = gethostname(hostbuf, sizeof(hostbuf)); - hostbuf[sizeof(hostbuf) - 1] = '\0'; - if (error) - host = NULL; - else - host = hostbuf; - login = getlogin(); - proto_printf(s, "USER %s %s\n", login != NULL ? login : "?", - host != NULL ? host : "?"); - stream_flush(s); - line = stream_getln(s, NULL); - cmd = proto_get_ascii(&line); - realm = proto_get_ascii(&line); - challenge = proto_get_ascii(&line); - if (challenge == NULL || line != NULL) - goto bad; - if (strcmp(realm, ".") != 0 || strcmp(challenge, ".") != 0) { - lprintf(-1, "Authentication required by the server and not " - "supported by client\n"); - return (STATUS_FAILURE); - } - proto_printf(s, "AUTHMD5 . . .\n"); - stream_flush(s); - line = stream_getln(s, NULL); - cmd = proto_get_ascii(&line); - if (cmd == NULL || line == NULL) - goto bad; - if (strcmp(cmd, "OK") == 0) - return (STATUS_SUCCESS); - if (strcmp(cmd, "!") == 0) { - msg = proto_get_rest(&line); - if (msg == NULL) - goto bad; - lprintf(-1, "Server error: %s\n", msg); - return (STATUS_FAILURE); - } -bad: - lprintf(-1, "Invalid server reply to AUTHMD5\n"); - return (STATUS_FAILURE); -} - /* * File attribute support negotiation. */ @@ -601,7 +551,7 @@ proto_run(struct config *config) if (status == STATUS_SUCCESS) status = proto_negproto(config); if (status == STATUS_SUCCESS) - status = proto_login(config); + status = auth_login(config); if (status == STATUS_SUCCESS) status = proto_fileattr(config); if (status == STATUS_SUCCESS) Modified: head/usr.bin/csup/Makefile ============================================================================== --- head/usr.bin/csup/Makefile Tue Feb 2 01:20:33 2010 (r203367) +++ head/usr.bin/csup/Makefile Tue Feb 2 05:57:42 2010 (r203368) @@ -4,6 +4,7 @@ PROG= csup SRCS= attrstack.c \ + auth.c \ config.c \ detailer.c \ diff.c \ @@ -37,4 +38,7 @@ WARNS?= 1 DPADD= ${LIBCRYPTO} ${LIBZ} ${LIBPTHREAD} LDADD= -lcrypto -lz -lpthread +SCRIPTS= cpasswd.sh +MAN= csup.1 cpasswd.1 + .include From owner-svn-src-all@FreeBSD.ORG Tue Feb 2 06:07:51 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 58856106568F; Tue, 2 Feb 2010 06:07:51 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail07.syd.optusnet.com.au (mail07.syd.optusnet.com.au [211.29.132.188]) by mx1.freebsd.org (Postfix) with ESMTP id E1B7D8FC20; Tue, 2 Feb 2010 06:07:50 +0000 (UTC) Received: from c122-106-174-165.carlnfd1.nsw.optusnet.com.au (c122-106-174-165.carlnfd1.nsw.optusnet.com.au [122.106.174.165]) by mail07.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o1267ev5006976 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 2 Feb 2010 17:07:43 +1100 Date: Tue, 2 Feb 2010 17:07:40 +1100 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: "M. Warner Losh" In-Reply-To: <20100201.104537.578650865272929831.imp@bsdimp.com> Message-ID: <20100202163610.J80621@delplex.bde.org> References: <201002011413.o11EDiPm074656@svn.freebsd.org> <20100202012830.B1230@besplex.bde.org> <20100201.104537.578650865272929831.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, luigi@FreeBSD.org, src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, brde@optusnet.com.au Subject: Re: svn commit: r203343 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2010 06:07:51 -0000 On Mon, 1 Feb 2010, M. Warner Losh wrote: > In message: <20100202012830.B1230@besplex.bde.org> > Bruce Evans writes: > : Rev.1.30 attempted to fix this by also adding the __aligned(4) > : attribute. > : I haven't checked that this works. It adds additional unportability > : and > : ugliness. > > __packed is necessary for ARM where the rules of the ABI we use are > such that this structure isn't properly packed otherwise.[*] Is arm's broken ABI really that broken? _This_ struct's correct size is a multiple of 4, so it isn't affected by arm's padding at the end. It takes a broken ABI for bi-fields to give a problem, but arm is not that broken AFAIK (**). I think __packed is just FUD for this struct. > __aligned(4) tells the compiler that pointers to this structure are > 4-byte aligned, which helps on many platforms generate more optimal > code. > > The root cause of all this mess is that 'C' doesn't have any good, > easy ways to specify "on the wire" formats of structures. So we have > to play these games to make the headers we snarfed off the wire match > the C structs that we're using to access the fields in those > structures. We are necessarily in unportability land here. It is > only by the chance alignment of the x86 ABI and the wire format that > the project was able to ignore the issue for so long... Not really chance. No reasonable ABI requires excessive alignment. This is depended on in 100's of other places, especially in device drivers. Some of the other places don't even use __packed. Their problems on arm have apparently been limited by a combination of not using bit-fields and > [*] Of course, it could be argued that ARM should use a different > and/or better ABI for newer cores, and I'd agree with that... But > until that's fixed, we have to cope. Even while waiting for the fix, it would be nice to use a local fix -munbroken-alignment, in one MD place (Makefile.arm, although that won't work for headers that are (ab)used in userland), instead of engrotting 100's of "MI" places hacks like __packed. Of course it's a hack to use a struct at all. (**) I couldn't find any documentation of the alignment for bit-fields in gcc.info, except this for powerpc: % `-mno-bit-align' % `-mbit-align' % On System V.4 and embedded PowerPC systems do not (do) force % structures and unions that contain bit-fields to be aligned to the % base type of the bit-field. % % For example, by default a structure containing nothing but 8 % `unsigned' bit-fields of length 1 would be aligned to a 4 byte % boundary and have a size of 4 bytes. By using `-mno-bit-align', % the structure would be aligned to a 1 byte boundary and be one % byte in size. This says that the -mno-bit-align option may be used to turn off excessive alignment for the struct, but only for powerpc. Reading between the lines, it says that powerpc normally has the same behaviour as i386 -- it is not so broken as to align the individual 1-bit bit-fields to a 4-byte boundary. Whether it adds 3 bytes of useless padding at the end of the bit-fields to pad them to sizeof(unsigned) is less clear. Bruce From owner-svn-src-all@FreeBSD.ORG Tue Feb 2 07:28:02 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 72B21106566C; Tue, 2 Feb 2010 07:28:02 +0000 (UTC) (envelope-from joel@freebsd.org) Received: from mail.vnode.se (mail.vnode.se [62.119.52.80]) by mx1.freebsd.org (Postfix) with ESMTP id 27E428FC15; Tue, 2 Feb 2010 07:28:01 +0000 (UTC) Received: from mail.vnode.se (localhost [127.0.0.1]) by mail.vnode.se (Postfix) with ESMTP id 781C0E3F086; Tue, 2 Feb 2010 08:28:00 +0100 (CET) X-Virus-Scanned: amavisd-new at vnode.se Received: from mail.vnode.se ([127.0.0.1]) by mail.vnode.se (mail.vnode.se [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id k2N476aMFWyF; Tue, 2 Feb 2010 08:27:57 +0100 (CET) Received: by mail.vnode.se (Postfix, from userid 1004) id 1D170E3F085; Tue, 2 Feb 2010 08:27:57 +0100 (CET) Date: Tue, 2 Feb 2010 08:27:57 +0100 From: Joel Dahl To: Ulf Lilleengen Message-ID: <20100202072757.GB15285@mail.vnode.se> References: <201002020557.o125vgTl089837@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201002020557.o125vgTl089837@svn.freebsd.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r203368 - in head: contrib/csup usr.bin/csup X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2010 07:28:02 -0000 On 5:57 02-02-10, Ulf Lilleengen wrote: > Author: lulf > Date: Tue Feb 2 05:57:42 2010 > New Revision: 203368 > URL: http://svn.freebsd.org/changeset/base/203368 > > Log: > - Add support for CVSup authentication mechanisms to csup. > - Include a cpasswd script performing the same mechanisms as the cvpasswd > utility from CVSup. Isn't it about time we move csup away from contrib/? It isn't contributed software anymore and all development seems to happen in the FreeBSD repo. -- Joel From owner-svn-src-all@FreeBSD.ORG Tue Feb 2 08:01:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9720D1065679; Tue, 2 Feb 2010 08:01:42 +0000 (UTC) (envelope-from lulf@freebsd.org) Received: from hylle01.itea.ntnu.no (hylle01.itea.ntnu.no [IPv6:2001:700:300:3::100]) by mx1.freebsd.org (Postfix) with ESMTP id ED4318FC1C; Tue, 2 Feb 2010 08:01:41 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hylle01.itea.ntnu.no (Postfix) with ESMTP id 2549331E03A; Tue, 2 Feb 2010 09:01:41 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at hylle01.itea.ntnu.no Received: from carrot (caracal.stud.ntnu.no [IPv6:2001:700:300:3::185]) by hylle01.itea.ntnu.no (Postfix) with ESMTP id CCB2531E024; Tue, 2 Feb 2010 09:01:40 +0100 (CET) Date: Tue, 2 Feb 2010 09:03:26 +0100 From: Ulf Lilleengen To: Joel Dahl Message-ID: <20100202080326.GA2607@carrot> References: <201002020557.o125vgTl089837@svn.freebsd.org> <20100202072757.GB15285@mail.vnode.se> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100202072757.GB15285@mail.vnode.se> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r203368 - in head: contrib/csup usr.bin/csup X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2010 08:01:42 -0000 On Tue, Feb 02, 2010 at 08:27:57AM +0100, Joel Dahl wrote: > On 5:57 02-02-10, Ulf Lilleengen wrote: > > Author: lulf > > Date: Tue Feb 2 05:57:42 2010 > > New Revision: 203368 > > URL: http://svn.freebsd.org/changeset/base/203368 > > > > Log: > > - Add support for CVSup authentication mechanisms to csup. > > - Include a cpasswd script performing the same mechanisms as the cvpasswd > > utility from CVSup. > > > > Isn't it about time we move csup away from contrib/? It isn't contributed > software anymore and all development seems to happen in the FreeBSD repo. > Ah, yes. I forgot about that, sorry. Mvh Ulf From owner-svn-src-all@FreeBSD.ORG Tue Feb 2 08:20:25 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4E72A106566B; Tue, 2 Feb 2010 08:20:25 +0000 (UTC) (envelope-from etnapierala@googlemail.com) Received: from mail-ew0-f222.google.com (mail-ew0-f222.google.com [209.85.219.222]) by mx1.freebsd.org (Postfix) with ESMTP id 06F048FC27; Tue, 2 Feb 2010 08:20:23 +0000 (UTC) Received: by ewy22 with SMTP id 22so508393ewy.34 for ; Tue, 02 Feb 2010 00:20:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:sender:subject:mime-version :content-type:from:in-reply-to:date:cc:content-transfer-encoding :message-id:references:to:x-mailer; bh=oafrNZyTA6SanoiS6FsgOxHct00Tj/Dz5sP9CifxmDo=; b=mEEV3o9rncD1fU7pjyM/I3+Qk9wyoEmpVOLHpij7/ZD2Lp7mZpfkcm/4z1Tc+47Tup Xoh/3OLc52gDVUmVpVmlmNEZlFL6ntYqGgcjHWa5mGI1KMCmT1uFgaJi47FlIs9tmP7J rpUSwu5NdeVCFz3Ev0OGAUFJP8idiglcCbYAk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=sender:subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; b=hO8uyAu942v2BRqK5GMFt68/E2Gbie+Qi1JtbEtH8E4T/o7I6h/XGLrKa2NLByHm2w zE9Ln+vowh13hMX/717rWka3vDcTURO6Q7QtQ8J+98jCGy9uGbDhxwdwvqPPhF51ZtSC vBGByjVPXarEdJKSrvLwvJkEb5yqK4RwrFiZA= Received: by 10.213.25.67 with SMTP id y3mr372546ebb.73.1265098820474; Tue, 02 Feb 2010 00:20:20 -0800 (PST) Received: from enapierala.wheel.pl (ghf58.internetdsl.tpnet.pl [83.12.187.58]) by mx.google.com with ESMTPS id 16sm4314124ewy.6.2010.02.02.00.20.18 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 02 Feb 2010 00:20:19 -0800 (PST) Sender: =?UTF-8?Q?Edward_Napiera=C5=82a?= Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: text/plain; charset=iso-8859-2 From: =?iso-8859-2?Q?Edward_Tomasz_Napiera=B3a?= In-Reply-To: <201001310211.o0V2BEmY075710@svn.freebsd.org> Date: Tue, 2 Feb 2010 09:20:15 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <3AE0AC65-3226-40B3-B78B-48FD4C525FFD@FreeBSD.org> References: <201001310211.o0V2BEmY075710@svn.freebsd.org> To: Edward Tomasz Napierala X-Mailer: Apple Mail (2.1077) 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: r203264 - stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2010 08:20:25 -0000 Wiadomo=B6=E6 napisana przez Edward Tomasz Napierala w dniu 2010-01-31, = o godz. 03:11: > Author: trasz > Date: Sun Jan 31 02:11:14 2010 > New Revision: 203264 > URL: http://svn.freebsd.org/changeset/base/203264 Note that MFC of NFSv4 ACL support in userland and ZFS was: Sponsored by: bytecamp GmbH (http://bytecamp.net) Patch against 8.0-RELEASE can be found at: http://people.freebsd.org/~trasz/acl-zfs-8.0.diff -- If you cut off my head, what would I say? Me and my head, or me and my = body? From owner-svn-src-all@FreeBSD.ORG Tue Feb 2 09:45:23 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8EF81106566B; Tue, 2 Feb 2010 09:45:23 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from vlakno.cz (77-93-215-190.static.masterinter.net [77.93.215.190]) by mx1.freebsd.org (Postfix) with ESMTP id 41CA08FC13; Tue, 2 Feb 2010 09:45:22 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 04CE29CB0D7; Tue, 2 Feb 2010 10:45:02 +0100 (CET) X-Virus-Scanned: amavisd-new at vlakno.cz Received: from vlakno.cz ([127.0.0.1]) by localhost (lev.vlakno.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dhJepBi0atXX; Tue, 2 Feb 2010 10:44:59 +0100 (CET) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id B43939CB0F4; Tue, 2 Feb 2010 10:44:59 +0100 (CET) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.14.3/8.14.3/Submit) id o129ixr8063934; Tue, 2 Feb 2010 10:44:59 +0100 (CET) (envelope-from rdivacky) Date: Tue, 2 Feb 2010 10:44:59 +0100 From: Roman Divacky To: Alan Cox Message-ID: <20100202094459.GA63817@freebsd.org> References: <201002011736.o11HamNe024852@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201002011736.o11HamNe024852@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r203351 - head/sys/i386/i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2010 09:45:23 -0000 On Mon, Feb 01, 2010 at 05:36:48PM +0000, Alan Cox wrote: > Author: alc > Date: Mon Feb 1 17:36:48 2010 > New Revision: 203351 > URL: http://svn.freebsd.org/changeset/base/203351 > > Log: > Change the default value for the flag enabling superpage mapping and > promotion to "on". no MFCing of this? From owner-svn-src-all@FreeBSD.ORG Tue Feb 2 10:00:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA55F1065672; Tue, 2 Feb 2010 10:00:23 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A9B2E8FC16; Tue, 2 Feb 2010 10:00:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o12A0N5D043583; Tue, 2 Feb 2010 10:00:23 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o12A0NOM043581; Tue, 2 Feb 2010 10:00:23 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201002021000.o12A0NOM043581@svn.freebsd.org> From: Gabor Kovesdan Date: Tue, 2 Feb 2010 10:00:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203370 - head/share/misc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2010 10:00:23 -0000 Author: gabor Date: Tue Feb 2 10:00:23 2010 New Revision: 203370 URL: http://svn.freebsd.org/changeset/base/203370 Log: - Add myself Approved by: delphij (mentor) Modified: head/share/misc/committers-src.dot Modified: head/share/misc/committers-src.dot ============================================================================== --- head/share/misc/committers-src.dot Tue Feb 2 07:39:56 2010 (r203369) +++ head/share/misc/committers-src.dot Tue Feb 2 10:00:23 2010 (r203370) @@ -93,6 +93,7 @@ fabient [label="Fabien Thomas\nfabient@F fanf [label="Tony Finch\nfanf@FreeBSD.org\n2002/05/05"] fjoe [label="Max Khon\nfjoe@FreeBSD.org\n2001/08/06"] flz [label="Florent Thoumie\nflz@FreeBSD.org\n2006/03/30"] +gabor [label="Gabor Kovesdan\ngabor@FreeBSD.org\n2010/02/02"] gad [label="Garance A. Drosehn\ngad@FreeBSD.org\n2000/10/27"] gallatin [label="Andrew Gallatin\ngallatin@FreeBSD.org\n????/??/??"] gavin [label="Gavin Atkinson\ngavin@FreeBSD.org\n2009/12/07"] @@ -244,6 +245,7 @@ cperciva -> simon csjp -> bushman +delphij -> gabor delphij -> rafan des -> anholt From owner-svn-src-all@FreeBSD.ORG Tue Feb 2 11:09:28 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AD7DD1065672; Tue, 2 Feb 2010 11:09:28 +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 9A5E68FC0A; Tue, 2 Feb 2010 11:09:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o12B9Sjg061208; Tue, 2 Feb 2010 11:09:28 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o12B9SEa061198; Tue, 2 Feb 2010 11:09:28 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201002021109.o12B9SEa061198@svn.freebsd.org> From: Alexander Motin Date: Tue, 2 Feb 2010 11:09:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203376 - in head: sbin/camcontrol sys/cam sys/cam/ata sys/dev/ahci sys/dev/ata sys/dev/siis X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2010 11:09:28 -0000 Author: mav Date: Tue Feb 2 11:09:28 2010 New Revision: 203376 URL: http://svn.freebsd.org/changeset/base/203376 Log: - Give ATA/SATA SIMs info about ATAPI packet size, supported by device. - Make ATA XPT to reject longer SCSI CDBs then supported by device, or any SCSI CDBs, if device doesn't support ATAPI. Modified: head/sbin/camcontrol/camcontrol.c head/sys/cam/ata/ata_xpt.c head/sys/cam/cam_ccb.h head/sys/dev/ahci/ahci.c head/sys/dev/ahci/ahci.h head/sys/dev/ata/ata-all.c head/sys/dev/ata/ata-all.h head/sys/dev/siis/siis.c head/sys/dev/siis/siis.h Modified: head/sbin/camcontrol/camcontrol.c ============================================================================== --- head/sbin/camcontrol/camcontrol.c Tue Feb 2 10:58:41 2010 (r203375) +++ head/sbin/camcontrol/camcontrol.c Tue Feb 2 11:09:28 2010 (r203376) @@ -1010,8 +1010,10 @@ camxferrate(struct cam_device *device) printf(" ("); if (ata->valid & CTS_ATA_VALID_MODE) printf("%s, ", ata_mode2string(ata->mode)); + if ((ata->valid & CTS_ATA_VALID_ATAPI) && ata->atapi != 0) + printf("ATAPI %dbytes, ", ata->atapi); if (ata->valid & CTS_ATA_VALID_BYTECOUNT) - printf("PIO size %dbytes", ata->bytecount); + printf("PIO %dbytes", ata->bytecount); printf(")"); } else if (ccb->cts.transport == XPORT_SATA) { struct ccb_trans_settings_sata *sata = @@ -1022,8 +1024,10 @@ camxferrate(struct cam_device *device) printf("SATA %d.x, ", sata->revision); if (sata->valid & CTS_SATA_VALID_MODE) printf("%s, ", ata_mode2string(sata->mode)); + if ((sata->valid & CTS_SATA_VALID_ATAPI) && sata->atapi != 0) + printf("ATAPI %dbytes, ", sata->atapi); if (sata->valid & CTS_SATA_VALID_BYTECOUNT) - printf("PIO size %dbytes", sata->bytecount); + printf("PIO %dbytes", sata->bytecount); printf(")"); } @@ -2800,6 +2804,10 @@ cts_print(struct cam_device *device, str fprintf(stdout, "%sATA mode: %s\n", pathstr, ata_mode2string(ata->mode)); } + if ((ata->valid & CTS_ATA_VALID_ATAPI) != 0) { + fprintf(stdout, "%sATAPI packet length: %d\n", pathstr, + ata->atapi); + } if ((ata->valid & CTS_ATA_VALID_BYTECOUNT) != 0) { fprintf(stdout, "%sPIO transaction length: %d\n", pathstr, ata->bytecount); @@ -2817,6 +2825,10 @@ cts_print(struct cam_device *device, str fprintf(stdout, "%sATA mode: %s\n", pathstr, ata_mode2string(sata->mode)); } + if ((sata->valid & CTS_SATA_VALID_ATAPI) != 0) { + fprintf(stdout, "%sATAPI packet length: %d\n", pathstr, + sata->atapi); + } if ((sata->valid & CTS_SATA_VALID_BYTECOUNT) != 0) { fprintf(stdout, "%sPIO transaction length: %d\n", pathstr, sata->bytecount); Modified: head/sys/cam/ata/ata_xpt.c ============================================================================== --- head/sys/cam/ata/ata_xpt.c Tue Feb 2 10:58:41 2010 (r203375) +++ head/sys/cam/ata/ata_xpt.c Tue Feb 2 11:09:28 2010 (r203376) @@ -1334,7 +1334,20 @@ ata_device_transport(struct cam_path *pa cts.protocol = path->device->protocol; cts.protocol_version = path->device->protocol_version; cts.proto_specific.valid = 0; - cts.xport_specific.valid = 0; + if (ident_buf) { + if (path->device->transport == XPORT_ATA) { + cts.xport_specific.ata.atapi = + ((ident_buf->config & ATA_PROTO_MASK) == ATA_PROTO_ATAPI_16) ? 16 : + ((ident_buf->config & ATA_PROTO_MASK) == ATA_PROTO_ATAPI_12) ? 12 : 0; + cts.xport_specific.ata.valid = CTS_ATA_VALID_ATAPI; + } else { + cts.xport_specific.sata.atapi = + ((ident_buf->config & ATA_PROTO_MASK) == ATA_PROTO_ATAPI_16) ? 16 : + ((ident_buf->config & ATA_PROTO_MASK) == ATA_PROTO_ATAPI_12) ? 12 : 0; + cts.xport_specific.sata.valid = CTS_SATA_VALID_ATAPI; + } + } else + cts.xport_specific.valid = 0; xpt_action((union ccb *)&cts); } @@ -1366,6 +1379,27 @@ ata_action(union ccb *start_ccb) (*(sim->sim_action))(sim, start_ccb); break; } + case XPT_SCSI_IO: + { + struct cam_ed *device; + u_int maxlen = 0; + + device = start_ccb->ccb_h.path->device; + if (device->protocol == PROTO_SCSI && + (device->flags & CAM_DEV_IDENTIFY_DATA_VALID)) { + uint16_t p = + device->ident_data.config & ATA_PROTO_MASK; + + maxlen = (p == ATA_PROTO_ATAPI_16) ? 16 : + (p == ATA_PROTO_ATAPI_12) ? 12 : 0; + } + if (start_ccb->csio.cdb_len > maxlen) { + start_ccb->ccb_h.status = CAM_REQ_INVALID; + xpt_done(start_ccb); + break; + } + /* FALLTHROUGH */ + } default: xpt_action_default(start_ccb); break; Modified: head/sys/cam/cam_ccb.h ============================================================================== --- head/sys/cam/cam_ccb.h Tue Feb 2 10:58:41 2010 (r203375) +++ head/sys/cam/cam_ccb.h Tue Feb 2 11:09:28 2010 (r203376) @@ -823,8 +823,10 @@ struct ccb_trans_settings_ata { u_int valid; /* Which fields to honor */ #define CTS_ATA_VALID_MODE 0x01 #define CTS_ATA_VALID_BYTECOUNT 0x02 +#define CTS_ATA_VALID_ATAPI 0x20 int mode; /* Mode */ u_int bytecount; /* Length of PIO transaction */ + u_int atapi; /* Length of ATAPI CDB */ }; struct ccb_trans_settings_sata { @@ -834,11 +836,13 @@ struct ccb_trans_settings_sata { #define CTS_SATA_VALID_REVISION 0x04 #define CTS_SATA_VALID_PM 0x08 #define CTS_SATA_VALID_TAGS 0x10 +#define CTS_SATA_VALID_ATAPI 0x20 int mode; /* Legacy PATA mode */ u_int bytecount; /* Length of PIO transaction */ int revision; /* SATA revision */ u_int pm_present; /* PM is present (XPT->SIM) */ u_int tags; /* Number of allowed tags */ + u_int atapi; /* Length of ATAPI CDB */ }; /* Get/Set transfer rate/width/disconnection/tag queueing settings */ Modified: head/sys/dev/ahci/ahci.c ============================================================================== --- head/sys/dev/ahci/ahci.c Tue Feb 2 10:58:41 2010 (r203375) +++ head/sys/dev/ahci/ahci.c Tue Feb 2 11:09:28 2010 (r203376) @@ -2358,6 +2358,8 @@ ahciaction(struct cam_sim *sim, union cc d->tags = min(ch->numslots, cts->xport_specific.sata.tags); if (cts->xport_specific.sata.valid & CTS_SATA_VALID_PM) ch->pm_present = cts->xport_specific.sata.pm_present; + if (cts->xport_specific.sata.valid & CTS_SATA_VALID_ATAPI) + d->atapi = cts->xport_specific.sata.atapi; ccb->ccb_h.status = CAM_REQ_CMP; xpt_done(ccb); break; @@ -2401,6 +2403,8 @@ ahciaction(struct cam_sim *sim, union cc cts->xport_specific.sata.valid |= CTS_SATA_VALID_PM; cts->xport_specific.sata.tags = d->tags; cts->xport_specific.sata.valid |= CTS_SATA_VALID_TAGS; + cts->xport_specific.sata.atapi = d->atapi; + cts->xport_specific.sata.valid |= CTS_SATA_VALID_ATAPI; ccb->ccb_h.status = CAM_REQ_CMP; xpt_done(ccb); break; Modified: head/sys/dev/ahci/ahci.h ============================================================================== --- head/sys/dev/ahci/ahci.h Tue Feb 2 10:58:41 2010 (r203375) +++ head/sys/dev/ahci/ahci.h Tue Feb 2 11:09:28 2010 (r203376) @@ -370,6 +370,7 @@ struct ahci_device { int revision; int mode; u_int bytecount; + u_int atapi; u_int tags; }; Modified: head/sys/dev/ata/ata-all.c ============================================================================== --- head/sys/dev/ata/ata-all.c Tue Feb 2 10:58:41 2010 (r203375) +++ head/sys/dev/ata/ata-all.c Tue Feb 2 11:09:28 2010 (r203376) @@ -1348,6 +1348,8 @@ ata_cam_begin_transaction(device_t dev, ccb->csio.cdb_io.cdb_ptr : ccb->csio.cdb_io.cdb_bytes, request->u.atapi.ccb, ccb->csio.cdb_len); request->flags |= ATA_R_ATAPI; + if (ch->curr[ccb->ccb_h.target_id].atapi == 16) + request->flags |= ATA_R_ATAPI16; if ((ccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE && ch->curr[ccb->ccb_h.target_id].mode >= ATA_DMA) request->flags |= ATA_R_DMA; @@ -1358,7 +1360,6 @@ ata_cam_begin_transaction(device_t dev, } request->transfersize = min(request->bytecount, ch->curr[ccb->ccb_h.target_id].bytecount); -// request->callback = ad_done; request->retries = 0; request->timeout = (ccb->ccb_h.timeout + 999) / 1000; callout_init_mtx(&request->callout, &ch->state_mtx, CALLOUT_RETURNUNLOCKED); @@ -1491,7 +1492,7 @@ ataaction(struct cam_sim *sim, union ccb if (ch->flags & ATA_SATA) { if (cts->xport_specific.sata.valid & CTS_SATA_VALID_REVISION) d->revision = cts->xport_specific.sata.revision; - if (cts->xport_specific.ata.valid & CTS_SATA_VALID_MODE) { + if (cts->xport_specific.sata.valid & CTS_SATA_VALID_MODE) { if (cts->type == CTS_TYPE_CURRENT_SETTINGS) { d->mode = ATA_SETMODE(ch->dev, ccb->ccb_h.target_id, @@ -1499,8 +1500,10 @@ ataaction(struct cam_sim *sim, union ccb } else d->mode = cts->xport_specific.sata.mode; } - if (cts->xport_specific.ata.valid & CTS_SATA_VALID_BYTECOUNT) + if (cts->xport_specific.sata.valid & CTS_SATA_VALID_BYTECOUNT) d->bytecount = min(8192, cts->xport_specific.sata.bytecount); + if (cts->xport_specific.sata.valid & CTS_SATA_VALID_ATAPI) + d->atapi = cts->xport_specific.sata.atapi; } else { if (cts->xport_specific.ata.valid & CTS_ATA_VALID_MODE) { if (cts->type == CTS_TYPE_CURRENT_SETTINGS) { @@ -1512,6 +1515,8 @@ ataaction(struct cam_sim *sim, union ccb } if (cts->xport_specific.ata.valid & CTS_ATA_VALID_BYTECOUNT) d->bytecount = cts->xport_specific.ata.bytecount; + if (cts->xport_specific.ata.valid & CTS_ATA_VALID_ATAPI) + d->atapi = cts->xport_specific.ata.atapi; } ccb->ccb_h.status = CAM_REQ_CMP; xpt_done(ccb); @@ -1541,6 +1546,8 @@ ataaction(struct cam_sim *sim, union ccb } else cts->xport_specific.sata.revision = d->revision; cts->xport_specific.sata.valid |= CTS_SATA_VALID_REVISION; + cts->xport_specific.sata.atapi = d->atapi; + cts->xport_specific.sata.valid |= CTS_SATA_VALID_ATAPI; } else { cts->transport = XPORT_ATA; cts->transport_version = XPORT_VERSION_UNSPECIFIED; @@ -1548,6 +1555,8 @@ ataaction(struct cam_sim *sim, union ccb cts->xport_specific.ata.valid |= CTS_ATA_VALID_MODE; cts->xport_specific.ata.bytecount = d->bytecount; cts->xport_specific.ata.valid |= CTS_ATA_VALID_BYTECOUNT; + cts->xport_specific.ata.atapi = d->atapi; + cts->xport_specific.ata.valid |= CTS_ATA_VALID_ATAPI; } ccb->ccb_h.status = CAM_REQ_CMP; xpt_done(ccb); Modified: head/sys/dev/ata/ata-all.h ============================================================================== --- head/sys/dev/ata/ata-all.h Tue Feb 2 10:58:41 2010 (r203375) +++ head/sys/dev/ata/ata-all.h Tue Feb 2 11:09:28 2010 (r203376) @@ -539,6 +539,7 @@ struct ata_cam_device { u_int revision; int mode; u_int bytecount; + u_int atapi; }; #endif Modified: head/sys/dev/siis/siis.c ============================================================================== --- head/sys/dev/siis/siis.c Tue Feb 2 10:58:41 2010 (r203375) +++ head/sys/dev/siis/siis.c Tue Feb 2 11:09:28 2010 (r203376) @@ -1659,6 +1659,8 @@ siisaction(struct cam_sim *sim, union cc else ATA_OUTL(ch->r_mem, SIIS_P_CTLCLR, SIIS_P_CTL_PME); } + if (cts->xport_specific.sata.valid & CTS_SATA_VALID_TAGS) + d->atapi = cts->xport_specific.sata.atapi; ccb->ccb_h.status = CAM_REQ_CMP; xpt_done(ccb); break; @@ -1702,6 +1704,8 @@ siisaction(struct cam_sim *sim, union cc cts->xport_specific.sata.valid |= CTS_SATA_VALID_PM; cts->xport_specific.sata.tags = d->tags; cts->xport_specific.sata.valid |= CTS_SATA_VALID_TAGS; + cts->xport_specific.sata.atapi = d->atapi; + cts->xport_specific.sata.valid |= CTS_SATA_VALID_ATAPI; ccb->ccb_h.status = CAM_REQ_CMP; xpt_done(ccb); break; Modified: head/sys/dev/siis/siis.h ============================================================================== --- head/sys/dev/siis/siis.h Tue Feb 2 10:58:41 2010 (r203375) +++ head/sys/dev/siis/siis.h Tue Feb 2 11:09:28 2010 (r203376) @@ -356,6 +356,7 @@ struct siis_device { int revision; int mode; u_int bytecount; + u_int atapi; u_int tags; }; From owner-svn-src-all@FreeBSD.ORG Tue Feb 2 13:08:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2B5001065719; Tue, 2 Feb 2010 13:08:08 +0000 (UTC) (envelope-from amdmi3@amdmi3.ru) Received: from smtp.timeweb.ru (smtp.timeweb.ru [92.53.104.116]) by mx1.freebsd.org (Postfix) with ESMTP id D3FFB8FC1A; Tue, 2 Feb 2010 13:08:07 +0000 (UTC) Received: from [213.148.20.85] (helo=hive.panopticon) by smtp.timeweb.ru with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1NcIU9-0007YR-68; Tue, 02 Feb 2010 16:08:05 +0300 Received: from hades.panopticon (hades.panopticon [192.168.0.32]) by hive.panopticon (Postfix) with ESMTP id 50584B860; Tue, 2 Feb 2010 16:08:05 +0300 (MSK) Received: by hades.panopticon (Postfix, from userid 1000) id 4A59BB84B; Tue, 2 Feb 2010 16:08:05 +0300 (MSK) Date: Tue, 2 Feb 2010 16:08:05 +0300 From: Dmitry Marakasov To: Antoine Brodin Message-ID: <20100202130805.GB42642@hades.panopticon> References: <201001301932.o0UJW1IW086522@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <201001301932.o0UJW1IW086522@svn.freebsd.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r203226 - head/tools/build/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2010 13:08:08 -0000 * Antoine Brodin (antoine@FreeBSD.org) wrote: > Log: > Add files to remove when MK_GAMES=no. Thanks! -- Dmitry Marakasov . 55B5 0596 FF1E 8D84 5F56 9510 D35A 80DD F9D2 F77D amdmi3@amdmi3.ru ..: jabber: amdmi3@jabber.ru http://www.amdmi3.ru From owner-svn-src-all@FreeBSD.ORG Tue Feb 2 13:47:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 387F21065696; Tue, 2 Feb 2010 13:47:19 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 277178FC27; Tue, 2 Feb 2010 13:47:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o12DlJoq075999; Tue, 2 Feb 2010 13:47:19 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o12DlI55075998; Tue, 2 Feb 2010 13:47:18 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201002021347.o12DlI55075998@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Tue, 2 Feb 2010 13:47:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203377 - head/lib/libpam/modules/pam_unix X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2010 13:47:19 -0000 Author: des Date: Tue Feb 2 13:47:18 2010 New Revision: 203377 URL: http://svn.freebsd.org/changeset/base/203377 Log: Respect passwordtime from login.conf if set. PR: bin/93473 Submitted by: Björn König MFC after: 1 week Modified: head/lib/libpam/modules/pam_unix/pam_unix.c Modified: head/lib/libpam/modules/pam_unix/pam_unix.c ============================================================================== --- head/lib/libpam/modules/pam_unix/pam_unix.c Tue Feb 2 11:09:28 2010 (r203376) +++ head/lib/libpam/modules/pam_unix/pam_unix.c Tue Feb 2 13:47:18 2010 (r203377) @@ -271,10 +271,11 @@ pam_sm_chauthtok(pam_handle_t *pamh, int const void *yp_domain, *yp_server; #endif char salt[SALTSIZE + 1]; - login_cap_t * lc; + login_cap_t *lc; struct passwd *pwd, *old_pwd; const char *user, *old_pass, *new_pass; char *encrypted; + time_t passwordtime; int pfd, tfd, retval; if (openpam_get_option(pamh, PAM_OPT_AUTH_AS_SELF)) @@ -377,11 +378,17 @@ pam_sm_chauthtok(pam_handle_t *pamh, int if ((old_pwd = pw_dup(pwd)) == NULL) return (PAM_BUF_ERR); - pwd->pw_change = 0; lc = login_getclass(pwd->pw_class); if (login_setcryptfmt(lc, password_hash, NULL) == NULL) openpam_log(PAM_LOG_ERROR, "can't set password cipher, relying on default"); + + /* set password expiry date */ + pwd->pw_change = 0; + passwordtime = login_getcaptime(lc, "passwordtime", 0, 0); + if (passwordtime > 0) + pwd->pw_change = time(NULL) + passwordtime; + login_close(lc); makesalt(salt); pwd->pw_passwd = crypt(new_pass, salt); From owner-svn-src-all@FreeBSD.ORG Tue Feb 2 16:02:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B30EB1065672; Tue, 2 Feb 2010 16:02:09 +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 8A5338FC0C; Tue, 2 Feb 2010 16:02:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o12G29xG004615; Tue, 2 Feb 2010 16:02:09 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o12G290C004613; Tue, 2 Feb 2010 16:02:09 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <201002021602.o12G290C004613@svn.freebsd.org> From: Hajimu UMEMOTO Date: Tue, 2 Feb 2010 16:02:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203378 - head/usr.sbin/rtsold X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2010 16:02:09 -0000 Author: ume Date: Tue Feb 2 16:02:09 2010 New Revision: 203378 URL: http://svn.freebsd.org/changeset/base/203378 Log: Make -a option actually work. MFC after: 1 week Modified: head/usr.sbin/rtsold/rtsold.c Modified: head/usr.sbin/rtsold/rtsold.c ============================================================================== --- head/usr.sbin/rtsold/rtsold.c Tue Feb 2 13:47:18 2010 (r203377) +++ head/usr.sbin/rtsold/rtsold.c Tue Feb 2 16:02:09 2010 (r203378) @@ -837,7 +837,6 @@ autoifprobe(void) if (!argv[n]) err(1, "malloc"); n++; - argv[n] = NULL; } if (n) { From owner-svn-src-all@FreeBSD.ORG Tue Feb 2 17:28:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F32BA10656A5; Tue, 2 Feb 2010 17:28:50 +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 C953D8FC26; Tue, 2 Feb 2010 17:28:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o12HSoeU026287; Tue, 2 Feb 2010 17:28:50 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o12HSos7026284; Tue, 2 Feb 2010 17:28:50 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201002021728.o12HSos7026284@svn.freebsd.org> From: Pyun YongHyeon Date: Tue, 2 Feb 2010 17:28:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203383 - in stable/7/sys: dev/re pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2010 17:28:51 -0000 Author: yongari Date: Tue Feb 2 17:28:50 2010 New Revision: 203383 URL: http://svn.freebsd.org/changeset/base/203383 Log: MFC r203082: Add initial support for RTL8103E PCIe fastethernet. PR: kern/142974 Approved by: re (kensmith) Modified: stable/7/sys/dev/re/if_re.c stable/7/sys/pci/if_rlreg.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/re/if_re.c ============================================================================== --- stable/7/sys/dev/re/if_re.c Tue Feb 2 16:18:51 2010 (r203382) +++ stable/7/sys/dev/re/if_re.c Tue Feb 2 17:28:50 2010 (r203383) @@ -172,7 +172,7 @@ static struct rl_type re_devs[] = { { RT_VENDORID, RT_DEVICEID_8139, 0, "RealTek 8139C+ 10/100BaseTX" }, { RT_VENDORID, RT_DEVICEID_8101E, 0, - "RealTek 8101E/8102E/8102EL PCIe 10/100baseTX" }, + "RealTek 8101E/8102E/8102EL/8103E PCIe 10/100baseTX" }, { RT_VENDORID, RT_DEVICEID_8168, 0, "RealTek 8168/8168B/8168C/8168CP/8168D/8168DP/" "8111B/8111C/8111CP/8111DP PCIe Gigabit Ethernet" }, @@ -212,6 +212,7 @@ static struct rl_hwrev re_hwrevs[] = { { RL_HWREV_8102E, RL_8169, "8102E"}, { RL_HWREV_8102EL, RL_8169, "8102EL"}, { RL_HWREV_8102EL_SPIN1, RL_8169, "8102EL"}, + { RL_HWREV_8103E, RL_8169, "8103E"}, { RL_HWREV_8168_SPIN2, RL_8169, "8168"}, { RL_HWREV_8168_SPIN3, RL_8169, "8168"}, { RL_HWREV_8168C, RL_8169, "8168C/8111C"}, @@ -1269,6 +1270,12 @@ re_attach(device_t dev) RL_FLAG_PAR | RL_FLAG_DESCV2 | RL_FLAG_MACSTAT | RL_FLAG_FASTETHER | RL_FLAG_CMDSTOP | RL_FLAG_AUTOPAD; break; + case RL_HWREV_8103E: + sc->rl_flags |= RL_FLAG_NOJUMBO | RL_FLAG_PHYWAKE | + RL_FLAG_PAR | RL_FLAG_DESCV2 | RL_FLAG_MACSTAT | + RL_FLAG_FASTETHER | RL_FLAG_CMDSTOP | RL_FLAG_AUTOPAD | + RL_FLAG_MACSLEEP; + break; case RL_HWREV_8168_SPIN1: case RL_HWREV_8168_SPIN2: sc->rl_flags |= RL_FLAG_WOLRXENB; Modified: stable/7/sys/pci/if_rlreg.h ============================================================================== --- stable/7/sys/pci/if_rlreg.h Tue Feb 2 16:18:51 2010 (r203382) +++ stable/7/sys/pci/if_rlreg.h Tue Feb 2 17:28:50 2010 (r203383) @@ -166,6 +166,7 @@ #define RL_HWREV_8100E 0x30800000 #define RL_HWREV_8101E 0x34000000 #define RL_HWREV_8102E 0x34800000 +#define RL_HWREV_8103E 0x34C00000 #define RL_HWREV_8168_SPIN2 0x38000000 #define RL_HWREV_8168_SPIN3 0x38400000 #define RL_HWREV_8168C 0x3C000000 From owner-svn-src-all@FreeBSD.ORG Tue Feb 2 17:56:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E0DCA106568D; Tue, 2 Feb 2010 17:56:54 +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 D17388FC0C; Tue, 2 Feb 2010 17:56:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o12HusxB033224; Tue, 2 Feb 2010 17:56:54 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o12HusaI033222; Tue, 2 Feb 2010 17:56:54 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201002021756.o12HusaI033222@svn.freebsd.org> From: Alexander Motin Date: Tue, 2 Feb 2010 17:56:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203384 - head/sys/cam X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2010 17:56:55 -0000 Author: mav Date: Tue Feb 2 17:56:54 2010 New Revision: 203384 URL: http://svn.freebsd.org/changeset/base/203384 Log: Some missed parts for r203376. Modified: head/sys/cam/cam_xpt.c Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Tue Feb 2 17:28:50 2010 (r203383) +++ head/sys/cam/cam_xpt.c Tue Feb 2 17:56:54 2010 (r203384) @@ -1201,8 +1201,10 @@ xpt_announce_periph(struct cam_periph *p printf(" ("); if (ata->valid & CTS_ATA_VALID_MODE) printf("%s, ", ata_mode2string(ata->mode)); + if ((ata->valid & CTS_ATA_VALID_ATAPI) && ata->atapi != 0) + printf("ATAPI %dbytes, ", ata->atapi); if (ata->valid & CTS_ATA_VALID_BYTECOUNT) - printf("PIO size %dbytes", ata->bytecount); + printf("PIO %dbytes", ata->bytecount); printf(")"); } if (cts.ccb_h.status == CAM_REQ_CMP && cts.transport == XPORT_SATA) { @@ -1214,8 +1216,10 @@ xpt_announce_periph(struct cam_periph *p printf("SATA %d.x, ", sata->revision); if (sata->valid & CTS_SATA_VALID_MODE) printf("%s, ", ata_mode2string(sata->mode)); + if ((sata->valid & CTS_ATA_VALID_ATAPI) && sata->atapi != 0) + printf("ATAPI %dbytes, ", sata->atapi); if (sata->valid & CTS_SATA_VALID_BYTECOUNT) - printf("PIO size %dbytes", sata->bytecount); + printf("PIO %dbytes", sata->bytecount); printf(")"); } if (path->device->inq_flags & SID_CmdQue From owner-svn-src-all@FreeBSD.ORG Tue Feb 2 18:03:21 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D4F581065679; Tue, 2 Feb 2010 18:03:21 +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 C51BA8FC08; Tue, 2 Feb 2010 18:03:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o12I3LVD034868; Tue, 2 Feb 2010 18:03:21 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o12I3LLd034864; Tue, 2 Feb 2010 18:03:21 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201002021803.o12I3LLd034864@svn.freebsd.org> From: Alexander Motin Date: Tue, 2 Feb 2010 18:03:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203385 - head/sys/cam/ata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2010 18:03:21 -0000 Author: mav Date: Tue Feb 2 18:03:21 2010 New Revision: 203385 URL: http://svn.freebsd.org/changeset/base/203385 Log: - Use separate buffer for identify data fetching. We can't use main buffer here if device already running, as data need to be formatted before use. - Remove some saved_ccb variables. They are unused now. Modified: head/sys/cam/ata/ata_da.c head/sys/cam/ata/ata_pmp.c head/sys/cam/ata/ata_xpt.c Modified: head/sys/cam/ata/ata_da.c ============================================================================== --- head/sys/cam/ata/ata_da.c Tue Feb 2 17:56:54 2010 (r203384) +++ head/sys/cam/ata/ata_da.c Tue Feb 2 18:03:21 2010 (r203385) @@ -123,7 +123,6 @@ struct ada_softc { int trim_running; struct disk_params params; struct disk *disk; - union ccb saved_ccb; struct task sysctl_task; struct sysctl_ctx_list sysctl_ctx; struct sysctl_oid *sysctl_tree; @@ -1098,8 +1097,7 @@ adaerror(union ccb *ccb, u_int32_t cam_f periph = xpt_path_periph(ccb->ccb_h.path); softc = (struct ada_softc *)periph->softc; - return(cam_periph_error(ccb, cam_flags, sense_flags, - &softc->saved_ccb)); + return(cam_periph_error(ccb, cam_flags, sense_flags, NULL)); } static void Modified: head/sys/cam/ata/ata_pmp.c ============================================================================== --- head/sys/cam/ata/ata_pmp.c Tue Feb 2 17:56:54 2010 (r203384) +++ head/sys/cam/ata/ata_pmp.c Tue Feb 2 18:03:21 2010 (r203385) @@ -101,7 +101,6 @@ struct pmp_softc { int events; #define PMP_EV_RESET 1 #define PMP_EV_RESCAN 2 - union ccb saved_ccb; struct task sysctl_task; struct sysctl_ctx_list sysctl_ctx; struct sysctl_oid *sysctl_tree; @@ -552,8 +551,7 @@ pmpdone(struct cam_periph *periph, union priority = done_ccb->ccb_h.pinfo.priority; if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { - if (cam_periph_error(done_ccb, 0, 0, - &softc->saved_ccb) == ERESTART) { + if (cam_periph_error(done_ccb, 0, 0, NULL) == ERESTART) { return; } else if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) { cam_release_devq(done_ccb->ccb_h.path, Modified: head/sys/cam/ata/ata_xpt.c ============================================================================== --- head/sys/cam/ata/ata_xpt.c Tue Feb 2 17:56:54 2010 (r203384) +++ head/sys/cam/ata/ata_xpt.c Tue Feb 2 18:03:21 2010 (r203385) @@ -37,7 +37,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include @@ -124,10 +123,9 @@ typedef enum { typedef struct { TAILQ_HEAD(, ccb_hdr) request_ccbs; + struct ata_params ident_data; probe_action action; - union ccb saved_ccb; probe_flags flags; - u_int8_t digest[16]; uint32_t pm_pid; uint32_t pm_prv; int restart; @@ -303,29 +301,13 @@ probestart(struct cam_periph *periph, un ata_reset_cmd(ataio); break; case PROBE_IDENTIFY: - if ((periph->path->device->flags & CAM_DEV_UNCONFIGURED) == 0) { - /* Prepare check that it is the same device. */ - MD5_CTX context; - - MD5Init(&context); - MD5Update(&context, - (unsigned char *)ident_buf->model, - sizeof(ident_buf->model)); - MD5Update(&context, - (unsigned char *)ident_buf->revision, - sizeof(ident_buf->revision)); - MD5Update(&context, - (unsigned char *)ident_buf->serial, - sizeof(ident_buf->serial)); - MD5Final(softc->digest, &context); - } cam_fill_ataio(ataio, 1, probedone, /*flags*/CAM_DIR_IN, 0, - /*data_ptr*/(u_int8_t *)ident_buf, - /*dxfer_len*/sizeof(struct ata_params), + /*data_ptr*/(u_int8_t *)&softc->ident_data, + /*dxfer_len*/sizeof(softc->ident_data), 30 * 1000); if (periph->path->device->protocol == PROTO_ATA) ata_28bit_cmd(ataio, ATA_ATA_IDENTIFY, 0, 0, 0); @@ -695,8 +677,7 @@ probedone(struct cam_periph *periph, uni ident_buf = &path->device->ident_data; if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { -device_fail: if (cam_periph_error(done_ccb, 0, 0, - &softc->saved_ccb) == ERESTART) { +device_fail: if (cam_periph_error(done_ccb, 0, 0, NULL) == ERESTART) { return; } else if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) { /* Don't wedge the queue */ @@ -724,6 +705,8 @@ device_fail: if (cam_periph_error(done_c goto done; } noerror: + if (softc->restart) + goto done; switch (softc->action) { case PROBE_RESET: { @@ -766,6 +749,7 @@ noerror: { int16_t *ptr; + ident_buf = &softc->ident_data; for (ptr = (int16_t *)ident_buf; ptr < (int16_t *)ident_buf + sizeof(struct ata_params)/2; ptr++) { *ptr = le16toh(*ptr); @@ -784,28 +768,22 @@ noerror: ata_bpack(ident_buf->revision, ident_buf->revision, sizeof(ident_buf->revision)); ata_btrim(ident_buf->serial, sizeof(ident_buf->serial)); ata_bpack(ident_buf->serial, ident_buf->serial, sizeof(ident_buf->serial)); + ident_buf = &path->device->ident_data; if ((periph->path->device->flags & CAM_DEV_UNCONFIGURED) == 0) { /* Check that it is the same device. */ - MD5_CTX context; - u_int8_t digest[16]; - - MD5Init(&context); - MD5Update(&context, - (unsigned char *)ident_buf->model, - sizeof(ident_buf->model)); - MD5Update(&context, - (unsigned char *)ident_buf->revision, - sizeof(ident_buf->revision)); - MD5Update(&context, - (unsigned char *)ident_buf->serial, - sizeof(ident_buf->serial)); - MD5Final(digest, &context); - if (bcmp(digest, softc->digest, sizeof(digest))) { + if (bcmp(softc->ident_data.model, ident_buf->model, + sizeof(ident_buf->model)) || + bcmp(softc->ident_data.revision, ident_buf->revision, + sizeof(ident_buf->revision)) || + bcmp(softc->ident_data.serial, ident_buf->serial, + sizeof(ident_buf->serial))) { /* Device changed. */ xpt_async(AC_LOST_DEVICE, path, NULL); - } + } else + bcopy(&softc->ident_data, ident_buf, sizeof(struct ata_params)); } else { + bcopy(&softc->ident_data, ident_buf, sizeof(struct ata_params)); /* Clean up from previous instance of this device */ if (path->device->serial_num != NULL) { free(path->device->serial_num, M_CAMXPT); From owner-svn-src-all@FreeBSD.ORG Tue Feb 2 18:07:17 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 075F2106568B; Tue, 2 Feb 2010 18:07:17 +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 EBBD78FC1B; Tue, 2 Feb 2010 18:07:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o12I7GbU035863; Tue, 2 Feb 2010 18:07:16 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o12I7Gft035861; Tue, 2 Feb 2010 18:07:16 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201002021807.o12I7Gft035861@svn.freebsd.org> From: Alexander Motin Date: Tue, 2 Feb 2010 18:07:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203386 - head/sys/cam X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2010 18:07:17 -0000 Author: mav Date: Tue Feb 2 18:07:16 2010 New Revision: 203386 URL: http://svn.freebsd.org/changeset/base/203386 Log: Change the way in which fake async events generated. Do not use taskqueue for lock decoupling, as it causes unwanted races. Modified: head/sys/cam/cam_xpt.c Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Tue Feb 2 18:03:21 2010 (r203385) +++ head/sys/cam/cam_xpt.c Tue Feb 2 18:07:16 2010 (r203386) @@ -2392,9 +2392,7 @@ xptsetasyncfunc(struct cam_ed *device, v { struct cam_path path; struct ccb_getdev cgd; - struct async_node *cur_entry; - - cur_entry = (struct async_node *)arg; + struct ccb_setasync *csa = (struct ccb_setasync *)arg; /* * Don't report unconfigured devices (Wildcard devs, @@ -2413,7 +2411,7 @@ xptsetasyncfunc(struct cam_ed *device, v xpt_setup_ccb(&cgd.ccb_h, &path, CAM_PRIORITY_NORMAL); cgd.ccb_h.func_code = XPT_GDEV_TYPE; xpt_action((union ccb *)&cgd); - cur_entry->callback(cur_entry->callback_arg, + csa->callback(csa->callback_arg, AC_FOUND_DEVICE, &path, &cgd); xpt_release_path(&path); @@ -2426,9 +2424,7 @@ xptsetasyncbusfunc(struct cam_eb *bus, v { struct cam_path path; struct ccb_pathinq cpi; - struct async_node *cur_entry; - - cur_entry = (struct async_node *)arg; + struct ccb_setasync *csa = (struct ccb_setasync *)arg; xpt_compile_path(&path, /*periph*/NULL, bus->sim->path_id, @@ -2437,7 +2433,7 @@ xptsetasyncbusfunc(struct cam_eb *bus, v xpt_setup_ccb(&cpi.ccb_h, &path, CAM_PRIORITY_NORMAL); cpi.ccb_h.func_code = XPT_PATH_INQ; xpt_action((union ccb *)&cpi); - cur_entry->callback(cur_entry->callback_arg, + csa->callback(csa->callback_arg, AC_PATH_REGISTERED, &path, &cpi); xpt_release_path(&path); @@ -2445,35 +2441,6 @@ xptsetasyncbusfunc(struct cam_eb *bus, v return(1); } -static void -xpt_action_sasync_cb(void *context, int pending) -{ - struct async_node *cur_entry; - struct xpt_task *task; - uint32_t added; - - task = (struct xpt_task *)context; - cur_entry = (struct async_node *)task->data1; - added = task->data2; - - if ((added & AC_FOUND_DEVICE) != 0) { - /* - * Get this peripheral up to date with all - * the currently existing devices. - */ - xpt_for_all_devices(xptsetasyncfunc, cur_entry); - } - if ((added & AC_PATH_REGISTERED) != 0) { - /* - * Get this peripheral up to date with all - * the currently existing busses. - */ - xpt_for_all_busses(xptsetasyncbusfunc, cur_entry); - } - - free(task, M_CAMXPT); -} - void xpt_action(union ccb *start_ccb) { @@ -2885,11 +2852,12 @@ xpt_action_default(union ccb *start_ccb) if (csa->event_enable == 0) { SLIST_REMOVE(async_head, cur_entry, async_node, links); - csa->ccb_h.path->device->refcount--; + xpt_release_device(csa->ccb_h.path->device); free(cur_entry, M_CAMXPT); } else { cur_entry->event_enable = csa->event_enable; } + csa->event_enable = added; } else { cur_entry = malloc(sizeof(*cur_entry), M_CAMXPT, M_NOWAIT); @@ -2901,29 +2869,8 @@ xpt_action_default(union ccb *start_ccb) cur_entry->callback_arg = csa->callback_arg; cur_entry->callback = csa->callback; SLIST_INSERT_HEAD(async_head, cur_entry, links); - csa->ccb_h.path->device->refcount++; + xpt_acquire_device(csa->ccb_h.path->device); } - - /* - * Need to decouple this operation via a taqskqueue so that - * the locking doesn't become a mess. - */ - if ((added & (AC_FOUND_DEVICE | AC_PATH_REGISTERED)) != 0) { - struct xpt_task *task; - - task = malloc(sizeof(struct xpt_task), M_CAMXPT, - M_NOWAIT); - if (task == NULL) { - csa->ccb_h.status = CAM_RESRC_UNAVAIL; - break; - } - - TASK_INIT(&task->task, 0, xpt_action_sasync_cb, task); - task->data1 = cur_entry; - task->data2 = added; - taskqueue_enqueue(taskqueue_thread, &task->task); - } - start_ccb->ccb_h.status = CAM_REQ_CMP; break; } @@ -4823,6 +4770,23 @@ xpt_register_async(int event, ac_callbac if (xptpath) { xpt_free_path(path); mtx_unlock(&xsoftc.xpt_lock); + + if ((status == CAM_REQ_CMP) && + (csa.event_enable & AC_FOUND_DEVICE)) { + /* + * Get this peripheral up to date with all + * the currently existing devices. + */ + xpt_for_all_devices(xptsetasyncfunc, &csa); + } + if ((status == CAM_REQ_CMP) && + (csa.event_enable & AC_PATH_REGISTERED)) { + /* + * Get this peripheral up to date with all + * the currently existing busses. + */ + xpt_for_all_busses(xptsetasyncbusfunc, &csa); + } } return (status); } From owner-svn-src-all@FreeBSD.ORG Tue Feb 2 18:38:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4DDA51065670; Tue, 2 Feb 2010 18:38:18 +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 24EDB8FC26; Tue, 2 Feb 2010 18:38:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o12IcIqp043609; Tue, 2 Feb 2010 18:38:18 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o12IcIoZ043607; Tue, 2 Feb 2010 18:38:18 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <201002021838.o12IcIoZ043607@svn.freebsd.org> From: Hajimu UMEMOTO Date: Tue, 2 Feb 2010 18:38:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203387 - head/usr.sbin/rtsold X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2010 18:38:18 -0000 Author: ume Date: Tue Feb 2 18:38:17 2010 New Revision: 203387 URL: http://svn.freebsd.org/changeset/base/203387 Log: Exclude the interfaces which IPv6 and/or accepting RA is disabled from the auto probed interface list. MFC after: 1 week Modified: head/usr.sbin/rtsold/rtsold.c Modified: head/usr.sbin/rtsold/rtsold.c ============================================================================== --- head/usr.sbin/rtsold/rtsold.c Tue Feb 2 18:07:16 2010 (r203386) +++ head/usr.sbin/rtsold/rtsold.c Tue Feb 2 18:38:17 2010 (r203387) @@ -32,15 +32,20 @@ */ #include +#include #include #include #include #include #include +#include #include #include +#include + +#include #include #include @@ -785,8 +790,9 @@ autoifprobe(void) static char **argv = NULL; static int n = 0; char **a; - int i, found; + int s, i, found; struct ifaddrs *ifap, *ifa, *target; + struct in6_ndireq nd; /* initialize */ while (n--) @@ -800,6 +806,11 @@ autoifprobe(void) if (getifaddrs(&ifap) != 0) return NULL; + if (!Fflag && (s = socket(AF_INET6, SOCK_DGRAM, 0)) < 0) { + err(1, "socket"); + /* NOTREACHED */ + } + target = NULL; /* find an ethernet */ for (ifa = ifap; ifa; ifa = ifa->ifa_next) { @@ -825,6 +836,23 @@ autoifprobe(void) if (found) continue; + /* + * Skip the interfaces which IPv6 and/or accepting RA + * is disabled. + */ + if (!Fflag) { + memset(&nd, 0, sizeof(nd)); + strlcpy(nd.ifname, ifa->ifa_name, sizeof(nd.ifname)); + if (ioctl(s, SIOCGIFINFO_IN6, (caddr_t)&nd) < 0) { + err(1, "ioctl(SIOCGIFINFO_IN6)"); + /* NOTREACHED */ + } + if ((nd.ndi.flags & ND6_IFF_IFDISABLED)) + continue; + if (!(nd.ndi.flags & ND6_IFF_ACCEPT_RTADV)) + continue; + } + /* if we find multiple candidates, just warn. */ if (n != 0 && dflag > 1) warnx("multiple interfaces found"); @@ -851,6 +879,8 @@ autoifprobe(void) warnx("probing %s", argv[i]); } } + if (!Fflag) + close(s); freeifaddrs(ifap); return argv; } From owner-svn-src-all@FreeBSD.ORG Tue Feb 2 18:43:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B9417106566B; Tue, 2 Feb 2010 18:43:08 +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 9ECC38FC0A; Tue, 2 Feb 2010 18:43:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o12Ih838044788; Tue, 2 Feb 2010 18:43:08 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o12Ih89l044781; Tue, 2 Feb 2010 18:43:08 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201002021843.o12Ih89l044781@svn.freebsd.org> From: John Baldwin Date: Tue, 2 Feb 2010 18:43:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203388 - in stable/8/release: amd64 i386 pc98 powerpc sparc64 sun4v X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2010 18:43:08 -0000 Author: jhb Date: Tue Feb 2 18:43:08 2010 New Revision: 203388 URL: http://svn.freebsd.org/changeset/base/203388 Log: MFC 203031: Remove slattach from the install mfsroot since it doesn't exist anymore to quiet a warning from crunchgen. Modified: stable/8/release/amd64/boot_crunch.conf stable/8/release/i386/boot_crunch.conf stable/8/release/pc98/boot_crunch.conf stable/8/release/powerpc/boot_crunch.conf stable/8/release/sparc64/boot_crunch.conf stable/8/release/sun4v/boot_crunch.conf Directory Properties: stable/8/release/ (props changed) stable/8/release/doc/ (props changed) stable/8/release/doc/en_US.ISO8859-1/hardware/ (props changed) Modified: stable/8/release/amd64/boot_crunch.conf ============================================================================== --- stable/8/release/amd64/boot_crunch.conf Tue Feb 2 18:38:17 2010 (r203387) +++ stable/8/release/amd64/boot_crunch.conf Tue Feb 2 18:43:08 2010 (r203388) @@ -20,7 +20,6 @@ progs mount_nfs progs newfs progs route progs rtsol -progs slattach progs tunefs ln fsck_ffs fsck_4.2bsd ln fsck_ffs fsck_ufs Modified: stable/8/release/i386/boot_crunch.conf ============================================================================== --- stable/8/release/i386/boot_crunch.conf Tue Feb 2 18:38:17 2010 (r203387) +++ stable/8/release/i386/boot_crunch.conf Tue Feb 2 18:43:08 2010 (r203388) @@ -20,7 +20,6 @@ progs mount_nfs progs newfs progs route progs rtsol -progs slattach progs tunefs ln fsck_ffs fsck_4.2bsd ln fsck_ffs fsck_ufs Modified: stable/8/release/pc98/boot_crunch.conf ============================================================================== --- stable/8/release/pc98/boot_crunch.conf Tue Feb 2 18:38:17 2010 (r203387) +++ stable/8/release/pc98/boot_crunch.conf Tue Feb 2 18:43:08 2010 (r203388) @@ -20,7 +20,6 @@ progs mount_nfs progs newfs progs route progs rtsol -progs slattach progs tunefs ln fsck_ffs fsck_4.2bsd ln fsck_ffs fsck_ufs Modified: stable/8/release/powerpc/boot_crunch.conf ============================================================================== --- stable/8/release/powerpc/boot_crunch.conf Tue Feb 2 18:38:17 2010 (r203387) +++ stable/8/release/powerpc/boot_crunch.conf Tue Feb 2 18:43:08 2010 (r203388) @@ -22,7 +22,6 @@ progs newfs progs newfs_msdos progs route progs rtsol -progs slattach progs tunefs ln fsck_ffs fsck_4.2bsd ln fsck_ffs fsck_ufs Modified: stable/8/release/sparc64/boot_crunch.conf ============================================================================== --- stable/8/release/sparc64/boot_crunch.conf Tue Feb 2 18:38:17 2010 (r203387) +++ stable/8/release/sparc64/boot_crunch.conf Tue Feb 2 18:43:08 2010 (r203388) @@ -20,7 +20,6 @@ progs mount_nfs progs newfs progs route progs rtsol -progs slattach progs tunefs ln fsck_ffs fsck_4.2bsd ln fsck_ffs fsck_ufs Modified: stable/8/release/sun4v/boot_crunch.conf ============================================================================== --- stable/8/release/sun4v/boot_crunch.conf Tue Feb 2 18:38:17 2010 (r203387) +++ stable/8/release/sun4v/boot_crunch.conf Tue Feb 2 18:43:08 2010 (r203388) @@ -20,7 +20,6 @@ progs mount_nfs progs newfs progs route progs rtsol -progs slattach progs tunefs ln fsck_ffs fsck_4.2bsd ln fsck_ffs fsck_ufs From owner-svn-src-all@FreeBSD.ORG Tue Feb 2 18:48:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB19A106566C; Tue, 2 Feb 2010 18:48:09 +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 C130D8FC1C; Tue, 2 Feb 2010 18:48:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o12Im9p6045933; Tue, 2 Feb 2010 18:48:09 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o12Im9vE045932; Tue, 2 Feb 2010 18:48:09 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201002021848.o12Im9vE045932@svn.freebsd.org> From: John Baldwin Date: Tue, 2 Feb 2010 18:48: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: r203389 - in stable/8/release: . doc doc/en_US.ISO8859-1/hardware X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2010 18:48:10 -0000 Author: jhb Date: Tue Feb 2 18:48:09 2010 New Revision: 203389 URL: http://svn.freebsd.org/changeset/base/203389 Log: Move some mergeinfo up to release/. Modified: Directory Properties: stable/8/release/ (props changed) stable/8/release/doc/ (props changed) stable/8/release/doc/en_US.ISO8859-1/hardware/ (props changed) From owner-svn-src-all@FreeBSD.ORG Tue Feb 2 18:50:03 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 19E6D1065672; Tue, 2 Feb 2010 18:50: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 098558FC15; Tue, 2 Feb 2010 18:50:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o12Io2u8046379; Tue, 2 Feb 2010 18:50:02 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o12Io2q5046377; Tue, 2 Feb 2010 18:50:02 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201002021850.o12Io2q5046377@svn.freebsd.org> From: John Baldwin Date: Tue, 2 Feb 2010 18:50: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: r203390 - stable/8/usr.sbin/sysinstall X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2010 18:50:03 -0000 Author: jhb Date: Tue Feb 2 18:50:02 2010 New Revision: 203390 URL: http://svn.freebsd.org/changeset/base/203390 Log: MFC 203032: Don't pop up the menu to select a documentation language for non-interactive installs. Default to not installing any documentation in that case. Modified: stable/8/usr.sbin/sysinstall/dist.c Directory Properties: stable/8/usr.sbin/sysinstall/ (props changed) Modified: stable/8/usr.sbin/sysinstall/dist.c ============================================================================== --- stable/8/usr.sbin/sysinstall/dist.c Tue Feb 2 18:48:09 2010 (r203389) +++ stable/8/usr.sbin/sysinstall/dist.c Tue Feb 2 18:50:02 2010 (r203390) @@ -783,6 +783,10 @@ distSetDoc(dialogMenuItem *self) { int i; + /* Assume no docs for non-interactive installs. */ + if (variable_get(VAR_NONINTERACTIVE)) + return DITEM_SUCCESS | DITEM_RESTORE; + dialog_clear_norefresh(); if (!dmenuOpenSimple(&MenuDocInstall, FALSE)) i = DITEM_FAILURE; From owner-svn-src-all@FreeBSD.ORG Tue Feb 2 19:02:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 44BCA1065672; Tue, 2 Feb 2010 19:02:09 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 355218FC1A; Tue, 2 Feb 2010 19:02:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o12J29NE049092; Tue, 2 Feb 2010 19:02:09 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o12J29su049090; Tue, 2 Feb 2010 19:02:09 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201002021902.o12J29su049090@svn.freebsd.org> From: Ed Schouten Date: Tue, 2 Feb 2010 19:02:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203391 - head/lib/libc/string X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2010 19:02:09 -0000 Author: ed Date: Tue Feb 2 19:02:08 2010 New Revision: 203391 URL: http://svn.freebsd.org/changeset/base/203391 Log: Implement strndup(3) using strnlen(3). This makes the implementation a bit more consistent with strdup(3), which uses strlen(3). Modified: head/lib/libc/string/strndup.c Modified: head/lib/libc/string/strndup.c ============================================================================== --- head/lib/libc/string/strndup.c Tue Feb 2 18:50:02 2010 (r203390) +++ head/lib/libc/string/strndup.c Tue Feb 2 19:02:08 2010 (r203391) @@ -42,9 +42,7 @@ strndup(const char *str, size_t n) size_t len; char *copy; - for (len = 0; len < n && str[len]; len++) - continue; - + len = strnlen(str, n); if ((copy = malloc(len + 1)) == NULL) return (NULL); memcpy(copy, str, len); From owner-svn-src-all@FreeBSD.ORG Tue Feb 2 19:28:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BDDB2106566C; Tue, 2 Feb 2010 19:28:01 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AE1008FC12; Tue, 2 Feb 2010 19:28:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o12JS1Lo054843; Tue, 2 Feb 2010 19:28:01 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o12JS1mk054841; Tue, 2 Feb 2010 19:28:01 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201002021928.o12JS1mk054841@svn.freebsd.org> From: Gavin Atkinson Date: Tue, 2 Feb 2010 19:28:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203393 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2010 19:28:01 -0000 Author: gavin Date: Tue Feb 2 19:28:01 2010 New Revision: 203393 URL: http://svn.freebsd.org/changeset/base/203393 Log: The multiplicand a = 0x5deece66d = 25214903917, not 0xfdeece66d. This bug in the man page has gone unnoticed for over 15 years! PR: docs/143461 Submitted by: Jeremy Huddleston jeremyhu apple.com Approved by: ed (mentor, implicit) MFC after: 1 week Modified: head/lib/libc/gen/rand48.3 Modified: head/lib/libc/gen/rand48.3 ============================================================================== --- head/lib/libc/gen/rand48.3 Tue Feb 2 19:19:57 2010 (r203392) +++ head/lib/libc/gen/rand48.3 Tue Feb 2 19:28:01 2010 (r203393) @@ -57,7 +57,7 @@ The particular formula employed is r(n+1) = (a * r(n) + c) mod m where the default values are -for the multiplicand a = 0xfdeece66d = 25214903917 and +for the multiplicand a = 0x5deece66d = 25214903917 and the addend c = 0xb = 11. The modulo is always fixed at m = 2 ** 48. r(n) is called the seed of the random number generator. From owner-svn-src-all@FreeBSD.ORG Tue Feb 2 19:37:27 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 10200106566B; Tue, 2 Feb 2010 19:37:27 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F1EDD8FC0C; Tue, 2 Feb 2010 19:37:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o12JbQe2056992; Tue, 2 Feb 2010 19:37:26 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o12JbQbU056974; Tue, 2 Feb 2010 19:37:26 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201002021937.o12JbQbU056974@svn.freebsd.org> From: Gavin Atkinson Date: Tue, 2 Feb 2010 19:37:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203394 - stable/8/lib/librpcsec_gss X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2010 19:37:27 -0000 Author: gavin Date: Tue Feb 2 19:37:26 2010 New Revision: 203394 URL: http://svn.freebsd.org/changeset/base/203394 Log: Merge r203025,r203026 from head: Correct the HISTORY section of these man pages to show when the function, not the "manual page example" was introduced. Approved by: ed (mentor, implicit) Modified: stable/8/lib/librpcsec_gss/rpc_gss_get_error.3 stable/8/lib/librpcsec_gss/rpc_gss_get_mech_info.3 stable/8/lib/librpcsec_gss/rpc_gss_get_mechanisms.3 stable/8/lib/librpcsec_gss/rpc_gss_get_principal_name.3 stable/8/lib/librpcsec_gss/rpc_gss_get_versions.3 stable/8/lib/librpcsec_gss/rpc_gss_getcred.3 stable/8/lib/librpcsec_gss/rpc_gss_is_installed.3 stable/8/lib/librpcsec_gss/rpc_gss_max_data_length.3 stable/8/lib/librpcsec_gss/rpc_gss_mech_to_oid.3 stable/8/lib/librpcsec_gss/rpc_gss_oid_to_mech.3 stable/8/lib/librpcsec_gss/rpc_gss_qop_to_num.3 stable/8/lib/librpcsec_gss/rpc_gss_seccreate.3 stable/8/lib/librpcsec_gss/rpc_gss_set_callback.3 stable/8/lib/librpcsec_gss/rpc_gss_set_defaults.3 stable/8/lib/librpcsec_gss/rpc_gss_set_svc_name.3 stable/8/lib/librpcsec_gss/rpc_gss_svc_max_data_length.3 stable/8/lib/librpcsec_gss/rpcsec_gss.3 Directory Properties: stable/8/lib/librpcsec_gss/ (props changed) Modified: stable/8/lib/librpcsec_gss/rpc_gss_get_error.3 ============================================================================== --- stable/8/lib/librpcsec_gss/rpc_gss_get_error.3 Tue Feb 2 19:28:01 2010 (r203393) +++ stable/8/lib/librpcsec_gss/rpc_gss_get_error.3 Tue Feb 2 19:37:26 2010 (r203394) @@ -24,7 +24,7 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd July 4, 2008 +.Dd January 26, 2010 .Dt RPC_GSS_GET_ERROR 3 .Os .Sh NAME @@ -50,7 +50,7 @@ A pointer to a structure where the error .Sh HISTORY The .Nm -manual page example first appeared in +function first appeared in .Fx 8.0 . .Sh AUTHORS This Modified: stable/8/lib/librpcsec_gss/rpc_gss_get_mech_info.3 ============================================================================== --- stable/8/lib/librpcsec_gss/rpc_gss_get_mech_info.3 Tue Feb 2 19:28:01 2010 (r203393) +++ stable/8/lib/librpcsec_gss/rpc_gss_get_mech_info.3 Tue Feb 2 19:37:26 2010 (r203394) @@ -24,7 +24,7 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd July 4, 2008 +.Dd January 26, 2010 .Dt RPC_GSS_GET_MECH_INFO 3 .Os .Sh NAME @@ -60,7 +60,7 @@ otherwise .Sh HISTORY The .Nm -manual page example first appeared in +function first appeared in .Fx 8.0 . .Sh AUTHORS This Modified: stable/8/lib/librpcsec_gss/rpc_gss_get_mechanisms.3 ============================================================================== --- stable/8/lib/librpcsec_gss/rpc_gss_get_mechanisms.3 Tue Feb 2 19:28:01 2010 (r203393) +++ stable/8/lib/librpcsec_gss/rpc_gss_get_mechanisms.3 Tue Feb 2 19:37:26 2010 (r203394) @@ -24,7 +24,7 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd July 4, 2008 +.Dd January 26, 2010 .Dt RPC_GSS_GET_MECHANISMS 3 .Os .Sh NAME @@ -47,7 +47,7 @@ terminated list of installed security me .Sh HISTORY The .Nm -manual page example first appeared in +function first appeared in .Fx 8.0 . .Sh AUTHORS This Modified: stable/8/lib/librpcsec_gss/rpc_gss_get_principal_name.3 ============================================================================== --- stable/8/lib/librpcsec_gss/rpc_gss_get_principal_name.3 Tue Feb 2 19:28:01 2010 (r203393) +++ stable/8/lib/librpcsec_gss/rpc_gss_get_principal_name.3 Tue Feb 2 19:37:26 2010 (r203394) @@ -24,7 +24,7 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd July 4, 2008 +.Dd January 26, 2010 .Dt RPC_GSS_GET_PRINCIPAL_NAME 3 .Os .Sh NAME @@ -74,7 +74,7 @@ otherwise .Sh HISTORY The .Nm -manual page example first appeared in +function first appeared in .Fx 8.0 . .Sh AUTHORS This Modified: stable/8/lib/librpcsec_gss/rpc_gss_get_versions.3 ============================================================================== --- stable/8/lib/librpcsec_gss/rpc_gss_get_versions.3 Tue Feb 2 19:28:01 2010 (r203393) +++ stable/8/lib/librpcsec_gss/rpc_gss_get_versions.3 Tue Feb 2 19:37:26 2010 (r203394) @@ -24,7 +24,7 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd July 4, 2008 +.Dd January 26, 2010 .Dt RPC_GSS_GET_VERSIONS 3 .Os .Sh NAME @@ -56,7 +56,7 @@ is set to the lowest suppored protocol v .Sh HISTORY The .Nm -manual page example first appeared in +function first appeared in .Fx 8.0 . .Sh AUTHORS This Modified: stable/8/lib/librpcsec_gss/rpc_gss_getcred.3 ============================================================================== --- stable/8/lib/librpcsec_gss/rpc_gss_getcred.3 Tue Feb 2 19:28:01 2010 (r203393) +++ stable/8/lib/librpcsec_gss/rpc_gss_getcred.3 Tue Feb 2 19:37:26 2010 (r203394) @@ -24,7 +24,7 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd July 4, 2008 +.Dd January 26, 2010 .Dt RPC_GSS_GETCRED 3 .Os .Sh NAME @@ -77,7 +77,7 @@ otherwise. .Sh HISTORY The .Nm -manual page example first appeared in +function first appeared in .Fx 8.0 . .Sh AUTHORS This Modified: stable/8/lib/librpcsec_gss/rpc_gss_is_installed.3 ============================================================================== --- stable/8/lib/librpcsec_gss/rpc_gss_is_installed.3 Tue Feb 2 19:28:01 2010 (r203393) +++ stable/8/lib/librpcsec_gss/rpc_gss_is_installed.3 Tue Feb 2 19:37:26 2010 (r203394) @@ -24,7 +24,7 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd July 4, 2008 +.Dd January 26, 2010 .Dt RPC_GSS_IS_INSTALLED 3 .Os .Sh NAME @@ -57,7 +57,7 @@ otherwise. .Sh HISTORY The .Nm -manual page example first appeared in +function first appeared in .Fx 8.0 . .Sh AUTHORS This Modified: stable/8/lib/librpcsec_gss/rpc_gss_max_data_length.3 ============================================================================== --- stable/8/lib/librpcsec_gss/rpc_gss_max_data_length.3 Tue Feb 2 19:28:01 2010 (r203393) +++ stable/8/lib/librpcsec_gss/rpc_gss_max_data_length.3 Tue Feb 2 19:37:26 2010 (r203394) @@ -24,7 +24,7 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd July 4, 2008 +.Dd January 26, 2010 .Dt RPC_GSS_MAX_DATA_LENGTH 3 .Os .Sh NAME @@ -56,7 +56,7 @@ The maximum message size that can be enc .Sh HISTORY The .Nm -manual page example first appeared in +function first appeared in .Fx 8.0 . .Sh AUTHORS This Modified: stable/8/lib/librpcsec_gss/rpc_gss_mech_to_oid.3 ============================================================================== --- stable/8/lib/librpcsec_gss/rpc_gss_mech_to_oid.3 Tue Feb 2 19:28:01 2010 (r203393) +++ stable/8/lib/librpcsec_gss/rpc_gss_mech_to_oid.3 Tue Feb 2 19:37:26 2010 (r203394) @@ -24,7 +24,7 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd July 4, 2008 +.Dd January 26, 2010 .Dt RPC_GSS_MECH_TO_OID 3 .Os .Sh NAME @@ -60,7 +60,7 @@ is returned, otherwise .Sh HISTORY The .Nm -manual page example first appeared in +function first appeared in .Fx 8.0 . .Sh AUTHORS This Modified: stable/8/lib/librpcsec_gss/rpc_gss_oid_to_mech.3 ============================================================================== --- stable/8/lib/librpcsec_gss/rpc_gss_oid_to_mech.3 Tue Feb 2 19:28:01 2010 (r203393) +++ stable/8/lib/librpcsec_gss/rpc_gss_oid_to_mech.3 Tue Feb 2 19:37:26 2010 (r203394) @@ -24,7 +24,7 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd July 4, 2008 +.Dd January 26, 2010 .Dt RPC_GSS_OID_TO_MECH 3 .Os .Sh NAME @@ -60,7 +60,7 @@ is returned, otherwise .Sh HISTORY The .Nm -manual page example first appeared in +function first appeared in .Fx 8.0 . .Sh AUTHORS This Modified: stable/8/lib/librpcsec_gss/rpc_gss_qop_to_num.3 ============================================================================== --- stable/8/lib/librpcsec_gss/rpc_gss_qop_to_num.3 Tue Feb 2 19:28:01 2010 (r203393) +++ stable/8/lib/librpcsec_gss/rpc_gss_qop_to_num.3 Tue Feb 2 19:37:26 2010 (r203394) @@ -24,7 +24,7 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd July 4, 2008 +.Dd January 26, 2010 .Dt RPC_GSS_QOP_TO_NUM 3 .Os .Sh NAME @@ -62,7 +62,7 @@ is returned, otherwise .Sh HISTORY The .Nm -manual page example first appeared in +function first appeared in .Fx 8.0 . .Sh AUTHORS This Modified: stable/8/lib/librpcsec_gss/rpc_gss_seccreate.3 ============================================================================== --- stable/8/lib/librpcsec_gss/rpc_gss_seccreate.3 Tue Feb 2 19:28:01 2010 (r203393) +++ stable/8/lib/librpcsec_gss/rpc_gss_seccreate.3 Tue Feb 2 19:37:26 2010 (r203394) @@ -24,7 +24,7 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd July 4, 2008 +.Dd January 26, 2010 .Dt RPC_GSS_SECCREATE 3 .Os .Sh NAME @@ -104,7 +104,7 @@ to this value. .Sh HISTORY The .Nm -manual page example first appeared in +function first appeared in .Fx 8.0 . .Sh AUTHORS This Modified: stable/8/lib/librpcsec_gss/rpc_gss_set_callback.3 ============================================================================== --- stable/8/lib/librpcsec_gss/rpc_gss_set_callback.3 Tue Feb 2 19:28:01 2010 (r203393) +++ stable/8/lib/librpcsec_gss/rpc_gss_set_callback.3 Tue Feb 2 19:37:26 2010 (r203394) @@ -24,7 +24,7 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd July 4, 2008 +.Dd January 26, 2010 .Dt RPC_GSS_SET_CALLBACK 3 .Os .Sh NAME @@ -100,7 +100,7 @@ otherwise .Sh HISTORY The .Nm -manual page example first appeared in +function first appeared in .Fx 8.0 . .Sh AUTHORS This Modified: stable/8/lib/librpcsec_gss/rpc_gss_set_defaults.3 ============================================================================== --- stable/8/lib/librpcsec_gss/rpc_gss_set_defaults.3 Tue Feb 2 19:28:01 2010 (r203393) +++ stable/8/lib/librpcsec_gss/rpc_gss_set_defaults.3 Tue Feb 2 19:37:26 2010 (r203394) @@ -24,7 +24,7 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd July 4, 2008 +.Dd January 26, 2010 .Dt RPC_GSS_SET_DEFAULTS 3 .Os .Sh NAME @@ -62,7 +62,7 @@ if the values were set .Sh HISTORY The .Nm -manual page example first appeared in +function first appeared in .Fx 8.0 . .Sh AUTHORS This Modified: stable/8/lib/librpcsec_gss/rpc_gss_set_svc_name.3 ============================================================================== --- stable/8/lib/librpcsec_gss/rpc_gss_set_svc_name.3 Tue Feb 2 19:28:01 2010 (r203393) +++ stable/8/lib/librpcsec_gss/rpc_gss_set_svc_name.3 Tue Feb 2 19:37:26 2010 (r203394) @@ -24,7 +24,7 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd July 4, 2008 +.Dd January 26, 2010 .Dt RPC_GSS_SET_SVC_NAME 3 .Os .Sh NAME @@ -79,7 +79,7 @@ otherwise. .Sh HISTORY The .Nm -manual page example first appeared in +function first appeared in .Fx 8.0 . .Sh AUTHORS This Modified: stable/8/lib/librpcsec_gss/rpc_gss_svc_max_data_length.3 ============================================================================== --- stable/8/lib/librpcsec_gss/rpc_gss_svc_max_data_length.3 Tue Feb 2 19:28:01 2010 (r203393) +++ stable/8/lib/librpcsec_gss/rpc_gss_svc_max_data_length.3 Tue Feb 2 19:37:26 2010 (r203394) @@ -24,7 +24,7 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd July 4, 2008 +.Dd January 26, 2010 .Dt RPC_GSS_SVC_MAX_DATA_LENGTH 3 .Os .Sh NAME @@ -56,7 +56,7 @@ The maximum message size that can be enc .Sh HISTORY The .Nm -manual page example first appeared in +function first appeared in .Fx 8.0 . .Sh AUTHORS This Modified: stable/8/lib/librpcsec_gss/rpcsec_gss.3 ============================================================================== --- stable/8/lib/librpcsec_gss/rpcsec_gss.3 Tue Feb 2 19:28:01 2010 (r203393) +++ stable/8/lib/librpcsec_gss/rpcsec_gss.3 Tue Feb 2 19:37:26 2010 (r203394) @@ -24,7 +24,7 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd July 4, 2008 +.Dd January 26, 2010 .Dt RPC_GSS_SECCREATE 3 .Os .Sh NAME @@ -222,7 +222,7 @@ Calculate maximum server message sizes. .Sh HISTORY The .Nm -manual page example first appeared in +library first appeared in .Fx 8.0 . .Sh AUTHORS This From owner-svn-src-all@FreeBSD.ORG Tue Feb 2 19:44:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BF62C106566C; Tue, 2 Feb 2010 19:44:51 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AFA358FC13; Tue, 2 Feb 2010 19:44:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o12JipLi058745; Tue, 2 Feb 2010 19:44:51 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o12Jipow058743; Tue, 2 Feb 2010 19:44:51 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201002021944.o12Jipow058743@svn.freebsd.org> From: Gavin Atkinson Date: Tue, 2 Feb 2010 19:44:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203395 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2010 19:44:51 -0000 Author: gavin Date: Tue Feb 2 19:44:51 2010 New Revision: 203395 URL: http://svn.freebsd.org/changeset/base/203395 Log: Bump .Dd, forgotten in r203393 Approved by: ed (mentor, implicit) MFC after: 1 week Modified: head/lib/libc/gen/rand48.3 Modified: head/lib/libc/gen/rand48.3 ============================================================================== --- head/lib/libc/gen/rand48.3 Tue Feb 2 19:37:26 2010 (r203394) +++ head/lib/libc/gen/rand48.3 Tue Feb 2 19:44:51 2010 (r203395) @@ -12,7 +12,7 @@ .\" @(#)rand48.3 V1.0 MB 8 Oct 1993 .\" $FreeBSD$ .\" -.Dd October 8, 1993 +.Dd February 2, 2010 .Dt RAND48 3 .Os .Sh NAME From owner-svn-src-all@FreeBSD.ORG Tue Feb 2 19:44:53 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 067081065679; Tue, 2 Feb 2010 19:44:53 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E7D248FC1B; Tue, 2 Feb 2010 19:44:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o12Jiqq5058796; Tue, 2 Feb 2010 19:44:52 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o12JiqcK058759; Tue, 2 Feb 2010 19:44:52 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201002021944.o12JiqcK058759@svn.freebsd.org> From: Gavin Atkinson Date: Tue, 2 Feb 2010 19:44:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203396 - stable/8/lib/libgssapi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2010 19:44:53 -0000 Author: gavin Date: Tue Feb 2 19:44:52 2010 New Revision: 203396 URL: http://svn.freebsd.org/changeset/base/203396 Log: Merge r203027 from head: Correct the HISTORY section of these man pages to show when the function, not the "manual page example" was introduced. Approved by: ed (mentor, implicit) Modified: stable/8/lib/libgssapi/gss_accept_sec_context.3 stable/8/lib/libgssapi/gss_acquire_cred.3 stable/8/lib/libgssapi/gss_add_cred.3 stable/8/lib/libgssapi/gss_add_oid_set_member.3 stable/8/lib/libgssapi/gss_canonicalize_name.3 stable/8/lib/libgssapi/gss_compare_name.3 stable/8/lib/libgssapi/gss_context_time.3 stable/8/lib/libgssapi/gss_create_empty_oid_set.3 stable/8/lib/libgssapi/gss_delete_sec_context.3 stable/8/lib/libgssapi/gss_display_name.3 stable/8/lib/libgssapi/gss_display_status.3 stable/8/lib/libgssapi/gss_duplicate_name.3 stable/8/lib/libgssapi/gss_export_name.3 stable/8/lib/libgssapi/gss_export_sec_context.3 stable/8/lib/libgssapi/gss_get_mic.3 stable/8/lib/libgssapi/gss_import_name.3 stable/8/lib/libgssapi/gss_import_sec_context.3 stable/8/lib/libgssapi/gss_indicate_mechs.3 stable/8/lib/libgssapi/gss_init_sec_context.3 stable/8/lib/libgssapi/gss_inquire_context.3 stable/8/lib/libgssapi/gss_inquire_cred.3 stable/8/lib/libgssapi/gss_inquire_cred_by_mech.3 stable/8/lib/libgssapi/gss_inquire_mechs_for_name.3 stable/8/lib/libgssapi/gss_inquire_names_for_mech.3 stable/8/lib/libgssapi/gss_process_context_token.3 stable/8/lib/libgssapi/gss_release_buffer.3 stable/8/lib/libgssapi/gss_release_cred.3 stable/8/lib/libgssapi/gss_release_name.3 stable/8/lib/libgssapi/gss_release_oid_set.3 stable/8/lib/libgssapi/gss_test_oid_set_member.3 stable/8/lib/libgssapi/gss_unwrap.3 stable/8/lib/libgssapi/gss_verify_mic.3 stable/8/lib/libgssapi/gss_wrap.3 stable/8/lib/libgssapi/gss_wrap_size_limit.3 stable/8/lib/libgssapi/gssapi.3 stable/8/lib/libgssapi/mech.5 Directory Properties: stable/8/lib/libgssapi/ (props changed) Modified: stable/8/lib/libgssapi/gss_accept_sec_context.3 ============================================================================== --- stable/8/lib/libgssapi/gss_accept_sec_context.3 Tue Feb 2 19:44:51 2010 (r203395) +++ stable/8/lib/libgssapi/gss_accept_sec_context.3 Tue Feb 2 19:44:52 2010 (r203396) @@ -27,7 +27,7 @@ .\" $FreeBSD$ .\" .\" The following commands are required for all man pages. -.Dd October 30, 2007 +.Dd January 26, 2010 .Os .Dt GSS_ACCEPT_SEC_CONTEXT 3 PRM .Sh NAME @@ -451,7 +451,7 @@ Generic Security Service API Version 2 : .Sh HISTORY The .Nm -manual page example first appeared in +function first appeared in .Fx 7.0 . .Sh AUTHORS John Wray, Iris Associates Modified: stable/8/lib/libgssapi/gss_acquire_cred.3 ============================================================================== --- stable/8/lib/libgssapi/gss_acquire_cred.3 Tue Feb 2 19:44:51 2010 (r203395) +++ stable/8/lib/libgssapi/gss_acquire_cred.3 Tue Feb 2 19:44:52 2010 (r203396) @@ -27,7 +27,7 @@ .\" $FreeBSD$ .\" .\" The following commands are required for all man pages. -.Dd October 30, 2007 +.Dd January 26, 2010 .Os .Dt GSS_ACQUIRE_CRED 3 PRM .Sh NAME @@ -205,7 +205,7 @@ Generic Security Service API Version 2 : .Sh HISTORY The .Nm -manual page example first appeared in +function first appeared in .Fx 7.0 . .Sh AUTHORS John Wray, Iris Associates Modified: stable/8/lib/libgssapi/gss_add_cred.3 ============================================================================== --- stable/8/lib/libgssapi/gss_add_cred.3 Tue Feb 2 19:44:51 2010 (r203395) +++ stable/8/lib/libgssapi/gss_add_cred.3 Tue Feb 2 19:44:52 2010 (r203396) @@ -27,7 +27,7 @@ .\" $FreeBSD$ .\" .\" The following commands are required for all man pages. -.Dd October 30, 2007 +.Dd January 26, 2010 .Os .Dt GSS_ADD_CRED 3 PRM .Sh NAME @@ -305,7 +305,7 @@ Generic Security Service API Version 2 : .Sh HISTORY The .Nm -manual page example first appeared in +function first appeared in .Fx 7.0 . .Sh AUTHORS John Wray, Iris Associates Modified: stable/8/lib/libgssapi/gss_add_oid_set_member.3 ============================================================================== --- stable/8/lib/libgssapi/gss_add_oid_set_member.3 Tue Feb 2 19:44:51 2010 (r203395) +++ stable/8/lib/libgssapi/gss_add_oid_set_member.3 Tue Feb 2 19:44:52 2010 (r203396) @@ -27,7 +27,7 @@ .\" $FreeBSD$ .\" .\" The following commands are required for all man pages. -.Dd October 30, 2007 +.Dd January 26, 2010 .Os .Dt GSS_ADD_OID_SET_MEMBER 3 PRM .Sh NAME @@ -97,7 +97,7 @@ Generic Security Service API Version 2 : .Sh HISTORY The .Nm -manual page example first appeared in +function first appeared in .Fx 7.0 . .Sh AUTHORS John Wray, Iris Associates Modified: stable/8/lib/libgssapi/gss_canonicalize_name.3 ============================================================================== --- stable/8/lib/libgssapi/gss_canonicalize_name.3 Tue Feb 2 19:44:51 2010 (r203395) +++ stable/8/lib/libgssapi/gss_canonicalize_name.3 Tue Feb 2 19:44:52 2010 (r203396) @@ -27,7 +27,7 @@ .\" $FreeBSD$ .\" .\" The following commands are required for all man pages. -.Dd October 30, 2007 +.Dd January 26, 2010 .Os .Dt GSS_CANONICALIZE_NAME 3 PRM .Sh NAME @@ -104,7 +104,7 @@ Generic Security Service API Version 2 : .Sh HISTORY The .Nm -manual page example first appeared in +function first appeared in .Fx 7.0 . .Sh AUTHORS John Wray, Iris Associates Modified: stable/8/lib/libgssapi/gss_compare_name.3 ============================================================================== --- stable/8/lib/libgssapi/gss_compare_name.3 Tue Feb 2 19:44:51 2010 (r203395) +++ stable/8/lib/libgssapi/gss_compare_name.3 Tue Feb 2 19:44:52 2010 (r203396) @@ -27,7 +27,7 @@ .\" $FreeBSD$ .\" .\" The following commands are required for all man pages. -.Dd October 30, 2007 +.Dd January 26, 2010 .Os .Dt GSS_COMPARE_NAME PRM .Sh NAME @@ -89,7 +89,7 @@ Generic Security Service API Version 2 : .Sh HISTORY The .Nm -manual page example first appeared in +function first appeared in .Fx 7.0 . .Sh AUTHORS John Wray, Iris Associates Modified: stable/8/lib/libgssapi/gss_context_time.3 ============================================================================== --- stable/8/lib/libgssapi/gss_context_time.3 Tue Feb 2 19:44:51 2010 (r203395) +++ stable/8/lib/libgssapi/gss_context_time.3 Tue Feb 2 19:44:52 2010 (r203396) @@ -27,7 +27,7 @@ .\" $FreeBSD$ .\" .\" The following commands are required for all man pages. -.Dd October 30, 2007 +.Dd January 26, 2010 .Os .Dt GSS_CONTEXT_TIME 3 PRM .Sh NAME @@ -75,7 +75,7 @@ Generic Security Service API Version 2 : .Sh HISTORY The .Nm -manual page example first appeared in +function first appeared in .Fx 7.0 . .Sh AUTHORS John Wray, Iris Associates Modified: stable/8/lib/libgssapi/gss_create_empty_oid_set.3 ============================================================================== --- stable/8/lib/libgssapi/gss_create_empty_oid_set.3 Tue Feb 2 19:44:51 2010 (r203395) +++ stable/8/lib/libgssapi/gss_create_empty_oid_set.3 Tue Feb 2 19:44:52 2010 (r203396) @@ -27,7 +27,7 @@ .\" $FreeBSD$ .\" .\" The following commands are required for all man pages. -.Dd October 30, 2007 +.Dd January 26, 2010 .Os .Dt GSS_CREATE_EMPTY_OID_SET 3 PRM .Sh NAME @@ -78,7 +78,7 @@ Generic Security Service API Version 2 : .Sh HISTORY The .Nm -manual page example first appeared in +function first appeared in .Fx 7.0 . .Sh AUTHORS John Wray, Iris Associates Modified: stable/8/lib/libgssapi/gss_delete_sec_context.3 ============================================================================== --- stable/8/lib/libgssapi/gss_delete_sec_context.3 Tue Feb 2 19:44:51 2010 (r203395) +++ stable/8/lib/libgssapi/gss_delete_sec_context.3 Tue Feb 2 19:44:52 2010 (r203396) @@ -27,7 +27,7 @@ .\" $FreeBSD$ .\" .\" The following commands are required for all man pages. -.Dd October 30, 2007 +.Dd January 26, 2010 .Os .Dt GSS_DELETE_SEC_CONTEXT 3 PRM .Sh NAME @@ -130,7 +130,7 @@ Generic Security Service API Version 2 : .Sh HISTORY The .Nm -manual page example first appeared in +function first appeared in .Fx 7.0 . .Sh AUTHORS John Wray, Iris Associates Modified: stable/8/lib/libgssapi/gss_display_name.3 ============================================================================== --- stable/8/lib/libgssapi/gss_display_name.3 Tue Feb 2 19:44:51 2010 (r203395) +++ stable/8/lib/libgssapi/gss_display_name.3 Tue Feb 2 19:44:52 2010 (r203396) @@ -27,7 +27,7 @@ .\" $FreeBSD$ .\" .\" The following commands are required for all man pages. -.Dd October 30, 2007 +.Dd January 26, 2010 .Os .Dt GSS_DISPLAY_NAME 3 PRM .Sh NAME @@ -118,7 +118,7 @@ Generic Security Service API Version 2 : .Sh HISTORY The .Nm -manual page example first appeared in +function first appeared in .Fx 7.0 . .Sh AUTHORS John Wray, Iris Associates Modified: stable/8/lib/libgssapi/gss_display_status.3 ============================================================================== --- stable/8/lib/libgssapi/gss_display_status.3 Tue Feb 2 19:44:51 2010 (r203395) +++ stable/8/lib/libgssapi/gss_display_status.3 Tue Feb 2 19:44:52 2010 (r203396) @@ -27,7 +27,7 @@ .\" $FreeBSD$ .\" .\" The following commands are required for all man pages. -.Dd October 30, 2007 +.Dd January 26, 2010 .Os .Dt GSS_DISPLAY_STATUS 3 PRM .Sh NAME @@ -177,7 +177,7 @@ Generic Security Service API Version 2 : .Sh HISTORY The .Nm -manual page example first appeared in +function first appeared in .Fx 7.0 . .Sh AUTHORS John Wray, Iris Associates Modified: stable/8/lib/libgssapi/gss_duplicate_name.3 ============================================================================== --- stable/8/lib/libgssapi/gss_duplicate_name.3 Tue Feb 2 19:44:51 2010 (r203395) +++ stable/8/lib/libgssapi/gss_duplicate_name.3 Tue Feb 2 19:44:52 2010 (r203396) @@ -27,7 +27,7 @@ .\" $FreeBSD$ .\" .\" The following commands are required for all man pages. -.Dd October 30, 2007 +.Dd January 26, 2010 .Os .Dt GSS_DUPLICATE_NAME 3 PRM .Sh NAME @@ -90,7 +90,7 @@ Generic Security Service API Version 2 : .Sh HISTORY The .Nm -manual page example first appeared in +function first appeared in .Fx 7.0 . .Sh AUTHORS John Wray, Iris Associates Modified: stable/8/lib/libgssapi/gss_export_name.3 ============================================================================== --- stable/8/lib/libgssapi/gss_export_name.3 Tue Feb 2 19:44:51 2010 (r203395) +++ stable/8/lib/libgssapi/gss_export_name.3 Tue Feb 2 19:44:52 2010 (r203396) @@ -27,7 +27,7 @@ .\" $FreeBSD$ .\" .\" The following commands are required for all man pages. -.Dd October 30, 2007 +.Dd January 26, 2010 .Os .Dt GSS_EXPORT_NAME 3 PRM .Sh NAME @@ -95,7 +95,7 @@ Generic Security Service API Version 2 : .Sh HISTORY The .Nm -manual page example first appeared in +function first appeared in .Fx 7.0 . .Sh AUTHORS John Wray, Iris Associates Modified: stable/8/lib/libgssapi/gss_export_sec_context.3 ============================================================================== --- stable/8/lib/libgssapi/gss_export_sec_context.3 Tue Feb 2 19:44:51 2010 (r203395) +++ stable/8/lib/libgssapi/gss_export_sec_context.3 Tue Feb 2 19:44:52 2010 (r203396) @@ -27,7 +27,7 @@ .\" $FreeBSD$ .\" .\" The following commands are required for all man pages. -.Dd October 30, 2007 +.Dd January 26, 2010 .Os .Dt GSS_EXPORT_SEC_CONTEXT 3 PRM .Sh NAME @@ -135,7 +135,7 @@ Generic Security Service API Version 2 : .Sh HISTORY The .Nm -manual page example first appeared in +function first appeared in .Fx 7.0 . .Sh AUTHORS John Wray, Iris Associates Modified: stable/8/lib/libgssapi/gss_get_mic.3 ============================================================================== --- stable/8/lib/libgssapi/gss_get_mic.3 Tue Feb 2 19:44:51 2010 (r203395) +++ stable/8/lib/libgssapi/gss_get_mic.3 Tue Feb 2 19:44:52 2010 (r203396) @@ -27,7 +27,7 @@ .\" $FreeBSD$ .\" .\" The following commands are required for all man pages. -.Dd October 30, 2007 +.Dd January 26, 2010 .Os .Dt GSS_GET_MIC 3 PRM .Sh NAME @@ -132,7 +132,7 @@ Generic Security Service API Version 2 : .Sh HISTORY The .Nm -manual page example first appeared in +function first appeared in .Fx 7.0 . .Sh AUTHORS John Wray, Iris Associates Modified: stable/8/lib/libgssapi/gss_import_name.3 ============================================================================== --- stable/8/lib/libgssapi/gss_import_name.3 Tue Feb 2 19:44:51 2010 (r203395) +++ stable/8/lib/libgssapi/gss_import_name.3 Tue Feb 2 19:44:52 2010 (r203396) @@ -27,7 +27,7 @@ .\" $FreeBSD$ .\" .\" The following commands are required for all man pages. -.Dd October 30, 2007 +.Dd January 26, 2010 .Os .Dt GSS_IMPORT_NAME 3 PRM .Sh NAME @@ -106,7 +106,7 @@ Generic Security Service API Version 2 : .Sh HISTORY The .Nm -manual page example first appeared in +function first appeared in .Fx 7.0 . .Sh AUTHORS John Wray, Iris Associates Modified: stable/8/lib/libgssapi/gss_import_sec_context.3 ============================================================================== --- stable/8/lib/libgssapi/gss_import_sec_context.3 Tue Feb 2 19:44:51 2010 (r203395) +++ stable/8/lib/libgssapi/gss_import_sec_context.3 Tue Feb 2 19:44:52 2010 (r203396) @@ -27,7 +27,7 @@ .\" $FreeBSD$ .\" .\" The following commands are required for all man pages. -.Dd October 30, 2007 +.Dd January 26, 2010 .Os .Dt GSS_IMPORT_SEC_CONTEXT 3 PRM .Sh NAME @@ -87,7 +87,7 @@ Generic Security Service API Version 2 : .Sh HISTORY The .Nm -manual page example first appeared in +function first appeared in .Fx 7.0 . .Sh AUTHORS John Wray, Iris Associates Modified: stable/8/lib/libgssapi/gss_indicate_mechs.3 ============================================================================== --- stable/8/lib/libgssapi/gss_indicate_mechs.3 Tue Feb 2 19:44:51 2010 (r203395) +++ stable/8/lib/libgssapi/gss_indicate_mechs.3 Tue Feb 2 19:44:52 2010 (r203396) @@ -27,7 +27,7 @@ .\" $FreeBSD$ .\" .\" The following commands are required for all man pages. -.Dd October 30, 2007 +.Dd January 26, 2010 .Os .Dt GSS_INDICATE_MECHS 3 PRM .Sh NAME @@ -74,7 +74,7 @@ Generic Security Service API Version 2 : .Sh HISTORY The .Nm -manual page example first appeared in +function first appeared in .Fx 7.0 . .Sh AUTHORS John Wray, Iris Associates Modified: stable/8/lib/libgssapi/gss_init_sec_context.3 ============================================================================== --- stable/8/lib/libgssapi/gss_init_sec_context.3 Tue Feb 2 19:44:51 2010 (r203395) +++ stable/8/lib/libgssapi/gss_init_sec_context.3 Tue Feb 2 19:44:52 2010 (r203396) @@ -27,7 +27,7 @@ .\" $FreeBSD$ .\" .\" The following commands are required for all man pages. -.Dd October 30, 2007 +.Dd January 26, 2010 .Os .Dt GSS_INIT_SEC_CONTEXT 3 PRM .Sh NAME @@ -538,7 +538,7 @@ Generic Security Service API Version 2 : .Sh HISTORY The .Nm -manual page example first appeared in +function first appeared in .Fx 7.0 . .Sh AUTHORS John Wray, Iris Associates Modified: stable/8/lib/libgssapi/gss_inquire_context.3 ============================================================================== --- stable/8/lib/libgssapi/gss_inquire_context.3 Tue Feb 2 19:44:51 2010 (r203395) +++ stable/8/lib/libgssapi/gss_inquire_context.3 Tue Feb 2 19:44:52 2010 (r203396) @@ -27,7 +27,7 @@ .\" $FreeBSD$ .\" .\" The following commands are required for all man pages. -.Dd October 30, 2007 +.Dd January 26, 2010 .Os .Dt GSS_INQUIRE_CONTEXT 3 PRM .Sh NAME @@ -251,7 +251,7 @@ Generic Security Service API Version 2 : .Sh HISTORY The .Nm -manual page example first appeared in +function first appeared in .Fx 7.0 . .Sh AUTHORS John Wray, Iris Associates Modified: stable/8/lib/libgssapi/gss_inquire_cred.3 ============================================================================== --- stable/8/lib/libgssapi/gss_inquire_cred.3 Tue Feb 2 19:44:51 2010 (r203395) +++ stable/8/lib/libgssapi/gss_inquire_cred.3 Tue Feb 2 19:44:52 2010 (r203396) @@ -27,7 +27,7 @@ .\" $FreeBSD$ .\" .\" The following commands are required for all man pages. -.Dd October 30, 2007 +.Dd January 26, 2010 .Os .Dt GSS_INQUIRE_CRED 3 PRM .Sh NAME @@ -125,7 +125,7 @@ Generic Security Service API Version 2 : .Sh HISTORY The .Nm -manual page example first appeared in +function first appeared in .Fx 7.0 . .Sh AUTHORS John Wray, Iris Associates Modified: stable/8/lib/libgssapi/gss_inquire_cred_by_mech.3 ============================================================================== --- stable/8/lib/libgssapi/gss_inquire_cred_by_mech.3 Tue Feb 2 19:44:51 2010 (r203395) +++ stable/8/lib/libgssapi/gss_inquire_cred_by_mech.3 Tue Feb 2 19:44:52 2010 (r203396) @@ -27,7 +27,7 @@ .\" $FreeBSD$ .\" .\" The following commands are required for all man pages. -.Dd October 30, 2007 +.Dd January 26, 2010 .Os .Dt GSS_INQUIRE_CRED_BY_MECH 3 PRM .Sh NAME @@ -139,7 +139,7 @@ Generic Security Service API Version 2 : .Sh HISTORY The .Nm -manual page example first appeared in +function first appeared in .Fx 7.0 . .Sh AUTHORS John Wray, Iris Associates Modified: stable/8/lib/libgssapi/gss_inquire_mechs_for_name.3 ============================================================================== --- stable/8/lib/libgssapi/gss_inquire_mechs_for_name.3 Tue Feb 2 19:44:51 2010 (r203395) +++ stable/8/lib/libgssapi/gss_inquire_mechs_for_name.3 Tue Feb 2 19:44:52 2010 (r203396) @@ -27,7 +27,7 @@ .\" $FreeBSD$ .\" .\" The following commands are required for all man pages. -.Dd October 30, 2007 +.Dd January 26, 2010 .Os .Dt GSS_INQUIRE_MECHS_FOR_NAME 3 PRM .Sh NAME @@ -100,7 +100,7 @@ Generic Security Service API Version 2 : .Sh HISTORY The .Nm -manual page example first appeared in +function first appeared in .Fx 7.0 . .Sh AUTHORS John Wray, Iris Associates Modified: stable/8/lib/libgssapi/gss_inquire_names_for_mech.3 ============================================================================== --- stable/8/lib/libgssapi/gss_inquire_names_for_mech.3 Tue Feb 2 19:44:51 2010 (r203395) +++ stable/8/lib/libgssapi/gss_inquire_names_for_mech.3 Tue Feb 2 19:44:52 2010 (r203396) @@ -27,7 +27,7 @@ .\" $FreeBSD$ .\" .\" The following commands are required for all man pages. -.Dd October 30, 2007 +.Dd January 26, 2010 .Os .Dt GSS_INQUIRE_NAMES_FOR_MECH 3 PRM .Sh NAME @@ -74,7 +74,7 @@ Generic Security Service API Version 2 : .Sh HISTORY The .Nm -manual page example first appeared in +function first appeared in .Fx 7.0 . .Sh AUTHORS John Wray, Iris Associates Modified: stable/8/lib/libgssapi/gss_process_context_token.3 ============================================================================== --- stable/8/lib/libgssapi/gss_process_context_token.3 Tue Feb 2 19:44:51 2010 (r203395) +++ stable/8/lib/libgssapi/gss_process_context_token.3 Tue Feb 2 19:44:52 2010 (r203396) @@ -27,7 +27,7 @@ .\" $FreeBSD$ .\" .\" The following commands are required for all man pages. -.Dd October 30, 2007 +.Dd January 26, 2010 .Os .Dt GSS_PROCESS_CONTEXT_TOKEN 3 PRM .Sh NAME @@ -103,7 +103,7 @@ Generic Security Service API Version 2 : .Sh HISTORY The .Nm -manual page example first appeared in +function first appeared in .Fx 7.0 . .Sh AUTHORS John Wray, Iris Associates Modified: stable/8/lib/libgssapi/gss_release_buffer.3 ============================================================================== --- stable/8/lib/libgssapi/gss_release_buffer.3 Tue Feb 2 19:44:51 2010 (r203395) +++ stable/8/lib/libgssapi/gss_release_buffer.3 Tue Feb 2 19:44:52 2010 (r203396) @@ -27,7 +27,7 @@ .\" $FreeBSD$ .\" .\" The following commands are required for all man pages. -.Dd October 30, 2007 +.Dd January 26, 2010 .Os .Dt GSS_RELEASE_BUFFER 3 PRM .Sh NAME @@ -78,7 +78,7 @@ Generic Security Service API Version 2 : .Sh HISTORY The .Nm -manual page example first appeared in +function first appeared in .Fx 7.0 . .Sh AUTHORS John Wray, Iris Associates Modified: stable/8/lib/libgssapi/gss_release_cred.3 ============================================================================== --- stable/8/lib/libgssapi/gss_release_cred.3 Tue Feb 2 19:44:51 2010 (r203395) +++ stable/8/lib/libgssapi/gss_release_cred.3 Tue Feb 2 19:44:52 2010 (r203396) @@ -27,7 +27,7 @@ .\" $FreeBSD$ .\" .\" The following commands are required for all man pages. -.Dd October 30, 2007 +.Dd January 26, 2010 .Os .Dt GSS_RELEASE_CRED 3 PRM .Sh NAME @@ -75,7 +75,7 @@ Generic Security Service API Version 2 : .Sh HISTORY The .Nm -manual page example first appeared in +function first appeared in .Fx 7.0 . .Sh AUTHORS John Wray, Iris Associates Modified: stable/8/lib/libgssapi/gss_release_name.3 ============================================================================== --- stable/8/lib/libgssapi/gss_release_name.3 Tue Feb 2 19:44:51 2010 (r203395) +++ stable/8/lib/libgssapi/gss_release_name.3 Tue Feb 2 19:44:52 2010 (r203396) @@ -27,7 +27,7 @@ .\" $FreeBSD$ .\" .\" The following commands are required for all man pages. -.Dd October 30, 2007 +.Dd January 26, 2010 .Os .Dt GSS_RELEASE_NAME 3 PRM .Sh NAME @@ -71,7 +71,7 @@ Generic Security Service API Version 2 : .Sh HISTORY The .Nm -manual page example first appeared in +function first appeared in .Fx 7.0 . .Sh AUTHORS John Wray, Iris Associates Modified: stable/8/lib/libgssapi/gss_release_oid_set.3 ============================================================================== --- stable/8/lib/libgssapi/gss_release_oid_set.3 Tue Feb 2 19:44:51 2010 (r203395) +++ stable/8/lib/libgssapi/gss_release_oid_set.3 Tue Feb 2 19:44:52 2010 (r203396) @@ -27,7 +27,7 @@ .\" $FreeBSD$ .\" .\" The following commands are required for all man pages. -.Dd October 30, 2007 +.Dd January 26, 2010 .Os .Dt GSS_RELEASE_OID_SET 3 PRM .Sh NAME @@ -76,7 +76,7 @@ Generic Security Service API Version 2 : .Sh HISTORY The .Nm -manual page example first appeared in +function first appeared in .Fx 7.0 . .Sh AUTHORS John Wray, Iris Associates Modified: stable/8/lib/libgssapi/gss_test_oid_set_member.3 ============================================================================== --- stable/8/lib/libgssapi/gss_test_oid_set_member.3 Tue Feb 2 19:44:51 2010 (r203395) +++ stable/8/lib/libgssapi/gss_test_oid_set_member.3 Tue Feb 2 19:44:52 2010 (r203396) @@ -27,7 +27,7 @@ .\" $FreeBSD$ .\" .\" The following commands are required for all man pages. -.Dd October 30, 2007 +.Dd January 26, 2010 .Os .Dt GSS_TEST_OID_SET_MEMBER 3 PRM .Sh NAME @@ -83,7 +83,7 @@ Generic Security Service API Version 2 : .Sh HISTORY The .Nm -manual page example first appeared in +function first appeared in .Fx 7.0 . .Sh AUTHORS John Wray, Iris Associates Modified: stable/8/lib/libgssapi/gss_unwrap.3 ============================================================================== --- stable/8/lib/libgssapi/gss_unwrap.3 Tue Feb 2 19:44:51 2010 (r203395) +++ stable/8/lib/libgssapi/gss_unwrap.3 Tue Feb 2 19:44:52 2010 (r203396) @@ -27,7 +27,7 @@ .\" $FreeBSD$ .\" .\" The following commands are required for all man pages. -.Dd October 30, 2007 +.Dd January 26, 2010 .Os .Dt GSS_UNWRAP 3 PRM .Sh NAME @@ -158,7 +158,7 @@ Generic Security Service API Version 2 : .Sh HISTORY The .Nm -manual page example first appeared in +function first appeared in .Fx 7.0 . .Sh AUTHORS John Wray, Iris Associates Modified: stable/8/lib/libgssapi/gss_verify_mic.3 ============================================================================== --- stable/8/lib/libgssapi/gss_verify_mic.3 Tue Feb 2 19:44:51 2010 (r203395) +++ stable/8/lib/libgssapi/gss_verify_mic.3 Tue Feb 2 19:44:52 2010 (r203396) @@ -27,7 +27,7 @@ .\" $FreeBSD$ .\" .\" The following commands are required for all man pages. -.Dd October 30, 2007 +.Dd January 26, 2010 .Os .Dt GSS_VERIFY_MIC 3 PRM .Sh NAME @@ -139,7 +139,7 @@ Generic Security Service API Version 2 : .Sh HISTORY The .Nm -manual page example first appeared in +function first appeared in .Fx 7.0 . .Sh AUTHORS John Wray, Iris Associates Modified: stable/8/lib/libgssapi/gss_wrap.3 ============================================================================== --- stable/8/lib/libgssapi/gss_wrap.3 Tue Feb 2 19:44:51 2010 (r203395) +++ stable/8/lib/libgssapi/gss_wrap.3 Tue Feb 2 19:44:52 2010 (r203396) @@ -27,7 +27,7 @@ .\" $FreeBSD$ .\" .\" The following commands are required for all man pages. -.Dd October 30, 2007 +.Dd January 26, 2010 .Os .Dt GSS_WRAP 3 PRM .Sh NAME @@ -146,7 +146,7 @@ Generic Security Service API Version 2 : .Sh HISTORY The .Nm -manual page example first appeared in +function first appeared in .Fx 7.0 . .Sh AUTHORS John Wray, Iris Associates Modified: stable/8/lib/libgssapi/gss_wrap_size_limit.3 ============================================================================== --- stable/8/lib/libgssapi/gss_wrap_size_limit.3 Tue Feb 2 19:44:51 2010 (r203395) +++ stable/8/lib/libgssapi/gss_wrap_size_limit.3 Tue Feb 2 19:44:52 2010 (r203396) @@ -27,7 +27,7 @@ .\" $FreeBSD$ .\" .\" The following commands are required for all man pages. -.Dd October 30, 2007 +.Dd January 26, 2010 .Os .Dt GSS_WRAP_SIZE_LIMIT 3 PRM .Sh NAME @@ -131,7 +131,7 @@ Generic Security Service API Version 2 : .Sh HISTORY The .Nm -manual page example first appeared in +function first appeared in .Fx 7.0 . .Sh AUTHORS John Wray, Iris Associates Modified: stable/8/lib/libgssapi/gssapi.3 ============================================================================== --- stable/8/lib/libgssapi/gssapi.3 Tue Feb 2 19:44:51 2010 (r203395) +++ stable/8/lib/libgssapi/gssapi.3 Tue Feb 2 19:44:52 2010 (r203396) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 30, 2005 +.Dd January 26, 2010 .Dt GSSAPI 3 .Os .Sh NAME @@ -229,7 +229,7 @@ Generic Security Service API Version 2 : .Sh HISTORY The .Nm -manual page first appeared in +library first appeared in .Fx 7.0 . .Sh AUTHORS John Wray, Iris Associates Modified: stable/8/lib/libgssapi/mech.5 ============================================================================== --- stable/8/lib/libgssapi/mech.5 Tue Feb 2 19:44:51 2010 (r203395) +++ stable/8/lib/libgssapi/mech.5 Tue Feb 2 19:44:52 2010 (r203396) @@ -23,7 +23,7 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd November 14, 2005 +.Dd January 26, 2010 .Dt MECH 5 .Os .Sh NAME @@ -93,7 +93,7 @@ GSS_KRB5_CONF_C_QOP_DES 0x0100 kerberos .Sh HISTORY The .Nm -manual page example first appeared in +manual page first appeared in .Fx 7.0 . .Sh AUTHORS This From owner-svn-src-all@FreeBSD.ORG Tue Feb 2 19:51:31 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 154F21065670; Tue, 2 Feb 2010 19:51:31 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 049768FC16; Tue, 2 Feb 2010 19:51:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o12JpUSF060304; Tue, 2 Feb 2010 19:51:30 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o12JpU9R060302; Tue, 2 Feb 2010 19:51:30 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201002021951.o12JpU9R060302@svn.freebsd.org> From: Gavin Atkinson Date: Tue, 2 Feb 2010 19:51: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: r203397 - stable/8/sbin/growfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2010 19:51:31 -0000 Author: gavin Date: Tue Feb 2 19:51:30 2010 New Revision: 203397 URL: http://svn.freebsd.org/changeset/base/203397 Log: Merge r201401 from head: Remove dead code. This section of code is only run in the (sblock.fs_magic == FS_UFS1_MAGIC) case, so the check within the loop is redundant. PR: bin/115174 (partly) Submitted by: Nate Eldredge nge cs.hmc.edu Reviewed by: mjacob Approved by: ed (mentor, implicit) Modified: stable/8/sbin/growfs/growfs.c Directory Properties: stable/8/sbin/growfs/ (props changed) Modified: stable/8/sbin/growfs/growfs.c ============================================================================== --- stable/8/sbin/growfs/growfs.c Tue Feb 2 19:44:52 2010 (r203396) +++ stable/8/sbin/growfs/growfs.c Tue Feb 2 19:51:30 2010 (r203397) @@ -376,7 +376,6 @@ initcg(int cylno, time_t utime, int fso, long d, dlower, dupper, blkno, start; ufs2_daddr_t i, cbase, dmax; struct ufs1_dinode *dp1; - struct ufs2_dinode *dp2; struct csum *cs; if (iobuf == NULL && (iobuf = malloc(sblock.fs_bsize)) == NULL) { @@ -455,16 +454,11 @@ initcg(int cylno, time_t utime, int fso, for (i = 2 * sblock.fs_frag; i < sblock.fs_ipg / INOPF(&sblock); i += sblock.fs_frag) { dp1 = (struct ufs1_dinode *)iobuf; - dp2 = (struct ufs2_dinode *)iobuf; #ifdef FSIRAND - for (j = 0; j < INOPB(&sblock); j++) - if (sblock.fs_magic == FS_UFS1_MAGIC) { - dp1->di_gen = random(); - dp1++; - } else { - dp2->di_gen = random(); - dp2++; - } + for (j = 0; j < INOPB(&sblock); j++) { + dp1->di_gen = random(); + dp1++; + } #endif wtfs(fsbtodb(&sblock, cgimin(&sblock, cylno) + i), sblock.fs_bsize, iobuf, fso, Nflag); From owner-svn-src-all@FreeBSD.ORG Tue Feb 2 20:01:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5889C1065692; Tue, 2 Feb 2010 20:01:46 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 48E598FC1F; Tue, 2 Feb 2010 20:01:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o12K1kY5062624; Tue, 2 Feb 2010 20:01:46 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o12K1kvE062622; Tue, 2 Feb 2010 20:01:46 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201002022001.o12K1kvE062622@svn.freebsd.org> From: Ed Schouten Date: Tue, 2 Feb 2010 20:01:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203398 - svnadmin/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2010 20:01:46 -0000 Author: ed Date: Tue Feb 2 20:01:45 2010 New Revision: 203398 URL: http://svn.freebsd.org/changeset/base/203398 Log: Release gavin@! I really see no use in explicitly mentoring him anymore. He is doing fine on his own and in case he has questions, he discussed them with me or others. Gavin, it has been nice mentoring you! Modified: svnadmin/conf/mentors Modified: svnadmin/conf/mentors ============================================================================== --- svnadmin/conf/mentors Tue Feb 2 19:51:30 2010 (r203397) +++ svnadmin/conf/mentors Tue Feb 2 20:01:45 2010 (r203398) @@ -15,7 +15,6 @@ cbzimmer sam dchagin kib eri mlaier Co-mentor: thompsa gabor delphij -gavin ed ivoras gnn jh trasz Co-mentor: rwatson jinmei gnn From owner-svn-src-all@FreeBSD.ORG Tue Feb 2 20:38:31 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 12EE51065670; Tue, 2 Feb 2010 20:38:31 +0000 (UTC) (envelope-from qingli@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A12488FC13; Tue, 2 Feb 2010 20:38:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o12KcUvB070881; Tue, 2 Feb 2010 20:38:30 GMT (envelope-from qingli@svn.freebsd.org) Received: (from qingli@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o12KcU3E070879; Tue, 2 Feb 2010 20:38:30 GMT (envelope-from qingli@svn.freebsd.org) Message-Id: <201002022038.o12KcU3E070879@svn.freebsd.org> From: Qing Li Date: Tue, 2 Feb 2010 20:38:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203401 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2010 20:38:31 -0000 Author: qingli Date: Tue Feb 2 20:38:30 2010 New Revision: 203401 URL: http://svn.freebsd.org/changeset/base/203401 Log: Some of the existing ppp and vpn related scripts create and set the IP addresses of the tunnel end points to the same value. In these cases the loopback route is not installed for the local end. Verified by: avg MFC after: 5 days Modified: head/sys/netinet/in.c Modified: head/sys/netinet/in.c ============================================================================== --- head/sys/netinet/in.c Tue Feb 2 20:37:11 2010 (r203400) +++ head/sys/netinet/in.c Tue Feb 2 20:38:30 2010 (r203401) @@ -921,6 +921,12 @@ in_ifinit(struct ifnet *ifp, struct in_i if (ia->ia_addr.sin_addr.s_addr == INADDR_ANY) return (0); + if (ifp->if_flags & IFF_POINTOPOINT) { + if (ia->ia_dstaddr.sin_addr.s_addr == ia->ia_addr.sin_addr.s_addr) + return (0); + } + + /* * add a loopback route to self */ From owner-svn-src-all@FreeBSD.ORG Tue Feb 2 22:25:22 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C5187106566B; Tue, 2 Feb 2010 22:25:22 +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 B4D0F8FC1E; Tue, 2 Feb 2010 22:25:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o12MPMkR094468; Tue, 2 Feb 2010 22:25:22 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o12MPMdH094466; Tue, 2 Feb 2010 22:25:22 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201002022225.o12MPMdH094466@svn.freebsd.org> From: Xin LI Date: Tue, 2 Feb 2010 22:25:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203408 - head/sys/geom/virstor X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2010 22:25:22 -0000 Author: delphij Date: Tue Feb 2 22:25:22 2010 New Revision: 203408 URL: http://svn.freebsd.org/changeset/base/203408 Log: Prevent NULL deference by checking return value of gctl_get_asciiparam. MFC after: 2 weeks Modified: head/sys/geom/virstor/g_virstor.c Modified: head/sys/geom/virstor/g_virstor.c ============================================================================== --- head/sys/geom/virstor/g_virstor.c Tue Feb 2 21:51:52 2010 (r203407) +++ head/sys/geom/virstor/g_virstor.c Tue Feb 2 22:25:22 2010 (r203408) @@ -311,6 +311,11 @@ virstor_ctl_add(struct gctl_req *req, st snprintf(aname, sizeof aname, "arg%d", i); prov_name = gctl_get_asciiparam(req, aname); + if (prov_name == NULL) { + gctl_error(req, "Error fetching argument '%s'", aname); + g_topology_unlock(); + return; + } if (strncmp(prov_name, _PATH_DEV, strlen(_PATH_DEV)) == 0) prov_name += strlen(_PATH_DEV); @@ -565,6 +570,10 @@ virstor_ctl_remove(struct gctl_req *req, sprintf(param, "arg%d", i); prov_name = gctl_get_asciiparam(req, param); + if (prov_name == NULL) { + gctl_error(req, "Error fetching argument '%s'", param); + return; + } if (strncmp(prov_name, _PATH_DEV, strlen(_PATH_DEV)) == 0) prov_name += strlen(_PATH_DEV); From owner-svn-src-all@FreeBSD.ORG Tue Feb 2 23:05:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6DCF2106568B; Tue, 2 Feb 2010 23:05:55 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 446778FC17; Tue, 2 Feb 2010 23:05:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o12N5t6B003561; Tue, 2 Feb 2010 23:05:55 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o12N5tk4003559; Tue, 2 Feb 2010 23:05:55 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <201002022305.o12N5tk4003559@svn.freebsd.org> From: "George V. Neville-Neil" Date: Tue, 2 Feb 2010 23:05:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203409 - svnadmin/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2010 23:05:55 -0000 Author: gnn Date: Tue Feb 2 23:05:53 2010 New Revision: 203409 URL: http://svn.freebsd.org/changeset/base/203409 Log: Release Ivan Voras from mentorship. Modified: svnadmin/conf/mentors Modified: svnadmin/conf/mentors ============================================================================== --- svnadmin/conf/mentors Tue Feb 2 22:25:22 2010 (r203408) +++ svnadmin/conf/mentors Tue Feb 2 23:05:53 2010 (r203409) @@ -15,7 +15,6 @@ cbzimmer sam dchagin kib eri mlaier Co-mentor: thompsa gabor delphij -ivoras gnn jh trasz Co-mentor: rwatson jinmei gnn lstewart gnn From owner-svn-src-all@FreeBSD.ORG Tue Feb 2 23:10:27 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9D7411065698; Tue, 2 Feb 2010 23:10:27 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8BBD38FC0C; Tue, 2 Feb 2010 23:10:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o12NARY2004611; Tue, 2 Feb 2010 23:10:27 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o12NARVd004609; Tue, 2 Feb 2010 23:10:27 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201002022310.o12NARVd004609@svn.freebsd.org> From: Robert Watson Date: Tue, 2 Feb 2010 23:10:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203410 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2010 23:10:27 -0000 Author: rwatson Date: Tue Feb 2 23:10:27 2010 New Revision: 203410 URL: http://svn.freebsd.org/changeset/base/203410 Log: Only audit pathnames in namei(9) if copying the directory string completes successfully. Continue to do this before the empty path check so that the ENOENT returned in that case gets an empty string token in the BSM record. MFC after: 3 days Modified: head/sys/kern/vfs_lookup.c Modified: head/sys/kern/vfs_lookup.c ============================================================================== --- head/sys/kern/vfs_lookup.c Tue Feb 2 23:05:53 2010 (r203409) +++ head/sys/kern/vfs_lookup.c Tue Feb 2 23:10:27 2010 (r203410) @@ -162,11 +162,16 @@ namei(struct nameidata *ndp) error = copyinstr(ndp->ni_dirp, cnp->cn_pnbuf, MAXPATHLEN, (size_t *)&ndp->ni_pathlen); - /* If we are auditing the kernel pathname, save the user pathname. */ - if (cnp->cn_flags & AUDITVNODE1) - AUDIT_ARG_UPATH1(td, cnp->cn_pnbuf); - if (cnp->cn_flags & AUDITVNODE2) - AUDIT_ARG_UPATH2(td, cnp->cn_pnbuf); + if (error == 0) { + /* + * If we are auditing the kernel pathname, save the user + * pathname. + */ + if (cnp->cn_flags & AUDITVNODE1) + AUDIT_ARG_UPATH1(td, cnp->cn_pnbuf); + if (cnp->cn_flags & AUDITVNODE2) + AUDIT_ARG_UPATH2(td, cnp->cn_pnbuf); + } /* * Don't allow empty pathnames. From owner-svn-src-all@FreeBSD.ORG Wed Feb 3 01:12:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3C9C9106568D; Wed, 3 Feb 2010 01:12:20 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2C9338FC1A; Wed, 3 Feb 2010 01:12:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o131CKl3031500; Wed, 3 Feb 2010 01:12:20 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o131CKdB031498; Wed, 3 Feb 2010 01:12:20 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <201002030112.o131CKdB031498@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Wed, 3 Feb 2010 01:12:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203411 - head/sys/geom X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 01:12:20 -0000 Author: gonzo Date: Wed Feb 3 01:12:19 2010 New Revision: 203411 URL: http://svn.freebsd.org/changeset/base/203411 Log: - Give geom_redboot taste of flash/spi. Now there is another provider of redboot partitions. This patch was missed during merge from projects/mips. Modified: head/sys/geom/geom_redboot.c Modified: head/sys/geom/geom_redboot.c ============================================================================== --- head/sys/geom/geom_redboot.c Tue Feb 2 23:10:27 2010 (r203410) +++ head/sys/geom/geom_redboot.c Wed Feb 3 01:12:19 2010 (r203411) @@ -252,7 +252,8 @@ g_redboot_taste(struct g_class *mp, stru if (!strcmp(pp->geom->class->name, REDBOOT_CLASS_NAME)) return (NULL); /* XXX only taste flash providers */ - if (strncmp(pp->name, "cfi", 3)) + if (strncmp(pp->name, "cfi", 3) && + strncmp(pp->name, "flash/spi", 9)) return (NULL); gp = g_slice_new(mp, REDBOOT_MAXSLICE, pp, &cp, &sc, sizeof(*sc), g_redboot_start); From owner-svn-src-all@FreeBSD.ORG Wed Feb 3 02:39:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8FBB6106566C; Wed, 3 Feb 2010 02:39:08 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 65F7A8FC15; Wed, 3 Feb 2010 02:39:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o132d8TB050591; Wed, 3 Feb 2010 02:39:08 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o132d8U3050589; Wed, 3 Feb 2010 02:39:08 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201002030239.o132d8U3050589@svn.freebsd.org> From: Warner Losh Date: Wed, 3 Feb 2010 02:39:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203412 - head/gnu/usr.bin/binutils X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 02:39:08 -0000 Author: imp Date: Wed Feb 3 02:39:08 2010 New Revision: 203412 URL: http://svn.freebsd.org/changeset/base/203412 Log: Remove another reference to alpha... Modified: head/gnu/usr.bin/binutils/Makefile.inc Modified: head/gnu/usr.bin/binutils/Makefile.inc ============================================================================== --- head/gnu/usr.bin/binutils/Makefile.inc Wed Feb 3 01:12:19 2010 (r203411) +++ head/gnu/usr.bin/binutils/Makefile.inc Wed Feb 3 02:39:08 2010 (r203412) @@ -1,9 +1,5 @@ # $FreeBSD$ -.if (${TARGET_ARCH} == "alpha") -WARNS?= 2 -.else WARNS?= 3 -.endif .include "../Makefile.inc" From owner-svn-src-all@FreeBSD.ORG Wed Feb 3 03:56:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 54D1B106566C; Wed, 3 Feb 2010 03:56:33 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 445A68FC0C; Wed, 3 Feb 2010 03:56:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o133uXSA069346; Wed, 3 Feb 2010 03:56:33 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o133uXks069344; Wed, 3 Feb 2010 03:56:33 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201002030356.o133uXks069344@svn.freebsd.org> From: David Xu Date: Wed, 3 Feb 2010 03:56:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203414 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 03:56:33 -0000 Author: davidxu Date: Wed Feb 3 03:56:32 2010 New Revision: 203414 URL: http://svn.freebsd.org/changeset/base/203414 Log: After busied the lock, re-read state word before checking waiters flag, otherwise, the waiters bit may not be set and a wakeup is lost. Submitted by: justin.teller at gmail dot com MFC after: 3 days Modified: head/sys/kern/kern_umtx.c Modified: head/sys/kern/kern_umtx.c ============================================================================== --- head/sys/kern/kern_umtx.c Wed Feb 3 03:26:00 2010 (r203413) +++ head/sys/kern/kern_umtx.c Wed Feb 3 03:56:32 2010 (r203414) @@ -2526,6 +2526,12 @@ do_rw_rdlock(struct thread *td, struct u umtxq_busy(&uq->uq_key); umtxq_unlock(&uq->uq_key); + /* + * re-read the state, in case it changed between the try-lock above + * and the check below + */ + state = fuword32(__DEVOLATILE(int32_t *, &rwlock->rw_state)); + /* set read contention bit */ while ((state & wrflags) && !(state & URWLOCK_READ_WAITERS)) { oldstate = casuword32(&rwlock->rw_state, state, state | URWLOCK_READ_WAITERS); @@ -2658,6 +2664,12 @@ do_rw_wrlock(struct thread *td, struct u umtxq_busy(&uq->uq_key); umtxq_unlock(&uq->uq_key); + /* + * re-read the state, in case it changed between the try-lock above + * and the check below + */ + state = fuword32(__DEVOLATILE(int32_t *, &rwlock->rw_state)); + while (((state & URWLOCK_WRITE_OWNER) || URWLOCK_READER_COUNT(state) != 0) && (state & URWLOCK_WRITE_WAITERS) == 0) { oldstate = casuword32(&rwlock->rw_state, state, state | URWLOCK_WRITE_WAITERS); From owner-svn-src-all@FreeBSD.ORG Wed Feb 3 04:09:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6960F106566C; Wed, 3 Feb 2010 04:09:36 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 593688FC0C; Wed, 3 Feb 2010 04:09:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1349aou072222; Wed, 3 Feb 2010 04:09:36 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1349adS072220; Wed, 3 Feb 2010 04:09:36 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201002030409.o1349adS072220@svn.freebsd.org> From: Neel Natu Date: Wed, 3 Feb 2010 04:09:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203415 - head/sys/mips/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 04:09:36 -0000 Author: neel Date: Wed Feb 3 04:09:36 2010 New Revision: 203415 URL: http://svn.freebsd.org/changeset/base/203415 Log: Reduce the size of the array used to store the TLB mappings for the kernel stack from 3 to 2. We only map in 2 pages for the kernel stack. Approved by: imp (mentor) Modified: head/sys/mips/include/proc.h Modified: head/sys/mips/include/proc.h ============================================================================== --- head/sys/mips/include/proc.h Wed Feb 3 03:56:32 2010 (r203414) +++ head/sys/mips/include/proc.h Wed Feb 3 04:09:36 2010 (r203415) @@ -44,7 +44,7 @@ */ struct mdthread { int md_flags; /* machine-dependent flags */ - int md_upte[KSTACK_PAGES]; /* ptes for mapping u pcb */ + int md_upte[KSTACK_PAGES - 1]; /* ptes for mapping u pcb */ int md_ss_addr; /* single step address for ptrace */ int md_ss_instr; /* single step instruction for ptrace */ register_t md_saved_intr; From owner-svn-src-all@FreeBSD.ORG Wed Feb 3 07:21:21 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 282DE106568F; Wed, 3 Feb 2010 07:21:21 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 189478FC1D; Wed, 3 Feb 2010 07:21:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o137LK3D016000; Wed, 3 Feb 2010 07:21:20 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o137LKtw015998; Wed, 3 Feb 2010 07:21:20 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201002030721.o137LKtw015998@svn.freebsd.org> From: David Xu Date: Wed, 3 Feb 2010 07:21:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203419 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 07:21:21 -0000 Author: davidxu Date: Wed Feb 3 07:21:20 2010 New Revision: 203419 URL: http://svn.freebsd.org/changeset/base/203419 Log: Fix comments in do_sem_wait(). Modified: head/sys/kern/kern_umtx.c Modified: head/sys/kern/kern_umtx.c ============================================================================== --- head/sys/kern/kern_umtx.c Wed Feb 3 06:55:13 2010 (r203418) +++ head/sys/kern/kern_umtx.c Wed Feb 3 07:21:20 2010 (r203419) @@ -2864,8 +2864,7 @@ do_sem_wait(struct thread *td, struct _u } /* - * The magic thing is we should set c_has_waiters to 1 before - * releasing user mutex. + * set waiters byte and sleep. */ suword32(__DEVOLATILE(uint32_t *, &sem->_has_waiters), 1); From owner-svn-src-all@FreeBSD.ORG Wed Feb 3 08:42:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3B0CF106566C; Wed, 3 Feb 2010 08:42:09 +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 2A6128FC16; Wed, 3 Feb 2010 08:42:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o138g9eO034285; Wed, 3 Feb 2010 08:42:09 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o138g9lt034282; Wed, 3 Feb 2010 08:42:09 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201002030842.o138g9lt034282@svn.freebsd.org> From: Alexander Motin Date: Wed, 3 Feb 2010 08:42:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203420 - in head/sys: cam kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 08:42:09 -0000 Author: mav Date: Wed Feb 3 08:42:08 2010 New Revision: 203420 URL: http://svn.freebsd.org/changeset/base/203420 Log: MFp4: Make CAM to stop all attached devices on system shutdown. It allows devices to park heads, reducing stress on power loss. Add `kern.cam.power_down` tunable and sysctl to controll it. Modified: head/sys/cam/cam_xpt.c head/sys/kern/kern_shutdown.c Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Wed Feb 3 07:21:20 2010 (r203419) +++ head/sys/cam/cam_xpt.c Wed Feb 3 08:42:08 2010 (r203420) @@ -39,7 +39,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include #include #include #include @@ -153,6 +153,10 @@ static struct xpt_softc xsoftc; TUNABLE_INT("kern.cam.boot_delay", &xsoftc.boot_delay); SYSCTL_INT(_kern_cam, OID_AUTO, boot_delay, CTLFLAG_RDTUN, &xsoftc.boot_delay, 0, "Bus registration wait time"); +static int xpt_power_down = 1; +TUNABLE_INT("kern.cam.power_down", &xpt_power_down); +SYSCTL_INT(_kern_cam, OID_AUTO, power_down, CTLFLAG_RW, + &xpt_power_down, 0, "Power down devices on shutdown"); /* Queues for our software interrupt handler */ typedef TAILQ_HEAD(cam_isrq, ccb_hdr) cam_isrq_t; @@ -236,6 +240,7 @@ static struct cam_ed* xpt_find_device(struct cam_et *target, lun_id_t lun_id); static void xpt_config(void *arg); static xpt_devicefunc_t xptpassannouncefunc; +static void xpt_shutdown(void *arg, int howto); static void xptaction(struct cam_sim *sim, union ccb *work_ccb); static void xptpoll(struct cam_sim *sim); static void camisr(void *); @@ -4660,6 +4665,12 @@ xpt_config(void *arg) #endif /* CAM_DEBUG_BUS */ #endif /* CAMDEBUG */ + /* Register our shutdown event handler */ + if ((EVENTHANDLER_REGISTER(shutdown_final, xpt_shutdown, + NULL, SHUTDOWN_PRI_FIRST)) == NULL) { + printf("xpt_config: failed to register shutdown event.\n"); + } + periphdriver_init(1); xpt_hold_boot(); callout_init(&xsoftc.boot_callout, 1); @@ -4667,7 +4678,7 @@ xpt_config(void *arg) xpt_boot_delay, NULL); /* Fire up rescan thread. */ if (kproc_create(xpt_scanner_thread, NULL, NULL, 0, 0, "xpt_thrd")) { - printf("xpt_init: failed to create rescan thread\n"); + printf("xpt_config: failed to create rescan thread.\n"); } } @@ -4741,6 +4752,87 @@ xpt_finishconfig_task(void *context, int free(context, M_CAMXPT); } +/* + * Power down all devices when we are going to power down the system. + */ +static void +xpt_shutdown_dev_done(struct cam_periph *periph, union ccb *done_ccb) +{ + + /* No-op. We're polling. */ + return; +} + +static int +xpt_shutdown_dev(struct cam_ed *device, void *arg) +{ + union ccb ccb; + struct cam_path path; + + if (device->flags & CAM_DEV_UNCONFIGURED) + return (1); + + if (device->protocol == PROTO_ATA) { + /* Only power down device if it supports power management. */ + if ((device->ident_data.support.command1 & + ATA_SUPPORT_POWERMGT) == 0) + return (1); + } else if (device->protocol != PROTO_SCSI) + return (1); + + xpt_compile_path(&path, + NULL, + device->target->bus->path_id, + device->target->target_id, + device->lun_id); + xpt_setup_ccb(&ccb.ccb_h, &path, CAM_PRIORITY_NORMAL); + if (device->protocol == PROTO_ATA) { + cam_fill_ataio(&ccb.ataio, + 1, + xpt_shutdown_dev_done, + CAM_DIR_NONE, + 0, + NULL, + 0, + 30*1000); + ata_28bit_cmd(&ccb.ataio, ATA_SLEEP, 0, 0, 0); + } else { + scsi_start_stop(&ccb.csio, + /*retries*/1, + xpt_shutdown_dev_done, + MSG_SIMPLE_Q_TAG, + /*start*/FALSE, + /*load/eject*/FALSE, + /*immediate*/TRUE, + SSD_FULL_SIZE, + /*timeout*/50*1000); + } + xpt_polled_action(&ccb); + + if ((ccb.ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) + xpt_print(&path, "Device power down failed\n"); + if ((ccb.ccb_h.status & CAM_DEV_QFRZN) != 0) + cam_release_devq(ccb.ccb_h.path, + /*relsim_flags*/0, + /*reduction*/0, + /*timeout*/0, + /*getcount_only*/0); + xpt_release_path(&path); + return (1); +} + +static void +xpt_shutdown(void * arg, int howto) +{ + + if (!xpt_power_down) + return; + if ((howto & RB_POWEROFF) == 0) + return; + + xpt_for_all_devices(xpt_shutdown_dev, NULL); +} + cam_status xpt_register_async(int event, ac_callback_t *cbfunc, void *cbarg, struct cam_path *path) Modified: head/sys/kern/kern_shutdown.c ============================================================================== --- head/sys/kern/kern_shutdown.c Wed Feb 3 07:21:20 2010 (r203419) +++ head/sys/kern/kern_shutdown.c Wed Feb 3 08:42:08 2010 (r203420) @@ -142,7 +142,7 @@ shutdown_conf(void *unused) { EVENTHANDLER_REGISTER(shutdown_final, poweroff_wait, NULL, - SHUTDOWN_PRI_FIRST); + SHUTDOWN_PRI_FIRST + 100); EVENTHANDLER_REGISTER(shutdown_final, shutdown_halt, NULL, SHUTDOWN_PRI_LAST + 100); EVENTHANDLER_REGISTER(shutdown_final, shutdown_panic, NULL, From owner-svn-src-all@FreeBSD.ORG Wed Feb 3 10:06:04 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1C915106566C; Wed, 3 Feb 2010 10:06: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 0B4A48FC1B; Wed, 3 Feb 2010 10:06:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o13A63wN058001; Wed, 3 Feb 2010 10:06:03 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o13A63Ov057997; Wed, 3 Feb 2010 10:06:03 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201002031006.o13A63Ov057997@svn.freebsd.org> From: Alexander Motin Date: Wed, 3 Feb 2010 10:06:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203421 - in head/sys: cam/ata sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 10:06:04 -0000 Author: mav Date: Wed Feb 3 10:06:03 2010 New Revision: 203421 URL: http://svn.freebsd.org/changeset/base/203421 Log: MFp4: Add Power Up In Stand-by feature support. Device with PUIS enabled require explicit command to do initial spin-up. Mark that command with CAM_HIGH_POWER flag, to allow CAM manage staggered spin-up. Modified: head/sys/cam/ata/ata_all.c head/sys/cam/ata/ata_xpt.c head/sys/sys/ata.h Modified: head/sys/cam/ata/ata_all.c ============================================================================== --- head/sys/cam/ata/ata_all.c Wed Feb 3 08:42:08 2010 (r203420) +++ head/sys/cam/ata/ata_all.c Wed Feb 3 10:06:03 2010 (r203421) @@ -146,6 +146,9 @@ ata_op_string(struct ata_cmd *cmd) case 0x03: return ("SETFEATURES SET TRANSFER MODE"); case 0x02: return ("SETFEATURES ENABLE WCACHE"); case 0x82: return ("SETFEATURES DISABLE WCACHE"); + case 0x06: return ("SETFEATURES ENABLE PUIS"); + case 0x86: return ("SETFEATURES DISABLE PUIS"); + case 0x07: return ("SETFEATURES SPIN-UP"); case 0xaa: return ("SETFEATURES ENABLE RCACHE"); case 0x55: return ("SETFEATURES DISABLE RCACHE"); } Modified: head/sys/cam/ata/ata_xpt.c ============================================================================== --- head/sys/cam/ata/ata_xpt.c Wed Feb 3 08:42:08 2010 (r203420) +++ head/sys/cam/ata/ata_xpt.c Wed Feb 3 10:06:03 2010 (r203421) @@ -86,6 +86,7 @@ PERIPHDRIVER_DECLARE(aprobe, probe_drive typedef enum { PROBE_RESET, PROBE_IDENTIFY, + PROBE_SPINUP, PROBE_SETMODE, PROBE_SET_MULTI, PROBE_INQUIRY, @@ -98,6 +99,7 @@ typedef enum { static char *probe_action_text[] = { "PROBE_RESET", "PROBE_IDENTIFY", + "PROBE_SPINUP", "PROBE_SETMODE", "PROBE_SET_MULTI", "PROBE_INQUIRY", @@ -129,6 +131,7 @@ typedef struct { uint32_t pm_pid; uint32_t pm_prv; int restart; + int spinup; struct cam_periph *periph; } probe_softc; @@ -212,7 +215,7 @@ proberegister(struct cam_periph *periph, return(CAM_REQ_CMP_ERR); } - softc = (probe_softc *)malloc(sizeof(*softc), M_CAMXPT, M_NOWAIT); + softc = (probe_softc *)malloc(sizeof(*softc), M_CAMXPT, M_ZERO | M_NOWAIT); if (softc == NULL) { printf("proberegister: Unable to probe new device. " @@ -314,6 +317,19 @@ probestart(struct cam_periph *periph, un else ata_28bit_cmd(ataio, ATA_ATAPI_IDENTIFY, 0, 0, 0); break; + case PROBE_SPINUP: + if (bootverbose) + xpt_print(path, "Spinning up device\n"); + cam_fill_ataio(ataio, + 1, + probedone, + /*flags*/CAM_DIR_NONE | CAM_HIGH_POWER, + 0, + /*data_ptr*/NULL, + /*dxfer_len*/0, + 30 * 1000); + ata_28bit_cmd(ataio, ATA_SETFEATURES, ATA_SF_PUIS_SPINUP, 0, 0); + break; case PROBE_SETMODE: { int mode, wantmode; @@ -768,8 +784,18 @@ noerror: ata_bpack(ident_buf->revision, ident_buf->revision, sizeof(ident_buf->revision)); ata_btrim(ident_buf->serial, sizeof(ident_buf->serial)); ata_bpack(ident_buf->serial, ident_buf->serial, sizeof(ident_buf->serial)); + /* Device may need spin-up before IDENTIFY become valid. */ + if ((ident_buf->config & ATA_RESP_INCOMPLETE) || + ((ident_buf->support.command2 & ATA_SUPPORT_STANDBY) && + (ident_buf->enabled.command2 & ATA_SUPPORT_STANDBY) && + (ident_buf->support.command2 & ATA_SUPPORT_SPINUP) && + softc->spinup == 0)) { + PROBE_SET_ACTION(softc, PROBE_SPINUP); + xpt_release_ccb(done_ccb); + xpt_schedule(periph, priority); + return; + } ident_buf = &path->device->ident_data; - if ((periph->path->device->flags & CAM_DEV_UNCONFIGURED) == 0) { /* Check that it is the same device. */ if (bcmp(softc->ident_data.model, ident_buf->model, @@ -829,6 +855,14 @@ noerror: xpt_schedule(periph, priority); return; } + case PROBE_SPINUP: + if (bootverbose) + xpt_print(path, "Spin-up done\n"); + softc->spinup = 1; + PROBE_SET_ACTION(softc, PROBE_IDENTIFY); + xpt_release_ccb(done_ccb); + xpt_schedule(periph, priority); + return; case PROBE_SETMODE: if (path->device->protocol == PROTO_ATA) { PROBE_SET_ACTION(softc, PROBE_SET_MULTI); Modified: head/sys/sys/ata.h ============================================================================== --- head/sys/sys/ata.h Wed Feb 3 08:42:08 2010 (r203420) +++ head/sys/sys/ata.h Wed Feb 3 10:06:03 2010 (r203421) @@ -48,6 +48,7 @@ struct ata_params { #define ATA_DRQ_SLOW 0x0000 /* cpu 3 ms delay */ #define ATA_DRQ_INTR 0x0020 /* interrupt 10 ms delay */ #define ATA_DRQ_FAST 0x0040 /* accel 50 us delay */ +#define ATA_RESP_INCOMPLETE 0x0004 /*001*/ u_int16_t cylinders; /* # of cylinders */ u_int16_t reserved2; @@ -345,6 +346,9 @@ struct ata_params { #define ATA_SF_SETXFER 0x03 /* set transfer mode */ #define ATA_SF_ENAB_WCACHE 0x02 /* enable write cache */ #define ATA_SF_DIS_WCACHE 0x82 /* disable write cache */ +#define ATA_SF_ENAB_PUIS 0x06 /* enable PUIS */ +#define ATA_SF_DIS_PUIS 0x86 /* disable PUIS */ +#define ATA_SF_PUIS_SPINUP 0x07 /* PUIS spin-up */ #define ATA_SF_ENAB_RCACHE 0xaa /* enable readahead cache */ #define ATA_SF_DIS_RCACHE 0x55 /* disable readahead cache */ #define ATA_SF_ENAB_RELIRQ 0x5d /* enable release interrupt */ From owner-svn-src-all@FreeBSD.ORG Wed Feb 3 10:07:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6EE52106568D; Wed, 3 Feb 2010 10:07:43 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5DB7F8FC12; Wed, 3 Feb 2010 10:07:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o13A7hP3058561; Wed, 3 Feb 2010 10:07:43 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o13A7hXX058554; Wed, 3 Feb 2010 10:07:43 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201002031007.o13A7hXX058554@svn.freebsd.org> From: Rui Paulo Date: Wed, 3 Feb 2010 10:07:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203422 - head/sys/net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 10:07:43 -0000 Author: rpaulo Date: Wed Feb 3 10:07:43 2010 New Revision: 203422 URL: http://svn.freebsd.org/changeset/base/203422 Log: When taking the AMPDU reorder fastpath, need_tap wasn't being initialized. Initialize on declaration to avoid this. Found with: clang static analyzer Modified: head/sys/net80211/ieee80211_adhoc.c head/sys/net80211/ieee80211_hostap.c head/sys/net80211/ieee80211_ioctl.h head/sys/net80211/ieee80211_sta.c head/sys/net80211/ieee80211_wds.c Modified: head/sys/net80211/ieee80211_adhoc.c ============================================================================== --- head/sys/net80211/ieee80211_adhoc.c Wed Feb 3 10:06:03 2010 (r203421) +++ head/sys/net80211/ieee80211_adhoc.c Wed Feb 3 10:07:43 2010 (r203422) @@ -293,7 +293,7 @@ adhoc_input(struct ieee80211_node *ni, s struct ieee80211_frame *wh; struct ieee80211_key *key; struct ether_header *eh; - int hdrspace, need_tap; + int hdrspace, need_tap = 1; /* mbuf need to be tapped. */ uint8_t dir, type, subtype, qos; uint8_t *bssid; uint16_t rxseq; @@ -318,7 +318,6 @@ adhoc_input(struct ieee80211_node *ni, s KASSERT(ni != NULL, ("null node")); ni->ni_inact = ni->ni_inact_reload; - need_tap = 1; /* mbuf need to be tapped. */ type = -1; /* undefined */ if (m->m_pkthdr.len < sizeof(struct ieee80211_frame_min)) { Modified: head/sys/net80211/ieee80211_hostap.c ============================================================================== --- head/sys/net80211/ieee80211_hostap.c Wed Feb 3 10:06:03 2010 (r203421) +++ head/sys/net80211/ieee80211_hostap.c Wed Feb 3 10:07:43 2010 (r203422) @@ -480,7 +480,7 @@ hostap_input(struct ieee80211_node *ni, struct ieee80211_frame *wh; struct ieee80211_key *key; struct ether_header *eh; - int hdrspace, need_tap; + int hdrspace, need_tap = 1; /* mbuf need to be tapped. */ uint8_t dir, type, subtype, qos; uint8_t *bssid; uint16_t rxseq; @@ -505,7 +505,6 @@ hostap_input(struct ieee80211_node *ni, KASSERT(ni != NULL, ("null node")); ni->ni_inact = ni->ni_inact_reload; - need_tap = 1; /* mbuf need to be tapped. */ type = -1; /* undefined */ if (m->m_pkthdr.len < sizeof(struct ieee80211_frame_min)) { Modified: head/sys/net80211/ieee80211_ioctl.h ============================================================================== --- head/sys/net80211/ieee80211_ioctl.h Wed Feb 3 10:06:03 2010 (r203421) +++ head/sys/net80211/ieee80211_ioctl.h Wed Feb 3 10:07:43 2010 (r203422) @@ -334,12 +334,12 @@ enum { }; struct ieee80211req_mesh_route { - uint8_t imr_flags; -#define IEEE80211_MESHRT_FLAGS_VALID 0x01 -#define IEEE80211_MESHRT_FLAGS_PROXY 0x02 uint8_t imr_dest[IEEE80211_ADDR_LEN]; uint8_t imr_nexthop[IEEE80211_ADDR_LEN]; uint16_t imr_nhops; + uint8_t imr_flags; +#define IEEE80211_MESHRT_FLAGS_VALID 0x01 +#define IEEE80211_MESHRT_FLAGS_PROXY 0x02 uint8_t imr_pad; uint32_t imr_metric; uint32_t imr_lifetime; Modified: head/sys/net80211/ieee80211_sta.c ============================================================================== --- head/sys/net80211/ieee80211_sta.c Wed Feb 3 10:06:03 2010 (r203421) +++ head/sys/net80211/ieee80211_sta.c Wed Feb 3 10:07:43 2010 (r203422) @@ -517,7 +517,7 @@ sta_input(struct ieee80211_node *ni, str struct ieee80211_frame *wh; struct ieee80211_key *key; struct ether_header *eh; - int hdrspace, need_tap; + int hdrspace, need_tap = 1; /* mbuf need to be tapped. */ uint8_t dir, type, subtype, qos; uint8_t *bssid; uint16_t rxseq; @@ -542,7 +542,6 @@ sta_input(struct ieee80211_node *ni, str KASSERT(ni != NULL, ("null node")); ni->ni_inact = ni->ni_inact_reload; - need_tap = 1; /* mbuf need to be tapped. */ type = -1; /* undefined */ if (m->m_pkthdr.len < sizeof(struct ieee80211_frame_min)) { Modified: head/sys/net80211/ieee80211_wds.c ============================================================================== --- head/sys/net80211/ieee80211_wds.c Wed Feb 3 10:06:03 2010 (r203421) +++ head/sys/net80211/ieee80211_wds.c Wed Feb 3 10:07:43 2010 (r203422) @@ -414,7 +414,7 @@ wds_input(struct ieee80211_node *ni, str struct ieee80211_frame *wh; struct ieee80211_key *key; struct ether_header *eh; - int hdrspace, need_tap; + int hdrspace, need_tap = 1; /* mbuf need to be tapped. */ uint8_t dir, type, subtype, qos; uint16_t rxseq; @@ -437,7 +437,6 @@ wds_input(struct ieee80211_node *ni, str KASSERT(ni != NULL, ("null node")); - need_tap = 1; /* mbuf need to be tapped. */ type = -1; /* undefined */ if (m->m_pkthdr.len < sizeof(struct ieee80211_frame_min)) { From owner-svn-src-all@FreeBSD.ORG Wed Feb 3 10:12:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 637241065743; Wed, 3 Feb 2010 10:12:49 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 52F7B8FC12; Wed, 3 Feb 2010 10:12:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o13ACn6I059985; Wed, 3 Feb 2010 10:12:49 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o13ACndR059983; Wed, 3 Feb 2010 10:12:49 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201002031012.o13ACndR059983@svn.freebsd.org> From: Rui Paulo Date: Wed, 3 Feb 2010 10:12:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203423 - head/sys/net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 10:12:49 -0000 Author: rpaulo Date: Wed Feb 3 10:12:49 2010 New Revision: 203423 URL: http://svn.freebsd.org/changeset/base/203423 Log: Avoid a null pointer deref when parsing the meshid. Found with: clang static analyzer Modified: head/sys/net80211/ieee80211_mesh.c Modified: head/sys/net80211/ieee80211_mesh.c ============================================================================== --- head/sys/net80211/ieee80211_mesh.c Wed Feb 3 10:07:43 2010 (r203422) +++ head/sys/net80211/ieee80211_mesh.c Wed Feb 3 10:12:49 2010 (r203423) @@ -1468,11 +1468,12 @@ mesh_recv_mgmt(struct ieee80211_node *ni if (xrates != NULL) IEEE80211_VERIFY_ELEMENT(xrates, IEEE80211_RATE_MAXSIZE - rates[1], return); - if (meshid != NULL) + if (meshid != NULL) { IEEE80211_VERIFY_ELEMENT(meshid, IEEE80211_MESHID_LEN, return); - /* NB: meshid, not ssid */ - IEEE80211_VERIFY_SSID(vap->iv_bss, meshid, return); + /* NB: meshid, not ssid */ + IEEE80211_VERIFY_SSID(vap->iv_bss, meshid, return); + } /* XXX find a better class or define it's own */ IEEE80211_NOTE_MAC(vap, IEEE80211_MSG_INPUT, wh->i_addr2, From owner-svn-src-all@FreeBSD.ORG Wed Feb 3 12:00:57 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 95FBC1065672; Wed, 3 Feb 2010 12:00:57 +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 845D28FC13; Wed, 3 Feb 2010 12:00:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o13C0ve5087451; Wed, 3 Feb 2010 12:00:57 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o13C0vPG087449; Wed, 3 Feb 2010 12:00:57 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201002031200.o13C0vPG087449@svn.freebsd.org> From: Alexander Motin Date: Wed, 3 Feb 2010 12:00:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203426 - head/sys/dev/ahci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 12:00:57 -0000 Author: mav Date: Wed Feb 3 12:00:57 2010 New Revision: 203426 URL: http://svn.freebsd.org/changeset/base/203426 Log: Disable PHY of unconnected ports when interface power management enabled. It allows to save a bit more power (about 0.5W on 2 unused ports of ICH8M). Modified: head/sys/dev/ahci/ahci.c Modified: head/sys/dev/ahci/ahci.c ============================================================================== --- head/sys/dev/ahci/ahci.c Wed Feb 3 11:22:03 2010 (r203425) +++ head/sys/dev/ahci/ahci.c Wed Feb 3 12:00:57 2010 (r203426) @@ -2297,7 +2297,12 @@ ahci_sata_phy_reset(device_t dev) ATA_SC_DET_IDLE | val | ((ch->pm_level > 0) ? 0 : (ATA_SC_IPM_DIS_PARTIAL | ATA_SC_IPM_DIS_SLUMBER))); DELAY(5000); - return (ahci_sata_connect(ch)); + if (!ahci_sata_connect(ch)) { + if (ch->pm_level > 0) + ATA_OUTL(ch->r_mem, AHCI_P_SCTL, ATA_SC_DET_DISABLE); + return (0); + } + return (1); } static void From owner-svn-src-all@FreeBSD.ORG Wed Feb 3 12:35:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7814D106566B; Wed, 3 Feb 2010 12:35:43 +0000 (UTC) (envelope-from wilko@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6524A8FC14; Wed, 3 Feb 2010 12:35:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o13CZhCA095126; Wed, 3 Feb 2010 12:35:43 GMT (envelope-from wilko@svn.freebsd.org) Received: (from wilko@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o13CZh4d095124; Wed, 3 Feb 2010 12:35:43 GMT (envelope-from wilko@svn.freebsd.org) Message-Id: <201002031235.o13CZh4d095124@svn.freebsd.org> From: Wilko Bulte Date: Wed, 3 Feb 2010 12:35:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203427 - stable/6/release/doc/en_US.ISO8859-1/hardware/alpha X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 12:35:44 -0000 Author: wilko Date: Wed Feb 3 12:35:42 2010 New Revision: 203427 URL: http://svn.freebsd.org/changeset/base/203427 Log: Add some blurb on what Alpha systems are a safe bet for still working with RELENG_6. Triggered by: some emails sent to me. Modified: stable/6/release/doc/en_US.ISO8859-1/hardware/alpha/proc-alpha.sgml Modified: stable/6/release/doc/en_US.ISO8859-1/hardware/alpha/proc-alpha.sgml ============================================================================== --- stable/6/release/doc/en_US.ISO8859-1/hardware/alpha/proc-alpha.sgml Wed Feb 3 12:00:57 2010 (r203426) +++ stable/6/release/doc/en_US.ISO8859-1/hardware/alpha/proc-alpha.sgml Wed Feb 3 12:35:42 2010 (r203427) @@ -13,6 +13,20 @@ Supported processors and motherboards + NOTE NOTE NOTE + + &os; 6 is the last release of &os; to support the Alpha + platform. I have been asked which Alpha system models have the + best chance of working, given the more and more limited testing performed + on a more and more restricted set of different machine types. + + The binary distributions of &os; /alpha were built on a DS10 machine. + By coincidence I had a DS20L available for testing too. All in all this + makes DS10, DS10L or DS20L your best best bet. DS20 and DS20E are + also fairly safe. Loosely speaking these models are the last EV6 based systems + released. Systems to explicitely avoid are the old AS2100 and AS2100A. + This also applies to the neat DS15, it was never supported. + Additions, corrections and constructive criticism are invited. In particular, information on system quirks is more than welcome. From owner-svn-src-all@FreeBSD.ORG Wed Feb 3 12:59:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6A1021065670; Wed, 3 Feb 2010 12:59:44 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5859A8FC1A; Wed, 3 Feb 2010 12:59:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o13Cxidl000460; Wed, 3 Feb 2010 12:59:44 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o13CxiK0000458; Wed, 3 Feb 2010 12:59:44 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201002031259.o13CxiK0000458@svn.freebsd.org> From: Randall Stewart Date: Wed, 3 Feb 2010 12:59:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203428 - head/lib/libc/mips/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 12:59:44 -0000 Author: rrs Date: Wed Feb 3 12:59:44 2010 New Revision: 203428 URL: http://svn.freebsd.org/changeset/base/203428 Log: This fixes a bug found and fixed by JC. Basically no save was being done of the ra and gp pointers before we call the __error function. Obtained from: JC (c.jayachandran@gmail.com) Modified: head/lib/libc/mips/sys/ptrace.S Modified: head/lib/libc/mips/sys/ptrace.S ============================================================================== --- head/lib/libc/mips/sys/ptrace.S Wed Feb 3 12:35:42 2010 (r203427) +++ head/lib/libc/mips/sys/ptrace.S Wed Feb 3 12:59:44 2010 (r203428) @@ -42,14 +42,26 @@ __FBSDID("$FreeBSD$"); #endif /* LIBC_SCCS and not lint */ LEAF(ptrace) + .frame sp,40,ra + .mask 0x80000000, -8 #ifdef __ABICALLS__ .set noreorder .cpload t9 .set reorder #endif + subu sp, sp, 40 + sw ra, 32(sp) +#ifdef __ABICALLS__ + .cprestore 16 +#endif la t9, _C_LABEL(__error) # locate address of errno - jalr t9 + jalr t9 +#ifdef __ABICALLS__ + lw gp, 16(sp) +#endif sw zero, 0(v0) + lw ra, 32(sp) + addu sp, sp, 40 li v0, SYS_ptrace syscall bne a3, zero, 1f From owner-svn-src-all@FreeBSD.ORG Wed Feb 3 13:03:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D6D421065670; Wed, 3 Feb 2010 13:03:47 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C550F8FC1F; Wed, 3 Feb 2010 13:03:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o13D3lN8001433; Wed, 3 Feb 2010 13:03:47 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o13D3lkW001431; Wed, 3 Feb 2010 13:03:47 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201002031303.o13D3lkW001431@svn.freebsd.org> From: Randall Stewart Date: Wed, 3 Feb 2010 13:03:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203429 - head/usr.bin/truss X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 13:03:47 -0000 Author: rrs Date: Wed Feb 3 13:03:47 2010 New Revision: 203429 URL: http://svn.freebsd.org/changeset/base/203429 Log: This fix makes it so the args are malloc'd before we use them (always a good idea ;-0) This was found and fixed by JC Obtained from: JC (c.jayachandran@gmail.com) Modified: head/usr.bin/truss/mips-fbsd.c Modified: head/usr.bin/truss/mips-fbsd.c ============================================================================== --- head/usr.bin/truss/mips-fbsd.c Wed Feb 3 12:59:44 2010 (r203428) +++ head/usr.bin/truss/mips-fbsd.c Wed Feb 3 13:03:47 2010 (r203429) @@ -155,8 +155,8 @@ mips_syscall_entry(struct trussinfo *tru if (nargs == 0) return; -#if 0 // XXX fsc.args = malloc((1+nargs) * sizeof(unsigned long)); +#if 0 // XXX iorequest.piod_op = PIOD_READ_D; iorequest.piod_offs = (void *)parm_offset; iorequest.piod_addr = fsc.args; From owner-svn-src-all@FreeBSD.ORG Wed Feb 3 14:35:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B32D3106566B; Wed, 3 Feb 2010 14:35:33 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A260A8FC14; Wed, 3 Feb 2010 14:35:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o13EZXOF021571; Wed, 3 Feb 2010 14:35:33 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o13EZXmO021569; Wed, 3 Feb 2010 14:35:33 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201002031435.o13EZXmO021569@svn.freebsd.org> From: Andriy Gapon Date: Wed, 3 Feb 2010 14:35:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203430 - head/sys/dev/acpica X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 14:35:33 -0000 Author: avg Date: Wed Feb 3 14:35:33 2010 New Revision: 203430 URL: http://svn.freebsd.org/changeset/base/203430 Log: acpi_cpu: correct capabilities arguments for Processor _OSC evaluation Populate capabilities buffer according to Intel Processor Vendor-Specific ACPI Interface Specification. MFC after: 2 weeks Modified: head/sys/dev/acpica/acpi_cpu.c Modified: head/sys/dev/acpica/acpi_cpu.c ============================================================================== --- head/sys/dev/acpica/acpi_cpu.c Wed Feb 3 13:03:47 2010 (r203429) +++ head/sys/dev/acpica/acpi_cpu.c Wed Feb 3 14:35:33 2010 (r203430) @@ -378,7 +378,8 @@ acpi_cpu_attach(device_t dev) arg[3].Type = ACPI_TYPE_BUFFER; arg[3].Buffer.Length = sizeof(cap_set); /* Capabilities buffer */ arg[3].Buffer.Pointer = (uint8_t *)cap_set; - cap_set[0] = 0; + cap_set[0] = 0; /* status */ + cap_set[1] = sc->cpu_features; AcpiEvaluateObject(sc->cpu_handle, "_OSC", &arglist, NULL); } From owner-svn-src-all@FreeBSD.ORG Wed Feb 3 16:18:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9211610656CA; Wed, 3 Feb 2010 16:18:42 +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 697948FC22; Wed, 3 Feb 2010 16:18:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o13GIgJo044263; Wed, 3 Feb 2010 16:18:42 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o13GIgub044258; Wed, 3 Feb 2010 16:18:42 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <201002031618.o13GIgub044258@svn.freebsd.org> From: Hajimu UMEMOTO Date: Wed, 3 Feb 2010 16:18:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203433 - in head/etc: . defaults rc.d X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 16:18:42 -0000 Author: ume Date: Wed Feb 3 16:18:42 2010 New Revision: 203433 URL: http://svn.freebsd.org/changeset/base/203433 Log: Add rc.d script for the rtsold(8) daemon. The rtsol(8) handles just one RA then exit. So, the OtherConfig flag may not be handled well by rtsol(8) in the environment where there are multiple RA servers on the segment. In such case, rtsold(8) will be your friend. Reviewed by: hrs MFC after: 2 weeks Added: head/etc/rc.d/rtsold (contents, props changed) Modified: head/etc/defaults/rc.conf head/etc/network.subr head/etc/rc.d/Makefile Modified: head/etc/defaults/rc.conf ============================================================================== --- head/etc/defaults/rc.conf Wed Feb 3 16:04:20 2010 (r203432) +++ head/etc/defaults/rc.conf Wed Feb 3 16:18:42 2010 (r203433) @@ -460,6 +460,10 @@ ipv6_default_interface="NO" # Default ou # Now this works only for IPv6 link local # multicast addrs. rtsol_flags="" # Flags to IPv6 router solicitation. +rtsold_enable="NO" # Set to YES to enable an IPv6 router + # solicitation daemon. +rtsold_flags="-a" # Flags to an IPv6 router solicitation + # daemon. rtadvd_enable="NO" # Set to YES to enable an IPv6 router # advertisement daemon. If set to YES, # this router becomes a possible candidate Modified: head/etc/network.subr ============================================================================== --- head/etc/network.subr Wed Feb 3 16:04:20 2010 (r203432) +++ head/etc/network.subr Wed Feb 3 16:18:42 2010 (r203433) @@ -882,7 +882,9 @@ ipv6_accept_rtadv_up() { if ipv6_autoconfif $1; then ifconfig $1 inet6 accept_rtadv up - rtsol ${rtsol_flags} $1 + if ! checkyesno rtsold_enable; then + rtsol ${rtsol_flags} $1 + fi fi } Modified: head/etc/rc.d/Makefile ============================================================================== --- head/etc/rc.d/Makefile Wed Feb 3 16:04:20 2010 (r203432) +++ head/etc/rc.d/Makefile Wed Feb 3 16:18:42 2010 (r203433) @@ -30,7 +30,7 @@ FILES= DAEMON FILESYSTEMS LOGIN NETWORKI powerd power_profile ppp pppoed pwcheck \ quota \ random rarpd resolv rfcomm_pppd_server root \ - route6d routed routing rpcbind rtadvd rwho \ + route6d routed routing rpcbind rtadvd rtsold rwho \ savecore sdpd securelevel sendmail \ serial sppp statd static_arp stf swap1 \ syscons sysctl syslogd \ Added: head/etc/rc.d/rtsold ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/rc.d/rtsold Wed Feb 3 16:18:42 2010 (r203433) @@ -0,0 +1,26 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: rtsold +# REQUIRE: netif +# BEFORE: NETWORKING +# KEYWORD: nojail + +. /etc/rc.subr + +name="rtsold" +rcvar=`set_rcvar` +command="/usr/sbin/${name}" +pidfile="/var/run/${name}.pid" +start_postcmd="rtsold_poststart" + +rtsold_poststart() +{ + # wait for DAD + sleep $(($(${SYSCTL_N} net.inet6.ip6.dad_count) + 1)) +} + +load_rc_config $name +run_rc_command "$1" From owner-svn-src-all@FreeBSD.ORG Wed Feb 3 18:29:35 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B85D71065693; Wed, 3 Feb 2010 18:29:35 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A8FC28FC08; Wed, 3 Feb 2010 18:29:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o13ITZmA072968; Wed, 3 Feb 2010 18:29:35 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o13ITZTX072966; Wed, 3 Feb 2010 18:29:35 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201002031829.o13ITZTX072966@svn.freebsd.org> From: Warner Losh Date: Wed, 3 Feb 2010 18:29:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203434 - head/gnu/usr.bin/binutils/libbfd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 18:29:35 -0000 Author: imp Date: Wed Feb 3 18:29:35 2010 New Revision: 203434 URL: http://svn.freebsd.org/changeset/base/203434 Log: Remove more traces of the Alpha port. Modified: head/gnu/usr.bin/binutils/libbfd/Makefile Modified: head/gnu/usr.bin/binutils/libbfd/Makefile ============================================================================== --- head/gnu/usr.bin/binutils/libbfd/Makefile Wed Feb 3 16:18:42 2010 (r203433) +++ head/gnu/usr.bin/binutils/libbfd/Makefile Wed Feb 3 18:29:35 2010 (r203434) @@ -11,8 +11,7 @@ SRCS+= archive.c archive64.c archures.c section.c srec.c stab-syms.c stabs.c syms.c targets.c tekhex.c \ targmatch.h dwarf1.c dwarf2.c config.h bfdver.h bfdio.c simple.c WARNS?= 0 -.if (${TARGET_ARCH} == "alpha" || ${TARGET_ARCH} == "ia64" || \ - ${TARGET_ARCH} == "sparc64") +.if (${TARGET_ARCH} == "ia64" || ${TARGET_ARCH} == "sparc64") WARNS?= 2 .endif CFLAGS+= -D_GNU_SOURCE From owner-svn-src-all@FreeBSD.ORG Wed Feb 3 18:32:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D797106566C; Wed, 3 Feb 2010 18:32:30 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 247078FC15; Wed, 3 Feb 2010 18:32:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o13IWUON073658; Wed, 3 Feb 2010 18:32:30 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o13IWUpj073657; Wed, 3 Feb 2010 18:32:30 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201002031832.o13IWUpj073657@svn.freebsd.org> From: Warner Losh Date: Wed, 3 Feb 2010 18:32:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203435 - in head/gnu/usr.bin/binutils: gdb ld libbfd libopcodes X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 18:32:30 -0000 Author: imp Date: Wed Feb 3 18:32:29 2010 New Revision: 203435 URL: http://svn.freebsd.org/changeset/base/203435 Log: Remove alpha support from here too. FreeBSD 6 was the last branch to support it. Deleted: head/gnu/usr.bin/binutils/gdb/Makefile.alpha head/gnu/usr.bin/binutils/ld/Makefile.alpha head/gnu/usr.bin/binutils/libbfd/Makefile.alpha head/gnu/usr.bin/binutils/libopcodes/Makefile.alpha From owner-svn-src-all@FreeBSD.ORG Wed Feb 3 18:42:14 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9F8AE1065672; Wed, 3 Feb 2010 18:42:14 +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 8EF738FC15; Wed, 3 Feb 2010 18:42:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o13IgE6I075841; Wed, 3 Feb 2010 18:42:14 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o13IgEwV075838; Wed, 3 Feb 2010 18:42:14 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201002031842.o13IgEwV075838@svn.freebsd.org> From: Xin LI Date: Wed, 3 Feb 2010 18:42: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: r203436 - stable/8/usr.sbin/newsyslog X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 18:42:14 -0000 Author: delphij Date: Wed Feb 3 18:42:14 2010 New Revision: 203436 URL: http://svn.freebsd.org/changeset/base/203436 Log: MFC r202668+r200806: Don't consider non-existence of a PID file an error, we should be able to proceed anyway as this most likely mean that the process has been terminated. [1] Add a new option, -P, which reverts newsyslog(8) to the old behavior, which stops to proceed further, as it is possible that processes which fails to create PID file get screwed by rotation. [2] PR: bin/140397 Submitted by: Dan Lukes [1] Requested by: stas [2] Modified: stable/8/usr.sbin/newsyslog/newsyslog.8 stable/8/usr.sbin/newsyslog/newsyslog.c Directory Properties: stable/8/usr.sbin/newsyslog/ (props changed) Modified: stable/8/usr.sbin/newsyslog/newsyslog.8 ============================================================================== --- stable/8/usr.sbin/newsyslog/newsyslog.8 Wed Feb 3 18:32:29 2010 (r203435) +++ stable/8/usr.sbin/newsyslog/newsyslog.8 Wed Feb 3 18:42:14 2010 (r203436) @@ -17,7 +17,7 @@ .\" the suitability of this software for any purpose. It is .\" provided "as is" without express or implied warranty. .\" -.Dd February 24, 2005 +.Dd January 19, 2010 .Dt NEWSYSLOG 8 .Os .Sh NAME @@ -25,7 +25,7 @@ .Nd maintain system log files to manageable sizes .Sh SYNOPSIS .Nm -.Op Fl CFNnrsv +.Op Fl CFNPnrsv .Op Fl R Ar tagname .Op Fl a Ar directory .Op Fl d Ar directory @@ -169,6 +169,10 @@ This option is intended to be used with or .Fl CC options when creating log files is the only objective. +.It Fl P +Prevent further action if we should send signal but the +.Dq pidfile +is empty or does not exist. .It Fl R Ar tagname Specify that .Nm Modified: stable/8/usr.sbin/newsyslog/newsyslog.c ============================================================================== --- stable/8/usr.sbin/newsyslog/newsyslog.c Wed Feb 3 18:32:29 2010 (r203435) +++ stable/8/usr.sbin/newsyslog/newsyslog.c Wed Feb 3 18:42:14 2010 (r203436) @@ -167,6 +167,7 @@ int needroot = 1; /* Root privs are nec int noaction = 0; /* Don't do anything, just show it */ int norotate = 0; /* Don't rotate */ int nosignal; /* Do not send any signals */ +int enforcepid = 0; /* If PID file does not exist or empty, do nothing */ int force = 0; /* Force the trim no matter what */ int rotatereq = 0; /* -R = Always rotate the file(s) as given */ /* on the command (this also requires */ @@ -580,7 +581,7 @@ parse_args(int argc, char **argv) *p = '\0'; /* Parse command line options. */ - while ((ch = getopt(argc, argv, "a:d:f:nrsvCD:FNR:")) != -1) + while ((ch = getopt(argc, argv, "a:d:f:nrsvCD:FNPR:")) != -1) switch (ch) { case 'a': archtodir++; @@ -624,6 +625,9 @@ parse_args(int argc, char **argv) case 'N': norotate++; break; + case 'P': + enforcepid++; + break; case 'R': rotatereq++; requestor = strdup(optarg); @@ -1779,7 +1783,18 @@ set_swpid(struct sigwork_entry *swork, c f = fopen(ent->pid_file, "r"); if (f == NULL) { - warn("can't open pid file: %s", ent->pid_file); + if (errno == ENOENT && enforcepid == 0) { + /* + * Warn if the PID file doesn't exist, but do + * not consider it an error. Most likely it + * means the process has been terminated, + * so it should be safe to rotate any log + * files that the process would have been using. + */ + swork->sw_pidok = 1; + warnx("pid file doesn't exist: %s", ent->pid_file); + } else + warn("can't open pid file: %s", ent->pid_file); return; } @@ -1790,7 +1805,7 @@ set_swpid(struct sigwork_entry *swork, c * has terminated, so it should be safe to rotate any * log files that the process would have been using. */ - if (feof(f)) { + if (feof(f) && enforcepid == 0) { swork->sw_pidok = 1; warnx("pid file is empty: %s", ent->pid_file); } else From owner-svn-src-all@FreeBSD.ORG Wed Feb 3 19:12:28 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0C63D106566B; Wed, 3 Feb 2010 19:12:28 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F122C8FC16; Wed, 3 Feb 2010 19:12:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o13JCRsL082492; Wed, 3 Feb 2010 19:12:27 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o13JCRcc082489; Wed, 3 Feb 2010 19:12:27 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201002031912.o13JCRcc082489@svn.freebsd.org> From: Gabor Kovesdan Date: Wed, 3 Feb 2010 19:12:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203437 - in head/usr.bin: bc dc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 19:12:28 -0000 Author: gabor Date: Wed Feb 3 19:12:27 2010 New Revision: 203437 URL: http://svn.freebsd.org/changeset/base/203437 Log: - style.Makefile(5) Submitted by: uqs Approved by: delphij (mentor) Modified: head/usr.bin/bc/Makefile head/usr.bin/dc/Makefile Modified: head/usr.bin/bc/Makefile ============================================================================== --- head/usr.bin/bc/Makefile Wed Feb 3 18:42:14 2010 (r203436) +++ head/usr.bin/bc/Makefile Wed Feb 3 19:12:27 2010 (r203437) @@ -1,11 +1,11 @@ # $FreeBSD$ # $OpenBSD: Makefile,v 1.4 2006/06/30 19:02:28 otto Exp $ -PROG= bc -SRCS= bc.y scan.l -CFLAGS+= -I. -I${.CURDIR} +PROG= bc +SRCS= bc.y scan.l +CFLAGS+= -I. -I${.CURDIR} -FILES+= bc.library -FILESDIR= ${SHAREDIR}/misc +FILES+= bc.library +FILESDIR=${SHAREDIR}/misc .include Modified: head/usr.bin/dc/Makefile ============================================================================== --- head/usr.bin/dc/Makefile Wed Feb 3 18:42:14 2010 (r203436) +++ head/usr.bin/dc/Makefile Wed Feb 3 19:12:27 2010 (r203437) @@ -3,7 +3,8 @@ PROG= dc SRCS= dc.c bcode.c inout.c mem.c stack.c -LDADD= -lcrypto +CFLAGS+=--param max-inline-insns-single=64 DPADD= ${LIBCRYPTO} +LDADD= -lcrypto .include From owner-svn-src-all@FreeBSD.ORG Wed Feb 3 19:13:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4EC901065698; Wed, 3 Feb 2010 19:13:42 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2BA8E8FC19; Wed, 3 Feb 2010 19:13:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o13JDgwP082796; Wed, 3 Feb 2010 19:13:42 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o13JDgWh082793; Wed, 3 Feb 2010 19:13:42 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201002031913.o13JDgWh082793@svn.freebsd.org> From: Gabor Kovesdan Date: Wed, 3 Feb 2010 19:13:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203438 - head/usr.bin/dc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 19:13:42 -0000 Author: gabor Date: Wed Feb 3 19:13:41 2010 New Revision: 203438 URL: http://svn.freebsd.org/changeset/base/203438 Log: - Remove dead variable assignments - Fix -x Submitted by: uqs Approved by: delphij (mentor) Modified: head/usr.bin/dc/bcode.c head/usr.bin/dc/dc.c Modified: head/usr.bin/dc/bcode.c ============================================================================== --- head/usr.bin/dc/bcode.c Wed Feb 3 19:12:27 2010 (r203437) +++ head/usr.bin/dc/bcode.c Wed Feb 3 19:13:41 2010 (r203438) @@ -1620,11 +1620,9 @@ skipN(void) static void skip_until_mark(void) { - int ch; for (;;) { - ch = readch(); - switch (ch) { + switch (readch()) { case 'M': return; case EOF: @@ -1649,7 +1647,7 @@ skip_until_mark(void) free(read_string(&bmachine.readstack[bmachine.readsp])); break; case '!': - switch (ch = readch()) { + switch (readch()) { case '<': case '>': case '=': Modified: head/usr.bin/dc/dc.c ============================================================================== --- head/usr.bin/dc/dc.c Wed Feb 3 19:12:27 2010 (r203437) +++ head/usr.bin/dc/dc.c Wed Feb 3 19:13:41 2010 (r203438) @@ -82,16 +82,8 @@ main(int argc, char *argv[]) { int ch; bool extended_regs = false; - char *buf; bool preproc_done = false; - if ((buf = strdup("")) == NULL) - err(1, NULL); - - init_bmachine(extended_regs); - setlinebuf(stdout); - setlinebuf(stderr); - /* accept and ignore a single dash to be 4.4BSD dc(1) compatible */ while ((ch = getopt_long(argc, argv, "e:f:Vx", long_options, NULL)) != -1) { switch (ch) { @@ -123,6 +115,10 @@ main(int argc, char *argv[]) argc -= optind; argv += optind; + init_bmachine(extended_regs); + setlinebuf(stdout); + setlinebuf(stderr); + if (argc > 1) usage(); if (argc == 1) { From owner-svn-src-all@FreeBSD.ORG Wed Feb 3 19:31:03 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 44946106566C; Wed, 3 Feb 2010 19:31:03 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 358758FC1F; Wed, 3 Feb 2010 19:31:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o13JV3dD086665; Wed, 3 Feb 2010 19:31:03 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o13JV3wv086663; Wed, 3 Feb 2010 19:31:03 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201002031931.o13JV3wv086663@svn.freebsd.org> From: Ed Schouten Date: Wed, 3 Feb 2010 19:31:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203439 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 19:31:03 -0000 Author: ed Date: Wed Feb 3 19:31:02 2010 New Revision: 203439 URL: http://svn.freebsd.org/changeset/base/203439 Log: Also add a cross-reference to NetBSD updlastlogx(). Modified: head/lib/libc/gen/getutxent.3 Modified: head/lib/libc/gen/getutxent.3 ============================================================================== --- head/lib/libc/gen/getutxent.3 Wed Feb 3 19:13:41 2010 (r203438) +++ head/lib/libc/gen/getutxent.3 Wed Feb 3 19:31:02 2010 (r203439) @@ -426,8 +426,10 @@ database files, depending on its .Fa ut_type . This prevents the need for special utility functions to update the other databases, such as the +.Fn updlastlogx +and .Fn updwtmpx -function which is often available in other implementations. +functions which are available in other implementations. It also tries to replace .Dv DEAD_PROCESS entries in the active sessions database when storing From owner-svn-src-all@FreeBSD.ORG Wed Feb 3 20:00:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B7A071065692; Wed, 3 Feb 2010 20:00:56 +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 A87B98FC14; Wed, 3 Feb 2010 20:00:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o13K0u9O093212; Wed, 3 Feb 2010 20:00:56 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o13K0uvr093210; Wed, 3 Feb 2010 20:00:56 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201002032000.o13K0uvr093210@svn.freebsd.org> From: Alexander Motin Date: Wed, 3 Feb 2010 20:00:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203440 - head/sys/cam X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 20:00:56 -0000 Author: mav Date: Wed Feb 3 20:00:56 2010 New Revision: 203440 URL: http://svn.freebsd.org/changeset/base/203440 Log: Disable kern.cam.power_down ATM. It doesn't work fine on some controllers. Modified: head/sys/cam/cam_xpt.c Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Wed Feb 3 19:31:02 2010 (r203439) +++ head/sys/cam/cam_xpt.c Wed Feb 3 20:00:56 2010 (r203440) @@ -153,7 +153,7 @@ static struct xpt_softc xsoftc; TUNABLE_INT("kern.cam.boot_delay", &xsoftc.boot_delay); SYSCTL_INT(_kern_cam, OID_AUTO, boot_delay, CTLFLAG_RDTUN, &xsoftc.boot_delay, 0, "Bus registration wait time"); -static int xpt_power_down = 1; +static int xpt_power_down = 0; TUNABLE_INT("kern.cam.power_down", &xpt_power_down); SYSCTL_INT(_kern_cam, OID_AUTO, power_down, CTLFLAG_RW, &xpt_power_down, 0, "Power down devices on shutdown"); From owner-svn-src-all@FreeBSD.ORG Wed Feb 3 20:23:48 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 439B7106566B; Wed, 3 Feb 2010 20:23:48 +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 33E3F8FC16; Wed, 3 Feb 2010 20:23:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o13KNm9U098360; Wed, 3 Feb 2010 20:23:48 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o13KNmPG098355; Wed, 3 Feb 2010 20:23:48 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201002032023.o13KNmPG098355@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 3 Feb 2010 20:23:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203441 - in head/lib/msun: amd64 i387 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 20:23:48 -0000 Author: kib Date: Wed Feb 3 20:23:47 2010 New Revision: 203441 URL: http://svn.freebsd.org/changeset/base/203441 Log: Placate new binutils, by using 16-bit %ax instead of 32-bit %eax as an argument for fnstsw. Explicitely specify sizes for the XMM control and status word and X87 control and status words. Reviewed by: das Tested by: avg MFC after: 2 weeks Modified: head/lib/msun/amd64/fenv.c head/lib/msun/amd64/fenv.h head/lib/msun/i387/fenv.c head/lib/msun/i387/fenv.h Modified: head/lib/msun/amd64/fenv.c ============================================================================== --- head/lib/msun/amd64/fenv.c Wed Feb 3 20:00:56 2010 (r203440) +++ head/lib/msun/amd64/fenv.c Wed Feb 3 20:23:47 2010 (r203441) @@ -86,7 +86,7 @@ fegetenv(fenv_t *envp) int feholdexcept(fenv_t *envp) { - int mxcsr; + __uint32_t mxcsr; __stmxcsr(&mxcsr); __fnstenv(&envp->__x87); @@ -101,7 +101,8 @@ feholdexcept(fenv_t *envp) int feupdateenv(const fenv_t *envp) { - int mxcsr, status; + __uint32_t mxcsr; + __uint16_t status; __fnstsw(&status); __stmxcsr(&mxcsr); @@ -113,7 +114,8 @@ feupdateenv(const fenv_t *envp) int __feenableexcept(int mask) { - int mxcsr, control, omask; + __uint32_t mxcsr, omask; + __uint16_t control; mask &= FE_ALL_EXCEPT; __fnstcw(&control); @@ -129,7 +131,8 @@ __feenableexcept(int mask) int __fedisableexcept(int mask) { - int mxcsr, control, omask; + __uint32_t mxcsr, omask; + __uint16_t control; mask &= FE_ALL_EXCEPT; __fnstcw(&control); Modified: head/lib/msun/amd64/fenv.h ============================================================================== --- head/lib/msun/amd64/fenv.h Wed Feb 3 20:00:56 2010 (r203440) +++ head/lib/msun/amd64/fenv.h Wed Feb 3 20:23:47 2010 (r203441) @@ -110,7 +110,8 @@ feclearexcept(int __excepts) static __inline int fegetexceptflag(fexcept_t *__flagp, int __excepts) { - int __mxcsr, __status; + __uint32_t __mxcsr; + __uint16_t __status; __stmxcsr(&__mxcsr); __fnstsw(&__status); @@ -124,7 +125,8 @@ int feraiseexcept(int __excepts); static __inline int fetestexcept(int __excepts) { - int __mxcsr, __status; + __uint32_t __mxcsr; + __uint16_t __status; __stmxcsr(&__mxcsr); __fnstsw(&__status); @@ -134,7 +136,7 @@ fetestexcept(int __excepts) static __inline int fegetround(void) { - int __control; + __uint16_t __control; /* * We assume that the x87 and the SSE unit agree on the @@ -149,7 +151,8 @@ fegetround(void) static __inline int fesetround(int __round) { - int __mxcsr, __control; + __uint32_t __mxcsr; + __uint16_t __control; if (__round & ~_ROUND_MASK) return (-1); @@ -197,7 +200,7 @@ int fedisableexcept(int __mask); static __inline int fegetexcept(void) { - int __control; + __uint16_t __control; /* * We assume that the masks for the x87 and the SSE unit are Modified: head/lib/msun/i387/fenv.c ============================================================================== --- head/lib/msun/i387/fenv.c Wed Feb 3 20:00:56 2010 (r203440) +++ head/lib/msun/i387/fenv.c Wed Feb 3 20:23:47 2010 (r203441) @@ -87,7 +87,7 @@ int fesetexceptflag(const fexcept_t *flagp, int excepts) { fenv_t env; - int mxcsr; + __uint32_t mxcsr; __fnstenv(&env); env.__status &= ~excepts; @@ -117,7 +117,7 @@ feraiseexcept(int excepts) int fegetenv(fenv_t *envp) { - int mxcsr; + __uint32_t mxcsr; __fnstenv(envp); /* @@ -135,7 +135,7 @@ fegetenv(fenv_t *envp) int feholdexcept(fenv_t *envp) { - int mxcsr; + __uint32_t mxcsr; __fnstenv(envp); __fnclex(); @@ -152,7 +152,8 @@ feholdexcept(fenv_t *envp) int feupdateenv(const fenv_t *envp) { - int mxcsr, status; + __uint32_t mxcsr; + __uint16_t status; __fnstsw(&status); if (__HAS_SSE()) @@ -167,7 +168,8 @@ feupdateenv(const fenv_t *envp) int __feenableexcept(int mask) { - int mxcsr, control, omask; + __uint32_t mxcsr, omask; + __uint16_t control; mask &= FE_ALL_EXCEPT; __fnstcw(&control); @@ -188,7 +190,8 @@ __feenableexcept(int mask) int __fedisableexcept(int mask) { - int mxcsr, control, omask; + __uint32_t mxcsr, omask; + __uint16_t control; mask &= FE_ALL_EXCEPT; __fnstcw(&control); Modified: head/lib/msun/i387/fenv.h ============================================================================== --- head/lib/msun/i387/fenv.h Wed Feb 3 20:00:56 2010 (r203440) +++ head/lib/msun/i387/fenv.h Wed Feb 3 20:23:47 2010 (r203441) @@ -114,7 +114,7 @@ static __inline int feclearexcept(int __excepts) { fenv_t __env; - int __mxcsr; + __uint32_t __mxcsr; if (__excepts == FE_ALL_EXCEPT) { __fnclex(); @@ -134,7 +134,8 @@ feclearexcept(int __excepts) static __inline int fegetexceptflag(fexcept_t *__flagp, int __excepts) { - int __mxcsr, __status; + __uint32_t __mxcsr; + __uint16_t __status; __fnstsw(&__status); if (__HAS_SSE()) @@ -151,7 +152,8 @@ int feraiseexcept(int __excepts); static __inline int fetestexcept(int __excepts) { - int __mxcsr, __status; + __uint32_t __mxcsr; + __uint16_t __status; __fnstsw(&__status); if (__HAS_SSE()) @@ -164,7 +166,7 @@ fetestexcept(int __excepts) static __inline int fegetround(void) { - int __control; + __uint16_t __control; /* * We assume that the x87 and the SSE unit agree on the @@ -179,7 +181,8 @@ fegetround(void) static __inline int fesetround(int __round) { - int __mxcsr, __control; + __uint32_t __mxcsr; + __uint16_t __control; if (__round & ~_ROUND_MASK) return (-1); @@ -206,7 +209,7 @@ static __inline int fesetenv(const fenv_t *__envp) { fenv_t __env = *__envp; - int __mxcsr; + __uint32_t __mxcsr; __mxcsr = __get_mxcsr(__env); __set_mxcsr(__env, 0xffffffff); @@ -234,7 +237,7 @@ int fedisableexcept(int __mask); static __inline int fegetexcept(void) { - int __control; + __uint16_t __control; /* * We assume that the masks for the x87 and the SSE unit are From owner-svn-src-all@FreeBSD.ORG Wed Feb 3 20:54:05 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 36FD11065692; Wed, 3 Feb 2010 20:54:05 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 279EE8FC08; Wed, 3 Feb 2010 20:54:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o13Ks5qd005108; Wed, 3 Feb 2010 20:54:05 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o13Ks5vg005106; Wed, 3 Feb 2010 20:54:05 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201002032054.o13Ks5vg005106@svn.freebsd.org> From: Randall Stewart Date: Wed, 3 Feb 2010 20:54:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203442 - head/lib/libc/mips/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 20:54:05 -0000 Author: rrs Date: Wed Feb 3 20:54:04 2010 New Revision: 203442 URL: http://svn.freebsd.org/changeset/base/203442 Log: -White space cleanup (missing spaces in new line) -Remove extra tab. -Took out the duplicate code that cprestore does. All suggested by Neel. Modified: head/lib/libc/mips/sys/ptrace.S Modified: head/lib/libc/mips/sys/ptrace.S ============================================================================== --- head/lib/libc/mips/sys/ptrace.S Wed Feb 3 20:23:47 2010 (r203441) +++ head/lib/libc/mips/sys/ptrace.S Wed Feb 3 20:54:04 2010 (r203442) @@ -42,7 +42,7 @@ __FBSDID("$FreeBSD$"); #endif /* LIBC_SCCS and not lint */ LEAF(ptrace) - .frame sp,40,ra + .frame sp, 40, ra .mask 0x80000000, -8 #ifdef __ABICALLS__ .set noreorder @@ -55,10 +55,7 @@ LEAF(ptrace) .cprestore 16 #endif la t9, _C_LABEL(__error) # locate address of errno - jalr t9 -#ifdef __ABICALLS__ - lw gp, 16(sp) -#endif + jalr t9 sw zero, 0(v0) lw ra, 32(sp) addu sp, sp, 40 From owner-svn-src-all@FreeBSD.ORG Wed Feb 3 21:06:14 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 117B11065670; Wed, 3 Feb 2010 21:06:14 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0079C8FC0A; Wed, 3 Feb 2010 21:06:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o13L6ENc007913; Wed, 3 Feb 2010 21:06:14 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o13L6DZ8007906; Wed, 3 Feb 2010 21:06:13 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201002032106.o13L6DZ8007906@svn.freebsd.org> From: Gabor Kovesdan Date: Wed, 3 Feb 2010 21:06:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203443 - in head/usr.bin: bc dc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 21:06:14 -0000 Author: gabor Date: Wed Feb 3 21:06:13 2010 New Revision: 203443 URL: http://svn.freebsd.org/changeset/base/203443 Log: - style(9) Approved by: delphij (mentor) Modified: head/usr.bin/bc/bc.y head/usr.bin/bc/scan.l head/usr.bin/dc/bcode.c head/usr.bin/dc/bcode.h head/usr.bin/dc/dc.c head/usr.bin/dc/inout.c head/usr.bin/dc/mem.c head/usr.bin/dc/stack.c Modified: head/usr.bin/bc/bc.y ============================================================================== --- head/usr.bin/bc/bc.y Wed Feb 3 20:54:04 2010 (r203442) +++ head/usr.bin/bc/bc.y Wed Feb 3 21:06:13 2010 (r203443) @@ -60,11 +60,11 @@ extern char *yytext; extern FILE *yyin; struct tree { - ssize_t index; union { char *astr; const char *cstr; } u; + ssize_t index; }; int yyparse(void); @@ -143,10 +143,10 @@ const struct option long_options[] = %start program %union { - ssize_t node; struct lvalue lvalue; const char *str; char *astr; + ssize_t node; } %token COMMA SEMICOLON LPAR RPAR LBRACE RBRACE LBRACKET RBRACKET DOT @@ -299,7 +299,7 @@ statement : expression } | QUIT { - sigset_t mask; + sigset_t mask; putchar('q'); fflush(stdout); @@ -321,7 +321,7 @@ statement : expression opt_relational_expression SEMICOLON opt_expression RPAR opt_statement pop_nesting { - ssize_t n; + ssize_t n; if (st_has_continue) n = node($10, cs("M"), $8, cs("s."), @@ -351,7 +351,7 @@ statement : expression | WHILE LPAR alloc_macro relational_expression RPAR opt_statement pop_nesting { - ssize_t n; + ssize_t n; if (st_has_continue) n = node($6, cs("M"), $4, $3, END_NODE); @@ -766,8 +766,8 @@ print_expression static void grow(void) { - struct tree *p; - size_t newsize; + struct tree *p; + size_t newsize; if (current == instr_sz) { newsize = instr_sz * 2 + 1; @@ -784,6 +784,7 @@ grow(void) static ssize_t cs(const char *str) { + grow(); instructions[current].index = CONST_STRING; instructions[current].u.cstr = str; @@ -793,6 +794,7 @@ cs(const char *str) static ssize_t as(const char *str) { + grow(); instructions[current].index = ALLOC_STRING; instructions[current].u.astr = strdup(str); @@ -804,8 +806,8 @@ as(const char *str) static ssize_t node(ssize_t arg, ...) { - va_list ap; - ssize_t ret; + va_list ap; + ssize_t ret; va_start(ap, arg); @@ -826,6 +828,7 @@ node(ssize_t arg, ...) static void emit(ssize_t i) { + if (instructions[i].index >= 0) while (instructions[i].index != END_NODE) emit(instructions[i++].index); @@ -836,6 +839,7 @@ emit(ssize_t i) static void emit_macro(int nodeidx, ssize_t code) { + putchar('['); emit(code); printf("]s%s\n", instructions[nodeidx].u.cstr); @@ -845,7 +849,7 @@ emit_macro(int nodeidx, ssize_t code) static void free_tree(void) { - ssize_t i; + ssize_t i; for (i = 0; i < current; i++) if (instructions[i].index == ALLOC_STRING) @@ -856,7 +860,7 @@ free_tree(void) static ssize_t numnode(int num) { - const char *p; + const char *p; if (num < 10) p = str_table['0' + num]; @@ -871,9 +875,9 @@ numnode(int num) static ssize_t lookup(char * str, size_t len, char type) { - ENTRY entry, *found; - u_short num; - u_char *p; + ENTRY entry, *found; + u_char *p; + u_short num; /* The scanner allocated an extra byte already */ if (str[len-1] != type) { @@ -908,7 +912,7 @@ lookup(char * str, size_t len, char type static ssize_t letter_node(char *str) { - size_t len; + size_t len; len = strlen(str); if (len == 1 && str[0] != '_') @@ -920,7 +924,7 @@ letter_node(char *str) static ssize_t array_node(char *str) { - size_t len; + size_t len; len = strlen(str); if (len == 1 && str[0] != '_') @@ -932,7 +936,7 @@ array_node(char *str) static ssize_t function_node(char *str) { - size_t len; + size_t len; len = strlen(str); if (len == 1 && str[0] != '_') @@ -944,6 +948,7 @@ function_node(char *str) static void add_par(ssize_t n) { + prologue = node(cs("S"), n, prologue, END_NODE); epilogue = node(epilogue, cs("L"), n, cs("s."), END_NODE); } @@ -951,6 +956,7 @@ add_par(ssize_t n) static void add_local(ssize_t n) { + prologue = node(cs("0S"), n, prologue, END_NODE); epilogue = node(epilogue, cs("L"), n, cs("s."), END_NODE); } @@ -958,8 +964,8 @@ add_local(ssize_t n) void yyerror(const char *s) { - char *str, *p; - int n; + char *p, *str; + int n; if (yyin != NULL && feof(yyin)) n = asprintf(&str, "%s: %s:%d: %s: unexpected EOF", @@ -987,19 +993,21 @@ yyerror(const char *s) void fatal(const char *s) { + errx(1, "%s:%d: %s", filename, lineno, s); } static void warning(const char *s) { + warnx("%s:%d: %s", filename, lineno, s); } static void init(void) { - unsigned int i; + unsigned int i; for (i = 0; i < UCHAR_MAX; i++) { str_table[i][0] = i; @@ -1013,6 +1021,7 @@ init(void) static void usage(void) { + fprintf(stderr, "usage: %s [-chlqv] [-e expression] [file ...]\n", __progname); exit(1); @@ -1021,7 +1030,7 @@ usage(void) static char * escape(const char *str) { - char *ret, *p; + char *p, *ret; ret = malloc(strlen(str) + 1); if (ret == NULL) @@ -1077,8 +1086,8 @@ escape(const char *str) void sigchld(int signo) { - pid_t pid; - int status; + pid_t pid; + int status; switch (signo) { default: @@ -1100,9 +1109,9 @@ sigchld(int signo) int main(int argc, char *argv[]) { - int i, ch; - int p[2]; - char *q; + char *q; + int p[2]; + int ch, i; init(); setlinebuf(stdout); Modified: head/usr.bin/bc/scan.l ============================================================================== --- head/usr.bin/bc/scan.l Wed Feb 3 20:54:04 2010 (r203442) +++ head/usr.bin/bc/scan.l Wed Feb 3 21:06:13 2010 (r203443) @@ -193,6 +193,7 @@ ALPHANUM [a-z_0-9] static void init_strbuf(void) { + if (strbuf == NULL) { strbuf = malloc(strbuf_sz); if (strbuf == NULL) @@ -204,7 +205,7 @@ init_strbuf(void) static void add_str(const char *str) { - size_t arglen; + size_t arglen; arglen = strlen(str); @@ -228,8 +229,8 @@ add_str(const char *str) void abort_line(int sig) { - static const char str[] = "[\n]P\n"; - int save_errno; + static const char str[] = "[\n]P\n"; + int save_errno; switch (sig) { default: @@ -243,8 +244,8 @@ abort_line(int sig) int yywrap(void) { - static int state; - static YY_BUFFER_STATE buf; + static YY_BUFFER_STATE buf; + static int state; if (fileindex == 0 && sargc > 0 && strcmp(sargv[0], _PATH_LIBB) == 0) { filename = sargv[fileindex++]; @@ -285,4 +286,3 @@ yywrap(void) } return (1); } - Modified: head/usr.bin/dc/bcode.c ============================================================================== --- head/usr.bin/dc/bcode.c Wed Feb 3 20:54:04 2010 (r203442) +++ head/usr.bin/dc/bcode.c Wed Feb 3 21:06:13 2010 (r203443) @@ -41,17 +41,17 @@ BIGNUM zero; #define REG_ARRAY_SIZE_BIG (UCHAR_MAX + 1 + USHRT_MAX + 1) struct bmachine { + struct source *readstack; + struct stack *reg; struct stack stack; + volatile sig_atomic_t interrupted; u_int scale; u_int obase; u_int ibase; size_t readsp; - bool extended_regs; size_t reg_array_size; - struct stack *reg; - volatile sig_atomic_t interrupted; - struct source *readstack; size_t readstack_sz; + bool extended_regs; }; static struct bmachine bmachine; @@ -236,7 +236,7 @@ sighandler(int ignored) void init_bmachine(bool extended_registers) { - unsigned int i; + unsigned int i; bmachine.extended_regs = extended_registers; bmachine.reg_array_size = bmachine.extended_regs ? @@ -280,7 +280,7 @@ reset_bmachine(struct source *src) static __inline int readch(void) { - struct source *src = &bmachine.readstack[bmachine.readsp]; + struct source *src = &bmachine.readstack[bmachine.readsp]; return (src->vtable->readchar(src)); } @@ -288,7 +288,7 @@ readch(void) static __inline void unreadch(void) { - struct source *src = &bmachine.readstack[bmachine.readsp]; + struct source *src = &bmachine.readstack[bmachine.readsp]; src->vtable->unreadchar(src); } @@ -296,7 +296,7 @@ unreadch(void) static __inline char * readline(void) { - struct source *src = &bmachine.readstack[bmachine.readsp]; + struct source *src = &bmachine.readstack[bmachine.readsp]; return (src->vtable->readline(src)); } @@ -304,7 +304,7 @@ readline(void) static __inline void src_free(void) { - struct source *src = &bmachine.readstack[bmachine.readsp]; + struct source *src = &bmachine.readstack[bmachine.readsp]; src->vtable->free(src); } @@ -313,7 +313,7 @@ src_free(void) void pn(const char *str, const struct number *n) { - char *p = BN_bn2dec(n->number); + char *p = BN_bn2dec(n->number); if (p == NULL) err(1, "BN_bn2dec failed"); @@ -325,7 +325,7 @@ pn(const char *str, const struct number void pbn(const char *str, const BIGNUM *n) { - char *p = BN_bn2dec(n); + char *p = BN_bn2dec(n); if (p == NULL) err(1, "BN_bn2dec failed"); @@ -351,7 +351,7 @@ static unsigned long factors[] = { void scale_number(BIGNUM *n, int s) { - unsigned int abs_scale; + unsigned int abs_scale; if (s == 0) return; @@ -364,8 +364,8 @@ scale_number(BIGNUM *n, int s) else BN_div_word(n, factors[abs_scale]); } else { - BIGNUM *a, *p; - BN_CTX *ctx; + BIGNUM *a, *p; + BN_CTX *ctx; a = BN_new(); bn_checkp(a); @@ -390,7 +390,7 @@ scale_number(BIGNUM *n, int s) void split_number(const struct number *n, BIGNUM *i, BIGNUM *f) { - u_long rem; + u_long rem; bn_checkp(BN_copy(i, n->number)); @@ -510,7 +510,7 @@ print_stack(void) static __inline void print_tos(void) { - struct value *value = tos(); + struct value *value = tos(); if (value != NULL) { print_value(stdout, value, "", bmachine.obase); @@ -523,7 +523,7 @@ print_tos(void) static void pop_print(void) { - struct value *value = pop(); + struct value *value = pop(); if (value != NULL) { switch (value->type) { @@ -546,7 +546,7 @@ pop_print(void) static void pop_printn(void) { - struct value *value = pop(); + struct value *value = pop(); if (value != NULL) { print_value(stdout, value, "", bmachine.obase); @@ -572,7 +572,7 @@ swap(void) static void drop(void) { - struct value *v = pop(); + struct value *v = pop(); if (v != NULL) stack_free_value(v); } @@ -580,7 +580,7 @@ drop(void) static void get_scale(void) { - struct number *n; + struct number *n; n = new_number(); bn_check(BN_set_word(n->number, bmachine.scale)); @@ -590,8 +590,8 @@ get_scale(void) static void set_scale(void) { - struct number *n; - u_long scale; + struct number *n; + u_long scale; n = pop_number(); if (n != NULL) { @@ -611,7 +611,7 @@ set_scale(void) static void get_obase(void) { - struct number *n; + struct number *n; n = new_number(); bn_check(BN_set_word(n->number, bmachine.obase)); @@ -621,8 +621,8 @@ get_obase(void) static void set_obase(void) { - struct number *n; - u_long base; + struct number *n; + u_long base; n = pop_number(); if (n != NULL) { @@ -638,7 +638,7 @@ set_obase(void) static void get_ibase(void) { - struct number *n; + struct number *n; n = new_number(); bn_check(BN_set_word(n->number, bmachine.ibase)); @@ -648,8 +648,8 @@ get_ibase(void) static void set_ibase(void) { - struct number *n; - u_long base; + struct number *n; + u_long base; n = pop_number(); if (n != NULL) { @@ -666,8 +666,8 @@ set_ibase(void) static void stackdepth(void) { - size_t i; - struct number *n; + struct number *n; + size_t i; i = stack_size(&bmachine.stack); n = new_number(); @@ -678,10 +678,9 @@ stackdepth(void) static void push_scale(void) { - struct value *value; - u_int scale = 0; - struct number *n; - + struct number *n; + struct value *value; + u_int scale = 0; value = pop(); if (value != NULL) { @@ -704,8 +703,8 @@ push_scale(void) static u_int count_digits(const struct number *n) { - struct number *int_part, *fract_part; - u_int i; + struct number *int_part, *fract_part; + u_int i; if (BN_is_zero(n->number)) return (1); @@ -728,9 +727,9 @@ count_digits(const struct number *n) static void num_digits(void) { - struct value *value; - size_t digits; - struct number *n = NULL; + struct number *n = NULL; + struct value *value; + size_t digits; value = pop(); if (value != NULL) { @@ -756,9 +755,9 @@ num_digits(void) static void to_ascii(void) { - char str[2]; - struct value *value; - struct number *n; + struct number *n; + struct value *value; + char str[2]; value = pop(); if (value != NULL) { @@ -785,7 +784,7 @@ to_ascii(void) static int readreg(void) { - int idx, ch1, ch2; + int ch1, ch2, idx; idx = readch(); if (idx == 0xff && bmachine.extended_regs) { @@ -807,9 +806,10 @@ readreg(void) static void load(void) { - int idx; - struct value *v, copy; - struct number *n; + struct number *n; + struct value *v; + struct value copy; + int idx; idx = readreg(); if (idx >= 0) { @@ -826,8 +826,8 @@ load(void) static void store(void) { - int idx; - struct value *val; + struct value *val; + int idx; idx = readreg(); if (idx >= 0) { @@ -842,9 +842,9 @@ store(void) static void load_stack(void) { - int idx; - struct stack *stack; - struct value *value; + struct stack *stack; + struct value *value; + int idx; idx = readreg(); if (idx >= 0) { @@ -864,8 +864,8 @@ load_stack(void) static void store_stack(void) { - int idx; - struct value *value; + struct value *value; + int idx; idx = readreg(); if (idx >= 0) { @@ -879,11 +879,12 @@ store_stack(void) static void load_array(void) { - int reg; - struct number *inumber, *n; - u_long idx; - struct stack *stack; - struct value *v, copy; + struct number *inumber, *n; + struct stack *stack; + struct value *v; + struct value copy; + u_long idx; + int reg; reg = readreg(); if (reg >= 0) { @@ -913,11 +914,11 @@ load_array(void) static void store_array(void) { - int reg; - struct number *inumber; - u_long idx; - struct value *value; - struct stack *stack; + struct number *inumber; + struct value *value; + struct stack *stack; + u_long idx; + int reg; reg = readreg(); if (reg >= 0) { @@ -969,8 +970,7 @@ bexec(char *line) static void badd(void) { - struct number *a, *b; - struct number *r; + struct number *a, *b, *r; a = pop_number(); if (a == NULL) { @@ -997,8 +997,7 @@ badd(void) static void bsub(void) { - struct number *a, *b; - struct number *r; + struct number *a, *b, *r; a = pop_number(); if (a == NULL) { @@ -1026,7 +1025,7 @@ bsub(void) void bmul_number(struct number *r, struct number *a, struct number *b) { - BN_CTX *ctx; + BN_CTX *ctx; /* Create copies of the scales, since r might be equal to a or b */ u_int ascale = a->scale; @@ -1048,8 +1047,7 @@ bmul_number(struct number *r, struct num static void bmul(void) { - struct number *a, *b; - struct number *r; + struct number *a, *b, *r; a = pop_number(); if (a == NULL) { @@ -1072,10 +1070,9 @@ bmul(void) static void bdiv(void) { - struct number *a, *b; - struct number *r; - u_int scale; - BN_CTX *ctx; + struct number *a, *b, *r; + BN_CTX *ctx; + u_int scale; a = pop_number(); if (a == NULL) { @@ -1110,10 +1107,9 @@ bdiv(void) static void bmod(void) { - struct number *a, *b; - struct number *r; - u_int scale; - BN_CTX *ctx; + struct number *a, *b, *r; + BN_CTX *ctx; + u_int scale; a = pop_number(); if (a == NULL) { @@ -1148,10 +1144,9 @@ bmod(void) static void bdivmod(void) { - struct number *a, *b; - struct number *rdiv, *rmod; - u_int scale; - BN_CTX *ctx; + struct number *a, *b, *rdiv, *rmod; + BN_CTX *ctx; + u_int scale; a = pop_number(); if (a == NULL) { @@ -1190,10 +1185,9 @@ bdivmod(void) static void bexp(void) { - struct number *a, *p; - struct number *r; - bool neg; - u_int scale; + struct number *a, *p, *r; + u_int scale; + bool neg; p = pop_number(); if (p == NULL) { @@ -1216,8 +1210,8 @@ bexp(void) scale = bmachine.scale; } else { /* Posix bc says min(a.scale * b, max(a.scale, scale) */ - u_long b; - u_int m; + u_long b; + u_int m; b = BN_get_word(p->number); m = max(a->scale, bmachine.scale); @@ -1249,8 +1243,8 @@ bexp(void) } if (neg) { - BN_CTX *ctx; - BIGNUM *one; + BN_CTX *ctx; + BIGNUM *one; one = BN_new(); bn_checkp(one); @@ -1273,8 +1267,8 @@ bexp(void) static bool bsqrt_stop(const BIGNUM *x, const BIGNUM *y, u_int *onecount) { - BIGNUM *r; - bool ret; + BIGNUM *r; + bool ret; r = BN_new(); bn_checkp(r); @@ -1289,11 +1283,10 @@ bsqrt_stop(const BIGNUM *x, const BIGNUM static void bsqrt(void) { - struct number *n; - struct number *r; - BIGNUM *x, *y; - u_int scale, onecount; - BN_CTX *ctx; + struct number *n, *r; + BIGNUM *x, *y; + BN_CTX *ctx; + u_int onecount, scale; onecount = 0; n = pop_number(); @@ -1337,7 +1330,7 @@ bsqrt(void) static void not(void) { - struct number *a; + struct number *a; a = pop_number(); if (a == NULL) { @@ -1358,7 +1351,7 @@ equal(void) static void equal_numbers(void) { - struct number *a, *b, *r; + struct number *a, *b, *r; a = pop_number(); if (a == NULL) { @@ -1378,7 +1371,7 @@ equal_numbers(void) static void less_numbers(void) { - struct number *a, *b, *r; + struct number *a, *b, *r; a = pop_number(); if (a == NULL) { @@ -1398,7 +1391,7 @@ less_numbers(void) static void lesseq_numbers(void) { - struct number *a, *b, *r; + struct number *a, *b, *r; a = pop_number(); if (a == NULL) { @@ -1432,6 +1425,7 @@ less(void) static void not_compare(void) { + switch (readch()) { case '<': not_less(); @@ -1473,8 +1467,8 @@ not_greater(void) static bool compare_numbers(enum bcode_compare type, struct number *a, struct number *b) { - u_int scale; - int cmp; + u_int scale; + int cmp; scale = max(a->scale, b->scale); @@ -1508,10 +1502,10 @@ compare_numbers(enum bcode_compare type, static void compare(enum bcode_compare type) { - int idx, elseidx; - struct number *a, *b; - bool ok; - struct value *v; + struct number *a, *b; + struct value *v; + int idx, elseidx; + bool ok; elseidx = NO_ELSE; idx = readreg(); @@ -1558,11 +1552,13 @@ compare(enum bcode_compare type) static void nop(void) { + } static void quit(void) { + if (bmachine.readsp < 2) exit(0); src_free(); @@ -1574,8 +1570,8 @@ quit(void) static void quitN(void) { - struct number *n; - u_long i; + struct number *n; + u_long i; n = pop_number(); if (n == NULL) @@ -1597,8 +1593,8 @@ quitN(void) static void skipN(void) { - struct number *n; - u_long i; + struct number *n; + u_long i; n = pop_number(); if (n == NULL) @@ -1687,7 +1683,7 @@ unknown(void) static void eval_string(char *p) { - int ch; + int ch; if (bmachine.readsp > 0) { /* Check for tail call. Do not recurse in that case. */ @@ -1716,8 +1712,8 @@ static void eval_line(void) { /* Always read from stdin */ - struct source in; - char *p; + struct source in; + char *p; clearerr(stdin); src_setstream(&in, stdin); @@ -1728,7 +1724,7 @@ eval_line(void) static void eval_tos(void) { - char *p; + char *p; p = pop_string(); if (p == NULL) @@ -1739,7 +1735,7 @@ eval_tos(void) void eval(void) { - int ch; + int ch; for (;;) { ch = readch(); Modified: head/usr.bin/dc/bcode.h ============================================================================== --- head/usr.bin/dc/bcode.h Wed Feb 3 20:54:04 2010 (r203442) +++ head/usr.bin/dc/bcode.h Wed Feb 3 21:06:13 2010 (r203443) @@ -58,8 +58,8 @@ struct array { struct stack { struct value *stack; - ssize_t sp; ssize_t size; + ssize_t sp; }; struct source; @@ -72,14 +72,14 @@ struct vtable { }; struct source { - struct vtable *vtable; union { - FILE *stream; struct { u_char *buf; size_t pos; } string; + FILE *stream; } u; + struct vtable *vtable; int lastchar; }; Modified: head/usr.bin/dc/dc.c ============================================================================== --- head/usr.bin/dc/dc.c Wed Feb 3 20:54:04 2010 (r203442) +++ head/usr.bin/dc/dc.c Wed Feb 3 21:06:13 2010 (r203443) @@ -59,8 +59,8 @@ usage(void) static void procfile(char *fname) { - FILE *file; - struct stat st; + struct stat st; + FILE *file; file = fopen(fname, "r"); if (file == NULL) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Feb 3 21:09:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 08709106568B; Wed, 3 Feb 2010 21:09:33 +0000 (UTC) (envelope-from mjacob@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EBCBA8FC18; Wed, 3 Feb 2010 21:09:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o13L9Wbe008675; Wed, 3 Feb 2010 21:09:32 GMT (envelope-from mjacob@svn.freebsd.org) Received: (from mjacob@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o13L9Wfw008666; Wed, 3 Feb 2010 21:09:32 GMT (envelope-from mjacob@svn.freebsd.org) Message-Id: <201002032109.o13L9Wfw008666@svn.freebsd.org> From: Matt Jacob Date: Wed, 3 Feb 2010 21:09:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203444 - head/sys/dev/isp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 21:09:33 -0000 Author: mjacob Date: Wed Feb 3 21:09:32 2010 New Revision: 203444 URL: http://svn.freebsd.org/changeset/base/203444 Log: Redo how commands handles are created and managed and implement sequence numbers and handle types in rational way. This will better protect from (unwittingly) dealing with stale handles/commands. Fix the watchdog timeout code to better protect itself from mistakes. If we run an abort on a putatively timed out command, the command may in fact get completed, so check to make sure the command we're timing it out is still around. If the abort succeeds, btw, the command should get returned via a different path. Modified: head/sys/dev/isp/isp.c head/sys/dev/isp/isp_freebsd.c head/sys/dev/isp/isp_library.c head/sys/dev/isp/isp_library.h head/sys/dev/isp/isp_pci.c head/sys/dev/isp/isp_sbus.c head/sys/dev/isp/ispmbox.h head/sys/dev/isp/ispvar.h Modified: head/sys/dev/isp/isp.c ============================================================================== --- head/sys/dev/isp/isp.c Wed Feb 3 21:06:13 2010 (r203443) +++ head/sys/dev/isp/isp.c Wed Feb 3 21:09:32 2010 (r203444) @@ -694,7 +694,7 @@ isp_reset(ispsoftc_t *isp, int do_load_d mbs.logval = MBLOGALL; isp_mboxcmd(isp, &mbs); if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { - isp_prt(isp, ISP_LOGERR, "NOP ommand failed (%x)", mbs.param[0]); + isp_prt(isp, ISP_LOGERR, "NOP command failed (%x)", mbs.param[0]); ISP_RESET0(isp); return; } @@ -4417,7 +4417,7 @@ isp_start(XS_T *xs) *tptr = 0x1999; } - if (isp_save_xs(isp, xs, &handle)) { + if (isp_allocate_xs(isp, xs, &handle)) { isp_prt(isp, ISP_LOGDEBUG0, "out of xflist pointers"); XS_SETERR(xs, HBA_BOTCH); return (CMD_EAGAIN); @@ -5163,8 +5163,8 @@ again: } } - if ((sp->req_handle != ISP_SPCL_HANDLE) && (sp->req_handle > isp->isp_maxcmds || sp->req_handle < 1)) { - isp_prt(isp, ISP_LOGERR, "bad request handle %d (type 0x%x)", sp->req_handle, etype); + if (!ISP_VALID_HANDLE(isp, sp->req_handle)) { + isp_prt(isp, ISP_LOGERR, "bad request handle 0x%x (iocb type 0x%x)", sp->req_handle, etype); ISP_MEMZERO(hp, QENTRY_LEN); /* PERF */ ISP_WRITE(isp, isp->isp_respoutrp, optr); continue; @@ -5178,7 +5178,7 @@ again: */ if (etype != RQSTYPE_RESPONSE) { isp_prt(isp, ISP_LOGERR, "cannot find handle 0x%x (type 0x%x)", sp->req_handle, etype); - } else if (ts != RQCS_ABORTED && ts != RQCS_RESET_OCCURRED && sp->req_handle != ISP_SPCL_HANDLE) { + } else if (ts != RQCS_ABORTED && ts != RQCS_RESET_OCCURRED) { isp_prt(isp, ISP_LOGERR, "cannot find handle 0x%x (status 0x%x)", sp->req_handle, ts); } ISP_MEMZERO(hp, QENTRY_LEN); /* PERF */ @@ -5681,16 +5681,19 @@ isp_parse_async(ispsoftc_t *isp, uint16_ * commands that complete (with no apparent error) after * we receive a LIP. This has been observed mostly on * Local Loop topologies. To be safe, let's just mark - * all active commands as dead. + * all active initiator commands as dead. */ if (topo == TOPO_NL_PORT || topo == TOPO_FL_PORT) { int i, j; for (i = j = 0; i < isp->isp_maxcmds; i++) { XS_T *xs; - xs = isp->isp_xflist[i]; - if (xs == NULL) { + isp_hdl_t *hdp; + + hdp = &isp->isp_xflist[i]; + if (ISP_H2HT(hdp->handle) != ISP_HANDLE_INITIATOR) { continue; } + xs = hdp->cmd; if (XS_CHANNEL(xs) != chan) { continue; } Modified: head/sys/dev/isp/isp_freebsd.c ============================================================================== --- head/sys/dev/isp/isp_freebsd.c Wed Feb 3 21:06:13 2010 (r203443) +++ head/sys/dev/isp/isp_freebsd.c Wed Feb 3 21:09:32 2010 (r203444) @@ -1653,7 +1653,7 @@ isp_target_start_ctio(ispsoftc_t *isp, u cto->ct_timeout = 10; } - if (isp_save_xs_tgt(isp, ccb, &handle)) { + if (isp_allocate_xs_tgt(isp, ccb, &handle)) { xpt_print(ccb->ccb_h.path, "No XFLIST pointers for %s\n", __func__); ccb->ccb_h.status = CAM_REQUEUE_REQ; goto out; @@ -3834,21 +3834,41 @@ isp_watchdog(void *arg) isp = XS_ISP(xs); handle = isp_find_handle(isp, xs); - if (handle) { + if (handle != ISP_HANDLE_FREE) { /* - * Make sure the command is *really* dead before we - * release the handle (and DMA resources) for reuse. + * Try and make sure the command is really dead before + * we release the handle (and DMA resources) for reuse. + * + * If we are successful in aborting the command then + * we're done here because we'll get the command returned + * back separately. + */ + if (isp_control(isp, ISPCTL_ABORT_CMD, xs) == 0) { + return; + } + + /* + * Note that after calling the above, the command may in + * fact have been completed. */ - (void) isp_control(isp, ISPCTL_ABORT_CMD, xs); + xs = isp_find_xs(isp, handle); + + /* + * If the command no longer exists, then we won't + * be able to find the xs again with this handle. + */ + if (xs == NULL) { + return; + } /* - * After this point, the comamnd is really dead. + * After this point, the command is really dead. */ if (XS_XFRLEN(xs)) { ISP_DMAFREE(isp, xs, handle); } isp_destroy_handle(isp, handle); - xpt_print(xs->ccb_h.path, "watchdog timeout for handle 0x%x\n", handle); + isp_prt(isp, ISP_LOGERR, "%s: timeout for handle 0x%x", __func__, handle); XS_SETERR(xs, CAM_CMD_TIMEOUT); isp_done(xs); } Modified: head/sys/dev/isp/isp_library.c ============================================================================== --- head/sys/dev/isp/isp_library.c Wed Feb 3 21:06:13 2010 (r203443) +++ head/sys/dev/isp/isp_library.c Wed Feb 3 21:09:32 2010 (r203444) @@ -246,65 +246,70 @@ copy_and_sync: } int -isp_save_xs(ispsoftc_t *isp, XS_T *xs, uint32_t *handlep) +isp_allocate_xs(ispsoftc_t *isp, XS_T *xs, uint32_t *handlep) { - uint16_t i, j; + isp_hdl_t *hdp; - for (j = isp->isp_lasthdls, i = 0; i < isp->isp_maxcmds; i++) { - if (isp->isp_xflist[j] == NULL) { - break; - } - if (++j == isp->isp_maxcmds) { - j = 0; - } - } - if (i == isp->isp_maxcmds) { + hdp = isp->isp_xffree; + if (hdp == NULL) { return (-1); } - isp->isp_xflist[j] = xs; - *handlep = j+1; - if (++j == isp->isp_maxcmds) { - j = 0; - } - isp->isp_lasthdls = (uint32_t)j; + isp->isp_xffree = hdp->cmd; + hdp->cmd = xs; + hdp->handle = (hdp - isp->isp_xflist); + hdp->handle |= (ISP_HANDLE_INITIATOR << ISP_HANDLE_USAGE_SHIFT); + hdp->handle |= (isp->isp_seqno++ << ISP_HANDLE_SEQ_SHIFT); + *handlep = hdp->handle; return (0); } XS_T * isp_find_xs(ispsoftc_t *isp, uint32_t handle) { - if (handle < 1 || handle > (uint32_t) isp->isp_maxcmds) { + if (!ISP_VALID_INI_HANDLE(isp, handle)) { + isp_prt(isp, ISP_LOGERR, "%s: bad handle 0x%x", __func__, handle); return (NULL); - } else { - return (isp->isp_xflist[handle - 1]); } + return (isp->isp_xflist[(handle & ISP_HANDLE_CMD_MASK)].cmd); } uint32_t isp_find_handle(ispsoftc_t *isp, XS_T *xs) { - uint16_t i; + uint32_t i, foundhdl = ISP_HANDLE_FREE; + if (xs != NULL) { for (i = 0; i < isp->isp_maxcmds; i++) { - if (isp->isp_xflist[i] == xs) { - return ((uint32_t) (i+1)); + if (isp->isp_xflist[i].cmd != xs) { + continue; } + foundhdl = isp->isp_xflist[i].handle; + break; } } - return (0); + return (foundhdl); } uint32_t -isp_handle_index(uint32_t handle) +isp_handle_index(ispsoftc_t *isp, uint32_t handle) { - return (handle - 1); + if (!ISP_VALID_HANDLE(isp, handle)) { + return (handle & ISP_HANDLE_CMD_MASK); + } else { + isp_prt(isp, ISP_LOGERR, "%s: bad handle 0x%x", __func__, handle); + return (ISP_BAD_HANDLE_INDEX); + } } void isp_destroy_handle(ispsoftc_t *isp, uint32_t handle) { - if (handle > 0 && handle <= (uint32_t) isp->isp_maxcmds) { - isp->isp_xflist[handle - 1] = NULL; + if (!ISP_VALID_INI_HANDLE(isp, handle)) { + isp_prt(isp, ISP_LOGERR, "%s: bad handle 0x%x", __func__, handle); + } else { + isp->isp_xflist[(handle & ISP_HANDLE_CMD_MASK)].handle = ISP_HANDLE_FREE; + isp->isp_xflist[(handle & ISP_HANDLE_CMD_MASK)].cmd = isp->isp_xffree; + isp->isp_xffree = &isp->isp_xflist[(handle & ISP_HANDLE_CMD_MASK)]; } } @@ -617,54 +622,48 @@ isp_fc_change_role(ispsoftc_t *isp, int void isp_clear_commands(ispsoftc_t *isp) { - XS_T *xs; - uint32_t tmp, handle; + uint32_t tmp; + isp_hdl_t *hdp; #ifdef ISP_TARGET_MODE isp_notify_t notify; #endif for (tmp = 0; isp->isp_xflist && tmp < isp->isp_maxcmds; tmp++) { - xs = isp->isp_xflist[tmp]; - if (xs == NULL) { - continue; - } - handle = isp_find_handle(isp, xs); - if (handle == 0) { + XS_T *xs; + + hdp = &isp->isp_xflist[tmp]; + if (hdp->handle == ISP_HANDLE_FREE) { continue; } + xs = hdp->cmd; if (XS_XFRLEN(xs)) { - ISP_DMAFREE(isp, xs, handle); + ISP_DMAFREE(isp, xs, hdp->handle); XS_SET_RESID(xs, XS_XFRLEN(xs)); } else { XS_SET_RESID(xs, 0); } - isp_destroy_handle(isp, handle); + hdp->handle = 0; + hdp->cmd = NULL; XS_SETERR(xs, HBA_BUSRESET); isp_done(xs); } #ifdef ISP_TARGET_MODE for (tmp = 0; isp->isp_tgtlist && tmp < isp->isp_maxcmds; tmp++) { uint8_t local[QENTRY_LEN]; - - xs = isp->isp_tgtlist[tmp]; - if (xs == NULL) { - continue; - } - handle = isp_find_tgt_handle(isp, xs); - if (handle == 0) { + hdp = &isp->isp_tgt_xflist[tmp]; + if (hdp->handle == ISP_HANDLE_FREE) { continue; } - ISP_DMAFREE(isp, xs, handle); - + ISP_DMAFREE(isp, hdp->cmd, hdp->handle); ISP_MEMZERO(local, QENTRY_LEN); if (IS_24XX(isp)) { ct7_entry_t *ctio = (ct7_entry_t *) local; - ctio->ct_syshandle = handle; + ctio->ct_syshandle = hdp->handle; ctio->ct_nphdl = CT_HBA_RESET; ctio->ct_header.rqs_entry_type = RQSTYPE_CTIO7; } else if (IS_FC(isp)) { ct2_entry_t *ctio = (ct2_entry_t *) local; - ctio->ct_syshandle = handle; + ctio->ct_syshandle = hdp->handle; ctio->ct_status = CT_HBA_RESET; ctio->ct_header.rqs_entry_type = RQSTYPE_CTIO2; } else { @@ -2229,59 +2228,59 @@ isp_send_tgt_cmd(ispsoftc_t *isp, void * } int -isp_save_xs_tgt(ispsoftc_t *isp, void *xs, uint32_t *handlep) +isp_allocate_xs_tgt(ispsoftc_t *isp, void *xs, uint32_t *handlep) { - int i; + isp_hdl_t *hdp; - for (i = 0; i < (int) isp->isp_maxcmds; i++) { - if (isp->isp_tgtlist[i] == NULL) { - break; - } - } - if (i == isp->isp_maxcmds) { + hdp = isp->isp_tgtfree; + if (hdp == NULL) { return (-1); } - isp->isp_tgtlist[i] = xs; - *handlep = (i+1) | 0x8000; + isp->isp_tgtfree = hdp->cmd; + hdp->cmd = xs; + hdp->handle = (hdp - isp->isp_tgtlist); + hdp->handle |= (ISP_HANDLE_TARGET << ISP_HANDLE_USAGE_SHIFT); + hdp->handle |= (isp->isp_seqno++ << ISP_HANDLE_SEQ_SHIFT); + *handlep = hdp->handle; return (0); } void * isp_find_xs_tgt(ispsoftc_t *isp, uint32_t handle) { - if (handle == 0 || IS_TARGET_HANDLE(handle) == 0 || (handle & ISP_HANDLE_MASK) > isp->isp_maxcmds) { - isp_prt(isp, ISP_LOGERR, "bad handle %u in isp_find_xs_tgt", handle); + if (!ISP_VALID_TGT_HANDLE(isp, handle)) { + isp_prt(isp, ISP_LOGERR, "%s: bad handle 0x%x", __func__, handle); return (NULL); - } else { - return (isp->isp_tgtlist[(handle & ISP_HANDLE_MASK) - 1]); } + return (isp->isp_tgtlist[(handle & ISP_HANDLE_CMD_MASK)].cmd); } uint32_t isp_find_tgt_handle(ispsoftc_t *isp, void *xs) { - int i; + uint32_t i, foundhdl = ISP_HANDLE_FREE; + if (xs != NULL) { for (i = 0; i < isp->isp_maxcmds; i++) { - if (isp->isp_tgtlist[i] == xs) { - uint32_t handle = i; - handle += 1; - handle &= ISP_HANDLE_MASK; - handle |= 0x8000; - return (handle); + if (isp->isp_tgtlist[i].cmd != xs) { + continue; } + foundhdl = isp->isp_tgtlist[i].handle; + break; } } - return (0); + return (foundhdl); } void isp_destroy_tgt_handle(ispsoftc_t *isp, uint32_t handle) { - if (handle == 0 || IS_TARGET_HANDLE(handle) == 0 || (handle & ISP_HANDLE_MASK) > isp->isp_maxcmds) { - isp_prt(isp, ISP_LOGERR, "bad handle in isp_destroy_tgt_handle"); + if (!ISP_VALID_TGT_HANDLE(handle)) { + isp_prt(isp, ISP_LOGERR, "%s: bad handle 0x%x", __func__, handle); } else { - isp->isp_tgtlist[(handle & ISP_HANDLE_MASK) - 1] = NULL; + isp->isp_tgtlist[(handle & ISP_HANDLE_CMD_MASK)].handle = ISP_HANDLE_FREE; + isp->isp_tgtlist[(handle & ISP_HANDLE_CMD_MASK)].cmd = isp->isp_tgtfree; + isp->isp_tgtfree = &isp->isp_tgtlist[(handle & ISP_HANDLE_CMD_MASK)]; } } Modified: head/sys/dev/isp/isp_library.h ============================================================================== --- head/sys/dev/isp/isp_library.h Wed Feb 3 21:06:13 2010 (r203443) +++ head/sys/dev/isp/isp_library.h Wed Feb 3 21:09:32 2010 (r203444) @@ -43,10 +43,10 @@ int isp_send_cmd(ispsoftc_t *, void *, v * * These handles are associate with a command. */ -int isp_save_xs(ispsoftc_t *, XS_T *, uint32_t *); +int isp_allocate_xs(ispsoftc_t *, XS_T *, uint32_t *); XS_T * isp_find_xs(ispsoftc_t *, uint32_t); uint32_t isp_find_handle(ispsoftc_t *, XS_T *); -uint32_t isp_handle_index(uint32_t); +uint32_t isp_handle_index(ispsoftc_t *, uint32_t); void isp_destroy_handle(ispsoftc_t *, uint32_t); /* @@ -156,9 +156,7 @@ void isp_put_ct_hdr(ispsoftc_t *isp, ct_ int isp_send_tgt_cmd(ispsoftc_t *, void *, void *, uint32_t, uint32_t, isp_ddir_t, void *, uint32_t); -#define IS_TARGET_HANDLE(x) ((x) & 0x8000) - -int isp_save_xs_tgt(ispsoftc_t *, void *, uint32_t *); +int isp_allocate_xs_tgt(ispsoftc_t *, void *, uint32_t *); void *isp_find_xs_tgt(ispsoftc_t *, uint32_t); uint32_t isp_find_tgt_handle(ispsoftc_t *, void *); void isp_destroy_tgt_handle(ispsoftc_t *, uint32_t); Modified: head/sys/dev/isp/isp_pci.c ============================================================================== --- head/sys/dev/isp/isp_pci.c Wed Feb 3 21:06:13 2010 (r203443) +++ head/sys/dev/isp/isp_pci.c Wed Feb 3 21:09:32 2010 (r203444) @@ -1516,17 +1516,21 @@ isp_pci_mbxdma(ispsoftc_t *isp) return (1); } - len = sizeof (XS_T **) * isp->isp_maxcmds; - isp->isp_xflist = (XS_T **) malloc(len, M_DEVBUF, M_WAITOK | M_ZERO); + len = sizeof (isp_hdl_t) * isp->isp_maxcmds; + isp->isp_xflist = (isp_hdl_t *) malloc(len, M_DEVBUF, M_WAITOK | M_ZERO); if (isp->isp_xflist == NULL) { free(isp->isp_osinfo.pcmd_pool, M_DEVBUF); ISP_LOCK(isp); isp_prt(isp, ISP_LOGERR, "cannot alloc xflist array"); return (1); } + for (len = 0; len < isp->isp_maxcmds - 1; len++) { + isp->isp_xflist[len].cmd = &isp->isp_xflist[len+1]; + } + isp->isp_xffree = isp->isp_xflist; #ifdef ISP_TARGET_MODE - len = sizeof (void **) * isp->isp_maxcmds; - isp->isp_tgtlist = (void **) malloc(len, M_DEVBUF, M_WAITOK | M_ZERO); + len = sizeof (isp_hdl_t *) * isp->isp_maxcmds; + isp->isp_tgtlist = (isp_hdl_t *) malloc(len, M_DEVBUF, M_WAITOK | M_ZERO); if (isp->isp_tgtlist == NULL) { free(isp->isp_osinfo.pcmd_pool, M_DEVBUF); free(isp->isp_xflist, M_DEVBUF); @@ -1534,6 +1538,10 @@ isp_pci_mbxdma(ispsoftc_t *isp) isp_prt(isp, ISP_LOGERR, "cannot alloc tgtlist array"); return (1); } + for (len = 0; len < isp->isp_maxcmds - 1; len++) { + isp->isp_tgtlist[len].cmd = &isp->isp_tgtlist[len+1]; + } + isp->isp_tgtfree = isp->isp_tgtlist; #endif /* Modified: head/sys/dev/isp/isp_sbus.c ============================================================================== --- head/sys/dev/isp/isp_sbus.c Wed Feb 3 21:06:13 2010 (r203443) +++ head/sys/dev/isp/isp_sbus.c Wed Feb 3 21:09:32 2010 (r203444) @@ -455,13 +455,17 @@ isp_sbus_mbxdma(ispsoftc_t *isp) return (1); } - len = sizeof (XS_T **) * isp->isp_maxcmds; - isp->isp_xflist = (XS_T **) malloc(len, M_DEVBUF, M_WAITOK | M_ZERO); + len = sizeof (isp_hdl_t *) * isp->isp_maxcmds; + isp->isp_xflist = (isp_hdl_t *) malloc(len, M_DEVBUF, M_WAITOK | M_ZERO); if (isp->isp_xflist == NULL) { isp_prt(isp, ISP_LOGERR, "cannot alloc xflist array"); ISP_LOCK(isp); return (1); } + for (len = 0; len < isp->isp_maxcmds - 1; len++) { + isp->isp_xflist[len].cmd = &isp->isp_xflist[len+1]; + } + isp->isp_xffree = isp->isp_xflist; len = sizeof (bus_dmamap_t) * isp->isp_maxcmds; if (isp_dma_tag_create(BUS_DMA_ROOTARG(ISP_SBD(isp)), 1, Modified: head/sys/dev/isp/ispmbox.h ============================================================================== --- head/sys/dev/isp/ispmbox.h Wed Feb 3 21:06:13 2010 (r203443) +++ head/sys/dev/isp/ispmbox.h Wed Feb 3 21:09:32 2010 (r203444) @@ -288,11 +288,6 @@ #define QENTRY_LEN 64 /* - * Special Internal Handle for IOCBs - */ -#define ISP_SPCL_HANDLE 0xa5dead5a - -/* * Command Structure Definitions */ Modified: head/sys/dev/isp/ispvar.h ============================================================================== --- head/sys/dev/isp/ispvar.h Wed Feb 3 21:06:13 2010 (r203443) +++ head/sys/dev/isp/ispvar.h Wed Feb 3 21:09:32 2010 (r203444) @@ -50,7 +50,7 @@ #include "ispmbox.h" #endif -#define ISP_CORE_VERSION_MAJOR 6 +#define ISP_CORE_VERSION_MAJOR 7 #define ISP_CORE_VERSION_MINOR 0 /* @@ -288,6 +288,53 @@ typedef struct { #define DOMAIN_CONTROLLER_BASE 0xFFFC00 #define DOMAIN_CONTROLLER_END 0xFFFCFF +/* + * Command Handles + * + * Most QLogic initiator or target have 32 bit handles associated with them. + * We want to have a quick way to index back and forth between a local SCSI + * command context and what the firmware is passing back to us. We also + * want to avoid working on stale information. This structure handles both + * at the expense of some local memory. + * + * The handle is architected thusly: + * + * 0 means "free handle" + * bits 0..12 index commands + * bits 13..15 bits index usage + * bits 16..31 contain a rolling sequence + * + * + */ +typedef struct { + void * cmd; /* associated command context */ + uint32_t handle; /* handle associated with this command */ +} isp_hdl_t; +#define ISP_HANDLE_FREE 0x00000000 +#define ISP_HANDLE_CMD_MASK 0x00001fff +#define ISP_HANDLE_USAGE_MASK 0x0000e000 +#define ISP_HANDLE_USAGE_SHIFT 13 +#define ISP_H2HT(hdl) ((hdl & ISP_HANDLE_USAGE_MASK) >> ISP_HANDLE_USAGE_SHIFT) +# define ISP_HANDLE_NONE 0 +# define ISP_HANDLE_INITIATOR 1 +# define ISP_HANDLE_TARGET 2 +#define ISP_HANDLE_SEQ_MASK 0xffff0000 +#define ISP_HANDLE_SEQ_SHIFT 16 +#define ISP_H2SEQ(hdl) ((hdl & ISP_HANDLE_SEQ_MASK) >> ISP_HANDLE_SEQ_SHIFT) +#define ISP_VALID_INI_HANDLE(c, hdl) \ + (ISP_H2HT(hdl) == ISP_HANDLE_INITIATOR && (hdl & ISP_HANDLE_CMD_MASK) < (c)->isp_maxcmds && \ + ISP_H2SEQ(hdl) == ISP_H2SEQ((c)->isp_xflist[hdl & ISP_HANDLE_CMD_MASK].handle)) +#ifdef ISP_TARGET_MODE +#define ISP_VALID_TGT_HANDLE(c, hdl) \ + (ISP_H2HT(hdl) == ISP_HANDLE_TARGET && (hdl & ISP_HANDLE_CMD_MASK) < (c)->isp_maxcmds && \ + ISP_H2SEQ(hdl) == ISP_H2SEQ((c)->isp_tgtlist[hdl & ISP_HANDLE_CMD_MASK].handle)) +#define ISP_VALID_HANDLE(c, hdl) \ + (ISP_VALID_INI_HANDLE((c), hdl) || ISP_VALID_TGT_HANDLE((c), hdl)) +#else +#define ISP_VALID_HANDLE ISP_VALID_INI_HANDLE +#endif +#define ISP_BAD_HANDLE_INDEX 0xffffffff + /* * FC Port Database entry. @@ -562,11 +609,11 @@ struct ispsoftc { isp_mboxbsy : 1, /* mailbox command active */ isp_state : 3, isp_nactive : 16; /* how many commands active */ + volatile mbreg_t isp_curmbx; /* currently active mailbox command */ volatile uint32_t isp_reqodx; /* index of last ISP pickup */ volatile uint32_t isp_reqidx; /* index of next request */ volatile uint32_t isp_residx; /* index of next result */ volatile uint32_t isp_resodx; /* index of next result */ - volatile uint32_t isp_lasthdls; /* last handle seed */ volatile uint32_t isp_obits; /* mailbox command output */ volatile uint32_t isp_serno; /* rolling serial number */ volatile uint16_t isp_mboxtmp[MAILBOX_STORAGE]; @@ -575,18 +622,21 @@ struct ispsoftc { volatile uint16_t isp_mbxwrk1; volatile uint16_t isp_mbxwrk2; volatile uint16_t isp_mbxwrk8; + volatile uint16_t isp_seqno; /* running sequence number */ void * isp_mbxworkp; /* * Active commands are stored here, indexed by handle functions. */ - XS_T **isp_xflist; + isp_hdl_t *isp_xflist; + isp_hdl_t *isp_xffree; #ifdef ISP_TARGET_MODE /* * Active target commands are stored here, indexed by handle functions. */ - void **isp_tgtlist; + isp_hdl_t *isp_tgtlist; + isp_hdl_t *isp_tgtfree; #endif /* From owner-svn-src-all@FreeBSD.ORG Wed Feb 3 21:26:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7497A106566B; Wed, 3 Feb 2010 21:26:54 +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 64F328FC08; Wed, 3 Feb 2010 21:26:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o13LQshZ012520; Wed, 3 Feb 2010 21:26:54 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o13LQsIU012518; Wed, 3 Feb 2010 21:26:54 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201002032126.o13LQsIU012518@svn.freebsd.org> From: Alexander Motin Date: Wed, 3 Feb 2010 21:26:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203445 - head/sys/dev/ata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 21:26:54 -0000 Author: mav Date: Wed Feb 3 21:26:54 2010 New Revision: 203445 URL: http://svn.freebsd.org/changeset/base/203445 Log: Report to CAM unit number of underlying ataX bus device, instead of this atapicamX. It is more apropriate and useful together with "ata" name. Modified: head/sys/dev/ata/atapi-cam.c Modified: head/sys/dev/ata/atapi-cam.c ============================================================================== --- head/sys/dev/ata/atapi-cam.c Wed Feb 3 21:09:32 2010 (r203444) +++ head/sys/dev/ata/atapi-cam.c Wed Feb 3 21:26:54 2010 (r203445) @@ -201,7 +201,7 @@ atapi_cam_attach(device_t dev) scp->parent = device_get_parent(dev); scp->ata_ch = device_get_softc(scp->parent); TAILQ_INIT(&scp->pending_hcbs); - unit = device_get_unit(dev); + unit = device_get_unit(device_get_parent(dev)); if ((devq = cam_simq_alloc(16)) == NULL) { error = ENOMEM; From owner-svn-src-all@FreeBSD.ORG Wed Feb 3 21:45:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 980EE106566C; Wed, 3 Feb 2010 21:45:09 +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 888178FC17; Wed, 3 Feb 2010 21:45:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o13Lj9Jn016940; Wed, 3 Feb 2010 21:45:09 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o13Lj9jC016938; Wed, 3 Feb 2010 21:45:09 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201002032145.o13Lj9jC016938@svn.freebsd.org> From: Alexander Motin Date: Wed, 3 Feb 2010 21:45:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203449 - head/sys/dev/ata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 21:45:09 -0000 Author: mav Date: Wed Feb 3 21:45:09 2010 New Revision: 203449 URL: http://svn.freebsd.org/changeset/base/203449 Log: Implement poll method for atapicam. It is not perfect, but better then nothing. Modified: head/sys/dev/ata/atapi-cam.c Modified: head/sys/dev/ata/atapi-cam.c ============================================================================== --- head/sys/dev/ata/atapi-cam.c Wed Feb 3 21:41:42 2010 (r203448) +++ head/sys/dev/ata/atapi-cam.c Wed Feb 3 21:45:09 2010 (r203449) @@ -682,8 +682,12 @@ action_invalid: static void atapi_poll(struct cam_sim *sim) { - /* do nothing - we do not actually service any interrupts */ - printf("atapi_poll called!\n"); + struct atapi_xpt_softc *softc = + (struct atapi_xpt_softc*)cam_sim_softc(sim); + + mtx_unlock(&softc->state_lock); + ata_interrupt(softc->ata_ch); + mtx_lock(&softc->state_lock); } static void From owner-svn-src-all@FreeBSD.ORG Wed Feb 3 22:07:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 42464106566C; Wed, 3 Feb 2010 22:07:51 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 322E18FC14; Wed, 3 Feb 2010 22:07:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o13M7o9r022115; Wed, 3 Feb 2010 22:07:50 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o13M7oUL022113; Wed, 3 Feb 2010 22:07:50 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201002032207.o13M7oUL022113@svn.freebsd.org> From: Jung-uk Kim Date: Wed, 3 Feb 2010 22:07:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203451 - head/sys/dev/fb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 22:07:53 -0000 Author: jkim Date: Wed Feb 3 22:07:50 2010 New Revision: 203451 URL: http://svn.freebsd.org/changeset/base/203451 Log: Correct virtual address of frame buffer for non-linear mode. Reported by: Marc UBM Bocklet (ubm dot freebsd at googlemail dot com) Modified: head/sys/dev/fb/vesa.c Modified: head/sys/dev/fb/vesa.c ============================================================================== --- head/sys/dev/fb/vesa.c Wed Feb 3 22:05:31 2010 (r203450) +++ head/sys/dev/fb/vesa.c Wed Feb 3 22:07:50 2010 (r203451) @@ -1317,7 +1317,7 @@ vesa_set_mode(video_adapter_t *adp, int } else { vesa_adp->va_buffer = 0; vesa_adp->va_buffer_size = info.vi_buffer_size; - vesa_adp->va_window = BIOS_PADDRTOVADDR(info.vi_window); + vesa_adp->va_window = (vm_offset_t)x86bios_offset(info.vi_window); vesa_adp->va_window_size = info.vi_window_size; vesa_adp->va_window_gran = info.vi_window_gran; } From owner-svn-src-all@FreeBSD.ORG Wed Feb 3 22:17:31 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3B521106566C; Wed, 3 Feb 2010 22:17:31 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2AD208FC18; Wed, 3 Feb 2010 22:17:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o13MHVFr024328; Wed, 3 Feb 2010 22:17:31 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o13MHVeW024325; Wed, 3 Feb 2010 22:17:31 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201002032217.o13MHVeW024325@svn.freebsd.org> From: Jung-uk Kim Date: Wed, 3 Feb 2010 22:17:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203453 - in head/sys: dev/fb sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 22:17:31 -0000 Author: jkim Date: Wed Feb 3 22:17:30 2010 New Revision: 203453 URL: http://svn.freebsd.org/changeset/base/203453 Log: Use bytes per scan line from mode table. The previous implementation did not reflect actual number of bytes when it was not exactly width * bpp * 8. Modified: head/sys/dev/fb/vesa.c head/sys/sys/fbio.h Modified: head/sys/dev/fb/vesa.c ============================================================================== --- head/sys/dev/fb/vesa.c Wed Feb 3 22:08:25 2010 (r203452) +++ head/sys/dev/fb/vesa.c Wed Feb 3 22:17:30 2010 (r203453) @@ -186,7 +186,9 @@ static int vesa_bios_load_palette2(int s #define STATE_ALL (STATE_HW | STATE_DATA | STATE_DAC | STATE_REG) static ssize_t vesa_bios_state_buf_size(void); static int vesa_bios_save_restore(int code, void *p, size_t size); +#if 0 static int vesa_bios_get_line_length(void); +#endif static int vesa_bios_set_line_length(int pixel, int *bytes, int *lines); #if 0 static int vesa_bios_get_start(int *x, int *y); @@ -195,7 +197,6 @@ static int vesa_bios_set_start(int x, in static int vesa_map_gen_mode_num(int type, int color, int mode); static int vesa_translate_flags(u_int16_t vflags); static int vesa_translate_mmodel(u_int8_t vmodel); -static int vesa_get_line_width(video_info_t *info); static int vesa_bios_init(void); static void vesa_clear_modes(video_info_t *info, int color); static vm_offset_t vesa_map_buffer(u_int paddr, size_t size); @@ -567,6 +568,7 @@ vesa_bios_save_restore(int code, void *p return (regs.R_AX != 0x004f); } +#if 0 static int vesa_bios_get_line_length(void) { @@ -583,6 +585,7 @@ vesa_bios_get_line_length(void) return (regs.R_BX); } +#endif static int vesa_bios_set_line_length(int pixel, int *bytes, int *lines) @@ -716,37 +719,6 @@ vesa_translate_mmodel(u_int8_t vmodel) return (V_INFO_MM_OTHER); } -static int -vesa_get_line_width(video_info_t *info) -{ - int len; - int width; - - width = info->vi_width; - - if (info->vi_flags & V_INFO_GRAPHICS) - switch (info->vi_depth / info->vi_planes) { - case 1: - return (width / 8); - case 2: - return (width / 4); - case 4: - return (width / 2); - case 8: - return (width); - case 15: - case 16: - return (width * 2); - case 24: - case 32: - return (width * 4); - } - - len = vesa_bios_get_line_length(); - - return (len > 0 ? len : width); -} - #define VESA_MAXSTR 256 #define VESA_STRCPY(dst, src) do { \ @@ -933,10 +905,14 @@ vesa_bios_init(void) /* XXX window B */ vesa_vmode[modes].vi_window_size = vmode.v_wsize*1024; vesa_vmode[modes].vi_window_gran = vmode.v_wgran*1024; - if (vmode.v_modeattr & V_MODELFB) + if (vmode.v_modeattr & V_MODELFB) { vesa_vmode[modes].vi_buffer = vmode.v_lfb; - else + vesa_vmode[modes].vi_line_width = vers >= 0x0300 ? + vmode.v_linbpscanline : vmode.v_bpscanline; + } else { vesa_vmode[modes].vi_buffer = 0; + vesa_vmode[modes].vi_line_width = vmode.v_bpscanline; + } /* XXX */ vesa_vmode[modes].vi_buffer_size = vesa_adp_info->v_memsize*64*1024; @@ -987,8 +963,8 @@ vesa_bios_init(void) = vesa_translate_flags(vmode.v_modeattr) | V_INFO_VESA; /* Does it have enough memory to support this mode? */ - bsize = vesa_get_line_width(&vesa_vmode[modes]); - bsize *= vesa_vmode[modes].vi_height; + bsize = (size_t)vesa_vmode[modes].vi_line_width * + vesa_vmode[modes].vi_height; if (bsize > vesa_vmode[modes].vi_buffer_size) { #if VESA_DEBUG > 1 printf( @@ -1322,7 +1298,7 @@ vesa_set_mode(video_adapter_t *adp, int vesa_adp->va_window_gran = info.vi_window_gran; } vesa_adp->va_window_orig = 0; - vesa_adp->va_line_width = vesa_get_line_width(&info); + vesa_adp->va_line_width = info.vi_line_width; vesa_adp->va_disp_start.x = 0; vesa_adp->va_disp_start.y = 0; #if VESA_DEBUG > 0 Modified: head/sys/sys/fbio.h ============================================================================== --- head/sys/sys/fbio.h Wed Feb 3 22:08:25 2010 (r203452) +++ head/sys/sys/fbio.h Wed Feb 3 22:17:30 2010 (r203453) @@ -295,8 +295,10 @@ struct video_info { /* for MM_DIRECT only */ int vi_pixel_fields[4]; /* RGB and reserved fields */ int vi_pixel_fsizes[4]; + /* XXX for VESA only */ + int vi_line_width; /* reserved */ - u_char vi_reserved[64]; + u_char vi_reserved[60]; vm_offset_t vi_registers; /* physical address */ vm_offset_t vi_registers_size; }; From owner-svn-src-all@FreeBSD.ORG Wed Feb 3 22:20:57 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C1E2B1065670; Wed, 3 Feb 2010 22:20:57 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B0EF38FC15; Wed, 3 Feb 2010 22:20:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o13MKvXh025159; Wed, 3 Feb 2010 22:20:57 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o13MKv99025157; Wed, 3 Feb 2010 22:20:57 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201002032220.o13MKv99025157@svn.freebsd.org> From: Jung-uk Kim Date: Wed, 3 Feb 2010 22:20:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203455 - head/sys/dev/fb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 22:20:57 -0000 Author: jkim Date: Wed Feb 3 22:20:57 2010 New Revision: 203455 URL: http://svn.freebsd.org/changeset/base/203455 Log: Remove dead code and fix style(9) bugs. Modified: head/sys/dev/fb/vesa.c Modified: head/sys/dev/fb/vesa.c ============================================================================== --- head/sys/dev/fb/vesa.c Wed Feb 3 22:19:22 2010 (r203454) +++ head/sys/dev/fb/vesa.c Wed Feb 3 22:20:57 2010 (r203455) @@ -803,9 +803,9 @@ vesa_bios_init(void) if (vers < 0x0102) { printf("VESA: VBE version %d.%d is not supported; " - "version 1.2 or later is required.\n", - ((vers & 0xf000) >> 12) * 10 + ((vers & 0x0f00) >> 8), - ((vers & 0x00f0) >> 4) * 10 + (vers & 0x000f)); + "version 1.2 or later is required.\n", + ((vers & 0xf000) >> 12) * 10 + ((vers & 0x0f00) >> 8), + ((vers & 0x00f0) >> 4) * 10 + (vers & 0x000f)); return (1); } @@ -823,9 +823,8 @@ vesa_bios_init(void) vesa_vmodetab = x86bios_offset(BIOS_SADDRTOLADDR(buf.v_modetable)); - for (i = 0, modes = 0; - (i < (M_VESA_MODE_MAX - M_VESA_BASE + 1)) - && (vesa_vmodetab[i] != 0xffff); ++i) { + for (i = 0, modes = 0; (i < (M_VESA_MODE_MAX - M_VESA_BASE + 1)) && + (vesa_vmodetab[i] != 0xffff); ++i) { vesa_vmodetab[i] = le16toh(vesa_vmodetab[i]); if (vesa_bios_get_mode(vesa_vmodetab[i], &vmode)) continue; @@ -847,16 +846,17 @@ vesa_bios_init(void) /* reject unsupported modes */ #if 0 - if ((vmode.v_modeattr & (V_MODESUPP | V_MODEOPTINFO - | V_MODENONVGA)) - != (V_MODESUPP | V_MODEOPTINFO)) + if ((vmode.v_modeattr & + (V_MODESUPP | V_MODEOPTINFO | V_MODENONVGA)) != + (V_MODESUPP | V_MODEOPTINFO)) continue; #else if ((vmode.v_modeattr & V_MODEOPTINFO) == 0) { #if VESA_DEBUG > 1 - printf( - "Rejecting VESA %s mode: %d x %d x %d bpp attr = %x\n", - vmode.v_modeattr & V_MODEGRAPHICS ? "graphics" : "text", + printf("Rejecting VESA %s mode: %d x %d x %d bpp " + " attr = %x\n", + vmode.v_modeattr & V_MODEGRAPHICS ? + "graphics" : "text", vmode.v_width, vmode.v_height, vmode.v_bpp, vmode.v_modeattr); #endif @@ -867,11 +867,11 @@ vesa_bios_init(void) /* expand the array if necessary */ if (modes >= vesa_vmode_max) { vesa_vmode_max += MODE_TABLE_DELTA; - p = malloc(sizeof(*vesa_vmode)*(vesa_vmode_max + 1), - M_DEVBUF, M_WAITOK); + p = malloc(sizeof(*vesa_vmode) * (vesa_vmode_max + 1), + M_DEVBUF, M_WAITOK); #if VESA_DEBUG > 1 printf("vesa_bios_init(): modes:%d, vesa_mode_max:%d\n", - modes, vesa_vmode_max); + modes, vesa_vmode_max); #endif if (modes > 0) { bcopy(vesa_vmode, p, sizeof(*vesa_vmode)*modes); @@ -901,76 +901,87 @@ vesa_bios_init(void) vesa_vmode[modes].vi_planes = vmode.v_planes; vesa_vmode[modes].vi_cwidth = vmode.v_cwidth; vesa_vmode[modes].vi_cheight = vmode.v_cheight; - vesa_vmode[modes].vi_window = (u_int)vmode.v_waseg << 4; + vesa_vmode[modes].vi_window = (vm_offset_t)vmode.v_waseg << 4; /* XXX window B */ - vesa_vmode[modes].vi_window_size = vmode.v_wsize*1024; - vesa_vmode[modes].vi_window_gran = vmode.v_wgran*1024; + vesa_vmode[modes].vi_window_size = vmode.v_wsize * 1024; + vesa_vmode[modes].vi_window_gran = vmode.v_wgran * 1024; if (vmode.v_modeattr & V_MODELFB) { vesa_vmode[modes].vi_buffer = vmode.v_lfb; vesa_vmode[modes].vi_line_width = vers >= 0x0300 ? vmode.v_linbpscanline : vmode.v_bpscanline; - } else { - vesa_vmode[modes].vi_buffer = 0; + } else vesa_vmode[modes].vi_line_width = vmode.v_bpscanline; - } /* XXX */ - vesa_vmode[modes].vi_buffer_size - = vesa_adp_info->v_memsize*64*1024; + vesa_vmode[modes].vi_buffer_size = + vesa_adp_info->v_memsize * 64 * 1024; #if 0 if (vmode.v_offscreen > vmode.v_lfb) - vesa_vmode[modes].vi_buffer_size - = vmode.v_offscreen + vmode.v_offscreensize*1024 - - vmode.v_lfb; + vesa_vmode[modes].vi_buffer_size = vmode.v_offscreen + + vmode.v_offscreensize * 1024 - vmode.v_lfb; else - vesa_vmode[modes].vi_buffer_size - = vmode.v_offscreen + vmode.v_offscreensize * 1024; + vesa_vmode[modes].vi_buffer_size = vmode.v_offscreen + + vmode.v_offscreensize * 1024; #endif - vesa_vmode[modes].vi_mem_model - = vesa_translate_mmodel(vmode.v_memmodel); - vesa_vmode[modes].vi_pixel_fields[0] = 0; - vesa_vmode[modes].vi_pixel_fields[1] = 0; - vesa_vmode[modes].vi_pixel_fields[2] = 0; - vesa_vmode[modes].vi_pixel_fields[3] = 0; - vesa_vmode[modes].vi_pixel_fsizes[0] = 0; - vesa_vmode[modes].vi_pixel_fsizes[1] = 0; - vesa_vmode[modes].vi_pixel_fsizes[2] = 0; - vesa_vmode[modes].vi_pixel_fsizes[3] = 0; - if (vesa_vmode[modes].vi_mem_model == V_INFO_MM_PACKED) { - vesa_vmode[modes].vi_pixel_size = (vmode.v_bpp + 7)/8; - } else if (vesa_vmode[modes].vi_mem_model == V_INFO_MM_DIRECT) { - vesa_vmode[modes].vi_pixel_size = (vmode.v_bpp + 7)/8; - vesa_vmode[modes].vi_pixel_fields[0] - = vmode.v_redfieldpos; - vesa_vmode[modes].vi_pixel_fields[1] - = vmode.v_greenfieldpos; - vesa_vmode[modes].vi_pixel_fields[2] - = vmode.v_bluefieldpos; - vesa_vmode[modes].vi_pixel_fields[3] - = vmode.v_resfieldpos; - vesa_vmode[modes].vi_pixel_fsizes[0] - = vmode.v_redmasksize; - vesa_vmode[modes].vi_pixel_fsizes[1] - = vmode.v_greenmasksize; - vesa_vmode[modes].vi_pixel_fsizes[2] - = vmode.v_bluemasksize; - vesa_vmode[modes].vi_pixel_fsizes[3] - = vmode.v_resmasksize; - } else { - vesa_vmode[modes].vi_pixel_size = 0; + vesa_vmode[modes].vi_mem_model = + vesa_translate_mmodel(vmode.v_memmodel); + if (vesa_vmode[modes].vi_mem_model == V_INFO_MM_PACKED || + vesa_vmode[modes].vi_mem_model == V_INFO_MM_DIRECT) + vesa_vmode[modes].vi_pixel_size = (vmode.v_bpp + 7) / 8; +#if 0 + if (vesa_vmode[modes].vi_mem_model == V_INFO_MM_DIRECT) { + if ((vmode.v_modeattr & V_MODELFB) != 0 && + vers >= 0x0300) { + vesa_vmode[modes].vi_pixel_fields[0] = + vmode.v_linredfieldpos; + vesa_vmode[modes].vi_pixel_fields[1] = + vmode.v_lingreenfieldpos; + vesa_vmode[modes].vi_pixel_fields[2] = + vmode.v_linbluefieldpos; + vesa_vmode[modes].vi_pixel_fields[3] = + vmode.v_linresfieldpos; + vesa_vmode[modes].vi_pixel_fsizes[0] = + vmode.v_linredmasksize; + vesa_vmode[modes].vi_pixel_fsizes[1] = + vmode.v_lingreenmasksize; + vesa_vmode[modes].vi_pixel_fsizes[2] = + vmode.v_linbluemasksize; + vesa_vmode[modes].vi_pixel_fsizes[3] = + vmode.v_linresmasksize; + } else { + vesa_vmode[modes].vi_pixel_fields[0] = + vmode.v_redfieldpos; + vesa_vmode[modes].vi_pixel_fields[1] = + vmode.v_greenfieldpos; + vesa_vmode[modes].vi_pixel_fields[2] = + vmode.v_bluefieldpos; + vesa_vmode[modes].vi_pixel_fields[3] = + vmode.v_resfieldpos; + vesa_vmode[modes].vi_pixel_fsizes[0] = + vmode.v_redmasksize; + vesa_vmode[modes].vi_pixel_fsizes[1] = + vmode.v_greenmasksize; + vesa_vmode[modes].vi_pixel_fsizes[2] = + vmode.v_bluemasksize; + vesa_vmode[modes].vi_pixel_fsizes[3] = + vmode.v_resmasksize; + } } +#endif - vesa_vmode[modes].vi_flags - = vesa_translate_flags(vmode.v_modeattr) | V_INFO_VESA; + vesa_vmode[modes].vi_flags = + vesa_translate_flags(vmode.v_modeattr) | V_INFO_VESA; /* Does it have enough memory to support this mode? */ bsize = (size_t)vesa_vmode[modes].vi_line_width * vesa_vmode[modes].vi_height; if (bsize > vesa_vmode[modes].vi_buffer_size) { #if VESA_DEBUG > 1 - printf( - "Rejecting VESA %s mode: %d x %d x %d bpp attr = %x, not enough memory\n", - (vmode.v_modeattr & V_MODEGRAPHICS) != 0 ? "graphics" : "text", - vmode.v_width, vmode.v_height, vmode.v_bpp, vmode.v_modeattr); + printf("Rejecting VESA %s mode: %d x %d x %d bpp " + " attr = %x, not enough memory\n", + (vmode.v_modeattr & V_MODEGRAPHICS) != 0 ? + "graphics" : "text", + vmode.v_width, vmode.v_height, vmode.v_bpp, + vmode.v_modeattr); #endif continue; } From owner-svn-src-all@FreeBSD.ORG Wed Feb 3 22:30:00 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id 00799106566C; Wed, 3 Feb 2010 22:30:00 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: src-committers@FreeBSD.org Date: Wed, 3 Feb 2010 17:29:49 -0500 User-Agent: KMail/1.6.2 References: <201002032217.o13MHVeW024325@svn.freebsd.org> In-Reply-To: <201002032217.o13MHVeW024325@svn.freebsd.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201002031729.53414.jkim@FreeBSD.org> Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org Subject: Re: svn commit: r203453 - in head/sys: dev/fb sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 22:30:00 -0000 On Wednesday 03 February 2010 05:17 pm, Jung-uk Kim wrote: > Author: jkim > Date: Wed Feb 3 22:17:30 2010 > New Revision: 203453 > URL: http://svn.freebsd.org/changeset/base/203453 > > Log: > Use bytes per scan line from mode table. The previous > implementation did not reflect actual number of bytes when it was > not exactly width * bpp * 8. It should be read "width * bpp / 8." Sorry, Jung-uk Kim From owner-svn-src-all@FreeBSD.ORG Wed Feb 3 23:56:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F1BD106566C; Wed, 3 Feb 2010 23:56:12 +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 7DD4A8FC08; Wed, 3 Feb 2010 23:56:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o13NuCop046154; Wed, 3 Feb 2010 23:56:12 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o13NuCgR046151; Wed, 3 Feb 2010 23:56:12 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201002032356.o13NuCgR046151@svn.freebsd.org> From: Xin LI Date: Wed, 3 Feb 2010 23:56:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203459 - head/sbin/dump X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 23:56:12 -0000 Author: delphij Date: Wed Feb 3 23:56:12 2010 New Revision: 203459 URL: http://svn.freebsd.org/changeset/base/203459 Log: Plug two memory leaks in error case. MFC after: 1 month Modified: head/sbin/dump/itime.c head/sbin/dump/main.c Modified: head/sbin/dump/itime.c ============================================================================== --- head/sbin/dump/itime.c Wed Feb 3 23:51:00 2010 (r203458) +++ head/sbin/dump/itime.c Wed Feb 3 23:56:12 2010 (r203459) @@ -106,8 +106,10 @@ readdumptimes(FILE *df) for (;;) { dtwalk = (struct dumptime *)calloc(1, sizeof (struct dumptime)); - if (getrecord(df, &(dtwalk->dt_value)) < 0) + if (getrecord(df, &(dtwalk->dt_value)) < 0) { + free(dtwalk); break; + } nddates++; SLIST_INSERT_HEAD(&dthead, dtwalk, dt_list); } Modified: head/sbin/dump/main.c ============================================================================== --- head/sbin/dump/main.c Wed Feb 3 23:51:00 2010 (r203458) +++ head/sbin/dump/main.c Wed Feb 3 23:56:12 2010 (r203459) @@ -767,7 +767,8 @@ obsolete(int *argcp, char **argvp[]) if (flags) { *p = '\0'; *nargv++ = flagsp; - } + } else + free(flagsp); /* Copy remaining arguments. */ while ((*nargv++ = *argv++)); From owner-svn-src-all@FreeBSD.ORG Wed Feb 3 23:58:00 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C43151065670; Wed, 3 Feb 2010 23:58:00 +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 B2EF48FC12; Wed, 3 Feb 2010 23:58:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o13Nw0u3046577; Wed, 3 Feb 2010 23:58:00 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o13Nw0hk046574; Wed, 3 Feb 2010 23:58:00 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201002032358.o13Nw0hk046574@svn.freebsd.org> From: Xin LI Date: Wed, 3 Feb 2010 23:58:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203460 - head/sbin/iscontrol X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 23:58:00 -0000 Author: delphij Date: Wed Feb 3 23:58:00 2010 New Revision: 203460 URL: http://svn.freebsd.org/changeset/base/203460 Log: pukeText is an internal function so define it as static rather than exporting it. MFC after: 1 month Modified: head/sbin/iscontrol/iscontrol.h head/sbin/iscontrol/pdu.c Modified: head/sbin/iscontrol/iscontrol.h ============================================================================== --- head/sbin/iscontrol/iscontrol.h Wed Feb 3 23:56:12 2010 (r203459) +++ head/sbin/iscontrol/iscontrol.h Wed Feb 3 23:58:00 2010 (r203460) @@ -144,7 +144,6 @@ int addText(pdu_t *pp, char *fmt, ...); void freePDU(pdu_t *pp); int xmitpdu(isess_t *sess, pdu_t *pp); int recvpdu(isess_t *sess, pdu_t *pp); -void pukeText(char *it, pdu_t *pp); int lookup(token_t *tbl, char *m); Modified: head/sbin/iscontrol/pdu.c ============================================================================== --- head/sbin/iscontrol/pdu.c Wed Feb 3 23:56:12 2010 (r203459) +++ head/sbin/iscontrol/pdu.c Wed Feb 3 23:58:00 2010 (r203460) @@ -46,6 +46,8 @@ __FBSDID("$FreeBSD$"); #include "iscsi.h" #include "iscontrol.h" +static void pukeText(char *it, pdu_t *pp); + int xmitpdu(isess_t *sess, pdu_t *pp) { @@ -153,7 +155,7 @@ freePDU(pdu_t *pp) pp->ds_size = pp->ds_len = 0; } -void +static void pukeText(char *it, pdu_t *pp) { char *ptr; From owner-svn-src-all@FreeBSD.ORG Wed Feb 3 23:59:52 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9EA81106566B; Wed, 3 Feb 2010 23:59:52 +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 8CF448FC0A; Wed, 3 Feb 2010 23:59:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o13Nxqea047000; Wed, 3 Feb 2010 23:59:52 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o13NxqRv046998; Wed, 3 Feb 2010 23:59:52 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201002032359.o13NxqRv046998@svn.freebsd.org> From: Xin LI Date: Wed, 3 Feb 2010 23:59:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203461 - head/sbin/mount_nfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 23:59:52 -0000 Author: delphij Date: Wed Feb 3 23:59:52 2010 New Revision: 203461 URL: http://svn.freebsd.org/changeset/base/203461 Log: static'ify function prototypes and convert K&R to ANSI. MFC after: 1 month Modified: head/sbin/mount_nfs/mount_nfs.c Modified: head/sbin/mount_nfs/mount_nfs.c ============================================================================== --- head/sbin/mount_nfs/mount_nfs.c Wed Feb 3 23:58:00 2010 (r203460) +++ head/sbin/mount_nfs/mount_nfs.c Wed Feb 3 23:59:52 2010 (r203461) @@ -130,20 +130,19 @@ enum tryret { TRYRET_LOCALERR /* Local failure. */ }; -int fallback_mount(struct iovec *iov, int iovlen, int mntflags); -int sec_name_to_num(char *sec); -char *sec_num_to_name(int num); -int getnfsargs(char *, struct iovec **iov, int *iovlen); +static int fallback_mount(struct iovec *iov, int iovlen, int mntflags); +static int sec_name_to_num(char *sec); +static char *sec_num_to_name(int num); +static int getnfsargs(char *, struct iovec **iov, int *iovlen); /* void set_rpc_maxgrouplist(int); */ -struct netconfig *getnetconf_cached(const char *netid); -const char *netidbytype(int af, int sotype); -void usage(void) __dead2; -int xdr_dir(XDR *, char *); -int xdr_fh(XDR *, struct nfhret *); -enum tryret nfs_tryproto(struct addrinfo *ai, char *hostp, char *spec, +static struct netconfig *getnetconf_cached(const char *netid); +static const char *netidbytype(int af, int sotype); +static void usage(void) __dead2; +static int xdr_dir(XDR *, char *); +static int xdr_fh(XDR *, struct nfhret *); +static enum tryret nfs_tryproto(struct addrinfo *ai, char *hostp, char *spec, char **errstr, struct iovec **iov, int *iovlen); -enum tryret returncode(enum clnt_stat stat, struct rpc_err *rpcerr); -extern int getosreldate(void); +static enum tryret returncode(enum clnt_stat stat, struct rpc_err *rpcerr); int main(int argc, char *argv[]) @@ -476,7 +475,7 @@ copyopt(struct iovec **newiov, int *newi * passing NFS mount options to nmount() as individual * parameters. It should be eventually be removed. */ -int +static int fallback_mount(struct iovec *iov, int iovlen, int mntflags) { struct nfs_args args = { @@ -663,7 +662,7 @@ fallback_mount(struct iovec *iov, int io return nmount(newiov, newiovlen, mntflags); } -int +static int sec_name_to_num(char *sec) { if (!strcmp(sec, "krb5")) @@ -677,7 +676,7 @@ sec_name_to_num(char *sec) return (-1); } -char * +static char * sec_num_to_name(int flavor) { switch (flavor) { @@ -693,7 +692,7 @@ sec_num_to_name(int flavor) return (NULL); } -int +static int getnfsargs(char *spec, struct iovec **iov, int *iovlen) { struct addrinfo hints, *ai_nfs, *ai; @@ -839,7 +838,7 @@ getnfsargs(char *spec, struct iovec **io * In all error cases, *errstr will be set to a statically-allocated string * describing the error. */ -enum tryret +static enum tryret nfs_tryproto(struct addrinfo *ai, char *hostp, char *spec, char **errstr, struct iovec **iov, int *iovlen) { @@ -1061,7 +1060,7 @@ tryagain: * Catagorise a RPC return status and error into an `enum tryret' * return code. */ -enum tryret +static enum tryret returncode(enum clnt_stat stat, struct rpc_err *rpcerr) { switch (stat) { @@ -1096,7 +1095,7 @@ returncode(enum clnt_stat stat, struct r * * XXX there should be a library function for this. */ -const char * +static const char * netidbytype(int af, int sotype) { struct nc_protos *p; @@ -1116,7 +1115,7 @@ netidbytype(int af, int sotype) * Otherwise it behaves just like getnetconfigent(), so nc_*error() * work on failure. */ -struct netconfig * +static struct netconfig * getnetconf_cached(const char *netid) { static struct nc_entry { @@ -1144,13 +1143,13 @@ getnetconf_cached(const char *netid) /* * xdr routines for mount rpc's */ -int +static int xdr_dir(XDR *xdrsp, char *dirp) { return (xdr_string(xdrsp, &dirp, MNTPATHLEN)); } -int +static int xdr_fh(XDR *xdrsp, struct nfhret *np) { int i; @@ -1196,8 +1195,8 @@ xdr_fh(XDR *xdrsp, struct nfhret *np) return (0); } -void -usage() +static void +usage(void) { (void)fprintf(stderr, "%s\n%s\n%s\n%s\n", "usage: mount_nfs [-23bcdiLlNPsTU] [-a maxreadahead] [-D deadthresh]", From owner-svn-src-all@FreeBSD.ORG Thu Feb 4 00:40:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6AD0E1065769; Thu, 4 Feb 2010 00:40:12 +0000 (UTC) (envelope-from mjacob@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 596568FC1A; Thu, 4 Feb 2010 00:40:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o140eCFs055954; Thu, 4 Feb 2010 00:40:12 GMT (envelope-from mjacob@svn.freebsd.org) Received: (from mjacob@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o140eCmn055952; Thu, 4 Feb 2010 00:40:12 GMT (envelope-from mjacob@svn.freebsd.org) Message-Id: <201002040040.o140eCmn055952@svn.freebsd.org> From: Matt Jacob Date: Thu, 4 Feb 2010 00:40:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203463 - head/sys/dev/isp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2010 00:40:12 -0000 Author: mjacob Date: Thu Feb 4 00:40:12 2010 New Revision: 203463 URL: http://svn.freebsd.org/changeset/base/203463 Log: Fix target mode compilation problem with previous delta Modified: head/sys/dev/isp/isp_library.c Modified: head/sys/dev/isp/isp_library.c ============================================================================== --- head/sys/dev/isp/isp_library.c Thu Feb 4 00:11:34 2010 (r203462) +++ head/sys/dev/isp/isp_library.c Thu Feb 4 00:40:12 2010 (r203463) @@ -668,7 +668,7 @@ isp_clear_commands(ispsoftc_t *isp) ctio->ct_header.rqs_entry_type = RQSTYPE_CTIO2; } else { ct_entry_t *ctio = (ct_entry_t *) local; - ctio->ct_syshandle = handle & 0xffff; + ctio->ct_syshandle = hdp->handle & 0xffff; ctio->ct_status = CT_HBA_RESET & 0xff; ctio->ct_header.rqs_entry_type = RQSTYPE_CTIO; } @@ -2275,7 +2275,7 @@ isp_find_tgt_handle(ispsoftc_t *isp, voi void isp_destroy_tgt_handle(ispsoftc_t *isp, uint32_t handle) { - if (!ISP_VALID_TGT_HANDLE(handle)) { + if (!ISP_VALID_TGT_HANDLE(isp, handle)) { isp_prt(isp, ISP_LOGERR, "%s: bad handle 0x%x", __func__, handle); } else { isp->isp_tgtlist[(handle & ISP_HANDLE_CMD_MASK)].handle = ISP_HANDLE_FREE; From owner-svn-src-all@FreeBSD.ORG Thu Feb 4 03:28:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6BD141065672; Thu, 4 Feb 2010 03:28:19 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4264B8FC21; Thu, 4 Feb 2010 03:28:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o143SJRt093343; Thu, 4 Feb 2010 03:28:19 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o143SJRj093341; Thu, 4 Feb 2010 03:28:19 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201002040328.o143SJRj093341@svn.freebsd.org> From: Warner Losh Date: Thu, 4 Feb 2010 03:28:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203471 - svnadmin/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2010 03:28:19 -0000 Author: imp Date: Thu Feb 4 03:28:18 2010 New Revision: 203471 URL: http://svn.freebsd.org/changeset/base/203471 Log: Remko Lodder long ago should have been moved out of here... Correct the oversight and set him free. Modified: svnadmin/conf/mentors Modified: svnadmin/conf/mentors ============================================================================== --- svnadmin/conf/mentors Thu Feb 4 03:19:32 2010 (r203470) +++ svnadmin/conf/mentors Thu Feb 4 03:28:18 2010 (r203471) @@ -21,7 +21,6 @@ lstewart gnn neel imp nork imp rdivacky ed -remko imp sbruno scottl snb dwmalone sson gnn From owner-svn-src-all@FreeBSD.ORG Thu Feb 4 03:30:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C623106566C; Thu, 4 Feb 2010 03:30:32 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 42D6C8FC16; Thu, 4 Feb 2010 03:30:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o143UWHc093871; Thu, 4 Feb 2010 03:30:32 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o143UWvH093869; Thu, 4 Feb 2010 03:30:32 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201002040330.o143UWvH093869@svn.freebsd.org> From: Warner Losh Date: Thu, 4 Feb 2010 03:30:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203472 - svnadmin/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2010 03:30:32 -0000 Author: imp Date: Thu Feb 4 03:30:31 2010 New Revision: 203472 URL: http://svn.freebsd.org/changeset/base/203472 Log: Neel Natu is ready to move on to the next stage of being a FreeBSD committer... Modified: svnadmin/conf/mentors Modified: svnadmin/conf/mentors ============================================================================== --- svnadmin/conf/mentors Thu Feb 4 03:28:18 2010 (r203471) +++ svnadmin/conf/mentors Thu Feb 4 03:30:31 2010 (r203472) @@ -18,7 +18,6 @@ gabor delphij jh trasz Co-mentor: rwatson jinmei gnn lstewart gnn -neel imp nork imp rdivacky ed sbruno scottl From owner-svn-src-all@FreeBSD.ORG Thu Feb 4 05:09:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 672B7106566C for ; Thu, 4 Feb 2010 05:09:07 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from forward12.mail.yandex.net (forward12.mail.yandex.net [95.108.130.94]) by mx1.freebsd.org (Postfix) with ESMTP id 182EC8FC16 for ; Thu, 4 Feb 2010 05:09:07 +0000 (UTC) Received: from smtp2.mail.yandex.net (smtp2.mail.yandex.net [77.88.46.102]) by forward12.mail.yandex.net (Yandex) with ESMTP id 5424815D0F31; Thu, 4 Feb 2010 07:48:02 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1265258882; bh=1MIHBj122DeB2JthuxMTw1KVtcZXK6iLLU9PXzhw6bU=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=iUI56ylB+mKBWx/MuKnJ40YyKfSO0CbgLJGfDP3NTPiklzj5FeIgWz6ZCWuQsAjp7 t9FwWs5NwwVotbLHmsvpNqe+5ouDGbMB0+Cf3yKxmUPLmqBsFgGt1MaZclhyTb1fpj xiv1uqMZp+qnk8Z8Tq1O6SPIOvvKt+7oxlxiG3qM= Received: from [127.0.0.1] (ns.kirov.so-ups.ru [77.72.136.145]) by smtp2.mail.yandex.net (Yandex) with ESMTPSA id 13452D18215; Thu, 4 Feb 2010 07:48:02 +0300 (MSK) Message-ID: <4B6A5182.7000907@yandex.ru> Date: Thu, 04 Feb 2010 07:48:02 +0300 From: "Andrey V. Elsukov" User-Agent: Mozilla Thunderbird 1.5 (FreeBSD/20051231) MIME-Version: 1.0 To: Alexander Motin References: <201002031200.o13C0vPG087449@svn.freebsd.org> In-Reply-To: <201002031200.o13C0vPG087449@svn.freebsd.org> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit X-Yandex-TimeMark: 1265258882 X-Yandex-Spam: 1 X-Yandex-Front: smtp2.mail.yandex.net Cc: svn-src-all@freebsd.org Subject: Re: svn commit: r203426 - head/sys/dev/ahci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2010 05:09:07 -0000 On 03.02.2010 15:00, Alexander Motin wrote: > Log: > Disable PHY of unconnected ports when interface power management enabled. > It allows to save a bit more power (about 0.5W on 2 unused ports of ICH8M). Hi, Alexander. Is there a way to manually enable it? -- WBR, Andrey V. Elsukov From owner-svn-src-all@FreeBSD.ORG Thu Feb 4 05:25:59 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 805E31065670; Thu, 4 Feb 2010 05:25:59 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 70AEB8FC08; Thu, 4 Feb 2010 05:25:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o145PxiV020635; Thu, 4 Feb 2010 05:25:59 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o145PxOe020633; Thu, 4 Feb 2010 05:25:59 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201002040525.o145PxOe020633@svn.freebsd.org> From: Neel Natu Date: Thu, 4 Feb 2010 05:25:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203474 - head/sys/mips/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2010 05:25:59 -0000 Author: neel Date: Thu Feb 4 05:25:59 2010 New Revision: 203474 URL: http://svn.freebsd.org/changeset/base/203474 Log: Clean up all places in exception.S that fiddle with 'pcpup' directly. We now use the GET_CPU_PCPU() macro exclusively. This isolates the users of pcpu data from its implementation details. Reviewed by: imp Modified: head/sys/mips/mips/exception.S Modified: head/sys/mips/mips/exception.S ============================================================================== --- head/sys/mips/mips/exception.S Thu Feb 4 05:07:20 2010 (r203473) +++ head/sys/mips/mips/exception.S Thu Feb 4 05:25:59 2010 (r203474) @@ -146,19 +146,10 @@ VECTOR_END(MipsTLBMiss) *---------------------------------------------------------------------------- */ MipsDoTLBMiss: -#xxx mips64 unsafe? -#ifndef SMP - lui k1, %hi(_C_LABEL(pcpup)) -#endif #k0 already has BadVA bltz k0, 1f #02: k0<0 -> 1f (kernel fault) srl k0, k0, SEGSHIFT - 2 #03: k0=seg offset (almost) -#xxx mips64 unsafe? -#ifdef SMP GET_CPU_PCPU(k1) -#else - lw k1, %lo(_C_LABEL(pcpup))(k1) -#endif lw k1, PC_SEGBASE(k1) beqz k1, 2f #05: make sure segbase is not null andi k0, k0, 0x7fc #06: k0=seg offset (mask 0x3) @@ -821,12 +812,7 @@ NLEAF(MipsKernTLBInvalidException) sltu k1, k0, k1 beqz k1, 1f nop -#ifdef SMP GET_CPU_PCPU(k1) -#else - lui k1, %hi(_C_LABEL(pcpup)) - lw k1, %lo(_C_LABEL(pcpup))(k1) -#endif lw k1, PC_SEGBASE(k1) # works for single cpu???? beqz k1, _C_LABEL(MipsKernGenException) # seg tab is null nop @@ -917,13 +903,7 @@ NLEAF(MipsUserTLBInvalidException) sltu k1, k0, k1 beqz k1, _C_LABEL(MipsUserGenException) nop -#xxx mips64 unsafe? -#ifdef SMP GET_CPU_PCPU(k1) -#else - lui k1, %hi(_C_LABEL(pcpup)) - lw k1, %lo(_C_LABEL(pcpup))(k1) -#endif lw k1, PC_SEGBASE(k1) # works for single cpu???? beqz k1, _C_LABEL(MipsUserGenException) # seg tab is null nop From owner-svn-src-all@FreeBSD.ORG Thu Feb 4 05:50:00 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 062FC106566B; Thu, 4 Feb 2010 05:49:59 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B42EB8FC1A; Thu, 4 Feb 2010 05:49:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o145nxwK025868; Thu, 4 Feb 2010 05:49:59 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o145nxvd025866; Thu, 4 Feb 2010 05:49:59 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201002040549.o145nxvd025866@svn.freebsd.org> From: Neel Natu Date: Thu, 4 Feb 2010 05:49:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203475 - head/lib/libc/mips/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2010 05:50:00 -0000 Author: neel Date: Thu Feb 4 05:49:59 2010 New Revision: 203475 URL: http://svn.freebsd.org/changeset/base/203475 Log: Reinstate the ptrace patch to restore the 'gp' register after calling a function. I made a mistake in assuming that the .cprestore directive will cause the assembler to automatically restore 'gp' after the 'jalr'. The .cprestore directive does its magic only after 'jal' and 'bal' instructions - not the 'jalr'. Pointed out by: c.jayachandran@gmail.com Modified: head/lib/libc/mips/sys/ptrace.S Modified: head/lib/libc/mips/sys/ptrace.S ============================================================================== --- head/lib/libc/mips/sys/ptrace.S Thu Feb 4 05:25:59 2010 (r203474) +++ head/lib/libc/mips/sys/ptrace.S Thu Feb 4 05:49:59 2010 (r203475) @@ -56,6 +56,9 @@ LEAF(ptrace) #endif la t9, _C_LABEL(__error) # locate address of errno jalr t9 +#ifdef __ABICALLS__ + lw gp, 16(sp) +#endif sw zero, 0(v0) lw ra, 32(sp) addu sp, sp, 40 From owner-svn-src-all@FreeBSD.ORG Thu Feb 4 06:42:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ED71F106566C; Thu, 4 Feb 2010 06:42:30 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DE3788FC12; Thu, 4 Feb 2010 06:42:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o146gUKr037417; Thu, 4 Feb 2010 06:42:30 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o146gUHa037415; Thu, 4 Feb 2010 06:42:30 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201002040642.o146gUHa037415@svn.freebsd.org> From: Neel Natu Date: Thu, 4 Feb 2010 06:42:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203476 - head/sys/mips/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2010 06:42:31 -0000 Author: neel Date: Thu Feb 4 06:42:30 2010 New Revision: 203476 URL: http://svn.freebsd.org/changeset/base/203476 Log: Get system call tracing using ktrace working for mips. Modified: head/sys/mips/mips/trap.c Modified: head/sys/mips/mips/trap.c ============================================================================== --- head/sys/mips/mips/trap.c Thu Feb 4 05:49:59 2010 (r203475) +++ head/sys/mips/mips/trap.c Thu Feb 4 06:42:30 2010 (r203476) @@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$"); #include "opt_ddb.h" #include "opt_global.h" +#include "opt_ktrace.h" #define NO_REG_DEFS 1 /* Prevent asm.h from including regdef.h */ #include @@ -747,7 +748,7 @@ dofault: td->td_locks)); userret(td, trapframe); #ifdef KTRACE - if (KTRPOINT(p, KTR_SYSRET)) + if (KTRPOINT(td, KTR_SYSRET)) ktrsysret(code, i, td->td_retval[0]); #endif /* From owner-svn-src-all@FreeBSD.ORG Thu Feb 4 06:44:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7F90F1065676; Thu, 4 Feb 2010 06:44:42 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5769F8FC19; Thu, 4 Feb 2010 06:44:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o146ig4K037957; Thu, 4 Feb 2010 06:44:42 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o146igwR037955; Thu, 4 Feb 2010 06:44:42 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201002040644.o146igwR037955@svn.freebsd.org> From: Neel Natu Date: Thu, 4 Feb 2010 06:44:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203477 - head/sys/mips/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2010 06:44:42 -0000 Author: neel Date: Thu Feb 4 06:44:42 2010 New Revision: 203477 URL: http://svn.freebsd.org/changeset/base/203477 Log: Compile SWARM with KTRACE support. Modified: head/sys/mips/conf/SWARM Modified: head/sys/mips/conf/SWARM ============================================================================== --- head/sys/mips/conf/SWARM Thu Feb 4 06:42:30 2010 (r203476) +++ head/sys/mips/conf/SWARM Thu Feb 4 06:44:42 2010 (r203477) @@ -56,6 +56,8 @@ options WITNESS options FFS #Fast filesystem +options KTRACE + device pci device miibus device bge From owner-svn-src-all@FreeBSD.ORG Thu Feb 4 06:45:14 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EE652106568D; Thu, 4 Feb 2010 06:45:14 +0000 (UTC) (envelope-from mjacob@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DF5788FC16; Thu, 4 Feb 2010 06:45:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o146jEJR038136; Thu, 4 Feb 2010 06:45:14 GMT (envelope-from mjacob@svn.freebsd.org) Received: (from mjacob@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o146jEhO038134; Thu, 4 Feb 2010 06:45:14 GMT (envelope-from mjacob@svn.freebsd.org) Message-Id: <201002040645.o146jEhO038134@svn.freebsd.org> From: Matt Jacob Date: Thu, 4 Feb 2010 06:45:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203478 - head/sys/dev/isp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2010 06:45:15 -0000 Author: mjacob Date: Thu Feb 4 06:45:14 2010 New Revision: 203478 URL: http://svn.freebsd.org/changeset/base/203478 Log: Yet another target mode compilation error. Modified: head/sys/dev/isp/isp_library.c Modified: head/sys/dev/isp/isp_library.c ============================================================================== --- head/sys/dev/isp/isp_library.c Thu Feb 4 06:44:42 2010 (r203477) +++ head/sys/dev/isp/isp_library.c Thu Feb 4 06:45:14 2010 (r203478) @@ -650,7 +650,7 @@ isp_clear_commands(ispsoftc_t *isp) #ifdef ISP_TARGET_MODE for (tmp = 0; isp->isp_tgtlist && tmp < isp->isp_maxcmds; tmp++) { uint8_t local[QENTRY_LEN]; - hdp = &isp->isp_tgt_xflist[tmp]; + hdp = &isp->isp_tgtlist[tmp]; if (hdp->handle == ISP_HANDLE_FREE) { continue; } From owner-svn-src-all@FreeBSD.ORG Thu Feb 4 07:08:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3D8831065672; Thu, 4 Feb 2010 07:08:07 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2E5D28FC16; Thu, 4 Feb 2010 07:08:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o14787Gc043171; Thu, 4 Feb 2010 07:08:07 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o14787P4043168; Thu, 4 Feb 2010 07:08:07 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201002040708.o14787P4043168@svn.freebsd.org> From: Warner Losh Date: Thu, 4 Feb 2010 07:08:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203479 - head/games/morse X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2010 07:08:07 -0000 Author: imp Date: Thu Feb 4 07:08:06 2010 New Revision: 203479 URL: http://svn.freebsd.org/changeset/base/203479 Log: Always compile in the speaker code. There's little savings by omitting it, and other platforms may implement /dev/speaker in the future. Modified: head/games/morse/Makefile head/games/morse/morse.c Modified: head/games/morse/Makefile ============================================================================== --- head/games/morse/Makefile Thu Feb 4 06:45:14 2010 (r203478) +++ head/games/morse/Makefile Thu Feb 4 07:08:06 2010 (r203479) @@ -4,8 +4,4 @@ PROG= morse MAN= morse.6 -.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64" -CFLAGS += -DSPEAKER=\"/dev/speaker\" -.endif - .include Modified: head/games/morse/morse.c ============================================================================== --- head/games/morse/morse.c Thu Feb 4 06:45:14 2010 (r203478) +++ head/games/morse/morse.c Thu Feb 4 07:08:06 2010 (r203479) @@ -63,6 +63,9 @@ static const char rcsid[] = #include #include +/* Always use the speaker, let the open fail if -p is selected */ +#define SPEAKER "/dev/speaker" + #ifdef SPEAKER #include #endif From owner-svn-src-all@FreeBSD.ORG Thu Feb 4 07:18:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BF36E106566C; Thu, 4 Feb 2010 07:18:19 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B03168FC1D; Thu, 4 Feb 2010 07:18:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o147IJZ5045422; Thu, 4 Feb 2010 07:18:19 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o147IJkt045420; Thu, 4 Feb 2010 07:18:19 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201002040718.o147IJkt045420@svn.freebsd.org> From: Warner Losh Date: Thu, 4 Feb 2010 07:18:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203480 - head/bin/pax X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2010 07:18:19 -0000 Author: imp Date: Thu Feb 4 07:18:19 2010 New Revision: 203480 URL: http://svn.freebsd.org/changeset/base/203480 Log: Arm doesn't seem to need such kit gloves. Bump the warnings to 3 here as well. Modified: head/bin/pax/Makefile Modified: head/bin/pax/Makefile ============================================================================== --- head/bin/pax/Makefile Thu Feb 4 07:08:06 2010 (r203479) +++ head/bin/pax/Makefile Thu Feb 4 07:18:19 2010 (r203480) @@ -33,8 +33,6 @@ SRCS= ar_io.c ar_subs.c buf_subs.c cache #MAN= pax.1 tar.1 cpio.1 #LINKS= ${BINDIR}/pax ${BINDIR}/tar ${BINDIR}/pax ${BINDIR}/cpio -.if ${MACHINE_ARCH} == "arm" WARNS?= 3 -.endif .include From owner-svn-src-all@FreeBSD.ORG Thu Feb 4 07:23:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6330D1065670 for ; Thu, 4 Feb 2010 07:23:20 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-fx0-f224.google.com (mail-fx0-f224.google.com [209.85.220.224]) by mx1.freebsd.org (Postfix) with ESMTP id E5D108FC18 for ; Thu, 4 Feb 2010 07:23:19 +0000 (UTC) Received: by fxm24 with SMTP id 24so434496fxm.3 for ; Wed, 03 Feb 2010 23:23:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=k3iyzGn5+Bsjl7LWR2ZwRjuhWY2e4dXf7FknuZOlvuk=; b=q/uK73P3DWP2018UUqqRdnt3JcDMyrhTNUdhPNm++fciUg5WN74xBjZbQ8Krf6hFPt akytu57Q6kLM9dX+AyanHwoEiInOgW/iqSIqRyDXKGq7ltK8qHWl1CpPAHyLbBLBtHAz xsNmhsm0idFayfUhl0A4rovobSKk87kcOzuM0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=UeWr2n6HoGbPDn5vHLu+yXc5f4dpHdKv0g0ZqmVBiqjspBUHTvrU24ym6qzHP7q2A6 u7C2L2QLl6kMnnzn3l5s1bxxis2Tg3Pn6a4hkPpzGnSwR7cUHx7RC+BZ89vJOalXngXE b2uXYoa24QtMFy80DyFaO0EwKcf9mwT1EnjmE= Received: by 10.87.38.5 with SMTP id q5mr1523177fgj.45.1265268198763; Wed, 03 Feb 2010 23:23:18 -0800 (PST) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id 14sm3599240fxm.15.2010.02.03.23.23.17 (version=SSLv3 cipher=RC4-MD5); Wed, 03 Feb 2010 23:23:18 -0800 (PST) Sender: Alexander Motin Message-ID: <4B6A75E2.8060404@FreeBSD.org> Date: Thu, 04 Feb 2010 09:23:14 +0200 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: "Andrey V. Elsukov" References: <201002031200.o13C0vPG087449@svn.freebsd.org> <4B6A5182.7000907@yandex.ru> In-Reply-To: <4B6A5182.7000907@yandex.ru> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit Cc: svn-src-all@freebsd.org Subject: Re: svn commit: r203426 - head/sys/dev/ahci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2010 07:23:20 -0000 Hi. Andrey V. Elsukov wrote: > On 03.02.2010 15:00, Alexander Motin wrote: >> Log: >> Disable PHY of unconnected ports when interface power management >> enabled. >> It allows to save a bit more power (about 0.5W on 2 unused ports of >> ICH8M). > > Is there a way to manually enable it? You mean enable port back? You can do `camcontrol reset X` manually. It will enable port, probe for device, and if there still none - disable it again. If device was found - port will stay enabled, according to selected pm_level value. -- Alexander Motin From owner-svn-src-all@FreeBSD.ORG Thu Feb 4 07:26:26 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BE9F31065676; Thu, 4 Feb 2010 07:26:26 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AF4108FC23; Thu, 4 Feb 2010 07:26:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o147QQWV047297; Thu, 4 Feb 2010 07:26:26 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o147QQ4R047294; Thu, 4 Feb 2010 07:26:26 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201002040726.o147QQ4R047294@svn.freebsd.org> From: Warner Losh Date: Thu, 4 Feb 2010 07:26:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203482 - head/usr.sbin/powerd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2010 07:26:26 -0000 Author: imp Date: Thu Feb 4 07:26:26 2010 New Revision: 203482 URL: http://svn.freebsd.org/changeset/base/203482 Log: Since APM is a legacy technology, that won't be adapted to other platforms, move the test for i386 from the Makefile to powerd.c. The powerpc specific checks are already done this way... Modified: head/usr.sbin/powerd/Makefile head/usr.sbin/powerd/powerd.c Modified: head/usr.sbin/powerd/Makefile ============================================================================== --- head/usr.sbin/powerd/Makefile Thu Feb 4 07:24:13 2010 (r203481) +++ head/usr.sbin/powerd/Makefile Thu Feb 4 07:26:26 2010 (r203482) @@ -6,8 +6,4 @@ MAN= powerd.8 DPADD= ${LIBUTIL} LDADD= -lutil -.if ${MACHINE_ARCH} == "i386" -CFLAGS+=-DUSE_APM -.endif - .include Modified: head/usr.sbin/powerd/powerd.c ============================================================================== --- head/usr.sbin/powerd/powerd.c Thu Feb 4 07:24:13 2010 (r203481) +++ head/usr.sbin/powerd/powerd.c Thu Feb 4 07:26:26 2010 (r203482) @@ -46,6 +46,10 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef __i386__ +#define USE_APM +#endif + #ifdef USE_APM #include #endif From owner-svn-src-all@FreeBSD.ORG Thu Feb 4 07:55:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC6391065676; Thu, 4 Feb 2010 07:55:42 +0000 (UTC) (envelope-from zec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BCCCD8FC08; Thu, 4 Feb 2010 07:55:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o147tg8p053776; Thu, 4 Feb 2010 07:55:42 GMT (envelope-from zec@svn.freebsd.org) Received: (from zec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o147tgXS053773; Thu, 4 Feb 2010 07:55:42 GMT (envelope-from zec@svn.freebsd.org) Message-Id: <201002040755.o147tgXS053773@svn.freebsd.org> From: Marko Zec Date: Thu, 4 Feb 2010 07:55:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203483 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2010 07:55:43 -0000 Author: zec Date: Thu Feb 4 07:55:42 2010 New Revision: 203483 URL: http://svn.freebsd.org/changeset/base/203483 Log: Instead of spamming the console on each curvnet recursion event, print out each such call graph only once, along with a stack backtrace. This should make kernels built with VNET_DEBUG reasonably usable again in busy / production environments. Introduce a new DDB command "show vnetrcrs" which dumps the whole log of distinctive curvnet recursion events. This might be useful when recursion reports get burried / lost too deep in the message buffer. In the later case stack backtraces are not available. Reviewed by: bz MFC after: 3 days Modified: head/sys/net/vnet.c head/sys/net/vnet.h Modified: head/sys/net/vnet.c ============================================================================== --- head/sys/net/vnet.c Thu Feb 4 07:26:26 2010 (r203482) +++ head/sys/net/vnet.c Thu Feb 4 07:55:42 2010 (r203483) @@ -37,8 +37,10 @@ __FBSDID("$FreeBSD$"); #include "opt_ddb.h" +#include "opt_kdb.h" #include +#include #include #include #include @@ -616,6 +618,65 @@ vnet_sysuninit(void) VNET_SYSINIT_RUNLOCK(); } +#ifdef VNET_DEBUG +struct vnet_recursion { + SLIST_ENTRY(vnet_recursion) vnr_le; + const char *prev_fn; + const char *where_fn; + int where_line; + struct vnet *old_vnet; + struct vnet *new_vnet; +}; + +static SLIST_HEAD(, vnet_recursion) vnet_recursions = + SLIST_HEAD_INITIALIZER(vnet_recursions); + +static void +vnet_print_recursion(struct vnet_recursion *vnr, int brief) +{ + + if (!brief) + printf("CURVNET_SET() recursion in "); + printf("%s() line %d, prev in %s()", vnr->where_fn, vnr->where_line, + vnr->prev_fn); + if (brief) + printf(", "); + else + printf("\n "); + printf("%p -> %p\n", vnr->old_vnet, vnr->new_vnet); +} + +void +vnet_log_recursion(struct vnet *old_vnet, const char *old_fn, int line) +{ + struct vnet_recursion *vnr; + + /* Skip already logged recursion events. */ + SLIST_FOREACH(vnr, &vnet_recursions, vnr_le) + if (vnr->prev_fn == old_fn && + vnr->where_fn == curthread->td_vnet_lpush && + vnr->where_line == line && + (vnr->old_vnet == vnr->new_vnet) == (curvnet == old_vnet)) + return; + + vnr = malloc(sizeof(*vnr), M_VNET, M_NOWAIT | M_ZERO); + if (vnr == NULL) + panic("%s: malloc failed", __func__); + vnr->prev_fn = old_fn; + vnr->where_fn = curthread->td_vnet_lpush; + vnr->where_line = line; + vnr->old_vnet = old_vnet; + vnr->new_vnet = curvnet; + + SLIST_INSERT_HEAD(&vnet_recursions, vnr, vnr_le); + + vnet_print_recursion(vnr, 0); +#ifdef KDB + kdb_backtrace(); +#endif +} +#endif /* VNET_DEBUG */ + #ifdef DDB DB_SHOW_COMMAND(vnets, db_show_vnets) { @@ -637,4 +698,14 @@ DB_SHOW_COMMAND(vnets, db_show_vnets) break; } } + +#ifdef VNET_DEBUG +DB_SHOW_COMMAND(vnetrcrs, db_show_vnetrcrs) +{ + struct vnet_recursion *vnr; + + SLIST_FOREACH(vnr, &vnet_recursions, vnr_le) + vnet_print_recursion(vnr, 1); +} #endif +#endif /* DDB */ Modified: head/sys/net/vnet.h ============================================================================== --- head/sys/net/vnet.h Thu Feb 4 07:26:26 2010 (r203482) +++ head/sys/net/vnet.h Thu Feb 4 07:55:42 2010 (r203483) @@ -108,6 +108,8 @@ void vnet_destroy(struct vnet *vnet); * assertions. */ #ifdef VNET_DEBUG +void vnet_log_recursion(struct vnet *, const char *, int); + #define VNET_ASSERT(condition) \ if (!(condition)) { \ printf("VNET_ASSERT @ %s:%d %s():\n", \ @@ -125,9 +127,7 @@ void vnet_destroy(struct vnet *vnet); #define CURVNET_SET_VERBOSE(arg) \ CURVNET_SET_QUIET(arg) \ if (saved_vnet) \ - printf("CURVNET_SET(%p) in %s() on cpu %d, prev %p in %s()\n", \ - curvnet, curthread->td_vnet_lpush, curcpu, \ - saved_vnet, saved_vnet_lpush); + vnet_log_recursion(saved_vnet, saved_vnet_lpush, __LINE__); #define CURVNET_SET(arg) CURVNET_SET_VERBOSE(arg) From owner-svn-src-all@FreeBSD.ORG Thu Feb 4 08:54:16 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0C7BF106566B; Thu, 4 Feb 2010 08:54:16 +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 F0CDA8FC0A; Thu, 4 Feb 2010 08:54:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o148sEqJ066695; Thu, 4 Feb 2010 08:54:14 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o148sES7066692; Thu, 4 Feb 2010 08:54:14 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201002040854.o148sES7066692@svn.freebsd.org> From: Alexander Motin Date: Thu, 4 Feb 2010 08:54:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203484 - head/sys/dev/mpt X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2010 08:54:16 -0000 Author: mav Date: Thu Feb 4 08:54:14 2010 New Revision: 203484 URL: http://svn.freebsd.org/changeset/base/203484 Log: Do not release device, when changing number of openings. Modified: head/sys/dev/mpt/mpt_cam.c head/sys/dev/mpt/mpt_raid.c Modified: head/sys/dev/mpt/mpt_cam.c ============================================================================== --- head/sys/dev/mpt/mpt_cam.c Thu Feb 4 07:55:42 2010 (r203483) +++ head/sys/dev/mpt/mpt_cam.c Thu Feb 4 08:54:14 2010 (r203484) @@ -2558,6 +2558,7 @@ mpt_cam_event(struct mpt_softc *mpt, req } xpt_setup_ccb(&crs.ccb_h, tmppath, 5); crs.ccb_h.func_code = XPT_REL_SIMQ; + crs.ccb_h.flags = CAM_DEV_QFREEZE; crs.release_flags = RELSIM_ADJUST_OPENINGS; crs.openings = pqf->CurrentDepth - 1; xpt_action((union ccb *)&crs); Modified: head/sys/dev/mpt/mpt_raid.c ============================================================================== --- head/sys/dev/mpt/mpt_raid.c Thu Feb 4 07:55:42 2010 (r203483) +++ head/sys/dev/mpt/mpt_raid.c Thu Feb 4 08:54:14 2010 (r203484) @@ -1047,6 +1047,7 @@ mpt_adjust_queue_depth(struct mpt_softc xpt_setup_ccb(&crs.ccb_h, path, /*priority*/5); crs.ccb_h.func_code = XPT_REL_SIMQ; + crs.ccb_h.flags = CAM_DEV_QFREEZE; crs.release_flags = RELSIM_ADJUST_OPENINGS; crs.openings = mpt->raid_queue_depth; xpt_action((union ccb *)&crs); From owner-svn-src-all@FreeBSD.ORG Thu Feb 4 11:23:28 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DCB6B106566C; Thu, 4 Feb 2010 11:23:28 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B1CC48FC15; Thu, 4 Feb 2010 11:23:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o14BNSed001791; Thu, 4 Feb 2010 11:23:28 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o14BNSH0001786; Thu, 4 Feb 2010 11:23:28 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201002041123.o14BNSH0001786@svn.freebsd.org> From: Ruslan Ermilov Date: Thu, 4 Feb 2010 11:23:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203485 - head/lib/libc/string X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2010 11:23:29 -0000 Author: ru Date: Thu Feb 4 11:23:28 2010 New Revision: 203485 URL: http://svn.freebsd.org/changeset/base/203485 Log: Mark up "unsigned char". Modified: head/lib/libc/string/memccpy.3 head/lib/libc/string/memchr.3 head/lib/libc/string/memcmp.3 head/lib/libc/string/memset.3 Modified: head/lib/libc/string/memccpy.3 ============================================================================== --- head/lib/libc/string/memccpy.3 Thu Feb 4 08:54:14 2010 (r203484) +++ head/lib/libc/string/memccpy.3 Thu Feb 4 11:23:28 2010 (r203485) @@ -50,7 +50,9 @@ to string .Fa dst . If the character .Fa c -(as converted to an unsigned char) occurs in the string +(as converted to an +.Vt "unsigned char" ) +occurs in the string .Fa src , the copy stops and a pointer to the byte after the copy of .Fa c Modified: head/lib/libc/string/memchr.3 ============================================================================== --- head/lib/libc/string/memchr.3 Thu Feb 4 08:54:14 2010 (r203484) +++ head/lib/libc/string/memchr.3 Thu Feb 4 11:23:28 2010 (r203485) @@ -52,7 +52,8 @@ The function locates the first occurrence of .Fa c -(converted to an unsigned char) +(converted to an +.Vt "unsigned char" ) in string .Fa b . .Pp Modified: head/lib/libc/string/memcmp.3 ============================================================================== --- head/lib/libc/string/memcmp.3 Thu Feb 4 08:54:14 2010 (r203484) +++ head/lib/libc/string/memcmp.3 Thu Feb 4 11:23:28 2010 (r203485) @@ -61,7 +61,9 @@ The function returns zero if the two strings are identical, otherwise returns the difference between the first two differing bytes -(treated as unsigned char values, so that +(treated as +.Vt "unsigned char" +values, so that .Sq Li \e200 is greater than .Sq Li \&\e0 , Modified: head/lib/libc/string/memset.3 ============================================================================== --- head/lib/libc/string/memset.3 Thu Feb 4 08:54:14 2010 (r203484) +++ head/lib/libc/string/memset.3 Thu Feb 4 11:23:28 2010 (r203485) @@ -52,7 +52,9 @@ writes .Fa len bytes of value .Fa c -(converted to an unsigned char) to the string +(converted to an +.Vt "unsigned char" ) +to the string .Fa b . .Sh RETURN VALUES The From owner-svn-src-all@FreeBSD.ORG Thu Feb 4 11:43:22 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C4E00106566C; Thu, 4 Feb 2010 11:43:22 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B339D8FC22; Thu, 4 Feb 2010 11:43:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o14BhMbX006185; Thu, 4 Feb 2010 11:43:22 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o14BhMOn006183; Thu, 4 Feb 2010 11:43:22 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201002041143.o14BhMOn006183@svn.freebsd.org> From: Ruslan Ermilov Date: Thu, 4 Feb 2010 11:43:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203486 - head/sbin/ifconfig X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2010 11:43:22 -0000 Author: ru Date: Thu Feb 4 11:43:22 2010 New Revision: 203486 URL: http://svn.freebsd.org/changeset/base/203486 Log: Shortening a passphrase caused wrong authentication key to be used. Fix this in a FreeBSD and OpenBSD compatible way. MFC after: 3 days Modified: head/sbin/ifconfig/ifcarp.c Modified: head/sbin/ifconfig/ifcarp.c ============================================================================== --- head/sbin/ifconfig/ifcarp.c Thu Feb 4 11:23:28 2010 (r203485) +++ head/sbin/ifconfig/ifcarp.c Thu Feb 4 11:43:22 2010 (r203486) @@ -96,6 +96,7 @@ setcarp_passwd(const char *val, int d, i if (ioctl(s, SIOCGVH, (caddr_t)&ifr) == -1) err(1, "SIOCGVH"); + memset(carpr.carpr_key, 0, sizeof(carpr.carpr_key)); /* XXX Should hash the password into the key here, perhaps? */ strlcpy(carpr.carpr_key, val, CARP_KEY_LEN); From owner-svn-src-all@FreeBSD.ORG Thu Feb 4 12:50:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6BE51106566C; Thu, 4 Feb 2010 12:50:24 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4186F8FC0A; Thu, 4 Feb 2010 12:50:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o14CoOp4020873; Thu, 4 Feb 2010 12:50:24 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o14CoOtA020871; Thu, 4 Feb 2010 12:50:24 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201002041250.o14CoOtA020871@svn.freebsd.org> From: Edward Tomasz Napierala Date: Thu, 4 Feb 2010 12:50:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203487 - svnadmin/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2010 12:50:24 -0000 Author: trasz Date: Thu Feb 4 12:50:23 2010 New Revision: 203487 URL: http://svn.freebsd.org/changeset/base/203487 Log: Jaakko Heinonen (jh@) is ready to fly solo. Modified: svnadmin/conf/mentors Modified: svnadmin/conf/mentors ============================================================================== --- svnadmin/conf/mentors Thu Feb 4 11:43:22 2010 (r203486) +++ svnadmin/conf/mentors Thu Feb 4 12:50:23 2010 (r203487) @@ -15,7 +15,6 @@ cbzimmer sam dchagin kib eri mlaier Co-mentor: thompsa gabor delphij -jh trasz Co-mentor: rwatson jinmei gnn lstewart gnn nork imp From owner-svn-src-all@FreeBSD.ORG Thu Feb 4 14:40:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 346691065679; Thu, 4 Feb 2010 14:40:09 +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 085188FC13; Thu, 4 Feb 2010 14:40:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o14Ee8I9044989; Thu, 4 Feb 2010 14:40:08 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o14Ee887044987; Thu, 4 Feb 2010 14:40:08 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201002041440.o14Ee887044987@svn.freebsd.org> From: Alexander Motin Date: Thu, 4 Feb 2010 14:40:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203489 - head/sys/dev/ciss X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2010 14:40:09 -0000 Author: mav Date: Thu Feb 4 14:40:08 2010 New Revision: 203489 URL: http://svn.freebsd.org/changeset/base/203489 Log: Return CAM_RELEASE_SIMQ flag only when it is needed, when SIM really was frozen before and should be released. Modified: head/sys/dev/ciss/ciss.c Modified: head/sys/dev/ciss/ciss.c ============================================================================== --- head/sys/dev/ciss/ciss.c Thu Feb 4 14:11:15 2010 (r203488) +++ head/sys/dev/ciss/ciss.c Thu Feb 4 14:40:08 2010 (r203489) @@ -3065,6 +3065,7 @@ ciss_cam_action_io(struct cam_sim *sim, */ if ((error = ciss_get_request(sc, &cr)) != 0) { xpt_freeze_simq(sim, 1); + csio->ccb_h.status |= CAM_RELEASE_SIMQ; csio->ccb_h.status |= CAM_REQUEUE_REQ; return(error); } @@ -3116,8 +3117,8 @@ ciss_cam_action_io(struct cam_sim *sim, */ if ((error = ciss_start(cr)) != 0) { xpt_freeze_simq(sim, 1); + csio->ccb_h.status |= CAM_RELEASE_SIMQ; if (error == EINPROGRESS) { - csio->ccb_h.status |= CAM_RELEASE_SIMQ; error = 0; } else { csio->ccb_h.status |= CAM_REQUEUE_REQ; @@ -3145,7 +3146,7 @@ ciss_cam_emulate(struct ciss_softc *sc, if (CISS_IS_PHYSICAL(bus)) { if (sc->ciss_physical[CISS_CAM_TO_PBUS(bus)][target].cp_online != 1) { - csio->ccb_h.status = CAM_SEL_TIMEOUT; + csio->ccb_h.status |= CAM_SEL_TIMEOUT; xpt_done((union ccb *)csio); return(1); } else @@ -3158,7 +3159,7 @@ ciss_cam_emulate(struct ciss_softc *sc, * Other errors might be better. */ if (sc->ciss_logical[bus][target].cl_status != CISS_LD_ONLINE) { - csio->ccb_h.status = CAM_SEL_TIMEOUT; + csio->ccb_h.status |= CAM_SEL_TIMEOUT; xpt_done((union ccb *)csio); return(1); } @@ -3172,7 +3173,7 @@ ciss_cam_emulate(struct ciss_softc *sc, if (((csio->ccb_h.flags & CAM_CDB_POINTER) ? *(u_int8_t *)csio->cdb_io.cdb_ptr : csio->cdb_io.cdb_bytes[0]) == SYNCHRONIZE_CACHE) { ciss_flush_adapter(sc); - csio->ccb_h.status = CAM_REQ_CMP; + csio->ccb_h.status |= CAM_REQ_CMP; xpt_done((union ccb *)csio); return(1); } @@ -3233,13 +3234,13 @@ ciss_cam_complete(struct ciss_request *c /* no status due to adapter error */ case -1: debug(0, "adapter error"); - csio->ccb_h.status = CAM_REQ_CMP_ERR; + csio->ccb_h.status |= CAM_REQ_CMP_ERR; break; /* no status due to command completed OK */ case SCSI_STATUS_OK: /* CISS_SCSI_STATUS_GOOD */ debug(2, "SCSI_STATUS_OK"); - csio->ccb_h.status = CAM_REQ_CMP; + csio->ccb_h.status |= CAM_REQ_CMP; break; /* check condition, sense data included */ @@ -3250,7 +3251,7 @@ ciss_cam_complete(struct ciss_request *c bcopy(&ce->sense_info[0], &csio->sense_data, ce->sense_length); csio->sense_len = ce->sense_length; csio->resid = ce->residual_count; - csio->ccb_h.status = CAM_SCSI_STATUS_ERROR | CAM_AUTOSNS_VALID; + csio->ccb_h.status |= CAM_SCSI_STATUS_ERROR | CAM_AUTOSNS_VALID; #ifdef CISS_DEBUG { struct scsi_sense_data *sns = (struct scsi_sense_data *)&ce->sense_info[0]; @@ -3261,21 +3262,18 @@ ciss_cam_complete(struct ciss_request *c case SCSI_STATUS_BUSY: /* CISS_SCSI_STATUS_BUSY */ debug(0, "SCSI_STATUS_BUSY"); - csio->ccb_h.status = CAM_SCSI_BUSY; + csio->ccb_h.status |= CAM_SCSI_BUSY; break; default: debug(0, "unknown status 0x%x", csio->scsi_status); - csio->ccb_h.status = CAM_REQ_CMP_ERR; + csio->ccb_h.status |= CAM_REQ_CMP_ERR; break; } /* handle post-command fixup */ ciss_cam_complete_fixup(sc, csio); - /* tell CAM we're ready for more commands */ - csio->ccb_h.status |= CAM_RELEASE_SIMQ; - ciss_release_request(cr); xpt_done((union ccb *)csio); } From owner-svn-src-all@FreeBSD.ORG Thu Feb 4 15:17:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8C663106568D; Thu, 4 Feb 2010 15:17:49 +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 733628FC0C; Thu, 4 Feb 2010 15:17:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o14FHnCo053293; Thu, 4 Feb 2010 15:17:49 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o14FHnh9053290; Thu, 4 Feb 2010 15:17:49 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <201002041517.o14FHnh9053290@svn.freebsd.org> From: Hajimu UMEMOTO Date: Thu, 4 Feb 2010 15:17:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203490 - in head/sbin: mount_nfs umount X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2010 15:17:49 -0000 Author: ume Date: Thu Feb 4 15:17:49 2010 New Revision: 203490 URL: http://svn.freebsd.org/changeset/base/203490 Log: Introduce '[ipaddr]:path' notation. Since the existing implementation searches ':' backward, a path which includes ':' could not be mounted. You can now mount such path by enclosing an IP address by '[]'. Though we should change to search ':' forward, it will break 'ipv6addr:path' which is currently working. So, it still searches ':' backward, at least for now. MFC after: 2 weeks Modified: head/sbin/mount_nfs/mount_nfs.c head/sbin/umount/umount.c Modified: head/sbin/mount_nfs/mount_nfs.c ============================================================================== --- head/sbin/mount_nfs/mount_nfs.c Thu Feb 4 14:40:08 2010 (r203489) +++ head/sbin/mount_nfs/mount_nfs.c Thu Feb 4 15:17:49 2010 (r203490) @@ -697,12 +697,17 @@ getnfsargs(char *spec, struct iovec **io { struct addrinfo hints, *ai_nfs, *ai; enum tryret ret; - int ecode, speclen, remoteerr; + int ecode, speclen, remoteerr, offset, have_bracket = 0; char *hostp, *delimp, *errstr; size_t len; static char nam[MNAMELEN + 1], pname[MAXHOSTNAMELEN + 5]; - if ((delimp = strrchr(spec, ':')) != NULL) { + if (*spec == '[' && (delimp = strchr(spec + 1, ']')) != NULL && + *(delimp + 1) == ':') { + hostp = spec + 1; + spec = delimp + 2; + have_bracket = 1; + } else if ((delimp = strrchr(spec, ':')) != NULL) { hostp = spec; spec = delimp + 1; } else if ((delimp = strrchr(spec, '@')) != NULL) { @@ -730,10 +735,15 @@ getnfsargs(char *spec, struct iovec **io /* Make both '@' and ':' notations equal */ if (*hostp != '\0') { len = strlen(hostp); - memmove(nam, hostp, len); - nam[len] = ':'; - memmove(nam + len + 1, spec, speclen); - nam[len + speclen + 1] = '\0'; + offset = 0; + if (have_bracket) + nam[offset++] = '['; + memmove(nam + offset, hostp, len); + if (have_bracket) + nam[len + offset++] = ']'; + nam[len + offset++] = ':'; + memmove(nam + len + offset, spec, speclen); + nam[len + speclen + offset] = '\0'; } /* Modified: head/sbin/umount/umount.c ============================================================================== --- head/sbin/umount/umount.c Thu Feb 4 14:40:08 2010 (r203489) +++ head/sbin/umount/umount.c Thu Feb 4 15:17:49 2010 (r203490) @@ -325,14 +325,21 @@ umountfs(struct statfs *sfs) if ((nfsdirname = strdup(sfs->f_mntfromname)) == NULL) err(1, "strdup"); orignfsdirname = nfsdirname; - if ((delimp = strrchr(nfsdirname, ':')) != NULL) { - *delimp = '\0'; + if (*nfsdirname == '[' && + (delimp = strchr(nfsdirname + 1, ']')) != NULL && + *(delimp + 1) == ':') { + hostp = nfsdirname + 1; + nfsdirname = delimp + 2; + } else if ((delimp = strrchr(nfsdirname, ':')) != NULL) { hostp = nfsdirname; + nfsdirname = delimp + 1; + } + if (hostp != NULL) { + *delimp = '\0'; getaddrinfo(hostp, NULL, &hints, &ai); if (ai == NULL) { warnx("can't get net id for host"); } - nfsdirname = delimp + 1; } /* From owner-svn-src-all@FreeBSD.ORG Thu Feb 4 16:57:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD38C1065670; Thu, 4 Feb 2010 16:57:01 +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 AD0B18FC13; Thu, 4 Feb 2010 16:57:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o14Gv1ku075137; Thu, 4 Feb 2010 16:57:01 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o14Gv1Pj075132; Thu, 4 Feb 2010 16:57:01 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201002041657.o14Gv1Pj075132@svn.freebsd.org> From: Rick Macklem Date: Thu, 4 Feb 2010 16:57: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: r203492 - stable/8/sys/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2010 16:57:01 -0000 Author: rmacklem Date: Thu Feb 4 16:57:01 2010 New Revision: 203492 URL: http://svn.freebsd.org/changeset/base/203492 Log: MFC: r202767 Add a timeout for the negative name cache entries in the NFS client. This avoids a bogus negative name cache entry from persisting forever when another client creates an entry with the same name within the same NFS server time of day clock tick. The mount option negnametimeo can be used to override the default timeout interval on a per-mount-point basis. Setting negnametimeo to 0 disables negative name caching for the mount point. I also fixed one obvious typo where args.timeo should be args.maxgrouplist. Submitted by: jhb (earlier version) Reviewed by: jhb Modified: stable/8/sys/nfsclient/nfs_vfsops.c stable/8/sys/nfsclient/nfs_vnops.c stable/8/sys/nfsclient/nfsmount.h stable/8/sys/nfsclient/nfsnode.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/nfsclient/nfs_vfsops.c ============================================================================== --- stable/8/sys/nfsclient/nfs_vfsops.c Thu Feb 4 15:26:16 2010 (r203491) +++ stable/8/sys/nfsclient/nfs_vfsops.c Thu Feb 4 16:57:01 2010 (r203492) @@ -114,7 +114,7 @@ static void nfs_decode_args(struct mount struct nfs_args *argp, const char *hostname); static int mountnfs(struct nfs_args *, struct mount *, struct sockaddr *, char *, struct vnode **, - struct ucred *cred); + struct ucred *cred, int); static vfs_mount_t nfs_mount; static vfs_cmount_t nfs_cmount; static vfs_unmount_t nfs_unmount; @@ -551,7 +551,7 @@ nfs_mountdiskless(char *path, nam = sodupsockaddr((struct sockaddr *)sin, M_WAITOK); if ((error = mountnfs(args, mp, nam, path, vpp, - td->td_ucred)) != 0) { + td->td_ucred, NFS_DEFAULT_NEGNAMETIMEO)) != 0) { printf("nfs_mountroot: mount %s on /: %d\n", path, error); return (error); } @@ -778,7 +778,7 @@ static const char *nfs_opts[] = { "from" "readdirsize", "soft", "hard", "mntudp", "tcp", "udp", "wsize", "rsize", "retrans", "acregmin", "acregmax", "acdirmin", "acdirmax", "deadthresh", "hostname", "timeout", "addr", "fh", "nfsv3", "sec", - "maxgroups", "principal", + "maxgroups", "principal", "negnametimeo", NULL }; /* @@ -827,6 +827,7 @@ nfs_mount(struct mount *mp) size_t len; u_char nfh[NFSX_V3FHMAX]; char *opt; + int negnametimeo = NFS_DEFAULT_NEGNAMETIMEO; has_nfs_args_opt = 0; has_addr_opt = 0; @@ -1029,7 +1030,7 @@ nfs_mount(struct mount *mp) } if (vfs_getopt(mp->mnt_optnew, "maxgroups", (void **)&opt, NULL) == 0) { ret = sscanf(opt, "%d", &args.maxgrouplist); - if (ret != 1 || args.timeo <= 0) { + if (ret != 1 || args.maxgrouplist <= 0) { vfs_mount_error(mp, "illegal maxgroups: %s", opt); error = EINVAL; @@ -1037,6 +1038,16 @@ nfs_mount(struct mount *mp) } args.flags |= NFSMNT_MAXGRPS; } + if (vfs_getopt(mp->mnt_optnew, "negnametimeo", (void **)&opt, NULL) + == 0) { + ret = sscanf(opt, "%d", &negnametimeo); + if (ret != 1 || negnametimeo < 0) { + vfs_mount_error(mp, "illegal negnametimeo: %s", + opt); + error = EINVAL; + goto out; + } + } if (vfs_getopt(mp->mnt_optnew, "addr", (void **)&args.addr, &args.addrlen) == 0) { has_addr_opt = 1; @@ -1125,7 +1136,7 @@ nfs_mount(struct mount *mp) } } error = mountnfs(&args, mp, nam, args.hostname, &vp, - curthread->td_ucred); + curthread->td_ucred, negnametimeo); out: if (!error) { MNT_ILOCK(mp); @@ -1167,7 +1178,7 @@ nfs_cmount(struct mntarg *ma, void *data */ static int mountnfs(struct nfs_args *argp, struct mount *mp, struct sockaddr *nam, - char *hst, struct vnode **vpp, struct ucred *cred) + char *hst, struct vnode **vpp, struct ucred *cred, int negnametimeo) { struct nfsmount *nmp; struct nfsnode *np; @@ -1217,6 +1228,7 @@ mountnfs(struct nfs_args *argp, struct m nmp->nm_numgrps = NFS_MAXGRPS; nmp->nm_readahead = NFS_DEFRAHEAD; nmp->nm_deadthresh = NFS_MAXDEADTHRESH; + nmp->nm_negnametimeo = negnametimeo; nmp->nm_tprintf_delay = nfs_tprintf_delay; if (nmp->nm_tprintf_delay < 0) nmp->nm_tprintf_delay = 0; Modified: stable/8/sys/nfsclient/nfs_vnops.c ============================================================================== --- stable/8/sys/nfsclient/nfs_vnops.c Thu Feb 4 15:26:16 2010 (r203491) +++ stable/8/sys/nfsclient/nfs_vnops.c Thu Feb 4 16:57:01 2010 (r203492) @@ -982,8 +982,13 @@ nfs_lookup(struct vop_lookup_args *ap) * modification time of the parent directory matches * our cached copy. Otherwise, we discard all of the * negative cache entries for this directory. + * negative cache entries for this directory. We also + * only trust -ve cache entries for less than + * nm_negative_namecache_timeout seconds. */ - if (VOP_GETATTR(dvp, &vattr, cnp->cn_cred) == 0 && + if ((u_int)(ticks - np->n_dmtime_ticks) < + (nmp->nm_negnametimeo * hz) && + VOP_GETATTR(dvp, &vattr, cnp->cn_cred) == 0 && vattr.va_mtime.tv_sec == np->n_dmtime) { nfsstats.lookupcache_hits++; return (ENOENT); @@ -1157,8 +1162,10 @@ nfsmout: */ mtx_lock(&np->n_mtx); if (np->n_dmtime <= dmtime) { - if (np->n_dmtime == 0) + if (np->n_dmtime == 0) { np->n_dmtime = dmtime; + np->n_dmtime_ticks = ticks; + } mtx_unlock(&np->n_mtx); cache_enter(dvp, NULL, cnp); } else Modified: stable/8/sys/nfsclient/nfsmount.h ============================================================================== --- stable/8/sys/nfsclient/nfsmount.h Thu Feb 4 15:26:16 2010 (r203491) +++ stable/8/sys/nfsclient/nfsmount.h Thu Feb 4 16:57:01 2010 (r203492) @@ -85,6 +85,7 @@ struct nfsmount { struct rpc_timers nm_timers[NFS_MAX_TIMER]; /* RTT Timers for rpcs */ char nm_principal[MNAMELEN]; /* GSS-API principal of server */ gss_OID nm_mech_oid; /* OID of selected GSS-API mechanism */ + int nm_negnametimeo; /* timeout for -ve entries (sec) */ /* NFSv4 */ uint64_t nm_clientid; @@ -107,6 +108,10 @@ struct nfsmount { #define NFS_TPRINTF_DELAY 30 #endif +#ifndef NFS_DEFAULT_NEGNAMETIMEO +#define NFS_DEFAULT_NEGNAMETIMEO 60 +#endif + #define NFS_PCATCH (PCATCH | PBDRY) #endif Modified: stable/8/sys/nfsclient/nfsnode.h ============================================================================== --- stable/8/sys/nfsclient/nfsnode.h Thu Feb 4 15:26:16 2010 (r203491) +++ stable/8/sys/nfsclient/nfsnode.h Thu Feb 4 16:57:01 2010 (r203492) @@ -114,6 +114,7 @@ struct nfsnode { struct timespec n_mtime; /* Prev modify time. */ time_t n_ctime; /* Prev create time. */ time_t n_dmtime; /* Prev dir modify time. */ + int n_dmtime_ticks; /* Tick of -ve cache entry */ time_t n_expiry; /* Lease expiry time */ nfsfh_t *n_fhp; /* NFS File Handle */ struct vnode *n_vnode; /* associated vnode */ From owner-svn-src-all@FreeBSD.ORG Thu Feb 4 16:59:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 137CA106566B; Thu, 4 Feb 2010 16:59:37 +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 0479B8FC12; Thu, 4 Feb 2010 16:59:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o14Gxaiq075734; Thu, 4 Feb 2010 16:59:36 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o14GxaEB075732; Thu, 4 Feb 2010 16:59:36 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <201002041659.o14GxaEB075732@svn.freebsd.org> From: Hajimu UMEMOTO Date: Thu, 4 Feb 2010 16:59:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203493 - stable/8/etc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2010 16:59:37 -0000 Author: ume Date: Thu Feb 4 16:59:36 2010 New Revision: 203493 URL: http://svn.freebsd.org/changeset/base/203493 Log: MFC r203342: ManageSieve has been added as port 4190: http://www.iana.org/assignments/port-numbers Modified: stable/8/etc/services (contents, props changed) Directory Properties: stable/8/etc/ (props changed) Modified: stable/8/etc/services ============================================================================== --- stable/8/etc/services Thu Feb 4 16:57:01 2010 (r203492) +++ stable/8/etc/services Thu Feb 4 16:59:36 2010 (r203493) @@ -2223,6 +2223,8 @@ nuts_dem 4132/tcp #NUTS Daemon nuts_dem 4132/udp #NUTS Daemon nuts_bootp 4133/tcp #NUTS Bootp Server nuts_bootp 4133/udp #NUTS Bootp Server +sieve 4190/tcp #ManageSieve Protocol +sieve 4190/udp #ManageSieve Protocol rwhois 4321/tcp #Remote Who Is rwhois 4321/udp #Remote Who Is unicall 4343/tcp From owner-svn-src-all@FreeBSD.ORG Thu Feb 4 17:13:39 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3192B1065692; Thu, 4 Feb 2010 17:13:39 +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 21E998FC16; Thu, 4 Feb 2010 17:13:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o14HDd0f078850; Thu, 4 Feb 2010 17:13:39 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o14HDdnw078848; Thu, 4 Feb 2010 17:13:39 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201002041713.o14HDdnw078848@svn.freebsd.org> From: Rick Macklem Date: Thu, 4 Feb 2010 17:13:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203494 - stable/8/sbin/mount_nfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2010 17:13:39 -0000 Author: rmacklem Date: Thu Feb 4 17:13:38 2010 New Revision: 203494 URL: http://svn.freebsd.org/changeset/base/203494 Log: MFC: r202772 Document the negnametimeo option for mount_nfs as implemented by r202767. This is a content change. Modified: stable/8/sbin/mount_nfs/mount_nfs.8 Directory Properties: stable/8/sbin/mount_nfs/ (props changed) Modified: stable/8/sbin/mount_nfs/mount_nfs.8 ============================================================================== --- stable/8/sbin/mount_nfs/mount_nfs.8 Thu Feb 4 16:59:36 2010 (r203493) +++ stable/8/sbin/mount_nfs/mount_nfs.8 Thu Feb 4 17:13:38 2010 (r203494) @@ -151,6 +151,10 @@ Force the mount protocol to use UDP tran (Necessary for some old .Bx servers.) +.It Cm negnametimeo Ns = Ns Aq Ar value +Override the default of NFS_DEFAULT_NEGNAMETIMEO for the timeout (in seconds) +for negative name cache entries. If this is set to 0 it disables negative +name caching for the mount point. .It Cm nfsv2 Use the NFS Version 2 protocol (the default is to try version 3 first then version 2). From owner-svn-src-all@FreeBSD.ORG Thu Feb 4 17:31:34 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 902D11065692; Thu, 4 Feb 2010 17:31:34 +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 805228FC1F; Thu, 4 Feb 2010 17:31:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o14HVYTR082857; Thu, 4 Feb 2010 17:31:34 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o14HVYBC082855; Thu, 4 Feb 2010 17:31:34 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201002041731.o14HVYBC082855@svn.freebsd.org> From: Rick Macklem Date: Thu, 4 Feb 2010 17:31:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203496 - stable/8/sys/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2010 17:31:34 -0000 Author: rmacklem Date: Thu Feb 4 17:31:34 2010 New Revision: 203496 URL: http://svn.freebsd.org/changeset/base/203496 Log: MFC: r202774 Fix a typo in a comment introduced by r202767. Modified: stable/8/sys/nfsclient/nfs_vnops.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/nfsclient/nfs_vnops.c ============================================================================== --- stable/8/sys/nfsclient/nfs_vnops.c Thu Feb 4 17:26:11 2010 (r203495) +++ stable/8/sys/nfsclient/nfs_vnops.c Thu Feb 4 17:31:34 2010 (r203496) @@ -981,7 +981,6 @@ nfs_lookup(struct vop_lookup_args *ap) * We only accept a negative hit in the cache if the * modification time of the parent directory matches * our cached copy. Otherwise, we discard all of the - * negative cache entries for this directory. * negative cache entries for this directory. We also * only trust -ve cache entries for less than * nm_negative_namecache_timeout seconds. From owner-svn-src-all@FreeBSD.ORG Thu Feb 4 17:35:11 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 791541065697; Thu, 4 Feb 2010 17:35:11 +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 68A2C8FC48; Thu, 4 Feb 2010 17:35:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o14HZBXo083705; Thu, 4 Feb 2010 17:35:11 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o14HZBmf083703; Thu, 4 Feb 2010 17:35:11 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201002041735.o14HZBmf083703@svn.freebsd.org> From: Christian Brueffer Date: Thu, 4 Feb 2010 17:35:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203497 - stable/8/release/doc/en_US.ISO8859-1/hardware X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2010 17:35:11 -0000 Author: brueffer Date: Thu Feb 4 17:35:11 2010 New Revision: 203497 URL: http://svn.freebsd.org/changeset/base/203497 Log: MFC: r202659 We don't support isdn devices anymore (since May 2008). Modified: stable/8/release/doc/en_US.ISO8859-1/hardware/article.sgml Directory Properties: stable/8/release/ (props changed) Modified: stable/8/release/doc/en_US.ISO8859-1/hardware/article.sgml ============================================================================== --- stable/8/release/doc/en_US.ISO8859-1/hardware/article.sgml Thu Feb 4 17:31:34 2010 (r203496) +++ stable/8/release/doc/en_US.ISO8859-1/hardware/article.sgml Thu Feb 4 17:35:11 2010 (r203497) @@ -979,138 +979,6 @@ &hwlist.cm; - - ISDN Interfaces - - [&arch.i386;] AcerISDN P10 ISA PnP (experimental) - - [&arch.i386;] Asuscom ISDNlink 128K ISA - - [&arch.i386;] ASUSCOM P-IN100-ST-D (and other Winbond - W6692-based cards) - - [&arch.i386;] AVM - - - - A1 - - - - B1 ISA (tested with V2.0) - - - - B1 PCI (tested with V4.0) - - - - Fritz!Card classic - - - - Fritz!Card PnP - - - - Fritz!Card PCI - - - - Fritz!Card PCI, Version 2 - - - - T1 - - - - [&arch.i386;] Creatix - - - - ISDN-S0 - - - - ISDN-S0 P&P - - - - [&arch.i386;] Compaq Microcom 610 ISDN (Compaq series - PSB2222I) ISA PnP - - [&arch.i386;] Dr. Neuhaus Niccy Go@ and compatibles - - [&arch.i386;] Dynalink IS64PPH and IS64PPH+ - - [&arch.i386;] Eicon Diehl DIVA 2.0 and 2.02 - - [&arch.i386;] ELSA - - - - ELSA PCC-16 - - - - QuickStep 1000pro ISA - - - - MicroLink ISDN/PCI - - - - QuickStep 1000pro PCI - - - - [&arch.i386;] ITK ix1 Micro ( < V.3, non-PnP version - ) - - [&arch.i386;] Sedlbauer Win Speed - - [&arch.i386;] Siemens I-Surf 2.0 - - [&arch.i386;] TELEINT ISDN SPEED No.1 - (experimental) - - [&arch.i386;] Teles - - - - S0/8 - - - - S0/16 - - - - S0/16.3 - - - - S0/16.3 PnP - - - - 16.3c ISA PnP (experimental) - - - - Teles PCI-TJ - - - - [&arch.i386;] Traverse Technologies NETjet-S PCI - - [&arch.i386;] USRobotics Sportster ISDN TA intern - - [&arch.i386;] Winbond W6692 based PCI cards - - Serial Interfaces From owner-svn-src-all@FreeBSD.ORG Thu Feb 4 18:43:06 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB4651065672; Thu, 4 Feb 2010 18:43:05 +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 DB0898FC13; Thu, 4 Feb 2010 18:43:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o14Ih50C098678; Thu, 4 Feb 2010 18:43:05 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o14Ih5HF098673; Thu, 4 Feb 2010 18:43:05 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201002041843.o14Ih5HF098673@svn.freebsd.org> From: Xin LI Date: Thu, 4 Feb 2010 18:43:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203498 - head/usr.bin/bc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2010 18:43:06 -0000 Author: delphij Date: Thu Feb 4 18:43:05 2010 New Revision: 203498 URL: http://svn.freebsd.org/changeset/base/203498 Log: Use libedit when interacting with tty, which provided history functionality, etc. as did by GNU bc. This also fixes an issue where BSDL bc can not handle very long line. Reported by: imp Reviewed by: imp Modified: head/usr.bin/bc/Makefile head/usr.bin/bc/bc.y head/usr.bin/bc/extern.h head/usr.bin/bc/scan.l Modified: head/usr.bin/bc/Makefile ============================================================================== --- head/usr.bin/bc/Makefile Thu Feb 4 17:35:11 2010 (r203497) +++ head/usr.bin/bc/Makefile Thu Feb 4 18:43:05 2010 (r203498) @@ -5,6 +5,9 @@ PROG= bc SRCS= bc.y scan.l CFLAGS+= -I. -I${.CURDIR} +DPADD= ${LIBEDIT} ${LIBTERMCAP} +LDADD= -ledit -ltermcap + FILES+= bc.library FILESDIR=${SHAREDIR}/misc Modified: head/usr.bin/bc/bc.y ============================================================================== --- head/usr.bin/bc/bc.y Thu Feb 4 17:35:11 2010 (r203497) +++ head/usr.bin/bc/bc.y Thu Feb 4 18:43:05 2010 (r203498) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -1106,6 +1107,13 @@ sigchld(int signo) } } +static const char * +dummy_prompt(void) +{ + + return (""); +} + int main(int argc, char *argv[]) { @@ -1173,6 +1181,16 @@ main(int argc, char *argv[]) dup(p[1]); close(p[0]); close(p[1]); + if (interactive) { + el = el_init("bc", stdin, stderr, stderr); + hist = history_init(); + history(hist, &he, H_SETSIZE, 100); + el_set(el, EL_HIST, history, hist); + el_set(el, EL_EDITOR, "emacs"); + el_set(el, EL_SIGNAL, 1); + el_set(el, EL_PROMPT, dummy_prompt); + el_source(el, NULL); + } } else { close(STDIN_FILENO); dup(p[0]); Modified: head/usr.bin/bc/extern.h ============================================================================== --- head/usr.bin/bc/extern.h Thu Feb 4 17:35:11 2010 (r203497) +++ head/usr.bin/bc/extern.h Thu Feb 4 18:43:05 2010 (r203498) @@ -35,4 +35,8 @@ extern int sargc; extern const char **sargv; extern const char *filename; extern char *cmdexpr; -bool interactive; +extern bool interactive; +extern EditLine *el; +extern History *hist; +extern HistEvent he; + Modified: head/usr.bin/bc/scan.l ============================================================================== --- head/usr.bin/bc/scan.l Thu Feb 4 17:35:11 2010 (r203497) +++ head/usr.bin/bc/scan.l Thu Feb 4 18:43:05 2010 (r203498) @@ -22,6 +22,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -33,13 +34,22 @@ __FBSDID("$FreeBSD$"); int lineno; +bool interactive; +HistEvent he; +EditLine *el; +History *hist; + static char *strbuf = NULL; static size_t strbuf_sz = 1; static bool dot_seen; static void init_strbuf(void); static void add_str(const char *); +static int bc_yyinput(char *, int); +#undef YY_INPUT +#define YY_INPUT(buf,retval,max) \ + (retval = bc_yyinput(buf, max)) %} %option always-interactive @@ -286,3 +296,32 @@ yywrap(void) } return (1); } + +static int +bc_yyinput(char *buf, int maxlen) +{ + int num; + if (interactive) { + const char *bp; + + if ((bp = el_gets(el, &num)) == NULL || num == 0) + return (0); + if (num > maxlen) { + el_push(el, (char *)(uintptr_t)(bp) + maxlen); + num = maxlen; + } + memcpy(buf, bp, num); + history(hist, &he, H_ENTER, bp); + } else { + int c = '*'; + for (num = 0; num < maxlen && + (c = getc(yyin)) != EOF && c != '\n'; ++num) + buf[num] = (char) c; + if (c == '\n') + buf[num++] = (char) c; + if (c == EOF && ferror(yyin)) + YY_FATAL_ERROR( "input in flex scanner failed" ); + } + return (num); +} + From owner-svn-src-all@FreeBSD.ORG Thu Feb 4 18:56:38 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 968EC1065670; Thu, 4 Feb 2010 18:56:38 +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 863AA8FC12; Thu, 4 Feb 2010 18:56:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o14IuctG001801; Thu, 4 Feb 2010 18:56:38 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o14Iuc1T001799; Thu, 4 Feb 2010 18:56:38 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201002041856.o14Iuc1T001799@svn.freebsd.org> From: Alexander Motin Date: Thu, 4 Feb 2010 18:56:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203499 - head/sys/cam/ata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2010 18:56:38 -0000 Author: mav Date: Thu Feb 4 18:56:38 2010 New Revision: 203499 URL: http://svn.freebsd.org/changeset/base/203499 Log: On probe error, if restart requested, skip any retries and recovery. Just restart probe from the beginning immediately. Modified: head/sys/cam/ata/ata_xpt.c Modified: head/sys/cam/ata/ata_xpt.c ============================================================================== --- head/sys/cam/ata/ata_xpt.c Thu Feb 4 18:43:05 2010 (r203498) +++ head/sys/cam/ata/ata_xpt.c Thu Feb 4 18:56:38 2010 (r203499) @@ -693,7 +693,8 @@ probedone(struct cam_periph *periph, uni ident_buf = &path->device->ident_data; if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { -device_fail: if (cam_periph_error(done_ccb, 0, 0, NULL) == ERESTART) { +device_fail: if ((!softc->restart) && + cam_periph_error(done_ccb, 0, 0, NULL) == ERESTART) { return; } else if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) { /* Don't wedge the queue */ From owner-svn-src-all@FreeBSD.ORG Thu Feb 4 19:47:26 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C81E106566B; Thu, 4 Feb 2010 19:47:26 +0000 (UTC) (envelope-from joerg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 64C848FC0C; Thu, 4 Feb 2010 19:47:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o14JlQxd013014; Thu, 4 Feb 2010 19:47:26 GMT (envelope-from joerg@svn.freebsd.org) Received: (from joerg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o14JlQSo013012; Thu, 4 Feb 2010 19:47:26 GMT (envelope-from joerg@svn.freebsd.org) Message-Id: <201002041947.o14JlQSo013012@svn.freebsd.org> From: Joerg Wunsch Date: Thu, 4 Feb 2010 19:47:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203500 - stable/8/gnu/usr.bin/groff/tmac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2010 19:47:26 -0000 Author: joerg Date: Thu Feb 4 19:47:26 2010 New Revision: 203500 URL: http://svn.freebsd.org/changeset/base/203500 Log: MFC r203357: teach groff about libgpib. Modified: stable/8/gnu/usr.bin/groff/tmac/mdoc.local Directory Properties: stable/8/gnu/usr.bin/groff/ (props changed) Modified: stable/8/gnu/usr.bin/groff/tmac/mdoc.local ============================================================================== --- stable/8/gnu/usr.bin/groff/tmac/mdoc.local Thu Feb 4 18:56:38 2010 (r203499) +++ stable/8/gnu/usr.bin/groff/tmac/mdoc.local Thu Feb 4 19:47:26 2010 (r203500) @@ -46,6 +46,7 @@ .ds doc-str-Lb-libelf ELF Parsing Library (libelf, \-lelf) .ds doc-str-Lb-libfetch File Transfer Library (libfetch, \-lfetch) .ds doc-str-Lb-libgeom Userland API Library for kernel GEOM subsystem (libgeom, \-lgeom) +.ds doc-str-Lb-libgpib General-Purpose Instrument Bus (GPIB) library (libgpib, \-lgpib) .ds doc-str-Lb-libipx IPX Address Conversion Support Library (libipx, \-lipx) .ds doc-str-Lb-libjail Jail Library (libjail, \-ljail) .ds doc-str-Lb-libkiconv Kernel side iconv library (libkiconv, \-lkiconv) From owner-svn-src-all@FreeBSD.ORG Thu Feb 4 19:49:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E5CCC106566C; Thu, 4 Feb 2010 19:49:07 +0000 (UTC) (envelope-from joerg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D269A8FC18; Thu, 4 Feb 2010 19:49:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o14Jn7S7013420; Thu, 4 Feb 2010 19:49:07 GMT (envelope-from joerg@svn.freebsd.org) Received: (from joerg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o14Jn7iE013417; Thu, 4 Feb 2010 19:49:07 GMT (envelope-from joerg@svn.freebsd.org) Message-Id: <201002041949.o14Jn7iE013417@svn.freebsd.org> From: Joerg Wunsch Date: Thu, 4 Feb 2010 19:49:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203501 - stable/8/lib/libgpib X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2010 19:49:08 -0000 Author: joerg Date: Thu Feb 4 19:49:07 2010 New Revision: 203501 URL: http://svn.freebsd.org/changeset/base/203501 Log: MFC r203356: add a manpage for gpib(3). Added: stable/8/lib/libgpib/gpib.3 - copied unchanged from r203356, head/lib/libgpib/gpib.3 Modified: stable/8/lib/libgpib/Makefile Directory Properties: stable/8/lib/libgpib/ (props changed) Modified: stable/8/lib/libgpib/Makefile ============================================================================== --- stable/8/lib/libgpib/Makefile Thu Feb 4 19:47:26 2010 (r203500) +++ stable/8/lib/libgpib/Makefile Thu Feb 4 19:49:07 2010 (r203501) @@ -7,4 +7,23 @@ INCSDIR= ${INCLUDEDIR}/gpib SRCS= ibfoo.c WARNS?= 6 +MAN= gpib.3 + +# MLINKS are only provided for functions that are actually +# implemented; update this if missing pieces have been filled in. +MLINKS+= gpib.3 ibclr.3 +MLINKS+= gpib.3 ibdev.3 +MLINKS+= gpib.3 ibdma.3 +MLINKS+= gpib.3 ibeos.3 +MLINKS+= gpib.3 ibeot.3 +MLINKS+= gpib.3 ibloc.3 +MLINKS+= gpib.3 ibonl.3 +MLINKS+= gpib.3 ibpad.3 +MLINKS+= gpib.3 ibrd.3 +MLINKS+= gpib.3 ibsad.3 +MLINKS+= gpib.3 ibsic.3 +MLINKS+= gpib.3 ibtmo.3 +MLINKS+= gpib.3 ibtrg.3 +MLINKS+= gpib.3 ibwrt.3 + .include Copied: stable/8/lib/libgpib/gpib.3 (from r203356, head/lib/libgpib/gpib.3) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/lib/libgpib/gpib.3 Thu Feb 4 19:49:07 2010 (r203501, copy of r203356, head/lib/libgpib/gpib.3) @@ -0,0 +1,738 @@ +.\" Copyright (c) 2010, Joerg Wunsch +.\" 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 February 1, 2010 +.Dt GPIB 3 +.Os +.Sh NAME +.\" .Nm ibask , +.\" .Nm ibbna , +.\" .Nm ibcac , +.Nm ibclr , +.\" .Nm ibcmd , +.\" .Nm ibcmda , +.\" .Nm ibconfig , +.Nm ibdev , +.\" .Nm ibdiag , +.Nm ibdma , +.Nm ibeos , +.Nm ibeot , +.\" .Nm ibevent , +.\" .Nm ibfind , +.\" .Nm ibgts , +.\" .Nm ibist , +.\" .Nm iblines , +.\" .Nm ibllo , +.\" .Nm ibln , +.Nm ibloc , +.Nm ibonl , +.Nm ibpad , +.\" .Nm ibpct , +.\" .Nm ibpoke , +.\" .Nm ibppc , +.Nm ibrd , +.\" .Nm ibrda , +.\" .Nm ibrdf , +.\" .Nm ibrdkey , +.\" .Nm ibrpp , +.\" .Nm ibrsc , +.\" .Nm ibrsp , +.\" .Nm ibrsv , +.Nm ibsad , +.\" .Nm ibsgnl , +.Nm ibsic , +.\" .Nm ibsre , +.\" .Nm ibsrq , +.\" .Nm ibstop , +.Nm ibtmo , +.\" .Nm ibtrap , +.Nm ibtrg , +.\" .Nm ibwait , +.Nm ibwrt +.\" .Nm ibwrta , +.\" .Nm ibwrtf , +.\" .Nm ibwrtkey , +.\" .Nm ibxtrc +.Nd "GPIB library" +.Sh LIBRARY +.Lb libgpib +.Sh SYNOPSIS +.In gpib.h +.Pp +.Dv extern int ibcnt , +.Dv iberr , +.Dv ibsta ; +.Pp +.Ft int +.Fn ibask "int handle" "int option" "int *retval" +.Ft int +.Fn ibbna "int handle" "char *bdname" +.Ft int +.Fn ibcac "int handle" "int v" +.Ft int +.Fn ibclr "int handle" +.Ft int +.Fn ibcmd "int handle" "void *buffer" "long cnt" +.Ft int +.Fn ibcmda "int handle" "void *buffer" "long cnt" +.Ft int +.Fn ibconfig "int handle" "int option" "int value" +.Ft int +.Fn ibdev "int boardID" "int pad" "int sad" "int tmo" "int eot" "int eos" +.Ft int +.Fn ibdiag "int handle" "void *buffer" "long cnt" +.Ft int +.Fn ibdma "int handle" "int v" +.Ft int +.Fn ibeos "int handle" "int eos" +.Ft int +.Fn ibeot "int handle" "int eot" +.Ft int +.Fn ibevent "int handle" "short *event" +.Ft int +.Fn ibfind "char *bdname" +.Ft int +.Fn ibgts "int handle" "int v" +.Ft int +.Fn ibist "int handle" "int v" +.Ft int +.Fn iblines "int handle" "short *lines" +.Ft int +.Fn ibllo "int handle" +.Ft int +.Fn ibln "int handle" "int padval" "int sadval" "short *listenflag" +.Ft int +.Fn ibloc "int handle" +.Ft int +.Fn ibonl "int handle" "int v" +.Ft int +.Fn ibpad "int handle" "int pad" +.Ft int +.Fn ibpct "int handle" +.Ft int +.Fn ibpoke "int handle" "int option" "int value" +.Ft int +.Fn ibppc "int handle" "int v" +.Ft int +.Fn ibrd "int handle" "void *buffer" "long cnt" +.Ft int +.Fn ibrda "int handle" "void *buffer" "long cnt" +.Ft int +.Fn ibrdf "int handle" "char *flname" +.Ft int +.Fn ibrdkey "int handle" "void *buffer" "int cnt" +.Ft int +.Fn ibrpp "int handle" "char *ppr" +.Ft int +.Fn ibrsc "int handle" "int v" +.Ft int +.Fn ibrsp "int handle" "char *spr" +.Ft int +.Fn ibrsv "int handle" "int v" +.Ft int +.Fn ibsad "int handle" "int sad" +.Ft int +.Fn ibsgnl "int handle" "int v" +.Ft int +.Fn ibsic "int handle" +.Ft int +.Fn ibsre "int handle" "int v" +.Ft int +.Fn ibsrq "(*func) void)" +.Ft int +.Fn ibstop "int handle" +.Ft int +.Fn ibtmo "int handle" "int tmo" +.Ft int +.Fn ibtrap "int mask" "int mode" +.Ft int +.Fn ibtrg "int handle" +.Ft int +.Fn ibwait "int handle" "int mask" +.Ft int +.Fn ibwrt "int handle" "const void *buffer" "long cnt" +.Ft int +.Fn ibwrta "int handle" "const void *buffer" "long cnt" +.Ft int +.Fn ibwrtf "int handle" "const char *flname" +.Ft int +.Fn ibwrtkey "int handle" "const void *buffer" "int cnt" +.Ft int +.Fn ibxtrc "int handle" "void *buffer" "long cnt" +.Sh DESCRIPTION +The +.Nm +library provides access to the +.Xr gpib 4 +kernel devices. +.Ss Variable Description +The variable +.Dv ibcnt +contains the number of bytes transferred in the most recent call to +.Fn ibcmd , +.Fn ibrd , +or +.Fn ibwrt . +.Pp +The name +.Dv ibcntl +is an alias for +.Dv ibcnt , +provided for backwards compatibility. +.Pp +The variable +.Dv iberr +provides an error code for the most recent library call. +The possible error codes are: +.Bl -tag -offset indent -compact +.It EDVR +System error +.It ECIC +Not Active Controller +.It ENOL +Nobody listening +.It EADR +Controller not addressed +.It EARG +Invalid argument +.It ESAC +Not System Controller +.It EABO +I/O Aborted/Time out +.It ENEB +No such controller +.It EOIP +Async I/O in progress +.It ECAP +No such capability +.It EFSO +File system error +.It EBUS +Command byte xfer error +.It ESTB +Serial poll status byte lost +.It ESRQ +SRQ line stuck +.It ETAB +Table problem +.El +.Pp +The variable +.Dv ibsta +contains the controller status. +This is an ORed status value, with the following individual bit names: +.Bl -tag -offset indent -compact +.It ERR +Error +.It TIMO +Timeout +.It END +EOI/EOS +.It SRQI +SRQ +.It RQS +Device requests service +.It SPOLL +Serial Poll +.It EVENT +Event occured +.It CMPL +I/O complete +.It LOK +Lockout +.It REM +Remote +.It CIC +CIC +.It ATN +ATN +.It TACS +Talker +.It LACS +Listener +.It DTAS +Device trigger status +.It DCAS +Device clear state +.El +.Ss Function Description +.Pp +The function +.Fn ibdev +is used to open the GPIB device, and establish the parameters to +communicate with a particular bus device. The device is selected +by its primary address +.Fa pad , +a numerical value between 0 and 30, possibly additionally by its +secondary address +.Fa sad , +a numerical value between 96 and 126, or 0 to not use secondary +addressing. +The +.Fa tmo +value specifies the timeout to use when communicating with the device. +This can be any of the constants +.Dv TNONE , +.Dv T10us , +.Dv T30us , +.Dv T100us , +.Dv T300us , +.Dv T1ms , +.Dv T3ms , +.Dv T10ms , +.Dv T30ms , +.Dv T100ms , +.Dv T300ms , +.Dv T1s , +.Dv T3s , +.Dv T10s , +.Dv T30s , +.Dv T100s , +.Dv T300s , +or +.Dv T1000s . +The boolean parameter +.Fa eot +specifies whether the bus signal +.Li EOI +(end-or-identify) should be asserted when sending the last byte of a +message to the device. +Finally, the +.Fa eos +parameter determines whether any special character should be used to +identify the end of a device message when transferring messages on the +bus. +The lower 8 bits of +.Fa eos +are interpreted as an end-of-string character, +.Li EOS . +This character can be ORed with the following values: +.Bl -tag -compact -offset indent +.It Dv REOS +When receiving a message byte on the bus that matches the +.Li EOS +character, treat it as if the +.Li EOI +signal were asserted, and stop receiving. +.It Dv XEOS +When transmitting a message byte on the bus that matches the +.Li EOS +character, assert the +.Li EOI +bus signal by the same time, and stop sending. +.It Dv BIN +If set, include all 8 bits of the +.Li EOS +character in the comparison; if unset, compare only 7 bit ASCII +values. +.El +Passing 0 as +.Fa eos +will turn off any special character treatment, allowing for a fully +8-bit transparent communications channel to the device. +.Pp +The function +.Fn ibfind +is meant to find the +.Em board index +of a board identified by the name +.Fa bdname . +.Em This function is currently not implemented. +.Pp +All remaining functions take the handle returned by calling +.Fn ibdev +as their first argument +.Fa handle . +.Pp +The function +.Fn ibask +is used to query configuration values that have been set with +.Fn ibconfig . +.Em This function is currently not implemented. +.Pp +The function +.Fn ibbna +is meant to change the access board for the given device to +a new one, named +.Fa bdname . +.Em This function is currently not implemented. +.Pp +The function +.Fn ibcac +is used to become the active controller on the bus, by asserting the +.Li ATN +signal line. +.Em This function is currently not implemented. +.Pp +The function +.Fn ibclr +is used to transmit a +.Em Selected Device Clear +command to the device. +.Pp +The function +.Fn ibcmd +is used to directly write +.Fa cnt +GPIB command bytes from a buffer starting at +.Fa buffer +to the device. +.Em This function is currently not implemented. +.Pp +The function +.Fn ibcmda +does the same as +.Fn ibcmd +except it operates asynchronously, so it returns to the caller +immediately. +.Em This function is currently not implemented. +.Pp +The function +.Fn ibconfig +is used to set certain configuration parameters. +.Em This function is currently not implemented. +.Pp +The function +.Fn ibdiag +is obsolete, and not implemented. +.Pp +The function +.Fn ibdma +is used to enable or disable DMA transfers. +Parameter +.Fa v +is a boolean parameter indicating DMA transfers are to be used. +Depending on the hardware and operating system configuration, DMA +transfers might not be available for a particular access board. +.Pp +The function +.Fn ibeos +configures the end-of-string character. +See +.Fn ibdev +for an explanation. +.Pp +The function +.Fn ibeot +configures the assertion of the +.Li EOI +signal line when transmitting the last byte of a message; see +.Fn ibdev +for an explanation. +.Pp +The function +.Fn ibevent +is used to obtain an event from the board's event queue. +.Em This function is currently not implemented. +.Pp +The function +.Fn ibgts +makes the current controller the standby controller, by deasserting +the +.Li ATN +signal line. +.Em This function is currently not implemented. +.Pp +The function +.Fn ibist +sets the individual status bits of the controller to the value +.Fa v . +.Em This function is currently not implemented. +.Pp +The function +.Fn iblines +returns the status of the control and handshake bus lines into the +area pointed to by +.Fa lines . +.Em This function is currently not implemented. +.Pp +The function +.Fn ibllo +is obsolete, and not implemented. +.Pp +The function +.Fn ibln +checks for a listener at the primary address +.Fa padval +and the optional secondary address +.Fa sadval . +If a listener was found, the value pointed to by +.Fa listenflag +will be set to a non-zero value. +.Em This function is currently not implemented. +.Pp +The function +.Fn ibloc +turns the device into local mode. +.Pp +The function +.Fn ibonl +is used to close or reinitialize a device handle. +If parameter +.Fa v +is passed as zero, the handle will be closed, and cannot be used +again. +If it is passed as a non-zero value, all parameters of the handle +will be returned to their defaults; +.Em this functionality is currently unsupported. +.Pp +The function +.Fn ibpad +is used to change the primary address of the device being communicated +with to +.Fa pad . +See +.Fn ibdev +for an explanation. +.Pp +The function +.Fn ibpct +is used to make the device associated with the handle the +controller-in-charge. +.Em This function is currently not implemented. +.Pp +The function +.Fn ibpoke +is obsolete, and not implemented. +.Pp +The function +.Fn ibppc +is used to configure the parallel poll response to +.Fa v . +.Em This function is currently not implemented. +.Pp +The fucntion +.Fn ibrd +is used to receive +.Fa cnt +bytes from the device, and store it to the address passed as +.Fa buffer . +.Pp +The function +.Fn ibrda +behaves similar to +.Fn ibrd +except it operates asynchronously, and returns immediately to the +caller. +.Em This function is currently not implemented. +.Pp +The function +.Fn ibrdf +read data from the device, and appends it to the file with the name +.Fa flname . +.Em This function is currently not implemented. +.Pp +The function +.Fn ibrdkey +is obsolete, and not implemented. +.Pp +The function +.Fn ibrpp +performs a parallel poll, and stores the result at the location +pointed to by +.Fa ppr . +.Em This function is currently not implemented. +.Pp +The function +.Fn ibrsc +makes the board specified by the handle the +.Em system controller +if the argument +.Fa v +is non-zero. +.Em This function is currently not implemented. +.Pp +The function +.Fn ibrsp +conducts a serial poll, and stores the result in the byte pointed +to by +.Fa spr . +.Em This function is currently not implemented. +.Pp +The function +.Fn ibrsv +sets the serial poll response of the board to +.Fa v , +possibly requesting service from the controller if the SRQ bit (0x40) +is set. +.Em This function is currently not implemented. +.Pp +The function +.Fn ibsad +changes the secondary address of the device being communicated with to +.Fa sad . +See +.Fn ibdev +for an explanation. +.Pp +The function +.Fn ibsgnl +is obsolete, and not implemented. +.Pp +The function +.Fn ibsic +asserts the +.Em Interface Clear (IFC) +signal line on the bus for at least 100 microseconds. +This will make all devices attached to the bus to unlisten and untalk. +This function should only be executed on the system controller. +.Pp +The function +.Fn ibsre +asserts the +.Em Remote Enable (REN) +signal line on the bus if argument +.Fa v +is non-zero, or deasserts it otherwise. +.Em This function is currently not implemented. +.Pp +The function +.Fn ibsrq +is obsolete, and not implemented. +.Pp +The function +.Fn ibstop +stops or aborts any asynchronous I/O operation. +.Em This function is currently not implemented. +.Pp +The function +.Fn ibtmo +reconfigures the communication timeout. +See +.Fn ibdev +for an explanation. +.Pp +The function +.Fn ibtrap +is obsolete, and not implemented. +.Pp +The function +.Fn ibtrg +sends a +.Em Group Execute Trigger (GET) +command to the device. +.Pp +The function +.Fn ibwait +waits for a status condition as specified by +.Fa mask . +If +.Fa mask +is given as zero, it returns immediately. +.Em This function is currently not implemented. +.Pp +The function +.Fn ibwrt +is used to send +.Fa cnt +bytes to the device, starting at the address pointed to by +.Fa buffer . +.Pp +The function +.Fn ibwrta +performs the same operation as +.Fn ibwrt +in an asynchronous way, returning immediately to the caller. +.Em This function is currently not implemented. +.Pp +The function +.Fn ibwrtf +opens the file named by +.Fa flname , +and sends its contents to the device. +.Em This function is currently not implemented. +.Pp +The function +.Fn ibwrtkey +is obsolete, and not implemented +.Pp +The function +.Fn ibxtrc +is obsolete, and not implemented. +.Sh RETURN VALUES +The function +.Fn ibdev +returns a handle to be used for the remaining functions. +Upon failure, -1 is returned. +.Pp +All other functions return the value of the variable +.Dv ibsta . +.Sh DIAGNOSTICS +None. +.Sh COMPATIBILITY +The +.Nm +library tries to be compatible with the Linux GPIB library, +which in turn appears to be compatible with the GPIB library +shipped by National Instruments. +.Sh ERRORS +Errors in the functions above might set +.Dv errno +to one of these values: +.Bl -tag -width Er +.It Bq Er ENOENT +No such file or directory. +.It Bq Er EIO +Input/output error. +.It Bq Er ENXIO +Device not configured. +.It Bq Er E2BIG +Argument list too long. +.It Bq Er ENOMEM +Cannot allocate memory. +.It Bq Er EACCES +Permission denied. +.It Bq Er EFAULT +Bad address. +.It Bq Er EBUSY +Device busy. +.It Bq Er EINVAL +Invalid argument. +.It Bq Er ENFILE +Too many open files in system. +.It Bq Er EMFILE +Too many open files. +.It Bq Er EOPNOTSUPP +Operation not supported. +.El +.Sh SEE ALSO +.Xr gpib 4 +.Sh HISTORY +The +.Nm +library was written by +.An Poul-Henning Kamp +and first appeared in +.Fx 5.4 . +.Sh AUTHORS +This manual page was written by +.An J\(:org Wunsch . +.Sh BUGS +Currently, the library can only handle a single +.Xr gpib 4 +device with instance number 0. +.Pp +Many functions are currently not implemented, see above for details. From owner-svn-src-all@FreeBSD.ORG Thu Feb 4 19:49:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3AC8F106566C; Thu, 4 Feb 2010 19:49:42 +0000 (UTC) (envelope-from joerg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 294CB8FC18; Thu, 4 Feb 2010 19:49:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o14JngCs013591; Thu, 4 Feb 2010 19:49:42 GMT (envelope-from joerg@svn.freebsd.org) Received: (from joerg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o14JngjY013587; Thu, 4 Feb 2010 19:49:42 GMT (envelope-from joerg@svn.freebsd.org) Message-Id: <201002041949.o14JngjY013587@svn.freebsd.org> From: Joerg Wunsch Date: Thu, 4 Feb 2010 19:49:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203502 - stable/8/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2010 19:49:42 -0000 Author: joerg Date: Thu Feb 4 19:49:41 2010 New Revision: 203502 URL: http://svn.freebsd.org/changeset/base/203502 Log: MFC r203359: active xrefs to gpib(3) now that it's actually there. Modified: stable/8/share/man/man4/gpib.4 stable/8/share/man/man4/pcii.4 stable/8/share/man/man4/tnt4882.4 Directory Properties: stable/8/share/man/man4/ (props changed) stable/8/share/man/man4/de.4 (props changed) Modified: stable/8/share/man/man4/gpib.4 ============================================================================== --- stable/8/share/man/man4/gpib.4 Thu Feb 4 19:49:07 2010 (r203501) +++ stable/8/share/man/man4/gpib.4 Thu Feb 4 19:49:41 2010 (r203502) @@ -54,7 +54,7 @@ When opening, an instrument can send dat bus in an unaddressed mode, for example hard-copy printer data. .El .Sh SEE ALSO -.\" .Xr libgpib 3 , +.Xr gpib 3 , .Xr pcii 4 , .Xr tnt4882 4 .Sh HISTORY Modified: stable/8/share/man/man4/pcii.4 ============================================================================== --- stable/8/share/man/man4/pcii.4 Thu Feb 4 19:49:07 2010 (r203501) +++ stable/8/share/man/man4/pcii.4 Thu Feb 4 19:49:41 2010 (r203502) @@ -84,7 +84,7 @@ National Instruments GPIB-PCII/PCIIA (in Axiom AX5488 .El .Sh SEE ALSO -.\" .Xr libgpib 3 , +.Xr gpib 3 , .Xr gpib 4 , .Xr device.hints 5 .Sh HISTORY Modified: stable/8/share/man/man4/tnt4882.4 ============================================================================== --- stable/8/share/man/man4/tnt4882.4 Thu Feb 4 19:49:07 2010 (r203501) +++ stable/8/share/man/man4/tnt4882.4 Thu Feb 4 19:49:41 2010 (r203502) @@ -43,7 +43,7 @@ the TNT4882 bus interface chip. This chip emulates a NEC \(mcPD7210 controller IC as the main interface between the host computer and the instrument bus. .Sh SEE ALSO -.\" .Xr libgpib 3 , +.Xr gpib 3 , .Xr gpib 4 , .Sh HISTORY The From owner-svn-src-all@FreeBSD.ORG Thu Feb 4 21:02:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7D0101065670; Thu, 4 Feb 2010 21:02:29 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6B6228FC18; Thu, 4 Feb 2010 21:02:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o14L2T92029659; Thu, 4 Feb 2010 21:02:29 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o14L2Tdd029657; Thu, 4 Feb 2010 21:02:29 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201002042102.o14L2Tdd029657@svn.freebsd.org> From: Michael Tuexen Date: Thu, 4 Feb 2010 21:02:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203503 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2010 21:02:29 -0000 Author: tuexen Date: Thu Feb 4 21:02:29 2010 New Revision: 203503 URL: http://svn.freebsd.org/changeset/base/203503 Log: Restore the checksum received before processing the packet. MFC after: 1 week Modified: head/sys/netinet/sctp_input.c Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Thu Feb 4 19:49:41 2010 (r203502) +++ head/sys/netinet/sctp_input.c Thu Feb 4 21:02:29 2010 (r203503) @@ -5806,6 +5806,7 @@ sctp_input_with_port(struct mbuf *i_pak, } sh->checksum = 0; /* prepare for calc */ calc_check = sctp_calculate_cksum(m, iphlen); + sh->checksum = check; SCTP_STAT_INCR(sctps_recvswcrc); if (calc_check != check) { SCTPDBG(SCTP_DEBUG_INPUT1, "Bad CSUM on SCTP packet calc_check:%x check:%x m:%p mlen:%d iphlen:%d\n", @@ -5831,7 +5832,6 @@ sctp_input_with_port(struct mbuf *i_pak, SCTP_STAT_INCR_COUNTER32(sctps_checksumerrors); goto bad; } - sh->checksum = calc_check; sctp_skip_csum_4: /* destination port of 0 is illegal, based on RFC2960. */ if (sh->dest_port == 0) { From owner-svn-src-all@FreeBSD.ORG Thu Feb 4 21:11:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 68CB61065692; Thu, 4 Feb 2010 21:11:44 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5646F8FC12; Thu, 4 Feb 2010 21:11:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o14LBiCc031728; Thu, 4 Feb 2010 21:11:44 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o14LBixZ031726; Thu, 4 Feb 2010 21:11:44 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201002042111.o14LBixZ031726@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Thu, 4 Feb 2010 21:11:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203504 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2010 21:11:44 -0000 Author: pjd Date: Thu Feb 4 21:11:44 2010 New Revision: 203504 URL: http://svn.freebsd.org/changeset/base/203504 Log: Open provider for writting when we find the right one. Opening too much providers for writing provokes huge traffic related to taste events send by GEOM on close. This can lead to various problems with opening GEOM providers that are created on top of other GEOM providers. Reorted by: Kurt Touet , mr Tested by: mr, Baginski Darren MFC after: 2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Thu Feb 4 21:02:29 2010 (r203503) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Thu Feb 4 21:11:44 2010 (r203504) @@ -102,7 +102,7 @@ vdev_geom_orphan(struct g_consumer *cp) } static struct g_consumer * -vdev_geom_attach(struct g_provider *pp, int write) +vdev_geom_attach(struct g_provider *pp) { struct g_geom *gp; struct g_consumer *cp; @@ -126,7 +126,7 @@ vdev_geom_attach(struct g_provider *pp, g_wither_geom(gp, ENXIO); return (NULL); } - if (g_access(cp, 1, write, 1) != 0) { + if (g_access(cp, 1, 0, 1) != 0) { g_wither_geom(gp, ENXIO); return (NULL); } @@ -145,14 +145,14 @@ vdev_geom_attach(struct g_provider *pp, g_destroy_consumer(cp); return (NULL); } - if (g_access(cp, 1, write, 1) != 0) { + if (g_access(cp, 1, 0, 1) != 0) { g_detach(cp); g_destroy_consumer(cp); return (NULL); } ZFS_LOG(1, "Created consumer for %s.", pp->name); } else { - if (g_access(cp, 1, cp->acw > 0 ? 0 : write, 1) != 0) + if (g_access(cp, 1, 0, 1) != 0) return (NULL); ZFS_LOG(1, "Used existing consumer for %s.", pp->name); } @@ -342,7 +342,6 @@ vdev_geom_read_guid(struct g_consumer *c struct vdev_geom_find { uint64_t guid; - int write; struct g_consumer *cp; }; @@ -394,10 +393,10 @@ vdev_geom_attach_by_guid_event(void *arg g_detach(zcp); if (guid != ap->guid) continue; - ap->cp = vdev_geom_attach(pp, ap->write); + ap->cp = vdev_geom_attach(pp); if (ap->cp == NULL) { - printf("ZFS WARNING: Cannot open %s " - "for writting.\n", pp->name); + printf("ZFS WARNING: Unable to attach to %s.", + pp->name); continue; } goto end; @@ -411,14 +410,13 @@ end: } static struct g_consumer * -vdev_geom_attach_by_guid(uint64_t guid, int write) +vdev_geom_attach_by_guid(uint64_t guid) { struct vdev_geom_find *ap; struct g_consumer *cp; ap = kmem_zalloc(sizeof(*ap), KM_SLEEP); ap->guid = guid; - ap->write = write; g_waitfor_event(vdev_geom_attach_by_guid_event, ap, M_WAITOK, NULL); cp = ap->cp; kmem_free(ap, sizeof(*ap)); @@ -433,7 +431,7 @@ vdev_geom_open_by_guid(vdev_t *vd) size_t len; ZFS_LOG(1, "Searching by guid [%ju].", (uintmax_t)vd->vdev_guid); - cp = vdev_geom_attach_by_guid(vd->vdev_guid, !!(spa_mode & FWRITE)); + cp = vdev_geom_attach_by_guid(vd->vdev_guid); if (cp != NULL) { len = strlen(cp->provider->name) + strlen("/dev/") + 1; buf = kmem_alloc(len, KM_SLEEP); @@ -464,7 +462,7 @@ vdev_geom_open_by_path(vdev_t *vd, int c pp = g_provider_by_name(vd->vdev_path + sizeof("/dev/") - 1); if (pp != NULL) { ZFS_LOG(1, "Found provider by name %s.", vd->vdev_path); - cp = vdev_geom_attach(pp, !!(spa_mode & FWRITE)); + cp = vdev_geom_attach(pp); if (cp != NULL && check_guid) { g_topology_unlock(); guid = vdev_geom_read_guid(cp); @@ -492,7 +490,7 @@ vdev_geom_open(vdev_t *vd, uint64_t *psi vdev_geom_ctx_t *ctx; struct g_provider *pp; struct g_consumer *cp; - int owned; + int error, owned; /* * We must have a pathname, and it must be absolute. @@ -506,6 +504,7 @@ vdev_geom_open(vdev_t *vd, uint64_t *psi if ((owned = mtx_owned(&Giant))) mtx_unlock(&Giant); + error = 0; cp = vdev_geom_open_by_path(vd, 1); if (cp == NULL) { /* @@ -519,13 +518,24 @@ vdev_geom_open(vdev_t *vd, uint64_t *psi cp = vdev_geom_open_by_path(vd, 0); if (cp == NULL) { ZFS_LOG(1, "Provider %s not found.", vd->vdev_path); - vd->vdev_stat.vs_aux = VDEV_AUX_OPEN_FAILED; - if (owned) - mtx_lock(&Giant); - return (EACCES); + error = ENOENT; + } else if (cp->acw == 0 && (spa_mode & FWRITE) != 0) { + g_topology_lock(); + error = g_access(cp, 0, 1, 0); + if (error != 0) { + printf("ZFS WARNING: Unable to open %s for writing (error=%d).", + vd->vdev_path, error); + vdev_geom_detach(cp, 0); + cp = NULL; + } + g_topology_unlock(); } if (owned) mtx_lock(&Giant); + if (cp == NULL) { + vd->vdev_stat.vs_aux = VDEV_AUX_OPEN_FAILED; + return (error); + } cp->private = vd; From owner-svn-src-all@FreeBSD.ORG Thu Feb 4 21:20:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8FE161065694; Thu, 4 Feb 2010 21:20:09 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from gw01.mail.saunalahti.fi (gw01.mail.saunalahti.fi [195.197.172.115]) by mx1.freebsd.org (Postfix) with ESMTP id 4985F8FC14; Thu, 4 Feb 2010 21:20:09 +0000 (UTC) Received: from a91-153-117-195.elisa-laajakaista.fi (a91-153-117-195.elisa-laajakaista.fi [91.153.117.195]) by gw01.mail.saunalahti.fi (Postfix) with SMTP id 1A5EC151384; Thu, 4 Feb 2010 23:20:03 +0200 (EET) Date: Thu, 4 Feb 2010 23:20:02 +0200 From: Jaakko Heinonen To: Edward Tomasz Napierala , Robert Watson Message-ID: <20100204212002.GA3196@a91-153-117-195.elisa-laajakaista.fi> References: <201002041250.o14CoOtA020871@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201002041250.o14CoOtA020871@svn.freebsd.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-svnadmin@freebsd.org Subject: Re: svn commit: r203487 - svnadmin/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2010 21:20:09 -0000 On 2010-02-04, Edward Tomasz Napierala wrote: > Jaakko Heinonen (jh@) is ready to fly solo. You have been a great mentor. Thank your for mentoring me! Special thanks also to Robert for volunteering to back Edward up. -- Jaakko From owner-svn-src-all@FreeBSD.ORG Thu Feb 4 21:51:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C02961065670; Thu, 4 Feb 2010 21:51:33 +0000 (UTC) (envelope-from mjacob@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AEDBE8FC13; Thu, 4 Feb 2010 21:51:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o14LpXv7040648; Thu, 4 Feb 2010 21:51:33 GMT (envelope-from mjacob@svn.freebsd.org) Received: (from mjacob@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o14LpXtI040646; Thu, 4 Feb 2010 21:51:33 GMT (envelope-from mjacob@svn.freebsd.org) Message-Id: <201002042151.o14LpXtI040646@svn.freebsd.org> From: Matt Jacob Date: Thu, 4 Feb 2010 21:51:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203505 - head/sbin/geom/class/multipath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2010 21:51:33 -0000 Author: mjacob Date: Thu Feb 4 21:51:33 2010 New Revision: 203505 URL: http://svn.freebsd.org/changeset/base/203505 Log: Add the long missing "destroy" option. MFC after: 2 weeks Modified: head/sbin/geom/class/multipath/geom_multipath.c Modified: head/sbin/geom/class/multipath/geom_multipath.c ============================================================================== --- head/sbin/geom/class/multipath/geom_multipath.c Thu Feb 4 21:11:44 2010 (r203504) +++ head/sbin/geom/class/multipath/geom_multipath.c Thu Feb 4 21:51:33 2010 (r203505) @@ -55,6 +55,10 @@ struct g_command class_commands[] = { NULL, "[-v] name prov ..." }, { + "destroy", G_FLAG_VERBOSE, NULL, G_NULL_OPTS, + NULL, "[-v] prov ..." + }, + { "clear", G_FLAG_VERBOSE, mp_main, G_NULL_OPTS, NULL, "[-v] prov ..." }, From owner-svn-src-all@FreeBSD.ORG Thu Feb 4 23:34:35 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D7F7D1065672; Thu, 4 Feb 2010 23:34:35 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C83D48FC1A; Thu, 4 Feb 2010 23:34:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o14NYZTt063344; Thu, 4 Feb 2010 23:34:35 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o14NYZ9j063342; Thu, 4 Feb 2010 23:34:35 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201002042334.o14NYZ9j063342@svn.freebsd.org> From: Andrew Thompson Date: Thu, 4 Feb 2010 23:34:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203506 - in head/sys/dev/usb: . serial X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2010 23:34:35 -0000 Author: thompsa Date: Thu Feb 4 23:34:35 2010 New Revision: 203506 URL: http://svn.freebsd.org/changeset/base/203506 Log: Properly name the 0x0016 ZTE product as MF633R now that its known. Modified: head/sys/dev/usb/serial/u3g.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/serial/u3g.c ============================================================================== --- head/sys/dev/usb/serial/u3g.c Thu Feb 4 21:51:33 2010 (r203505) +++ head/sys/dev/usb/serial/u3g.c Thu Feb 4 23:34:35 2010 (r203506) @@ -362,7 +362,6 @@ static const struct usb_device_id u3g_de U3G_DEV(QUALCOMMINC, E0012, 0), U3G_DEV(QUALCOMMINC, E0013, 0), U3G_DEV(QUALCOMMINC, E0014, 0), - U3G_DEV(QUALCOMMINC, E0016, 0), U3G_DEV(QUALCOMMINC, E0017, 0), U3G_DEV(QUALCOMMINC, E0018, 0), U3G_DEV(QUALCOMMINC, E0019, 0), @@ -409,6 +408,7 @@ static const struct usb_device_id u3g_de U3G_DEV(QUALCOMMINC, E2003, 0), U3G_DEV(QUALCOMMINC, MF626, 0), U3G_DEV(QUALCOMMINC, MF628, 0), + U3G_DEV(QUALCOMMINC, MF633R, 0), U3G_DEV(QUANTA, GKE, 0), U3G_DEV(QUANTA, GLE, 0), U3G_DEV(QUANTA, GLX, 0), Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Thu Feb 4 21:51:33 2010 (r203505) +++ head/sys/dev/usb/usbdevs Thu Feb 4 23:34:35 2010 (r203506) @@ -2430,7 +2430,7 @@ product QUALCOMMINC E0012 0x0012 3G mode product QUALCOMMINC E0013 0x0013 3G modem product QUALCOMMINC E0014 0x0014 3G modem product QUALCOMMINC MF628 0x0015 3G modem -product QUALCOMMINC E0016 0x0016 3G modem +product QUALCOMMINC MF633R 0x0016 ZTE WCDMA modem product QUALCOMMINC E0017 0x0017 3G modem product QUALCOMMINC E0018 0x0018 3G modem product QUALCOMMINC E0019 0x0019 3G modem From owner-svn-src-all@FreeBSD.ORG Thu Feb 4 23:52:53 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F074C106566B; Thu, 4 Feb 2010 23:52:53 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from asmtpout029.mac.com (asmtpout029.mac.com [17.148.16.104]) by mx1.freebsd.org (Postfix) with ESMTP id A4BF98FC14; Thu, 4 Feb 2010 23:52:53 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=us-ascii Received: from macbook-pro.lan.xcllnt.net (mail.xcllnt.net [75.101.29.67]) by asmtp029.mac.com (Sun Java(tm) System Messaging Server 6.3-8.01 (built Dec 16 2008; 32bit)) with ESMTPSA id <0KXC00IBVCZOD250@asmtp029.mac.com>; Thu, 04 Feb 2010 15:52:41 -0800 (PST) X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx engine=5.0.0-0908210000 definitions=main-1002040228 From: Marcel Moolenaar In-reply-to: <201002040854.o148sES7066692@svn.freebsd.org> Date: Thu, 04 Feb 2010 15:52:36 -0800 Message-id: References: <201002040854.o148sES7066692@svn.freebsd.org> To: Alexander Motin X-Mailer: Apple Mail (2.1077) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r203484 - head/sys/dev/mpt X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2010 23:52:54 -0000 On Feb 4, 2010, at 12:54 AM, Alexander Motin wrote: > Author: mav > Date: Thu Feb 4 08:54:14 2010 > New Revision: 203484 > URL: http://svn.freebsd.org/changeset/base/203484 > > Log: > Do not release device, when changing number of openings. Thanks! -- Marcel Moolenaar xcllnt@mac.com From owner-svn-src-all@FreeBSD.ORG Fri Feb 5 01:47:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 347F01065670; Fri, 5 Feb 2010 01:47:44 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2502A8FC19; Fri, 5 Feb 2010 01:47:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o151liGx092783; Fri, 5 Feb 2010 01:47:44 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o151lhuF092780; Fri, 5 Feb 2010 01:47:43 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201002050147.o151lhuF092780@svn.freebsd.org> From: Andrew Thompson Date: Fri, 5 Feb 2010 01:47:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203507 - in head/sys/dev/usb: . serial X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2010 01:47:44 -0000 Author: thompsa Date: Fri Feb 5 01:47:43 2010 New Revision: 203507 URL: http://svn.freebsd.org/changeset/base/203507 Log: The ZTE MF633R modem has a different type of cdrom driver disk, add the product ID and use a standard scsi eject. Reported by: Patrick Lamaiziere MFC after: 3 days Modified: head/sys/dev/usb/serial/u3g.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/serial/u3g.c ============================================================================== --- head/sys/dev/usb/serial/u3g.c Thu Feb 4 23:34:35 2010 (r203506) +++ head/sys/dev/usb/serial/u3g.c Fri Feb 5 01:47:43 2010 (r203507) @@ -498,6 +498,7 @@ static const struct usb_device_id u3g_de U3G_DEV(NOVATEL, ZEROCD, U3GINIT_SCSIEJECT), U3G_DEV(OPTION, GTICON322, U3GINIT_REZERO), U3G_DEV(QUALCOMMINC, ZTE_STOR, U3GINIT_ZTESTOR), + U3G_DEV(QUALCOMMINC, ZTE_STOR2, U3GINIT_SCSIEJECT), U3G_DEV(SIERRA, TRUINSTALL, U3GINIT_SIERRA), #undef U3G_DEV }; Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Thu Feb 4 23:34:35 2010 (r203506) +++ head/sys/dev/usb/usbdevs Fri Feb 5 01:47:43 2010 (r203507) @@ -2456,6 +2456,7 @@ product QUALCOMMINC E0048 0x0048 3G mode product QUALCOMMINC E0049 0x0049 3G modem product QUALCOMMINC E0051 0x0051 3G modem product QUALCOMMINC E0052 0x0052 3G modem +product QUALCOMMINC ZTE_STOR2 0x0053 USB ZTE Storage product QUALCOMMINC E0054 0x0054 3G modem product QUALCOMMINC E0055 0x0055 3G modem product QUALCOMMINC E0057 0x0057 3G modem From owner-svn-src-all@FreeBSD.ORG Fri Feb 5 02:40:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3F9E31065692; Fri, 5 Feb 2010 02:40:43 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2F9818FC13; Fri, 5 Feb 2010 02:40:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o152eh2Q004563; Fri, 5 Feb 2010 02:40:43 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o152ehh8004561; Fri, 5 Feb 2010 02:40:43 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201002050240.o152ehh8004561@svn.freebsd.org> From: Neel Natu Date: Fri, 5 Feb 2010 02:40:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203508 - head/sys/mips/sibyte X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2010 02:40:43 -0000 Author: neel Date: Fri Feb 5 02:40:42 2010 New Revision: 203508 URL: http://svn.freebsd.org/changeset/base/203508 Log: style: don't need to use braces for single line control statements. Modified: head/sys/mips/sibyte/sb_zbpci.c Modified: head/sys/mips/sibyte/sb_zbpci.c ============================================================================== --- head/sys/mips/sibyte/sb_zbpci.c Fri Feb 5 01:47:43 2010 (r203507) +++ head/sys/mips/sibyte/sb_zbpci.c Fri Feb 5 02:40:42 2010 (r203508) @@ -83,9 +83,8 @@ zbpci_attach(device_t dev) size = (PCI_BUSMAX + 1) * (PCI_SLOTMAX + 1) * (PCI_FUNCMAX + 1) * 256; res = bus_alloc_resource(dev, SYS_RES_MEMORY, &rid, CFG_PADDR_BASE, CFG_PADDR_BASE + size - 1, size, 0); - if (res == NULL) { + if (res == NULL) panic("Cannot allocate resource for config space accesses."); - } /* * Allocate KVA for accessing PCI config space. @@ -97,25 +96,21 @@ zbpci_attach(device_t dev) return (ENOMEM); } - for (n = 0; n < mp_ncpus; ++n) { + for (n = 0; n < mp_ncpus; ++n) zbpci_config_space[n].vaddr = va + n * PAGE_SIZE; - } /* * Sibyte has the PCI bus hierarchy rooted at bus 0 and HT-PCI * hierarchy rooted at bus 1. */ - if (device_add_child(dev, "pci", 0) == NULL) { + if (device_add_child(dev, "pci", 0) == NULL) panic("zbpci_attach: could not add pci bus 0.\n"); - } - if (device_add_child(dev, "pci", 1) == NULL) { + if (device_add_child(dev, "pci", 1) == NULL) panic("zbpci_attach: could not add pci bus 1.\n"); - } - if (bootverbose) { + if (bootverbose) device_printf(dev, "attached.\n"); - } return (bus_generic_attach(dev)); } From owner-svn-src-all@FreeBSD.ORG Fri Feb 5 03:20:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B100E106566B; Fri, 5 Feb 2010 03:20:47 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A00C28FC12; Fri, 5 Feb 2010 03:20:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o153KlL2013639; Fri, 5 Feb 2010 03:20:47 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o153KlfC013634; Fri, 5 Feb 2010 03:20:47 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201002050320.o153KlfC013634@svn.freebsd.org> From: Neel Natu Date: Fri, 5 Feb 2010 03:20:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203509 - head/sys/mips/sibyte X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2010 03:20:47 -0000 Author: neel Date: Fri Feb 5 03:20:47 2010 New Revision: 203509 URL: http://svn.freebsd.org/changeset/base/203509 Log: Reimplement all functions to access the system control unit in C. The only reason we need to have the sb_load64() and sb_store64() functions in assembly is to cheat the compiler and generate the 'ld' and 'sd' instructions which it otherwise will not do when compiling for a 32-bit architecture. There are some 64-bit registers in the SCD unit that must be accessed using 64-bit load and store instructions. Modified: head/sys/mips/sibyte/sb_asm.S head/sys/mips/sibyte/sb_scd.c head/sys/mips/sibyte/sb_scd.h head/sys/mips/sibyte/sb_zbbus.c Modified: head/sys/mips/sibyte/sb_asm.S ============================================================================== --- head/sys/mips/sibyte/sb_asm.S Fri Feb 5 02:40:42 2010 (r203508) +++ head/sys/mips/sibyte/sb_asm.S Fri Feb 5 03:20:47 2010 (r203509) @@ -22,6 +22,8 @@ * 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 @@ -41,115 +43,40 @@ .set noreorder /* - * return (MIPS_PHYS_TO_KSEG1(0x10020008)) - * Parameters: none + * Parameters: uint32_t ptr + * Return value: *(uint64_t *)ptr */ -LEAF(sb_read_syscfg) - lui v0, 0xb002 - ori v0, v0, 0x8 - ld v1, 0(v0) /* syscfg = MIPS_PHYS_TO_KSEG1(0x10020008) */ +LEAF(sb_load64) + ld v1, 0(a0) /* result = *(uint64_t *)ptr */ move v0, v1 - dsll32 v0, v0, 0 - dsrl32 v0, v0, 0 /* v0 = lower_uint32(mask) */ +#if defined(TARGET_BIG_ENDIAN) + dsll32 v1, v1, 0 + dsrl32 v1, v1, 0 /* v1 = lower_uint32(result) */ jr ra - dsrl32 v1, v1, 0 /* v1 = upper_uint32(mask) */ -END(sb_read_syscfg) - -/* - * MIPS_PHYS_TO_KSEG1(0x10020008) = (uint64_t)val - * Parameters: - * - lower_uint32(val): a0 - * - upper_uint32(val): a1 - */ -LEAF(sb_write_syscfg) - lui v0, 0xb002 - ori v0, v0, 0x8 - dsll32 a1, a1, 0 /* clear lower 32 bits of a1 */ - dsll32 a0, a0, 0 - dsrl32 a0, a0, 0 /* clear upper 32 bits of a0 */ - or a1, a1, a0 - sd a1, 0(v0) /* MIPS_PHYS_TO_KSEG1(0x10020008) = val */ - jr ra - nop - nop -END(sb_write_syscfg) - -/* - * MIPS_PHYS_TO_KSEG1(0x10020028) |= (1 << intsrc) - * - * Parameters: - * - intsrc (a0) - */ -LEAF(sb_disable_intsrc) - lui v0, 0xb002 - ori v0, v0, 0x28 - ld v1, 0(v0) /* mask = MIPS_PHYS_TO_KSEG1(0x10020028) */ - li a1, 1 - dsllv a1, a1, a0 - or a1, a1, v1 /* mask |= (1 << intsrc) */ - jr ra - sd a1, 0(v0) /* MIPS_PHYS_TO_KSEG1(0x10020028) = mask */ -END(sb_disable_intsrc) - -/* - * MIPS_PHYS_TO_KSEG1(0x10020028) &= ~(1 << intsrc) - * - * Parameters: - * - intsrc (a0) - */ -LEAF(sb_enable_intsrc) - lui v0, 0xb002 - ori v0, v0, 0x28 - ld v1, 0(v0) /* mask = MIPS_PHYS_TO_KSEG1(0x10020028) */ - li a2, 1 - dsllv a2, a2, a0 - nor a2, zero, a2 - and a2, a2, v1 /* mask &= ~(1 << intsrc) */ - sd a2, 0(v0) /* MIPS_PHYS_TO_KSEG1(0x10020028) = mask */ - jr ra - nop -END(sb_enable_intsrc) - -/* - * return ((uint64_t)MIPS_PHYS_TO_KSEG1(0x10020028)) - * Parameters: none - */ -LEAF(sb_read_intsrc_mask) - lui v0, 0xb002 - ori v0, v0, 0x28 - ld v1, 0(v0) /* mask = MIPS_PHYS_TO_KSEG1(0x10020028) */ - move v0, v1 + dsrl32 v0, v0, 0 /* v0 = upper_uint32(result) */ +#else dsll32 v0, v0, 0 - dsrl32 v0, v0, 0 /* v0 = lower_uint32(mask) */ + dsrl32 v0, v0, 0 /* v0 = lower_uint32(result) */ jr ra - dsrl32 v1, v1, 0 /* v1 = upper_uint32(mask) */ -END(sb_read_intsrc_mask) - -/* - * return ((uint64_t *)MIPS_PHYS_TO_KSEG1(0x10020200) + intsrc) - * Parameters: - * - intsrc (a0) - */ -LEAF(sb_read_intmap) - sll a0, a0, 3 /* compute the offset of the intmap register */ - lui v0, 0xb002 - addu a0, a0, v0 - ld v0, 512(a0) /* v0 = MIPS_PHYS_TO_KSEG1(0x10020200) + off */ - jr ra - nop -END(sb_read_intmap) - -/* - * (uint64_t *)MIPS_PHYS_TO_KSEG1(0x10020200) + intsrc = irq - * Parameters: - * - intsrc (a0) - * - irq (a1) - */ -LEAF(sb_write_intmap) - sll a0, a0, 0x3 /* compute the offset of the intmap register */ - lui v0, 0xb002 - addu a0, a0, v0 - sd a1, 512(a0) /* MIPS_PHYS_TO_KSEG1(0x10020200) + off = irq */ - jr ra - nop -END(sb_write_intmap) + dsrl32 v1, v1, 0 /* v1 = upper_uint32(result) */ +#endif +END(sb_load64) + +/* + * Parameters: uint32_t ptr, uint64_t val + * Return value: void + */ +LEAF(sb_store64) +#if defined(TARGET_BIG_ENDIAN) + dsll32 a2, a2, 0 /* a2 = upper_uint32(val) */ + dsll32 a3, a3, 0 /* a3 = lower_uint32(val) */ + dsrl32 a3, a3, 0 +#else + dsll32 a3, a3, 0 /* a3 = upper_uint32(val) */ + dsll32 a2, a2, 0 /* a2 = lower_uint32(val) */ + dsrl32 a2, a2, 0 +#endif + or t0, a2, a3 + jr ra + sd t0, 0(a0) +END(sb_store64) Modified: head/sys/mips/sibyte/sb_scd.c ============================================================================== --- head/sys/mips/sibyte/sb_scd.c Fri Feb 5 02:40:42 2010 (r203508) +++ head/sys/mips/sibyte/sb_scd.c Fri Feb 5 03:20:47 2010 (r203509) @@ -23,6 +23,10 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ + +#include +__FBSDID("$FreeBSD$"); + #include #include #include @@ -30,10 +34,12 @@ #include #include +#include #include "sb_scd.h" -__FBSDID("$FreeBSD$"); +extern void sb_store64(uint32_t addr, uint64_t val); +extern uint64_t sb_load64(uint32_t addr); /* * System Control and Debug (SCD) unit on the Sibyte ZBbus. @@ -44,8 +50,38 @@ __FBSDID("$FreeBSD$"); */ #define GET_VAL_64(x, b, n) (((x) >> (b)) & ((1ULL << (n)) - 1)) +#define SYSREV_ADDR MIPS_PHYS_TO_KSEG1(0x10020000) +#define SYSREV_NUM_PROCESSORS(x) GET_VAL_64((x), 24, 4) + +#define SYSCFG_ADDR MIPS_PHYS_TO_KSEG1(0x10020008) #define SYSCFG_PLLDIV(x) GET_VAL_64((x), 7, 5) +#define INTSRC_MASK_ADDR(cpu) \ + (MIPS_PHYS_TO_KSEG1(0x10020028) | ((cpu) << 13)) + +#define INTSRC_MAP_ADDR(cpu, intsrc) \ + (MIPS_PHYS_TO_KSEG1(0x10020200) | ((cpu) << 13)) + (intsrc * 8) + +#define MAILBOX_SET_ADDR(cpu) \ + (MIPS_PHYS_TO_KSEG1(0x100200C8) | ((cpu) << 13)) + +#define MAILBOX_CLEAR_ADDR(cpu) \ + (MIPS_PHYS_TO_KSEG1(0x100200D0) | ((cpu) << 13)) + +static uint64_t +sb_read_syscfg(void) +{ + + return (sb_load64(SYSCFG_ADDR)); +} + +static void +sb_write_syscfg(uint64_t val) +{ + + sb_store64(SYSCFG_ADDR, val); +} + uint64_t sb_cpu_speed(void) { @@ -76,6 +112,71 @@ sb_system_reset(void) sb_write_syscfg(syscfg); } +void +sb_disable_intsrc(int cpu, int src) +{ + uint32_t regaddr; + uint64_t val; + + regaddr = INTSRC_MASK_ADDR(cpu); + + val = sb_load64(regaddr); + val |= 1ULL << src; + sb_store64(regaddr, val); +} + +void +sb_enable_intsrc(int cpu, int src) +{ + uint32_t regaddr; + uint64_t val; + + regaddr = INTSRC_MASK_ADDR(cpu); + + val = sb_load64(regaddr); + val &= ~(1ULL << src); + sb_store64(regaddr, val); +} + +void +sb_write_intsrc_mask(int cpu, uint64_t val) +{ + uint32_t regaddr; + + regaddr = INTSRC_MASK_ADDR(cpu); + sb_store64(regaddr, val); +} + +uint64_t +sb_read_intsrc_mask(int cpu) +{ + uint32_t regaddr; + uint64_t val; + + regaddr = INTSRC_MASK_ADDR(cpu); + val = sb_load64(regaddr); + + return (val); +} + +void +sb_write_intmap(int cpu, int intsrc, int intrnum) +{ + uint32_t regaddr; + + regaddr = INTSRC_MAP_ADDR(cpu, intsrc); + sb_store64(regaddr, intrnum); +} + +int +sb_read_intmap(int cpu, int intsrc) +{ + uint32_t regaddr; + + regaddr = INTSRC_MAP_ADDR(cpu, intsrc); + return (sb_load64(regaddr) & 0x7); +} + int sb_route_intsrc(int intsrc) { @@ -86,16 +187,10 @@ sb_route_intsrc(int intsrc) /* * Interrupt 5 is used by sources internal to the CPU (e.g. timer). - * Use a deterministic mapping for the remaining sources to map to - * interrupt numbers 0 through 4. + * Use a deterministic mapping for the remaining sources. */ intrnum = intsrc % 5; - /* - * Program the interrupt mapper while we are here. - */ - sb_write_intmap(intsrc, intrnum); - return (intrnum); } @@ -116,16 +211,14 @@ scd_attach(device_t dev) int rid; struct resource *res; - if (bootverbose) { + if (bootverbose) device_printf(dev, "attached.\n"); - } rid = 0; res = bus_alloc_resource(dev, SYS_RES_MEMORY, &rid, SCD_PHYSADDR, SCD_PHYSADDR + SCD_SIZE - 1, SCD_SIZE, 0); - if (res == NULL) { + if (res == NULL) panic("Cannot allocate resource for system control and debug."); - } return (0); } Modified: head/sys/mips/sibyte/sb_scd.h ============================================================================== --- head/sys/mips/sibyte/sb_scd.h Fri Feb 5 02:40:42 2010 (r203508) +++ head/sys/mips/sibyte/sb_scd.h Fri Feb 5 03:20:47 2010 (r203509) @@ -22,6 +22,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ */ #ifndef _SB_SCD_H_ @@ -33,14 +35,11 @@ uint64_t sb_cpu_speed(void); void sb_system_reset(void); int sb_route_intsrc(int src); -void sb_enable_intsrc(int src); -void sb_disable_intsrc(int src); -uint64_t sb_read_intsrc_mask(void); - -int sb_read_intmap(int intsrc); -void sb_write_intmap(int intsrc, int intrnum); - -uint64_t sb_read_syscfg(void); -void sb_write_syscfg(uint64_t val); +void sb_enable_intsrc(int cpu, int src); +void sb_disable_intsrc(int cpu, int src); +uint64_t sb_read_intsrc_mask(int cpu); +void sb_write_intsrc_mask(int cpu, uint64_t mask); +void sb_write_intmap(int cpu, int intsrc, int intrnum); +int sb_read_intmap(int cpu, int intsrc); #endif /* _SB_SCD_H_ */ Modified: head/sys/mips/sibyte/sb_zbbus.c ============================================================================== --- head/sys/mips/sibyte/sb_zbbus.c Fri Feb 5 02:40:42 2010 (r203508) +++ head/sys/mips/sibyte/sb_zbbus.c Fri Feb 5 03:20:47 2010 (r203509) @@ -118,7 +118,7 @@ sb_intmap_activate(int intrnum, device_t map = sb_intmap_lookup(intrnum, dev, rid); if (map) { - sb_enable_intsrc(map->intsrc); + sb_enable_intsrc(0, map->intsrc); } else { /* * In zbbus_setup_intr() we blindly call sb_intmap_activate() From owner-svn-src-all@FreeBSD.ORG Fri Feb 5 03:22:05 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2A99A106566B; Fri, 5 Feb 2010 03:22:05 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1B2298FC1A; Fri, 5 Feb 2010 03:22:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o153M44u013955; Fri, 5 Feb 2010 03:22:04 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o153M40q013953; Fri, 5 Feb 2010 03:22:04 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201002050322.o153M40q013953@svn.freebsd.org> From: Neel Natu Date: Fri, 5 Feb 2010 03:22:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203510 - head/sys/mips/sibyte X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2010 03:22:05 -0000 Author: neel Date: Fri Feb 5 03:22:04 2010 New Revision: 203510 URL: http://svn.freebsd.org/changeset/base/203510 Log: Initialize interrupt controller early on. Modified: head/sys/mips/sibyte/sb_machdep.c Modified: head/sys/mips/sibyte/sb_machdep.c ============================================================================== --- head/sys/mips/sibyte/sb_machdep.c Fri Feb 5 03:20:47 2010 (r203509) +++ head/sys/mips/sibyte/sb_machdep.c Fri Feb 5 03:22:04 2010 (r203510) @@ -102,6 +102,22 @@ platform_cpu_init() } static void +sb_intr_init(int cpuid) +{ + int intrnum, intsrc; + + /* + * Disable all sources to the interrupt mapper and setup the mapping + * between an interrupt source and the mips hard interrupt number. + */ + for (intsrc = 0; intsrc < NUM_INTSRC; ++intsrc) { + intrnum = sb_route_intsrc(intsrc); + sb_disable_intsrc(cpuid, intsrc); + sb_write_intmap(cpuid, intsrc, intrnum); + } +} + +static void mips_init(void) { int i, cfe_mem_idx, tmp; @@ -279,6 +295,8 @@ platform_start(__register_t a0, __regist memset(&edata, 0, (vm_offset_t)&end - (vm_offset_t)&edata); mips_postboot_fixup(); + sb_intr_init(0); + /* Initialize pcpu stuff */ mips_pcpu0_init(); From owner-svn-src-all@FreeBSD.ORG Fri Feb 5 06:36:04 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 09DD0106566C; Fri, 5 Feb 2010 06:36:04 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EFBF58FC0C; Fri, 5 Feb 2010 06:36:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o156a3km056264; Fri, 5 Feb 2010 06:36:03 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o156a309056262; Fri, 5 Feb 2010 06:36:03 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201002050636.o156a309056262@svn.freebsd.org> From: Neel Natu Date: Fri, 5 Feb 2010 06:36:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203511 - head/sys/mips/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2010 06:36:04 -0000 Author: neel Date: Fri Feb 5 06:36:03 2010 New Revision: 203511 URL: http://svn.freebsd.org/changeset/base/203511 Log: Correct a comment - we are not setting the exception level but rather are disabling interrupts. Simplify register usage - we can directly load 'curpcb' into 'k1' after interrupts are disabled. There is no need to do so indirectly through 'a1'. Modified: head/sys/mips/mips/swtch.S Modified: head/sys/mips/mips/swtch.S ============================================================================== --- head/sys/mips/mips/swtch.S Fri Feb 5 03:22:04 2010 (r203510) +++ head/sys/mips/mips/swtch.S Fri Feb 5 06:36:03 2010 (r203511) @@ -161,21 +161,19 @@ LEAF(fork_trampoline) DO_AST -/* - * Since interrupts are enabled at this point, we use a1 instead of - * k0 or k1 to store the PCB pointer. This is because k0 and k1 - * are not preserved across interrupts. - */ - GET_CPU_PCPU(a1) - lw a1, PC_CURPCB(a1) -1: - - mfc0 v0, COP_0_STATUS_REG # set exeption level bit. + mfc0 v0, COP_0_STATUS_REG and v0, ~(SR_INT_ENAB) - mtc0 v0, COP_0_STATUS_REG # set exeption level bit. + mtc0 v0, COP_0_STATUS_REG # disable interrupts COP0_SYNC +/* + * The use of k1 for storing the PCB pointer must be done only + * after interrupts are disabled. Otherwise it will get overwritten + * by the interrupt code. + */ .set noat - move k1, a1 + GET_CPU_PCPU(k1) + lw k1, PC_CURPCB(k1) + RESTORE_U_PCB_REG(t0, MULLO, k1) RESTORE_U_PCB_REG(t1, MULHI, k1) mtlo t0 @@ -185,11 +183,6 @@ LEAF(fork_trampoline) RESTORE_U_PCB_REG(v0, V0, k1) _MTC0 a0, COP_0_EXC_PC # set return address -/* - * The use of k1 for storing the PCB pointer must be done only - * after interrupts are disabled. Otherwise it will get overwritten - * by the interrupt code. - */ RESTORE_U_PCB_REG(v1, V1, k1) RESTORE_U_PCB_REG(a0, A0, k1) RESTORE_U_PCB_REG(a1, A1, k1) From owner-svn-src-all@FreeBSD.ORG Fri Feb 5 08:32:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DB3011065672; Fri, 5 Feb 2010 08:32:07 +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 CB6038FC1A; Fri, 5 Feb 2010 08:32:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o158W7DL081991; Fri, 5 Feb 2010 08:32:07 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o158W7xa081989; Fri, 5 Feb 2010 08:32:07 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201002050832.o158W7xa081989@svn.freebsd.org> From: Alexander Motin Date: Fri, 5 Feb 2010 08:32:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203512 - stable/8/sys/dev/sound/pci/hda X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2010 08:32:08 -0000 Author: mav Date: Fri Feb 5 08:32:07 2010 New Revision: 203512 URL: http://svn.freebsd.org/changeset/base/203512 Log: MFC r202736: Print playback channels paths in order of their sequence numbers, not nids. 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) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/sound/pci/hda/hdac.c ============================================================================== --- stable/8/sys/dev/sound/pci/hda/hdac.c Fri Feb 5 06:36:03 2010 (r203511) +++ stable/8/sys/dev/sound/pci/hda/hdac.c Fri Feb 5 08:32:07 2010 (r203512) @@ -7091,19 +7091,19 @@ hdac_dump_dac(struct hdac_pcm_devinfo *p { struct hdac_devinfo *devinfo = pdevinfo->devinfo; struct hdac_softc *sc = devinfo->codec->sc; + struct hdac_audio_as *as; struct hdac_widget *w; int i, printed = 0; if (pdevinfo->play < 0) return; - for (i = devinfo->startnode; i < devinfo->endnode; i++) { - w = hdac_widget_get(devinfo, i); - if (w == NULL || w->enable == 0) + as = &devinfo->function.audio.as[sc->chans[pdevinfo->play].as]; + for (i = 0; i < 16; i++) { + if (as->pins[i] <= 0) continue; - if (w->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX) - continue; - if (w->bindas != sc->chans[pdevinfo->play].as) + w = hdac_widget_get(devinfo, as->pins[i]); + if (w == NULL || w->enable == 0) continue; if (printed == 0) { printed = 1; @@ -7111,7 +7111,7 @@ hdac_dump_dac(struct hdac_pcm_devinfo *p device_printf(pdevinfo->dev, "Playback:\n"); } device_printf(pdevinfo->dev, "\n"); - hdac_dump_dst_nid(pdevinfo, i, 0); + hdac_dump_dst_nid(pdevinfo, as->pins[i], 0); } } From owner-svn-src-all@FreeBSD.ORG Fri Feb 5 08:36:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A7CC0106566C; Fri, 5 Feb 2010 08:36:33 +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 958178FC13; Fri, 5 Feb 2010 08:36:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o158aXp2083001; Fri, 5 Feb 2010 08:36:33 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o158aX3A082999; Fri, 5 Feb 2010 08:36:33 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201002050836.o158aX3A082999@svn.freebsd.org> From: Alexander Motin Date: Fri, 5 Feb 2010 08:36: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: r203513 - stable/8/sys/dev/sound/pci/hda X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2010 08:36:33 -0000 Author: mav Date: Fri Feb 5 08:36:33 2010 New Revision: 203513 URL: http://svn.freebsd.org/changeset/base/203513 Log: MFC r202789, r202796: - Improve tracer, to handle more cases of input-to-output monitoring loopback. - Use "igain" mixer control for input-to-output monitoring loopback. - Allow AD1981HD codecs to use playback mixer. Now driver should be able to really use it. - Fix bug in shared muters operation. 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) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/sound/pci/hda/hdac.c ============================================================================== --- stable/8/sys/dev/sound/pci/hda/hdac.c Fri Feb 5 08:32:07 2010 (r203512) +++ stable/8/sys/dev/sound/pci/hda/hdac.c Fri Feb 5 08:36:33 2010 (r203513) @@ -86,7 +86,7 @@ #include "mixer_if.h" -#define HDA_DRV_TEST_REV "20100112_0140" +#define HDA_DRV_TEST_REV "20100122_0141" SND_DECLARE_FILE("$FreeBSD$"); @@ -3934,8 +3934,8 @@ hdac_audio_ctl_ossmixer_set(struct snd_m rvol = rvol * pdevinfo->right[j] / 100; } } - mute = (left == 0) ? HDA_AMP_MUTE_LEFT : 0; - mute |= (right == 0) ? HDA_AMP_MUTE_RIGHT : 0; + mute = (lvol == 0) ? HDA_AMP_MUTE_LEFT : 0; + mute |= (rvol == 0) ? HDA_AMP_MUTE_RIGHT : 0; lvol = (lvol * ctl->step + 50) / 100; rvol = (rvol * ctl->step + 50) / 100; hdac_audio_ctl_amp_set(ctl, mute, lvol, rvol); @@ -4757,37 +4757,6 @@ hdac_vendor_patch_parse(struct hdac_devi } switch (id) { -#if 0 - case HDA_CODEC_ALC883: - /* - * nid: 24/25 = External (jack) or Internal (fixed) Mic. - * Clear vref cap for jack connectivity. - */ - w = hdac_widget_get(devinfo, 24); - if (w != NULL && w->enable != 0 && w->type == - HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX && - (w->wclass.pin.config & - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK) == - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_JACK) - w->wclass.pin.cap &= ~( - HDA_PARAM_PIN_CAP_VREF_CTRL_100_MASK | - HDA_PARAM_PIN_CAP_VREF_CTRL_80_MASK | - HDA_PARAM_PIN_CAP_VREF_CTRL_50_MASK); - w = hdac_widget_get(devinfo, 25); - if (w != NULL && w->enable != 0 && w->type == - HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX && - (w->wclass.pin.config & - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK) == - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_JACK) - w->wclass.pin.cap &= ~( - HDA_PARAM_PIN_CAP_VREF_CTRL_100_MASK | - HDA_PARAM_PIN_CAP_VREF_CTRL_80_MASK | - HDA_PARAM_PIN_CAP_VREF_CTRL_50_MASK); - /* - * nid: 26 = Line-in, leave it alone. - */ - break; -#endif case HDA_CODEC_AD1983: /* * This codec has several possible usages, but none @@ -4900,10 +4869,19 @@ hdac_vendor_patch_parse(struct hdac_devi w = hdac_widget_get(devinfo, 31); if (w != NULL) w->enable = 0; - /* Disable playback mixer, use direct bypass. */ - w = hdac_widget_get(devinfo, 14); + /* Disable direct playback, use mixer. */ + w = hdac_widget_get(devinfo, 5); if (w != NULL) - w->enable = 0; + w->connsenable[0] = 0; + w = hdac_widget_get(devinfo, 6); + if (w != NULL) + w->connsenable[0] = 0; + w = hdac_widget_get(devinfo, 9); + if (w != NULL) + w->connsenable[0] = 0; + w = hdac_widget_get(devinfo, 24); + if (w != NULL) + w->connsenable[0] = 0; break; } } @@ -5279,6 +5257,8 @@ hdac_audio_trace_to_out(struct hdac_devi " %*snid %d found output association %d\n", depth + 1, "", w->nid, w->bindas); ); + if (w->bindas >= 0) + w->pflags |= HDA_ADC_MONITOR; return (1); } else { HDA_BOOTHVERBOSE( @@ -5321,7 +5301,7 @@ hdac_audio_trace_to_out(struct hdac_devi } break; } - if (res) + if (res && w->bindas == -1) w->bindas = -2; HDA_BOOTHVERBOSE( @@ -5368,11 +5348,39 @@ hdac_audio_trace_as_extra(struct hdac_de " nid %d is input monitor\n", w->nid); ); - w->pflags |= HDA_ADC_MONITOR; w->ossdev = SOUND_MIXER_IMIX; } } + /* Other inputs monitor */ + /* Find input pins supplying signal for output associations. + Hope it will be input monitoring. */ + HDA_BOOTVERBOSE( + device_printf(devinfo->codec->sc->dev, + "Tracing other input monitors\n"); + ); + for (j = devinfo->startnode; j < devinfo->endnode; j++) { + w = hdac_widget_get(devinfo, j); + if (w == NULL || w->enable == 0) + continue; + if (w->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX) + continue; + if (w->bindas < 0 || as[w->bindas].dir != HDA_CTL_IN) + continue; + HDA_BOOTVERBOSE( + device_printf(devinfo->codec->sc->dev, + " Tracing nid %d to out\n", + j); + ); + if (hdac_audio_trace_to_out(devinfo, w->nid, 0)) { + HDA_BOOTVERBOSE( + device_printf(devinfo->codec->sc->dev, + " nid %d is input monitor\n", + w->nid); + ); + } + } + /* Beeper */ HDA_BOOTVERBOSE( device_printf(devinfo->codec->sc->dev, @@ -5748,6 +5756,7 @@ hdac_audio_disable_notselected(struct hd static void hdac_audio_disable_crossas(struct hdac_devinfo *devinfo) { + struct hdac_audio_as *ases = devinfo->function.audio.as; struct hdac_widget *w, *cw; struct hdac_audio_ctl *ctl; int i, j; @@ -5770,7 +5779,10 @@ hdac_audio_disable_crossas(struct hdac_d cw = hdac_widget_get(devinfo, w->conns[j]); if (cw == NULL || w->enable == 0) continue; - if (cw->bindas == -2) + if (cw->bindas == -2 || + ((w->pflags & HDA_ADC_MONITOR) && + cw->bindas >= 0 && + ases[cw->bindas].dir == HDA_CTL_IN)) continue; if (w->bindas == cw->bindas && (w->bindseqmask & cw->bindseqmask) != 0) @@ -5789,8 +5801,12 @@ hdac_audio_disable_crossas(struct hdac_d while ((ctl = hdac_audio_ctl_each(devinfo, &i)) != NULL) { if (ctl->enable == 0 || ctl->childwidget == NULL) continue; - if (ctl->widget->bindas == -2 || - ctl->childwidget->bindas == -2) + if (ctl->widget->bindas == -2) + continue; + if (ctl->childwidget->bindas == -2 || + ((ctl->widget->pflags & HDA_ADC_MONITOR) && + ctl->childwidget->bindas >= 0 && + ases[ctl->childwidget->bindas].dir == HDA_CTL_IN)) continue; if (ctl->widget->bindas != ctl->childwidget->bindas || (ctl->widget->bindseqmask & ctl->childwidget->bindseqmask) == 0) { @@ -5909,7 +5925,7 @@ hdac_audio_ctl_source_amp(struct hdac_de * Find controls to control amplification for destination. */ static void -hdac_audio_ctl_dest_amp(struct hdac_devinfo *devinfo, nid_t nid, +hdac_audio_ctl_dest_amp(struct hdac_devinfo *devinfo, nid_t nid, int index, int ossdev, int depth, int need) { struct hdac_audio_as *as = devinfo->function.audio.as; @@ -5968,6 +5984,8 @@ hdac_audio_ctl_dest_amp(struct hdac_devi int tneed = need; if (w->connsenable[i] == 0) continue; + if (index >= 0 && i != index) + continue; ctl = hdac_audio_ctl_amp_get(devinfo, w->nid, HDA_CTL_IN, i, 1); if (ctl) { @@ -5977,7 +5995,7 @@ hdac_audio_ctl_dest_amp(struct hdac_devi ctl->possmask |= (1 << ossdev); tneed &= ~HDA_CTL_GIVE(ctl); } - hdac_audio_ctl_dest_amp(devinfo, w->conns[i], ossdev, + hdac_audio_ctl_dest_amp(devinfo, w->conns[i], -1, ossdev, depth + 1, tneed); } } @@ -6184,8 +6202,8 @@ hdac_audio_assign_mixers(struct hdac_dev { struct hdac_audio_as *as = devinfo->function.audio.as; struct hdac_audio_ctl *ctl; - struct hdac_widget *w; - int i; + struct hdac_widget *w, *cw; + int i, j; /* Assign mixers to the tree. */ for (i = devinfo->startnode; i < devinfo->endnode; i++) { @@ -6200,23 +6218,38 @@ hdac_audio_assign_mixers(struct hdac_dev continue; hdac_audio_ctl_source_amp(devinfo, w->nid, -1, w->ossdev, 1, 0, 1); - } else if ((w->pflags & HDA_ADC_MONITOR) != 0) { - if (w->ossdev < 0) - continue; + } else if (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_INPUT) { + hdac_audio_ctl_dest_amp(devinfo, w->nid, -1, + SOUND_MIXER_RECLEV, 0, 1); + } else if (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX && + as[w->bindas].dir == HDA_CTL_OUT) { + hdac_audio_ctl_dest_amp(devinfo, w->nid, -1, + SOUND_MIXER_VOLUME, 0, 1); + } + if (w->ossdev == SOUND_MIXER_IMIX) { if (hdac_audio_ctl_source_amp(devinfo, w->nid, -1, w->ossdev, 1, 0, 1)) { /* If we are unable to control input monitor as source - try to control it as destination. */ - hdac_audio_ctl_dest_amp(devinfo, w->nid, + hdac_audio_ctl_dest_amp(devinfo, w->nid, -1, w->ossdev, 0, 1); } - } else if (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_INPUT) { - hdac_audio_ctl_dest_amp(devinfo, w->nid, - SOUND_MIXER_RECLEV, 0, 1); - } else if (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX && - as[w->bindas].dir == HDA_CTL_OUT) { - hdac_audio_ctl_dest_amp(devinfo, w->nid, - SOUND_MIXER_VOLUME, 0, 1); + } + if (w->pflags & HDA_ADC_MONITOR) { + for (j = 0; j < w->nconns; j++) { + if (!w->connsenable[j]) + continue; + cw = hdac_widget_get(devinfo, w->conns[j]); + if (cw == NULL || cw->enable == 0) + continue; + if (cw->bindas == -1) + continue; + if (cw->bindas >= 0 && + as[cw->bindas].dir != HDA_CTL_IN) + continue; + hdac_audio_ctl_dest_amp(devinfo, + w->nid, j, SOUND_MIXER_IGAIN, 0, 1); + } } } /* Treat unrequired as possible. */ @@ -6715,8 +6748,8 @@ hdac_dump_ctls(struct hdac_pcm_devinfo * if (flag == 0) { flag = ~(SOUND_MASK_VOLUME | SOUND_MASK_PCM | SOUND_MASK_CD | SOUND_MASK_LINE | SOUND_MASK_RECLEV | - SOUND_MASK_MIC | SOUND_MASK_SPEAKER | SOUND_MASK_OGAIN | - SOUND_MASK_IMIX | SOUND_MASK_MONITOR); + SOUND_MASK_MIC | SOUND_MASK_SPEAKER | SOUND_MASK_IGAIN | + SOUND_MASK_OGAIN | SOUND_MASK_IMIX | SOUND_MASK_MONITOR); } for (j = 0; j < SOUND_MIXER_NRDEVICES; j++) { @@ -7160,7 +7193,7 @@ hdac_dump_mix(struct hdac_pcm_devinfo *p w = hdac_widget_get(devinfo, i); if (w == NULL || w->enable == 0) continue; - if ((w->pflags & HDA_ADC_MONITOR) == 0) + if (w->ossdev != SOUND_MIXER_IMIX) continue; if (printed == 0) { printed = 1; @@ -8127,6 +8160,7 @@ hdac_pcm_attach(device_t dev) hdac_dump_ctls(pdevinfo, "Speaker/Beep Volume", SOUND_MASK_SPEAKER); hdac_dump_ctls(pdevinfo, "Recording Level", SOUND_MASK_RECLEV); hdac_dump_ctls(pdevinfo, "Input Mix Level", SOUND_MASK_IMIX); + hdac_dump_ctls(pdevinfo, "Input Monitoring Level", SOUND_MASK_IGAIN); hdac_dump_ctls(pdevinfo, NULL, 0); device_printf(dev, "\n"); ); From owner-svn-src-all@FreeBSD.ORG Fri Feb 5 08:48:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E45CE106566C; Fri, 5 Feb 2010 08:48:44 +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 D45368FC15; Fri, 5 Feb 2010 08:48:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o158miRR085793; Fri, 5 Feb 2010 08:48:44 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o158mioT085790; Fri, 5 Feb 2010 08:48:44 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201002050848.o158mioT085790@svn.freebsd.org> From: Alexander Motin Date: Fri, 5 Feb 2010 08:48: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: r203514 - stable/8/sbin/camcontrol X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2010 08:48:45 -0000 Author: mav Date: Fri Feb 5 08:48:44 2010 New Revision: 203514 URL: http://svn.freebsd.org/changeset/base/203514 Log: MFC r202694: - Add -v argument to `camcontrol identify` command. It makes camcontrol print full identify data block. - Improve identify result view a bit and add TRIM support. Modified: stable/8/sbin/camcontrol/camcontrol.8 stable/8/sbin/camcontrol/camcontrol.c Directory Properties: stable/8/sbin/camcontrol/ (props changed) Modified: stable/8/sbin/camcontrol/camcontrol.8 ============================================================================== --- stable/8/sbin/camcontrol/camcontrol.8 Fri Feb 5 08:36:33 2010 (r203513) +++ stable/8/sbin/camcontrol/camcontrol.8 Fri Feb 5 08:48:44 2010 (r203514) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 9, 2009 +.Dd January 20, 2010 .Dt CAMCONTROL 8 .Os .Sh NAME @@ -62,6 +62,7 @@ .Ic identify .Op device id .Op generic args +.Op Fl v .Nm .Ic reportluns .Op device id Modified: stable/8/sbin/camcontrol/camcontrol.c ============================================================================== --- stable/8/sbin/camcontrol/camcontrol.c Fri Feb 5 08:36:33 2010 (r203513) +++ stable/8/sbin/camcontrol/camcontrol.c Fri Feb 5 08:48:44 2010 (r203514) @@ -1166,8 +1166,6 @@ atacapprint(struct ata_params *parm) } printf("\n"); - printf("overlap%ssupported\n", - parm->capabilities1 & ATA_SUPPORT_OVERLAP ? " " : " not "); if (parm->media_rotation_rate == 1) { printf("media RPM non-rotating\n"); } else if (parm->media_rotation_rate >= 0x0401 && @@ -1187,20 +1185,26 @@ atacapprint(struct ata_params *parm) printf("flush cache %s %s\n", parm->support.command2 & ATA_SUPPORT_FLUSHCACHE ? "yes" : "no", parm->enabled.command2 & ATA_SUPPORT_FLUSHCACHE ? "yes" : "no"); + printf("overlap %s\n", + parm->capabilities1 & ATA_SUPPORT_OVERLAP ? "yes" : "no"); + printf("Tagged Command Queuing (TCQ) %s %s", + parm->support.command2 & ATA_SUPPORT_QUEUED ? "yes" : "no", + parm->enabled.command2 & ATA_SUPPORT_QUEUED ? "yes" : "no"); + if (parm->support.command2 & ATA_SUPPORT_QUEUED) { + printf(" %d tags\n", + ATA_QUEUE_LEN(parm->queue) + 1); + } else + printf("\n"); if (parm->satacapabilities && parm->satacapabilities != 0xffff) { - printf("Native Command Queuing (NCQ) %s " - " %d/0x%02X\n", + printf("Native Command Queuing (NCQ) %s ", parm->satacapabilities & ATA_SUPPORT_NCQ ? - "yes" : "no", - (parm->satacapabilities & ATA_SUPPORT_NCQ) ? - ATA_QUEUE_LEN(parm->queue) : 0, - (parm->satacapabilities & ATA_SUPPORT_NCQ) ? - ATA_QUEUE_LEN(parm->queue) : 0); + "yes" : "no"); + if (parm->satacapabilities & ATA_SUPPORT_NCQ) { + printf(" %d tags\n", + ATA_QUEUE_LEN(parm->queue) + 1); + } else + printf("\n"); } - printf("Tagged Command Queuing (TCQ) %s %s %d/0x%02X\n", - parm->support.command2 & ATA_SUPPORT_QUEUED ? "yes" : "no", - parm->enabled.command2 & ATA_SUPPORT_QUEUED ? "yes" : "no", - ATA_QUEUE_LEN(parm->queue), ATA_QUEUE_LEN(parm->queue)); printf("SMART %s %s\n", parm->support.command1 & ATA_SUPPORT_SMART ? "yes" : "no", parm->enabled.command1 & ATA_SUPPORT_SMART ? "yes" : "no"); @@ -1241,6 +1245,8 @@ atacapprint(struct ata_params *parm) printf("free-fall %s %s\n", parm->support2 & ATA_SUPPORT_FREEFALL ? "yes" : "no", parm->enabled2 & ATA_SUPPORT_FREEFALL ? "yes" : "no"); + printf("data set management (TRIM) %s\n", + parm->support_dsm & ATA_SUPPORT_DSM_TRIM ? "yes" : "no"); } @@ -1327,8 +1333,18 @@ ataidentify(struct cam_device *device, i for (i = 0; i < sizeof(struct ata_params) / 2; i++) ptr[i] = le16toh(ptr[i]); + if (arglist & CAM_ARG_VERBOSE) { + fprintf(stdout, "%s%d: Raw identify data:\n", + device->device_name, device->dev_unit_num); + for (i = 0; i < sizeof(struct ata_params) / 2; i++) { + if ((i % 8) == 0) + fprintf(stdout, " %3d: ", i); + fprintf(stdout, "%04x ", (uint16_t)ptr[i]); + if ((i % 8) == 7) + fprintf(stdout, "\n"); + } + } ident_buf = (struct ata_params *)ptr; - if (strncmp(ident_buf->model, "FX", 2) && strncmp(ident_buf->model, "NEC", 3) && strncmp(ident_buf->model, "Pioneer", 7) && @@ -2286,6 +2302,7 @@ scsicmd(struct cam_device *device, int a error = 1; goto scsicmd_bailout; } + bzero(data_ptr, data_bytes); /* * If the user supplied "-" instead of a format, he * wants the data to be read from stdin. @@ -4305,7 +4322,7 @@ usage(int verbose) " camcontrol periphlist [dev_id][-n dev_name] [-u unit]\n" " camcontrol tur [dev_id][generic args]\n" " camcontrol inquiry [dev_id][generic args] [-D] [-S] [-R]\n" -" camcontrol identify [dev_id][generic args]\n" +" camcontrol identify [dev_id][generic args] [-v]\n" " camcontrol reportluns [dev_id][generic args] [-c] [-l] [-r report]\n" " camcontrol readcap [dev_id][generic args] [-b] [-h] [-H] [-N]\n" " [-q] [-s]\n" From owner-svn-src-all@FreeBSD.ORG Fri Feb 5 08:52:52 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 55AB81065670; Fri, 5 Feb 2010 08:52:52 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 41E4D8FC08; Fri, 5 Feb 2010 08:52:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o158qqak086764; Fri, 5 Feb 2010 08:52:52 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o158qpVv086720; Fri, 5 Feb 2010 08:52:51 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201002050852.o158qpVv086720@svn.freebsd.org> From: Gavin Atkinson Date: Fri, 5 Feb 2010 08:52:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203515 - in stable/8: sbin/ifconfig share/man/man4 sys/amd64/amd64 sys/dev/aic7xxx sys/dev/ath sys/dev/ath/ath_hal/ar5210 sys/dev/ct sys/dev/mly sys/i386/i386 tools/tools/ath/athdecode... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2010 08:52:52 -0000 Author: gavin Date: Fri Feb 5 08:52:51 2010 New Revision: 203515 URL: http://svn.freebsd.org/changeset/base/203515 Log: Merge r202161 from head: Spell "Hz" correctly wherever it is user-visible. PR: bin/142566 Submitted by: N.J. Mann njm njm.me.uk Modified: stable/8/sbin/ifconfig/ifieee80211.c stable/8/share/man/man4/ath.4 stable/8/share/man/man4/cpufreq.4 stable/8/share/man/man4/vge.4 stable/8/sys/amd64/amd64/local_apic.c stable/8/sys/dev/aic7xxx/aic79xx_pci.c stable/8/sys/dev/ath/ath_hal/ar5210/ar5210_reset.c stable/8/sys/dev/ath/if_ath.c stable/8/sys/dev/ct/ct_isa.c stable/8/sys/dev/mly/mly.c stable/8/sys/i386/i386/local_apic.c stable/8/tools/tools/ath/athdecode/main.c Directory Properties: stable/8/sbin/ifconfig/ (props changed) stable/8/share/man/man4/ (props changed) stable/8/share/man/man4/de.4 (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/tools/tools/ath/ (props changed) stable/8/tools/tools/ath/common/dumpregs.h (props changed) stable/8/tools/tools/ath/common/dumpregs_5210.c (props changed) stable/8/tools/tools/ath/common/dumpregs_5211.c (props changed) stable/8/tools/tools/ath/common/dumpregs_5212.c (props changed) stable/8/tools/tools/ath/common/dumpregs_5416.c (props changed) Modified: stable/8/sbin/ifconfig/ifieee80211.c ============================================================================== --- stable/8/sbin/ifconfig/ifieee80211.c Fri Feb 5 08:48:44 2010 (r203514) +++ stable/8/sbin/ifconfig/ifieee80211.c Fri Feb 5 08:52:51 2010 (r203515) @@ -3429,9 +3429,9 @@ get_chaninfo(const struct ieee80211_chan else if (IEEE80211_IS_CHAN_B(c)) strlcat(buf, " 11b", bsize); if (IEEE80211_IS_CHAN_HALF(c)) - strlcat(buf, "/10Mhz", bsize); + strlcat(buf, "/10MHz", bsize); if (IEEE80211_IS_CHAN_QUARTER(c)) - strlcat(buf, "/5Mhz", bsize); + strlcat(buf, "/5MHz", bsize); if (IEEE80211_IS_CHAN_TURBO(c)) strlcat(buf, " Turbo", bsize); if (precise) { @@ -3453,7 +3453,7 @@ print_chaninfo(const struct ieee80211_ch { char buf[14]; - printf("Channel %3u : %u%c Mhz%-14.14s", + printf("Channel %3u : %u%c MHz%-14.14s", ieee80211_mhz2ieee(c->ic_freq, c->ic_flags), c->ic_freq, IEEE80211_IS_CHAN_PASSIVE(c) ? '*' : ' ', get_chaninfo(c, verb, buf, sizeof(buf))); @@ -3562,7 +3562,7 @@ list_channels(int s, int allchans) static void print_txpow(const struct ieee80211_channel *c) { - printf("Channel %3u : %u Mhz %3.1f reg %2d ", + printf("Channel %3u : %u MHz %3.1f reg %2d ", c->ic_ieee, c->ic_freq, c->ic_maxpower/2., c->ic_maxregpower); } @@ -4244,7 +4244,7 @@ ieee80211_status(int s) c = getcurchan(s); if (c->ic_freq != IEEE80211_CHAN_ANY) { char buf[14]; - printf(" channel %d (%u Mhz%s)", c->ic_ieee, c->ic_freq, + printf(" channel %d (%u MHz%s)", c->ic_ieee, c->ic_freq, get_chaninfo(c, 1, buf, sizeof(buf))); } else if (verbose) printf(" channel UNDEF"); Modified: stable/8/share/man/man4/ath.4 ============================================================================== --- stable/8/share/man/man4/ath.4 Fri Feb 5 08:48:44 2010 (r203514) +++ stable/8/share/man/man4/ath.4 Fri Feb 5 08:52:51 2010 (r203515) @@ -249,7 +249,7 @@ This should not happen. An invalid transmit rate was specified for an outgoing frame. The frame is discarded. This should not happen. -.It "ath%d: ath_chan_set: unable to reset channel %u (%u Mhz)" +.It "ath%d: ath_chan_set: unable to reset channel %u (%u MHz)" The Atheros Hardware Access Layer was unable to reset the hardware when switching channels during scanning. This should not happen. Modified: stable/8/share/man/man4/cpufreq.4 ============================================================================== --- stable/8/share/man/man4/cpufreq.4 Fri Feb 5 08:48:44 2010 (r203514) +++ stable/8/share/man/man4/cpufreq.4 Fri Feb 5 08:52:51 2010 (r203515) @@ -234,7 +234,7 @@ The driver should set unknown or irrelev All the following elements for each setting should be returned: .Bd -literal struct cf_setting { - int freq; /* CPU clock in Mhz or 100ths of a percent. */ + int freq; /* CPU clock in MHz or 100ths of a percent. */ int volts; /* Voltage in mV. */ int power; /* Power consumed in mW. */ int lat; /* Transition latency in us. */ Modified: stable/8/share/man/man4/vge.4 ============================================================================== --- stable/8/share/man/man4/vge.4 Fri Feb 5 08:48:44 2010 (r203514) +++ stable/8/share/man/man4/vge.4 Fri Feb 5 08:52:51 2010 (r203515) @@ -58,7 +58,7 @@ driver provides support for various NICs based on the VIA Technologies VT6120, VT6122, VT6130 and VT6132 Velocity Family Gigabit Ethernet controller chips. .Pp -The VT6120/VT6122 is a 33/66Mhz 64-bit PCI device which combines a tri-speed +The VT6120/VT6122 is a 33/66MHz 64-bit PCI device which combines a tri-speed MAC with an integrated 10/100/1000 copper PHY. (Some older cards use an external PHY.) The VT6130/VT6132 is the PCI express version of Velocity family. Modified: stable/8/sys/amd64/amd64/local_apic.c ============================================================================== --- stable/8/sys/amd64/amd64/local_apic.c Fri Feb 5 08:48:44 2010 (r203514) +++ stable/8/sys/amd64/amd64/local_apic.c Fri Feb 5 08:52:51 2010 (r203515) @@ -448,7 +448,7 @@ lapic_setup_clock(void) panic("lapic: Divisor too big"); value /= 2; if (bootverbose) - printf("lapic: Divisor %lu, Frequency %lu hz\n", + printf("lapic: Divisor %lu, Frequency %lu Hz\n", lapic_timer_divisor, value); /* Modified: stable/8/sys/dev/aic7xxx/aic79xx_pci.c ============================================================================== --- stable/8/sys/dev/aic7xxx/aic79xx_pci.c Fri Feb 5 08:48:44 2010 (r203514) +++ stable/8/sys/dev/aic7xxx/aic79xx_pci.c Fri Feb 5 08:52:51 2010 (r203515) @@ -248,10 +248,10 @@ static const char *pci_bus_modes[] = "PCI bus mode unknown", "PCI bus mode unknown", "PCI bus mode unknown", - "PCI-X 101-133Mhz", - "PCI-X 67-100Mhz", - "PCI-X 50-66Mhz", - "PCI 33 or 66Mhz" + "PCI-X 101-133MHz", + "PCI-X 67-100MHz", + "PCI-X 50-66MHz", + "PCI 33 or 66MHz" }; #define TESTMODE 0x00000800ul Modified: stable/8/sys/dev/ath/ath_hal/ar5210/ar5210_reset.c ============================================================================== --- stable/8/sys/dev/ath/ath_hal/ar5210/ar5210_reset.c Fri Feb 5 08:48:44 2010 (r203514) +++ stable/8/sys/dev/ath/ath_hal/ar5210/ar5210_reset.c Fri Feb 5 08:52:51 2010 (r203515) @@ -87,7 +87,7 @@ ar5210Reset(struct ath_hal *ah, HAL_OPMO if (!IEEE80211_IS_CHAN_5GHZ(chan)) { /* Only 11a mode */ - HALDEBUG(ah, HAL_DEBUG_ANY, "%s: channel not 5Ghz\n", __func__); + HALDEBUG(ah, HAL_DEBUG_ANY, "%s: channel not 5GHz\n", __func__); FAIL(HAL_EINVAL); } /* Modified: stable/8/sys/dev/ath/if_ath.c ============================================================================== --- stable/8/sys/dev/ath/if_ath.c Fri Feb 5 08:48:44 2010 (r203514) +++ stable/8/sys/dev/ath/if_ath.c Fri Feb 5 08:52:51 2010 (r203515) @@ -5352,7 +5352,7 @@ ath_chan_set(struct ath_softc *sc, struc ath_stoprecv(sc); /* turn off frame recv */ if (!ath_hal_reset(ah, sc->sc_opmode, chan, AH_TRUE, &status)) { if_printf(ifp, "%s: unable to reset " - "channel %u (%u Mhz, flags 0x%x), hal status %u\n", + "channel %u (%u MHz, flags 0x%x), hal status %u\n", __func__, ieee80211_chan2ieee(ic, chan), chan->ic_freq, chan->ic_flags, status); return EIO; Modified: stable/8/sys/dev/ct/ct_isa.c ============================================================================== --- stable/8/sys/dev/ct/ct_isa.c Fri Feb 5 08:48:44 2010 (r203514) +++ stable/8/sys/dev/ct/ct_isa.c Fri Feb 5 08:52:51 2010 (r203515) @@ -316,7 +316,7 @@ ct_isa_attach(device_t dev) break; } #if 0 - printf("%s: chiprev %s chipclk %d Mhz\n", + printf("%s: chiprev %s chipclk %d MHz\n", slp->sl_dev.dv_xname, s, ct->sc_chipclk); #endif Modified: stable/8/sys/dev/mly/mly.c ============================================================================== --- stable/8/sys/dev/mly/mly.c Fri Feb 5 08:48:44 2010 (r203514) +++ stable/8/sys/dev/mly/mly.c Fri Feb 5 08:52:51 2010 (r203515) @@ -2528,7 +2528,7 @@ mly_describe_controller(struct mly_softc mly_describe_code(mly_table_memorytype, mi->memory_type), mi->memory_parity ? "+parity": "",mi->memory_ecc ? "+ECC": "", mi->cache_size); - mly_printf(sc, "CPU: %s @ %dMHZ\n", + mly_printf(sc, "CPU: %s @ %dMHz\n", mly_describe_code(mly_table_cputype, mi->cpu[0].type), mi->cpu[0].speed); if (mi->l2cache_size != 0) mly_printf(sc, "%dKB L2 cache\n", mi->l2cache_size); Modified: stable/8/sys/i386/i386/local_apic.c ============================================================================== --- stable/8/sys/i386/i386/local_apic.c Fri Feb 5 08:48:44 2010 (r203514) +++ stable/8/sys/i386/i386/local_apic.c Fri Feb 5 08:52:51 2010 (r203515) @@ -450,7 +450,7 @@ lapic_setup_clock(void) panic("lapic: Divisor too big"); value /= 2; if (bootverbose) - printf("lapic: Divisor %lu, Frequency %lu hz\n", + printf("lapic: Divisor %lu, Frequency %lu Hz\n", lapic_timer_divisor, value); /* Modified: stable/8/tools/tools/ath/athdecode/main.c ============================================================================== --- stable/8/tools/tools/ath/athdecode/main.c Fri Feb 5 08:48:44 2010 (r203514) +++ stable/8/tools/tools/ath/athdecode/main.c Fri Feb 5 08:52:51 2010 (r203515) @@ -125,13 +125,13 @@ opmark(FILE *fd, int i, const struct ath fprintf(fd, "ar%uReset (done), OK", state.chipnum); break; case AH_MARK_CHIPRESET: - fprintf(fd, "ar%uChipReset, channel %u Mhz", state.chipnum, r->val); + fprintf(fd, "ar%uChipReset, channel %u MHz", state.chipnum, r->val); break; case AH_MARK_PERCAL: - fprintf(fd, "ar%uPerCalibration, channel %u Mhz", state.chipnum, r->val); + fprintf(fd, "ar%uPerCalibration, channel %u MHz", state.chipnum, r->val); break; case AH_MARK_SETCHANNEL: - fprintf(fd, "ar%uSetChannel, channel %u Mhz", state.chipnum, r->val); + fprintf(fd, "ar%uSetChannel, channel %u MHz", state.chipnum, r->val); break; case AH_MARK_ANI_RESET: switch (r->val) { From owner-svn-src-all@FreeBSD.ORG Fri Feb 5 08:56:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 80C28106566B; Fri, 5 Feb 2010 08:56:10 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 57BAA8FC12; Fri, 5 Feb 2010 08:56:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o158uARw087520; Fri, 5 Feb 2010 08:56:10 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o158uAJO087519; Fri, 5 Feb 2010 08:56:10 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201002050856.o158uAJO087519@svn.freebsd.org> From: Gavin Atkinson Date: Fri, 5 Feb 2010 08:56: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: r203516 - stable/8/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2010 08:56:10 -0000 Author: gavin Date: Fri Feb 5 08:56:10 2010 New Revision: 203516 URL: http://svn.freebsd.org/changeset/base/203516 Log: Fix mergeinfo from r197799 Modified: Directory Properties: stable/8/share/man/man4/ (props changed) stable/8/share/man/man4/de.4 (props changed) From owner-svn-src-all@FreeBSD.ORG Fri Feb 5 09:00:46 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D7D46106566B; Fri, 5 Feb 2010 09:00:46 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from mail-gw2.york.ac.uk (mail-gw2.york.ac.uk [144.32.128.247]) by mx1.freebsd.org (Postfix) with ESMTP id 69B368FC17; Fri, 5 Feb 2010 09:00:46 +0000 (UTC) Received: from mail-gw6.york.ac.uk (mail-gw6.york.ac.uk [144.32.129.26]) by mail-gw2.york.ac.uk (8.13.6/8.13.6) with ESMTP id o1590h8n019152; Fri, 5 Feb 2010 09:00:43 GMT Received: from ury.york.ac.uk ([144.32.108.81]) by mail-gw6.york.ac.uk with esmtps (TLSv1:AES256-SHA:256) (Exim 4.68) (envelope-from ) id 1NdK3P-00068N-LD; Fri, 05 Feb 2010 09:00:43 +0000 Received: from ury.york.ac.uk (localhost.york.ac.uk [127.0.0.1]) by ury.york.ac.uk (8.14.3/8.14.3) with ESMTP id o1590hE7069673; Fri, 5 Feb 2010 09:00:43 GMT (envelope-from gavin@FreeBSD.org) Received: from localhost (gavin@localhost) by ury.york.ac.uk (8.14.3/8.14.3/Submit) with ESMTP id o1590hgO069670; Fri, 5 Feb 2010 09:00:43 GMT (envelope-from gavin@FreeBSD.org) X-Authentication-Warning: ury.york.ac.uk: gavin owned process doing -bs Date: Fri, 5 Feb 2010 09:00:43 +0000 (GMT) From: Gavin Atkinson X-X-Sender: gavin@ury.york.ac.uk To: src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-stable@FreeBSD.org, svn-src-stable-8@FreeBSD.org In-Reply-To: <201002050852.o158qpVv086720@svn.freebsd.org> Message-ID: References: <201002050852.o158qpVv086720@svn.freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-York-MailScanner: Found to be clean X-York-MailScanner-From: gavin@freebsd.org Cc: Subject: Re: svn commit: r203515 - in stable/8: sbin/ifconfig share/man/man4 sys/amd64/amd64 sys/dev/aic7xxx sys/dev/ath sys/dev/ath/ath_hal/ar5210 sys/dev/ct sys/dev/mly sys/i386/i386 tools/tools/ath/athdecode... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2010 09:00:47 -0000 On Fri, 5 Feb 2010, Gavin Atkinson wrote: > Author: gavin > Date: Fri Feb 5 08:52:51 2010 > New Revision: 203515 > URL: http://svn.freebsd.org/changeset/base/203515 > [snip] > > Directory Properties: > stable/8/share/man/man4/ (props changed) > stable/8/share/man/man4/de.4 (props changed) I've corrected this mergeinfo in r203516 > stable/8/tools/tools/ath/ (props changed) > stable/8/tools/tools/ath/common/dumpregs.h (props changed) > stable/8/tools/tools/ath/common/dumpregs_5210.c (props changed) > stable/8/tools/tools/ath/common/dumpregs_5211.c (props changed) > stable/8/tools/tools/ath/common/dumpregs_5212.c (props changed) > stable/8/tools/tools/ath/common/dumpregs_5416.c (props changed) I'm not sure what to do about this mergeinfo though. With the exception of the change I've just merged, all of the merge records on these files are for other bits of the tree entirely. I suspect theyu should just be deleted, but I may be nissing something. Gavin From owner-svn-src-all@FreeBSD.ORG Fri Feb 5 11:52:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 29DF71065692; Fri, 5 Feb 2010 11:52:29 +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 F3A518FC28; Fri, 5 Feb 2010 11:52:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o15BqSQf028703; Fri, 5 Feb 2010 11:52:28 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o15BqSV5028701; Fri, 5 Feb 2010 11:52:28 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201002051152.o15BqSV5028701@svn.freebsd.org> From: Alexander Motin Date: Fri, 5 Feb 2010 11:52: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: r203518 - stable/8/sys/geom X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2010 11:52:29 -0000 Author: mav Date: Fri Feb 5 11:52:28 2010 New Revision: 203518 URL: http://svn.freebsd.org/changeset/base/203518 Log: MFC r201264: Call wakeup() only for the first request on the queue. Modified: stable/8/sys/geom/geom_io.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/geom/geom_io.c ============================================================================== --- stable/8/sys/geom/geom_io.c Fri Feb 5 10:00:18 2010 (r203517) +++ stable/8/sys/geom/geom_io.c Fri Feb 5 11:52:28 2010 (r203518) @@ -391,6 +391,7 @@ void g_io_request(struct bio *bp, struct g_consumer *cp) { struct g_provider *pp; + int first; KASSERT(cp != NULL, ("NULL cp in g_io_request")); KASSERT(bp != NULL, ("NULL bp in g_io_request")); @@ -463,12 +464,14 @@ g_io_request(struct bio *bp, struct g_co pp->nstart++; cp->nstart++; + first = TAILQ_EMPTY(&g_bio_run_down.bio_queue); TAILQ_INSERT_TAIL(&g_bio_run_down.bio_queue, bp, bio_queue); g_bio_run_down.bio_queue_length++; g_bioq_unlock(&g_bio_run_down); /* Pass it on down. */ - wakeup(&g_wait_down); + if (first) + wakeup(&g_wait_down); } void @@ -476,6 +479,7 @@ g_io_deliver(struct bio *bp, int error) { struct g_consumer *cp; struct g_provider *pp; + int first; KASSERT(bp != NULL, ("NULL bp in g_io_deliver")); pp = bp->bio_to; @@ -536,11 +540,13 @@ g_io_deliver(struct bio *bp, int error) pp->nend++; if (error != ENOMEM) { bp->bio_error = error; + first = TAILQ_EMPTY(&g_bio_run_up.bio_queue); TAILQ_INSERT_TAIL(&g_bio_run_up.bio_queue, bp, bio_queue); bp->bio_flags |= BIO_ONQUEUE; g_bio_run_up.bio_queue_length++; g_bioq_unlock(&g_bio_run_up); - wakeup(&g_wait_up); + if (first) + wakeup(&g_wait_up); return; } g_bioq_unlock(&g_bio_run_up); From owner-svn-src-all@FreeBSD.ORG Fri Feb 5 11:53:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CA42E106568F; Fri, 5 Feb 2010 11:53:41 +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 B94C98FC0C; Fri, 5 Feb 2010 11:53:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o15BrfSV029014; Fri, 5 Feb 2010 11:53:41 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o15BrfuK029012; Fri, 5 Feb 2010 11:53:41 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201002051153.o15BrfuK029012@svn.freebsd.org> From: Alexander Motin Date: Fri, 5 Feb 2010 11:53: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: r203519 - stable/8/sys/geom/raid3 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2010 11:53:42 -0000 Author: mav Date: Fri Feb 5 11:53:41 2010 New Revision: 203519 URL: http://svn.freebsd.org/changeset/base/203519 Log: MFC r201545: Slightly optimize XOR calculation. Modified: stable/8/sys/geom/raid3/g_raid3.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/geom/raid3/g_raid3.c ============================================================================== --- stable/8/sys/geom/raid3/g_raid3.c Fri Feb 5 11:52:28 2010 (r203518) +++ stable/8/sys/geom/raid3/g_raid3.c Fri Feb 5 11:53:41 2010 (r203519) @@ -231,31 +231,31 @@ g_raid3_uma_dtor(void *mem, int size, vo sz->sz_inuse--; } -#define g_raid3_xor(src1, src2, dst, size) \ - _g_raid3_xor((uint64_t *)(src1), (uint64_t *)(src2), \ +#define g_raid3_xor(src, dst, size) \ + _g_raid3_xor((uint64_t *)(src), \ (uint64_t *)(dst), (size_t)size) static void -_g_raid3_xor(uint64_t *src1, uint64_t *src2, uint64_t *dst, size_t size) +_g_raid3_xor(uint64_t *src, uint64_t *dst, size_t size) { KASSERT((size % 128) == 0, ("Invalid size: %zu.", size)); for (; size > 0; size -= 128) { - *dst++ = (*src1++) ^ (*src2++); - *dst++ = (*src1++) ^ (*src2++); - *dst++ = (*src1++) ^ (*src2++); - *dst++ = (*src1++) ^ (*src2++); - *dst++ = (*src1++) ^ (*src2++); - *dst++ = (*src1++) ^ (*src2++); - *dst++ = (*src1++) ^ (*src2++); - *dst++ = (*src1++) ^ (*src2++); - *dst++ = (*src1++) ^ (*src2++); - *dst++ = (*src1++) ^ (*src2++); - *dst++ = (*src1++) ^ (*src2++); - *dst++ = (*src1++) ^ (*src2++); - *dst++ = (*src1++) ^ (*src2++); - *dst++ = (*src1++) ^ (*src2++); - *dst++ = (*src1++) ^ (*src2++); - *dst++ = (*src1++) ^ (*src2++); + *dst++ ^= (*src++); + *dst++ ^= (*src++); + *dst++ ^= (*src++); + *dst++ ^= (*src++); + *dst++ ^= (*src++); + *dst++ ^= (*src++); + *dst++ ^= (*src++); + *dst++ ^= (*src++); + *dst++ ^= (*src++); + *dst++ ^= (*src++); + *dst++ ^= (*src++); + *dst++ ^= (*src++); + *dst++ ^= (*src++); + *dst++ ^= (*src++); + *dst++ ^= (*src++); + *dst++ ^= (*src++); } } @@ -1049,6 +1049,7 @@ g_raid3_scatter(struct bio *pbp) struct g_raid3_disk *disk; struct bio *bp, *cbp, *tmpbp; off_t atom, cadd, padd, left; + int first; sc = pbp->bio_to->geom->softc; bp = NULL; @@ -1079,12 +1080,18 @@ g_raid3_scatter(struct bio *pbp) /* * Calculate parity. */ - bzero(bp->bio_data, bp->bio_length); + first = 1; G_RAID3_FOREACH_SAFE_BIO(pbp, cbp, tmpbp) { if (cbp == bp) continue; - g_raid3_xor(cbp->bio_data, bp->bio_data, bp->bio_data, - bp->bio_length); + if (first) { + bcopy(cbp->bio_data, bp->bio_data, + bp->bio_length); + first = 0; + } else { + g_raid3_xor(cbp->bio_data, bp->bio_data, + bp->bio_length); + } if ((cbp->bio_cflags & G_RAID3_BIO_CFLAG_NODISK) != 0) g_raid3_destroy_bio(sc, cbp); } @@ -1216,7 +1223,7 @@ g_raid3_gather(struct bio *pbp) G_RAID3_FOREACH_BIO(pbp, cbp) { if ((cbp->bio_cflags & G_RAID3_BIO_CFLAG_PARITY) != 0) continue; - g_raid3_xor(cbp->bio_data, xbp->bio_data, xbp->bio_data, + g_raid3_xor(cbp->bio_data, xbp->bio_data, xbp->bio_length); } xbp->bio_cflags &= ~G_RAID3_BIO_CFLAG_PARITY; @@ -1639,7 +1646,7 @@ g_raid3_sync_request(struct bio *bp) bcopy(src, dst, atom); src += atom; for (n = 1; n < sc->sc_ndisks - 1; n++) { - g_raid3_xor(src, dst, dst, atom); + g_raid3_xor(src, dst, atom); src += atom; } dst += atom; From owner-svn-src-all@FreeBSD.ORG Fri Feb 5 11:56:13 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 025581065670; Fri, 5 Feb 2010 11:56:13 +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 DB9F38FC1B; Fri, 5 Feb 2010 11:56:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o15BuCfp029645; Fri, 5 Feb 2010 11:56:12 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o15BuCgx029642; Fri, 5 Feb 2010 11:56:12 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201002051156.o15BuCgx029642@svn.freebsd.org> From: Alexander Motin Date: Fri, 5 Feb 2010 11:56: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: r203520 - in stable/8/sys/geom: mirror raid3 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2010 11:56:13 -0000 Author: mav Date: Fri Feb 5 11:56:12 2010 New Revision: 203520 URL: http://svn.freebsd.org/changeset/base/203520 Log: MFC r201566, r201567: Move wakeup() out of mutex to reduce contention. Modified: stable/8/sys/geom/mirror/g_mirror.c stable/8/sys/geom/raid3/g_raid3.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/geom/mirror/g_mirror.c ============================================================================== --- stable/8/sys/geom/mirror/g_mirror.c Fri Feb 5 11:53:41 2010 (r203519) +++ stable/8/sys/geom/mirror/g_mirror.c Fri Feb 5 11:56:12 2010 (r203520) @@ -868,8 +868,8 @@ g_mirror_done(struct bio *bp) bp->bio_cflags = G_MIRROR_BIO_FLAG_REGULAR; mtx_lock(&sc->sc_queue_mtx); bioq_disksort(&sc->sc_queue, bp); - wakeup(sc); mtx_unlock(&sc->sc_queue_mtx); + wakeup(sc); } static void @@ -954,9 +954,9 @@ g_mirror_regular_request(struct bio *bp) pbp->bio_error = 0; mtx_lock(&sc->sc_queue_mtx); bioq_disksort(&sc->sc_queue, pbp); + mtx_unlock(&sc->sc_queue_mtx); G_MIRROR_DEBUG(4, "%s: Waking up %p.", __func__, sc); wakeup(sc); - mtx_unlock(&sc->sc_queue_mtx); } break; case BIO_DELETE: @@ -994,8 +994,8 @@ g_mirror_sync_done(struct bio *bp) bp->bio_cflags = G_MIRROR_BIO_FLAG_SYNC; mtx_lock(&sc->sc_queue_mtx); bioq_disksort(&sc->sc_queue, bp); - wakeup(sc); mtx_unlock(&sc->sc_queue_mtx); + wakeup(sc); } static void @@ -1107,9 +1107,9 @@ g_mirror_start(struct bio *bp) } mtx_lock(&sc->sc_queue_mtx); bioq_disksort(&sc->sc_queue, bp); + mtx_unlock(&sc->sc_queue_mtx); G_MIRROR_DEBUG(4, "%s: Waking up %p.", __func__, sc); wakeup(sc); - mtx_unlock(&sc->sc_queue_mtx); } /* Modified: stable/8/sys/geom/raid3/g_raid3.c ============================================================================== --- stable/8/sys/geom/raid3/g_raid3.c Fri Feb 5 11:53:41 2010 (r203519) +++ stable/8/sys/geom/raid3/g_raid3.c Fri Feb 5 11:56:12 2010 (r203520) @@ -1271,9 +1271,9 @@ g_raid3_done(struct bio *bp) G_RAID3_LOGREQ(3, bp, "Regular request done (error=%d).", bp->bio_error); mtx_lock(&sc->sc_queue_mtx); bioq_insert_head(&sc->sc_queue, bp); + mtx_unlock(&sc->sc_queue_mtx); wakeup(sc); wakeup(&sc->sc_queue); - mtx_unlock(&sc->sc_queue_mtx); } static void @@ -1379,9 +1379,9 @@ g_raid3_sync_done(struct bio *bp) bp->bio_cflags |= G_RAID3_BIO_CFLAG_SYNC; mtx_lock(&sc->sc_queue_mtx); bioq_insert_head(&sc->sc_queue, bp); + mtx_unlock(&sc->sc_queue_mtx); wakeup(sc); wakeup(&sc->sc_queue); - mtx_unlock(&sc->sc_queue_mtx); } static void @@ -1459,9 +1459,9 @@ g_raid3_start(struct bio *bp) } mtx_lock(&sc->sc_queue_mtx); bioq_insert_tail(&sc->sc_queue, bp); + mtx_unlock(&sc->sc_queue_mtx); G_RAID3_DEBUG(4, "%s: Waking up %p.", __func__, sc); wakeup(sc); - mtx_unlock(&sc->sc_queue_mtx); } /* From owner-svn-src-all@FreeBSD.ORG Fri Feb 5 12:07:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2AEFC106566B; Fri, 5 Feb 2010 12:07:54 +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 19E1E8FC0C; Fri, 5 Feb 2010 12:07:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o15C7rBX032357; Fri, 5 Feb 2010 12:07:54 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o15C7rRV032355; Fri, 5 Feb 2010 12:07:53 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201002051207.o15C7rRV032355@svn.freebsd.org> From: Alexander Motin Date: Fri, 5 Feb 2010 12:07: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: r203521 - stable/8/sys/dev/ata/chipsets X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2010 12:07:54 -0000 Author: mav Date: Fri Feb 5 12:07:53 2010 New Revision: 203521 URL: http://svn.freebsd.org/changeset/base/203521 Log: MFC r203033: Clear ch->devices, if hard-reset failed. This makes hot-plug work better. Modified: stable/8/sys/dev/ata/chipsets/ata-promise.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/ata/chipsets/ata-promise.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-promise.c Fri Feb 5 11:56:12 2010 (r203520) +++ stable/8/sys/dev/ata/chipsets/ata-promise.c Fri Feb 5 12:07:53 2010 (r203521) @@ -821,7 +821,8 @@ ata_promise_mio_reset(device_t dev) device_printf(dev, "promise_mio_reset devices=%08x\n", ch->devices); - } + } else + ch->devices = 0; /* reset and enable plug/unplug intr */ ATA_OUTL(ctlr->r_res2, 0x060, (0x00000011 << ch->unit)); From owner-svn-src-all@FreeBSD.ORG Fri Feb 5 12:09:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A35B1065670; Fri, 5 Feb 2010 12:09:43 +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 70AE38FC1A; Fri, 5 Feb 2010 12:09:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o15C9hF4032814; Fri, 5 Feb 2010 12:09:43 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o15C9hjH032812; Fri, 5 Feb 2010 12:09:43 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201002051209.o15C9hjH032812@svn.freebsd.org> From: Alexander Motin Date: Fri, 5 Feb 2010 12:09: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: r203522 - stable/8/sys/dev/ata/chipsets X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2010 12:09:43 -0000 Author: mav Date: Fri Feb 5 12:09:43 2010 New Revision: 203522 URL: http://svn.freebsd.org/changeset/base/203522 Log: MFC r203034: Restore SATA speed reporting, broken by ATA_CAM changes. Modified: stable/8/sys/dev/ata/chipsets/ata-promise.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/ata/chipsets/ata-promise.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-promise.c Fri Feb 5 12:07:53 2010 (r203521) +++ stable/8/sys/dev/ata/chipsets/ata-promise.c Fri Feb 5 12:09:43 2010 (r203522) @@ -73,6 +73,7 @@ static u_int32_t ata_promise_mio_softres static void ata_promise_mio_dmainit(device_t dev); static void ata_promise_mio_setprd(void *xsc, bus_dma_segment_t *segs, int nsegs, int error); static int ata_promise_mio_setmode(device_t dev, int target, int mode); +static int ata_promise_mio_getrev(device_t dev, int target); static void ata_promise_sx4_intr(void *data); static int ata_promise_sx4_command(struct ata_request *request); static int ata_promise_apkt(u_int8_t *bytep, struct ata_request *request); @@ -341,6 +342,7 @@ sataii: ctlr->ch_detach = ata_promise_mio_ch_detach; ctlr->reset = ata_promise_mio_reset; ctlr->setmode = ata_promise_mio_setmode; + ctlr->getrev = ata_promise_mio_getrev; return 0; } @@ -999,7 +1001,7 @@ ata_promise_mio_setmode(device_t dev, in if ( (ctlr->chip->cfg2 == PR_SATA) || ((ctlr->chip->cfg2 == PR_CMBO) && (ch->unit < 2)) || - (ctlr->chip->cfg2 == PR_SATA2) || + (ctlr->chip->cfg2 == PR_SATA2) || ((ctlr->chip->cfg2 == PR_CMBO2) && (ch->unit < 2))) mode = ata_sata_setmode(dev, target, mode); else @@ -1007,6 +1009,21 @@ ata_promise_mio_setmode(device_t dev, in return (mode); } +static int +ata_promise_mio_getrev(device_t dev, int target) +{ + struct ata_pci_controller *ctlr = device_get_softc(device_get_parent(dev)); + struct ata_channel *ch = device_get_softc(dev); + + if ( (ctlr->chip->cfg2 == PR_SATA) || + ((ctlr->chip->cfg2 == PR_CMBO) && (ch->unit < 2)) || + (ctlr->chip->cfg2 == PR_SATA2) || + ((ctlr->chip->cfg2 == PR_CMBO2) && (ch->unit < 2))) + return (ata_sata_getrev(dev, target)); + else + return (0); +} + static void ata_promise_sx4_intr(void *data) { From owner-svn-src-all@FreeBSD.ORG Fri Feb 5 12:17:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E00611065670; Fri, 5 Feb 2010 12:17:14 +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 CED8B8FC13; Fri, 5 Feb 2010 12:17:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o15CHENd034549; Fri, 5 Feb 2010 12:17:14 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o15CHENf034547; Fri, 5 Feb 2010 12:17:14 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201002051217.o15CHENf034547@svn.freebsd.org> From: Alexander Motin Date: Fri, 5 Feb 2010 12:17: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: r203523 - stable/8/sys/dev/ata/chipsets X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2010 12:17:15 -0000 Author: mav Date: Fri Feb 5 12:17:14 2010 New Revision: 203523 URL: http://svn.freebsd.org/changeset/base/203523 Log: MFC r203043, r203058: Do not place fake interrupt register on chip. Now we have better place for it. Modified: stable/8/sys/dev/ata/chipsets/ata-promise.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/ata/chipsets/ata-promise.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-promise.c Fri Feb 5 12:09:43 2010 (r203522) +++ stable/8/sys/dev/ata/chipsets/ata-promise.c Fri Feb 5 12:17:14 2010 (r203523) @@ -218,7 +218,7 @@ static int ata_promise_chipinit(device_t dev) { struct ata_pci_controller *ctlr = device_get_softc(dev); - int fake_reg, stat_reg; + int stat_reg; if (ata_setup_interrupt(dev, ata_generic_intr)) return ENXIO; @@ -312,7 +312,6 @@ ata_promise_chipinit(device_t dev) case PR_SATA: ctlr->channels = 4; sata150: - fake_reg = 0x60; stat_reg = 0x6c; break; @@ -323,13 +322,12 @@ sata150: default: ctlr->channels = 4; sataii: - fake_reg = 0x54; stat_reg = 0x60; break; } /* prime fake interrupt register */ - ATA_OUTL(ctlr->r_res2, fake_reg, 0xffffffff); + ctlr->chipset_data = (void *)(uintptr_t)0xffffffff; /* clear SATA status and unmask interrupts */ ATA_OUTL(ctlr->r_res2, stat_reg, 0x000000ff); @@ -590,38 +588,23 @@ ata_promise_mio_intr(void *data) struct ata_pci_controller *ctlr = data; struct ata_channel *ch; u_int32_t vector; - int unit, fake_reg; - - switch (ctlr->chip->cfg2) { - case PR_PATA: - case PR_CMBO: - case PR_SATA: - fake_reg = 0x60; - break; - case PR_CMBO2: - case PR_SATA2: - default: - fake_reg = 0x54; - break; - } + int unit; /* * since reading interrupt status register on early "mio" chips * clears the status bits we cannot read it for each channel later on * in the generic interrupt routine. - * store the bits in an unused register in the chip so we can read - * it from there safely to get around this "feature". */ vector = ATA_INL(ctlr->r_res2, 0x040); ATA_OUTL(ctlr->r_res2, 0x040, vector); - ATA_OUTL(ctlr->r_res2, fake_reg, vector); + ctlr->chipset_data = (void *)(uintptr_t)vector; for (unit = 0; unit < ctlr->channels; unit++) { if ((ch = ctlr->interrupt[unit].argument)) ctlr->interrupt[unit].function(ch); } - ATA_OUTL(ctlr->r_res2, fake_reg, 0xffffffff); + ctlr->chipset_data = (void *)(uintptr_t)0xffffffff; } static int @@ -629,25 +612,23 @@ ata_promise_mio_status(device_t dev) { struct ata_pci_controller *ctlr = device_get_softc(device_get_parent(dev)); struct ata_channel *ch = device_get_softc(dev); - u_int32_t fake_reg, stat_reg, vector, status; + u_int32_t stat_reg, vector, status; switch (ctlr->chip->cfg2) { case PR_PATA: case PR_CMBO: case PR_SATA: - fake_reg = 0x60; stat_reg = 0x6c; break; case PR_CMBO2: case PR_SATA2: default: - fake_reg = 0x54; stat_reg = 0x60; break; } /* read and acknowledge interrupt */ - vector = ATA_INL(ctlr->r_res2, fake_reg); + vector = (uint32_t)(uintptr_t)ctlr->chipset_data; /* read and clear interface status */ status = ATA_INL(ctlr->r_res2, stat_reg); From owner-svn-src-all@FreeBSD.ORG Fri Feb 5 12:40:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5BD9E106566B; Fri, 5 Feb 2010 12:40:18 +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 4BF328FC20; Fri, 5 Feb 2010 12:40:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o15CeIQq039918; Fri, 5 Feb 2010 12:40:18 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o15CeIbO039916; Fri, 5 Feb 2010 12:40:18 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201002051240.o15CeIbO039916@svn.freebsd.org> From: Alexander Motin Date: Fri, 5 Feb 2010 12:40:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203524 - head/sys/dev/ciss X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2010 12:40:18 -0000 Author: mav Date: Fri Feb 5 12:40:18 2010 New Revision: 203524 URL: http://svn.freebsd.org/changeset/base/203524 Log: When hacking INQUIRY result, make sure that it is right INQUIRY and there is enough of result to hack. Modified: head/sys/dev/ciss/ciss.c Modified: head/sys/dev/ciss/ciss.c ============================================================================== --- head/sys/dev/ciss/ciss.c Fri Feb 5 12:17:14 2010 (r203523) +++ head/sys/dev/ciss/ciss.c Fri Feb 5 12:40:18 2010 (r203524) @@ -3286,10 +3286,15 @@ ciss_cam_complete_fixup(struct ciss_soft { struct scsi_inquiry_data *inq; struct ciss_ldrive *cl; + uint8_t *cdb; int bus, target; - if (((csio->ccb_h.flags & CAM_CDB_POINTER) ? - *(u_int8_t *)csio->cdb_io.cdb_ptr : csio->cdb_io.cdb_bytes[0]) == INQUIRY) { + cdb = (csio->ccb_h.flags & CAM_CDB_POINTER) ? + (uint8_t *)csio->cdb_io.cdb_ptr : csio->cdb_io.cdb_bytes; + if (cdb[0] == INQUIRY && + (cdb[1] & SI_EVPD) == 0 && + (csio->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN && + csio->dxfer_len >= SHORT_INQUIRY_LENGTH) { inq = (struct scsi_inquiry_data *)csio->data_ptr; target = csio->ccb_h.target_id; From owner-svn-src-all@FreeBSD.ORG Fri Feb 5 14:41:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3D346106568B; Fri, 5 Feb 2010 14:41:19 +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 2D51D8FC0C; Fri, 5 Feb 2010 14:41:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o15EfJmt067242; Fri, 5 Feb 2010 14:41:19 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o15EfJpt067240; Fri, 5 Feb 2010 14:41:19 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201002051441.o15EfJpt067240@svn.freebsd.org> From: Alexander Motin Date: Fri, 5 Feb 2010 14:41:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203525 - head/sys/dev/ata/chipsets X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2010 14:41:19 -0000 Author: mav Date: Fri Feb 5 14:41:18 2010 New Revision: 203525 URL: http://svn.freebsd.org/changeset/base/203525 Log: Report SATA300 chips also as SATA. Modified: head/sys/dev/ata/chipsets/ata-siliconimage.c Modified: head/sys/dev/ata/chipsets/ata-siliconimage.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-siliconimage.c Fri Feb 5 12:40:18 2010 (r203524) +++ head/sys/dev/ata/chipsets/ata-siliconimage.c Fri Feb 5 14:41:18 2010 (r203525) @@ -471,7 +471,8 @@ ata_siiprb_ch_attach(device_t dev) ch->hw.softreset = ata_siiprb_softreset; ch->hw.pm_read = ata_siiprb_pm_read; ch->hw.pm_write = ata_siiprb_pm_write; - + ch->flags |= ATA_NO_SLAVE; + ch->flags |= ATA_SATA; return 0; } From owner-svn-src-all@FreeBSD.ORG Fri Feb 5 16:41:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E74A5106568F; Fri, 5 Feb 2010 16:41:19 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BCF6D8FC19; Fri, 5 Feb 2010 16:41:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o15GfJM8093930; Fri, 5 Feb 2010 16:41:19 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o15GfJ2Y093928; Fri, 5 Feb 2010 16:41:19 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201002051641.o15GfJ2Y093928@svn.freebsd.org> From: Nathan Whitehorn Date: Fri, 5 Feb 2010 16:41:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203527 - head/release/doc/en_US.ISO8859-1/hardware X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2010 16:41:20 -0000 Author: nwhitehorn Date: Fri Feb 5 16:41:19 2010 New Revision: 203527 URL: http://svn.freebsd.org/changeset/base/203527 Log: Add a description of supported PowerPC hardware to the hardware notes. Modified: head/release/doc/en_US.ISO8859-1/hardware/article.sgml Modified: head/release/doc/en_US.ISO8859-1/hardware/article.sgml ============================================================================== --- head/release/doc/en_US.ISO8859-1/hardware/article.sgml Fri Feb 5 15:03:43 2010 (r203526) +++ head/release/doc/en_US.ISO8859-1/hardware/article.sgml Fri Feb 5 16:41:19 2010 (r203527) @@ -316,8 +316,51 @@ powerpc - The information for this paragraph has yet to be - compiled. + This section describes the systems currently known to be + supported by &os; on the PowerPC platform. This list is not + exhaustive. + + In general, all New World architecture Apple hardware + is supported, as well a limited selection of non-Apple + machines. + + All systems listed below are fully supported, with the + exception that software fan control is currently missing on + the Power Macintosh G5. SMP is supported on all systems with + more than 1 processor. + + + + Apple iMac + + + Apple Power Macintosh G3 (Blue & White) + + + Apple Power Macintosh G4 + + + Apple Power Macintosh G5 (non-970MP models) + + + Apple iBook + + + Apple PowerBook G4 + + + Apple XServe G4 + + + Apple XServe G5 + + + Apple Mac Mini + + + Embedded boards based on MPC85XX + + From owner-svn-src-all@FreeBSD.ORG Fri Feb 5 17:18:48 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6AFE8106568B; Fri, 5 Feb 2010 17:18:48 +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 5AA0F8FC08; Fri, 5 Feb 2010 17:18:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o15HImmY002428; Fri, 5 Feb 2010 17:18:48 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o15HImgO002425; Fri, 5 Feb 2010 17:18:48 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201002051718.o15HImgO002425@svn.freebsd.org> From: Alexander Motin Date: Fri, 5 Feb 2010 17:18:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203528 - head/sys/dev/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2010 17:18:48 -0000 Author: mav Date: Fri Feb 5 17:18:48 2010 New Revision: 203528 URL: http://svn.freebsd.org/changeset/base/203528 Log: Add pci_get|set_max_read_req() helper functions to control maximum PCIe read request size. Reviewed by: jhb@ Modified: head/sys/dev/pci/pci.c head/sys/dev/pci/pcivar.h Modified: head/sys/dev/pci/pci.c ============================================================================== --- head/sys/dev/pci/pci.c Fri Feb 5 16:41:19 2010 (r203527) +++ head/sys/dev/pci/pci.c Fri Feb 5 17:18:48 2010 (r203528) @@ -1626,6 +1626,40 @@ pci_ht_map_msi(device_t dev, uint64_t ad } } +int +pci_get_max_read_req(device_t dev) +{ + int cap; + uint16_t val; + + if (pci_find_extcap(dev, PCIY_EXPRESS, &cap) != 0) + return (0); + val = pci_read_config(dev, cap + PCIR_EXPRESS_DEVICE_CTL, 2); + val &= PCIM_EXP_CTL_MAX_READ_REQUEST; + val >>= 12; + return (1 << (val + 7)); +} + +int +pci_set_max_read_req(device_t dev, int size) +{ + int cap; + uint16_t val; + + if (pci_find_extcap(dev, PCIY_EXPRESS, &cap) != 0) + return (0); + if (size < 128) + size = 128; + if (size > 4096) + size = 4096; + size = (1 << (fls(size) - 1)); + val = pci_read_config(dev, cap + PCIR_EXPRESS_DEVICE_CTL, 2); + val &= ~PCIM_EXP_CTL_MAX_READ_REQUEST; + val |= (fls(size) - 8) << 12; + pci_write_config(dev, cap + PCIR_EXPRESS_DEVICE_CTL, val, 2); + return (size); +} + /* * Support for MSI message signalled interrupts. */ Modified: head/sys/dev/pci/pcivar.h ============================================================================== --- head/sys/dev/pci/pcivar.h Fri Feb 5 16:41:19 2010 (r203527) +++ head/sys/dev/pci/pcivar.h Fri Feb 5 17:18:48 2010 (r203528) @@ -458,6 +458,9 @@ int pci_msi_device_blacklisted(device_t void pci_ht_map_msi(device_t dev, uint64_t addr); +int pci_get_max_read_req(device_t dev); +int pci_set_max_read_req(device_t dev, int size); + #endif /* _SYS_BUS_H_ */ /* From owner-svn-src-all@FreeBSD.ORG Fri Feb 5 17:20:48 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E4A8A1065670; Fri, 5 Feb 2010 17:20:48 +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 D48E48FC1D; Fri, 5 Feb 2010 17:20:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o15HKmpx002901; Fri, 5 Feb 2010 17:20:48 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o15HKmRA002899; Fri, 5 Feb 2010 17:20:48 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201002051720.o15HKmRA002899@svn.freebsd.org> From: Alexander Motin Date: Fri, 5 Feb 2010 17:20:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203529 - head/sys/dev/siis X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2010 17:20:49 -0000 Author: mav Date: Fri Feb 5 17:20:48 2010 New Revision: 203529 URL: http://svn.freebsd.org/changeset/base/203529 Log: Use new helper functions to set PCIe max read request size. Modified: head/sys/dev/siis/siis.c Modified: head/sys/dev/siis/siis.c ============================================================================== --- head/sys/dev/siis/siis.c Fri Feb 5 17:18:48 2010 (r203528) +++ head/sys/dev/siis/siis.c Fri Feb 5 17:20:48 2010 (r203529) @@ -230,20 +230,10 @@ static int siis_resume(device_t dev) { struct siis_controller *ctlr = device_get_softc(dev); - int cap; - uint16_t val; /* Set PCIe max read request size to at least 1024 bytes */ - if (pci_find_extcap(dev, PCIY_EXPRESS, &cap) == 0) { - val = pci_read_config(dev, - cap + PCIR_EXPRESS_DEVICE_CTL, 2); - if ((val & PCIM_EXP_CTL_MAX_READ_REQUEST) < 0x3000) { - val &= ~PCIM_EXP_CTL_MAX_READ_REQUEST; - val |= 0x3000; - pci_write_config(dev, - cap + PCIR_EXPRESS_DEVICE_CTL, val, 2); - } - } + if (pci_get_max_read_req(dev) < 1024) + pci_set_max_read_req(dev, 1024); /* Put controller into reset state. */ ctlr->gctl |= SIIS_GCTL_GRESET; ATA_OUTL(ctlr->r_gmem, SIIS_GCTL, ctlr->gctl); From owner-svn-src-all@FreeBSD.ORG Fri Feb 5 17:29:50 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 96E681065670; Fri, 5 Feb 2010 17:29:50 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from mail-qy0-f190.google.com (mail-qy0-f190.google.com [209.85.221.190]) by mx1.freebsd.org (Postfix) with ESMTP id BD1728FC08; Fri, 5 Feb 2010 17:29:49 +0000 (UTC) Received: by qyk28 with SMTP id 28so1838147qyk.25 for ; Fri, 05 Feb 2010 09:29:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:from:date:to:cc :subject:message-id:reply-to:references:mime-version:content-type :content-disposition:in-reply-to:user-agent; bh=Dm5tgTd2Yo3Gb/6uX4CLib/cnUju9SQF0tjIIB0xti0=; b=XGcNZ+wQ3nfmaXuPWBsYfHWTzQhlVmn0lwUv3l+ycOoSsczBRg0iDe24ffXfRTKdnH cPXUA5TiuPacjEntmEm311Wbm6j3Rftj7Jb8qcXVEzqgtU4z/p7vZo4vSHrMw3HvWuEc pwS+EyCR8mtZTThea7o5a2H6LMWITYx4Vi0PA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:date:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=RxjCjGXjGzQN+JyA74yj3efuYocT0ywdzqvK+fx+jbu+R72iqVL3Vi7tdhJ6X6/wBS j4lDMP/7HDHwHPMKYsVPG5O8J1M/mLJkBaJ6PpdKzm2A9N+0P1QLDYkIz1xmXAwC2kXu ahFPz7cNvun71cxmLng1tOW4tSO2R4xy594YU= Received: by 10.224.58.208 with SMTP id i16mr1174697qah.13.1265390988537; Fri, 05 Feb 2010 09:29:48 -0800 (PST) Received: from pyunyh@gmail.com ([174.35.1.224]) by mx.google.com with ESMTPS id 26sm13435968vws.4.2010.02.05.09.29.46 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 05 Feb 2010 09:29:47 -0800 (PST) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Fri, 5 Feb 2010 09:28:27 -0800 From: Pyun YongHyeon Date: Fri, 5 Feb 2010 09:28:27 -0800 To: Alexander Motin Message-ID: <20100205172827.GO5901@michelle.cdnetworks.com> References: <201002051718.o15HImgO002425@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201002051718.o15HImgO002425@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r203528 - head/sys/dev/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2010 17:29:50 -0000 On Fri, Feb 05, 2010 at 05:18:48PM +0000, Alexander Motin wrote: > Author: mav > Date: Fri Feb 5 17:18:48 2010 > New Revision: 203528 > URL: http://svn.freebsd.org/changeset/base/203528 > > Log: > Add pci_get|set_max_read_req() helper functions to control maximum PCIe > read request size. > Thanks! From owner-svn-src-all@FreeBSD.ORG Fri Feb 5 18:00:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 941F51065695; Fri, 5 Feb 2010 18:00:24 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8392F8FC66; Fri, 5 Feb 2010 18:00:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o15I0OKt012543; Fri, 5 Feb 2010 18:00:24 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o15I0OMj012541; Fri, 5 Feb 2010 18:00:24 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201002051800.o15I0OMj012541@svn.freebsd.org> From: Jung-uk Kim Date: Fri, 5 Feb 2010 18:00:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203530 - head/sys/dev/fb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2010 18:00:24 -0000 Author: jkim Date: Fri Feb 5 18:00:24 2010 New Revision: 203530 URL: http://svn.freebsd.org/changeset/base/203530 Log: Replace some homegrown functions with better/correct ones. Modified: head/sys/dev/fb/vesa.c Modified: head/sys/dev/fb/vesa.c ============================================================================== --- head/sys/dev/fb/vesa.c Fri Feb 5 17:20:48 2010 (r203529) +++ head/sys/dev/fb/vesa.c Fri Feb 5 18:00:24 2010 (r203530) @@ -199,25 +199,11 @@ static int vesa_translate_flags(u_int16_ static int vesa_translate_mmodel(u_int8_t vmodel); static int vesa_bios_init(void); static void vesa_clear_modes(video_info_t *info, int color); -static vm_offset_t vesa_map_buffer(u_int paddr, size_t size); -static void vesa_unmap_buffer(vm_offset_t vaddr, size_t size); #if 0 static int vesa_get_origin(video_adapter_t *adp, off_t *offset); #endif -static void -dump_buffer(u_char *buf, size_t len) -{ - int i; - - for(i = 0; i < len;) { - printf("%02x ", buf[i]); - if ((++i % 16) == 0) - printf("\n"); - } -} - /* INT 10 BIOS calls */ static int int10_set_mode(int mode) @@ -788,7 +774,7 @@ vesa_bios_init(void) vesa_adp_info = &buf; if (bootverbose) { printf("VESA: information block\n"); - dump_buffer((u_char *)&buf, sizeof(buf)); + hexdump(&buf, sizeof(buf), NULL, HD_OMIT_CHARS); } vers = buf.v_version = le16toh(buf.v_version); @@ -1032,31 +1018,6 @@ vesa_clear_modes(video_info_t *info, int } } -static vm_offset_t -vesa_map_buffer(u_int paddr, size_t size) -{ - vm_offset_t vaddr; - u_int off; - - off = paddr - trunc_page(paddr); - vaddr = (vm_offset_t)pmap_mapdev_attr(paddr - off, size + off, - PAT_WRITE_COMBINING); -#if VESA_DEBUG > 1 - printf("vesa_map_buffer: paddr:%x vaddr:%tx size:%zx off:%x\n", - paddr, vaddr, size, off); -#endif - return (vaddr + off); -} - -static void -vesa_unmap_buffer(vm_offset_t vaddr, size_t size) -{ -#if VESA_DEBUG > 1 - printf("vesa_unmap_buffer: vaddr:%tx size:%zx\n", vaddr, size); -#endif - kmem_free(kernel_map, vaddr, size); -} - /* entry points */ static int @@ -1246,8 +1207,8 @@ vesa_set_mode(video_adapter_t *adp, int (*prevvidsw->get_info)(adp, mode, &info) == 0) { int10_set_mode(adp->va_initial_bios_mode); if (adp->va_info.vi_flags & V_INFO_LINEAR) - vesa_unmap_buffer(adp->va_buffer, - vesa_adp_info->v_memsize*64*1024); + pmap_unmapdev(adp->va_buffer, + vesa_adp_info->v_memsize * 64 * 1024); /* * Once (*prevvidsw->get_info)() succeeded, * (*prevvidsw->set_mode)() below won't fail... @@ -1278,8 +1239,8 @@ vesa_set_mode(video_adapter_t *adp, int vesa_bios_set_dac(8); if (adp->va_info.vi_flags & V_INFO_LINEAR) - vesa_unmap_buffer(adp->va_buffer, - vesa_adp_info->v_memsize*64*1024); + pmap_unmapdev(adp->va_buffer, + vesa_adp_info->v_memsize * 64 * 1024); #if VESA_DEBUG > 0 printf("VESA: mode set!\n"); @@ -1295,8 +1256,8 @@ vesa_set_mode(video_adapter_t *adp, int printf("VESA: setting up LFB\n"); #endif vesa_adp->va_buffer = - vesa_map_buffer(info.vi_buffer, - vesa_adp_info->v_memsize*64*1024); + (vm_offset_t)pmap_mapdev_attr(info.vi_buffer, + vesa_adp_info->v_memsize * 64 * 1024, PAT_WRITE_COMBINING); vesa_adp->va_buffer_size = info.vi_buffer_size; vesa_adp->va_window = vesa_adp->va_buffer; vesa_adp->va_window_size = info.vi_buffer_size/info.vi_planes; From owner-svn-src-all@FreeBSD.ORG Fri Feb 5 18:17:17 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E22F4106568B; Fri, 5 Feb 2010 18:17:17 +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 D1DB58FC20; Fri, 5 Feb 2010 18:17:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o15IHHhS016333; Fri, 5 Feb 2010 18:17:17 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o15IHHce016331; Fri, 5 Feb 2010 18:17:17 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201002051817.o15IHHce016331@svn.freebsd.org> From: Xin LI Date: Fri, 5 Feb 2010 18:17:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203531 - head/usr.bin/bc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2010 18:17:18 -0000 Author: delphij Date: Fri Feb 5 18:17:17 2010 New Revision: 203531 URL: http://svn.freebsd.org/changeset/base/203531 Log: Fix a bug in previous revision. The bc(1) program may need to deal with files when it's being run in interactive mode, so we can not blindly use interactive mode (in turn use libedit) but need to check if the input source is really the standard input. This commit should fix a regression where 'bc -l' would not parse the mathlib. Reported by: trasz Modified: head/usr.bin/bc/scan.l Modified: head/usr.bin/bc/scan.l ============================================================================== --- head/usr.bin/bc/scan.l Fri Feb 5 18:00:24 2010 (r203530) +++ head/usr.bin/bc/scan.l Fri Feb 5 18:17:17 2010 (r203531) @@ -301,7 +301,7 @@ static int bc_yyinput(char *buf, int maxlen) { int num; - if (interactive) { + if (yyin == stdin && interactive) { const char *bp; if ((bp = el_gets(el, &num)) == NULL || num == 0) From owner-svn-src-all@FreeBSD.ORG Fri Feb 5 18:28:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 383C7106566C; Fri, 5 Feb 2010 18:28:44 +0000 (UTC) (envelope-from mjacob@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0E7328FC08; Fri, 5 Feb 2010 18:28:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o15IShoU018874; Fri, 5 Feb 2010 18:28:43 GMT (envelope-from mjacob@svn.freebsd.org) Received: (from mjacob@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o15IShnR018871; Fri, 5 Feb 2010 18:28:43 GMT (envelope-from mjacob@svn.freebsd.org) Message-Id: <201002051828.o15IShnR018871@svn.freebsd.org> From: Matt Jacob Date: Fri, 5 Feb 2010 18:28:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203532 - head/usr.bin/gcore X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2010 18:28:44 -0000 Author: mjacob Date: Fri Feb 5 18:28:43 2010 New Revision: 203532 URL: http://svn.freebsd.org/changeset/base/203532 Log: Fix gcore so that it can have the '-s' flag without hanging. Modified: head/usr.bin/gcore/extern.h head/usr.bin/gcore/gcore.c Modified: head/usr.bin/gcore/extern.h ============================================================================== --- head/usr.bin/gcore/extern.h Fri Feb 5 18:17:17 2010 (r203531) +++ head/usr.bin/gcore/extern.h Fri Feb 5 18:28:43 2010 (r203532) @@ -38,3 +38,4 @@ struct dumpers { int (*ident)(int efd, pid_t pid, char *binfile); void (*dump)(int efd, int fd, pid_t pid); }; +extern int sflag; Modified: head/usr.bin/gcore/gcore.c ============================================================================== --- head/usr.bin/gcore/gcore.c Fri Feb 5 18:17:17 2010 (r203531) +++ head/usr.bin/gcore/gcore.c Fri Feb 5 18:28:43 2010 (r203532) @@ -65,16 +65,15 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include #include #include "extern.h" +int sflag; static void killed(int); -static void restart_target(void); static void usage(void) __dead2; static pid_t pid; @@ -84,7 +83,7 @@ SET_DECLARE(dumpset, struct dumpers); int main(int argc, char *argv[]) { - int ch, efd, fd, name[4], sflag; + int ch, efd, fd, name[4]; char *binfile, *corefile; char passpath[MAXPATHLEN], fname[MAXPATHLEN]; struct dumpers **d, *dumper; @@ -148,36 +147,28 @@ main(int argc, char *argv[]) fd = open(corefile, O_RDWR|O_CREAT|O_TRUNC, DEFFILEMODE); if (fd < 0) err(1, "%s", corefile); - if (sflag) { - signal(SIGHUP, killed); - signal(SIGINT, killed); - signal(SIGTERM, killed); - if (kill(pid, SIGSTOP) == -1) - err(1, "%d: stop signal", pid); - atexit(restart_target); - } + /* + * The semantics of the 's' flag is to stop the target process. + * Previous versions of gcore would manage this by trapping SIGHUP, + * SIGINT and SIGTERM (to be passed to the target pid), and then + * signal the child to stop. + * + * However, this messes up if the selected dumper uses ptrace calls + * that leave the child already stopped. The waitpid call in elfcore + * never returns. + * + * The best thing to do here is to externalize the 's' flag and let + * each dumper dispose of what that means, if anything. For the elfcore + * dumper, the 's' flag is a no-op since the ptrace attach stops the + * process in question already. + */ + dumper->dump(efd, fd, pid); (void)close(fd); (void)close(efd); exit(0); } -static void -killed(int sig) -{ - - restart_target(); - signal(sig, SIG_DFL); - kill(getpid(), sig); -} - -static void -restart_target(void) -{ - - kill(pid, SIGCONT); -} - void usage(void) { From owner-svn-src-all@FreeBSD.ORG Fri Feb 5 23:17:59 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 854D6106566C; Fri, 5 Feb 2010 23:17:59 +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 5C8AC8FC17; Fri, 5 Feb 2010 23:17:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o15NHxI2082455; Fri, 5 Feb 2010 23:17:59 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o15NHx0d082454; Fri, 5 Feb 2010 23:17:59 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201002052317.o15NHx0d082454@svn.freebsd.org> From: Xin LI Date: Fri, 5 Feb 2010 23:17:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203533 - head/sys/cddl/contrib/opensolaris/uts/common/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2010 23:17:59 -0000 Author: delphij Date: Fri Feb 5 23:17:59 2010 New Revision: 203533 URL: http://svn.freebsd.org/changeset/base/203533 Log: Remove two files that are not needed by FreeBSD. Approved by: pjd MFC after: 2 weeks Deleted: head/sys/cddl/contrib/opensolaris/uts/common/sys/dkio.h head/sys/cddl/contrib/opensolaris/uts/common/sys/dklabel.h From owner-svn-src-all@FreeBSD.ORG Sat Feb 6 00:25:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 87E8B106566B; Sat, 6 Feb 2010 00:25:46 +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 77BEF8FC1D; Sat, 6 Feb 2010 00:25:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o160PkxG097714; Sat, 6 Feb 2010 00:25:46 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o160PkWt097712; Sat, 6 Feb 2010 00:25:46 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201002060025.o160PkWt097712@svn.freebsd.org> From: Xin LI Date: Sat, 6 Feb 2010 00:25:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203534 - head/sbin/newfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Feb 2010 00:25:46 -0000 Author: delphij Date: Sat Feb 6 00:25:46 2010 New Revision: 203534 URL: http://svn.freebsd.org/changeset/base/203534 Log: Correct two typos. Reported by: Brandon Falk MFC after: 1 week Modified: head/sbin/newfs/newfs.c Modified: head/sbin/newfs/newfs.c ============================================================================== --- head/sbin/newfs/newfs.c Fri Feb 5 23:17:59 2010 (r203533) +++ head/sbin/newfs/newfs.c Sat Feb 6 00:25:46 2010 (r203534) @@ -499,13 +499,13 @@ usage() getprogname(), " [device-type]"); fprintf(stderr, "where fsoptions are:\n"); - fprintf(stderr, "\t-E Erase previuos disk content\n"); + fprintf(stderr, "\t-E Erase previous disk content\n"); fprintf(stderr, "\t-J Enable journaling via gjournal\n"); fprintf(stderr, "\t-L volume label to add to superblock\n"); fprintf(stderr, "\t-N do not create file system, just print out parameters\n"); fprintf(stderr, "\t-O file system format: 1 => UFS1, 2 => UFS2\n"); - fprintf(stderr, "\t-R regression test, supress random factors\n"); + fprintf(stderr, "\t-R regression test, suppress random factors\n"); fprintf(stderr, "\t-S sector size\n"); fprintf(stderr, "\t-T disktype\n"); fprintf(stderr, "\t-U enable soft updates\n"); From owner-svn-src-all@FreeBSD.ORG Sat Feb 6 00:52:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DE11B106566C; Sat, 6 Feb 2010 00:52:42 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CCA4D8FC15; Sat, 6 Feb 2010 00:52:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o160qg7T003730; Sat, 6 Feb 2010 00:52:42 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o160qgP0003727; Sat, 6 Feb 2010 00:52:42 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201002060052.o160qgP0003727@svn.freebsd.org> From: Jung-uk Kim Date: Sat, 6 Feb 2010 00:52:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203535 - in head/sys: dev/fb sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Feb 2010 00:52:44 -0000 Author: jkim Date: Sat Feb 6 00:52:42 2010 New Revision: 203535 URL: http://svn.freebsd.org/changeset/base/203535 Log: Map and report actual video memory we need. Modified: head/sys/dev/fb/vesa.c head/sys/sys/fbio.h Modified: head/sys/dev/fb/vesa.c ============================================================================== --- head/sys/dev/fb/vesa.c Sat Feb 6 00:25:46 2010 (r203534) +++ head/sys/dev/fb/vesa.c Sat Feb 6 00:52:42 2010 (r203535) @@ -725,9 +725,11 @@ vesa_bios_init(void) video_info_t *p; x86regs_t regs; size_t bsize; + size_t msize; void *vmbuf; uint32_t offs; uint16_t vers; + int bpsl; int is_via_cle266; int modes; int i; @@ -807,6 +809,8 @@ vesa_bios_init(void) if (buf.v_modetable == 0) goto fail; + msize = (size_t)buf.v_memsize * 64 * 1024; + vesa_vmodetab = x86bios_offset(BIOS_SADDRTOLADDR(buf.v_modetable)); for (i = 0, modes = 0; (i < (M_VESA_MODE_MAX - M_VESA_BASE + 1)) && @@ -850,6 +854,25 @@ vesa_bios_init(void) } #endif + bpsl = (vmode.v_modeattr & V_MODELFB) != 0 && vers >= 0x0300 ? + vmode.v_linbpscanline : vmode.v_bpscanline; + bsize = bpsl * vmode.v_height; + if ((vmode.v_modeattr & V_MODEGRAPHICS) != 0) + bsize *= vmode.v_planes; + + /* Does it have enough memory to support this mode? */ + if (msize < bsize) { +#if VESA_DEBUG > 1 + printf("Rejecting VESA %s mode: %d x %d x %d bpp " + " attr = %x, not enough memory\n", + vmode.v_modeattr & V_MODEGRAPHICS ? + "graphics" : "text", + vmode.v_width, vmode.v_height, vmode.v_bpp, + vmode.v_modeattr); +#endif + continue; + } + /* expand the array if necessary */ if (modes >= vesa_vmode_max) { vesa_vmode_max += MODE_TABLE_DELTA; @@ -891,87 +914,17 @@ vesa_bios_init(void) /* XXX window B */ vesa_vmode[modes].vi_window_size = vmode.v_wsize * 1024; vesa_vmode[modes].vi_window_gran = vmode.v_wgran * 1024; - if (vmode.v_modeattr & V_MODELFB) { + if (vmode.v_modeattr & V_MODELFB) vesa_vmode[modes].vi_buffer = vmode.v_lfb; - vesa_vmode[modes].vi_line_width = vers >= 0x0300 ? - vmode.v_linbpscanline : vmode.v_bpscanline; - } else - vesa_vmode[modes].vi_line_width = vmode.v_bpscanline; - /* XXX */ - vesa_vmode[modes].vi_buffer_size = - vesa_adp_info->v_memsize * 64 * 1024; -#if 0 - if (vmode.v_offscreen > vmode.v_lfb) - vesa_vmode[modes].vi_buffer_size = vmode.v_offscreen + - vmode.v_offscreensize * 1024 - vmode.v_lfb; - else - vesa_vmode[modes].vi_buffer_size = vmode.v_offscreen + - vmode.v_offscreensize * 1024; -#endif + vesa_vmode[modes].vi_buffer_size = bsize; vesa_vmode[modes].vi_mem_model = vesa_translate_mmodel(vmode.v_memmodel); if (vesa_vmode[modes].vi_mem_model == V_INFO_MM_PACKED || vesa_vmode[modes].vi_mem_model == V_INFO_MM_DIRECT) vesa_vmode[modes].vi_pixel_size = (vmode.v_bpp + 7) / 8; -#if 0 - if (vesa_vmode[modes].vi_mem_model == V_INFO_MM_DIRECT) { - if ((vmode.v_modeattr & V_MODELFB) != 0 && - vers >= 0x0300) { - vesa_vmode[modes].vi_pixel_fields[0] = - vmode.v_linredfieldpos; - vesa_vmode[modes].vi_pixel_fields[1] = - vmode.v_lingreenfieldpos; - vesa_vmode[modes].vi_pixel_fields[2] = - vmode.v_linbluefieldpos; - vesa_vmode[modes].vi_pixel_fields[3] = - vmode.v_linresfieldpos; - vesa_vmode[modes].vi_pixel_fsizes[0] = - vmode.v_linredmasksize; - vesa_vmode[modes].vi_pixel_fsizes[1] = - vmode.v_lingreenmasksize; - vesa_vmode[modes].vi_pixel_fsizes[2] = - vmode.v_linbluemasksize; - vesa_vmode[modes].vi_pixel_fsizes[3] = - vmode.v_linresmasksize; - } else { - vesa_vmode[modes].vi_pixel_fields[0] = - vmode.v_redfieldpos; - vesa_vmode[modes].vi_pixel_fields[1] = - vmode.v_greenfieldpos; - vesa_vmode[modes].vi_pixel_fields[2] = - vmode.v_bluefieldpos; - vesa_vmode[modes].vi_pixel_fields[3] = - vmode.v_resfieldpos; - vesa_vmode[modes].vi_pixel_fsizes[0] = - vmode.v_redmasksize; - vesa_vmode[modes].vi_pixel_fsizes[1] = - vmode.v_greenmasksize; - vesa_vmode[modes].vi_pixel_fsizes[2] = - vmode.v_bluemasksize; - vesa_vmode[modes].vi_pixel_fsizes[3] = - vmode.v_resmasksize; - } - } -#endif - vesa_vmode[modes].vi_flags = vesa_translate_flags(vmode.v_modeattr) | V_INFO_VESA; - /* Does it have enough memory to support this mode? */ - bsize = (size_t)vesa_vmode[modes].vi_line_width * - vesa_vmode[modes].vi_height; - if (bsize > vesa_vmode[modes].vi_buffer_size) { -#if VESA_DEBUG > 1 - printf("Rejecting VESA %s mode: %d x %d x %d bpp " - " attr = %x, not enough memory\n", - (vmode.v_modeattr & V_MODEGRAPHICS) != 0 ? - "graphics" : "text", - vmode.v_width, vmode.v_height, vmode.v_bpp, - vmode.v_modeattr); -#endif - continue; - } - ++modes; } vesa_vmode[modes].vi_mode = EOT; @@ -1208,7 +1161,7 @@ vesa_set_mode(video_adapter_t *adp, int int10_set_mode(adp->va_initial_bios_mode); if (adp->va_info.vi_flags & V_INFO_LINEAR) pmap_unmapdev(adp->va_buffer, - vesa_adp_info->v_memsize * 64 * 1024); + adp->va_buffer_size); /* * Once (*prevvidsw->get_info)() succeeded, * (*prevvidsw->set_mode)() below won't fail... @@ -1239,8 +1192,7 @@ vesa_set_mode(video_adapter_t *adp, int vesa_bios_set_dac(8); if (adp->va_info.vi_flags & V_INFO_LINEAR) - pmap_unmapdev(adp->va_buffer, - vesa_adp_info->v_memsize * 64 * 1024); + pmap_unmapdev(adp->va_buffer, adp->va_buffer_size); #if VESA_DEBUG > 0 printf("VESA: mode set!\n"); @@ -1257,20 +1209,21 @@ vesa_set_mode(video_adapter_t *adp, int #endif vesa_adp->va_buffer = (vm_offset_t)pmap_mapdev_attr(info.vi_buffer, - vesa_adp_info->v_memsize * 64 * 1024, PAT_WRITE_COMBINING); - vesa_adp->va_buffer_size = info.vi_buffer_size; + info.vi_buffer_size, PAT_WRITE_COMBINING); vesa_adp->va_window = vesa_adp->va_buffer; - vesa_adp->va_window_size = info.vi_buffer_size/info.vi_planes; - vesa_adp->va_window_gran = info.vi_buffer_size/info.vi_planes; + vesa_adp->va_window_size = info.vi_buffer_size / info.vi_planes; + vesa_adp->va_window_gran = info.vi_buffer_size / info.vi_planes; } else { vesa_adp->va_buffer = 0; - vesa_adp->va_buffer_size = info.vi_buffer_size; vesa_adp->va_window = (vm_offset_t)x86bios_offset(info.vi_window); vesa_adp->va_window_size = info.vi_window_size; vesa_adp->va_window_gran = info.vi_window_gran; } + vesa_adp->va_buffer_size = info.vi_buffer_size; vesa_adp->va_window_orig = 0; - vesa_adp->va_line_width = info.vi_line_width; + vesa_adp->va_line_width = info.vi_buffer_size / info.vi_height; + if ((info.vi_flags & V_INFO_GRAPHICS) != 0) + vesa_adp->va_line_width /= info.vi_planes; vesa_adp->va_disp_start.x = 0; vesa_adp->va_disp_start.y = 0; #if VESA_DEBUG > 0 Modified: head/sys/sys/fbio.h ============================================================================== --- head/sys/sys/fbio.h Sat Feb 6 00:25:46 2010 (r203534) +++ head/sys/sys/fbio.h Sat Feb 6 00:52:42 2010 (r203535) @@ -295,10 +295,8 @@ struct video_info { /* for MM_DIRECT only */ int vi_pixel_fields[4]; /* RGB and reserved fields */ int vi_pixel_fsizes[4]; - /* XXX for VESA only */ - int vi_line_width; /* reserved */ - u_char vi_reserved[60]; + u_char vi_reserved[64]; vm_offset_t vi_registers; /* physical address */ vm_offset_t vi_registers_size; }; From owner-svn-src-all@FreeBSD.ORG Sat Feb 6 11:29:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 38B5F106568B; Sat, 6 Feb 2010 11:29:07 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 270038FC20; Sat, 6 Feb 2010 11:29:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o16BT73L010640; Sat, 6 Feb 2010 11:29:07 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o16BT7to010638; Sat, 6 Feb 2010 11:29:07 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <201002061129.o16BT7to010638@svn.freebsd.org> From: Antoine Brodin Date: Sat, 6 Feb 2010 11:29:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203541 - head/usr.bin/procstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Feb 2010 11:29:07 -0000 Author: antoine Date: Sat Feb 6 11:29:06 2010 New Revision: 203541 URL: http://svn.freebsd.org/changeset/base/203541 Log: Document one more file descriptor type and two more vnode types. MFC after: 2 weeks Modified: head/usr.bin/procstat/procstat.1 Modified: head/usr.bin/procstat/procstat.1 ============================================================================== --- head/usr.bin/procstat/procstat.1 Sat Feb 6 04:34:07 2010 (r203540) +++ head/usr.bin/procstat/procstat.1 Sat Feb 6 11:29:06 2010 (r203541) @@ -141,6 +141,8 @@ The following file descriptor types may .Bl -tag -width X -compact .It c crypto +.It e +POSIX semaphore .It f fifo .It h @@ -168,10 +170,14 @@ not a vnode block device .It c character device +.It d +directory .It f fifo .It l symbolic link +.It r +regular file .It s socket .It x From owner-svn-src-all@FreeBSD.ORG Sat Feb 6 11:39:34 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2E9CA106568F; Sat, 6 Feb 2010 11:39:34 +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 1C6AA8FC30; Sat, 6 Feb 2010 11:39:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o16BdYfU013022; Sat, 6 Feb 2010 11:39:34 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o16BdYAZ013005; Sat, 6 Feb 2010 11:39:34 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201002061139.o16BdYAZ013005@svn.freebsd.org> From: Jaakko Heinonen Date: Sat, 6 Feb 2010 11:39: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: r203542 - stable/8/usr.bin/comm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Feb 2010 11:39:34 -0000 Author: jh Date: Sat Feb 6 11:39:33 2010 New Revision: 203542 URL: http://svn.freebsd.org/changeset/base/203542 Log: MFC r200441: The input line length limit mentioned on the manual page was removed by r179374. Modified: stable/8/usr.bin/comm/comm.1 Directory Properties: stable/8/usr.bin/comm/ (props changed) Modified: stable/8/usr.bin/comm/comm.1 ============================================================================== --- stable/8/usr.bin/comm/comm.1 Sat Feb 6 11:29:06 2010 (r203541) +++ stable/8/usr.bin/comm/comm.1 Sat Feb 6 11:39:33 2010 (r203542) @@ -35,7 +35,7 @@ .\" From: @(#)comm.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd January 26, 2005 +.Dd December 12, 2009 .Os .Dt COMM 1 .Sh NAME @@ -118,7 +118,3 @@ A .Nm command appeared in .At v4 . -.Sh BUGS -Input lines are limited to -.Dv LINE_MAX -(2048) characters in length. From owner-svn-src-all@FreeBSD.ORG Sat Feb 6 11:42:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA6F5106566C; Sat, 6 Feb 2010 11:42:23 +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 D88388FC08; Sat, 6 Feb 2010 11:42:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o16BgNLR013666; Sat, 6 Feb 2010 11:42:23 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o16BgN8l013664; Sat, 6 Feb 2010 11:42:23 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201002061142.o16BgN8l013664@svn.freebsd.org> From: Jaakko Heinonen Date: Sat, 6 Feb 2010 11:42: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: r203543 - stable/8/usr.bin/uniq X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Feb 2010 11:42:24 -0000 Author: jh Date: Sat Feb 6 11:42:23 2010 New Revision: 203543 URL: http://svn.freebsd.org/changeset/base/203543 Log: MFC r200632: The input line length limit mentioned on the manual page was removed by r176119. Modified: stable/8/usr.bin/uniq/uniq.1 Directory Properties: stable/8/usr.bin/uniq/ (props changed) Modified: stable/8/usr.bin/uniq/uniq.1 ============================================================================== --- stable/8/usr.bin/uniq/uniq.1 Sat Feb 6 11:39:33 2010 (r203542) +++ stable/8/usr.bin/uniq/uniq.1 Sat Feb 6 11:42:23 2010 (r203543) @@ -35,7 +35,7 @@ .\" From: @(#)uniq.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd July 3, 2004 +.Dd December 17, 2009 .Dt UNIQ 1 .Os .Sh NAME @@ -153,7 +153,3 @@ A .Nm command appeared in .At v3 . -.Sh BUGS -Input lines are limited to -.Dv LINE_MAX -(2048) bytes in length. From owner-svn-src-all@FreeBSD.ORG Sat Feb 6 12:03:25 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AD342106566B; Sat, 6 Feb 2010 12:03:25 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 95EC08FC12; Sat, 6 Feb 2010 12:03:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o16C3PwG018340; Sat, 6 Feb 2010 12:03:25 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o16C3PKw018333; Sat, 6 Feb 2010 12:03:25 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201002061203.o16C3PKw018333@svn.freebsd.org> From: Andriy Gapon Date: Sat, 6 Feb 2010 12:03:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203544 - in stable/8: sys/conf sys/contrib/dev/acpica sys/contrib/dev/acpica/common sys/contrib/dev/acpica/compiler sys/contrib/dev/acpica/debugger sys/contrib/dev/acpica/disassembler ... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Feb 2010 12:03:25 -0000 Author: avg Date: Sat Feb 6 12:03:25 2010 New Revision: 203544 URL: http://svn.freebsd.org/changeset/base/203544 Log: MFC r197104,197105,197106,197107,197688,198237,199337,199338,200553,200554, 202771,202773: bring acpica version to 20100121 MFC details: r197104 | jkim | 2009-09-12 01:48:53 +0300 (Sat, 12 Sep 2009) | 4 lines MFV: r196804 Import ACPICA 20090903 r197105 | jkim | 2009-09-12 01:49:34 +0300 (Sat, 12 Sep 2009) | 2 lines Catch up with ACPICA 20090903. r197106 | jkim | 2009-09-12 01:50:15 +0300 (Sat, 12 Sep 2009) | 2 lines Catch up with ACPICA 20090903. r197107 | jkim | 2009-09-12 01:56:08 +0300 (Sat, 12 Sep 2009) | 2 lines Canonify include paths for newly added files. r197688 | jkim | 2009-10-01 23:56:15 +0300 (Thu, 01 Oct 2009) | 4 lines Compile ACPI debugger and disassembler for kernel modules unconditionally. These files will generate almost empty object files without ACPI_DEBUG/DDB options. As a result, size of acpi.ko will increase slightly. r198237 | jkim | 2009-10-19 19:12:58 +0300 (Mon, 19 Oct 2009) | 2 lines Merge ACPICA 20091013. r199337 | jkim | 2009-11-16 23:47:12 +0200 (Mon, 16 Nov 2009) | 2 lines Merge ACPICA 20091112. r199338 | jkim | 2009-11-16 23:53:56 +0200 (Mon, 16 Nov 2009) | 2 lines Add a forgotten module Makefile change from the previous commit. r200553 | jkim | 2009-12-15 00:24:04 +0200 (Tue, 15 Dec 2009) | 2 lines Merge ACPICA 20091214. r200554 | jkim | 2009-12-15 00:28:32 +0200 (Tue, 15 Dec 2009) | 3 lines Remove _FDE quirk handling as these quirks are automatically repaired by ACPICA layer since ACPICA 20091214. r202771 | jkim | 2010-01-21 23:14:28 +0200 (Thu, 21 Jan 2010) | 2 lines Merge ACPICA 20100121. r202773 | jkim | 2010-01-21 23:31:39 +0200 (Thu, 21 Jan 2010) | 2 lines Fix a new header inclusion. Discussed with: jkim, jhb No objections from: acpi@ Added: stable/8/sys/contrib/dev/acpica/common/dmextern.c - copied, changed from r198237, head/sys/contrib/dev/acpica/common/dmextern.c stable/8/sys/contrib/dev/acpica/include/actbl2.h - copied, changed from r197104, head/sys/contrib/dev/acpica/include/actbl2.h stable/8/sys/contrib/dev/acpica/namespace/nsrepair.c - copied, changed from r197104, head/sys/contrib/dev/acpica/namespace/nsrepair.c stable/8/sys/contrib/dev/acpica/namespace/nsrepair2.c - copied, changed from r199337, head/sys/contrib/dev/acpica/namespace/nsrepair2.c stable/8/sys/contrib/dev/acpica/utilities/utids.c - copied, changed from r197104, head/sys/contrib/dev/acpica/utilities/utids.c Modified: stable/8/sys/conf/files stable/8/sys/contrib/dev/acpica/acpica_prep.sh stable/8/sys/contrib/dev/acpica/changes.txt stable/8/sys/contrib/dev/acpica/common/adfile.c stable/8/sys/contrib/dev/acpica/common/adisasm.c stable/8/sys/contrib/dev/acpica/common/adwalk.c stable/8/sys/contrib/dev/acpica/common/dmrestag.c stable/8/sys/contrib/dev/acpica/common/dmtable.c stable/8/sys/contrib/dev/acpica/common/dmtbdump.c stable/8/sys/contrib/dev/acpica/common/dmtbinfo.c stable/8/sys/contrib/dev/acpica/common/getopt.c stable/8/sys/contrib/dev/acpica/compiler/aslanalyze.c stable/8/sys/contrib/dev/acpica/compiler/aslcodegen.c stable/8/sys/contrib/dev/acpica/compiler/aslcompile.c stable/8/sys/contrib/dev/acpica/compiler/aslcompiler.h stable/8/sys/contrib/dev/acpica/compiler/aslcompiler.l stable/8/sys/contrib/dev/acpica/compiler/aslcompiler.y stable/8/sys/contrib/dev/acpica/compiler/asldefine.h stable/8/sys/contrib/dev/acpica/compiler/aslerror.c stable/8/sys/contrib/dev/acpica/compiler/aslfiles.c stable/8/sys/contrib/dev/acpica/compiler/aslfold.c stable/8/sys/contrib/dev/acpica/compiler/aslglobal.h stable/8/sys/contrib/dev/acpica/compiler/asllength.c stable/8/sys/contrib/dev/acpica/compiler/asllisting.c stable/8/sys/contrib/dev/acpica/compiler/aslload.c stable/8/sys/contrib/dev/acpica/compiler/asllookup.c stable/8/sys/contrib/dev/acpica/compiler/aslmain.c stable/8/sys/contrib/dev/acpica/compiler/aslmap.c stable/8/sys/contrib/dev/acpica/compiler/aslopcodes.c stable/8/sys/contrib/dev/acpica/compiler/asloperands.c stable/8/sys/contrib/dev/acpica/compiler/aslopt.c stable/8/sys/contrib/dev/acpica/compiler/aslresource.c stable/8/sys/contrib/dev/acpica/compiler/aslrestype1.c stable/8/sys/contrib/dev/acpica/compiler/aslrestype2.c stable/8/sys/contrib/dev/acpica/compiler/aslstartup.c stable/8/sys/contrib/dev/acpica/compiler/aslstubs.c stable/8/sys/contrib/dev/acpica/compiler/asltransform.c stable/8/sys/contrib/dev/acpica/compiler/asltree.c stable/8/sys/contrib/dev/acpica/compiler/asltypes.h stable/8/sys/contrib/dev/acpica/compiler/aslutils.c stable/8/sys/contrib/dev/acpica/debugger/dbcmds.c stable/8/sys/contrib/dev/acpica/debugger/dbdisply.c stable/8/sys/contrib/dev/acpica/debugger/dbexec.c stable/8/sys/contrib/dev/acpica/debugger/dbfileio.c stable/8/sys/contrib/dev/acpica/debugger/dbhistry.c stable/8/sys/contrib/dev/acpica/debugger/dbinput.c stable/8/sys/contrib/dev/acpica/debugger/dbstats.c stable/8/sys/contrib/dev/acpica/debugger/dbutils.c stable/8/sys/contrib/dev/acpica/debugger/dbxface.c stable/8/sys/contrib/dev/acpica/disassembler/dmbuffer.c stable/8/sys/contrib/dev/acpica/disassembler/dmnames.c stable/8/sys/contrib/dev/acpica/disassembler/dmobject.c stable/8/sys/contrib/dev/acpica/disassembler/dmopcode.c stable/8/sys/contrib/dev/acpica/disassembler/dmresrc.c stable/8/sys/contrib/dev/acpica/disassembler/dmresrcl.c stable/8/sys/contrib/dev/acpica/disassembler/dmresrcs.c stable/8/sys/contrib/dev/acpica/disassembler/dmutils.c stable/8/sys/contrib/dev/acpica/disassembler/dmwalk.c stable/8/sys/contrib/dev/acpica/dispatcher/dsfield.c stable/8/sys/contrib/dev/acpica/dispatcher/dsinit.c stable/8/sys/contrib/dev/acpica/dispatcher/dsmethod.c stable/8/sys/contrib/dev/acpica/dispatcher/dsmthdat.c stable/8/sys/contrib/dev/acpica/dispatcher/dsobject.c stable/8/sys/contrib/dev/acpica/dispatcher/dsopcode.c stable/8/sys/contrib/dev/acpica/dispatcher/dsutils.c stable/8/sys/contrib/dev/acpica/dispatcher/dswexec.c stable/8/sys/contrib/dev/acpica/dispatcher/dswload.c stable/8/sys/contrib/dev/acpica/dispatcher/dswscope.c stable/8/sys/contrib/dev/acpica/dispatcher/dswstate.c stable/8/sys/contrib/dev/acpica/events/evevent.c stable/8/sys/contrib/dev/acpica/events/evgpe.c stable/8/sys/contrib/dev/acpica/events/evgpeblk.c stable/8/sys/contrib/dev/acpica/events/evmisc.c stable/8/sys/contrib/dev/acpica/events/evregion.c stable/8/sys/contrib/dev/acpica/events/evrgnini.c stable/8/sys/contrib/dev/acpica/events/evsci.c stable/8/sys/contrib/dev/acpica/events/evxface.c stable/8/sys/contrib/dev/acpica/events/evxfevnt.c stable/8/sys/contrib/dev/acpica/events/evxfregn.c stable/8/sys/contrib/dev/acpica/executer/exconfig.c stable/8/sys/contrib/dev/acpica/executer/exconvrt.c stable/8/sys/contrib/dev/acpica/executer/excreate.c stable/8/sys/contrib/dev/acpica/executer/exdump.c stable/8/sys/contrib/dev/acpica/executer/exfield.c stable/8/sys/contrib/dev/acpica/executer/exfldio.c stable/8/sys/contrib/dev/acpica/executer/exmisc.c stable/8/sys/contrib/dev/acpica/executer/exmutex.c stable/8/sys/contrib/dev/acpica/executer/exnames.c stable/8/sys/contrib/dev/acpica/executer/exoparg1.c stable/8/sys/contrib/dev/acpica/executer/exoparg2.c stable/8/sys/contrib/dev/acpica/executer/exoparg3.c stable/8/sys/contrib/dev/acpica/executer/exoparg6.c stable/8/sys/contrib/dev/acpica/executer/exprep.c stable/8/sys/contrib/dev/acpica/executer/exregion.c stable/8/sys/contrib/dev/acpica/executer/exresnte.c stable/8/sys/contrib/dev/acpica/executer/exresolv.c stable/8/sys/contrib/dev/acpica/executer/exresop.c stable/8/sys/contrib/dev/acpica/executer/exstore.c stable/8/sys/contrib/dev/acpica/executer/exstoren.c stable/8/sys/contrib/dev/acpica/executer/exstorob.c stable/8/sys/contrib/dev/acpica/executer/exsystem.c stable/8/sys/contrib/dev/acpica/executer/exutils.c stable/8/sys/contrib/dev/acpica/hardware/hwacpi.c stable/8/sys/contrib/dev/acpica/hardware/hwgpe.c stable/8/sys/contrib/dev/acpica/hardware/hwregs.c stable/8/sys/contrib/dev/acpica/hardware/hwsleep.c stable/8/sys/contrib/dev/acpica/hardware/hwtimer.c stable/8/sys/contrib/dev/acpica/hardware/hwvalid.c stable/8/sys/contrib/dev/acpica/hardware/hwxface.c stable/8/sys/contrib/dev/acpica/include/acapps.h stable/8/sys/contrib/dev/acpica/include/accommon.h stable/8/sys/contrib/dev/acpica/include/acconfig.h stable/8/sys/contrib/dev/acpica/include/acdebug.h stable/8/sys/contrib/dev/acpica/include/acdisasm.h stable/8/sys/contrib/dev/acpica/include/acdispat.h stable/8/sys/contrib/dev/acpica/include/acevents.h stable/8/sys/contrib/dev/acpica/include/acexcep.h stable/8/sys/contrib/dev/acpica/include/acglobal.h stable/8/sys/contrib/dev/acpica/include/achware.h stable/8/sys/contrib/dev/acpica/include/acinterp.h stable/8/sys/contrib/dev/acpica/include/aclocal.h stable/8/sys/contrib/dev/acpica/include/acmacros.h stable/8/sys/contrib/dev/acpica/include/acnames.h stable/8/sys/contrib/dev/acpica/include/acnamesp.h stable/8/sys/contrib/dev/acpica/include/acobject.h stable/8/sys/contrib/dev/acpica/include/acopcode.h stable/8/sys/contrib/dev/acpica/include/acoutput.h stable/8/sys/contrib/dev/acpica/include/acparser.h stable/8/sys/contrib/dev/acpica/include/acpi.h stable/8/sys/contrib/dev/acpica/include/acpiosxf.h stable/8/sys/contrib/dev/acpica/include/acpixf.h stable/8/sys/contrib/dev/acpica/include/acpredef.h stable/8/sys/contrib/dev/acpica/include/acresrc.h stable/8/sys/contrib/dev/acpica/include/acrestyp.h stable/8/sys/contrib/dev/acpica/include/acstruct.h stable/8/sys/contrib/dev/acpica/include/actables.h stable/8/sys/contrib/dev/acpica/include/actbl.h stable/8/sys/contrib/dev/acpica/include/actbl1.h stable/8/sys/contrib/dev/acpica/include/actypes.h stable/8/sys/contrib/dev/acpica/include/acutils.h stable/8/sys/contrib/dev/acpica/include/amlcode.h stable/8/sys/contrib/dev/acpica/include/amlresrc.h stable/8/sys/contrib/dev/acpica/include/platform/acenv.h stable/8/sys/contrib/dev/acpica/include/platform/acfreebsd.h stable/8/sys/contrib/dev/acpica/include/platform/acgcc.h stable/8/sys/contrib/dev/acpica/namespace/nsaccess.c stable/8/sys/contrib/dev/acpica/namespace/nsalloc.c stable/8/sys/contrib/dev/acpica/namespace/nsdump.c stable/8/sys/contrib/dev/acpica/namespace/nsdumpdv.c stable/8/sys/contrib/dev/acpica/namespace/nseval.c stable/8/sys/contrib/dev/acpica/namespace/nsinit.c stable/8/sys/contrib/dev/acpica/namespace/nsload.c stable/8/sys/contrib/dev/acpica/namespace/nsnames.c stable/8/sys/contrib/dev/acpica/namespace/nsobject.c stable/8/sys/contrib/dev/acpica/namespace/nsparse.c stable/8/sys/contrib/dev/acpica/namespace/nspredef.c stable/8/sys/contrib/dev/acpica/namespace/nssearch.c stable/8/sys/contrib/dev/acpica/namespace/nsutils.c stable/8/sys/contrib/dev/acpica/namespace/nswalk.c stable/8/sys/contrib/dev/acpica/namespace/nsxfeval.c stable/8/sys/contrib/dev/acpica/namespace/nsxfname.c stable/8/sys/contrib/dev/acpica/namespace/nsxfobj.c stable/8/sys/contrib/dev/acpica/osunixxf.c stable/8/sys/contrib/dev/acpica/parser/psargs.c stable/8/sys/contrib/dev/acpica/parser/psloop.c stable/8/sys/contrib/dev/acpica/parser/psopcode.c stable/8/sys/contrib/dev/acpica/parser/psparse.c stable/8/sys/contrib/dev/acpica/parser/psscope.c stable/8/sys/contrib/dev/acpica/parser/pstree.c stable/8/sys/contrib/dev/acpica/parser/psutils.c stable/8/sys/contrib/dev/acpica/parser/pswalk.c stable/8/sys/contrib/dev/acpica/parser/psxface.c stable/8/sys/contrib/dev/acpica/resources/rsaddr.c stable/8/sys/contrib/dev/acpica/resources/rscalc.c stable/8/sys/contrib/dev/acpica/resources/rscreate.c stable/8/sys/contrib/dev/acpica/resources/rsdump.c stable/8/sys/contrib/dev/acpica/resources/rsinfo.c stable/8/sys/contrib/dev/acpica/resources/rsio.c stable/8/sys/contrib/dev/acpica/resources/rsirq.c stable/8/sys/contrib/dev/acpica/resources/rslist.c stable/8/sys/contrib/dev/acpica/resources/rsmemory.c stable/8/sys/contrib/dev/acpica/resources/rsmisc.c stable/8/sys/contrib/dev/acpica/resources/rsutils.c stable/8/sys/contrib/dev/acpica/resources/rsxface.c stable/8/sys/contrib/dev/acpica/tables/tbfadt.c stable/8/sys/contrib/dev/acpica/tables/tbfind.c stable/8/sys/contrib/dev/acpica/tables/tbinstal.c stable/8/sys/contrib/dev/acpica/tables/tbutils.c stable/8/sys/contrib/dev/acpica/tables/tbxface.c stable/8/sys/contrib/dev/acpica/tables/tbxfroot.c stable/8/sys/contrib/dev/acpica/tools/acpiexec/aecommon.h stable/8/sys/contrib/dev/acpica/utilities/utalloc.c stable/8/sys/contrib/dev/acpica/utilities/utcache.c stable/8/sys/contrib/dev/acpica/utilities/utcopy.c stable/8/sys/contrib/dev/acpica/utilities/utdebug.c stable/8/sys/contrib/dev/acpica/utilities/utdelete.c stable/8/sys/contrib/dev/acpica/utilities/uteval.c stable/8/sys/contrib/dev/acpica/utilities/utglobal.c stable/8/sys/contrib/dev/acpica/utilities/utinit.c stable/8/sys/contrib/dev/acpica/utilities/utlock.c stable/8/sys/contrib/dev/acpica/utilities/utmath.c stable/8/sys/contrib/dev/acpica/utilities/utmisc.c stable/8/sys/contrib/dev/acpica/utilities/utmutex.c stable/8/sys/contrib/dev/acpica/utilities/utobject.c stable/8/sys/contrib/dev/acpica/utilities/utresrc.c stable/8/sys/contrib/dev/acpica/utilities/utstate.c stable/8/sys/contrib/dev/acpica/utilities/uttrack.c stable/8/sys/contrib/dev/acpica/utilities/utxface.c stable/8/sys/dev/acpi_support/acpi_ibm.c stable/8/sys/dev/acpi_support/acpi_panasonic.c stable/8/sys/dev/acpi_support/acpi_wmi.c stable/8/sys/dev/acpica/Osd/OsdHardware.c stable/8/sys/dev/acpica/Osd/OsdSchedule.c stable/8/sys/dev/acpica/acpi.c stable/8/sys/dev/acpica/acpi_cpu.c stable/8/sys/dev/acpica/acpi_dock.c stable/8/sys/dev/acpica/acpi_ec.c stable/8/sys/dev/acpica/acpi_if.m stable/8/sys/dev/acpica/acpi_package.c stable/8/sys/dev/acpica/acpi_pci.c stable/8/sys/dev/acpica/acpi_pcib_acpi.c stable/8/sys/dev/acpica/acpi_powerres.c stable/8/sys/dev/acpica/acpi_smbat.c stable/8/sys/dev/acpica/acpi_video.c stable/8/sys/dev/acpica/acpivar.h stable/8/sys/dev/fdc/fdc_acpi.c stable/8/sys/modules/acpi/acpi/Makefile stable/8/usr.sbin/acpi/acpidb/Makefile stable/8/usr.sbin/acpi/acpidb/acpidb.c stable/8/usr.sbin/acpi/iasl/Makefile Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/usr.sbin/acpi/ (props changed) Modified: stable/8/sys/conf/files ============================================================================== --- stable/8/sys/conf/files Sat Feb 6 11:42:23 2010 (r203543) +++ stable/8/sys/conf/files Sat Feb 6 12:03:25 2010 (r203544) @@ -171,105 +171,108 @@ contrib/dev/acpica/dispatcher/dswexec.c contrib/dev/acpica/dispatcher/dswload.c optional acpi contrib/dev/acpica/dispatcher/dswscope.c optional acpi contrib/dev/acpica/dispatcher/dswstate.c optional acpi -contrib/dev/acpica/events/evevent.c optional acpi -contrib/dev/acpica/events/evgpe.c optional acpi -contrib/dev/acpica/events/evgpeblk.c optional acpi -contrib/dev/acpica/events/evmisc.c optional acpi -contrib/dev/acpica/events/evregion.c optional acpi -contrib/dev/acpica/events/evrgnini.c optional acpi -contrib/dev/acpica/events/evsci.c optional acpi -contrib/dev/acpica/events/evxface.c optional acpi -contrib/dev/acpica/events/evxfevnt.c optional acpi -contrib/dev/acpica/events/evxfregn.c optional acpi -contrib/dev/acpica/executer/exconfig.c optional acpi -contrib/dev/acpica/executer/exconvrt.c optional acpi -contrib/dev/acpica/executer/excreate.c optional acpi -contrib/dev/acpica/executer/exdump.c optional acpi -contrib/dev/acpica/executer/exfield.c optional acpi -contrib/dev/acpica/executer/exfldio.c optional acpi -contrib/dev/acpica/executer/exmisc.c optional acpi -contrib/dev/acpica/executer/exmutex.c optional acpi -contrib/dev/acpica/executer/exnames.c optional acpi -contrib/dev/acpica/executer/exoparg1.c optional acpi -contrib/dev/acpica/executer/exoparg2.c optional acpi -contrib/dev/acpica/executer/exoparg3.c optional acpi -contrib/dev/acpica/executer/exoparg6.c optional acpi -contrib/dev/acpica/executer/exprep.c optional acpi -contrib/dev/acpica/executer/exregion.c optional acpi -contrib/dev/acpica/executer/exresnte.c optional acpi -contrib/dev/acpica/executer/exresolv.c optional acpi -contrib/dev/acpica/executer/exresop.c optional acpi -contrib/dev/acpica/executer/exstore.c optional acpi -contrib/dev/acpica/executer/exstoren.c optional acpi -contrib/dev/acpica/executer/exstorob.c optional acpi -contrib/dev/acpica/executer/exsystem.c optional acpi -contrib/dev/acpica/executer/exutils.c optional acpi -contrib/dev/acpica/hardware/hwacpi.c optional acpi -contrib/dev/acpica/hardware/hwgpe.c optional acpi -contrib/dev/acpica/hardware/hwregs.c optional acpi -contrib/dev/acpica/hardware/hwsleep.c optional acpi -contrib/dev/acpica/hardware/hwtimer.c optional acpi -contrib/dev/acpica/hardware/hwvalid.c optional acpi -contrib/dev/acpica/hardware/hwxface.c optional acpi -contrib/dev/acpica/namespace/nsaccess.c optional acpi -contrib/dev/acpica/namespace/nsalloc.c optional acpi -contrib/dev/acpica/namespace/nsdump.c optional acpi -contrib/dev/acpica/namespace/nseval.c optional acpi -contrib/dev/acpica/namespace/nsinit.c optional acpi -contrib/dev/acpica/namespace/nsload.c optional acpi -contrib/dev/acpica/namespace/nsnames.c optional acpi -contrib/dev/acpica/namespace/nsobject.c optional acpi -contrib/dev/acpica/namespace/nsparse.c optional acpi -contrib/dev/acpica/namespace/nspredef.c optional acpi -contrib/dev/acpica/namespace/nssearch.c optional acpi -contrib/dev/acpica/namespace/nsutils.c optional acpi -contrib/dev/acpica/namespace/nswalk.c optional acpi -contrib/dev/acpica/namespace/nsxfeval.c optional acpi -contrib/dev/acpica/namespace/nsxfname.c optional acpi -contrib/dev/acpica/namespace/nsxfobj.c optional acpi -contrib/dev/acpica/parser/psargs.c optional acpi -contrib/dev/acpica/parser/psloop.c optional acpi -contrib/dev/acpica/parser/psopcode.c optional acpi -contrib/dev/acpica/parser/psparse.c optional acpi -contrib/dev/acpica/parser/psscope.c optional acpi -contrib/dev/acpica/parser/pstree.c optional acpi -contrib/dev/acpica/parser/psutils.c optional acpi -contrib/dev/acpica/parser/pswalk.c optional acpi -contrib/dev/acpica/parser/psxface.c optional acpi -contrib/dev/acpica/resources/rsaddr.c optional acpi -contrib/dev/acpica/resources/rscalc.c optional acpi -contrib/dev/acpica/resources/rscreate.c optional acpi -contrib/dev/acpica/resources/rsdump.c optional acpi -contrib/dev/acpica/resources/rsinfo.c optional acpi -contrib/dev/acpica/resources/rsio.c optional acpi -contrib/dev/acpica/resources/rsirq.c optional acpi -contrib/dev/acpica/resources/rslist.c optional acpi -contrib/dev/acpica/resources/rsmemory.c optional acpi -contrib/dev/acpica/resources/rsmisc.c optional acpi -contrib/dev/acpica/resources/rsutils.c optional acpi -contrib/dev/acpica/resources/rsxface.c optional acpi -contrib/dev/acpica/tables/tbfadt.c optional acpi -contrib/dev/acpica/tables/tbfind.c optional acpi -contrib/dev/acpica/tables/tbinstal.c optional acpi -contrib/dev/acpica/tables/tbutils.c optional acpi -contrib/dev/acpica/tables/tbxface.c optional acpi -contrib/dev/acpica/tables/tbxfroot.c optional acpi -contrib/dev/acpica/utilities/utalloc.c optional acpi -contrib/dev/acpica/utilities/utcache.c optional acpi -contrib/dev/acpica/utilities/utcopy.c optional acpi -contrib/dev/acpica/utilities/utdebug.c optional acpi -contrib/dev/acpica/utilities/utdelete.c optional acpi -contrib/dev/acpica/utilities/uteval.c optional acpi -contrib/dev/acpica/utilities/utglobal.c optional acpi -contrib/dev/acpica/utilities/utinit.c optional acpi -contrib/dev/acpica/utilities/utlock.c optional acpi -contrib/dev/acpica/utilities/utmath.c optional acpi -contrib/dev/acpica/utilities/utmisc.c optional acpi -contrib/dev/acpica/utilities/utmutex.c optional acpi -contrib/dev/acpica/utilities/utobject.c optional acpi -contrib/dev/acpica/utilities/utresrc.c optional acpi -contrib/dev/acpica/utilities/utstate.c optional acpi -contrib/dev/acpica/utilities/utxface.c optional acpi +contrib/dev/acpica/events/evevent.c optional acpi +contrib/dev/acpica/events/evgpe.c optional acpi +contrib/dev/acpica/events/evgpeblk.c optional acpi +contrib/dev/acpica/events/evmisc.c optional acpi +contrib/dev/acpica/events/evregion.c optional acpi +contrib/dev/acpica/events/evrgnini.c optional acpi +contrib/dev/acpica/events/evsci.c optional acpi +contrib/dev/acpica/events/evxface.c optional acpi +contrib/dev/acpica/events/evxfevnt.c optional acpi +contrib/dev/acpica/events/evxfregn.c optional acpi +contrib/dev/acpica/executer/exconfig.c optional acpi +contrib/dev/acpica/executer/exconvrt.c optional acpi +contrib/dev/acpica/executer/excreate.c optional acpi +contrib/dev/acpica/executer/exdump.c optional acpi +contrib/dev/acpica/executer/exfield.c optional acpi +contrib/dev/acpica/executer/exfldio.c optional acpi +contrib/dev/acpica/executer/exmisc.c optional acpi +contrib/dev/acpica/executer/exmutex.c optional acpi +contrib/dev/acpica/executer/exnames.c optional acpi +contrib/dev/acpica/executer/exoparg1.c optional acpi +contrib/dev/acpica/executer/exoparg2.c optional acpi +contrib/dev/acpica/executer/exoparg3.c optional acpi +contrib/dev/acpica/executer/exoparg6.c optional acpi +contrib/dev/acpica/executer/exprep.c optional acpi +contrib/dev/acpica/executer/exregion.c optional acpi +contrib/dev/acpica/executer/exresnte.c optional acpi +contrib/dev/acpica/executer/exresolv.c optional acpi +contrib/dev/acpica/executer/exresop.c optional acpi +contrib/dev/acpica/executer/exstore.c optional acpi +contrib/dev/acpica/executer/exstoren.c optional acpi +contrib/dev/acpica/executer/exstorob.c optional acpi +contrib/dev/acpica/executer/exsystem.c optional acpi +contrib/dev/acpica/executer/exutils.c optional acpi +contrib/dev/acpica/hardware/hwacpi.c optional acpi +contrib/dev/acpica/hardware/hwgpe.c optional acpi +contrib/dev/acpica/hardware/hwregs.c optional acpi +contrib/dev/acpica/hardware/hwsleep.c optional acpi +contrib/dev/acpica/hardware/hwtimer.c optional acpi +contrib/dev/acpica/hardware/hwvalid.c optional acpi +contrib/dev/acpica/hardware/hwxface.c optional acpi +contrib/dev/acpica/namespace/nsaccess.c optional acpi +contrib/dev/acpica/namespace/nsalloc.c optional acpi +contrib/dev/acpica/namespace/nsdump.c optional acpi +contrib/dev/acpica/namespace/nseval.c optional acpi +contrib/dev/acpica/namespace/nsinit.c optional acpi +contrib/dev/acpica/namespace/nsload.c optional acpi +contrib/dev/acpica/namespace/nsnames.c optional acpi +contrib/dev/acpica/namespace/nsobject.c optional acpi +contrib/dev/acpica/namespace/nsparse.c optional acpi +contrib/dev/acpica/namespace/nspredef.c optional acpi +contrib/dev/acpica/namespace/nsrepair.c optional acpi +contrib/dev/acpica/namespace/nsrepair2.c optional acpi +contrib/dev/acpica/namespace/nssearch.c optional acpi +contrib/dev/acpica/namespace/nsutils.c optional acpi +contrib/dev/acpica/namespace/nswalk.c optional acpi +contrib/dev/acpica/namespace/nsxfeval.c optional acpi +contrib/dev/acpica/namespace/nsxfname.c optional acpi +contrib/dev/acpica/namespace/nsxfobj.c optional acpi +contrib/dev/acpica/parser/psargs.c optional acpi +contrib/dev/acpica/parser/psloop.c optional acpi +contrib/dev/acpica/parser/psopcode.c optional acpi +contrib/dev/acpica/parser/psparse.c optional acpi +contrib/dev/acpica/parser/psscope.c optional acpi +contrib/dev/acpica/parser/pstree.c optional acpi +contrib/dev/acpica/parser/psutils.c optional acpi +contrib/dev/acpica/parser/pswalk.c optional acpi +contrib/dev/acpica/parser/psxface.c optional acpi +contrib/dev/acpica/resources/rsaddr.c optional acpi +contrib/dev/acpica/resources/rscalc.c optional acpi +contrib/dev/acpica/resources/rscreate.c optional acpi +contrib/dev/acpica/resources/rsdump.c optional acpi +contrib/dev/acpica/resources/rsinfo.c optional acpi +contrib/dev/acpica/resources/rsio.c optional acpi +contrib/dev/acpica/resources/rsirq.c optional acpi +contrib/dev/acpica/resources/rslist.c optional acpi +contrib/dev/acpica/resources/rsmemory.c optional acpi +contrib/dev/acpica/resources/rsmisc.c optional acpi +contrib/dev/acpica/resources/rsutils.c optional acpi +contrib/dev/acpica/resources/rsxface.c optional acpi +contrib/dev/acpica/tables/tbfadt.c optional acpi +contrib/dev/acpica/tables/tbfind.c optional acpi +contrib/dev/acpica/tables/tbinstal.c optional acpi +contrib/dev/acpica/tables/tbutils.c optional acpi +contrib/dev/acpica/tables/tbxface.c optional acpi +contrib/dev/acpica/tables/tbxfroot.c optional acpi +contrib/dev/acpica/utilities/utalloc.c optional acpi +contrib/dev/acpica/utilities/utcache.c optional acpi +contrib/dev/acpica/utilities/utcopy.c optional acpi +contrib/dev/acpica/utilities/utdebug.c optional acpi +contrib/dev/acpica/utilities/utdelete.c optional acpi +contrib/dev/acpica/utilities/uteval.c optional acpi +contrib/dev/acpica/utilities/utglobal.c optional acpi +contrib/dev/acpica/utilities/utids.c optional acpi +contrib/dev/acpica/utilities/utinit.c optional acpi +contrib/dev/acpica/utilities/utlock.c optional acpi +contrib/dev/acpica/utilities/utmath.c optional acpi +contrib/dev/acpica/utilities/utmisc.c optional acpi +contrib/dev/acpica/utilities/utmutex.c optional acpi +contrib/dev/acpica/utilities/utobject.c optional acpi +contrib/dev/acpica/utilities/utresrc.c optional acpi +contrib/dev/acpica/utilities/utstate.c optional acpi +contrib/dev/acpica/utilities/utxface.c optional acpi contrib/ipfilter/netinet/fil.c optional ipfilter inet \ compile-with "${NORMAL_C} -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_auth.c optional ipfilter inet \ Modified: stable/8/sys/contrib/dev/acpica/acpica_prep.sh ============================================================================== --- stable/8/sys/contrib/dev/acpica/acpica_prep.sh Sat Feb 6 11:42:23 2010 (r203543) +++ stable/8/sys/contrib/dev/acpica/acpica_prep.sh Sat Feb 6 12:03:25 2010 (r203544) @@ -21,7 +21,7 @@ fulldirs="common compiler debugger disas # files to remove stripdirs="acpisrc acpixtract examples generate os_specific" stripfiles="Makefile README acintel.h aclinux.h acmsvc.h acnetbsd.h \ - acos2.h accygwin.h acefi.h actbl2.h acwin.h acwin64.h aeexec.c \ + acos2.h accygwin.h acefi.h acwin.h acwin64.h aeexec.c \ aehandlers.c aemain.c aetables.c osunixdir.c readme.txt \ utclib.c" @@ -31,8 +31,8 @@ src_headers="acapps.h accommon.h acconfi aclocal.h acmacros.h acnames.h acnamesp.h acobject.h acopcode.h \ acoutput.h acparser.h acpi.h acpiosxf.h acpixf.h acpredef.h \ acresrc.h acrestyp.h acstruct.h actables.h actbl.h actbl1.h \ - actypes.h acutils.h amlcode.h amlresrc.h platform/acenv.h \ - platform/acfreebsd.h platform/acgcc.h" + actbl2.h actypes.h acutils.h amlcode.h amlresrc.h \ + platform/acenv.h platform/acfreebsd.h platform/acgcc.h" comp_headers="aslcompiler.h asldefine.h aslglobal.h asltypes.h" platform_headers="acfreebsd.h acgcc.h" Modified: stable/8/sys/contrib/dev/acpica/changes.txt ============================================================================== --- stable/8/sys/contrib/dev/acpica/changes.txt Sat Feb 6 11:42:23 2010 (r203543) +++ stable/8/sys/contrib/dev/acpica/changes.txt Sat Feb 6 12:03:25 2010 (r203544) @@ -1,7 +1,467 @@ ---------------------------------------- -21 May 2009. Summary of changes for version 20090521: +21 January 2010. Summary of changes for version 20100121: + +1) ACPI CA Core Subsystem: + +Added the 2010 copyright to all module headers and signons. This affects +virtually every file in the ACPICA core subsystem, the iASL compiler, the +tools/utilities, and the test suites. + +Implemented a change to the AcpiGetDevices interface to eliminate unnecessary +invocations of the _STA method. In the case where a specific _HID is +requested, do not run _STA until a _HID match is found. This eliminates +potentially dozens of _STA calls during a search for a particular device/HID, +which in turn can improve boot times. ACPICA BZ 828. Lin Ming. + +Implemented an additional repair for predefined method return values. Attempt +to repair unexpected NULL elements within returned Package objects. Create an +Integer of value zero, a NULL String, or a zero-length Buffer as appropriate. +ACPICA BZ 818. Lin Ming, Bob Moore. + +Removed the obsolete ACPI_INTEGER data type. This type was introduced as the +code was migrated from ACPI 1.0 (with 32-bit AML integers) to ACPI 2.0 (with +64-bit AML integers). It is now obsolete and this change removes it from the +ACPICA code base, replaced by UINT64. The original typedef has been retained +for now for compatibility with existing device driver code. ACPICA BZ 824. + +Removed the unused UINT32_STRUCT type, and the obsolete Integer64 field in +the parse tree object. + +Added additional warning options for the gcc-4 generation. Updated the source +accordingly. This includes some code restructuring to eliminate unreachable +code, elimination of some gotos, elimination of unused return values, some +additional casting, and removal of redundant declarations. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and has a +much larger code and data size. + + Previous Release: + Non-Debug Version: 87.0K Code, 18.0K Data, 105.0K Total + Debug Version: 163.4K Code, 50.8K Data, 214.2K Total + Current Release: + Non-Debug Version: 87.1K Code, 18.0K Data, 105.1K Total + Debug Version: 163.5K Code, 50.9K Data, 214.4K Total + +2) iASL Compiler/Disassembler and Tools: + +No functional changes for this release. + +---------------------------------------- +14 December 2009. Summary of changes for version 20091214: -This release is available at www.acpica.org/downloads +1) ACPI CA Core Subsystem: + +Enhanced automatic data type conversions for predefined name repairs. This +change expands the automatic repairs/conversions for predefined name return +values to make Integers, Strings, and Buffers fully interchangeable. Also, a +Buffer can be converted to a Package of Integers if necessary. The nsrepair.c +module was completely restructured. Lin Ming, Bob Moore. + +Implemented automatic removal of null package elements during predefined name +repairs. This change will automatically remove embedded and trailing NULL +package elements from returned package objects that are defined to contain a +variable number of sub-packages. The driver is then presented with a package +with no null elements to deal with. ACPICA BZ 819. + +Implemented a repair for the predefined _FDE and _GTM names. The expected +return value for both names is a Buffer of 5 DWORDs. This repair fixes two +possible problems (both seen in the field), where a package of integers is +returned, or a buffer of BYTEs is returned. With assistance from Jung-uk Kim. + +Implemented additional module-level code support. This change will properly +execute module-level code that is not at the root of the namespace (under a +Device object, etc.). Now executes the code within the current scope instead +of the root. ACPICA BZ 762. Lin Ming. + +Fixed possible mutex acquisition errors when running _REG methods. Fixes a +problem where mutex errors can occur when running a _REG method that is in +the same scope as a method-defined operation region or an operation region +under a module-level IF block. This type of code is rare, so the problem has +not been seen before. ACPICA BZ 826. Lin Ming, Bob Moore. + +Fixed a possible memory leak during module-level code execution. An object +could be leaked for each block of executed module-level code if the +interpreter slack mode is enabled This change deletes any implicitly returned +object from the module-level code block. Lin Ming. + +Removed messages for successful predefined repair(s). The repair mechanism +was considered too wordy. Now, messages are only unconditionally emitted if +the return object cannot be repaired. Existing messages for successful +repairs were converted to ACPI_DEBUG_PRINT messages for now. ACPICA BZ 827. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and has a +much larger code and data size. + + Previous Release: + Non-Debug Version: 86.6K Code, 18.2K Data, 104.8K Total + Debug Version: 162.7K Code, 50.8K Data, 213.5K Total + Current Release: + Non-Debug Version: 87.0K Code, 18.0K Data, 105.0K Total + Debug Version: 163.4K Code, 50.8K Data, 214.2K Total + +2) iASL Compiler/Disassembler and Tools: + +iASL: Fixed a regression introduced in 20091112 where intermediate .SRC files +were no longer automatically removed at the termination of the compile. + +acpiexec: Implemented the -f option to specify default region fill value. +This option specifies the value used to initialize buffers that simulate +operation regions. Default value is zero. Useful for debugging problems that +depend on a specific initial value for a region or field. + +---------------------------------------- +12 November 2009. Summary of changes for version 20091112: + +1) ACPI CA Core Subsystem: + +Implemented a post-order callback to AcpiWalkNamespace. The existing +interface only has a pre-order callback. This change adds an additional +parameter for a post-order callback which will be more useful for bus scans. +ACPICA BZ 779. Lin Ming. Updated the ACPICA Programmer Reference. + +Modified the behavior of the operation region memory mapping cache for +SystemMemory. Ensure that the memory mappings created for operation regions +do not cross 4K page boundaries. Crossing a page boundary while mapping +regions can cause kernel warnings on some hosts if the pages have different +attributes. Such regions are probably BIOS bugs, and this is the workaround. +Linux BZ 14445. Lin Ming. + +Implemented an automatic repair for predefined methods that must return +sorted lists. This change will repair (by sorting) packages returned by _ALR, +_PSS, and _TSS. Drivers can now assume that the packages are correctly sorted +and do not contain NULL package elements. Adds one new file, +namespace/nsrepair2.c. ACPICA BZ 784. Lin Ming, Bob Moore. + +Fixed a possible fault during predefined name validation if a return Package +object contains NULL elements. Also adds a warning if a NULL element is +followed by any non-null elements. ACPICA BZ 813, 814. Future enhancement may +include repair or removal of all such NULL elements where possible. + +Implemented additional module-level executable AML code support. This change +will execute module-level code that is not at the root of the namespace +(under a Device object, etc.) at table load time. Module-level executable AML +code has been illegal since ACPI 2.0. ACPICA BZ 762. Lin Ming. + +Implemented a new internal function to create Integer objects. This function +simplifies miscellaneous object creation code. ACPICA BZ 823. + +Reduced the severity of predefined repair messages, Warning to Info. Since +the object was successfully repaired, a warning is too severe. Reduced to an +info message for now. These messages may eventually be changed to debug-only. +ACPICA BZ 812. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and has a +much larger code and data size. + + Previous Release: + Non-Debug Version: 85.8K Code, 18.0K Data, 103.8K Total + Debug Version: 161.8K Code, 50.6K Data, 212.4K Total + Current Release: + Non-Debug Version: 86.6K Code, 18.2K Data, 104.8K Total + Debug Version: 162.7K Code, 50.8K Data, 213.5K Total + +2) iASL Compiler/Disassembler and Tools: + +iASL: Implemented Switch() with While(1) so that Break works correctly. This +change correctly implements the Switch operator with a surrounding While(1) +so that the Break operator works as expected. ACPICA BZ 461. Lin Ming. + +iASL: Added a message if a package initializer list is shorter than package +length. Adds a new remark for a Package() declaration if an initializer list +exists, but is shorter than the declared length of the package. Although +technically legal, this is probably a coding error and it is seen in the +field. ACPICA BZ 815. Lin Ming, Bob Moore. + +iASL: Fixed a problem where the compiler could fault after the maximum number +of errors was reached (200). + +acpixtract: Fixed a possible warning for pointer cast if the compiler warning +level set very high. + +---------------------------------------- +13 October 2009. Summary of changes for version 20091013: + +1) ACPI CA Core Subsystem: + +Fixed a problem where an Operation Region _REG method could be executed more +than once. If a custom address space handler is installed by the host before +the "initialize operation regions" phase of the ACPICA initialization, any +_REG methods for that address space could be executed twice. This change +fixes the problem. ACPICA BZ 427. Lin Ming. + +Fixed a possible memory leak for the Scope() ASL operator. When the exact +invocation of "Scope(\)" is executed (change scope to root), one internal +operand object was leaked. Lin Ming. + +Implemented a run-time repair for the _MAT predefined method. If the _MAT +return value is defined as a Field object in the AML, and the field +size is less than or equal to the default width of an integer (32 or 64),_MAT +can incorrectly return an Integer instead of a Buffer. ACPICA now +automatically repairs this problem. ACPICA BZ 810. + +Implemented a run-time repair for the _BIF and _BIX predefined methods. The +"OEM Information" field is often incorrectly returned as an Integer with +value zero if the field is not supported by the platform. This is due to an +ambiguity in the ACPI specification. The field should always be a string. +ACPICA now automatically repairs this problem by returning a NULL string +within the returned Package. ACPICA BZ 807. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and has a +much larger code and data size. + + Previous Release: + Non-Debug Version: 85.6K Code, 18.0K Data, 103.6K Total + Debug Version: 161.7K Code, 50.9K Data, 212.6K Total + Current Release: + Non-Debug Version: 85.8K Code, 18.0K Data, 103.8K Total + Debug Version: 161.8K Code, 50.6K Data, 212.4K Total + +2) iASL Compiler/Disassembler and Tools: + +Disassembler: Fixed a problem where references to external symbols that +contained one or more parent-prefixes (carats) were not handled correctly, +possibly causing a fault. ACPICA BZ 806. Lin Ming. + +Disassembler: Restructured the code so that all functions that handle +external symbols are in a single module. One new file is added, +common/dmextern.c. + +AML Debugger: Added a max count argument for the Batch command (which +executes multiple predefined methods within the namespace.) + +iASL: Updated the compiler documentation (User Reference.) Available at +http://www.acpica.org/documentation/. ACPICA BZ 750. + +AcpiXtract: Updated for Lint and other formatting changes. Close all open +files. + +---------------------------------------- +03 September 2009. Summary of changes for version 20090903: + +1) ACPI CA Core Subsystem: + +For Windows Vista compatibility, added the automatic execution of an _INI +method located at the namespace root (\_INI). This method is executed at +table load time. This support is in addition to the automatic execution of +\_SB._INI. Lin Ming. + +Fixed a possible memory leak in the interpreter for AML package objects if +the package initializer list is longer than the defined size of the package. +This apparently can only happen if the BIOS changes the package size on the +fly (seen in a _PSS object), as ASL compilers do not allow this. The +interpreter will truncate the package to the defined size (and issue an error +message), but previously could leave the extra objects undeleted if they were +pre-created during the argument processing (such is the case if the package +consists of a number of sub-packages as in the _PSS.) ACPICA BZ 805. + +Fixed a problem seen when a Buffer or String is stored to itself via ASL. +This has been reported in the field. Previously, ACPICA would zero out the +buffer/string. Now, the operation is treated as a noop. Provides Windows +compatibility. ACPICA BZ 803. Lin Ming. + +Removed an extraneous error message for ASL constructs of the form +Store(LocalX,LocalX) when LocalX is uninitialized. These curious statements +are seen in many BIOSs and are once again treated as NOOPs and no error is +emitted when they are encountered. ACPICA BZ 785. + +Fixed an extraneous warning message if a _DSM reserved method returns a +Package object. _DSM can return any type of object, so validation on the +return type cannot be performed. ACPICA BZ 802. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and has a +much larger code and data size. + + Previous Release: + Non-Debug Version: 85.5K Code, 18.0K Data, 103.5K Total + Debug Version: 161.6K Code, 50.9K Data, 212.5K Total + Current Release: + Non-Debug Version: 85.6K Code, 18.0K Data, 103.6K Total + Debug Version: 161.7K Code, 50.9K Data, 212.6K Total + +2) iASL Compiler/Disassembler and Tools: + +iASL: Fixed a problem with the use of the Alias operator and Resource +Templates. The correct alias is now constructed and no error is emitted. +ACPICA BZ 738. + +iASL: Implemented the -I option to specify additional search directories for +include files. Allows multiple additional search paths for include files. +Directories are searched in the order specified on the command line (after +the local directory is searched.) ACPICA BZ 800. + +iASL: Fixed a problem where the full pathname for include files was not +emitted for warnings/errors. This caused the IDE support to not work +properly. ACPICA BZ 765. + +iASL: Implemented the -@ option to specify a Windows-style response file +containing additional command line options. ACPICA BZ 801. + +AcpiExec: Added support to load multiple AML files simultaneously (such as a +DSDT and multiple SSDTs). Also added support for wildcards within the AML +pathname. These features allow all machine tables to be easily loaded and +debugged together. ACPICA BZ 804. + +Disassembler: Added missing support for disassembly of HEST table Error Bank +subtables. + +---------------------------------------- +30 July 2009. Summary of changes for version 20090730: + +The ACPI 4.0 implementation for ACPICA is complete with this release. + +1) ACPI CA Core Subsystem: + +ACPI 4.0: Added header file support for all new and changed ACPI tables. +Completely new tables are: IBFT, IVRS, MSCT, and WAET. Tables that are new +for ACPI 4.0, but have previously been supported in ACPICA are: CPEP, BERT, +EINJ, ERST, and HEST. Other newly supported tables are: UEFI and WDAT. There +have been some ACPI 4.0 changes to other existing tables. Split the large +actbl1.h header into the existing actbl2.h header. ACPICA BZ 774. + +ACPI 4.0: Implemented predefined name validation for all new names. There are +31 new names in ACPI 4.0. The predefined validation module was split into two +files. The new file is namespace/nsrepair.c. ACPICA BZ 770. + +Implemented support for so-called "module-level executable code". This is +executable AML code that exists outside of any control method and is intended +to be executed at table load time. Although illegal since ACPI 2.0, this type +of code still exists and is apparently still being created. Blocks of this +code are now detected and executed as intended. Currently, the code blocks +must exist under either an If, Else, or While construct; these are the +typical cases seen in the field. ACPICA BZ 762. Lin Ming. + +Implemented an automatic dynamic repair for predefined names that return +nested Package objects. This applies to predefined names that are defined to +return a variable-length Package of sub-packages. If the number of sub- +packages is one, BIOS code is occasionally seen that creates a simple single +package with no sub-packages. This code attempts to fix the problem by +wrapping a new package object around the existing package. These methods can +be repaired: _ALR, _CSD, _HPX, _MLS, _PRT, _PSS, _TRT, and _TSS. ACPICA BZ +790. + +Fixed a regression introduced in 20090625 for the AcpiGetDevices interface. +The _HID/_CID matching was broken and no longer matched IDs correctly. ACPICA +BZ 793. + +Fixed a problem with AcpiReset where the reset would silently fail if the +register was one of the protected I/O ports. AcpiReset now bypasses the port +validation mechanism. This may eventually be driven into the AcpiRead/Write +interfaces. + +Fixed a regression related to the recent update of the AcpiRead/Write +interfaces. A sleep/suspend could fail if the optional PM2 Control register +does not exist during an attempt to write the Bus Master Arbitration bit. +(However, some hosts already delete the code that writes this bit, and the +code may in fact be obsolete at this date.) ACPICA BZ 799. + +Fixed a problem where AcpiTerminate could fault if inadvertently called twice +in succession. ACPICA BZ 795. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and has a +much larger code and data size. + + Previous Release: + Non-Debug Version: 84.7K Code, 17.8K Data, 102.5K Total + Debug Version: 160.5K Code, 50.6K Data, 211.1K Total + Current Release: + Non-Debug Version: 85.5K Code, 18.0K Data, 103.5K Total + Debug Version: 161.6K Code, 50.9K Data, 212.5K Total + +2) iASL Compiler/Disassembler and Tools: + +ACPI 4.0: Implemented disassembler support for all new ACPI tables and +changes to existing tables. ACPICA BZ 775. + +---------------------------------------- +25 June 2009. Summary of changes for version 20090625: + +The ACPI 4.0 Specification was released on June 16 and is available at +www.acpi.info. ACPICA implementation of ACPI 4.0 is underway and will +continue for the next few releases. + +1) ACPI CA Core Subsystem: + +ACPI 4.0: Implemented interpreter support for the IPMI operation region +address space. Includes support for bi-directional data buffers and an IPMI +address space handler (to be installed by an IPMI device driver.) ACPICA BZ +773. Lin Ming. + +ACPI 4.0: Added changes for existing ACPI tables - FACS and SRAT. Includes +support in both the header files and the disassembler. + +Completed a major update for the AcpiGetObjectInfo external interface. +Changes include: + - Support for variable, unlimited length HID, UID, and CID strings. + - Support Processor objects the same as Devices (HID,UID,CID,ADR,STA, etc.) + - Call the _SxW power methods on behalf of a device object. + - Determine if a device is a PCI root bridge. + - Change the ACPI_BUFFER parameter to ACPI_DEVICE_INFO. +These changes will require an update to all callers of this interface. See +the updated ACPICA Programmer Reference for details. One new source file has +been added - utilities/utids.c. ACPICA BZ 368, 780. + +Updated the AcpiRead and AcpiWrite external interfaces to support 64-bit +transfers. The Value parameter has been extended from 32 bits to 64 bits in +order to support new ACPI 4.0 tables. These changes will require an update to +all callers of these interfaces. See the ACPICA Programmer Reference for +details. ACPICA BZ 768. + +Fixed several problems with AcpiAttachData. The handler was not invoked when +the host node was deleted. The data sub-object was not automatically deleted +when the host node was deleted. The interface to the handler had an unused +parameter, this was removed. ACPICA BZ 778. + +Enhanced the function that dumps ACPI table headers. All non-printable +characters in the string fields are now replaced with '?' (Signature, OemId, +OemTableId, and CompilerId.) ACPI tables with non-printable characters in +these fields are occasionally seen in the field. ACPICA BZ 788. + +Fixed a problem with predefined method repair code where the code that +attempts to repair/convert an object of incorrect type is only executed on +the first time the predefined method is called. The mechanism that disables +warnings on subsequent calls was interfering with the repair mechanism. +ACPICA BZ 781. + +Fixed a possible memory leak in the predefined validation/repair code when a +buffer is automatically converted to an expected string object. + +Removed obsolete 16-bit files from the distribution and from the current git +tree head. ACPICA BZ 776. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and has a +much larger code and data size. + + Previous Release: + Non-Debug Version: 83.4K Code, 17.5K Data, 100.9K Total + Debug Version: 158.9K Code, 50.0K Data, 208.9K Total + Current Release: + Non-Debug Version: 84.7K Code, 17.8K Data, 102.5K Total + Debug Version: 160.5K Code, 50.6K Data, 211.1K Total + +2) iASL Compiler/Disassembler and Tools: + +ACPI 4.0: iASL and Disassembler - implemented support for the new IPMI +operation region keyword. ACPICA BZ 771, 772. Lin Ming. + +ACPI 4.0: iASL - implemented compile-time validation support for all new +predefined names and control methods (31 total). ACPICA BZ 769. + +---------------------------------------- +21 May 2009. Summary of changes for version 20090521: 1) ACPI CA Core Subsystem: @@ -74,8 +534,6 @@ after an invalid sub-table ID. ---------------------------------------- 22 April 2009. Summary of changes for version 20090422: -This release is available at www.acpica.org/downloads - 1) ACPI CA Core Subsystem: Fixed a compatibility issue with the recently released I/O port protection @@ -623,9 +1081,6 @@ header. 29 July 2008. Summary of changes for version 20080729: -This release is available at http://acpica.org/downloads -Direct git access via http://www.acpica.org/repos/acpica.git - 1) ACPI CA Core Subsystem: Fix a possible deadlock in the GPE dispatch. Remove call to @@ -715,9 +1170,6 @@ completion message. Previously, no messa ---------------------------------------- 01 July 2008. Summary of changes for version 20080701: -This release is available at http://acpica.org/downloads -Direct git access via http://www.acpica.org/repos/acpica.git - 0) Git source tree / acpica.org Fixed a problem where a git-clone from http would not transfer the entire Modified: stable/8/sys/contrib/dev/acpica/common/adfile.c ============================================================================== --- stable/8/sys/contrib/dev/acpica/common/adfile.c Sat Feb 6 11:42:23 2010 (r203543) +++ stable/8/sys/contrib/dev/acpica/common/adfile.c Sat Feb 6 12:03:25 2010 (r203544) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License @@ -119,7 +119,6 @@ #include #include -#include #define _COMPONENT ACPI_TOOLS @@ -135,12 +134,13 @@ AdWriteBuffer ( char FilenameBuf[20]; + /****************************************************************************** * * FUNCTION: AfGenerateFilename * - * PARAMETERS: Prefix - prefix string - * TableId - The table ID + * PARAMETERS: Prefix - prefix string + * TableId - The table ID * * RETURN: Pointer to the completed string * @@ -180,9 +180,9 @@ AdGenerateFilename ( * * FUNCTION: AfWriteBuffer * - * PARAMETERS: Filename - name of file - * Buffer - data to write - * Length - length of data + * PARAMETERS: Filename - name of file + * Buffer - data to write + * Length - length of data * * RETURN: Actual number of bytes written * @@ -217,10 +217,10 @@ AdWriteBuffer ( * * FUNCTION: AfWriteTable * - * PARAMETERS: Table - pointer to the ACPI table - * Length - length of the table - * TableName - the table signature - * OemTableID - from the table header + * PARAMETERS: Table - pointer to the ACPI table + * Length - length of the table + * TableName - the table signature + * OemTableID - from the table header * * RETURN: None * @@ -272,7 +272,7 @@ FlGenerateFilename ( * Copy the original filename to a new buffer. Leave room for the worst case * where we append the suffix, an added dot and the null terminator. */ - NewFilename = ACPI_ALLOCATE_ZEROED ( + NewFilename = ACPI_ALLOCATE_ZEROED ((ACPI_SIZE) strlen (InputFilename) + strlen (Suffix) + 2); strcpy (NewFilename, InputFilename); @@ -314,7 +314,7 @@ FlStrdup ( char *NewString; - NewString = ACPI_ALLOCATE (strlen (String) + 1); + NewString = ACPI_ALLOCATE ((ACPI_SIZE) strlen (String) + 1); if (!NewString) { return (NULL); Modified: stable/8/sys/contrib/dev/acpica/common/adisasm.c ============================================================================== --- stable/8/sys/contrib/dev/acpica/common/adisasm.c Sat Feb 6 11:42:23 2010 (r203543) +++ stable/8/sys/contrib/dev/acpica/common/adisasm.c Sat Feb 6 12:03:25 2010 (r203544) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License @@ -132,14 +132,18 @@ #define _COMPONENT ACPI_TOOLS ACPI_MODULE_NAME ("adisasm") -extern int AslCompilerdebug; + +extern int AslCompilerdebug; +extern char *Gbl_ExternalFilename; + ACPI_STATUS LsDisplayNamespace ( void); void -LsSetupNsList (void * Handle); +LsSetupNsList ( + void *Handle); /* Local prototypes */ @@ -153,14 +157,6 @@ void AdDisassemblerHeader ( char *Filename); -void -AdAddExternalsToNamespace ( - void); - -UINT32 -AdMethodExternalCount ( - void); - ACPI_STATUS AdDeferredParse ( ACPI_PARSE_OBJECT *Op, @@ -171,8 +167,6 @@ ACPI_STATUS AdParseDeferredOps ( ACPI_PARSE_OBJECT *Root); -ACPI_PARSE_OBJECT *AcpiGbl_ParseOpRoot; - /* Stubs for ASL compiler */ @@ -192,7 +186,6 @@ AcpiDsMethodError ( { return (Status); } - #endif ACPI_STATUS @@ -238,18 +231,19 @@ AcpiDsMethodDataInitArgs ( } -ACPI_TABLE_DESC LocalTables[1]; +static ACPI_TABLE_DESC LocalTables[1]; +static ACPI_PARSE_OBJECT *AcpiGbl_ParseOpRoot; /******************************************************************************* * * FUNCTION: AdInitialize * - * PARAMETERS: None. + * PARAMETERS: None * * RETURN: Status * - * DESCRIPTION: CA initialization + * DESCRIPTION: ACPICA and local initialization * ******************************************************************************/ @@ -296,89 +290,15 @@ AdInitialize ( } -/******************************************************************************* - * - * FUNCTION: AdAddExternalsToNamespace - * - * PARAMETERS: - * - * RETURN: None - * - * DESCRIPTION: - * - ******************************************************************************/ - -void -AdAddExternalsToNamespace ( - void) -{ - ACPI_STATUS Status; - ACPI_NAMESPACE_NODE *Node; - ACPI_EXTERNAL_LIST *External = AcpiGbl_ExternalList; - ACPI_OPERAND_OBJECT *MethodDesc; - - - while (External) - { - Status = AcpiNsLookup (NULL, External->InternalPath, External->Type, - ACPI_IMODE_LOAD_PASS1, ACPI_NS_EXTERNAL | ACPI_NS_DONT_OPEN_SCOPE, - NULL, &Node); - - if (External->Type == ACPI_TYPE_METHOD) - { - MethodDesc = AcpiUtCreateInternalObject (ACPI_TYPE_METHOD); - MethodDesc->Method.ParamCount = (UINT8) External->Value; - Node->Object = MethodDesc; - } - - External = External->Next; - } -} - - -/******************************************************************************* - * - * FUNCTION: AdMethodExternalCount - * - * PARAMETERS: None - * - * RETURN: Status - * - * DESCRIPTION: Return the number of externals that have been generated - * - ******************************************************************************/ - -UINT32 -AdMethodExternalCount ( - void) -{ - ACPI_EXTERNAL_LIST *External = AcpiGbl_ExternalList; - UINT32 Count = 0; - - - while (External) - { - if (External->Type == ACPI_TYPE_METHOD) - { - Count++; - } - - External = External->Next; - } - - return (Count); -} - - /****************************************************************************** * * FUNCTION: AdAmlDisassemble * - * PARAMETERS: Filename - AML input filename - * OutToFile - TRUE if output should go to a file - * Prefix - Path prefix for output - * OutFilename - where the filename is returned - * GetAllTables - TRUE if all tables are desired + * PARAMETERS: Filename - AML input filename + * OutToFile - TRUE if output should go to a file + * Prefix - Path prefix for output + * OutFilename - where the filename is returned + * GetAllTables - TRUE if all tables are desired * * RETURN: Status * @@ -386,8 +306,6 @@ AdMethodExternalCount ( * *****************************************************************************/ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat Feb 6 12:17:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 72C28106566C; Sat, 6 Feb 2010 12:17:20 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6021F8FC19; Sat, 6 Feb 2010 12:17:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o16CHK8B021402; Sat, 6 Feb 2010 12:17:20 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o16CHKof021399; Sat, 6 Feb 2010 12:17:20 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201002061217.o16CHKof021399@svn.freebsd.org> From: Andriy Gapon Date: Sat, 6 Feb 2010 12:17:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203545 - in stable/8/sys: amd64/amd64 i386/i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Feb 2010 12:17:20 -0000 Author: avg Date: Sat Feb 6 12:17:20 2010 New Revision: 203545 URL: http://svn.freebsd.org/changeset/base/203545 Log: MFC r203160: add static qualifier to definition of a static function Modified: stable/8/sys/amd64/amd64/msi.c stable/8/sys/i386/i386/msi.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/amd64/amd64/msi.c ============================================================================== --- stable/8/sys/amd64/amd64/msi.c Sat Feb 6 12:03:25 2010 (r203544) +++ stable/8/sys/amd64/amd64/msi.c Sat Feb 6 12:17:20 2010 (r203545) @@ -288,7 +288,7 @@ msi_init(void) mtx_init(&msi_lock, "msi", NULL, MTX_DEF); } -void +static void msi_create_source(void) { struct msi_intsrc *msi; Modified: stable/8/sys/i386/i386/msi.c ============================================================================== --- stable/8/sys/i386/i386/msi.c Sat Feb 6 12:03:25 2010 (r203544) +++ stable/8/sys/i386/i386/msi.c Sat Feb 6 12:17:20 2010 (r203545) @@ -288,7 +288,7 @@ msi_init(void) mtx_init(&msi_lock, "msi", NULL, MTX_DEF); } -void +static void msi_create_source(void) { struct msi_intsrc *msi; From owner-svn-src-all@FreeBSD.ORG Sat Feb 6 12:48:06 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8C43C1065679; Sat, 6 Feb 2010 12:48:06 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 617438FC14; Sat, 6 Feb 2010 12:48:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o16Cm6nx028231; Sat, 6 Feb 2010 12:48:06 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o16Cm6kA028229; Sat, 6 Feb 2010 12:48:06 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201002061248.o16Cm6kA028229@svn.freebsd.org> From: Andriy Gapon Date: Sat, 6 Feb 2010 12:48:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203546 - head/sys/dev/acpica X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Feb 2010 12:48:06 -0000 Author: avg Date: Sat Feb 6 12:48:06 2010 New Revision: 203546 URL: http://svn.freebsd.org/changeset/base/203546 Log: acpi_cpu: prefer _OSC over _PDC, just in case _PDC was deprecated in favor of _OSC long time ago, but it seems that they still peacefully coexist and in some case only _PDC is present. Still _OSC provides a reacher interface and is capable to report back its status. If the status is non-zero, then report it, we may find it useful to understand what firmware expects from OS. Also clean up some comments that became less useful over time. Reviewed by: njl, jhb, rpaulo MFC after: 3 weeks Modified: head/sys/dev/acpica/acpi_cpu.c Modified: head/sys/dev/acpica/acpi_cpu.c ============================================================================== --- head/sys/dev/acpica/acpi_cpu.c Sat Feb 6 12:17:20 2010 (r203545) +++ head/sys/dev/acpica/acpi_cpu.c Sat Feb 6 12:48:06 2010 (r203546) @@ -345,28 +345,11 @@ acpi_cpu_attach(device_t dev) } /* - * CPU capabilities are specified as a buffer of 32-bit integers: - * revision, count, and one or more capabilities. The revision of - * "1" is not specified anywhere but seems to match Linux. + * CPU capabilities are specified in + * Intel Processor Vendor-Specific ACPI Interface Specification. */ if (sc->cpu_features) { arglist.Pointer = arg; - arglist.Count = 1; - arg[0].Type = ACPI_TYPE_BUFFER; - arg[0].Buffer.Length = sizeof(cap_set); - arg[0].Buffer.Pointer = (uint8_t *)cap_set; - cap_set[0] = 1; /* revision */ - cap_set[1] = 1; /* number of capabilities integers */ - cap_set[2] = sc->cpu_features; - AcpiEvaluateObject(sc->cpu_handle, "_PDC", &arglist, NULL); - - /* - * On some systems we need to evaluate _OSC so that the ASL - * loads the _PSS and/or _PDC methods at runtime. - * - * TODO: evaluate failure of _OSC. - */ - arglist.Pointer = arg; arglist.Count = 4; arg[0].Type = ACPI_TYPE_BUFFER; arg[0].Buffer.Length = sizeof(cpu_oscuuid); @@ -380,7 +363,22 @@ acpi_cpu_attach(device_t dev) arg[3].Buffer.Pointer = (uint8_t *)cap_set; cap_set[0] = 0; /* status */ cap_set[1] = sc->cpu_features; - AcpiEvaluateObject(sc->cpu_handle, "_OSC", &arglist, NULL); + status = AcpiEvaluateObject(sc->cpu_handle, "_OSC", &arglist, NULL); + if (ACPI_SUCCESS(status)) { + if (cap_set[0] != 0) + device_printf(dev, "_OSC returned status %#x\n", cap_set[0]); + } + else { + arglist.Pointer = arg; + arglist.Count = 1; + arg[0].Type = ACPI_TYPE_BUFFER; + arg[0].Buffer.Length = sizeof(cap_set); + arg[0].Buffer.Pointer = (uint8_t *)cap_set; + cap_set[0] = 1; /* revision */ + cap_set[1] = 1; /* number of capabilities integers */ + cap_set[2] = sc->cpu_features; + AcpiEvaluateObject(sc->cpu_handle, "_PDC", &arglist, NULL); + } } /* Probe for Cx state support. */ From owner-svn-src-all@FreeBSD.ORG Sat Feb 6 13:39:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7498910656A3; Sat, 6 Feb 2010 13:39:08 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 641B18FC17; Sat, 6 Feb 2010 13:39:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o16Dd8Q0039451; Sat, 6 Feb 2010 13:39:08 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o16Dd82m039449; Sat, 6 Feb 2010 13:39:08 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201002061339.o16Dd82m039449@svn.freebsd.org> From: Gavin Atkinson Date: Sat, 6 Feb 2010 13:39:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203547 - head/sbin/sysctl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Feb 2010 13:39:08 -0000 Author: gavin Date: Sat Feb 6 13:39:08 2010 New Revision: 203547 URL: http://svn.freebsd.org/changeset/base/203547 Log: Add the -i option to the synopsis. Submitted by: dhw MFC after: 1 week (with r203310) Modified: head/sbin/sysctl/sysctl.8 Modified: head/sbin/sysctl/sysctl.8 ============================================================================== --- head/sbin/sysctl/sysctl.8 Sat Feb 6 12:48:06 2010 (r203546) +++ head/sbin/sysctl/sysctl.8 Sat Feb 6 13:39:08 2010 (r203547) @@ -28,7 +28,7 @@ .\" From: @(#)sysctl.8 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd January 31, 2010 +.Dd February 6, 2010 .Dt SYSCTL 8 .Os .Sh NAME @@ -36,7 +36,7 @@ .Nd get or set kernel state .Sh SYNOPSIS .Nm -.Op Fl bdehNnoqx +.Op Fl bdehiNnoqx .Ar name Ns Op = Ns Ar value .Ar ... .Nm From owner-svn-src-all@FreeBSD.ORG Sat Feb 6 13:49:35 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 752A81065676; Sat, 6 Feb 2010 13:49:35 +0000 (UTC) (envelope-from eri@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 649B68FC13; Sat, 6 Feb 2010 13:49:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o16DnZ5a041763; Sat, 6 Feb 2010 13:49:35 GMT (envelope-from eri@svn.freebsd.org) Received: (from eri@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o16DnZna041741; Sat, 6 Feb 2010 13:49:35 GMT (envelope-from eri@svn.freebsd.org) Message-Id: <201002061349.o16DnZna041741@svn.freebsd.org> From: Ermal Luçi Date: Sat, 6 Feb 2010 13:49:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203548 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Feb 2010 13:49:35 -0000 Author: eri Date: Sat Feb 6 13:49:35 2010 New Revision: 203548 URL: http://svn.freebsd.org/changeset/base/203548 Log: Propagate the vlan eventis to the underlying interfaces/members so they can do initialization of hw related features. PR: kern/141646 Reviewed by: thompsa Approved by: thompsa(co-mentor) MFC after: 2 weeks Modified: head/sys/net/if_lagg.c head/sys/net/if_lagg.h Modified: head/sys/net/if_lagg.c ============================================================================== --- head/sys/net/if_lagg.c Sat Feb 6 13:39:08 2010 (r203547) +++ head/sys/net/if_lagg.c Sat Feb 6 13:49:35 2010 (r203548) @@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -198,6 +199,50 @@ static moduledata_t lagg_mod = { DECLARE_MODULE(if_lagg, lagg_mod, SI_SUB_PSEUDO, SI_ORDER_ANY); +#if __FreeBSD_version >= 800000 +/* + * This routine is run via an vlan + * config EVENT + */ +static void +lagg_register_vlan(void *arg, struct ifnet *ifp, u_int16_t vtag) +{ + struct lagg_softc *sc = ifp->if_softc; + struct lagg_port *lp; + + if (ifp->if_softc != arg) /* Not our event */ + return; + + LAGG_RLOCK(sc); + if (!SLIST_EMPTY(&sc->sc_ports)) { + SLIST_FOREACH(lp, &sc->sc_ports, lp_entries) + EVENTHANDLER_INVOKE(vlan_config, lp->lp_ifp, vtag); + } + LAGG_RUNLOCK(sc); +} + +/* + * This routine is run via an vlan + * unconfig EVENT + */ +static void +lagg_unregister_vlan(void *arg, struct ifnet *ifp, u_int16_t vtag) +{ + struct lagg_softc *sc = ifp->if_softc; + struct lagg_port *lp; + + if (ifp->if_softc != arg) /* Not our event */ + return; + + LAGG_RLOCK(sc); + if (!SLIST_EMPTY(&sc->sc_ports)) { + SLIST_FOREACH(lp, &sc->sc_ports, lp_entries) + EVENTHANDLER_INVOKE(vlan_unconfig, lp->lp_ifp, vtag); + } + LAGG_RUNLOCK(sc); +} +#endif + static int lagg_clone_create(struct if_clone *ifc, int unit, caddr_t params) { @@ -253,6 +298,13 @@ lagg_clone_create(struct if_clone *ifc, */ ether_ifattach(ifp, eaddr); +#if __FreeBSD_version >= 800000 + sc->vlan_attach = EVENTHANDLER_REGISTER(vlan_config, + lagg_register_vlan, sc, EVENTHANDLER_PRI_FIRST); + sc->vlan_detach = EVENTHANDLER_REGISTER(vlan_unconfig, + lagg_unregister_vlan, sc, EVENTHANDLER_PRI_FIRST); +#endif + /* Insert into the global list of laggs */ mtx_lock(&lagg_list_mtx); SLIST_INSERT_HEAD(&lagg_list, sc, sc_entries); @@ -272,6 +324,11 @@ lagg_clone_destroy(struct ifnet *ifp) lagg_stop(sc); ifp->if_flags &= ~IFF_UP; +#if __FreeBSD_version >= 800000 + EVENTHANDLER_DEREGISTER(vlan_config, sc->vlan_attach); + EVENTHANDLER_DEREGISTER(vlan_unconfig, sc->vlan_detach); +#endif + /* Shutdown and remove lagg ports */ while ((lp = SLIST_FIRST(&sc->sc_ports)) != NULL) lagg_port_destroy(lp, 1); Modified: head/sys/net/if_lagg.h ============================================================================== --- head/sys/net/if_lagg.h Sat Feb 6 13:39:08 2010 (r203547) +++ head/sys/net/if_lagg.h Sat Feb 6 13:49:35 2010 (r203548) @@ -198,6 +198,10 @@ struct lagg_softc { void (*sc_lladdr)(struct lagg_softc *); void (*sc_req)(struct lagg_softc *, caddr_t); void (*sc_portreq)(struct lagg_port *, caddr_t); +#if __FreeBSD_version >= 800000 + eventhandler_tag vlan_attach; + eventhandler_tag vlan_detach; +#endif }; struct lagg_port { From owner-svn-src-all@FreeBSD.ORG Sat Feb 6 14:10:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1B6F9106566B; Sat, 6 Feb 2010 14:10:46 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0B1E48FC16; Sat, 6 Feb 2010 14:10:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o16EAj53046404; Sat, 6 Feb 2010 14:10:45 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o16EAj2L046402; Sat, 6 Feb 2010 14:10:45 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201002061410.o16EAj2L046402@svn.freebsd.org> From: Edward Tomasz Napierala Date: Sat, 6 Feb 2010 14:10:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203549 - head/share/man/man9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Feb 2010 14:10:46 -0000 Author: trasz Date: Sat Feb 6 14:10:45 2010 New Revision: 203549 URL: http://svn.freebsd.org/changeset/base/203549 Log: Add missing coma. Modified: head/share/man/man9/mtx_pool.9 Modified: head/share/man/man9/mtx_pool.9 ============================================================================== --- head/share/man/man9/mtx_pool.9 Sat Feb 6 13:49:35 2010 (r203548) +++ head/share/man/man9/mtx_pool.9 Sat Feb 6 14:10:45 2010 (r203549) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 25, 2002 +.Dd February 6, 2010 .Dt MTX_POOL 9 .Os .Sh NAME @@ -177,7 +177,7 @@ on each mutex in the specified pool, deallocates the memory associated with the pool, and assigns NULL to the pool pointer. .Sh SEE ALSO -.Xr locking 9 +.Xr locking 9 , .Xr mutex 9 .Sh HISTORY These routines first appeared in From owner-svn-src-all@FreeBSD.ORG Sat Feb 6 15:32:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 104491065672; Sat, 6 Feb 2010 15:32:43 +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 007B78FC1D; Sat, 6 Feb 2010 15:32:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o16FWgnd064438; Sat, 6 Feb 2010 15:32:42 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o16FWguS064436; Sat, 6 Feb 2010 15:32:42 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <201002061532.o16FWguS064436@svn.freebsd.org> From: Hajimu UMEMOTO Date: Sat, 6 Feb 2010 15:32:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203550 - in stable/8/etc: . rc.d X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Feb 2010 15:32:43 -0000 Author: ume Date: Sat Feb 6 15:32:42 2010 New Revision: 203550 URL: http://svn.freebsd.org/changeset/base/203550 Log: MFC r203200; Allow use of -6 option to "server" and "peer" in ntp.conf. Modified: stable/8/etc/rc.d/ntpdate Directory Properties: stable/8/etc/ (props changed) stable/8/etc/services (props changed) Modified: stable/8/etc/rc.d/ntpdate ============================================================================== --- stable/8/etc/rc.d/ntpdate Sat Feb 6 14:10:45 2010 (r203549) +++ stable/8/etc/rc.d/ntpdate Sat Feb 6 15:32:42 2010 (r203550) @@ -19,7 +19,9 @@ ntpdate_start() if [ -z "$ntpdate_hosts" -a -f ${ntpdate_config} ]; then ntpdate_hosts=`awk ' /^server[ \t]*127.127/ {next} - /^(server|peer)/ {print $2} + /^(server|peer)/ { + if ($2 ~/^-/) {print $3} + else {print $2}} ' < ${ntpdate_config}` fi if [ -n "$ntpdate_hosts" -o -n "$rc_flags" ]; then From owner-svn-src-all@FreeBSD.ORG Sat Feb 6 16:01:39 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3A830106566C; Sat, 6 Feb 2010 16:01:39 +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 2AF7F8FC08; Sat, 6 Feb 2010 16:01:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o16G1dWS070863; Sat, 6 Feb 2010 16:01:39 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o16G1dYx070861; Sat, 6 Feb 2010 16:01:39 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201002061601.o16G1dYx070861@svn.freebsd.org> From: Jaakko Heinonen Date: Sat, 6 Feb 2010 16:01:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203551 - head/usr.bin/kdump X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Feb 2010 16:01:39 -0000 Author: jh Date: Sat Feb 6 16:01:38 2010 New Revision: 203551 URL: http://svn.freebsd.org/changeset/base/203551 Log: - Cast intptr_t, pid_t and time_t values to intmax_t and use %jd with printf. - Cast the system call return value to long and use %ld in a printf in ktrsysret(). PR: bin/123774 MFC after: 2 weeks Modified: head/usr.bin/kdump/kdump.c Modified: head/usr.bin/kdump/kdump.c ============================================================================== --- head/usr.bin/kdump/kdump.c Sat Feb 6 15:32:42 2010 (r203550) +++ head/usr.bin/kdump/kdump.c Sat Feb 6 16:01:38 2010 (r203551) @@ -182,14 +182,16 @@ main(int argc, char *argv[]) if (ktr_header.ktr_type & KTR_DROP) { ktr_header.ktr_type &= ~KTR_DROP; if (!drop_logged && threads) { - (void)printf("%6d %6d %-8.*s Events dropped.\n", - ktr_header.ktr_pid, ktr_header.ktr_tid > - 0 ? ktr_header.ktr_tid : 0, MAXCOMLEN, - ktr_header.ktr_comm); + (void)printf( + "%6jd %6jd %-8.*s Events dropped.\n", + (intmax_t)ktr_header.ktr_pid, + ktr_header.ktr_tid > 0 ? + (intmax_t)ktr_header.ktr_tid : 0, + MAXCOMLEN, ktr_header.ktr_comm); drop_logged = 1; } else if (!drop_logged) { - (void)printf("%6d %-8.*s Events dropped.\n", - ktr_header.ktr_pid, MAXCOMLEN, + (void)printf("%6jd %-8.*s Events dropped.\n", + (intmax_t)ktr_header.ktr_pid, MAXCOMLEN, ktr_header.ktr_comm); drop_logged = 1; } @@ -309,10 +311,11 @@ dumpheader(struct ktr_header *kth) * negative tid's as 0. */ if (threads) - (void)printf("%6d %6d %-8.*s ", kth->ktr_pid, kth->ktr_tid > - 0 ? kth->ktr_tid : 0, MAXCOMLEN, kth->ktr_comm); + (void)printf("%6jd %6jd %-8.*s ", (intmax_t)kth->ktr_pid, + kth->ktr_tid > 0 ? (intmax_t)kth->ktr_tid : 0, + MAXCOMLEN, kth->ktr_comm); else - (void)printf("%6d %-8.*s ", kth->ktr_pid, MAXCOMLEN, + (void)printf("%6jd %-8.*s ", (intmax_t)kth->ktr_pid, MAXCOMLEN, kth->ktr_comm); if (timestamp) { if (timestamp == 3) { @@ -325,8 +328,8 @@ dumpheader(struct ktr_header *kth) timevalsub(&kth->ktr_time, &prevtime); prevtime = temp; } - (void)printf("%ld.%06ld ", - kth->ktr_time.tv_sec, kth->ktr_time.tv_usec); + (void)printf("%jd.%06ld ", (intmax_t)kth->ktr_time.tv_sec, + kth->ktr_time.tv_usec); } (void)printf("%s ", type); } @@ -821,7 +824,7 @@ ktrsysret(struct ktr_sysret *ktr) if (error == 0) { if (fancy) { - (void)printf("%d", ret); + (void)printf("%ld", (long)ret); if (ret < 0 || ret > 9) (void)printf("/%#lx", (long)ret); } else { @@ -1267,7 +1270,7 @@ ktrstat(struct stat *statp) printf("rdev=%ju, ", (uintmax_t)statp->st_rdev); printf("atime="); if (resolv == 0) - printf("%ld", statp->st_atimespec.tv_sec); + printf("%jd", (intmax_t)statp->st_atimespec.tv_sec); else { tm = localtime(&statp->st_atimespec.tv_sec); (void)strftime(timestr, sizeof(timestr), TIME_FORMAT, tm); @@ -1279,7 +1282,7 @@ ktrstat(struct stat *statp) printf(", "); printf("stime="); if (resolv == 0) - printf("%ld", statp->st_mtimespec.tv_sec); + printf("%jd", (intmax_t)statp->st_mtimespec.tv_sec); else { tm = localtime(&statp->st_mtimespec.tv_sec); (void)strftime(timestr, sizeof(timestr), TIME_FORMAT, tm); @@ -1291,7 +1294,7 @@ ktrstat(struct stat *statp) printf(", "); printf("ctime="); if (resolv == 0) - printf("%ld", statp->st_ctimespec.tv_sec); + printf("%jd", (intmax_t)statp->st_ctimespec.tv_sec); else { tm = localtime(&statp->st_ctimespec.tv_sec); (void)strftime(timestr, sizeof(timestr), TIME_FORMAT, tm); @@ -1303,7 +1306,7 @@ ktrstat(struct stat *statp) printf(", "); printf("birthtime="); if (resolv == 0) - printf("%ld", statp->st_birthtimespec.tv_sec); + printf("%jd", (intmax_t)statp->st_birthtimespec.tv_sec); else { tm = localtime(&statp->st_birthtimespec.tv_sec); (void)strftime(timestr, sizeof(timestr), TIME_FORMAT, tm); From owner-svn-src-all@FreeBSD.ORG Sat Feb 6 16:53:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF399106566C; Sat, 6 Feb 2010 16:53:33 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A02B08FC13; Sat, 6 Feb 2010 16:53:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o16GrXrw082328; Sat, 6 Feb 2010 16:53:33 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o16GrXn6082327; Sat, 6 Feb 2010 16:53:33 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201002061653.o16GrXn6082327@svn.freebsd.org> From: Rui Paulo Date: Sat, 6 Feb 2010 16:53:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203552 - svnadmin/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Feb 2010 16:53:33 -0000 Author: rpaulo Date: Sat Feb 6 16:53:32 2010 New Revision: 203552 URL: http://svn.freebsd.org/changeset/base/203552 Log: Please welcome Bernhard Schmidt (bschmidt@) who will be working on wireless, most notably iwn(4). I'm his mentor and Andrew Thompson is his co-mentor. Approved by: core Modified: svnadmin/conf/access Modified: svnadmin/conf/access ============================================================================== --- svnadmin/conf/access Sat Feb 6 16:01:38 2010 (r203551) +++ svnadmin/conf/access Sat Feb 6 16:53:32 2010 (r203552) @@ -37,6 +37,7 @@ brooks brucec brueffer bruno +bschmidt bushman bz cbzimmer From owner-svn-src-all@FreeBSD.ORG Sat Feb 6 17:02:34 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C9FC106568B; Sat, 6 Feb 2010 17:02:34 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 443E38FC16; Sat, 6 Feb 2010 17:02:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o16H2YDV084359; Sat, 6 Feb 2010 17:02:34 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o16H2YuU084357; Sat, 6 Feb 2010 17:02:34 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201002061702.o16H2YuU084357@svn.freebsd.org> From: Rui Paulo Date: Sat, 6 Feb 2010 17:02:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203553 - svnadmin/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Feb 2010 17:02:34 -0000 Author: rpaulo Date: Sat Feb 6 17:02:33 2010 New Revision: 203553 URL: http://svn.freebsd.org/changeset/base/203553 Log: Add bschmidt. Modified: svnadmin/conf/mentors Modified: svnadmin/conf/mentors ============================================================================== --- svnadmin/conf/mentors Sat Feb 6 16:53:32 2010 (r203552) +++ svnadmin/conf/mentors Sat Feb 6 17:02:33 2010 (r203553) @@ -11,6 +11,7 @@ # Mentee Mentor Optional comment brucec rrs +bschmidt rpaulo Co-mentor: thompsa cbzimmer sam dchagin kib eri mlaier Co-mentor: thompsa From owner-svn-src-all@FreeBSD.ORG Sat Feb 6 17:33:40 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 392CC106566C; Sat, 6 Feb 2010 17:33:40 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 277228FC0C; Sat, 6 Feb 2010 17:33:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o16HXeeT091246; Sat, 6 Feb 2010 17:33:40 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o16HXeo7091243; Sat, 6 Feb 2010 17:33:40 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201002061733.o16HXeo7091243@svn.freebsd.org> From: Marius Strobl Date: Sat, 6 Feb 2010 17:33:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203554 - stable/8/sys/sparc64/sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Feb 2010 17:33:40 -0000 Author: marius Date: Sat Feb 6 17:33:39 2010 New Revision: 203554 URL: http://svn.freebsd.org/changeset/base/203554 Log: MFC: r203185 Implement handling of the third argument of cpu_switch(). PR: 143215 Modified: stable/8/sys/sparc64/sparc64/genassym.c stable/8/sys/sparc64/sparc64/swtch.S Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/sparc64/sparc64/genassym.c ============================================================================== --- stable/8/sys/sparc64/sparc64/genassym.c Sat Feb 6 17:02:33 2010 (r203553) +++ stable/8/sys/sparc64/sparc64/genassym.c Sat Feb 6 17:33:39 2010 (r203554) @@ -239,6 +239,7 @@ ASSYM(P_VMSPACE, offsetof(struct proc, p ASSYM(TD_FLAGS, offsetof(struct thread, td_flags)); ASSYM(TD_FRAME, offsetof(struct thread, td_frame)); ASSYM(TD_KSTACK, offsetof(struct thread, td_kstack)); +ASSYM(TD_LOCK, offsetof(struct thread, td_lock)); ASSYM(TD_PCB, offsetof(struct thread, td_pcb)); ASSYM(TD_PROC, offsetof(struct thread, td_proc)); ASSYM(TD_MD, offsetof(struct thread, td_md)); Modified: stable/8/sys/sparc64/sparc64/swtch.S ============================================================================== --- stable/8/sys/sparc64/sparc64/swtch.S Sat Feb 6 17:02:33 2010 (r203553) +++ stable/8/sys/sparc64/sparc64/swtch.S Sat Feb 6 17:33:39 2010 (r203554) @@ -46,15 +46,14 @@ ENTRY(cpu_throw) save %sp, -CCFSZ, %sp flushw ba %xcc, .Lsw1 - mov %i1, %i0 + mov %g0, %i2 END(cpu_throw) /* - * void cpu_switch(struct thread *old, struct thread *new) + * void cpu_switch(struct thread *old, struct thread *new, struct mtx *mtx) */ ENTRY(cpu_switch) save %sp, -CCFSZ, %sp - mov %i1, %i0 /* * If the current thread was using floating point in the kernel, save @@ -63,7 +62,7 @@ ENTRY(cpu_switch) */ rd %fprs, %l2 andcc %l2, FPRS_FEF, %g0 - bz,a,pt %xcc, 1f + bz,a,pt %xcc, 1f nop call savefpctx add PCB_REG, PCB_KFP, %o0 @@ -104,24 +103,24 @@ ENTRY(cpu_switch) .Lsw1: #if KTR_COMPILE & KTR_PROC CATR(KTR_PROC, "cpu_switch: new td=%p pc=%#lx fp=%#lx" - , %g1, %g2, %g3, 7, 8, 9) - stx %i0, [%g1 + KTR_PARM1] - ldx [%i0 + TD_PCB], %g2 + , %g1, %g2, %g3, 8, 9, 10) + stx %i1, [%g1 + KTR_PARM1] + ldx [%i1 + TD_PCB], %g2 ldx [%g2 + PCB_PC], %g3 stx %g3, [%g1 + KTR_PARM2] ldx [%g2 + PCB_SP], %g3 stx %g3, [%g1 + KTR_PARM3] -9: +10: #endif - ldx [%i0 + TD_PCB], %i1 + ldx [%i1 + TD_PCB], %l0 - stx %i0, [PCPU(CURTHREAD)] - stx %i1, [PCPU(CURPCB)] + stx %i1, [PCPU(CURTHREAD)] + stx %l0, [PCPU(CURPCB)] wrpr %g0, PSTATE_NORMAL, %pstate - mov %i1, PCB_REG + mov %l0, PCB_REG wrpr %g0, PSTATE_ALT, %pstate - mov %i1, PCB_REG + mov %l0, PCB_REG wrpr %g0, PSTATE_KERNEL, %pstate ldx [PCB_REG + PCB_SP], %fp @@ -132,24 +131,24 @@ ENTRY(cpu_switch) * Point to the pmaps of the new process, and of the last non-kernel * process to run. */ - ldx [%i0 + TD_PROC], %i2 + ldx [%i1 + TD_PROC], %l1 ldx [PCPU(PMAP)], %l2 - ldx [%i2 + P_VMSPACE], %i5 - add %i5, VM_PMAP, %i2 + ldx [%l1 + P_VMSPACE], %i5 + add %i5, VM_PMAP, %l1 #if KTR_COMPILE & KTR_PROC CATR(KTR_PROC, "cpu_switch: new pmap=%p old pmap=%p" - , %g1, %g2, %g3, 7, 8, 9) - stx %i2, [%g1 + KTR_PARM1] + , %g1, %g2, %g3, 8, 9, 10) + stx %l1, [%g1 + KTR_PARM1] stx %l2, [%g1 + KTR_PARM2] -9: +10: #endif /* * If they are the same we are done. */ - cmp %l2, %i2 - be,a,pn %xcc, 5f + cmp %l2, %l1 + be,a,pn %xcc, 7f nop /* @@ -158,21 +157,20 @@ ENTRY(cpu_switch) */ SET(vmspace0, %i4, %i3) cmp %i5, %i3 - be,a,pn %xcc, 5f + be,a,pn %xcc, 7f nop /* * If there was no non-kernel pmap, don't try to deactivate it. */ - brz,a,pn %l2, 3f - nop + brz,pn %l2, 3f + lduw [PCPU(CPUMASK)], %l4 /* * Mark the pmap of the last non-kernel vmspace to run as no longer * active on this CPU. */ lduw [%l2 + PM_ACTIVE], %l3 - lduw [PCPU(CPUMASK)], %l4 andn %l3, %l4, %l3 stw %l3, [%l2 + PM_ACTIVE] @@ -185,25 +183,28 @@ ENTRY(cpu_switch) mov -1, %l5 stw %l5, [%l3 + %l4] +3: cmp %i2, %g0 + be,pn %xcc, 4f + lduw [PCPU(TLB_CTX_MAX)], %i4 + stx %i2, [%i0 + TD_LOCK] + /* * Find a new TLB context. If we've run out we have to flush all * user mappings from the TLB and reset the context numbers. */ -3: lduw [PCPU(TLB_CTX)], %i3 - lduw [PCPU(TLB_CTX_MAX)], %i4 +4: lduw [PCPU(TLB_CTX)], %i3 cmp %i3, %i4 - bne,a,pt %xcc, 4f + bne,a,pt %xcc, 5f nop SET(tlb_flush_user, %i5, %i4) ldx [%i4], %i5 call %i5 - nop - lduw [PCPU(TLB_CTX_MIN)], %i3 + lduw [PCPU(TLB_CTX_MIN)], %i3 /* * Advance next free context. */ -4: add %i3, 1, %i4 +5: add %i3, 1, %i4 stw %i4, [PCPU(TLB_CTX)] /* @@ -211,36 +212,36 @@ ENTRY(cpu_switch) */ lduw [PCPU(CPUID)], %i4 sllx %i4, INT_SHIFT, %i4 - add %i2, PM_CONTEXT, %i5 + add %l1, PM_CONTEXT, %i5 stw %i3, [%i4 + %i5] /* * Mark the pmap as active on this CPU. */ - lduw [%i2 + PM_ACTIVE], %i4 + lduw [%l1 + PM_ACTIVE], %i4 lduw [PCPU(CPUMASK)], %i5 or %i4, %i5, %i4 - stw %i4, [%i2 + PM_ACTIVE] + stw %i4, [%l1 + PM_ACTIVE] /* * Make note of the change in pmap. */ - stx %i2, [PCPU(PMAP)] + stx %l1, [PCPU(PMAP)] /* * Fiddle the hardware bits. Set the TSB registers and install the * new context number in the CPU. */ - ldx [%i2 + PM_TSB], %i4 + ldx [%l1 + PM_TSB], %i4 mov AA_DMMU_TSB, %i5 stxa %i4, [%i5] ASI_DMMU mov AA_IMMU_TSB, %i5 stxa %i4, [%i5] ASI_IMMU setx TLB_PCXR_PGSZ_MASK, %i5, %i4 mov AA_DMMU_PCXR, %i5 - ldxa [%i5] ASI_DMMU, %i2 - and %i2, %i4, %i2 - or %i3, %i2, %i3 + ldxa [%i5] ASI_DMMU, %l1 + and %l1, %i4, %l1 + or %i3, %l1, %i3 sethi %hi(KERNBASE), %i4 stxa %i3, [%i5] ASI_DMMU flush %i4 @@ -248,7 +249,15 @@ ENTRY(cpu_switch) /* * Done, return and load the new process's window from the stack. */ -5: ret + +6: ret + restore + +7: cmp %i2, %g0 + be,a,pn %xcc, 6b + nop + stx %i2, [%i0 + TD_LOCK] + ret restore END(cpu_switch) From owner-svn-src-all@FreeBSD.ORG Sat Feb 6 18:10:58 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 68C7B1065672; Sat, 6 Feb 2010 18:10:58 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5822F8FC13; Sat, 6 Feb 2010 18:10:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o16IAwSO099409; Sat, 6 Feb 2010 18:10:58 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o16IAwZI099407; Sat, 6 Feb 2010 18:10:58 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201002061810.o16IAwZI099407@svn.freebsd.org> From: Bernhard Schmidt Date: Sat, 6 Feb 2010 18:10:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203555 - head/share/misc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Feb 2010 18:10:58 -0000 Author: bschmidt Date: Sat Feb 6 18:10:58 2010 New Revision: 203555 URL: http://svn.freebsd.org/changeset/base/203555 Log: Add myself. Approved by: rpaulo (mentor) Modified: head/share/misc/committers-src.dot Modified: head/share/misc/committers-src.dot ============================================================================== --- head/share/misc/committers-src.dot Sat Feb 6 17:33:39 2010 (r203554) +++ head/share/misc/committers-src.dot Sat Feb 6 18:10:58 2010 (r203555) @@ -70,6 +70,7 @@ brooks [label="Brooks Davis\nbrooks@Free brucec [label="Bruce Cran\nbrucec@FreeBSD.org\n2010/01/29"] brueffer [label="Christian Brueffer\nbrueffer@FreeBSD.org\n2006/02/28"] bruno [label="Bruno Ducrot\nbruno@FreeBSD.org\n2005/07/18"] +bschmidt [label="Bernhard Schmidt\nbschmidt@FreeBSD.org\n2010/02/06"] bz [label="Bjoern A. Zeeb\nbz@FreeBSD.org\n2004/07/27"] ceri [label="Ceri Davies\nceri@FreeBSD.org\n2006/11/07"] cokane [label="Coleman Kane\ncokane@FreeBSD.org\n2000/06/19"] @@ -410,6 +411,7 @@ pjd -> lulf rgrimes -> markm rpaulo -> avg +rpaulo -> bschmidt rrs -> brucec rrs -> tuexen From owner-svn-src-all@FreeBSD.ORG Sat Feb 6 19:24:17 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3400A1065676; Sat, 6 Feb 2010 19:24:17 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 220D18FC17; Sat, 6 Feb 2010 19:24:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o16JOHpN015856; Sat, 6 Feb 2010 19:24:17 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o16JOHE9015854; Sat, 6 Feb 2010 19:24:17 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201002061924.o16JOHE9015854@svn.freebsd.org> From: Rui Paulo Date: Sat, 6 Feb 2010 19:24:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203556 - head/sys/net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Feb 2010 19:24:17 -0000 Author: rpaulo Date: Sat Feb 6 19:24:16 2010 New Revision: 203556 URL: http://svn.freebsd.org/changeset/base/203556 Log: Revert unwanted changes in revision 203422. Spotted by: sam Modified: head/sys/net80211/ieee80211_ioctl.h Modified: head/sys/net80211/ieee80211_ioctl.h ============================================================================== --- head/sys/net80211/ieee80211_ioctl.h Sat Feb 6 18:10:58 2010 (r203555) +++ head/sys/net80211/ieee80211_ioctl.h Sat Feb 6 19:24:16 2010 (r203556) @@ -334,12 +334,12 @@ enum { }; struct ieee80211req_mesh_route { - uint8_t imr_dest[IEEE80211_ADDR_LEN]; - uint8_t imr_nexthop[IEEE80211_ADDR_LEN]; - uint16_t imr_nhops; uint8_t imr_flags; #define IEEE80211_MESHRT_FLAGS_VALID 0x01 #define IEEE80211_MESHRT_FLAGS_PROXY 0x02 + uint8_t imr_dest[IEEE80211_ADDR_LEN]; + uint8_t imr_nexthop[IEEE80211_ADDR_LEN]; + uint16_t imr_nhops; uint8_t imr_pad; uint32_t imr_metric; uint32_t imr_lifetime; From owner-svn-src-all@FreeBSD.ORG Sat Feb 6 19:44:38 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 495DA1065670; Sat, 6 Feb 2010 19:44:38 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 352B48FC19; Sat, 6 Feb 2010 19:44:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o16Jic1O020417; Sat, 6 Feb 2010 19:44:38 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o16JiccO020404; Sat, 6 Feb 2010 19:44:38 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <201002061944.o16JiccO020404@svn.freebsd.org> From: Tim Kientzle Date: Sat, 6 Feb 2010 19:44:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203557 - head/usr.bin/tar X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Feb 2010 19:44:38 -0000 Author: kientzle Date: Sat Feb 6 19:44:37 2010 New Revision: 203557 URL: http://svn.freebsd.org/changeset/base/203557 Log: Diff reduction compared to portable bsdtar 2.8: Move the program name into a global, which eliminates an extra argument from a lot of places. Added: head/usr.bin/tar/err.c (contents, props changed) head/usr.bin/tar/err.h (contents, props changed) Modified: head/usr.bin/tar/Makefile head/usr.bin/tar/bsdtar.c head/usr.bin/tar/bsdtar.h head/usr.bin/tar/cmdline.c head/usr.bin/tar/matching.c head/usr.bin/tar/read.c head/usr.bin/tar/siginfo.c head/usr.bin/tar/subst.c head/usr.bin/tar/util.c head/usr.bin/tar/write.c Modified: head/usr.bin/tar/Makefile ============================================================================== --- head/usr.bin/tar/Makefile Sat Feb 6 19:24:16 2010 (r203556) +++ head/usr.bin/tar/Makefile Sat Feb 6 19:44:37 2010 (r203557) @@ -3,7 +3,7 @@ PROG= bsdtar BSDTAR_VERSION_STRING=2.7.0 -SRCS= bsdtar.c cmdline.c getdate.c matching.c read.c siginfo.c subst.c tree.c util.c write.c +SRCS= bsdtar.c cmdline.c err.c getdate.c matching.c read.c siginfo.c subst.c tree.c util.c write.c DPADD= ${LIBARCHIVE} ${LIBBZ2} ${LIBZ} LDADD= -larchive -lbz2 -lz -lmd .if ${MK_OPENSSL} != "no" Modified: head/usr.bin/tar/bsdtar.c ============================================================================== --- head/usr.bin/tar/bsdtar.c Sat Feb 6 19:24:16 2010 (r203556) +++ head/usr.bin/tar/bsdtar.c Sat Feb 6 19:44:37 2010 (r203557) @@ -65,6 +65,7 @@ __FBSDID("$FreeBSD$"); #endif #include "bsdtar.h" +#include "err.h" /* * Per POSIX.1-1988, tar defaults to reading/writing archives to/from @@ -84,7 +85,7 @@ __FBSDID("$FreeBSD$"); /* External function to parse a date/time string (from getdate.y) */ time_t get_date(time_t, const char *); -static void long_help(struct bsdtar *); +static void long_help(void); static void only_mode(struct bsdtar *, const char *opt, const char *valid); static void set_mode(struct bsdtar *, char opt); @@ -120,25 +121,25 @@ main(int argc, char **argv) _set_fmode(_O_BINARY); #endif - /* Need bsdtar->progname before calling bsdtar_warnc. */ + /* Need bsdtar_progname before calling bsdtar_warnc. */ if (*argv == NULL) - bsdtar->progname = "bsdtar"; + bsdtar_progname = "bsdtar"; else { #if defined(_WIN32) && !defined(__CYGWIN__) - bsdtar->progname = strrchr(*argv, '\\'); + bsdtar_progname = strrchr(*argv, '\\'); #else - bsdtar->progname = strrchr(*argv, '/'); + bsdtar_progname = strrchr(*argv, '/'); #endif - if (bsdtar->progname != NULL) - bsdtar->progname++; + if (bsdtar_progname != NULL) + bsdtar_progname++; else - bsdtar->progname = *argv; + bsdtar_progname = *argv; } time(&now); if (setlocale(LC_ALL, "") == NULL) - bsdtar_warnc(bsdtar, 0, "Failed to set default locale"); + bsdtar_warnc(0, "Failed to set default locale"); #if defined(HAVE_NL_LANGINFO) && defined(HAVE_D_MD_ORDER) bsdtar->day_first = (*nl_langinfo(D_MD_ORDER) == 'd'); #endif @@ -186,7 +187,7 @@ main(int argc, char **argv) case 'b': /* SUSv2 */ t = atoi(bsdtar->optarg); if (t <= 0 || t > 1024) - bsdtar_errc(bsdtar, 1, 0, + bsdtar_errc(1, 0, "Argument to -b is out of range (1..1024)"); bsdtar->bytes_per_block = 512 * t; break; @@ -204,7 +205,7 @@ main(int argc, char **argv) break; case OPTION_EXCLUDE: /* GNU tar */ if (exclude(bsdtar, bsdtar->optarg)) - bsdtar_errc(bsdtar, 1, 0, + bsdtar_errc(1, 0, "Couldn't exclude %s\n", bsdtar->optarg); break; case OPTION_FORMAT: /* GNU tar, others */ @@ -227,7 +228,7 @@ main(int argc, char **argv) possible_help_request = 1; break; case OPTION_HELP: /* GNU tar, others */ - long_help(bsdtar); + long_help(); exit(0); break; case 'I': /* GNU tar */ @@ -250,34 +251,34 @@ main(int argc, char **argv) * when transforming archives. */ if (include(bsdtar, bsdtar->optarg)) - bsdtar_errc(bsdtar, 1, 0, + bsdtar_errc(1, 0, "Failed to add %s to inclusion list", bsdtar->optarg); break; case 'j': /* GNU tar */ #if HAVE_LIBBZ2 if (bsdtar->create_compression != '\0') - bsdtar_errc(bsdtar, 1, 0, + bsdtar_errc(1, 0, "Can't specify both -%c and -%c", opt, bsdtar->create_compression); bsdtar->create_compression = opt; #else - bsdtar_warnc(bsdtar, 0, + bsdtar_warnc(0, "bzip2 compression not supported by this version of bsdtar"); - usage(bsdtar); + usage(); #endif break; case 'J': /* GNU tar 1.21 and later */ #if HAVE_LIBLZMA if (bsdtar->create_compression != '\0') - bsdtar_errc(bsdtar, 1, 0, + bsdtar_errc(1, 0, "Can't specify both -%c and -%c", opt, bsdtar->create_compression); bsdtar->create_compression = opt; #else - bsdtar_warnc(bsdtar, 0, + bsdtar_warnc(0, "xz compression not supported by this version of bsdtar"); - usage(bsdtar); + usage(); #endif break; case 'k': /* GNU tar */ @@ -296,14 +297,14 @@ main(int argc, char **argv) case OPTION_LZMA: #if HAVE_LIBLZMA if (bsdtar->create_compression != '\0') - bsdtar_errc(bsdtar, 1, 0, + bsdtar_errc(1, 0, "Can't specify both -%c and -%c", opt, bsdtar->create_compression); bsdtar->create_compression = opt; #else - bsdtar_warnc(bsdtar, 0, + bsdtar_warnc(0, "lzma compression not supported by this version of bsdtar"); - usage(bsdtar); + usage(); #endif break; case 'm': /* SUSv2 */ @@ -326,7 +327,7 @@ main(int argc, char **argv) { struct stat st; if (stat(bsdtar->optarg, &st) != 0) - bsdtar_errc(bsdtar, 1, 0, + bsdtar_errc(1, 0, "Can't open file %s", bsdtar->optarg); bsdtar->newer_ctime_sec = st.st_ctime; bsdtar->newer_ctime_nsec = @@ -340,7 +341,7 @@ main(int argc, char **argv) { struct stat st; if (stat(bsdtar->optarg, &st) != 0) - bsdtar_errc(bsdtar, 1, 0, + bsdtar_errc(1, 0, "Can't open file %s", bsdtar->optarg); bsdtar->newer_mtime_sec = st.st_mtime; bsdtar->newer_mtime_nsec = @@ -411,9 +412,9 @@ main(int argc, char **argv) #if HAVE_REGEX_H add_substitution(bsdtar, bsdtar->optarg); #else - bsdtar_warnc(bsdtar, 0, + bsdtar_warnc(0, "-s is not supported by this version of bsdtar"); - usage(bsdtar); + usage(); #endif break; case OPTION_SAME_OWNER: /* GNU tar */ @@ -458,7 +459,7 @@ main(int argc, char **argv) break; case 'X': /* GNU tar */ if (exclude_from_file(bsdtar, bsdtar->optarg)) - bsdtar_errc(bsdtar, 1, 0, + bsdtar_errc(1, 0, "failed to process exclusions from file %s", bsdtar->optarg); break; @@ -468,19 +469,19 @@ main(int argc, char **argv) case 'y': /* FreeBSD version of GNU tar */ #if HAVE_LIBBZ2 if (bsdtar->create_compression != '\0') - bsdtar_errc(bsdtar, 1, 0, + bsdtar_errc(1, 0, "Can't specify both -%c and -%c", opt, bsdtar->create_compression); bsdtar->create_compression = opt; #else - bsdtar_warnc(bsdtar, 0, + bsdtar_warnc(0, "bzip2 compression not supported by this version of bsdtar"); - usage(bsdtar); + usage(); #endif break; case 'Z': /* GNU tar */ if (bsdtar->create_compression != '\0') - bsdtar_errc(bsdtar, 1, 0, + bsdtar_errc(1, 0, "Can't specify both -%c and -%c", opt, bsdtar->create_compression); bsdtar->create_compression = opt; @@ -488,21 +489,21 @@ main(int argc, char **argv) case 'z': /* GNU tar, star, many others */ #if HAVE_LIBZ if (bsdtar->create_compression != '\0') - bsdtar_errc(bsdtar, 1, 0, + bsdtar_errc(1, 0, "Can't specify both -%c and -%c", opt, bsdtar->create_compression); bsdtar->create_compression = opt; #else - bsdtar_warnc(bsdtar, 0, + bsdtar_warnc(0, "gzip compression not supported by this version of bsdtar"); - usage(bsdtar); + usage(); #endif break; case OPTION_USE_COMPRESS_PROGRAM: bsdtar->compress_program = bsdtar->optarg; break; default: - usage(bsdtar); + usage(); } } @@ -512,13 +513,13 @@ main(int argc, char **argv) /* If no "real" mode was specified, treat -h as --help. */ if ((bsdtar->mode == '\0') && possible_help_request) { - long_help(bsdtar); + long_help(); exit(0); } /* Otherwise, a mode is required. */ if (bsdtar->mode == '\0') - bsdtar_errc(bsdtar, 1, 0, + bsdtar_errc(1, 0, "Must specify one of -c, -r, -t, -u, -x"); /* Check boolean options only permitted in certain modes. */ @@ -598,7 +599,7 @@ main(int argc, char **argv) #endif if (bsdtar->return_value != 0) - bsdtar_warnc(bsdtar, 0, + bsdtar_warnc(0, "Error exit delayed from previous errors."); return (bsdtar->return_value); } @@ -607,7 +608,7 @@ static void set_mode(struct bsdtar *bsdtar, char opt) { if (bsdtar->mode != '\0' && bsdtar->mode != opt) - bsdtar_errc(bsdtar, 1, 0, + bsdtar_errc(1, 0, "Can't specify both -%c and -%c", opt, bsdtar->mode); bsdtar->mode = opt; } @@ -619,18 +620,18 @@ static void only_mode(struct bsdtar *bsdtar, const char *opt, const char *valid_modes) { if (strchr(valid_modes, bsdtar->mode) == NULL) - bsdtar_errc(bsdtar, 1, 0, + bsdtar_errc(1, 0, "Option %s is not permitted in mode -%c", opt, bsdtar->mode); } void -usage(struct bsdtar *bsdtar) +usage(void) { const char *p; - p = bsdtar->progname; + p = bsdtar_progname; fprintf(stderr, "Usage:\n"); fprintf(stderr, " List: %s -tf \n", p); @@ -685,12 +686,12 @@ static const char *long_help_msg = * echo bsdtar; else echo not bsdtar; fi */ static void -long_help(struct bsdtar *bsdtar) +long_help(void) { const char *prog; const char *p; - prog = bsdtar->progname; + prog = bsdtar_progname; fflush(stderr); Modified: head/usr.bin/tar/bsdtar.h ============================================================================== --- head/usr.bin/tar/bsdtar.h Sat Feb 6 19:24:16 2010 (r203556) +++ head/usr.bin/tar/bsdtar.h Sat Feb 6 19:44:37 2010 (r203557) @@ -78,7 +78,6 @@ struct bsdtar { /* Miscellaneous state information */ struct archive *archive; - const char *progname; int argc; char **argv; const char *optarg; @@ -134,11 +133,7 @@ enum { OPTION_VERSION }; - -void bsdtar_errc(struct bsdtar *, int _eval, int _code, - const char *fmt, ...) __LA_DEAD; int bsdtar_getopt(struct bsdtar *); -void bsdtar_warnc(struct bsdtar *, int _code, const char *fmt, ...); void cleanup_exclusions(struct bsdtar *); void do_chdir(struct bsdtar *); int edit_pathname(struct bsdtar *, struct archive_entry *); @@ -164,7 +159,7 @@ void tar_mode_u(struct bsdtar *bsdtar); void tar_mode_x(struct bsdtar *bsdtar); int unmatched_inclusions(struct bsdtar *bsdtar); int unmatched_inclusions_warn(struct bsdtar *bsdtar, const char *msg); -void usage(struct bsdtar *); +void usage(void); int yes(const char *fmt, ...); #if HAVE_REGEX_H Modified: head/usr.bin/tar/cmdline.c ============================================================================== --- head/usr.bin/tar/cmdline.c Sat Feb 6 19:24:16 2010 (r203556) +++ head/usr.bin/tar/cmdline.c Sat Feb 6 19:44:37 2010 (r203557) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #endif #include "bsdtar.h" +#include "err.h" /* * Short options for tar. Please keep this sorted. @@ -220,7 +221,7 @@ bsdtar_getopt(struct bsdtar *bsdtar) if (p[1] == ':') { bsdtar->optarg = *bsdtar->argv; if (bsdtar->optarg == NULL) { - bsdtar_warnc(bsdtar, 0, + bsdtar_warnc(0, "Option %c requires an argument", opt); return ('?'); @@ -287,7 +288,7 @@ bsdtar_getopt(struct bsdtar *bsdtar) /* Otherwise, pick up the next word. */ opt_word = *bsdtar->argv; if (opt_word == NULL) { - bsdtar_warnc(bsdtar, 0, + bsdtar_warnc(0, "Option -%c requires an argument", opt); return ('?'); @@ -338,13 +339,13 @@ bsdtar_getopt(struct bsdtar *bsdtar) /* Fail if there wasn't a unique match. */ if (match == NULL) { - bsdtar_warnc(bsdtar, 0, + bsdtar_warnc(0, "Option %s%s is not supported", long_prefix, opt_word); return ('?'); } if (match2 != NULL) { - bsdtar_warnc(bsdtar, 0, + bsdtar_warnc(0, "Ambiguous option %s%s (matches --%s and --%s)", long_prefix, opt_word, match->name, match2->name); return ('?'); @@ -356,7 +357,7 @@ bsdtar_getopt(struct bsdtar *bsdtar) if (bsdtar->optarg == NULL) { bsdtar->optarg = *bsdtar->argv; if (bsdtar->optarg == NULL) { - bsdtar_warnc(bsdtar, 0, + bsdtar_warnc(0, "Option %s%s requires an argument", long_prefix, match->name); return ('?'); @@ -367,7 +368,7 @@ bsdtar_getopt(struct bsdtar *bsdtar) } else { /* Argument forbidden: fail if there is one. */ if (bsdtar->optarg != NULL) { - bsdtar_warnc(bsdtar, 0, + bsdtar_warnc(0, "Option %s%s does not allow an argument", long_prefix, match->name); return ('?'); Added: head/usr.bin/tar/err.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/tar/err.c Sat Feb 6 19:44:37 2010 (r203557) @@ -0,0 +1,74 @@ +/*- + * Copyright (c) 2003-2010 Tim Kientzle + * 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 + * in this position and unchanged. + * 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(S) ``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(S) BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "bsdtar_platform.h" +__FBSDID("$FreeBSD$"); + +#ifdef HAVE_STDARG_H +#include +#endif +#include +#ifdef HAVE_STDLIB_H +#include +#endif +#ifdef HAVE_STRING_H +#include +#endif + +#include "err.h" + +const char *bsdtar_progname; + +static void +bsdtar_vwarnc(int code, const char *fmt, va_list ap) +{ + fprintf(stderr, "%s: ", bsdtar_progname); + vfprintf(stderr, fmt, ap); + if (code != 0) + fprintf(stderr, ": %s", strerror(code)); + fprintf(stderr, "\n"); +} + +void +bsdtar_warnc(int code, const char *fmt, ...) +{ + va_list ap; + + va_start(ap, fmt); + bsdtar_vwarnc(code, fmt, ap); + va_end(ap); +} + +void +bsdtar_errc(int eval, int code, const char *fmt, ...) +{ + va_list ap; + + va_start(ap, fmt); + bsdtar_vwarnc(code, fmt, ap); + va_end(ap); + exit(eval); +} Added: head/usr.bin/tar/err.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/tar/err.h Sat Feb 6 19:44:37 2010 (r203557) @@ -0,0 +1,43 @@ +/*- + * Copyright (c) 2009 Joerg Sonnenberger + * 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(S) ``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(S) BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef LAFE_ERR_H +#define LAFE_ERR_H + +#if defined(__GNUC__) && (__GNUC__ > 2 || \ + (__GNUC__ == 2 && __GNUC_MINOR__ >= 5)) +#define __LA_DEAD __attribute__((__noreturn__)) +#else +#define __LA_DEAD +#endif + +extern const char *bsdtar_progname; + +void bsdtar_warnc(int code, const char *fmt, ...); +void bsdtar_errc(int eval, int code, const char *fmt, ...) __LA_DEAD; + +#endif Modified: head/usr.bin/tar/matching.c ============================================================================== --- head/usr.bin/tar/matching.c Sat Feb 6 19:24:16 2010 (r203556) +++ head/usr.bin/tar/matching.c Sat Feb 6 19:44:37 2010 (r203557) @@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$"); #endif #include "bsdtar.h" +#include "err.h" struct match { struct match *next; @@ -53,7 +54,7 @@ struct matching { }; -static void add_pattern(struct bsdtar *, struct match **list, +static void add_pattern(struct match **list, const char *pattern); static int bsdtar_fnmatch(const char *p, const char *s); static void initialize_matching(struct bsdtar *); @@ -80,7 +81,7 @@ exclude(struct bsdtar *bsdtar, const cha if (bsdtar->matching == NULL) initialize_matching(bsdtar); matching = bsdtar->matching; - add_pattern(bsdtar, &(matching->exclusions), pattern); + add_pattern(&(matching->exclusions), pattern); matching->exclusions_count++; return (0); } @@ -99,7 +100,7 @@ include(struct bsdtar *bsdtar, const cha if (bsdtar->matching == NULL) initialize_matching(bsdtar); matching = bsdtar->matching; - add_pattern(bsdtar, &(matching->inclusions), pattern); + add_pattern(&(matching->inclusions), pattern); matching->inclusions_count++; matching->inclusions_unmatched_count++; return (0); @@ -112,13 +113,13 @@ include_from_file(struct bsdtar *bsdtar, } static void -add_pattern(struct bsdtar *bsdtar, struct match **list, const char *pattern) +add_pattern(struct match **list, const char *pattern) { struct match *match; match = malloc(sizeof(*match) + strlen(pattern) + 1); if (match == NULL) - bsdtar_errc(bsdtar, 1, errno, "Out of memory"); + bsdtar_errc(1, errno, "Out of memory"); strcpy(match->pattern, pattern); /* Both "foo/" and "foo" should match "foo/bar". */ if (match->pattern[strlen(match->pattern)-1] == '/') @@ -242,7 +243,7 @@ initialize_matching(struct bsdtar *bsdta { bsdtar->matching = malloc(sizeof(*bsdtar->matching)); if (bsdtar->matching == NULL) - bsdtar_errc(bsdtar, 1, errno, "No memory"); + bsdtar_errc(1, errno, "No memory"); memset(bsdtar->matching, 0, sizeof(*bsdtar->matching)); } @@ -272,7 +273,7 @@ unmatched_inclusions_warn(struct bsdtar while (p != NULL) { if (p->matches == 0) { bsdtar->return_value = 1; - bsdtar_warnc(bsdtar, 0, "%s: %s", + bsdtar_warnc(0, "%s: %s", p->pattern, msg); } p = p->next; Modified: head/usr.bin/tar/read.c ============================================================================== --- head/usr.bin/tar/read.c Sat Feb 6 19:24:16 2010 (r203556) +++ head/usr.bin/tar/read.c Sat Feb 6 19:44:37 2010 (r203557) @@ -68,6 +68,7 @@ __FBSDID("$FreeBSD$"); #endif #include "bsdtar.h" +#include "err.h" static void list_item_verbose(struct bsdtar *, FILE *, struct archive_entry *); @@ -128,11 +129,11 @@ read_archive(struct bsdtar *bsdtar, char archive_read_support_compression_all(a); archive_read_support_format_all(a); if (ARCHIVE_OK != archive_read_set_options(a, bsdtar->option_options)) - bsdtar_errc(bsdtar, 1, 0, archive_error_string(a)); + bsdtar_errc(1, 0, archive_error_string(a)); if (archive_read_open_file(a, bsdtar->filename, bsdtar->bytes_per_block != 0 ? bsdtar->bytes_per_block : DEFAULT_BYTES_PER_BLOCK)) - bsdtar_errc(bsdtar, 1, 0, "Error opening archive: %s", + bsdtar_errc(1, 0, "Error opening archive: %s", archive_error_string(a)); do_chdir(bsdtar); @@ -146,9 +147,9 @@ read_archive(struct bsdtar *bsdtar, char if (mode == 'x' && bsdtar->option_chroot) { #if HAVE_CHROOT if (chroot(".") != 0) - bsdtar_errc(bsdtar, 1, errno, "Can't chroot to \".\""); + bsdtar_errc(1, errno, "Can't chroot to \".\""); #else - bsdtar_errc(bsdtar, 1, 0, + bsdtar_errc(1, 0, "chroot isn't supported on this platform"); #endif } @@ -163,12 +164,12 @@ read_archive(struct bsdtar *bsdtar, char if (r == ARCHIVE_EOF) break; if (r < ARCHIVE_OK) - bsdtar_warnc(bsdtar, 0, "%s", archive_error_string(a)); + bsdtar_warnc(0, "%s", archive_error_string(a)); if (r <= ARCHIVE_WARN) bsdtar->return_value = 1; if (r == ARCHIVE_RETRY) { /* Retryable error: try again */ - bsdtar_warnc(bsdtar, 0, "Retrying..."); + bsdtar_warnc(0, "Retrying..."); continue; } if (r == ARCHIVE_FATAL) @@ -232,17 +233,17 @@ read_archive(struct bsdtar *bsdtar, char r = archive_read_data_skip(a); if (r == ARCHIVE_WARN) { fprintf(out, "\n"); - bsdtar_warnc(bsdtar, 0, "%s", + bsdtar_warnc(0, "%s", archive_error_string(a)); } if (r == ARCHIVE_RETRY) { fprintf(out, "\n"); - bsdtar_warnc(bsdtar, 0, "%s", + bsdtar_warnc(0, "%s", archive_error_string(a)); } if (r == ARCHIVE_FATAL) { fprintf(out, "\n"); - bsdtar_warnc(bsdtar, 0, "%s", + bsdtar_warnc(0, "%s", archive_error_string(a)); bsdtar->return_value = 1; break; @@ -297,7 +298,7 @@ read_archive(struct bsdtar *bsdtar, char r = archive_read_close(a); if (r != ARCHIVE_OK) - bsdtar_warnc(bsdtar, 0, "%s", archive_error_string(a)); + bsdtar_warnc(0, "%s", archive_error_string(a)); if (r <= ARCHIVE_WARN) bsdtar->return_value = 1; Modified: head/usr.bin/tar/siginfo.c ============================================================================== --- head/usr.bin/tar/siginfo.c Sat Feb 6 19:24:16 2010 (r203556) +++ head/usr.bin/tar/siginfo.c Sat Feb 6 19:44:37 2010 (r203557) @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include #include "bsdtar.h" +#include "err.h" /* Is there a pending SIGINFO or SIGUSR1? */ static volatile sig_atomic_t siginfo_received = 0; @@ -73,7 +74,7 @@ siginfo_init(struct bsdtar *bsdtar) /* Allocate space for internal structure. */ if ((bsdtar->siginfo = malloc(sizeof(struct siginfo_data))) == NULL) - bsdtar_errc(bsdtar, 1, errno, "malloc failed"); + bsdtar_errc(1, errno, "malloc failed"); /* Set the strings to NULL so that free() is safe. */ bsdtar->siginfo->path = bsdtar->siginfo->oper = NULL; @@ -99,9 +100,9 @@ siginfo_setinfo(struct bsdtar *bsdtar, c /* Duplicate strings and store entry size. */ if ((bsdtar->siginfo->oper = strdup(oper)) == NULL) - bsdtar_errc(bsdtar, 1, errno, "Cannot strdup"); + bsdtar_errc(1, errno, "Cannot strdup"); if ((bsdtar->siginfo->path = strdup(path)) == NULL) - bsdtar_errc(bsdtar, 1, errno, "Cannot strdup"); + bsdtar_errc(1, errno, "Cannot strdup"); bsdtar->siginfo->size = size; } Modified: head/usr.bin/tar/subst.c ============================================================================== --- head/usr.bin/tar/subst.c Sat Feb 6 19:24:16 2010 (r203556) +++ head/usr.bin/tar/subst.c Sat Feb 6 19:44:37 2010 (r203557) @@ -28,6 +28,7 @@ __FBSDID("$FreeBSD$"); #if HAVE_REGEX_H #include "bsdtar.h" +#include "err.h" #include #include @@ -56,7 +57,7 @@ init_substitution(struct bsdtar *bsdtar) bsdtar->substitution = subst = malloc(sizeof(*subst)); if (subst == NULL) - bsdtar_errc(bsdtar, 1, errno, "Out of memory"); + bsdtar_errc(1, errno, "Out of memory"); subst->first_rule = subst->last_rule = NULL; } @@ -76,7 +77,7 @@ add_substitution(struct bsdtar *bsdtar, rule = malloc(sizeof(*rule)); if (rule == NULL) - bsdtar_errc(bsdtar, 1, errno, "Out of memory"); + bsdtar_errc(1, errno, "Out of memory"); rule->next = NULL; if (subst->last_rule == NULL) @@ -86,32 +87,32 @@ add_substitution(struct bsdtar *bsdtar, subst->last_rule = rule; if (*rule_text == '\0') - bsdtar_errc(bsdtar, 1, 0, "Empty replacement string"); + bsdtar_errc(1, 0, "Empty replacement string"); end_pattern = strchr(rule_text + 1, *rule_text); if (end_pattern == NULL) - bsdtar_errc(bsdtar, 1, 0, "Invalid replacement string"); + bsdtar_errc(1, 0, "Invalid replacement string"); pattern = malloc(end_pattern - rule_text); if (pattern == NULL) - bsdtar_errc(bsdtar, 1, errno, "Out of memory"); + bsdtar_errc(1, errno, "Out of memory"); memcpy(pattern, rule_text + 1, end_pattern - rule_text - 1); pattern[end_pattern - rule_text - 1] = '\0'; if ((r = regcomp(&rule->re, pattern, REG_BASIC)) != 0) { char buf[80]; regerror(r, &rule->re, buf, sizeof(buf)); - bsdtar_errc(bsdtar, 1, 0, "Invalid regular expression: %s", buf); + bsdtar_errc(1, 0, "Invalid regular expression: %s", buf); } free(pattern); start_subst = end_pattern + 1; end_pattern = strchr(start_subst, *rule_text); if (end_pattern == NULL) - bsdtar_errc(bsdtar, 1, 0, "Invalid replacement string"); + bsdtar_errc(1, 0, "Invalid replacement string"); rule->result = malloc(end_pattern - start_subst + 1); if (rule->result == NULL) - bsdtar_errc(bsdtar, 1, errno, "Out of memory"); + bsdtar_errc(1, errno, "Out of memory"); memcpy(rule->result, start_subst, end_pattern - start_subst); rule->result[end_pattern - start_subst] = '\0'; @@ -134,13 +135,13 @@ add_substitution(struct bsdtar *bsdtar, rule->symlink = 1; break; default: - bsdtar_errc(bsdtar, 1, 0, "Invalid replacement flag %c", *end_pattern); + bsdtar_errc(1, 0, "Invalid replacement flag %c", *end_pattern); } } } static void -realloc_strncat(struct bsdtar *bsdtar, char **str, const char *append, size_t len) +realloc_strncat(char **str, const char *append, size_t len) { char *new_str; size_t old_len; @@ -152,7 +153,7 @@ realloc_strncat(struct bsdtar *bsdtar, c new_str = malloc(old_len + len + 1); if (new_str == NULL) - bsdtar_errc(bsdtar, 1, errno, "Out of memory"); + bsdtar_errc(1, errno, "Out of memory"); memcpy(new_str, *str, old_len); memcpy(new_str + old_len, append, len); new_str[old_len + len] = '\0'; @@ -161,7 +162,7 @@ realloc_strncat(struct bsdtar *bsdtar, c } static void -realloc_strcat(struct bsdtar *bsdtar, char **str, const char *append) +realloc_strcat(char **str, const char *append) { char *new_str; size_t old_len; @@ -173,7 +174,7 @@ realloc_strcat(struct bsdtar *bsdtar, ch new_str = malloc(old_len + strlen(append) + 1); if (new_str == NULL) - bsdtar_errc(bsdtar, 1, errno, "Out of memory"); + bsdtar_errc(1, errno, "Out of memory"); memcpy(new_str, *str, old_len); strcpy(new_str + old_len, append); free(*str); @@ -206,12 +207,12 @@ apply_substitution(struct bsdtar *bsdtar got_match = 1; print_match |= rule->print; - realloc_strncat(bsdtar, result, name, matches[0].rm_so); + realloc_strncat(result, name, matches[0].rm_so); for (i = 0, j = 0; rule->result[i] != '\0'; ++i) { if (rule->result[i] == '~') { - realloc_strncat(bsdtar, result, rule->result + j, i - j); - realloc_strncat(bsdtar, result, name, matches[0].rm_eo); + realloc_strncat(result, rule->result + j, i - j); + realloc_strncat(result, name, matches[0].rm_eo); j = i + 1; continue; } @@ -223,7 +224,7 @@ apply_substitution(struct bsdtar *bsdtar switch (c) { case '~': case '\\': - realloc_strncat(bsdtar, result, rule->result + j, i - j - 1); + realloc_strncat(result, rule->result + j, i - j - 1); j = i; break; case '1': @@ -235,13 +236,13 @@ apply_substitution(struct bsdtar *bsdtar case '7': case '8': case '9': - realloc_strncat(bsdtar, result, rule->result + j, i - j - 1); + realloc_strncat(result, rule->result + j, i - j - 1); if ((size_t)(c - '0') > (size_t)(rule->re.re_nsub)) { free(*result); *result = NULL; return -1; } - realloc_strncat(bsdtar, result, name + matches[c - '0'].rm_so, matches[c - '0'].rm_eo - matches[c - '0'].rm_so); + realloc_strncat(result, name + matches[c - '0'].rm_so, matches[c - '0'].rm_eo - matches[c - '0'].rm_so); j = i + 1; break; default: @@ -251,7 +252,7 @@ apply_substitution(struct bsdtar *bsdtar } - realloc_strcat(bsdtar, result, rule->result + j); + realloc_strcat(result, rule->result + j); name += matches[0].rm_eo; @@ -260,7 +261,7 @@ apply_substitution(struct bsdtar *bsdtar } if (got_match) - realloc_strcat(bsdtar, result, name); + realloc_strcat(result, name); if (print_match) fprintf(stderr, "%s >> %s\n", path, *result); Modified: head/usr.bin/tar/util.c ============================================================================== --- head/usr.bin/tar/util.c Sat Feb 6 19:24:16 2010 (r203556) +++ head/usr.bin/tar/util.c Sat Feb 6 19:44:37 2010 (r203557) @@ -54,9 +54,8 @@ __FBSDID("$FreeBSD$"); #endif #include "bsdtar.h" +#include "err.h" -static void bsdtar_vwarnc(struct bsdtar *, int code, - const char *fmt, va_list ap); static size_t bsdtar_expand_char(char *, size_t, char); static const char *strip_components(const char *path, int elements); @@ -203,37 +202,6 @@ bsdtar_expand_char(char *buff, size_t of return (i - offset); } -static void -bsdtar_vwarnc(struct bsdtar *bsdtar, int code, const char *fmt, va_list ap) -{ - fprintf(stderr, "%s: ", bsdtar->progname); - vfprintf(stderr, fmt, ap); - if (code != 0) - fprintf(stderr, ": %s", strerror(code)); - fprintf(stderr, "\n"); -} - -void -bsdtar_warnc(struct bsdtar *bsdtar, int code, const char *fmt, ...) -{ - va_list ap; - - va_start(ap, fmt); - bsdtar_vwarnc(bsdtar, code, fmt, ap); - va_end(ap); -} - -void -bsdtar_errc(struct bsdtar *bsdtar, int eval, int code, const char *fmt, ...) -{ - va_list ap; - - va_start(ap, fmt); - bsdtar_vwarnc(bsdtar, code, fmt, ap); - va_end(ap); - exit(eval); -} - int yes(const char *fmt, ...) { @@ -297,11 +265,11 @@ process_lines(struct bsdtar *bsdtar, con else f = fopen(pathname, "r"); if (f == NULL) - bsdtar_errc(bsdtar, 1, errno, "Couldn't open %s", pathname); + bsdtar_errc(1, errno, "Couldn't open %s", pathname); buff_length = 8192; buff = malloc(buff_length); if (buff == NULL) - bsdtar_errc(bsdtar, 1, ENOMEM, "Can't read %s", pathname); + bsdtar_errc(1, ENOMEM, "Can't read %s", pathname); line_start = line_end = buff_end = buff; for (;;) { /* Get some more data into the buffer. */ @@ -322,7 +290,7 @@ process_lines(struct bsdtar *bsdtar, con if (feof(f)) break; if (ferror(f)) - bsdtar_errc(bsdtar, 1, errno, + bsdtar_errc(1, errno, "Can't read %s", pathname); if (line_start > buff) { /* Move a leftover fractional line to the beginning. */ @@ -334,12 +302,12 @@ process_lines(struct bsdtar *bsdtar, con /* Line is too big; enlarge the buffer. */ new_buff_length = buff_length * 2; if (new_buff_length <= buff_length) - bsdtar_errc(bsdtar, 1, ENOMEM, + bsdtar_errc(1, ENOMEM, "Line too long in %s", pathname); buff_length = new_buff_length; p = realloc(buff, buff_length); if (p == NULL) - bsdtar_errc(bsdtar, 1, ENOMEM, + bsdtar_errc(1, ENOMEM, "Line too long in %s", pathname); buff_end = p + (buff_end - buff); line_end = p + (line_end - buff); @@ -399,7 +367,7 @@ set_chdir(struct bsdtar *bsdtar, const c free(old_pending); } if (bsdtar->pending_chdir == NULL) - bsdtar_errc(bsdtar, 1, errno, "No memory"); + bsdtar_errc(1, errno, "No memory"); } void @@ -409,7 +377,7 @@ do_chdir(struct bsdtar *bsdtar) return; if (chdir(bsdtar->pending_chdir) != 0) { - bsdtar_errc(bsdtar, 1, 0, "could not chdir to '%s'\n", + bsdtar_errc(1, 0, "could not chdir to '%s'\n", bsdtar->pending_chdir); } free(bsdtar->pending_chdir); @@ -459,7 +427,7 @@ edit_pathname(struct bsdtar *bsdtar, str #if HAVE_REGEX_H r = apply_substitution(bsdtar, name, &subst_name, 0); if (r == -1) { - bsdtar_warnc(bsdtar, 0, "Invalid substitution, skipping entry"); + bsdtar_warnc(0, "Invalid substitution, skipping entry"); return 1; } if (r == 1) { @@ -475,7 +443,7 @@ edit_pathname(struct bsdtar *bsdtar, str if (archive_entry_hardlink(entry)) { r = apply_substitution(bsdtar, archive_entry_hardlink(entry), &subst_name, 1); if (r == -1) { - bsdtar_warnc(bsdtar, 0, "Invalid substitution, skipping entry"); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat Feb 6 19:49:00 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 064EC1065672; Sat, 6 Feb 2010 19:49:00 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E75468FC19; Sat, 6 Feb 2010 19:48:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o16JmxBr021523; Sat, 6 Feb 2010 19:48:59 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o16JmxoK021521; Sat, 6 Feb 2010 19:48:59 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <201002061948.o16JmxoK021521@svn.freebsd.org> From: Tim Kientzle Date: Sat, 6 Feb 2010 19:48:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203558 - head/usr.bin/tar X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Feb 2010 19:49:00 -0000 Author: kientzle Date: Sat Feb 6 19:48:59 2010 New Revision: 203558 URL: http://svn.freebsd.org/changeset/base/203558 Log: Allow -b up to 8192. I've had reports from people who routinely use -b 2048 (1MiB block size). Setting the limit to 8192 should allow some room for growth while still helping people who mistakenly put in byte counts here instead of block counts. Modified: head/usr.bin/tar/bsdtar.c Modified: head/usr.bin/tar/bsdtar.c ============================================================================== --- head/usr.bin/tar/bsdtar.c Sat Feb 6 19:44:37 2010 (r203557) +++ head/usr.bin/tar/bsdtar.c Sat Feb 6 19:48:59 2010 (r203558) @@ -186,9 +186,9 @@ main(int argc, char **argv) break; case 'b': /* SUSv2 */ t = atoi(bsdtar->optarg); - if (t <= 0 || t > 1024) + if (t <= 0 || t > 8192) bsdtar_errc(1, 0, - "Argument to -b is out of range (1..1024)"); + "Argument to -b is out of range (1..8192)"); bsdtar->bytes_per_block = 512 * t; break; case 'C': /* GNU tar */ From owner-svn-src-all@FreeBSD.ORG Sat Feb 6 19:53:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28B8E1065672; Sat, 6 Feb 2010 19:53:49 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 164118FC14; Sat, 6 Feb 2010 19:53:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o16Jrmfr022603; Sat, 6 Feb 2010 19:53:48 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o16Jrmxd022601; Sat, 6 Feb 2010 19:53:48 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <201002061953.o16Jrmxd022601@svn.freebsd.org> From: Tim Kientzle Date: Sat, 6 Feb 2010 19:53:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203559 - head/usr.bin/tar X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Feb 2010 19:53:49 -0000 Author: kientzle Date: Sat Feb 6 19:53:48 2010 New Revision: 203559 URL: http://svn.freebsd.org/changeset/base/203559 Log: Reformat the Makefile slightly. Modified: head/usr.bin/tar/Makefile Modified: head/usr.bin/tar/Makefile ============================================================================== --- head/usr.bin/tar/Makefile Sat Feb 6 19:48:59 2010 (r203558) +++ head/usr.bin/tar/Makefile Sat Feb 6 19:53:48 2010 (r203559) @@ -3,7 +3,17 @@ PROG= bsdtar BSDTAR_VERSION_STRING=2.7.0 -SRCS= bsdtar.c cmdline.c err.c getdate.c matching.c read.c siginfo.c subst.c tree.c util.c write.c +SRCS= bsdtar.c \ + cmdline.c \ + err.c \ + getdate.c \ + matching.c \ + read.c \ + siginfo.c \ + subst.c \ + tree.c \ + util.c \ + write.c DPADD= ${LIBARCHIVE} ${LIBBZ2} ${LIBZ} LDADD= -larchive -lbz2 -lz -lmd .if ${MK_OPENSSL} != "no" From owner-svn-src-all@FreeBSD.ORG Sat Feb 6 19:56:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D8C37106566C; Sat, 6 Feb 2010 19:56:32 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C61508FC0A; Sat, 6 Feb 2010 19:56:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o16JuW5I023240; Sat, 6 Feb 2010 19:56:32 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o16JuWYg023237; Sat, 6 Feb 2010 19:56:32 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <201002061956.o16JuWYg023237@svn.freebsd.org> From: Tim Kientzle Date: Sat, 6 Feb 2010 19:56:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203560 - head/usr.bin/tar X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Feb 2010 19:56:32 -0000 Author: kientzle Date: Sat Feb 6 19:56:32 2010 New Revision: 203560 URL: http://svn.freebsd.org/changeset/base/203560 Log: Remove all traces of an experiment for handling "root" on Windows systems. Modified: head/usr.bin/tar/bsdtar.c head/usr.bin/tar/bsdtar_platform.h Modified: head/usr.bin/tar/bsdtar.c ============================================================================== --- head/usr.bin/tar/bsdtar.c Sat Feb 6 19:53:48 2010 (r203559) +++ head/usr.bin/tar/bsdtar.c Sat Feb 6 19:56:32 2010 (r203560) @@ -159,8 +159,10 @@ main(int argc, char **argv) /* Default: Perform basic security checks. */ bsdtar->extract_flags |= SECURITY; - /* Defaults for root user: */ - if (bsdtar_is_privileged(bsdtar)) { +#ifndef _WIN32 + /* On POSIX systems, assume --same-owner and -p when run by + * the root user. This doesn't make any sense on Windows. */ + if (bsdtar->user_uid == 0) { /* --same-owner */ bsdtar->extract_flags |= ARCHIVE_EXTRACT_OWNER; /* -p */ @@ -169,6 +171,7 @@ main(int argc, char **argv) bsdtar->extract_flags |= ARCHIVE_EXTRACT_XATTR; bsdtar->extract_flags |= ARCHIVE_EXTRACT_FFLAGS; } +#endif bsdtar->argv = argv; bsdtar->argc = argc; Modified: head/usr.bin/tar/bsdtar_platform.h ============================================================================== --- head/usr.bin/tar/bsdtar_platform.h Sat Feb 6 19:53:48 2010 (r203559) +++ head/usr.bin/tar/bsdtar_platform.h Sat Feb 6 19:56:32 2010 (r203560) @@ -164,12 +164,8 @@ #define __LA_DEAD #endif -#if defined(__CYGWIN__) -#include "bsdtar_cygwin.h" -#elif defined(_WIN32) /* && !__CYGWIN__ */ +#if defined(_WIN32) && !defined(__CYGWIN__) #include "bsdtar_windows.h" -#else -#define bsdtar_is_privileged(bsdtar) (bsdtar->user_uid == 0) #endif #endif /* !BSDTAR_PLATFORM_H_INCLUDED */ From owner-svn-src-all@FreeBSD.ORG Sat Feb 6 20:00:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E1B6B106568B; Sat, 6 Feb 2010 20:00:35 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CE8B18FC13; Sat, 6 Feb 2010 20:00:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o16K0ZB9024207; Sat, 6 Feb 2010 20:00:35 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o16K0ZBo024205; Sat, 6 Feb 2010 20:00:35 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <201002062000.o16K0ZBo024205@svn.freebsd.org> From: Antoine Brodin Date: Sat, 6 Feb 2010 20:00:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203561 - head/tools/build/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Feb 2010 20:00:36 -0000 Author: antoine Date: Sat Feb 6 20:00:35 2010 New Revision: 203561 URL: http://svn.freebsd.org/changeset/base/203561 Log: Add files to remove when MK_GSSAPI=no. Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sat Feb 6 19:56:32 2010 (r203560) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sat Feb 6 20:00:35 2010 (r203561) @@ -799,6 +799,85 @@ OLD_FILES+=usr/lib32/libgpib_p.a .endif .endif +.if ${MK_GSSAPI} == no +OLD_FILES+=usr/lib/libgssapi.a +OLD_FILES+=usr/lib/libgssapi.so +OLD_LIBS+=usr/lib/libgssapi.so.10 +OLD_FILES+=usr/lib/libgssapi_p.a +OLD_FILES+=usr/lib/librpcsec_gss.a +OLD_FILES+=usr/lib/librpcsec_gss.so +OLD_LIBS+=usr/lib/librpcsec_gss.so.1 +.if ${TARGET_ARCH} == "amd64" +OLD_FILES+=usr/lib32/libgssapi.a +OLD_FILES+=usr/lib32/libgssapi.so +OLD_LIBS+=usr/lib32/libgssapi.so.10 +OLD_FILES+=usr/lib32/libgssapi_p.a +OLD_FILES+=usr/lib32/librpcsec_gss.a +OLD_FILES+=usr/lib32/librpcsec_gss.so +OLD_LIBS+=usr/lib32/librpcsec_gss.so.1 +.endif +OLD_FILES+=usr/sbin/gssd +OLD_FILES+=usr/share/man/man3/gss_accept_sec_context.3.gz +OLD_FILES+=usr/share/man/man3/gss_acquire_cred.3.gz +OLD_FILES+=usr/share/man/man3/gss_add_cred.3.gz +OLD_FILES+=usr/share/man/man3/gss_add_oid_set_member.3.gz +OLD_FILES+=usr/share/man/man3/gss_canonicalize_name.3.gz +OLD_FILES+=usr/share/man/man3/gss_compare_name.3.gz +OLD_FILES+=usr/share/man/man3/gss_context_time.3.gz +OLD_FILES+=usr/share/man/man3/gss_create_empty_oid_set.3.gz +OLD_FILES+=usr/share/man/man3/gss_delete_sec_context.3.gz +OLD_FILES+=usr/share/man/man3/gss_display_name.3.gz +OLD_FILES+=usr/share/man/man3/gss_display_status.3.gz +OLD_FILES+=usr/share/man/man3/gss_duplicate_name.3.gz +OLD_FILES+=usr/share/man/man3/gss_export_name.3.gz +OLD_FILES+=usr/share/man/man3/gss_export_sec_context.3.gz +OLD_FILES+=usr/share/man/man3/gss_get_mic.3.gz +OLD_FILES+=usr/share/man/man3/gss_import_name.3.gz +OLD_FILES+=usr/share/man/man3/gss_import_sec_context.3.gz +OLD_FILES+=usr/share/man/man3/gss_indicate_mechs.3.gz +OLD_FILES+=usr/share/man/man3/gss_init_sec_context.3.gz +OLD_FILES+=usr/share/man/man3/gss_inquire_context.3.gz +OLD_FILES+=usr/share/man/man3/gss_inquire_cred.3.gz +OLD_FILES+=usr/share/man/man3/gss_inquire_cred_by_mech.3.gz +OLD_FILES+=usr/share/man/man3/gss_inquire_mechs_for_name.3.gz +OLD_FILES+=usr/share/man/man3/gss_inquire_names_for_mech.3.gz +OLD_FILES+=usr/share/man/man3/gss_process_context_token.3.gz +OLD_FILES+=usr/share/man/man3/gss_release_buffer.3.gz +OLD_FILES+=usr/share/man/man3/gss_release_cred.3.gz +OLD_FILES+=usr/share/man/man3/gss_release_name.3.gz +OLD_FILES+=usr/share/man/man3/gss_release_oid_set.3.gz +OLD_FILES+=usr/share/man/man3/gss_seal.3.gz +OLD_FILES+=usr/share/man/man3/gss_sign.3.gz +OLD_FILES+=usr/share/man/man3/gss_test_oid_set_member.3.gz +OLD_FILES+=usr/share/man/man3/gss_unseal.3.gz +OLD_FILES+=usr/share/man/man3/gss_unwrap.3.gz +OLD_FILES+=usr/share/man/man3/gss_verify.3.gz +OLD_FILES+=usr/share/man/man3/gss_verify_mic.3.gz +OLD_FILES+=usr/share/man/man3/gss_wrap.3.gz +OLD_FILES+=usr/share/man/man3/gss_wrap_size_limit.3.gz +OLD_FILES+=usr/share/man/man3/gssapi.3.gz +OLD_FILES+=usr/share/man/man3/rpc_gss_get_error.3.gz +OLD_FILES+=usr/share/man/man3/rpc_gss_get_mech_info.3.gz +OLD_FILES+=usr/share/man/man3/rpc_gss_get_mechanisms.3.gz +OLD_FILES+=usr/share/man/man3/rpc_gss_get_principal_name.3.gz +OLD_FILES+=usr/share/man/man3/rpc_gss_get_versions.3.gz +OLD_FILES+=usr/share/man/man3/rpc_gss_getcred.3.gz +OLD_FILES+=usr/share/man/man3/rpc_gss_is_installed.3.gz +OLD_FILES+=usr/share/man/man3/rpc_gss_max_data_length.3.gz +OLD_FILES+=usr/share/man/man3/rpc_gss_mech_to_oid.3.gz +OLD_FILES+=usr/share/man/man3/rpc_gss_oid_to_mech.3.gz +OLD_FILES+=usr/share/man/man3/rpc_gss_qop_to_num.3.gz +OLD_FILES+=usr/share/man/man3/rpc_gss_seccreate.3.gz +OLD_FILES+=usr/share/man/man3/rpc_gss_set_callback.3.gz +OLD_FILES+=usr/share/man/man3/rpc_gss_set_defaults.3.gz +OLD_FILES+=usr/share/man/man3/rpc_gss_set_svc_name.3.gz +OLD_FILES+=usr/share/man/man3/rpc_gss_svc_max_data_length.3.gz +OLD_FILES+=usr/share/man/man3/rpcsec_gss.3.gz +OLD_FILES+=usr/share/man/man5/mech.5.gz +OLD_FILES+=usr/share/man/man5/qop.5.gz +OLD_FILES+=usr/share/man/man8/gssd.8.gz +.endif + #.if ${MK_GROFF} == no # to be filled in #.endif From owner-svn-src-all@FreeBSD.ORG Sat Feb 6 20:02:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8D911106568D; Sat, 6 Feb 2010 20:02:56 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7AB848FC17; Sat, 6 Feb 2010 20:02:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o16K2uZE024733; Sat, 6 Feb 2010 20:02:56 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o16K2uu6024731; Sat, 6 Feb 2010 20:02:56 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <201002062002.o16K2uu6024731@svn.freebsd.org> From: Antoine Brodin Date: Sat, 6 Feb 2010 20:02:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203562 - head/tools/build/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Feb 2010 20:02:56 -0000 Author: antoine Date: Sat Feb 6 20:02:56 2010 New Revision: 203562 URL: http://svn.freebsd.org/changeset/base/203562 Log: Add file to remove when MK_IDEA=no. Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sat Feb 6 20:00:35 2010 (r203561) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sat Feb 6 20:02:56 2010 (r203562) @@ -894,6 +894,10 @@ OLD_FILES+=usr/share/man/man5/hesiod.con # to be filled in #.endif +.if ${MK_IDEA} == no +OLD_FILES+=usr/include/openssl/idea.h +.endif + .if ${MK_INET6} == no OLD_FILES+=rescue/ping6 OLD_FILES+=sbin/ping6 From owner-svn-src-all@FreeBSD.ORG Sat Feb 6 20:06:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2C56810656A4; Sat, 6 Feb 2010 20:06:07 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1516D8FC1C; Sat, 6 Feb 2010 20:06:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o16K66Bc025454; Sat, 6 Feb 2010 20:06:06 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o16K66g5025452; Sat, 6 Feb 2010 20:06:06 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <201002062006.o16K66g5025452@svn.freebsd.org> From: Antoine Brodin Date: Sat, 6 Feb 2010 20:06:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203563 - head/tools/build/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Feb 2010 20:06:07 -0000 Author: antoine Date: Sat Feb 6 20:06:06 2010 New Revision: 203563 URL: http://svn.freebsd.org/changeset/base/203563 Log: Move rescue/ping6 from files to remove when MK_INET6=no to file to remove when MK_INET6_SUPPORT=no. (MK_INET6=no implies MK_INET6_SUPPORT=no) Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sat Feb 6 20:02:56 2010 (r203562) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sat Feb 6 20:06:06 2010 (r203563) @@ -899,7 +899,6 @@ OLD_FILES+=usr/include/openssl/idea.h .endif .if ${MK_INET6} == no -OLD_FILES+=rescue/ping6 OLD_FILES+=sbin/ping6 OLD_FILES+=sbin/rtsol OLD_FILES+=usr/sbin/faithd @@ -927,6 +926,10 @@ OLD_FILES+=usr/share/man/man8/rtsold.8.g OLD_FILES+=usr/share/man/man8/traceroute6.8.gz .endif +.if ${MK_INET6_SUPPORT} == no +OLD_FILES+=rescue/ping6 +.endif + #.if ${MK_INFO} == no # to be filled in #.endif From owner-svn-src-all@FreeBSD.ORG Sat Feb 6 20:08:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1FA1C106566B; Sat, 6 Feb 2010 20:08:47 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0CFB98FC15; Sat, 6 Feb 2010 20:08:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o16K8kgo026079; Sat, 6 Feb 2010 20:08:46 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o16K8kcF026077; Sat, 6 Feb 2010 20:08:46 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <201002062008.o16K8kcF026077@svn.freebsd.org> From: Antoine Brodin Date: Sat, 6 Feb 2010 20:08:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203564 - head/tools/build/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Feb 2010 20:08:47 -0000 Author: antoine Date: Sat Feb 6 20:08:46 2010 New Revision: 203564 URL: http://svn.freebsd.org/changeset/base/203564 Log: Add files to remove when MK_IPFW=no. Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sat Feb 6 20:06:06 2010 (r203563) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sat Feb 6 20:08:46 2010 (r203564) @@ -1013,6 +1013,17 @@ OLD_FILES+=usr/share/man/man8/ipnat.8.gz OLD_FILES+=usr/share/man/man8/ippool.8.gz .endif +.if ${MK_IPFW} == no +OLD_FILES+=etc/periodic/security/500.ipfwdenied +OLD_FILES+=etc/periodic/security/550.ipfwlimit +OLD_FILES+=sbin/ipfw +OLD_FILES+=sbin/natd +OLD_FILES+=usr/sbin/ipfwpcap +OLD_FILES+=usr/share/man/man8/ipfw.8.gz +OLD_FILES+=usr/share/man/man8/ipfwpcap.8.gz +OLD_FILES+=usr/share/man/man8/natd.8.gz +.endif + .if ${MK_IPX} == no OLD_LIBS+=lib/libipx.so.4 OLD_FILES+=usr/lib/libipx.a From owner-svn-src-all@FreeBSD.ORG Sat Feb 6 20:09:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 08B65106566B; Sat, 6 Feb 2010 20:09:56 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EA2C28FC16; Sat, 6 Feb 2010 20:09:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o16K9tKd026382; Sat, 6 Feb 2010 20:09:55 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o16K9t25026380; Sat, 6 Feb 2010 20:09:55 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <201002062009.o16K9t25026380@svn.freebsd.org> From: Antoine Brodin Date: Sat, 6 Feb 2010 20:09:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203565 - head/tools/build/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Feb 2010 20:09:56 -0000 Author: antoine Date: Sat Feb 6 20:09:55 2010 New Revision: 203565 URL: http://svn.freebsd.org/changeset/base/203565 Log: Update files to remove when MK_IPX=no. Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sat Feb 6 20:08:46 2010 (r203564) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sat Feb 6 20:09:55 2010 (r203565) @@ -1025,14 +1025,14 @@ OLD_FILES+=usr/share/man/man8/natd.8.gz .endif .if ${MK_IPX} == no -OLD_LIBS+=lib/libipx.so.4 +OLD_LIBS+=lib/libipx.so.5 OLD_FILES+=usr/lib/libipx.a OLD_FILES+=usr/lib/libipx.so OLD_FILES+=usr/lib/libipx_p.a .if ${TARGET_ARCH} == "amd64" OLD_FILES+=usr/lib32/libipx.a OLD_FILES+=usr/lib32/libipx.so -OLD_LIBS+=usr/lib32/libipx.so.4 +OLD_LIBS+=usr/lib32/libipx.so.5 OLD_FILES+=usr/lib32/libipx_p.a .endif OLD_FILES+=usr/sbin/IPXrouted From owner-svn-src-all@FreeBSD.ORG Sat Feb 6 20:11:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DDB3B106566C; Sat, 6 Feb 2010 20:11:23 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CB0798FC15; Sat, 6 Feb 2010 20:11:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o16KBNd0026788; Sat, 6 Feb 2010 20:11:23 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o16KBNGd026786; Sat, 6 Feb 2010 20:11:23 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <201002062011.o16KBNGd026786@svn.freebsd.org> From: Antoine Brodin Date: Sat, 6 Feb 2010 20:11:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203566 - head/tools/build/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Feb 2010 20:11:24 -0000 Author: antoine Date: Sat Feb 6 20:11:23 2010 New Revision: 203566 URL: http://svn.freebsd.org/changeset/base/203566 Log: Add files to remove when MK_JAIL=no. Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sat Feb 6 20:09:55 2010 (r203565) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sat Feb 6 20:11:23 2010 (r203566) @@ -1042,6 +1042,15 @@ OLD_FILES+=usr/share/man/man3/ipx_ntoa.3 OLD_FILES+=usr/share/man/man8/IPXrouted.8.gz .endif +.if ${MK_JAIL} == no +OLD_FILES+=usr/sbin/jail +OLD_FILES+=usr/sbin/jexec +OLD_FILES+=usr/sbin/jls +OLD_FILES+=usr/share/man/man8/jail.8.gz +OLD_FILES+=usr/share/man/man8/jexec.8.gz +OLD_FILES+=usr/share/man/man8/jls.8.gz +.endif + .if ${MK_KERBEROS} == no OLD_FILES+=usr/bin/ksu OLD_FILES+=usr/bin/kadmin From owner-svn-src-all@FreeBSD.ORG Sat Feb 6 20:21:03 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4E2F1106568B; Sat, 6 Feb 2010 20:21:03 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3982C8FC12; Sat, 6 Feb 2010 20:21:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o16KL35K028949; Sat, 6 Feb 2010 20:21:03 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o16KL3sV028947; Sat, 6 Feb 2010 20:21:03 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <201002062021.o16KL3sV028947@svn.freebsd.org> From: Antoine Brodin Date: Sat, 6 Feb 2010 20:21:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203567 - head/tools/build/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Feb 2010 20:21:03 -0000 Author: antoine Date: Sat Feb 6 20:21:03 2010 New Revision: 203567 URL: http://svn.freebsd.org/changeset/base/203567 Log: Update files to remove when MK_KERBEROS=no. Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sat Feb 6 20:11:23 2010 (r203566) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sat Feb 6 20:21:03 2010 (r203567) @@ -1052,76 +1052,168 @@ OLD_FILES+=usr/share/man/man8/jls.8.gz .endif .if ${MK_KERBEROS} == no -OLD_FILES+=usr/bin/ksu OLD_FILES+=usr/bin/kadmin OLD_FILES+=usr/bin/kdestroy OLD_FILES+=usr/bin/kinit OLD_FILES+=usr/bin/klist OLD_FILES+=usr/bin/kpasswd OLD_FILES+=usr/bin/krb5-config +OLD_FILES+=usr/bin/ksu OLD_FILES+=usr/bin/verify_krb5_conf -OLD_FILES+=usr/include/kadm5/admin.h -OLD_FILES+=usr/include/kadm5/kadm5-private.h -OLD_FILES+=usr/include/kadm5/kadm5-protos.h -OLD_FILES+=usr/include/kadm5/kadm5_err.h -OLD_FILES+=usr/include/kadm5/private.h OLD_FILES+=usr/include/asn1_err.h -OLD_FILES+=usr/include/krb5_asn1.h -OLD_FILES+=usr/include/hdb.h +OLD_FILES+=usr/include/cms_asn1.h +OLD_FILES+=usr/include/digest_asn1.h +OLD_FILES+=usr/include/gssapi/gssapi_krb5.h OLD_FILES+=usr/include/hdb-private.h OLD_FILES+=usr/include/hdb-protos.h +OLD_FILES+=usr/include/hdb.h OLD_FILES+=usr/include/hdb_asn1.h OLD_FILES+=usr/include/hdb_err.h -OLD_FILES+=usr/include/kafs.h +OLD_FILES+=usr/include/heim_asn1.h OLD_FILES+=usr/include/heim_err.h +OLD_FILES+=usr/include/heim_threads.h +OLD_FILES+=usr/include/heimntlm-protos.h +OLD_FILES+=usr/include/heimntlm.h +OLD_FILES+=usr/include/hx509-private.h +OLD_FILES+=usr/include/hx509-protos.h +OLD_FILES+=usr/include/hx509.h +OLD_FILES+=usr/include/hx509_err.h OLD_FILES+=usr/include/k524_err.h +OLD_FILES+=usr/include/kadm5/admin.h +OLD_FILES+=usr/include/kadm5/kadm5-private.h +OLD_FILES+=usr/include/kadm5/kadm5-protos.h +OLD_FILES+=usr/include/kadm5/kadm5_err.h +OLD_FILES+=usr/include/kadm5/private.h +OLD_FILES+=usr/include/kafs.h OLD_FILES+=usr/include/krb5-protos.h OLD_FILES+=usr/include/krb5-types.h +OLD_FILES+=usr/include/krb5-v4compat.h OLD_FILES+=usr/include/krb5.h +OLD_FILES+=usr/include/krb5_asn1.h OLD_FILES+=usr/include/krb5_err.h -OLD_FILES+=usr/include/roken.h +OLD_FILES+=usr/include/krb_err.h +OLD_FILES+=usr/include/kx509_asn1.h +OLD_FILES+=usr/include/ocsp_asn1.h +OLD_FILES+=usr/include/pkcs10_asn1.h +OLD_FILES+=usr/include/pkcs12_asn1.h +OLD_FILES+=usr/include/pkcs8_asn1.h +OLD_FILES+=usr/include/pkcs9_asn1.h +OLD_FILES+=usr/include/pkinit_asn1.h +OLD_FILES+=usr/include/rfc2459_asn1.h OLD_FILES+=usr/include/roken-common.h -OLD_FILES+=usr/lib/pam_krb5.so.3 -OLD_FILES+=usr/lib/pam_krb5.so -OLD_FILES+=usr/lib/pam_ksu.so.3 -OLD_FILES+=usr/lib/pam_ksu.so +OLD_FILES+=usr/include/roken.h OLD_FILES+=usr/lib/libasn1.a -OLD_FILES+=usr/lib/libasn1_p.a -OLD_FILES+=usr/lib/libasn1.so.8 OLD_FILES+=usr/lib/libasn1.so +OLD_LIBS+=usr/lib/libasn1.so.10 +OLD_FILES+=usr/lib/libasn1_p.a OLD_FILES+=usr/lib/libgssapi_krb5.a -OLD_FILES+=usr/lib/libgssapi_krb5_p.a -OLD_FILES+=usr/lib/libgssapi_krb5.so.8 OLD_FILES+=usr/lib/libgssapi_krb5.so +OLD_LIBS+=usr/lib/libgssapi_krb5.so.10 +OLD_FILES+=usr/lib/libgssapi_krb5_p.a +OLD_FILES+=usr/lib/libgssapi_ntlm.a +OLD_FILES+=usr/lib/libgssapi_ntlm.so +OLD_LIBS+=usr/lib/libgssapi_ntlm.so.10 +OLD_FILES+=usr/lib/libgssapi_ntlm_p.a +OLD_FILES+=usr/lib/libgssapi_spnego.a +OLD_FILES+=usr/lib/libgssapi_spnego.so +OLD_LIBS+=usr/lib/libgssapi_spnego.so.10 +OLD_FILES+=usr/lib/libgssapi_spnego_p.a OLD_FILES+=usr/lib/libhdb.a -OLD_FILES+=usr/lib/libhdb_p.a -OLD_FILES+=usr/lib/libhdb.so.8 OLD_FILES+=usr/lib/libhdb.so +OLD_LIBS+=usr/lib/libhdb.so.10 +OLD_FILES+=usr/lib/libhdb_p.a +OLD_FILES+=usr/lib/libheimntlm.a +OLD_FILES+=usr/lib/libheimntlm.so +OLD_LIBS+=usr/lib/libheimntlm.so.10 +OLD_FILES+=usr/lib/libheimntlm_p.a +OLD_FILES+=usr/lib/libhx509.a +OLD_FILES+=usr/lib/libhx509.so +OLD_LIBS+=usr/lib/libhx509.so.10 +OLD_FILES+=usr/lib/libhx509_p.a OLD_FILES+=usr/lib/libkadm5clnt.a -OLD_FILES+=usr/lib/libkadm5clnt_p.a -OLD_FILES+=usr/lib/libkadm5clnt.so.8 OLD_FILES+=usr/lib/libkadm5clnt.so +OLD_LIBS+=usr/lib/libkadm5clnt.so.10 +OLD_FILES+=usr/lib/libkadm5clnt_p.a OLD_FILES+=usr/lib/libkadm5srv.a -OLD_FILES+=usr/lib/libkadm5srv_p.a -OLD_FILES+=usr/lib/libkadm5srv.so.8 OLD_FILES+=usr/lib/libkadm5srv.so +OLD_LIBS+=usr/lib/libkadm5srv.so.10 +OLD_FILES+=usr/lib/libkadm5srv_p.a OLD_FILES+=usr/lib/libkafs5.a -OLD_FILES+=usr/lib/libkafs5_p.a -OLD_FILES+=usr/lib/libkafs5.so.8 OLD_FILES+=usr/lib/libkafs5.so +OLD_LIBS+=usr/lib/libkafs5.so.10 +OLD_FILES+=usr/lib/libkafs5_p.a OLD_FILES+=usr/lib/libkrb5.a -OLD_FILES+=usr/lib/libkrb5_p.a -OLD_FILES+=usr/lib/libkrb5.so.8 OLD_FILES+=usr/lib/libkrb5.so +OLD_LIBS+=usr/lib/libkrb5.so.10 +OLD_FILES+=usr/lib/libkrb5_p.a OLD_FILES+=usr/lib/libroken.a -OLD_FILES+=usr/lib/libroken_p.a -OLD_FILES+=usr/lib/libroken.so.8 OLD_FILES+=usr/lib/libroken.so -OLD_FILES+=usr/libexec/ipropd-master -OLD_FILES+=usr/libexec/ipropd-slave +OLD_LIBS+=usr/lib/libroken.so.10 +OLD_FILES+=usr/lib/libroken_p.a +OLD_FILES+=usr/lib/pam_krb5.so +OLD_LIBS+=usr/lib/pam_krb5.so.5 +OLD_FILES+=usr/lib/pam_ksu.so +OLD_LIBS+=usr/lib/pam_ksu.so.5 +.if ${TARGET_ARCH} == "amd64" +OLD_FILES+=usr/lib32/libasn1.a +OLD_FILES+=usr/lib32/libasn1.so +OLD_LIBS+=usr/lib32/libasn1.so.10 +OLD_FILES+=usr/lib32/libasn1_p.a +OLD_FILES+=usr/lib32/libgssapi_krb5.a +OLD_FILES+=usr/lib32/libgssapi_krb5.so +OLD_LIBS+=usr/lib32/libgssapi_krb5.so.10 +OLD_FILES+=usr/lib32/libgssapi_krb5_p.a +OLD_FILES+=usr/lib32/libgssapi_ntlm.a +OLD_FILES+=usr/lib32/libgssapi_ntlm.so +OLD_LIBS+=usr/lib32/libgssapi_ntlm.so.10 +OLD_FILES+=usr/lib32/libgssapi_ntlm_p.a +OLD_FILES+=usr/lib32/libgssapi_spnego.a +OLD_FILES+=usr/lib32/libgssapi_spnego.so +OLD_LIBS+=usr/lib32/libgssapi_spnego.so.10 +OLD_FILES+=usr/lib32/libgssapi_spnego_p.a +OLD_FILES+=usr/lib32/libhdb.a +OLD_FILES+=usr/lib32/libhdb.so +OLD_LIBS+=usr/lib32/libhdb.so.10 +OLD_FILES+=usr/lib32/libhdb_p.a +OLD_FILES+=usr/lib32/libheimntlm.a +OLD_FILES+=usr/lib32/libheimntlm.so +OLD_LIBS+=usr/lib32/libheimntlm.so.10 +OLD_FILES+=usr/lib32/libheimntlm_p.a +OLD_FILES+=usr/lib32/libhx509.a +OLD_FILES+=usr/lib32/libhx509.so +OLD_LIBS+=usr/lib32/libhx509.so.10 +OLD_FILES+=usr/lib32/libhx509_p.a +OLD_FILES+=usr/lib32/libkadm5clnt.a +OLD_FILES+=usr/lib32/libkadm5clnt.so +OLD_LIBS+=usr/lib32/libkadm5clnt.so.10 +OLD_FILES+=usr/lib32/libkadm5clnt_p.a +OLD_FILES+=usr/lib32/libkadm5srv.a +OLD_FILES+=usr/lib32/libkadm5srv.so +OLD_LIBS+=usr/lib32/libkadm5srv.so.10 +OLD_FILES+=usr/lib32/libkadm5srv_p.a +OLD_FILES+=usr/lib32/libkafs5.a +OLD_FILES+=usr/lib32/libkafs5.so +OLD_LIBS+=usr/lib32/libkafs5.so.10 +OLD_FILES+=usr/lib32/libkafs5_p.a +OLD_FILES+=usr/lib32/libkrb5.a +OLD_FILES+=usr/lib32/libkrb5.so +OLD_LIBS+=usr/lib32/libkrb5.so.10 +OLD_FILES+=usr/lib32/libkrb5_p.a +OLD_FILES+=usr/lib32/libroken.a +OLD_FILES+=usr/lib32/libroken.so +OLD_LIBS+=usr/lib32/libroken.so.10 +OLD_FILES+=usr/lib32/libroken_p.a +OLD_FILES+=usr/lib32/pam_krb5.so +OLD_LIBS+=usr/lib32/pam_krb5.so.5 +OLD_FILES+=usr/lib32/pam_ksu.so +OLD_LIBS+=usr/lib32/pam_ksu.so.5 +.endif OLD_FILES+=usr/libexec/hprop OLD_FILES+=usr/libexec/hpropd +OLD_FILES+=usr/libexec/ipropd-master +OLD_FILES+=usr/libexec/ipropd-slave OLD_FILES+=usr/libexec/kadmind +OLD_FILES+=usr/libexec/kcm OLD_FILES+=usr/libexec/kdc OLD_FILES+=usr/libexec/kpasswdd OLD_FILES+=usr/sbin/kstash @@ -1132,76 +1224,40 @@ OLD_FILES+=usr/share/man/man1/kinit.1.gz OLD_FILES+=usr/share/man/man1/klist.1.gz OLD_FILES+=usr/share/man/man1/kpasswd.1.gz OLD_FILES+=usr/share/man/man1/krb5-config.1.gz -OLD_FILES+=usr/share/man/man3/kafs5.3.gz OLD_FILES+=usr/share/man/man3/k_afs_cell_of_file.3.gz OLD_FILES+=usr/share/man/man3/k_hasafs.3.gz OLD_FILES+=usr/share/man/man3/k_pioctl.3.gz OLD_FILES+=usr/share/man/man3/k_setpag.3.gz OLD_FILES+=usr/share/man/man3/k_unlog.3.gz OLD_FILES+=usr/share/man/man3/kafs.3.gz +OLD_FILES+=usr/share/man/man3/kafs5.3.gz OLD_FILES+=usr/share/man/man3/kafs_set_verbose.3.gz OLD_FILES+=usr/share/man/man3/kafs_settoken.3.gz OLD_FILES+=usr/share/man/man3/kafs_settoken5.3.gz OLD_FILES+=usr/share/man/man3/kafs_settoken_rxkad.3.gz -OLD_FILES+=usr/share/man/man3/krb5_afslog.3.gz -OLD_FILES+=usr/share/man/man3/krb5_afslog_uid.3.gz -OLD_FILES+=usr/share/man/man3/krb_afslog.3.gz -OLD_FILES+=usr/share/man/man3/krb_afslog_uid.3.gz OLD_FILES+=usr/share/man/man3/krb5.3.gz +OLD_FILES+=usr/share/man/man3/krb524_convert_creds_kdc.3.gz OLD_FILES+=usr/share/man/man3/krb5_425_conv_principal.3.gz -OLD_FILES+=usr/share/man/man3/krb5_address.3.gz -OLD_FILES+=usr/share/man/man3/krb5_aname_to_localname.3.gz -OLD_FILES+=usr/share/man/man3/krb5_appdefault.3.gz -OLD_FILES+=usr/share/man/man3/krb5_auth_context.3.gz -OLD_FILES+=usr/share/man/man3/krb5_build_principal.3.gz -OLD_FILES+=usr/share/man/man3/krb5_ccache.3.gz -OLD_FILES+=usr/share/man/man3/krb5_config.3.gz -OLD_FILES+=usr/share/man/man3/krb5_context.3.gz -OLD_FILES+=usr/share/man/man3/krb5_create_checksum.3.gz -OLD_FILES+=usr/share/man/man3/krb5_crypto_init.3.gz -OLD_FILES+=usr/share/man/man3/krb5_data.3.gz -OLD_FILES+=usr/share/man/man3/krb5_encrypt.3.gz -OLD_FILES+=usr/share/man/man3/krb5_free_addresses.3.gz -OLD_FILES+=usr/share/man/man3/krb5_free_principal.3.gz -OLD_FILES+=usr/share/man/man3/krb5_get_all_client_addrs.3.gz -OLD_FILES+=usr/share/man/man3/krb5_get_krbhst.3.gz -OLD_FILES+=usr/share/man/man3/krb5_init_context.3.gz -OLD_FILES+=usr/share/man/man3/krb5_keytab.3.gz -OLD_FILES+=usr/share/man/man3/krb5_krbhst_init.3.gz -OLD_FILES+=usr/share/man/man3/krb5_kuserok.3.gz -OLD_FILES+=usr/share/man/man3/krb5_openlog.3.gz -OLD_FILES+=usr/share/man/man3/krb5_parse_name.3.gz -OLD_FILES+=usr/share/man/man3/krb5_principal_get_realm.3.gz -OLD_FILES+=usr/share/man/man3/krb5_set_default_realm.3.gz -OLD_FILES+=usr/share/man/man3/krb5_sname_to_principal.3.gz -OLD_FILES+=usr/share/man/man3/krb5_timeofday.3.gz -OLD_FILES+=usr/share/man/man3/krb5_unparse_name.3.gz -OLD_FILES+=usr/share/man/man3/krb5_verify_user.3.gz -OLD_FILES+=usr/share/man/man3/krb5_warn.3.gz OLD_FILES+=usr/share/man/man3/krb5_425_conv_principal_ext.3.gz OLD_FILES+=usr/share/man/man3/krb5_524_conv_principal.3.gz +OLD_FILES+=usr/share/man/man3/krb5_acl_match_file.3.gz +OLD_FILES+=usr/share/man/man3/krb5_addlog_dest.3.gz +OLD_FILES+=usr/share/man/man3/krb5_addlog_func.3.gz OLD_FILES+=usr/share/man/man3/krb5_addr2sockaddr.3.gz +OLD_FILES+=usr/share/man/man3/krb5_address.3.gz OLD_FILES+=usr/share/man/man3/krb5_address_compare.3.gz OLD_FILES+=usr/share/man/man3/krb5_address_order.3.gz OLD_FILES+=usr/share/man/man3/krb5_address_search.3.gz OLD_FILES+=usr/share/man/man3/krb5_addresses.3.gz +OLD_FILES+=usr/share/man/man3/krb5_afslog.3.gz +OLD_FILES+=usr/share/man/man3/krb5_afslog_uid.3.gz +OLD_FILES+=usr/share/man/man3/krb5_aname_to_localname.3.gz OLD_FILES+=usr/share/man/man3/krb5_anyaddr.3.gz -OLD_FILES+=usr/share/man/man3/krb5_append_addresses.3.gz -OLD_FILES+=usr/share/man/man3/krb5_copy_address.3.gz -OLD_FILES+=usr/share/man/man3/krb5_copy_addresses.3.gz -OLD_FILES+=usr/share/man/man3/krb5_free_address.3.gz -OLD_FILES+=usr/share/man/man3/krb5_h_addr2addr.3.gz -OLD_FILES+=usr/share/man/man3/krb5_h_addr2sockaddr.3.gz -OLD_FILES+=usr/share/man/man3/krb5_make_addrport.3.gz -OLD_FILES+=usr/share/man/man3/krb5_max_sockaddr_size.3.gz -OLD_FILES+=usr/share/man/man3/krb5_parse_address.3.gz -OLD_FILES+=usr/share/man/man3/krb5_print_address.3.gz -OLD_FILES+=usr/share/man/man3/krb5_sockaddr2address.3.gz -OLD_FILES+=usr/share/man/man3/krb5_sockaddr2port.3.gz -OLD_FILES+=usr/share/man/man3/krb5_sockaddr_uninteresting.3.gz +OLD_FILES+=usr/share/man/man3/krb5_appdefault.3.gz OLD_FILES+=usr/share/man/man3/krb5_appdefault_boolean.3.gz OLD_FILES+=usr/share/man/man3/krb5_appdefault_string.3.gz OLD_FILES+=usr/share/man/man3/krb5_appdefault_time.3.gz +OLD_FILES+=usr/share/man/man3/krb5_append_addresses.3.gz OLD_FILES+=usr/share/man/man3/krb5_auth_con_free.3.gz OLD_FILES+=usr/share/man/man3/krb5_auth_con_genaddrs.3.gz OLD_FILES+=usr/share/man/man3/krb5_auth_con_getaddrs.3.gz @@ -1212,7 +1268,6 @@ OLD_FILES+=usr/share/man/man3/krb5_auth_ OLD_FILES+=usr/share/man/man3/krb5_auth_con_getremotesubkey.3.gz OLD_FILES+=usr/share/man/man3/krb5_auth_con_getuserkey.3.gz OLD_FILES+=usr/share/man/man3/krb5_auth_con_init.3.gz -OLD_FILES+=usr/share/man/man3/krb5_log.3.gz OLD_FILES+=usr/share/man/man3/krb5_auth_con_initivector.3.gz OLD_FILES+=usr/share/man/man3/krb5_auth_con_setaddrs.3.gz OLD_FILES+=usr/share/man/man3/krb5_auth_con_setaddrs_from_fd.3.gz @@ -1223,6 +1278,7 @@ OLD_FILES+=usr/share/man/man3/krb5_auth_ OLD_FILES+=usr/share/man/man3/krb5_auth_con_setrcache.3.gz OLD_FILES+=usr/share/man/man3/krb5_auth_con_setremotesubkey.3.gz OLD_FILES+=usr/share/man/man3/krb5_auth_con_setuserkey.3.gz +OLD_FILES+=usr/share/man/man3/krb5_auth_context.3.gz OLD_FILES+=usr/share/man/man3/krb5_auth_getauthenticator.3.gz OLD_FILES+=usr/share/man/man3/krb5_auth_getcksumtype.3.gz OLD_FILES+=usr/share/man/man3/krb5_auth_getkeytype.3.gz @@ -1232,10 +1288,11 @@ OLD_FILES+=usr/share/man/man3/krb5_auth_ OLD_FILES+=usr/share/man/man3/krb5_auth_setkeytype.3.gz OLD_FILES+=usr/share/man/man3/krb5_auth_setlocalseqnumber.3.gz OLD_FILES+=usr/share/man/man3/krb5_auth_setremoteseqnumber.3.gz +OLD_FILES+=usr/share/man/man3/krb5_build_principal.3.gz OLD_FILES+=usr/share/man/man3/krb5_build_principal_ext.3.gz OLD_FILES+=usr/share/man/man3/krb5_build_principal_va.3.gz OLD_FILES+=usr/share/man/man3/krb5_build_principal_va_ext.3.gz -OLD_FILES+=usr/share/man/man3/krb5_make_principal.3.gz +OLD_FILES+=usr/share/man/man3/krb5_c_make_checksum.3.gz OLD_FILES+=usr/share/man/man3/krb5_cc_close.3.gz OLD_FILES+=usr/share/man/man3/krb5_cc_copy_cache.3.gz OLD_FILES+=usr/share/man/man3/krb5_cc_cursor.3.gz @@ -1259,36 +1316,84 @@ OLD_FILES+=usr/share/man/man3/krb5_cc_re OLD_FILES+=usr/share/man/man3/krb5_cc_set_default_name.3.gz OLD_FILES+=usr/share/man/man3/krb5_cc_set_flags.3.gz OLD_FILES+=usr/share/man/man3/krb5_cc_store_cred.3.gz -OLD_FILES+=usr/share/man/man3/krb5_fcc_ops.3.gz -OLD_FILES+=usr/share/man/man3/krb5_mcc_ops.3.gz +OLD_FILES+=usr/share/man/man3/krb5_ccache.3.gz +OLD_FILES+=usr/share/man/man3/krb5_check_transited.3.gz +OLD_FILES+=usr/share/man/man3/krb5_checksum_is_collision_proof.3.gz +OLD_FILES+=usr/share/man/man3/krb5_checksum_is_keyed.3.gz +OLD_FILES+=usr/share/man/man3/krb5_checksumsize.3.gz +OLD_FILES+=usr/share/man/man3/krb5_closelog.3.gz +OLD_FILES+=usr/share/man/man3/krb5_compare_creds.3.gz +OLD_FILES+=usr/share/man/man3/krb5_config.3.gz OLD_FILES+=usr/share/man/man3/krb5_config_get_bool_default.3.gz OLD_FILES+=usr/share/man/man3/krb5_config_get_int_default.3.gz OLD_FILES+=usr/share/man/man3/krb5_config_get_string_default.3.gz OLD_FILES+=usr/share/man/man3/krb5_config_get_time_default.3.gz -OLD_FILES+=usr/share/man/man3/krb5_checksum_is_collision_proof.3.gz -OLD_FILES+=usr/share/man/man3/krb5_checksum_is_keyed.3.gz -OLD_FILES+=usr/share/man/man3/krb5_vlog.3.gz -OLD_FILES+=usr/share/man/man3/krb5_checksumsize.3.gz -OLD_FILES+=usr/share/man/man3/krb5_verify_checksum.3.gz -OLD_FILES+=usr/share/man/man3/krb5_crypto_destroy.3.gz +OLD_FILES+=usr/share/man/man3/krb5_context.3.gz +OLD_FILES+=usr/share/man/man3/krb5_copy_address.3.gz +OLD_FILES+=usr/share/man/man3/krb5_copy_addresses.3.gz OLD_FILES+=usr/share/man/man3/krb5_copy_data.3.gz +OLD_FILES+=usr/share/man/man3/krb5_copy_principal.3.gz +OLD_FILES+=usr/share/man/man3/krb5_create_checksum.3.gz +OLD_FILES+=usr/share/man/man3/krb5_creds.3.gz +OLD_FILES+=usr/share/man/man3/krb5_crypto_destroy.3.gz +OLD_FILES+=usr/share/man/man3/krb5_crypto_init.3.gz +OLD_FILES+=usr/share/man/man3/krb5_data.3.gz OLD_FILES+=usr/share/man/man3/krb5_data_alloc.3.gz OLD_FILES+=usr/share/man/man3/krb5_data_copy.3.gz OLD_FILES+=usr/share/man/man3/krb5_data_free.3.gz OLD_FILES+=usr/share/man/man3/krb5_data_realloc.3.gz OLD_FILES+=usr/share/man/man3/krb5_data_zero.3.gz -OLD_FILES+=usr/share/man/man3/krb5_free_data.3.gz -OLD_FILES+=usr/share/man/man3/krb5_free_data_contents.3.gz OLD_FILES+=usr/share/man/man3/krb5_decrypt.3.gz OLD_FILES+=usr/share/man/man3/krb5_decrypt_EncryptedData.3.gz +OLD_FILES+=usr/share/man/man3/krb5_digest.3.gz +OLD_FILES+=usr/share/man/man3/krb5_eai_to_heim_errno.3.gz +OLD_FILES+=usr/share/man/man3/krb5_encrypt.3.gz OLD_FILES+=usr/share/man/man3/krb5_encrypt_EncryptedData.3.gz -OLD_FILES+=usr/share/man/man3/krb5_get_all_server_addrs.3.gz +OLD_FILES+=usr/share/man/man3/krb5_err.3.gz +OLD_FILES+=usr/share/man/man3/krb5_errx.3.gz +OLD_FILES+=usr/share/man/man3/krb5_expand_hostname.3.gz +OLD_FILES+=usr/share/man/man3/krb5_fcc_ops.3.gz +OLD_FILES+=usr/share/man/man3/krb5_find_padata.3.gz +OLD_FILES+=usr/share/man/man3/krb5_free_address.3.gz +OLD_FILES+=usr/share/man/man3/krb5_free_addresses.3.gz +OLD_FILES+=usr/share/man/man3/krb5_free_context.3.gz +OLD_FILES+=usr/share/man/man3/krb5_free_data.3.gz +OLD_FILES+=usr/share/man/man3/krb5_free_data_contents.3.gz +OLD_FILES+=usr/share/man/man3/krb5_free_host_realm.3.gz OLD_FILES+=usr/share/man/man3/krb5_free_krbhst.3.gz +OLD_FILES+=usr/share/man/man3/krb5_free_principal.3.gz +OLD_FILES+=usr/share/man/man3/krb5_generate_random_block.3.gz +OLD_FILES+=usr/share/man/man3/krb5_get_all_client_addrs.3.gz +OLD_FILES+=usr/share/man/man3/krb5_get_all_server_addrs.3.gz +OLD_FILES+=usr/share/man/man3/krb5_get_credentials.3.gz +OLD_FILES+=usr/share/man/man3/krb5_get_creds.3.gz +OLD_FILES+=usr/share/man/man3/krb5_get_default_principal.3.gz +OLD_FILES+=usr/share/man/man3/krb5_get_default_realm.3.gz +OLD_FILES+=usr/share/man/man3/krb5_get_default_realms.3.gz +OLD_FILES+=usr/share/man/man3/krb5_get_forwarded_creds.3.gz +OLD_FILES+=usr/share/man/man3/krb5_get_host_realm.3.gz +OLD_FILES+=usr/share/man/man3/krb5_get_in_cred.3.gz +OLD_FILES+=usr/share/man/man3/krb5_get_init_creds.3.gz OLD_FILES+=usr/share/man/man3/krb5_get_krb524hst.3.gz OLD_FILES+=usr/share/man/man3/krb5_get_krb_admin_hst.3.gz OLD_FILES+=usr/share/man/man3/krb5_get_krb_changepw_hst.3.gz -OLD_FILES+=usr/share/man/man3/krb5_free_context.3.gz +OLD_FILES+=usr/share/man/man3/krb5_get_krbhst.3.gz +OLD_FILES+=usr/share/man/man3/krb5_getportbyname.3.gz +OLD_FILES+=usr/share/man/man3/krb5_h_addr2addr.3.gz +OLD_FILES+=usr/share/man/man3/krb5_h_addr2sockaddr.3.gz +OLD_FILES+=usr/share/man/man3/krb5_init_context.3.gz +OLD_FILES+=usr/share/man/man3/krb5_initlog.3.gz +OLD_FILES+=usr/share/man/man3/krb5_is_thread_safe.3.gz +OLD_FILES+=usr/share/man/man3/krb5_keyblock.3.gz +OLD_FILES+=usr/share/man/man3/krb5_keytab.3.gz OLD_FILES+=usr/share/man/man3/krb5_keytab_entry.3.gz +OLD_FILES+=usr/share/man/man3/krb5_krbhst_format_string.3.gz +OLD_FILES+=usr/share/man/man3/krb5_krbhst_free.3.gz +OLD_FILES+=usr/share/man/man3/krb5_krbhst_get_addrinfo.3.gz +OLD_FILES+=usr/share/man/man3/krb5_krbhst_init.3.gz +OLD_FILES+=usr/share/man/man3/krb5_krbhst_next.3.gz +OLD_FILES+=usr/share/man/man3/krb5_krbhst_next_as_string.3.gz +OLD_FILES+=usr/share/man/man3/krb5_krbhst_reset.3.gz OLD_FILES+=usr/share/man/man3/krb5_kt_add_entry.3.gz OLD_FILES+=usr/share/man/man3/krb5_kt_close.3.gz OLD_FILES+=usr/share/man/man3/krb5_kt_compare.3.gz @@ -1308,53 +1413,88 @@ OLD_FILES+=usr/share/man/man3/krb5_kt_re OLD_FILES+=usr/share/man/man3/krb5_kt_remove_entry.3.gz OLD_FILES+=usr/share/man/man3/krb5_kt_resolve.3.gz OLD_FILES+=usr/share/man/man3/krb5_kt_start_seq_get.3.gz -OLD_FILES+=usr/share/man/man3/krb5_krbhst_format_string.3.gz -OLD_FILES+=usr/share/man/man3/krb5_krbhst_free.3.gz -OLD_FILES+=usr/share/man/man3/krb5_krbhst_get_addrinfo.3.gz -OLD_FILES+=usr/share/man/man3/krb5_krbhst_next.3.gz -OLD_FILES+=usr/share/man/man3/krb5_krbhst_reset.3.gz -OLD_FILES+=usr/share/man/man3/krb5_krbhst_next_as_string.3.gz -OLD_FILES+=usr/share/man/man3/krb5_addlog_dest.3.gz -OLD_FILES+=usr/share/man/man3/krb5_addlog_func.3.gz -OLD_FILES+=usr/share/man/man3/krb5_closelog.3.gz -OLD_FILES+=usr/share/man/man3/krb5_initlog.3.gz +OLD_FILES+=usr/share/man/man3/krb5_kuserok.3.gz +OLD_FILES+=usr/share/man/man3/krb5_log.3.gz OLD_FILES+=usr/share/man/man3/krb5_log_msg.3.gz -OLD_FILES+=usr/share/man/man3/krb5_vlog_msg.3.gz +OLD_FILES+=usr/share/man/man3/krb5_make_addrport.3.gz +OLD_FILES+=usr/share/man/man3/krb5_make_principal.3.gz +OLD_FILES+=usr/share/man/man3/krb5_max_sockaddr_size.3.gz +OLD_FILES+=usr/share/man/man3/krb5_mcc_ops.3.gz +OLD_FILES+=usr/share/man/man3/krb5_mk_req.3.gz +OLD_FILES+=usr/share/man/man3/krb5_mk_safe.3.gz +OLD_FILES+=usr/share/man/man3/krb5_openlog.3.gz +OLD_FILES+=usr/share/man/man3/krb5_parse_address.3.gz +OLD_FILES+=usr/share/man/man3/krb5_parse_name.3.gz +OLD_FILES+=usr/share/man/man3/krb5_parse_name_flags.3.gz +OLD_FILES+=usr/share/man/man3/krb5_parse_nametype.3.gz +OLD_FILES+=usr/share/man/man3/krb5_princ_realm.3.gz +OLD_FILES+=usr/share/man/man3/krb5_princ_set_realm.3.gz +OLD_FILES+=usr/share/man/man3/krb5_principal.3.gz +OLD_FILES+=usr/share/man/man3/krb5_principal_compare.3.gz +OLD_FILES+=usr/share/man/man3/krb5_principal_compare_any_realm.3.gz OLD_FILES+=usr/share/man/man3/krb5_principal_get_comp_string.3.gz -OLD_FILES+=usr/share/man/man3/krb5_free_host_realm.3.gz -OLD_FILES+=usr/share/man/man3/krb5_get_default_realm.3.gz -OLD_FILES+=usr/share/man/man3/krb5_get_default_realms.3.gz -OLD_FILES+=usr/share/man/man3/krb5_get_host_realm.3.gz +OLD_FILES+=usr/share/man/man3/krb5_principal_get_realm.3.gz +OLD_FILES+=usr/share/man/man3/krb5_principal_get_type.3.gz +OLD_FILES+=usr/share/man/man3/krb5_principal_match.3.gz +OLD_FILES+=usr/share/man/man3/krb5_principal_set_type.3.gz +OLD_FILES+=usr/share/man/man3/krb5_print_address.3.gz +OLD_FILES+=usr/share/man/man3/krb5_rcache.3.gz +OLD_FILES+=usr/share/man/man3/krb5_rd_error.3.gz +OLD_FILES+=usr/share/man/man3/krb5_rd_safe.3.gz +OLD_FILES+=usr/share/man/man3/krb5_realm_compare.3.gz +OLD_FILES+=usr/share/man/man3/krb5_set_default_realm.3.gz +OLD_FILES+=usr/share/man/man3/krb5_set_password.3.gz +OLD_FILES+=usr/share/man/man3/krb5_set_warn_dest.3.gz +OLD_FILES+=usr/share/man/man3/krb5_sname_to_principal.3.gz OLD_FILES+=usr/share/man/man3/krb5_sock_to_principal.3.gz +OLD_FILES+=usr/share/man/man3/krb5_sockaddr2address.3.gz +OLD_FILES+=usr/share/man/man3/krb5_sockaddr2port.3.gz +OLD_FILES+=usr/share/man/man3/krb5_sockaddr_uninteresting.3.gz +OLD_FILES+=usr/share/man/man3/krb5_storage.3.gz +OLD_FILES+=usr/share/man/man3/krb5_string_to_key.3.gz +OLD_FILES+=usr/share/man/man3/krb5_ticket.3.gz +OLD_FILES+=usr/share/man/man3/krb5_timeofday.3.gz +OLD_FILES+=usr/share/man/man3/krb5_unparse_name.3.gz +OLD_FILES+=usr/share/man/man3/krb5_unparse_name_fixed.3.gz +OLD_FILES+=usr/share/man/man3/krb5_unparse_name_fixed_flags.3.gz +OLD_FILES+=usr/share/man/man3/krb5_unparse_name_fixed_short.3.gz +OLD_FILES+=usr/share/man/man3/krb5_unparse_name_flags.3.gz +OLD_FILES+=usr/share/man/man3/krb5_unparse_name_short.3.gz OLD_FILES+=usr/share/man/man3/krb5_us_timeofday.3.gz +OLD_FILES+=usr/share/man/man3/krb5_verify_checksum.3.gz +OLD_FILES+=usr/share/man/man3/krb5_verify_init_creds.3.gz OLD_FILES+=usr/share/man/man3/krb5_verify_opt_init.3.gz OLD_FILES+=usr/share/man/man3/krb5_verify_opt_set_flags.3.gz OLD_FILES+=usr/share/man/man3/krb5_verify_opt_set_keytab.3.gz OLD_FILES+=usr/share/man/man3/krb5_verify_opt_set_secure.3.gz OLD_FILES+=usr/share/man/man3/krb5_verify_opt_set_service.3.gz +OLD_FILES+=usr/share/man/man3/krb5_verify_user.3.gz OLD_FILES+=usr/share/man/man3/krb5_verify_user_lrealm.3.gz OLD_FILES+=usr/share/man/man3/krb5_verify_user_opt.3.gz -OLD_FILES+=usr/share/man/man3/krb5_err.3.gz -OLD_FILES+=usr/share/man/man3/krb5_errx.3.gz -OLD_FILES+=usr/share/man/man3/krb5_set_warn_dest.3.gz OLD_FILES+=usr/share/man/man3/krb5_verr.3.gz OLD_FILES+=usr/share/man/man3/krb5_verrx.3.gz +OLD_FILES+=usr/share/man/man3/krb5_vlog.3.gz +OLD_FILES+=usr/share/man/man3/krb5_vlog_msg.3.gz OLD_FILES+=usr/share/man/man3/krb5_vwarn.3.gz OLD_FILES+=usr/share/man/man3/krb5_vwarnx.3.gz +OLD_FILES+=usr/share/man/man3/krb5_warn.3.gz OLD_FILES+=usr/share/man/man3/krb5_warnx.3.gz +OLD_FILES+=usr/share/man/man3/krb_afslog.3.gz +OLD_FILES+=usr/share/man/man3/krb_afslog_uid.3.gz OLD_FILES+=usr/share/man/man5/krb5.conf.5.gz -OLD_FILES+=usr/share/man/man8/pam_krb5.8.gz -OLD_FILES+=usr/share/man/man8/pam_ksu.8.gz -OLD_FILES+=usr/share/man/man8/kerberos.8.gz OLD_FILES+=usr/share/man/man8/hprop.8.gz OLD_FILES+=usr/share/man/man8/hpropd.8.gz +OLD_FILES+=usr/share/man/man8/kadmin.8.gz OLD_FILES+=usr/share/man/man8/kadmind.8.gz +OLD_FILES+=usr/share/man/man8/kcm.8.gz OLD_FILES+=usr/share/man/man8/kdc.8.gz +OLD_FILES+=usr/share/man/man8/kerberos.8.gz OLD_FILES+=usr/share/man/man8/kpasswdd.8.gz -OLD_FILES+=usr/share/man/man8/kadmin.8.gz -OLD_FILES+=usr/share/man/man8/verify_krb5_conf.8.gz OLD_FILES+=usr/share/man/man8/kstash.8.gz OLD_FILES+=usr/share/man/man8/ktutil.8.gz +OLD_FILES+=usr/share/man/man8/pam_krb5.8.gz +OLD_FILES+=usr/share/man/man8/pam_ksu.8.gz +OLD_FILES+=usr/share/man/man8/verify_krb5_conf.8.gz .endif #.if ${MK_LIB32} == no From owner-svn-src-all@FreeBSD.ORG Sat Feb 6 20:27:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF7EF106566C; Sat, 6 Feb 2010 20:27:36 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9B4138FC16; Sat, 6 Feb 2010 20:27:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o16KRaOb030406; Sat, 6 Feb 2010 20:27:36 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o16KRach030399; Sat, 6 Feb 2010 20:27:36 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <201002062027.o16KRach030399@svn.freebsd.org> From: Tim Kientzle Date: Sat, 6 Feb 2010 20:27:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203568 - head/usr.bin/tar X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Feb 2010 20:27:36 -0000 Author: kientzle Date: Sat Feb 6 20:27:36 2010 New Revision: 203568 URL: http://svn.freebsd.org/changeset/base/203568 Log: Refactor the siginfo/sigusr1 handling. The read/write reporting is sufficiently different that it was simpler to just put separate reporting functions into read.c and write.c rather than try to have a single all-purpose reporting function. Switch to a custom function for converting int64_t to a string; in the portable version, this saves a lot of configuration headaches trying to decipher the platform printf(). Deleted: head/usr.bin/tar/siginfo.c Modified: head/usr.bin/tar/Makefile head/usr.bin/tar/bsdtar.c head/usr.bin/tar/bsdtar.h head/usr.bin/tar/read.c head/usr.bin/tar/util.c head/usr.bin/tar/write.c Modified: head/usr.bin/tar/Makefile ============================================================================== --- head/usr.bin/tar/Makefile Sat Feb 6 20:21:03 2010 (r203567) +++ head/usr.bin/tar/Makefile Sat Feb 6 20:27:36 2010 (r203568) @@ -9,7 +9,6 @@ SRCS= bsdtar.c \ getdate.c \ matching.c \ read.c \ - siginfo.c \ subst.c \ tree.c \ util.c \ Modified: head/usr.bin/tar/bsdtar.c ============================================================================== --- head/usr.bin/tar/bsdtar.c Sat Feb 6 20:21:03 2010 (r203567) +++ head/usr.bin/tar/bsdtar.c Sat Feb 6 20:27:36 2010 (r203568) @@ -47,6 +47,9 @@ __FBSDID("$FreeBSD$"); #ifdef HAVE_PATHS_H #include #endif +#ifdef HAVE_SIGNAL_H +#include +#endif #include #ifdef HAVE_STDLIB_H #include @@ -82,7 +85,32 @@ __FBSDID("$FreeBSD$"); #define _PATH_DEFTAPE "/dev/tape" #endif -/* External function to parse a date/time string (from getdate.y) */ +#if defined(HAVE_SIGACTION) && (defined(SIGINFO) || defined(SIGUSR1)) +static volatile int siginfo_occurred; + +static void +siginfo_handler(int sig) +{ + (void)sig; /* UNUSED */ + siginfo_occurred = 1; +} + +int +need_report(void) +{ + int r = siginfo_occurred; + siginfo_occurred = 0; + return (r); +} +#else +int +need_report(void) +{ + return (0); +} +#endif + +/* External function to parse a date/time string */ time_t get_date(time_t, const char *); static void long_help(void); @@ -114,11 +142,23 @@ main(int argc, char **argv) memset(bsdtar, 0, sizeof(*bsdtar)); bsdtar->fd = -1; /* Mark as "unused" */ option_o = 0; -#if defined(_WIN32) && !defined(__CYGWIN__) - /* Make sure open() function will be used with a binary mode. */ - /* on cygwin, we need something similar, but instead link against */ - /* a special startup object, binmode.o */ - _set_fmode(_O_BINARY); + +#if defined(HAVE_SIGACTION) && (defined(SIGINFO) || defined(SIGUSR1)) + { /* Catch SIGINFO and SIGUSR1, if they exist. */ + struct sigaction sa; + sa.sa_handler = siginfo_handler; + sigemptyset(&sa.sa_mask); + sa.sa_flags = 0; +#ifdef SIGINFO + if (sigaction(SIGINFO, &sa, NULL)) + bsdtar_errc(1, errno, "sigaction(SIGINFO) failed"); +#endif +#ifdef SIGUSR1 + /* ... and treat SIGUSR1 the same way as SIGINFO. */ + if (sigaction(SIGUSR1, &sa, NULL)) + bsdtar_errc(1, errno, "sigaction(SIGUSR1) failed"); +#endif + } #endif /* Need bsdtar_progname before calling bsdtar_warnc. */ Modified: head/usr.bin/tar/bsdtar.h ============================================================================== --- head/usr.bin/tar/bsdtar.h Sat Feb 6 20:21:03 2010 (r203567) +++ head/usr.bin/tar/bsdtar.h Sat Feb 6 20:27:36 2010 (r203568) @@ -142,16 +142,13 @@ int exclude_from_file(struct bsdtar *, c int excluded(struct bsdtar *, const char *pathname); int include(struct bsdtar *, const char *pattern); int include_from_file(struct bsdtar *, const char *pathname); +int need_report(void); int pathcmp(const char *a, const char *b); int process_lines(struct bsdtar *bsdtar, const char *pathname, int (*process)(struct bsdtar *, const char *)); void safe_fprintf(FILE *, const char *fmt, ...); void set_chdir(struct bsdtar *, const char *newdir); -void siginfo_init(struct bsdtar *); -void siginfo_setinfo(struct bsdtar *, const char * oper, - const char * path, int64_t size); -void siginfo_printinfo(struct bsdtar *, off_t progress); -void siginfo_done(struct bsdtar *); +const char *tar_i64toa(int64_t); void tar_mode_c(struct bsdtar *bsdtar); void tar_mode_r(struct bsdtar *bsdtar); void tar_mode_t(struct bsdtar *bsdtar); Modified: head/usr.bin/tar/read.c ============================================================================== --- head/usr.bin/tar/read.c Sat Feb 6 20:21:03 2010 (r203567) +++ head/usr.bin/tar/read.c Sat Feb 6 20:27:36 2010 (r203568) @@ -70,6 +70,12 @@ __FBSDID("$FreeBSD$"); #include "bsdtar.h" #include "err.h" +struct progress_data { + struct bsdtar *bsdtar; + struct archive *archive; + struct archive_entry *entry; +}; + static void list_item_verbose(struct bsdtar *, FILE *, struct archive_entry *); static void read_archive(struct bsdtar *bsdtar, char mode); @@ -84,22 +90,40 @@ tar_mode_t(struct bsdtar *bsdtar) void tar_mode_x(struct bsdtar *bsdtar) { - /* We want to catch SIGINFO and SIGUSR1. */ - siginfo_init(bsdtar); - read_archive(bsdtar, 'x'); unmatched_inclusions_warn(bsdtar, "Not found in archive"); - /* Restore old SIGINFO + SIGUSR1 handlers. */ - siginfo_done(bsdtar); } static void -progress_func(void * cookie) +progress_func(void *cookie) { - struct bsdtar * bsdtar = cookie; - - siginfo_printinfo(bsdtar, 0); + struct progress_data *progress_data = cookie; + struct bsdtar *bsdtar = progress_data->bsdtar; + struct archive *a = progress_data->archive; + struct archive_entry *entry = progress_data->entry; + uint64_t comp, uncomp; + + if (!need_report()) + return; + + if (bsdtar->verbose) + fprintf(stderr, "\n"); + if (a != NULL) { + comp = archive_position_compressed(a); + uncomp = archive_position_uncompressed(a); + fprintf(stderr, + "In: %s bytes, compression %d%%;", + tar_i64toa(comp), (int)((uncomp - comp) * 100 / uncomp)); + fprintf(stderr, " Out: %d files, %s bytes\n", + archive_file_count(a), tar_i64toa(uncomp)); + } + if (entry != NULL) { + safe_fprintf(stderr, "Current: %s", + archive_entry_pathname(entry)); + fprintf(stderr, " (%s bytes)\n", + tar_i64toa(archive_entry_size(entry))); + } } /* @@ -108,6 +132,7 @@ progress_func(void * cookie) static void read_archive(struct bsdtar *bsdtar, char mode) { + struct progress_data progress_data; FILE *out; struct archive *a; struct archive_entry *entry; @@ -140,8 +165,10 @@ read_archive(struct bsdtar *bsdtar, char if (mode == 'x') { /* Set an extract callback so that we can handle SIGINFO. */ + progress_data.bsdtar = bsdtar; + progress_data.archive = a; archive_read_extract_set_progress_callback(a, progress_func, - bsdtar); + &progress_data); } if (mode == 'x' && bsdtar->option_chroot) { @@ -161,6 +188,7 @@ read_archive(struct bsdtar *bsdtar, char break; r = archive_read_next_header(a, &entry); + progress_data.entry = entry; if (r == ARCHIVE_EOF) break; if (r < ARCHIVE_OK) @@ -268,10 +296,7 @@ read_archive(struct bsdtar *bsdtar, char fflush(stderr); } - /* Tell the SIGINFO-handler code what we're doing. */ - siginfo_setinfo(bsdtar, "extracting", - archive_entry_pathname(entry), 0); - siginfo_printinfo(bsdtar, 0); + // TODO siginfo_printinfo(bsdtar, 0); if (bsdtar->option_stdout) r = archive_read_data_into_fd(a, 1); Modified: head/usr.bin/tar/util.c ============================================================================== --- head/usr.bin/tar/util.c Sat Feb 6 20:21:03 2010 (r203567) +++ head/usr.bin/tar/util.c Sat Feb 6 20:27:36 2010 (r203568) @@ -559,6 +559,28 @@ edit_pathname(struct bsdtar *bsdtar, str } /* + * It would be nice to just use printf() for formatting large numbers, + * but the compatibility problems are quite a headache. Hence the + * following simple utility function. + */ +const char * +tar_i64toa(int64_t n0) +{ + static char buff[24]; + int64_t n = n0 < 0 ? -n0 : n0; + char *p = buff + sizeof(buff); + + *--p = '\0'; + do { + *--p = '0' + (int)(n % 10); + n /= 10; + } while (n > 0); + if (n0 < 0) + *--p = '-'; + return p; +} + +/* * Like strcmp(), but try to be a little more aware of the fact that * we're comparing two paths. Right now, it just handles leading * "./" and trailing '/' specially, so that "a/b/" == "./a/b" Modified: head/usr.bin/tar/write.c ============================================================================== --- head/usr.bin/tar/write.c Sat Feb 6 20:21:03 2010 (r203567) +++ head/usr.bin/tar/write.c Sat Feb 6 20:27:36 2010 (r203568) @@ -127,10 +127,12 @@ static void archive_names_from_file(st struct archive *a); static int archive_names_from_file_helper(struct bsdtar *bsdtar, const char *line); -static int copy_file_data(struct bsdtar *bsdtar, - struct archive *a, struct archive *ina); +static int copy_file_data(struct bsdtar *, struct archive *a, + struct archive *ina, struct archive_entry *); static int new_enough(struct bsdtar *, const char *path, const struct stat *); +static void report_write(struct bsdtar *, struct archive *, + struct archive_entry *, int64_t progress); static void test_for_append(struct bsdtar *); static void write_archive(struct archive *, struct bsdtar *); static void write_entry_backend(struct bsdtar *, struct archive *, @@ -414,9 +416,6 @@ write_archive(struct archive *a, struct const char *arg; struct archive_entry *entry, *sparse_entry; - /* We want to catch SIGINFO and SIGUSR1. */ - siginfo_init(bsdtar); - /* Allocate a buffer for file data. */ if ((bsdtar->buff = malloc(FILEDATABUFLEN)) == NULL) bsdtar_errc(1, 0, "cannot allocate memory"); @@ -488,14 +487,11 @@ cleanup: bsdtar->diskreader = NULL; if (bsdtar->option_totals) { - fprintf(stderr, "Total bytes written: " BSDTAR_FILESIZE_PRINTF "\n", - (BSDTAR_FILESIZE_TYPE)archive_position_compressed(a)); + fprintf(stderr, "Total bytes written: %s\n", + tar_i64toa(archive_position_compressed(a))); } archive_write_finish(a); - - /* Restore old SIGINFO + SIGUSR1 handlers. */ - siginfo_done(bsdtar); } /* @@ -591,10 +587,8 @@ append_archive(struct bsdtar *bsdtar, st if (bsdtar->verbose) safe_fprintf(stderr, "a %s", archive_entry_pathname(in_entry)); - siginfo_setinfo(bsdtar, "copying", - archive_entry_pathname(in_entry), - archive_entry_size(in_entry)); - siginfo_printinfo(bsdtar, 0); + if (need_report()) + report_write(bsdtar, a, in_entry, 0); e = archive_write_header(a, in_entry); if (e != ARCHIVE_OK) { @@ -611,7 +605,7 @@ append_archive(struct bsdtar *bsdtar, st if (e >= ARCHIVE_WARN) { if (archive_entry_size(in_entry) == 0) archive_read_data_skip(ina); - else if (copy_file_data(bsdtar, a, ina)) + else if (copy_file_data(bsdtar, a, ina, in_entry)) exit(1); } @@ -625,7 +619,8 @@ append_archive(struct bsdtar *bsdtar, st /* Helper function to copy data between archives. */ static int -copy_file_data(struct bsdtar *bsdtar, struct archive *a, struct archive *ina) +copy_file_data(struct bsdtar *bsdtar, struct archive *a, + struct archive *ina, struct archive_entry *entry) { ssize_t bytes_read; ssize_t bytes_written; @@ -633,7 +628,8 @@ copy_file_data(struct bsdtar *bsdtar, st bytes_read = archive_read_data(ina, bsdtar->buff, FILEDATABUFLEN); while (bytes_read > 0) { - siginfo_printinfo(bsdtar, progress); + if (need_report()) + report_write(bsdtar, a, entry, progress); bytes_written = archive_write_data(a, bsdtar->buff, bytes_read); @@ -839,14 +835,8 @@ write_hierarchy(struct bsdtar *bsdtar, s if (!S_ISREG(st->st_mode)) archive_entry_set_size(entry, 0); - /* Record what we're doing, for SIGINFO / SIGUSR1. */ - siginfo_setinfo(bsdtar, "adding", - archive_entry_pathname(entry), archive_entry_size(entry)); archive_entry_linkify(bsdtar->resolver, &entry, &spare_entry); - /* Handle SIGINFO / SIGUSR1 request if one was made. */ - siginfo_printinfo(bsdtar, 0); - while (entry != NULL) { write_entry_backend(bsdtar, a, entry); archive_entry_free(entry); @@ -916,6 +906,28 @@ write_entry_backend(struct bsdtar *bsdta close(fd); } +static void +report_write(struct bsdtar *bsdtar, struct archive *a, + struct archive_entry *entry, int64_t progress) +{ + uint64_t comp, uncomp; + if (bsdtar->verbose) + fprintf(stderr, "\n"); + comp = archive_position_compressed(a); + uncomp = archive_position_uncompressed(a); + fprintf(stderr, "In: %d files, %s bytes;", + archive_file_count(a), tar_i64toa(uncomp)); + fprintf(stderr, + " Out: %s bytes, compression %d%%\n", + tar_i64toa(comp), (int)((uncomp - comp) * 100 / uncomp)); + /* Can't have two calls to tar_i64toa() pending, so split the output. */ + safe_fprintf(stderr, "Current: %s (%s", + archive_entry_pathname(entry), + tar_i64toa(progress)); + fprintf(stderr, "/%s bytes)\n", + tar_i64toa(archive_entry_size(entry))); +} + /* Helper function to copy file to archive. */ static int @@ -928,7 +940,8 @@ write_file_data(struct bsdtar *bsdtar, s bytes_read = read(fd, bsdtar->buff, FILEDATABUFLEN); while (bytes_read > 0) { - siginfo_printinfo(bsdtar, progress); + if (need_report()) + report_write(bsdtar, a, entry, progress); bytes_written = archive_write_data(a, bsdtar->buff, bytes_read); From owner-svn-src-all@FreeBSD.ORG Sat Feb 6 20:36:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 525D0106566B; Sat, 6 Feb 2010 20:36:15 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3F24F8FC12; Sat, 6 Feb 2010 20:36:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o16KaF5Z032431; Sat, 6 Feb 2010 20:36:15 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o16KaFCc032427; Sat, 6 Feb 2010 20:36:15 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <201002062036.o16KaFCc032427@svn.freebsd.org> From: Tim Kientzle Date: Sat, 6 Feb 2010 20:36:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203569 - head/usr.bin/tar X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Feb 2010 20:36:15 -0000 Author: kientzle Date: Sat Feb 6 20:36:14 2010 New Revision: 203569 URL: http://svn.freebsd.org/changeset/base/203569 Log: bsdtar doesn't actually know what compression is supported by libarchive and it should not pretend that it does. It should just pass along the user's request and handle an error if it's not supported. Modified: head/usr.bin/tar/bsdtar.c head/usr.bin/tar/write.c Modified: head/usr.bin/tar/bsdtar.c ============================================================================== --- head/usr.bin/tar/bsdtar.c Sat Feb 6 20:27:36 2010 (r203568) +++ head/usr.bin/tar/bsdtar.c Sat Feb 6 20:36:14 2010 (r203569) @@ -299,30 +299,18 @@ main(int argc, char **argv) bsdtar->optarg); break; case 'j': /* GNU tar */ -#if HAVE_LIBBZ2 if (bsdtar->create_compression != '\0') bsdtar_errc(1, 0, "Can't specify both -%c and -%c", opt, bsdtar->create_compression); bsdtar->create_compression = opt; -#else - bsdtar_warnc(0, - "bzip2 compression not supported by this version of bsdtar"); - usage(); -#endif break; case 'J': /* GNU tar 1.21 and later */ -#if HAVE_LIBLZMA if (bsdtar->create_compression != '\0') bsdtar_errc(1, 0, "Can't specify both -%c and -%c", opt, bsdtar->create_compression); bsdtar->create_compression = opt; -#else - bsdtar_warnc(0, - "xz compression not supported by this version of bsdtar"); - usage(); -#endif break; case 'k': /* GNU tar */ bsdtar->extract_flags |= ARCHIVE_EXTRACT_NO_OVERWRITE; @@ -338,17 +326,11 @@ main(int argc, char **argv) bsdtar->option_warn_links = 1; break; case OPTION_LZMA: -#if HAVE_LIBLZMA if (bsdtar->create_compression != '\0') bsdtar_errc(1, 0, "Can't specify both -%c and -%c", opt, bsdtar->create_compression); bsdtar->create_compression = opt; -#else - bsdtar_warnc(0, - "lzma compression not supported by this version of bsdtar"); - usage(); -#endif break; case 'm': /* SUSv2 */ bsdtar->extract_flags &= ~ARCHIVE_EXTRACT_TIME; @@ -510,17 +492,11 @@ main(int argc, char **argv) set_mode(bsdtar, opt); break; case 'y': /* FreeBSD version of GNU tar */ -#if HAVE_LIBBZ2 if (bsdtar->create_compression != '\0') bsdtar_errc(1, 0, "Can't specify both -%c and -%c", opt, bsdtar->create_compression); bsdtar->create_compression = opt; -#else - bsdtar_warnc(0, - "bzip2 compression not supported by this version of bsdtar"); - usage(); -#endif break; case 'Z': /* GNU tar */ if (bsdtar->create_compression != '\0') @@ -530,17 +506,11 @@ main(int argc, char **argv) bsdtar->create_compression = opt; break; case 'z': /* GNU tar, star, many others */ -#if HAVE_LIBZ if (bsdtar->create_compression != '\0') bsdtar_errc(1, 0, "Can't specify both -%c and -%c", opt, bsdtar->create_compression); bsdtar->create_compression = opt; -#else - bsdtar_warnc(0, - "gzip compression not supported by this version of bsdtar"); - usage(); -#endif break; case OPTION_USE_COMPRESS_PROGRAM: bsdtar->compress_program = bsdtar->optarg; Modified: head/usr.bin/tar/write.c ============================================================================== --- head/usr.bin/tar/write.c Sat Feb 6 20:27:36 2010 (r203568) +++ head/usr.bin/tar/write.c Sat Feb 6 20:36:14 2010 (r203569) @@ -185,34 +185,33 @@ tar_mode_c(struct bsdtar *bsdtar) } else { switch (bsdtar->create_compression) { case 0: - archive_write_set_compression_none(a); + r = archive_write_set_compression_none(a); break; -#ifdef HAVE_LIBBZ2 case 'j': case 'y': - archive_write_set_compression_bzip2(a); + r = archive_write_set_compression_bzip2(a); break; -#endif -#ifdef HAVE_LIBLZMA case 'J': - archive_write_set_compression_xz(a); + r = archive_write_set_compression_xz(a); break; case OPTION_LZMA: - archive_write_set_compression_lzma(a); + r = archive_write_set_compression_lzma(a); break; -#endif -#ifdef HAVE_LIBZ case 'z': - archive_write_set_compression_gzip(a); + r = archive_write_set_compression_gzip(a); break; -#endif case 'Z': - archive_write_set_compression_compress(a); + r = archive_write_set_compression_compress(a); break; default: bsdtar_errc(1, 0, "Unrecognized compression option -%c", bsdtar->create_compression); } + if (r != ARCHIVE_OK) { + bsdtar_errc(1, 0, + "Unsupported compression option -%c", + bsdtar->create_compression); + } } if (ARCHIVE_OK != archive_write_set_options(a, bsdtar->option_options)) From owner-svn-src-all@FreeBSD.ORG Sat Feb 6 20:41:26 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1166E1065679; Sat, 6 Feb 2010 20:41:26 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F22C88FC18; Sat, 6 Feb 2010 20:41:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o16KfPAA033614; Sat, 6 Feb 2010 20:41:25 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o16KfPvO033611; Sat, 6 Feb 2010 20:41:25 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <201002062041.o16KfPvO033611@svn.freebsd.org> From: Tim Kientzle Date: Sat, 6 Feb 2010 20:41:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203571 - head/usr.bin/tar X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Feb 2010 20:41:26 -0000 Author: kientzle Date: Sat Feb 6 20:41:25 2010 New Revision: 203571 URL: http://svn.freebsd.org/changeset/base/203571 Log: Fill in some missing error handling, be a little more careful about error reporting, prefer int64_t to off_t. Modified: head/usr.bin/tar/read.c head/usr.bin/tar/write.c Modified: head/usr.bin/tar/read.c ============================================================================== --- head/usr.bin/tar/read.c Sat Feb 6 20:40:47 2010 (r203570) +++ head/usr.bin/tar/read.c Sat Feb 6 20:41:25 2010 (r203571) @@ -154,7 +154,7 @@ read_archive(struct bsdtar *bsdtar, char archive_read_support_compression_all(a); archive_read_support_format_all(a); if (ARCHIVE_OK != archive_read_set_options(a, bsdtar->option_options)) - bsdtar_errc(1, 0, archive_error_string(a)); + bsdtar_errc(1, 0, "%s", archive_error_string(a)); if (archive_read_open_file(a, bsdtar->filename, bsdtar->bytes_per_block != 0 ? bsdtar->bytes_per_block : DEFAULT_BYTES_PER_BLOCK)) Modified: head/usr.bin/tar/write.c ============================================================================== --- head/usr.bin/tar/write.c Sat Feb 6 20:40:47 2010 (r203570) +++ head/usr.bin/tar/write.c Sat Feb 6 20:41:25 2010 (r203571) @@ -215,9 +215,9 @@ tar_mode_c(struct bsdtar *bsdtar) } if (ARCHIVE_OK != archive_write_set_options(a, bsdtar->option_options)) - bsdtar_errc(1, 0, archive_error_string(a)); + bsdtar_errc(1, 0, "%s", archive_error_string(a)); if (ARCHIVE_OK != archive_write_open_file(a, bsdtar->filename)) - bsdtar_errc(1, 0, archive_error_string(a)); + bsdtar_errc(1, 0, "%s", archive_error_string(a)); write_archive(a, bsdtar); } @@ -228,7 +228,7 @@ tar_mode_c(struct bsdtar *bsdtar) void tar_mode_r(struct bsdtar *bsdtar) { - off_t end_offset; + int64_t end_offset; int format; struct archive *a; struct archive_entry *entry; @@ -302,11 +302,12 @@ tar_mode_r(struct bsdtar *bsdtar) format = ARCHIVE_FORMAT_TAR_PAX_RESTRICTED; archive_write_set_format(a, format); } - lseek(bsdtar->fd, end_offset, SEEK_SET); /* XXX check return val XXX */ + if (lseek(bsdtar->fd, end_offset, SEEK_SET) < 0) + bsdtar_errc(1, errno, "Could not seek to archive end"); if (ARCHIVE_OK != archive_write_set_options(a, bsdtar->option_options)) - bsdtar_errc(1, 0, archive_error_string(a)); + bsdtar_errc(1, 0, "%s", archive_error_string(a)); if (ARCHIVE_OK != archive_write_open_fd(a, bsdtar->fd)) - bsdtar_errc(1, 0, archive_error_string(a)); + bsdtar_errc(1, 0, "%s", archive_error_string(a)); write_archive(a, bsdtar); /* XXX check return val XXX */ @@ -317,7 +318,7 @@ tar_mode_r(struct bsdtar *bsdtar) void tar_mode_u(struct bsdtar *bsdtar) { - off_t end_offset; + int64_t end_offset; struct archive *a; struct archive_entry *entry; int format; @@ -384,12 +385,12 @@ tar_mode_u(struct bsdtar *bsdtar) bsdtar->bytes_per_block); } else archive_write_set_bytes_per_block(a, DEFAULT_BYTES_PER_BLOCK); - lseek(bsdtar->fd, end_offset, SEEK_SET); - ftruncate(bsdtar->fd, end_offset); + if (lseek(bsdtar->fd, end_offset, SEEK_SET) < 0) + bsdtar_errc(1, errno, "Could not seek to archive end"); if (ARCHIVE_OK != archive_write_set_options(a, bsdtar->option_options)) - bsdtar_errc(1, 0, archive_error_string(a)); + bsdtar_errc(1, 0, "%s", archive_error_string(a)); if (ARCHIVE_OK != archive_write_open_fd(a, bsdtar->fd)) - bsdtar_errc(1, 0, archive_error_string(a)); + bsdtar_errc(1, 0, "%s", archive_error_string(a)); write_archive(a, bsdtar); @@ -438,7 +439,7 @@ write_archive(struct archive *a, struct bsdtar->argv++; arg = *bsdtar->argv; if (arg == NULL) { - bsdtar_warnc(1, 0, + bsdtar_warnc(0, "%s", "Missing argument for -C"); bsdtar->return_value = 1; goto cleanup; @@ -558,7 +559,7 @@ append_archive_filename(struct bsdtar *b rc = append_archive(bsdtar, a, ina); - if (archive_errno(ina)) { + if (rc != ARCHIVE_OK) { bsdtar_warnc(0, "Error reading archive %s: %s", filename, archive_error_string(ina)); bsdtar->return_value = 1; @@ -623,7 +624,7 @@ copy_file_data(struct bsdtar *bsdtar, st { ssize_t bytes_read; ssize_t bytes_written; - off_t progress = 0; + int64_t progress = 0; bytes_read = archive_read_data(ina, bsdtar->buff, FILEDATABUFLEN); while (bytes_read > 0) { @@ -771,7 +772,7 @@ write_hierarchy(struct bsdtar *bsdtar, s entry, -1, st); if (r != ARCHIVE_OK) bsdtar_warnc(archive_errno(bsdtar->diskreader), - archive_error_string(bsdtar->diskreader)); + "%s", archive_error_string(bsdtar->diskreader)); if (r < ARCHIVE_WARN) continue; @@ -935,7 +936,7 @@ write_file_data(struct bsdtar *bsdtar, s { ssize_t bytes_read; ssize_t bytes_written; - off_t progress = 0; + int64_t progress = 0; bytes_read = read(fd, bsdtar->buff, FILEDATABUFLEN); while (bytes_read > 0) { From owner-svn-src-all@FreeBSD.ORG Sat Feb 6 20:46:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0C91E106570C; Sat, 6 Feb 2010 20:46:15 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EDFDA8FC0C; Sat, 6 Feb 2010 20:46:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o16KkE8u034724; Sat, 6 Feb 2010 20:46:14 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o16KkEsJ034722; Sat, 6 Feb 2010 20:46:14 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201002062046.o16KkEsJ034722@svn.freebsd.org> From: Marcel Moolenaar Date: Sat, 6 Feb 2010 20:46:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203572 - head/sys/ia64/ia64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Feb 2010 20:46:15 -0000 Author: marcel Date: Sat Feb 6 20:46:14 2010 New Revision: 203572 URL: http://svn.freebsd.org/changeset/base/203572 Log: Fix single-stepping when the kernel was entered through the EPC syscall path. When the taken branch leaves the kernel and enters the process, we still need to execute the instruction at that address. Don't raise SIGTRAP when we branch into the process, but enable single-stepping instead. Modified: head/sys/ia64/ia64/trap.c Modified: head/sys/ia64/ia64/trap.c ============================================================================== --- head/sys/ia64/ia64/trap.c Sat Feb 6 20:41:25 2010 (r203571) +++ head/sys/ia64/ia64/trap.c Sat Feb 6 20:46:14 2010 (r203572) @@ -803,7 +803,7 @@ trap(int vector, struct trapframe *tf) * out of the gateway page we'll get back into the kernel * and then we enable single stepping. * Since this a rather round-about way of enabling single - * stepping, don't make things complicated even more by + * stepping, don't make things even more complicated by * calling userret() and do_ast(). We do that later... */ tf->tf_special.psr &= ~IA64_PSR_LP; @@ -814,13 +814,14 @@ trap(int vector, struct trapframe *tf) /* * Don't assume there aren't any branches other than the * branch that takes us out of the gateway page. Check the - * iip and raise SIGTRAP only when it's an user address. + * iip and enable single stepping only when it's an user + * address. */ if (tf->tf_special.iip >= VM_MAX_ADDRESS) return; tf->tf_special.psr &= ~IA64_PSR_TB; - sig = SIGTRAP; - break; + tf->tf_special.psr |= IA64_PSR_SS; + return; case IA64_VEC_IA32_EXCEPTION: case IA64_VEC_IA32_INTERCEPT: From owner-svn-src-all@FreeBSD.ORG Sat Feb 6 21:12:27 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7DA921065692; Sat, 6 Feb 2010 21:12:27 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 691DB8FC0C; Sat, 6 Feb 2010 21:12:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o16LCRkF040505; Sat, 6 Feb 2010 21:12:27 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o16LCRnS040502; Sat, 6 Feb 2010 21:12:27 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201002062112.o16LCRnS040502@svn.freebsd.org> From: Marius Strobl Date: Sat, 6 Feb 2010 21:12:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203573 - stable/7/sys/sparc64/sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Feb 2010 21:12:27 -0000 Author: marius Date: Sat Feb 6 21:12:27 2010 New Revision: 203573 URL: http://svn.freebsd.org/changeset/base/203573 Log: MFC: r203185 Implement handling of the third argument of cpu_switch(). PR: 143215 Approved by: re (kib) Modified: stable/7/sys/sparc64/sparc64/genassym.c stable/7/sys/sparc64/sparc64/swtch.S Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/sparc64/sparc64/genassym.c ============================================================================== --- stable/7/sys/sparc64/sparc64/genassym.c Sat Feb 6 20:46:14 2010 (r203572) +++ stable/7/sys/sparc64/sparc64/genassym.c Sat Feb 6 21:12:27 2010 (r203573) @@ -239,6 +239,7 @@ ASSYM(P_VMSPACE, offsetof(struct proc, p ASSYM(TD_FLAGS, offsetof(struct thread, td_flags)); ASSYM(TD_FRAME, offsetof(struct thread, td_frame)); ASSYM(TD_KSTACK, offsetof(struct thread, td_kstack)); +ASSYM(TD_LOCK, offsetof(struct thread, td_lock)); ASSYM(TD_PCB, offsetof(struct thread, td_pcb)); ASSYM(TD_PROC, offsetof(struct thread, td_proc)); ASSYM(TD_MD, offsetof(struct thread, td_md)); Modified: stable/7/sys/sparc64/sparc64/swtch.S ============================================================================== --- stable/7/sys/sparc64/sparc64/swtch.S Sat Feb 6 20:46:14 2010 (r203572) +++ stable/7/sys/sparc64/sparc64/swtch.S Sat Feb 6 21:12:27 2010 (r203573) @@ -46,15 +46,14 @@ ENTRY(cpu_throw) save %sp, -CCFSZ, %sp flushw ba %xcc, .Lsw1 - mov %i1, %i0 + mov %g0, %i2 END(cpu_throw) /* - * void cpu_switch(struct thread *old, struct thread *new) + * void cpu_switch(struct thread *old, struct thread *new, struct mtx *mtx) */ ENTRY(cpu_switch) save %sp, -CCFSZ, %sp - mov %i1, %i0 /* * If the current thread was using floating point in the kernel, save @@ -63,7 +62,7 @@ ENTRY(cpu_switch) */ rd %fprs, %l2 andcc %l2, FPRS_FEF, %g0 - bz,a,pt %xcc, 1f + bz,a,pt %xcc, 1f nop call savefpctx add PCB_REG, PCB_KFP, %o0 @@ -104,24 +103,24 @@ ENTRY(cpu_switch) .Lsw1: #if KTR_COMPILE & KTR_PROC CATR(KTR_PROC, "cpu_switch: new td=%p pc=%#lx fp=%#lx" - , %g1, %g2, %g3, 7, 8, 9) - stx %i0, [%g1 + KTR_PARM1] - ldx [%i0 + TD_PCB], %g2 + , %g1, %g2, %g3, 8, 9, 10) + stx %i1, [%g1 + KTR_PARM1] + ldx [%i1 + TD_PCB], %g2 ldx [%g2 + PCB_PC], %g3 stx %g3, [%g1 + KTR_PARM2] ldx [%g2 + PCB_SP], %g3 stx %g3, [%g1 + KTR_PARM3] -9: +10: #endif - ldx [%i0 + TD_PCB], %i1 + ldx [%i1 + TD_PCB], %l0 - stx %i0, [PCPU(CURTHREAD)] - stx %i1, [PCPU(CURPCB)] + stx %i1, [PCPU(CURTHREAD)] + stx %l0, [PCPU(CURPCB)] wrpr %g0, PSTATE_NORMAL, %pstate - mov %i1, PCB_REG + mov %l0, PCB_REG wrpr %g0, PSTATE_ALT, %pstate - mov %i1, PCB_REG + mov %l0, PCB_REG wrpr %g0, PSTATE_KERNEL, %pstate ldx [PCB_REG + PCB_SP], %fp @@ -132,24 +131,24 @@ ENTRY(cpu_switch) * Point to the pmaps of the new process, and of the last non-kernel * process to run. */ - ldx [%i0 + TD_PROC], %i2 + ldx [%i1 + TD_PROC], %l1 ldx [PCPU(PMAP)], %l2 - ldx [%i2 + P_VMSPACE], %i5 - add %i5, VM_PMAP, %i2 + ldx [%l1 + P_VMSPACE], %i5 + add %i5, VM_PMAP, %l1 #if KTR_COMPILE & KTR_PROC CATR(KTR_PROC, "cpu_switch: new pmap=%p old pmap=%p" - , %g1, %g2, %g3, 7, 8, 9) - stx %i2, [%g1 + KTR_PARM1] + , %g1, %g2, %g3, 8, 9, 10) + stx %l1, [%g1 + KTR_PARM1] stx %l2, [%g1 + KTR_PARM2] -9: +10: #endif /* * If they are the same we are done. */ - cmp %l2, %i2 - be,a,pn %xcc, 5f + cmp %l2, %l1 + be,a,pn %xcc, 7f nop /* @@ -158,21 +157,20 @@ ENTRY(cpu_switch) */ SET(vmspace0, %i4, %i3) cmp %i5, %i3 - be,a,pn %xcc, 5f + be,a,pn %xcc, 7f nop /* * If there was no non-kernel pmap, don't try to deactivate it. */ - brz,a,pn %l2, 3f - nop + brz,pn %l2, 3f + lduw [PCPU(CPUMASK)], %l4 /* * Mark the pmap of the last non-kernel vmspace to run as no longer * active on this CPU. */ lduw [%l2 + PM_ACTIVE], %l3 - lduw [PCPU(CPUMASK)], %l4 andn %l3, %l4, %l3 stw %l3, [%l2 + PM_ACTIVE] @@ -185,25 +183,28 @@ ENTRY(cpu_switch) mov -1, %l5 stw %l5, [%l3 + %l4] +3: cmp %i2, %g0 + be,pn %xcc, 4f + lduw [PCPU(TLB_CTX_MAX)], %i4 + stx %i2, [%i0 + TD_LOCK] + /* * Find a new TLB context. If we've run out we have to flush all * user mappings from the TLB and reset the context numbers. */ -3: lduw [PCPU(TLB_CTX)], %i3 - lduw [PCPU(TLB_CTX_MAX)], %i4 +4: lduw [PCPU(TLB_CTX)], %i3 cmp %i3, %i4 - bne,a,pt %xcc, 4f + bne,a,pt %xcc, 5f nop SET(tlb_flush_user, %i5, %i4) ldx [%i4], %i5 call %i5 - nop - lduw [PCPU(TLB_CTX_MIN)], %i3 + lduw [PCPU(TLB_CTX_MIN)], %i3 /* * Advance next free context. */ -4: add %i3, 1, %i4 +5: add %i3, 1, %i4 stw %i4, [PCPU(TLB_CTX)] /* @@ -211,36 +212,36 @@ ENTRY(cpu_switch) */ lduw [PCPU(CPUID)], %i4 sllx %i4, INT_SHIFT, %i4 - add %i2, PM_CONTEXT, %i5 + add %l1, PM_CONTEXT, %i5 stw %i3, [%i4 + %i5] /* * Mark the pmap as active on this CPU. */ - lduw [%i2 + PM_ACTIVE], %i4 + lduw [%l1 + PM_ACTIVE], %i4 lduw [PCPU(CPUMASK)], %i5 or %i4, %i5, %i4 - stw %i4, [%i2 + PM_ACTIVE] + stw %i4, [%l1 + PM_ACTIVE] /* * Make note of the change in pmap. */ - stx %i2, [PCPU(PMAP)] + stx %l1, [PCPU(PMAP)] /* * Fiddle the hardware bits. Set the TSB registers and install the * new context number in the CPU. */ - ldx [%i2 + PM_TSB], %i4 + ldx [%l1 + PM_TSB], %i4 mov AA_DMMU_TSB, %i5 stxa %i4, [%i5] ASI_DMMU mov AA_IMMU_TSB, %i5 stxa %i4, [%i5] ASI_IMMU setx TLB_PCXR_PGSZ_MASK, %i5, %i4 mov AA_DMMU_PCXR, %i5 - ldxa [%i5] ASI_DMMU, %i2 - and %i2, %i4, %i2 - or %i3, %i2, %i3 + ldxa [%i5] ASI_DMMU, %l1 + and %l1, %i4, %l1 + or %i3, %l1, %i3 sethi %hi(KERNBASE), %i4 stxa %i3, [%i5] ASI_DMMU flush %i4 @@ -248,7 +249,15 @@ ENTRY(cpu_switch) /* * Done, return and load the new process's window from the stack. */ -5: ret + +6: ret + restore + +7: cmp %i2, %g0 + be,a,pn %xcc, 6b + nop + stx %i2, [%i0 + TD_LOCK] + ret restore END(cpu_switch) From owner-svn-src-all@FreeBSD.ORG Sat Feb 6 21:22:02 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1C6E9106566B; Sat, 6 Feb 2010 21:22:02 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0A42C8FC18; Sat, 6 Feb 2010 21:22:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o16LM1HT042780; Sat, 6 Feb 2010 21:22:01 GMT (envelope-from bms@svn.freebsd.org) Received: (from bms@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o16LM1eS042778; Sat, 6 Feb 2010 21:22:01 GMT (envelope-from bms@svn.freebsd.org) Message-Id: <201002062122.o16LM1eS042778@svn.freebsd.org> From: Bruce M Simpson Date: Sat, 6 Feb 2010 21:22:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203574 - head/etc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Feb 2010 21:22:02 -0000 Author: bms Date: Sat Feb 6 21:22:01 2010 New Revision: 203574 URL: http://svn.freebsd.org/changeset/base/203574 Log: Add sane-port (Scanner Access Now Easy) as port 6566. Obtained from: http://www.iana.org/assignments/port-numbers MFC after: 3 days Modified: head/etc/services Modified: head/etc/services ============================================================================== --- head/etc/services Sat Feb 6 21:12:27 2010 (r203573) +++ head/etc/services Sat Feb 6 21:22:01 2010 (r203574) @@ -2340,6 +2340,8 @@ sge_execd 6445/tcp #Grid Engine Execut sge_execd 6445/udp #Grid Engine Execution Service xdsxdm 6558/tcp xdsxdm 6558/udp +sane-port 6566/tcp #Scanner Access Now Easy (SANE) Control Port +sane-port 6566/udp #Scanner Access Now Easy (SANE) Control Port ircd 6667/tcp #Internet Relay Chat (unoffical) acmsoda 6969/tcp acmsoda 6969/udp From owner-svn-src-all@FreeBSD.ORG Sat Feb 6 22:57:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D0FEC1065676; Sat, 6 Feb 2010 22:57:24 +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 B5D508FC17; Sat, 6 Feb 2010 22:57:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o16MvOeI063799; Sat, 6 Feb 2010 22:57:24 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o16MvOsj063794; Sat, 6 Feb 2010 22:57:24 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201002062257.o16MvOsj063794@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 6 Feb 2010 22:57:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203576 - in head: bin/sh tools/regression/bin/sh/parameters X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Feb 2010 22:57:25 -0000 Author: jilles Date: Sat Feb 6 22:57:24 2010 New Revision: 203576 URL: http://svn.freebsd.org/changeset/base/203576 Log: sh: Do not stat() $MAIL/$MAILPATH in non-interactive shells. These may be NFS mounted, and we should not touch them unless we are going to do something useful with the information. Added: head/tools/regression/bin/sh/parameters/mail1.0 (contents, props changed) head/tools/regression/bin/sh/parameters/mail2.0 (contents, props changed) Modified: head/bin/sh/main.c head/bin/sh/var.c Modified: head/bin/sh/main.c ============================================================================== --- head/bin/sh/main.c Sat Feb 6 22:50:50 2010 (r203575) +++ head/bin/sh/main.c Sat Feb 6 22:57:24 2010 (r203576) @@ -157,6 +157,8 @@ main(int argc, char *argv[]) out2fmt_flush("sh: cannot determine working directory\n"); if (getpwd() != NULL) setvar ("PWD", getpwd(), VEXPORT); + if (iflag) + chkmail(1); if (argv[0] && argv[0][0] == '-') { state = 1; read_profile("/etc/profile"); Modified: head/bin/sh/var.c ============================================================================== --- head/bin/sh/var.c Sat Feb 6 22:50:50 2010 (r203575) +++ head/bin/sh/var.c Sat Feb 6 22:57:24 2010 (r203576) @@ -337,8 +337,13 @@ setvareq(char *s, int flags) /* * We could roll this to a function, to handle it as * a regular variable function callback, but why bother? + * + * Note: this assumes iflag is not set to 1 initially. + * As part of init(), this is called before arguments + * are looked at. */ - if (vp == &vmpath || (vp == &vmail && ! mpathset())) + if ((vp == &vmpath || (vp == &vmail && ! mpathset())) && + iflag == 1) chkmail(1); if ((vp->flags & VEXPORT) && localevar(s)) { change_env(s, 1); Added: head/tools/regression/bin/sh/parameters/mail1.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/parameters/mail1.0 Sat Feb 6 22:57:24 2010 (r203576) @@ -0,0 +1,15 @@ +# $FreeBSD$ +# Test that a non-interactive shell does not access $MAIL. + +goodfile=/var/empty/sh-test-goodfile +mailfile=/var/empty/sh-test-mailfile +T=$(mktemp sh-test.XXXXXX) || exit +MAIL=$mailfile ktrace -i -f "$T" sh -c "[ -s $goodfile ]" 2>/dev/null +if ! grep -q $goodfile "$T"; then + # ktrace problem + rc=0 +elif ! grep -q $mailfile "$T"; then + rc=0 +fi +rm "$T" +exit ${rc:-3} Added: head/tools/regression/bin/sh/parameters/mail2.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/parameters/mail2.0 Sat Feb 6 22:57:24 2010 (r203576) @@ -0,0 +1,15 @@ +# $FreeBSD$ +# Test that an interactive shell accesses $MAIL. + +goodfile=/var/empty/sh-test-goodfile +mailfile=/var/empty/sh-test-mailfile +T=$(mktemp sh-test.XXXXXX) || exit +MAIL=$mailfile ktrace -i -f "$T" sh +m -i /dev/null 2>&1 +if ! grep -q $goodfile "$T"; then + # ktrace problem + rc=0 +elif grep -q $mailfile "$T"; then + rc=0 +fi +rm "$T" +exit ${rc:-3}